[BACK]Return to raw_ip.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/raw_ip.c between version 1.107.2.2 and 1.108

version 1.107.2.2, 2010/03/11 15:04:28 version 1.108, 2008/08/06 15:01:23
Line 64 
Line 64 
 __KERNEL_RCSID(0, "$NetBSD$");  __KERNEL_RCSID(0, "$NetBSD$");
   
 #include "opt_inet.h"  #include "opt_inet.h"
 #include "opt_compat_netbsd.h"  
 #include "opt_ipsec.h"  #include "opt_ipsec.h"
 #include "opt_mrouting.h"  #include "opt_mrouting.h"
   
Line 107  __KERNEL_RCSID(0, "$NetBSD$");
Line 106  __KERNEL_RCSID(0, "$NetBSD$");
 #include <netipsec/ipsec_private.h>  #include <netipsec/ipsec_private.h>
 #endif  /* FAST_IPSEC */  #endif  /* FAST_IPSEC */
   
 #ifdef COMPAT_50  
 #include <compat/sys/socket.h>  
 #endif  
   
 struct inpcbtable rawcbtable;  struct inpcbtable rawcbtable;
   
 int      rip_pcbnotify(struct inpcbtable *, struct in_addr,  int      rip_pcbnotify(struct inpcbtable *, struct in_addr,
Line 119  int  rip_bind(struct inpcb *, struct mbu
Line 114  int  rip_bind(struct inpcb *, struct mbu
 int      rip_connect(struct inpcb *, struct mbuf *);  int      rip_connect(struct inpcb *, struct mbuf *);
 void     rip_disconnect(struct inpcb *);  void     rip_disconnect(struct inpcb *);
   
 static void sysctl_net_inet_raw_setup(struct sysctllog **);  
   
 /*  /*
  * Nominal space allocated to a raw ip socket.   * Nominal space allocated to a raw ip socket.
  */   */
Line 138  void
Line 131  void
 rip_init(void)  rip_init(void)
 {  {
   
         sysctl_net_inet_raw_setup(NULL);  
         in_pcbinit(&rawcbtable, 1, 1);          in_pcbinit(&rawcbtable, 1, 1);
 }  }
   
Line 148  rip_sbappendaddr(struct inpcb *last, str
Line 140  rip_sbappendaddr(struct inpcb *last, str
 {  {
         if (last->inp_flags & INP_NOHEADER)          if (last->inp_flags & INP_NOHEADER)
                 m_adj(n, hlen);                  m_adj(n, hlen);
         if (last->inp_flags & INP_CONTROLOPTS          if (last->inp_flags & INP_CONTROLOPTS ||
 #ifdef SO_OTIMESTAMP              last->inp_socket->so_options & SO_TIMESTAMP)
             || last->inp_socket->so_options & SO_OTIMESTAMP  
 #endif  
             || last->inp_socket->so_options & SO_TIMESTAMP)  
                 ip_savecontrol(last, &opts, ip, n);                  ip_savecontrol(last, &opts, ip, n);
         if (sbappendaddr(&last->inp_socket->so_rcv, sa, n, opts) == 0) {          if (sbappendaddr(&last->inp_socket->so_rcv, sa, n, opts) == 0) {
                 /* should notify about lost packet */                  /* should notify about lost packet */
Line 534  rip_usrreq(struct socket *so, int req,
Line 523  rip_usrreq(struct socket *so, int req,
 #endif  #endif
   
         if (req == PRU_CONTROL)          if (req == PRU_CONTROL)
                 return in_control(so, (long)m, nam, (struct ifnet *)control, l);                  return (in_control(so, (long)m, (void *)nam,
                       (struct ifnet *)control, l));
   
         s = splsoftnet();          s = splsoftnet();
   
Line 553  rip_usrreq(struct socket *so, int req,
Line 543  rip_usrreq(struct socket *so, int req,
         if (req != PRU_SEND && req != PRU_SENDOOB && control)          if (req != PRU_SEND && req != PRU_SENDOOB && control)
                 panic("rip_usrreq: unexpected control mbuf");                  panic("rip_usrreq: unexpected control mbuf");
 #endif  #endif
         if (inp == NULL && req != PRU_ATTACH) {          if (inp == 0 && req != PRU_ATTACH) {
                 error = EINVAL;                  error = EINVAL;
                 goto release;                  goto release;
         }          }
Line 698  release:
Line 688  release:
         return (error);          return (error);
 }  }
   
 static void  SYSCTL_SETUP(sysctl_net_inet_raw_setup, "sysctl net.inet.raw subtree setup")
 sysctl_net_inet_raw_setup(struct sysctllog **clog)  
 {  {
   
         sysctl_createv(clog, 0, NULL, NULL,          sysctl_createv(clog, 0, NULL, NULL,

Legend:
Removed from v.1.107.2.2  
changed lines
  Added in v.1.108

CVSweb <webmaster@jp.NetBSD.org>