diff options
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 13 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 16 |
2 files changed, 23 insertions, 6 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 19647d2695f..1812cdb9280 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_usrreq.c,v 1.8 1997/02/05 15:48:27 deraadt Exp $ */ +/* $OpenBSD: tcp_usrreq.c,v 1.9 1997/06/06 11:22:18 deraadt Exp $ */ /* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */ /* @@ -580,6 +580,17 @@ tcp_sysctl(name, namelen, oldp, oldlenp, newp, newlen) return (sysctl_int(oldp, oldlenp, newp, newlen, &tcptv_keep_init)); + case TCPCTL_KEEPIDLE: + return (sysctl_int(oldp, oldlenp, newp, newlen, + &tcp_keepidle)); + + case TCPCTL_KEEPINTVL: + return (sysctl_int(oldp, oldlenp, newp, newlen, + &tcp_keepintvl)); + + case TCPCTL_SLOWHZ: + return (sysctl_rdint(oldp, oldlenp, newp, PR_SLOWHZ)); + default: return (ENOPROTOOPT); } diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index d7e84dd6201..4af16304c3a 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_var.h,v 1.5 1996/09/20 22:53:13 deraadt Exp $ */ +/* $OpenBSD: tcp_var.h,v 1.6 1997/06/06 11:22:18 deraadt Exp $ */ /* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */ /* @@ -230,15 +230,21 @@ struct tcpstat { /* * Names for TCP sysctl objects. */ - /* enable/disable RFC1323 timestamps/scaling */ -#define TCPCTL_RFC1323 1 -#define TCPCTL_KEEPINITTIME 2 -#define TCPCTL_MAXID 3 + +#define TCPCTL_RFC1323 1 /* enable/disable RFC1323 timestamps/scaling */ +#define TCPCTL_KEEPINITTIME 2 /* TCPT_KEEP value */ +#define TCPCTL_KEEPIDLE 3 /* allow tcp_keepidle to be changed */ +#define TCPCTL_KEEPINTVL 4 /* allow tcp_keepintvl to be changed */ +#define TCPCTL_SLOWHZ 5 /* return kernel idea of PR_SLOWHZ */ +#define TCPCTL_MAXID 6 #define TCPCTL_NAMES { \ { 0, 0 }, \ { "rfc1323", CTLTYPE_INT }, \ { "keepinittime", CTLTYPE_INT }, \ + { "keepidle", CTLTYPE_INT }, \ + { "keepintvl", CTLTYPE_INT }, \ + { "slowhz", CTLTYPE_INT }, \ } #ifdef _KERNEL |