diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-01-24 18:21:41 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-01-24 18:21:41 +0000 |
commit | a3dec3a8cd5eee462f1aa04582138858734d7366 (patch) | |
tree | 5d6dabf55905110a1aed5f27ff4b3f9e8de6f5b0 | |
parent | 01473e56fe2479c167859cc9c2232d82dceb0060 (diff) |
sysctl for def sizes for tcp/udp send/recv queues
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 13 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 8 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 10 | ||||
-rw-r--r-- | sys/netinet/udp_var.h | 12 |
4 files changed, 31 insertions, 12 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index d447ed66740..50df2eea2af 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.15 1998/01/20 02:22:31 mickey Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.16 1998/01/24 18:21:39 mickey Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -440,11 +440,11 @@ tcp_ctloutput(op, so, level, optname, mp) #ifndef TCP_SENDSPACE #define TCP_SENDSPACE 1024*16; #endif -u_long tcp_sendspace = TCP_SENDSPACE; +u_int tcp_sendspace = TCP_SENDSPACE; #ifndef TCP_RECVSPACE #define TCP_RECVSPACE 1024*16; #endif -u_long tcp_recvspace = TCP_RECVSPACE; +u_int tcp_recvspace = TCP_RECVSPACE; /* * Attach TCP protocol to socket, allocating @@ -578,6 +578,7 @@ tcp_sysctl(name, namelen, oldp, oldlenp, newp, newlen) case TCPCTL_RFC1323: return (sysctl_int(oldp, oldlenp, newp, newlen, &tcp_do_rfc1323)); + case TCPCTL_KEEPINITTIME: return (sysctl_int(oldp, oldlenp, newp, newlen, &tcptv_keep_init)); @@ -597,6 +598,12 @@ tcp_sysctl(name, namelen, oldp, oldlenp, newp, newlen) return (sysctl_struct(oldp, oldlenp, newp, newlen, baddynamicports.tcp, sizeof(baddynamicports.tcp))); + case TCPCTL_RECVSPACE: + return (sysctl_int(oldp, oldlenp, newp, newlen,&tcp_recvspace)); + + case TCPCTL_SENDSPACE: + return (sysctl_int(oldp, oldlenp, newp, newlen,&tcp_sendspace)); + default: return (ENOPROTOOPT); } diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 1a4a946a6ff..db09a476bd5 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_var.h,v 1.8 1997/08/09 23:36:27 millert Exp $ */ +/* $OpenBSD: tcp_var.h,v 1.9 1998/01/24 18:21:39 mickey Exp $ */ /* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */ /* @@ -237,7 +237,9 @@ struct tcpstat { #define TCPCTL_KEEPINTVL 4 /* allow tcp_keepintvl to be changed */ #define TCPCTL_SLOWHZ 5 /* return kernel idea of PR_SLOWHZ */ #define TCPCTL_BADDYNAMIC 6 /* return bad dynamic port bitmap */ -#define TCPCTL_MAXID 7 +#define TCPCTL_RECVSPACE 7 /* receive buffer space */ +#define TCPCTL_SENDSPACE 8 /* send buffer space */ +#define TCPCTL_MAXID 9 #define TCPCTL_NAMES { \ { 0, 0 }, \ @@ -247,6 +249,8 @@ struct tcpstat { { "keepintvl", CTLTYPE_INT }, \ { "slowhz", CTLTYPE_INT }, \ { "baddynamic", CTLTYPE_STRUCT }, \ + { "recvspace", CTLTYPE_INT }, \ + { "sendspace", CTLTYPE_INT }, \ } #ifdef _KERNEL diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index e68f0241e94..a4385204238 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_usrreq.c,v 1.13 1997/09/07 02:19:24 deraadt Exp $ */ +/* $OpenBSD: udp_usrreq.c,v 1.14 1998/01/24 18:21:39 mickey Exp $ */ /* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */ /* @@ -516,8 +516,8 @@ release: return (error); } -u_long udp_sendspace = 9216; /* really max datagram size */ -u_long udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in)); +u_int udp_sendspace = 9216; /* really max datagram size */ +u_int udp_recvspace = 40 * (1024 + sizeof(struct sockaddr_in)); /* 40 1K datagrams */ /*ARGSUSED*/ @@ -690,6 +690,10 @@ udp_sysctl(name, namelen, oldp, oldlenp, newp, newlen) case UDPCTL_BADDYNAMIC: return (sysctl_struct(oldp, oldlenp, newp, newlen, baddynamicports.udp, sizeof(baddynamicports.udp))); + case UDPCTL_RECVSPACE: + return (sysctl_int(oldp, oldlenp, newp, newlen,&udp_recvspace)); + case UDPCTL_SENDSPACE: + return (sysctl_int(oldp, oldlenp, newp, newlen,&udp_sendspace)); default: return (ENOPROTOOPT); } diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index aa979c34260..af429702de6 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: udp_var.h,v 1.5 1997/08/26 20:02:35 deraadt Exp $ */ +/* $OpenBSD: udp_var.h,v 1.6 1998/01/24 18:21:40 mickey Exp $ */ /* $NetBSD: udp_var.h,v 1.12 1996/02/13 23:44:41 christos Exp $ */ /* @@ -70,14 +70,18 @@ struct udpstat { /* * Names for UDP sysctl objects */ -#define UDPCTL_CHECKSUM 1 /* checksum UDP packets */ -#define UDPCTL_BADDYNAMIC 2 /* return bad dynamic port bitmap */ -#define UDPCTL_MAXID 3 +#define UDPCTL_CHECKSUM 1 /* checksum UDP packets */ +#define UDPCTL_BADDYNAMIC 2 /* return bad dynamic port bitmap */ +#define UDPCTL_RECVSPACE 3 /* receive buffer space */ +#define UDPCTL_SENDSPACE 4 /* send buffer space */ +#define UDPCTL_MAXID 5 #define UDPCTL_NAMES { \ { 0, 0 }, \ { "checksum", CTLTYPE_INT }, \ { "baddynamic", CTLTYPE_STRUCT }, \ + { "recvspace", CTLTYPE_INT }, \ + { "sendspace", CTLTYPE_INT }, \ } #ifdef _KERNEL |