trailing comment after #else or #endif
[unix-history] / usr / src / sys / netinet / udp_usrreq.c
index 8afa5a7..c957a43 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)udp_usrreq.c        7.30 (Berkeley) %G%
+ *     @(#)udp_usrreq.c        7.31 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -575,3 +575,29 @@ udp_detach(inp)
        in_pcbdetach(inp);
        splx(s);
 }
        in_pcbdetach(inp);
        splx(s);
 }
+
+/*
+ * Sysctl for udp variables.
+ */
+udp_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
+       int *name;
+       u_int namelen;
+       void *oldp;
+       size_t *oldlenp;
+       void *newp;
+       size_t newlen;
+{
+       extern int ip_ttl;
+
+       /* all sysctl names at this level are terminal */
+       if (namelen != 1)
+               return (ENOTDIR);
+
+       switch (name[0]) {
+       case UDPCTL_CHECKSUM:
+               return (sysctl_int(oldp, oldlenp, newp, newlen, &udpcksum));
+       default:
+               return (ENOPROTOOPT);
+       }
+       /* NOTREACHED */
+}