Make rtq_reallyold user-configurable via sysctl.

This commit is contained in:
Garrett Wollman 1994-12-14 19:06:37 +00:00
parent c70b84bd3c
commit 5be2baf843
2 changed files with 9 additions and 2 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.h 8.3 (Berkeley) 1/3/94
* $Id: in.h,v 1.3 1994/08/21 05:27:27 paul Exp $
* $Id: in.h,v 1.4 1994/09/06 22:42:18 wollman Exp $
*/
#ifndef _NETINET_IN_H_
@ -226,6 +226,7 @@ struct ip_mreq {
#ifdef notyet
#define IPCTL_DEFMTU 4 /* default MTU */
#endif
#define IPCTL_RTEXPIRE 5 /* cloned route expiration time */
#define IPCTL_MAXID 5
#define IPCTL_NAMES { \
@ -234,6 +235,7 @@ struct ip_mreq {
{ "redirect", CTLTYPE_INT }, \
{ "ttl", CTLTYPE_INT }, \
{ "mtu", CTLTYPE_INT }, \
{ "rtexpire", CTLTYPE_INT }, \
}
@ -247,3 +249,4 @@ void in_socktrim __P((struct sockaddr_in *));
#endif
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
* $Id: ip_input.c,v 1.12 1994/12/12 17:20:53 ugen Exp $
* $Id: ip_input.c,v 1.13 1994/12/13 23:08:11 wollman Exp $
*/
#include <sys/param.h>
@ -1194,6 +1194,8 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
void *newp;
size_t newlen;
{
extern int rtq_reallyold; /* XXX */
/* All sysctl names at this level are terminal. */
if (namelen != 1)
return (ENOTDIR);
@ -1210,6 +1212,8 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
case IPCTL_DEFMTU:
return (sysctl_int(oldp, oldlenp, newp, newlen, &ip_mtu));
#endif
case IPCTL_RTEXPIRE:
return (sysctl_int(oldp, oldlenp, newp, newlen, &rtq_reallyold));
default:
return (EOPNOTSUPP);
}