[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.138.2.2 and 1.148.6.1

version 1.138.2.2, 2006/12/30 20:50:34 version 1.148.6.1, 2006/10/22 06:07:29
Line 139  __KERNEL_RCSID(0, "$NetBSD$");
Line 139  __KERNEL_RCSID(0, "$NetBSD$");
  * UDP protocol implementation.   * UDP protocol implementation.
  * Per RFC 768, August, 1980.   * Per RFC 768, August, 1980.
  */   */
   #ifndef COMPAT_42
 int     udpcksum = 1;  int     udpcksum = 1;
   #else
   int     udpcksum = 0;           /* XXX */
   #endif
 int     udp_do_loopback_cksum = 0;  int     udp_do_loopback_cksum = 0;
   
 struct  inpcbtable udbtable;  struct  inpcbtable udbtable;
Line 507  bad:
Line 511  bad:
 }  }
   
 int  int
 udp6_input(struct mbuf **mp, int *offp, int proto)  udp6_input(struct mbuf **mp, int *offp, int proto __unused)
 {  {
         struct mbuf *m = *mp;          struct mbuf *m = *mp;
         int off = *offp;          int off = *offp;
Line 995  udp_ctlinput(int cmd, struct sockaddr *s
Line 999  udp_ctlinput(int cmd, struct sockaddr *s
 }  }
   
 int  int
 udp_ctloutput(int op, struct socket *so, int level, int optname,  udp_ctloutput(op, so, level, optname, mp)
     struct mbuf **mp)          int op;
           struct socket *so;
           int level, optname;
           struct mbuf **mp;
 {  {
         int s;          int s;
         int error = 0;          int error = 0;
Line 1027  udp_ctloutput(int op, struct socket *so,
Line 1034  udp_ctloutput(int op, struct socket *so,
         default:          default:
                 error = EAFNOSUPPORT;                  error = EAFNOSUPPORT;
                 goto end;                  goto end;
                   break;
         }          }
   
   
Line 1039  udp_ctloutput(int op, struct socket *so,
Line 1047  udp_ctloutput(int op, struct socket *so,
                 case UDP_ENCAP:                  case UDP_ENCAP:
                         if (m == NULL || m->m_len < sizeof (int)) {                          if (m == NULL || m->m_len < sizeof (int)) {
                                 error = EINVAL;                                  error = EINVAL;
                                 break;                                  goto end;
                         }                          }
   
                         switch(*mtod(m, int *)) {                          switch(*mtod(m, int *)) {
Line 1060  udp_ctloutput(int op, struct socket *so,
Line 1068  udp_ctloutput(int op, struct socket *so,
 #endif  #endif
                         default:                          default:
                                 error = EINVAL;                                  error = EINVAL;
                                   goto end;
                                 break;                                  break;
                         }                          }
                         break;                          break;
   
                 default:                  default:
                         error = ENOPROTOOPT;                          error = ENOPROTOOPT;
                           goto end;
                         break;                          break;
                 }                  }
                 if (m != NULL) {  
                         m_free(m);  
                 }  
                 break;                  break;
   
         default:          default:
                 error = EINVAL;                  error = EINVAL;
                   goto end;
                 break;                  break;
         }          }
   
Line 1413  SYSCTL_SETUP(sysctl_net_inet_udp_setup, 
Line 1421  SYSCTL_SETUP(sysctl_net_inet_udp_setup, 
  * -1 if an error occurent and m was freed   * -1 if an error occurent and m was freed
  */   */
 static int  static int
 udp4_espinudp(struct mbuf **mp, int off, struct sockaddr *src,  udp4_espinudp(struct mbuf **mp, int off, struct sockaddr *src __unused,
     struct socket *so)      struct socket *so)
 {  {
         size_t len;          size_t len;

Legend:
Removed from v.1.138.2.2  
changed lines
  Added in v.1.148.6.1

CVSweb <webmaster@jp.NetBSD.org>