From d8a9ae30716af9c770e9a2d6fa90fa1c8a84f4aa Mon Sep 17 00:00:00 2001 From: jlemon Date: Sat, 19 May 2001 05:48:07 +0000 Subject: Use new kernel_sysctlbyname function. Remove private copy. --- sys/netncp/ncp_ncp.c | 4 ++-- sys/netncp/ncp_subr.c | 18 ------------------ sys/netncp/ncp_subr.h | 2 -- 3 files changed, 2 insertions(+), 22 deletions(-) (limited to 'sys/netncp') diff --git a/sys/netncp/ncp_ncp.c b/sys/netncp/ncp_ncp.c index 172248c..7905ed0 100644 --- a/sys/netncp/ncp_ncp.c +++ b/sys/netncp/ncp_ncp.c @@ -200,8 +200,8 @@ ncp_renegotiate_connparam(struct ncp_conn *conn, int buffsize, u_int8_t in_optio in_options |= NCP_SECURITY_LEVEL_SIGN_HEADERS; if (conn->li.saddr.sa_family == AF_IPX) { ilen = sizeof(ckslevel); - error = ncp_sysctlbyname("net.ipx.ipx.checksum", &ckslevel, &ilen, - NULL, 0, NULL); + error = kernel_sysctlbyname(curproc, "net.ipx.ipx.checksum", + &ckslevel, &ilen, NULL, 0, NULL); if (error) return error; if (ckslevel == 2) diff --git a/sys/netncp/ncp_subr.c b/sys/netncp/ncp_subr.c index 7c2f0ea..a55e535 100644 --- a/sys/netncp/ncp_subr.c +++ b/sys/netncp/ncp_subr.c @@ -95,24 +95,6 @@ ncp_at_exit(struct proc *p) } int -ncp_sysctlbyname(char *name, void *old, size_t *oldlenp, - void *new, size_t newlen, size_t *retval) -{ - int oid[CTL_MAXNAME]; - int nmlen, plen, error; - - oid[0] = 0; /* sysctl internal magic */ - oid[1] = 3; /* name2oid */ - nmlen = sizeof(oid); - error = kernel_sysctl(curproc, oid, 2, oid, &nmlen, name, strlen(name), &plen); - if (error) - return error; - error = kernel_sysctl(curproc, oid, plen / sizeof(int), old, oldlenp, - new, newlen, retval); - return error; -} - -int ncp_init(void) { ncp_conn_init(); diff --git a/sys/netncp/ncp_subr.h b/sys/netncp/ncp_subr.h index 4eb6342..b1db7af 100644 --- a/sys/netncp/ncp_subr.h +++ b/sys/netncp/ncp_subr.h @@ -113,8 +113,6 @@ int ncp_init(void); int ncp_done(void); int ncp_chkintr(struct ncp_conn *conn, struct proc *p); char*ncp_str_dup(char *s); -int ncp_sysctlbyname(char *name, void *old, size_t *oldlenp, - void *new, size_t newlen, size_t *retval); /* ncp_crypt.c */ void nw_keyhash(const u_char *key, const u_char *buf, int buflen, u_char *target); -- cgit v1.1