[BACK]Return to if_ethersubr.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / net

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/net/if_ethersubr.c between version 1.50.2.1 and 1.50.2.2

version 1.50.2.1, 2000/11/20 18:10:00 version 1.50.2.2, 2000/11/22 16:05:50
Line 72 
Line 72 
 #include "opt_ns.h"  #include "opt_ns.h"
 #include "opt_gateway.h"  #include "opt_gateway.h"
 #include "vlan.h"  #include "vlan.h"
   #include "bpfilter.h"
   
 #include <sys/param.h>  #include <sys/param.h>
 #include <sys/systm.h>  #include <sys/systm.h>
Line 93 
Line 94 
 #include <net/if_dl.h>  #include <net/if_dl.h>
 #include <net/if_types.h>  #include <net/if_types.h>
   
   #if NBPFILTER > 0
   #include <net/bpf.h>
   #endif
   
 #include <net/if_ether.h>  #include <net/if_ether.h>
 #if NVLAN > 0  #if NVLAN > 0
 #include <net/if_vlanvar.h>  #include <net/if_vlanvar.h>
Line 500  ether_input(struct ifnet *ifp, struct mb
Line 505  ether_input(struct ifnet *ifp, struct mb
         u_int16_t etype;          u_int16_t etype;
         int s;          int s;
         struct ether_header *eh;          struct ether_header *eh;
           struct mbuf *n;
 #if defined (ISO) || defined (LLC) || defined(NETATALK)  #if defined (ISO) || defined (LLC) || defined(NETATALK)
         struct llc *l;          struct llc *l;
 #endif  #endif
Line 538  ether_input(struct ifnet *ifp, struct mb
Line 544  ether_input(struct ifnet *ifp, struct mb
                 return;                  return;
         }          }
   
           /* Check if the mbuf has a VLAN tag */
           n = m_aux_find(m, AF_LINK, ETHERTYPE_VLAN);
           if (n) {
   #if NVLAN > 0
                   /*
                    * vlan_input() will either recursively call ether_input()
                    * or drop the packet.
                    */
                   if (((struct ethercom *)ifp)->ec_nvlans != 0)
                           vlan_input(ifp, m);
                   else
   #endif
                           m_freem(m);
                   return;
           }
   
         /*          /*
          * Handle protocols that expect to have the Ethernet header           * Handle protocols that expect to have the Ethernet header
          * (and possibly FCS) intact.           * (and possibly FCS) intact.
Line 808  ether_ifattach(struct ifnet *ifp, const 
Line 830  ether_ifattach(struct ifnet *ifp, const 
         }          }
         LIST_INIT(&((struct ethercom *)ifp)->ec_multiaddrs);          LIST_INIT(&((struct ethercom *)ifp)->ec_multiaddrs);
         ifp->if_broadcastaddr = etherbroadcastaddr;          ifp->if_broadcastaddr = etherbroadcastaddr;
   #if NBPFILTER > 0
           bpfattach(&ifp->if_bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
   #endif
 }  }
   
 void  void
Line 818  ether_ifdetach(struct ifnet *ifp)
Line 843  ether_ifdetach(struct ifnet *ifp)
         struct ether_multi *enm;          struct ether_multi *enm;
         int s;          int s;
   
   #if NBPFILTER > 0
           bpfdetach(ifp);
   #endif
   
 #if NVLAN > 0  #if NVLAN > 0
         if (ec->ec_nvlans)          if (ec->ec_nvlans)
                 vlan_ifdetach(ifp);                  vlan_ifdetach(ifp);

Legend:
Removed from v.1.50.2.1  
changed lines
  Added in v.1.50.2.2

CVSweb <webmaster@jp.NetBSD.org>