[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.20 and 1.21

version 1.20, 1995/06/04 05:58:26 version 1.21, 1995/06/07 16:01:15
Line 96  static struct ip_srcrt {
Line 96  static struct ip_srcrt {
         struct  in_addr route[MAX_IPOPTLEN/sizeof(struct in_addr)];          struct  in_addr route[MAX_IPOPTLEN/sizeof(struct in_addr)];
 } ip_srcrt;  } ip_srcrt;
   
 #ifdef GATEWAY  
 extern  int if_index;  
 u_int32_t *ip_ifmatrix;  
 #endif  
   
 static void save_rte __P((u_char *, struct in_addr));  static void save_rte __P((u_char *, struct in_addr));
 /*  /*
  * IP initialization: fill in IP protocol switch table.   * IP initialization: fill in IP protocol switch table.
Line 125  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;
 #ifdef GATEWAY  
         i = (if_index + 1) * (if_index + 1) * sizeof (u_int32_t);  
         ip_ifmatrix = (u_int32_t *) malloc(i, M_RTABLE, M_WAITOK);  
         bzero((char *)ip_ifmatrix, i);  
 #endif  
 }  }
   
 struct  sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };  struct  sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };
Line 1054  ip_forward(m, srcrt)
Line 1044  ip_forward(m, srcrt)
          */           */
         mcopy = m_copy(m, 0, imin((int)ip->ip_len, 64));          mcopy = m_copy(m, 0, imin((int)ip->ip_len, 64));
   
 #ifdef GATEWAY  
         ip_ifmatrix[rt->rt_ifp->if_index +  
              if_index * m->m_pkthdr.rcvif->if_index]++;  
 #endif  
         /*          /*
          * If forwarding packet using same interface that it came in on,           * If forwarding packet using same interface that it came in on,
          * perhaps should send a redirect to sender to shortcut a hop.           * perhaps should send a redirect to sender to shortcut a hop.

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

CVSweb <webmaster@jp.NetBSD.org>