summaryrefslogtreecommitdiff
path: root/sys/netatalk/ddp_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netatalk/ddp_usrreq.c')
-rw-r--r--sys/netatalk/ddp_usrreq.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c
index 6137596c059..f3193ae421e 100644
--- a/sys/netatalk/ddp_usrreq.c
+++ b/sys/netatalk/ddp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ddp_usrreq.c,v 1.10 2007/10/06 02:18:38 krw Exp $ */
+/* $OpenBSD: ddp_usrreq.c,v 1.11 2007/12/14 18:33:40 deraadt Exp $ */
/*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
@@ -587,3 +587,27 @@ ddp_init()
atintrq1.ifq_maxlen = IFQ_MAXLEN;
atintrq2.ifq_maxlen = IFQ_MAXLEN;
}
+
+/*
+ * Sysctl for ddp variables.
+ */
+int
+ddp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
+ void *newp, size_t newlen)
+{
+ /* All sysctl names at this level are terminal. */
+ if (namelen != 1)
+ return (ENOTDIR);
+
+ switch (name[0]) {
+ case DDPCTL_STATS:
+ if (newp != NULL)
+ return (EPERM);
+ return (sysctl_struct(oldp, oldlenp, newp, newlen,
+ &ddpstat, sizeof(ddpstat)));
+
+ default:
+ return (ENOPROTOOPT);
+ }
+ /* NOTREACHED */
+}