version 1.180, 2003/11/10 20:03:29 |
version 1.182, 2003/11/12 15:00:05 |
Line 219 extern struct domain inetdomain; |
|
Line 219 extern struct domain inetdomain; |
|
int ipqmaxlen = IFQ_MAXLEN; |
int ipqmaxlen = IFQ_MAXLEN; |
u_long in_ifaddrhash; /* size of hash table - 1 */ |
u_long in_ifaddrhash; /* size of hash table - 1 */ |
int in_ifaddrentries; /* total number of addrs */ |
int in_ifaddrentries; /* total number of addrs */ |
struct in_ifaddrhead in_ifaddr; |
struct in_ifaddrhead in_ifaddrhead; |
struct in_ifaddrhashhead *in_ifaddrhashtbl; |
struct in_ifaddrhashhead *in_ifaddrhashtbl; |
u_long in_multihash; /* size of hash table - 1 */ |
u_long in_multihash; /* size of hash table - 1 */ |
int in_multientries; /* total number of addrs */ |
int in_multientries; /* total number of addrs */ |
|
|
ip_protox[pr->pr_protocol] = pr - inetsw; |
ip_protox[pr->pr_protocol] = pr - inetsw; |
LIST_INIT(&ipq); |
LIST_INIT(&ipq); |
ipintrq.ifq_maxlen = ipqmaxlen; |
ipintrq.ifq_maxlen = ipqmaxlen; |
TAILQ_INIT(&in_ifaddr); |
TAILQ_INIT(&in_ifaddrhead); |
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); |
in_multihashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IPMADDR, |
in_multihashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IPMADDR, |
Line 448 ip_input(struct mbuf *m) |
|
Line 448 ip_input(struct mbuf *m) |
|
* If no IP addresses have been set yet but the interfaces |
* If no IP addresses have been set yet but the interfaces |
* are receiving, can't do anything with incoming packets yet. |
* are receiving, can't do anything with incoming packets yet. |
*/ |
*/ |
if (TAILQ_FIRST(&in_ifaddr) == 0) |
if (TAILQ_FIRST(&in_ifaddrhead) == 0) |
goto bad; |
goto bad; |
ipstat.ips_total++; |
ipstat.ips_total++; |
/* |
/* |
Line 2059 ip_sysctl(name, namelen, oldp, oldlenp, |
|
Line 2059 ip_sysctl(name, namelen, oldp, oldlenp, |
|
case IPCTL_CHECKINTERFACE: |
case IPCTL_CHECKINTERFACE: |
return (sysctl_int(oldp, oldlenp, newp, newlen, |
return (sysctl_int(oldp, oldlenp, newp, newlen, |
&ip_checkinterface)); |
&ip_checkinterface)); |
|
|
case IPCTL_IFQ: |
case IPCTL_IFQ: |
return (sysctl_ifq(name+1, namelen-1, |
return (sysctl_ifq(name + 1, namelen - 1, oldp, oldlenp, |
oldp, oldlenp, newp, newlen, |
newp, newlen, &ipintrq)); |
&ipintrq)); |
|
|
|
default: |
default: |
return (EOPNOTSUPP); |
return (EOPNOTSUPP); |