| version 1.96, 2002/08/14 00:23:36 |
version 1.97, 2003/01/20 00:05:46 |
| Line 213 udp_input(m, va_alist) |
|
| Line 213 udp_input(m, va_alist) |
|
| struct sockaddr_in src, dst; |
struct sockaddr_in src, dst; |
| struct ip *ip; |
struct ip *ip; |
| struct udphdr *uh; |
struct udphdr *uh; |
| int iphlen, proto; |
int iphlen; |
| int len; |
int len; |
| int n; |
int n; |
| u_int16_t ip_len; |
u_int16_t ip_len; |
| |
|
| va_start(ap, m); |
va_start(ap, m); |
| iphlen = va_arg(ap, int); |
iphlen = va_arg(ap, int); |
| proto = va_arg(ap, int); |
(void)va_arg(ap, int); /* ignore value, advance ap */ |
| va_end(ap); |
va_end(ap); |
| |
|
| udpstat.udps_ipackets++; |
udpstat.udps_ipackets++; |
| Line 501 udp4_sendup(m, off, src, so) |
|
| Line 501 udp4_sendup(m, off, src, so) |
|
| struct mbuf *opts = NULL; |
struct mbuf *opts = NULL; |
| struct mbuf *n; |
struct mbuf *n; |
| struct inpcb *inp = NULL; |
struct inpcb *inp = NULL; |
| #ifdef INET6 |
|
| struct in6pcb *in6p = NULL; |
|
| #endif |
|
| |
|
| if (!so) |
if (!so) |
| return; |
return; |
| Line 513 udp4_sendup(m, off, src, so) |
|
| Line 510 udp4_sendup(m, off, src, so) |
|
| break; |
break; |
| #ifdef INET6 |
#ifdef INET6 |
| case AF_INET6: |
case AF_INET6: |
| in6p = sotoin6pcb(so); |
|
| break; |
break; |
| #endif |
#endif |
| default: |
default: |
| Line 619 udp4_realinput(src, dst, m, off) |
|
| Line 615 udp4_realinput(src, dst, m, off) |
|
| |
|
| if (IN_MULTICAST(dst4->s_addr) || |
if (IN_MULTICAST(dst4->s_addr) || |
| in_broadcast(*dst4, m->m_pkthdr.rcvif)) { |
in_broadcast(*dst4, m->m_pkthdr.rcvif)) { |
| struct inpcb *last; |
|
| /* |
/* |
| * Deliver a multicast or broadcast datagram to *all* sockets |
* Deliver a multicast or broadcast datagram to *all* sockets |
| * for which the local and remote addresses and ports match |
* for which the local and remote addresses and ports match |
| Line 656 udp4_realinput(src, dst, m, off) |
|
| Line 651 udp4_realinput(src, dst, m, off) |
|
| continue; |
continue; |
| } |
} |
| |
|
| last = inp; |
|
| udp4_sendup(m, off, (struct sockaddr *)src, |
udp4_sendup(m, off, (struct sockaddr *)src, |
| inp->inp_socket); |
inp->inp_socket); |
| rcvcnt++; |
rcvcnt++; |
| Line 725 udp6_realinput(af, src, dst, m, off) |
|
| Line 719 udp6_realinput(af, src, dst, m, off) |
|
| |
|
| if (IN6_IS_ADDR_MULTICAST(&dst6) || |
if (IN6_IS_ADDR_MULTICAST(&dst6) || |
| (af == AF_INET && IN_MULTICAST(dst4->s_addr))) { |
(af == AF_INET && IN_MULTICAST(dst4->s_addr))) { |
| struct in6pcb *last; |
|
| /* |
/* |
| * Deliver a multicast or broadcast datagram to *all* sockets |
* Deliver a multicast or broadcast datagram to *all* sockets |
| * for which the local and remote addresses and ports match |
* for which the local and remote addresses and ports match |
| Line 771 udp6_realinput(af, src, dst, m, off) |
|
| Line 764 udp6_realinput(af, src, dst, m, off) |
|
| continue; |
continue; |
| } |
} |
| |
|
| last = in6p; |
|
| udp6_sendup(m, off, (struct sockaddr *)src, |
udp6_sendup(m, off, (struct sockaddr *)src, |
| in6p->in6p_socket); |
in6p->in6p_socket); |
| rcvcnt++; |
rcvcnt++; |