version 1.130.2.15, 2002/11/11 22:15:23 |
version 1.150.2.3, 2002/08/29 00:56:46 |
Line 192 int ip_forwsrcrt = IPFORWSRCRT; |
|
Line 192 int ip_forwsrcrt = IPFORWSRCRT; |
|
int ip_directedbcast = IPDIRECTEDBCAST; |
int ip_directedbcast = IPDIRECTEDBCAST; |
int ip_allowsrcrt = IPALLOWSRCRT; |
int ip_allowsrcrt = IPALLOWSRCRT; |
int ip_mtudisc = IPMTUDISC; |
int ip_mtudisc = IPMTUDISC; |
int ip_mtudisc_timeout = IPMTUDISCTIMEOUT; |
u_int ip_mtudisc_timeout = IPMTUDISCTIMEOUT; |
#ifdef DIAGNOSTIC |
#ifdef DIAGNOSTIC |
int ipprintfs = 0; |
int ipprintfs = 0; |
#endif |
#endif |
|
|
printf("%s:%d: ipq already locked\n", __FILE__, __LINE__); \ |
printf("%s:%d: ipq already locked\n", __FILE__, __LINE__); \ |
panic("ipq_lock"); \ |
panic("ipq_lock"); \ |
} \ |
} \ |
} while (/*CONSTCOND*/ 0) |
} while (0) |
#define IPQ_LOCK_CHECK() \ |
#define IPQ_LOCK_CHECK() \ |
do { \ |
do { \ |
if (ipq_locked == 0) { \ |
if (ipq_locked == 0) { \ |
printf("%s:%d: ipq lock not held\n", __FILE__, __LINE__); \ |
printf("%s:%d: ipq lock not held\n", __FILE__, __LINE__); \ |
panic("ipq lock check"); \ |
panic("ipq lock check"); \ |
} \ |
} \ |
} while (/*CONSTCOND*/ 0) |
} while (0) |
#else |
#else |
#define IPQ_LOCK() (void) ipq_lock_try() |
#define IPQ_LOCK() (void) ipq_lock_try() |
#define IPQ_LOCK_CHECK() /* nothing */ |
#define IPQ_LOCK_CHECK() /* nothing */ |
|
|
TAILQ_INIT(&in_ifaddr); |
TAILQ_INIT(&in_ifaddr); |
in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IFADDR, |
in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IFADDR, |
M_WAITOK, &in_ifaddrhash); |
M_WAITOK, &in_ifaddrhash); |
ip_mtudisc_timeout_q = rt_timer_queue_create(ip_mtudisc_timeout); |
if (ip_mtudisc != 0) |
|
ip_mtudisc_timeout_q = |
|
rt_timer_queue_create(ip_mtudisc_timeout); |
#ifdef GATEWAY |
#ifdef GATEWAY |
ipflow_init(); |
ipflow_init(); |
#endif |
#endif |
Line 1861 ip_sysctl(name, namelen, oldp, oldlenp, |
|
Line 1863 ip_sysctl(name, namelen, oldp, oldlenp, |
|
} |
} |
return (error); |
return (error); |
case IPCTL_MTUDISCTIMEOUT: |
case IPCTL_MTUDISCTIMEOUT: |
old = ip_mtudisc_timeout; |
|
error = sysctl_int(oldp, oldlenp, newp, newlen, |
error = sysctl_int(oldp, oldlenp, newp, newlen, |
&ip_mtudisc_timeout); |
&ip_mtudisc_timeout); |
if (ip_mtudisc_timeout < 0) { |
|
ip_mtudisc_timeout = old; |
|
return (EINVAL); |
|
} |
|
if (ip_mtudisc_timeout_q != NULL) |
if (ip_mtudisc_timeout_q != NULL) |
rt_timer_queue_change(ip_mtudisc_timeout_q, |
rt_timer_queue_change(ip_mtudisc_timeout_q, |
ip_mtudisc_timeout); |
ip_mtudisc_timeout); |
Line 1890 ip_sysctl(name, namelen, oldp, oldlenp, |
|
Line 1887 ip_sysctl(name, namelen, oldp, oldlenp, |
|
&hostzeroisbroadcast)); |
&hostzeroisbroadcast)); |
#if NGIF > 0 |
#if NGIF > 0 |
case IPCTL_GIF_TTL: |
case IPCTL_GIF_TTL: |
return (sysctl_int(oldp, oldlenp, newp, newlen, |
return(sysctl_int(oldp, oldlenp, newp, newlen, |
&ip_gif_ttl)); |
&ip_gif_ttl)); |
#endif |
#endif |
|
|
#if NGRE > 0 |
#if NGRE > 0 |
case IPCTL_GRE_TTL: |
case IPCTL_GRE_TTL: |
return (sysctl_int(oldp, oldlenp, newp, newlen, |
return(sysctl_int(oldp, oldlenp, newp, newlen, |
&ip_gre_ttl)); |
&ip_gre_ttl)); |
#endif |
#endif |
|
|