[BACK]Return to udp_usrreq.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet/udp_usrreq.c between version 1.65 and 1.69

version 1.65, 2000/03/30 02:39:37 version 1.69, 2000/07/07 15:54:16
Line 79 
Line 79 
 #include <sys/proc.h>  #include <sys/proc.h>
 #include <sys/domain.h>  #include <sys/domain.h>
   
 #include <vm/vm.h>  #include <uvm/uvm_extern.h>
 #include <sys/sysctl.h>  #include <sys/sysctl.h>
   
 #include <net/if.h>  #include <net/if.h>
Line 115 
Line 115 
 #ifdef IPSEC  #ifdef IPSEC
 #include <netinet6/ipsec.h>  #include <netinet6/ipsec.h>
 #include <netkey/key.h>  #include <netkey/key.h>
 #include <netkey/key_debug.h>  
 #endif /*IPSEC*/  #endif /*IPSEC*/
   
 #ifdef IPKDB  #ifdef IPKDB
Line 354  udp6_input(mp, offp, proto)
Line 353  udp6_input(mp, offp, proto)
         }          }
 #endif  #endif
         ulen = ntohs((u_short)uh->uh_ulen);          ulen = ntohs((u_short)uh->uh_ulen);
           /*
            * RFC2675 section 4: jumbograms will have 0 in the UDP header field,
            * iff payload length > 0xffff.
            */
         if (ulen == 0 && plen > 0xffff)          if (ulen == 0 && plen > 0xffff)
                 ulen = plen;                  ulen = plen;
   
Line 390  udp6_input(mp, offp, proto)
Line 393  udp6_input(mp, offp, proto)
         bzero(&src, sizeof(src));          bzero(&src, sizeof(src));
         src.sin6_family = AF_INET6;          src.sin6_family = AF_INET6;
         src.sin6_len = sizeof(struct sockaddr_in6);          src.sin6_len = sizeof(struct sockaddr_in6);
         bcopy(&ip6->ip6_src, &src.sin6_addr, sizeof(src.sin6_addr));          /* KAME hack: recover scopeid */
         if (IN6_IS_SCOPE_LINKLOCAL(&src.sin6_addr))          (void)in6_recoverscope(&src, &ip6->ip6_src, m->m_pkthdr.rcvif);
                 src.sin6_addr.s6_addr16[1] = 0;  
         if (m->m_pkthdr.rcvif) {  
                 if (IN6_IS_SCOPE_LINKLOCAL(&src.sin6_addr))  
                         src.sin6_scope_id = m->m_pkthdr.rcvif->if_index;  
                 else  
                         src.sin6_scope_id = 0;  
         }  
         src.sin6_port = uh->uh_sport;          src.sin6_port = uh->uh_sport;
         bzero(&dst, sizeof(dst));          bzero(&dst, sizeof(dst));
         dst.sin6_family = AF_INET6;          dst.sin6_family = AF_INET6;
         dst.sin6_len = sizeof(struct sockaddr_in6);          dst.sin6_len = sizeof(struct sockaddr_in6);
         bcopy(&ip6->ip6_dst, &dst.sin6_addr, sizeof(dst.sin6_addr));          /* KAME hack: recover scopeid */
         if (IN6_IS_SCOPE_LINKLOCAL(&dst.sin6_addr))          (void)in6_recoverscope(&dst, &ip6->ip6_dst, m->m_pkthdr.rcvif);
                 dst.sin6_addr.s6_addr16[1] = 0;  
         if (m->m_pkthdr.rcvif) {  
                 if (IN6_IS_SCOPE_LINKLOCAL(&dst.sin6_addr))  
                         dst.sin6_scope_id = m->m_pkthdr.rcvif->if_index;  
                 else  
                         dst.sin6_scope_id = 0;  
         }  
         dst.sin6_port = uh->uh_dport;          dst.sin6_port = uh->uh_dport;
   
         if (udp6_realinput(AF_INET6, &src, &dst, m, off) == 0) {          if (udp6_realinput(AF_INET6, &src, &dst, m, off) == 0) {
Line 672  bad:
Line 661  bad:
 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 873  udp_input(m, va_alist)
Line 862  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 1144  bad:
Line 1133  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 1148  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 1186  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 1267  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,

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.69

CVSweb <webmaster@jp.NetBSD.org>