summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-02-16 00:27:47 +0000
committerwollman <wollman@FreeBSD.org>1995-02-16 00:27:47 +0000
commitd9804d3f5c56924ae9cdd5ae7158f755b5048e16 (patch)
treec55472d24cbc6b9c5e2ff9ed34ce203485bb98af /sys/netinet/udp_usrreq.c
parent668541d9ec6dbf8324e4383c47e81d62dfd9fca2 (diff)
downloadFreeBSD-src-d9804d3f5c56924ae9cdd5ae7158f755b5048e16.zip
FreeBSD-src-d9804d3f5c56924ae9cdd5ae7158f755b5048e16.tar.gz
Add lots of useful MIB variables and a few not-so-useful ones for
completeness.
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 8d70484..c34e470 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)udp_usrreq.c 8.4 (Berkeley) 1/21/94
- * $Id: udp_usrreq.c,v 1.3 1994/08/02 07:49:24 davidg Exp $
+ * $Id: udp_usrreq.c,v 1.4 1994/10/02 17:48:45 phk Exp $
*/
#include <sys/param.h>
@@ -66,6 +66,9 @@ int udpcksum = 1;
int udpcksum = 0; /* XXX */
#endif
+struct inpcb udb; /* from udp_var.h */
+struct udpstat udpstat; /* from udp_var.h */
+
struct sockaddr_in udp_in = { sizeof(udp_in), AF_INET };
struct inpcb *udp_last_inpcb = &udb;
@@ -637,6 +640,15 @@ udp_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
switch (name[0]) {
case UDPCTL_CHECKSUM:
return (sysctl_int(oldp, oldlenp, newp, newlen, &udpcksum));
+ case UDPCTL_STATS:
+ return (sysctl_rdstruct(oldp, oldlenp, newp, &udpstat,
+ sizeof udpstat));
+ case UDPCTL_MAXDGRAM:
+ return (sysctl_int(oldp, oldlenp, newp, newlen,
+ (int *)&udp_sendspace)); /* XXX */
+ case UDPCTL_RECVSPACE:
+ return (sysctl_int(oldp, oldlenp, newp, newlen,
+ (int *)&udp_recvspace)); /* XXX */
default:
return (ENOPROTOOPT);
}
OpenPOWER on IntegriCloud