diff options
author | Matthew Dillon <dillon@FreeBSD.org> | 1998-12-04 04:21:25 +0000 |
---|---|---|
committer | Matthew Dillon <dillon@FreeBSD.org> | 1998-12-04 04:21:25 +0000 |
commit | 5fce7fc47f06028dd000712d8df55ff54de36c09 (patch) | |
tree | 9a00c5f1136db151cf6c3d3e102be064a45da1be /sys/netinet/ip_icmp.c | |
parent | a3e7459d60b3208fc90dcd99c20beedaee7c0eea (diff) | |
download | src-5fce7fc47f06028dd000712d8df55ff54de36c09.tar.gz src-5fce7fc47f06028dd000712d8df55ff54de36c09.zip |
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.
Notes
Notes:
svn path=/head/; revision=41497
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 5541363b2cc8..d4eb5ca816dd 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, ""); |