Date: Thu, 4 Apr 1996 13:25:35 +1000 From: Bruce Evans <bde@zeta.org.au> To: jgreco@brasil.moneng.mei.com, phk@critter.tfs.com Cc: hackers@FreeBSD.ORG Subject: Re: SO_KEEPALIVE - New feature patch enclosed. Message-ID: <199604040325.NAA21196@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>It seems to work for me. I warn you now, though, I'm no kernel hacker. It's much easier to control the variable in -current. For integer variables it takes one line. Something like: SYSCTL_INT(_net_inet_tcp, OID_AUTO, foo, CTLFLAG_RW, &foo, 0, ""); >*** /usr/src/sys/netinet/tcp_var.h.fcs Sat Jul 29 18:16:53 1995 >--- /usr/src/sys/netinet/tcp_var.h Tue Apr 2 22:41:01 1996 >*************** >*** 300,306 **** > #define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */ > #define TCPCTL_SENDSPACE 8 /* send buffer space */ > #define TCPCTL_RECVSPACE 9 /* receive buffer space */ >! #define TCPCTL_MAXID 10 > > #define TCPCTL_NAMES { \ > { 0, 0 }, \ >--- 300,307 ---- > #define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */ > #define TCPCTL_SENDSPACE 8 /* send buffer space */ > #define TCPCTL_RECVSPACE 9 /* receive buffer space */ >! #define TCPCTL_DO_KEEPALIVE 10 /* do keepalive's by default */ >! #define TCPCTL_MAXID 11 > > #define TCPCTL_NAMES { \ > { 0, 0 }, \ OID_AUTO avoids the braindamaged MAXID stuff at the cost of not providing a numeric id for programs to use. The name has to be looked up as a string. This is all that is necessary using sysctl(8). Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604040325.NAA21196>