diff options
author | dillon <dillon@FreeBSD.org> | 1998-12-04 04:21:25 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1998-12-04 04:21:25 +0000 |
commit | 7da0628e5519c77b2818b30342209fc1fc878815 (patch) | |
tree | 213b6893b4546a9c35bb5015e02f1c2ee81f6a9f /sys/netinet/ip_icmp.c | |
parent | b152822d79eab2ba0d3440b948b173dc9d43ecd7 (diff) | |
download | FreeBSD-src-7da0628e5519c77b2818b30342209fc1fc878815.zip FreeBSD-src-7da0628e5519c77b2818b30342209fc1fc878815.tar.gz |
Cleanup icmp_var.h, make icmp bandlim sysctl permanent but if ICMP_BANDLIM
option not defined the sysctl int value is set to -1 and read-only.
#ifdef KERNEL's added appropriately to wall off visibility of kernel
routines from user code.
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 5541363..d4eb5ca 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 - * $Id: ip_icmp.c,v 1.31 1998/09/15 10:49:03 jkoshy Exp $ + * $Id: ip_icmp.c,v 1.32 1998/12/03 20:23:20 dillon Exp $ */ #include <sys/param.h> @@ -71,16 +71,26 @@ SYSCTL_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW, #ifdef ICMP_BANDLIM - /* - * ICMP error-response bandwidth limiting - */ +/* + * ICMP error-response bandwidth limiting sysctl. If not enabled, sysctl + * variable content is -1 and read-only. + */ static int icmplim = 100; SYSCTL_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, &icmplim, 0, ""); - +#else + +static int icmplim = -1; +SYSCTL_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RD, + &icmplim, 0, ""); + #endif +/* + * ICMP broadcast echo sysctl + */ + static int icmpbmcastecho = 0; SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &icmpbmcastecho, 0, ""); |