version 1.59, 1998/03/19 15:46:43 |
version 1.60, 1998/04/29 03:44:11 |
|
|
#ifndef IPMTUDISC |
#ifndef IPMTUDISC |
#define IPMTUDISC 0 |
#define IPMTUDISC 0 |
#endif |
#endif |
|
#ifndef IPMTUDISCTIMEOUT |
|
#define IPMTUDISCTIMEOUT (1 * 60) /* experimental short timeout value! */ |
|
#endif |
|
|
/* |
/* |
* Note: DIRECTED_BROADCAST is handled this way so that previous |
* Note: DIRECTED_BROADCAST is handled this way so that previous |
Line 141 int ip_forwsrcrt = IPFORWSRCRT; |
|
Line 144 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; |
|
u_int ip_mtudisc_timeout = IPMTUDISCTIMEOUT; |
#ifdef DIAGNOSTIC |
#ifdef DIAGNOSTIC |
int ipprintfs = 0; |
int ipprintfs = 0; |
#endif |
#endif |
|
|
|
struct rttimer_queue *ip_mtudisc_timeout_q = NULL; |
|
|
extern struct domain inetdomain; |
extern struct domain inetdomain; |
extern struct protosw inetsw[]; |
extern struct protosw inetsw[]; |
u_char ip_protox[IPPROTO_MAX]; |
u_char ip_protox[IPPROTO_MAX]; |
|
|
TAILQ_INIT(&in_ifaddr); |
TAILQ_INIT(&in_ifaddr); |
in_ifaddrhashtbl = |
in_ifaddrhashtbl = |
hashinit(IN_IFADDR_HASH_SIZE, M_IFADDR, M_WAITOK, &in_ifaddrhash); |
hashinit(IN_IFADDR_HASH_SIZE, M_IFADDR, M_WAITOK, &in_ifaddrhash); |
|
if (ip_mtudisc != 0) |
|
ip_mtudisc_timeout_q = |
|
rt_timer_queue_create(ip_mtudisc_timeout); |
} |
} |
|
|
struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET }; |
struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET }; |
Line 1325 ip_sysctl(name, namelen, oldp, oldlenp, |
|
Line 1334 ip_sysctl(name, namelen, oldp, oldlenp, |
|
return (sysctl_int(oldp, oldlenp, newp, newlen, |
return (sysctl_int(oldp, oldlenp, newp, newlen, |
&subnetsarelocal)); |
&subnetsarelocal)); |
case IPCTL_MTUDISC: |
case IPCTL_MTUDISC: |
return (sysctl_int(oldp, oldlenp, newp, newlen, |
error = sysctl_int(oldp, oldlenp, newp, newlen, |
&ip_mtudisc)); |
&ip_mtudisc); |
|
if (ip_mtudisc != 0 && ip_mtudisc_timeout_q == NULL) { |
|
ip_mtudisc_timeout_q = |
|
rt_timer_queue_create(ip_mtudisc_timeout); |
|
} else if (ip_mtudisc == 0 && ip_mtudisc_timeout_q != NULL) { |
|
rt_timer_queue_destroy(ip_mtudisc_timeout_q, TRUE); |
|
ip_mtudisc_timeout_q = NULL; |
|
} |
|
return error; |
case IPCTL_ANONPORTMIN: |
case IPCTL_ANONPORTMIN: |
old = anonportmin; |
old = anonportmin; |
error = sysctl_int(oldp, oldlenp, newp, newlen, &anonportmin); |
error = sysctl_int(oldp, oldlenp, newp, newlen, &anonportmin); |
Line 1351 ip_sysctl(name, namelen, oldp, oldlenp, |
|
Line 1368 ip_sysctl(name, namelen, oldp, oldlenp, |
|
return (EINVAL); |
return (EINVAL); |
} |
} |
return (error); |
return (error); |
|
case IPCTL_MTUDISCTIMEOUT: |
|
error = sysctl_int(oldp, oldlenp, newp, newlen, |
|
&ip_mtudisc_timeout); |
|
if (ip_mtudisc_timeout_q != NULL) |
|
rt_timer_queue_change(ip_mtudisc_timeout_q, |
|
ip_mtudisc_timeout); |
|
return (error); |
default: |
default: |
return (EOPNOTSUPP); |
return (EOPNOTSUPP); |
} |
} |