version 1.65, 2000/03/30 02:39:37 |
version 1.66.4.2, 2000/12/13 21:24:57 |
Line 232 udp_input(m, va_alist) |
|
Line 232 udp_input(m, va_alist) |
|
*/ |
*/ |
len = ntohs((u_int16_t)uh->uh_ulen); |
len = ntohs((u_int16_t)uh->uh_ulen); |
if (ip->ip_len != iphlen + len) { |
if (ip->ip_len != iphlen + len) { |
if (ip->ip_len < iphlen + len) { |
if (ip->ip_len < iphlen + len || len < sizeof(struct udphdr)) { |
udpstat.udps_badlen++; |
udpstat.udps_badlen++; |
goto bad; |
goto bad; |
} |
} |
Line 554 udp4_realinput(src, dst, m, off) |
|
Line 554 udp4_realinput(src, dst, m, off) |
|
dst4 = &dst->sin_addr; |
dst4 = &dst->sin_addr; |
dport = &dst->sin_port; |
dport = &dst->sin_port; |
|
|
if (IN_MULTICAST(src4->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; |
struct inpcb *last; |
/* |
/* |
|
|
static int |
static int |
in6_mcmatch(in6p, ia6, ifp) |
in6_mcmatch(in6p, ia6, ifp) |
struct in6pcb *in6p; |
struct in6pcb *in6p; |
register struct in6_addr *ia6; |
struct in6_addr *ia6; |
struct ifnet *ifp; |
struct ifnet *ifp; |
{ |
{ |
struct ip6_moptions *im6o = in6p->in6p_moptions; |
struct ip6_moptions *im6o = in6p->in6p_moptions; |
Line 721 udp6_realinput(af, src, dst, m, off) |
|
Line 721 udp6_realinput(af, src, dst, m, off) |
|
src4 = (struct in_addr *)&src->sin6_addr.s6_addr32[12]; |
src4 = (struct in_addr *)&src->sin6_addr.s6_addr32[12]; |
|
|
if (IN6_IS_ADDR_MULTICAST(dst6) |
if (IN6_IS_ADDR_MULTICAST(dst6) |
|| (af == AF_INET && IN_MULTICAST(src4->s_addr))) { |
|| (af == AF_INET && IN_MULTICAST(dst4->s_addr))) { |
struct in6pcb *last; |
struct in6pcb *last; |
/* |
/* |
* Deliver a multicast or broadcast datagram to *all* sockets |
* Deliver a multicast or broadcast datagram to *all* sockets |
Line 873 udp_input(m, va_alist) |
|
Line 873 udp_input(m, va_alist) |
|
#endif |
#endif |
{ |
{ |
int proto; |
int proto; |
register struct ip *ip; |
struct ip *ip; |
register struct udphdr *uh; |
struct udphdr *uh; |
register struct inpcb *inp; |
struct inpcb *inp; |
struct mbuf *opts = 0; |
struct mbuf *opts = 0; |
int len; |
int len; |
struct ip save_ip; |
struct ip save_ip; |
Line 925 udp_input(m, va_alist) |
|
Line 925 udp_input(m, va_alist) |
|
*/ |
*/ |
len = ntohs((u_int16_t)uh->uh_ulen); |
len = ntohs((u_int16_t)uh->uh_ulen); |
if (ip->ip_len != iphlen + len) { |
if (ip->ip_len != iphlen + len) { |
if (ip->ip_len < iphlen + len) { |
if (ip->ip_len < iphlen + len || len < sizeof(struct udphdr)) { |
udpstat.udps_badlen++; |
udpstat.udps_badlen++; |
goto bad; |
goto bad; |
} |
} |
|
|
*/ |
*/ |
static void |
static void |
udp_notify(inp, errno) |
udp_notify(inp, errno) |
register struct inpcb *inp; |
struct inpcb *inp; |
int errno; |
int errno; |
{ |
{ |
|
|
Line 1159 udp_ctlinput(cmd, sa, v) |
|
Line 1159 udp_ctlinput(cmd, sa, v) |
|
struct sockaddr *sa; |
struct sockaddr *sa; |
void *v; |
void *v; |
{ |
{ |
register struct ip *ip = v; |
struct ip *ip = v; |
register struct udphdr *uh; |
struct udphdr *uh; |
void (*notify) __P((struct inpcb *, int)) = udp_notify; |
void (*notify) __P((struct inpcb *, int)) = udp_notify; |
int errno; |
int errno; |
|
|
Line 1197 udp_output(m, va_alist) |
|
Line 1197 udp_output(m, va_alist) |
|
va_dcl |
va_dcl |
#endif |
#endif |
{ |
{ |
register struct inpcb *inp; |
struct inpcb *inp; |
register struct udpiphdr *ui; |
struct udpiphdr *ui; |
register int len = m->m_pkthdr.len; |
int len = m->m_pkthdr.len; |
int error = 0; |
int error = 0; |
va_list ap; |
va_list ap; |
|
|
Line 1278 udp_usrreq(so, req, m, nam, control, p) |
|
Line 1278 udp_usrreq(so, req, m, nam, control, p) |
|
struct mbuf *m, *nam, *control; |
struct mbuf *m, *nam, *control; |
struct proc *p; |
struct proc *p; |
{ |
{ |
register struct inpcb *inp; |
struct inpcb *inp; |
int s; |
int s; |
register int error = 0; |
int error = 0; |
|
|
if (req == PRU_CONTROL) |
if (req == PRU_CONTROL) |
return (in_control(so, (long)m, (caddr_t)nam, |
return (in_control(so, (long)m, (caddr_t)nam, |