Use new kernel_sysctlbyname function. Remove private copy.

This commit is contained in:
jlemon 2001-05-19 05:48:07 +00:00
parent 73537a93c4
commit d8a9ae3071
3 changed files with 2 additions and 22 deletions

View File

@ -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)

View File

@ -94,24 +94,6 @@ ncp_at_exit(struct proc *p)
return;
}
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)
{

View File

@ -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);