[BACK]Return to ip_input.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/ip_input.c between version 1.163 and 1.164

version 1.163, 2002/11/12 02:10:13 version 1.164, 2003/02/26 06:31:14
Line 309  static struct ip_srcrt {
Line 309  static struct ip_srcrt {
   
 static void save_rte __P((u_char *, struct in_addr));  static void save_rte __P((u_char *, struct in_addr));
   
   #ifdef MBUFTRACE
   struct mowner ip_rx_mowner = { "internet", "rx" };
   struct mowner ip_tx_mowner = { "internet", "tx" };
   #endif
   
 /*  /*
  * IP initialization: fill in IP protocol switch table.   * IP initialization: fill in IP protocol switch table.
  * All protocols not implemented in kernel go to raw IP protocol handler.   * All protocols not implemented in kernel go to raw IP protocol handler.
Line 358  ip_init()
Line 363  ip_init()
         evcnt_attach_static(&ip_hwcsum_ok);          evcnt_attach_static(&ip_hwcsum_ok);
         evcnt_attach_static(&ip_swcsum);          evcnt_attach_static(&ip_swcsum);
 #endif /* INET_CSUM_COUNTERS */  #endif /* INET_CSUM_COUNTERS */
   
   #ifdef MBUFTRACE
           MOWNER_ATTACH(&ip_tx_mowner);
           MOWNER_ATTACH(&ip_rx_mowner);
   #endif /* MBUFTRACE */
 }  }
   
 struct  sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };  struct  sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };
Line 378  ipintr()
Line 388  ipintr()
                 splx(s);                  splx(s);
                 if (m == 0)                  if (m == 0)
                         return;                          return;
                   MCLAIM(m, &ip_rx_mowner);
                 ip_input(m);                  ip_input(m);
         }          }
 }  }
Line 397  ip_input(struct mbuf *m)
Line 408  ip_input(struct mbuf *m)
         int hlen = 0, mff, len;          int hlen = 0, mff, len;
         int downmatch;          int downmatch;
   
           MCLAIM(m, &ip_rx_mowner);
 #ifdef  DIAGNOSTIC  #ifdef  DIAGNOSTIC
         if ((m->m_flags & M_PKTHDR) == 0)          if ((m->m_flags & M_PKTHDR) == 0)
                 panic("ipintr no HDR");                  panic("ipintr no HDR");
Line 411  ip_input(struct mbuf *m)
Line 423  ip_input(struct mbuf *m)
                 m->m_flags &= ~M_AUTHIPDGM;                  m->m_flags &= ~M_AUTHIPDGM;
         }          }
 #endif  #endif
   
         /*          /*
          * If no IP addresses have been set yet but the interfaces           * If no IP addresses have been set yet but the interfaces
          * are receiving, can't do anything with incoming packets yet.           * are receiving, can't do anything with incoming packets yet.
Line 1389  ip_srcroute()
Line 1402  ip_srcroute()
         if (m == 0)          if (m == 0)
                 return ((struct mbuf *)0);                  return ((struct mbuf *)0);
   
           MCLAIM(m, &inetdomain.dom_mowner);
 #define OPTSIZ  (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt))  #define OPTSIZ  (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt))
   
         /* length is (nhops+1)*sizeof(addr) + sizeof(nop + srcrt header) */          /* length is (nhops+1)*sizeof(addr) + sizeof(nop + srcrt header) */
Line 1509  ip_forward(m, srcrt)
Line 1523  ip_forward(m, srcrt)
 #endif  #endif
   
         /*          /*
            * We are now in the output path.
            */
           MCLAIM(m, &ip_tx_mowner);
   
           /*
          * Clear any in-bound checksum flags for this packet.           * Clear any in-bound checksum flags for this packet.
          */           */
         m->m_pkthdr.csum_flags = 0;          m->m_pkthdr.csum_flags = 0;

Legend:
Removed from v.1.163  
changed lines
  Added in v.1.164

CVSweb <webmaster@jp.NetBSD.org>