[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.21 and 1.22

version 1.21, 1995/06/07 16:01:15 version 1.22, 1995/06/12 00:47:41
Line 78  extern struct domain inetdomain;
Line 78  extern struct domain inetdomain;
 extern  struct protosw inetsw[];  extern  struct protosw inetsw[];
 u_char  ip_protox[IPPROTO_MAX];  u_char  ip_protox[IPPROTO_MAX];
 int     ipqmaxlen = IFQ_MAXLEN;  int     ipqmaxlen = IFQ_MAXLEN;
 struct  in_ifaddr *in_ifaddr;                   /* first inet address */  struct  in_ifaddrhead in_ifaddr;
 struct  ifqueue ipintrq;  struct  ifqueue ipintrq;
   
 /*  /*
Line 120  ip_init()
Line 120  ip_init()
         ipq.next = ipq.prev = &ipq;          ipq.next = ipq.prev = &ipq;
         ip_id = time.tv_sec & 0xffff;          ip_id = time.tv_sec & 0xffff;
         ipintrq.ifq_maxlen = ipqmaxlen;          ipintrq.ifq_maxlen = ipqmaxlen;
           TAILQ_INIT(&in_ifaddr);
 }  }
   
 struct  sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };  struct  sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };
Line 156  next:
Line 157  next:
          * 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.
          */           */
         if (in_ifaddr == NULL)          if (in_ifaddr.tqh_first == 0)
                 goto bad;                  goto bad;
         ipstat.ips_total++;          ipstat.ips_total++;
         if (m->m_len < sizeof (struct ip) &&          if (m->m_len < sizeof (struct ip) &&
Line 228  next:
Line 229  next:
         /*          /*
          * Check our list of addresses, to see if the packet is for us.           * Check our list of addresses, to see if the packet is for us.
          */           */
         for (ia = in_ifaddr; ia; ia = ia->ia_next) {          for (ia = in_ifaddr.tqh_first; ia; ia = ia->ia_list.tqe_next) {
                 if (ip->ip_dst.s_addr == ia->ia_addr.sin_addr.s_addr)                  if (ip->ip_dst.s_addr == ia->ia_addr.sin_addr.s_addr)
                         goto ours;                          goto ours;
                 if (                  if (

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

CVSweb <webmaster@jp.NetBSD.org>