if_vlan.c (63090) | if_vlan.c (69152) |
---|---|
1/* 2 * Copyright 1998 Massachusetts Institute of Technology 3 * 4 * Permission to use, copy, modify, and distribute this software and 5 * its documentation for any purpose and without fee is hereby 6 * granted, provided that both the above copyright notice and this 7 * permission notice appear in all copies, that both the above 8 * copyright notice and this permission notice appear in all --- 12 unchanged lines hidden (view full) --- 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/* 2 * Copyright 1998 Massachusetts Institute of Technology 3 * 4 * Permission to use, copy, modify, and distribute this software and 5 * its documentation for any purpose and without fee is hereby 6 * granted, provided that both the above copyright notice and this 7 * permission notice appear in all copies, that both the above 8 * copyright notice and this permission notice appear in all --- 12 unchanged lines hidden (view full) --- 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/net/if_vlan.c 63090 2000-07-13 22:54:34Z archie $ | 29 * $FreeBSD: head/sys/net/if_vlan.c 69152 2000-11-25 07:35:38Z jlemon $ |
30 */ 31 32/* 33 * if_vlan.c - pseudo-device driver for IEEE 802.1Q virtual LANs. 34 * Might be extended some day to also handle IEEE 802.1p priority 35 * tagging. This is sort of sneaky in the implementation, since 36 * we need to pretend to be enough of an Ethernet implementation 37 * to make arp work. The way we do this is by telling everyone --- 218 unchanged lines hidden (view full) --- 256 (char *)evl, ":"); 257#endif 258 } 259 260 /* 261 * Send it, precisely as ether_output() would have. 262 * We are already running at splimp. 263 */ | 30 */ 31 32/* 33 * if_vlan.c - pseudo-device driver for IEEE 802.1Q virtual LANs. 34 * Might be extended some day to also handle IEEE 802.1p priority 35 * tagging. This is sort of sneaky in the implementation, since 36 * we need to pretend to be enough of an Ethernet implementation 37 * to make arp work. The way we do this is by telling everyone --- 218 unchanged lines hidden (view full) --- 256 (char *)evl, ":"); 257#endif 258 } 259 260 /* 261 * Send it, precisely as ether_output() would have. 262 * We are already running at splimp. 263 */ |
264 if (IF_QFULL(&p->if_snd)) { 265 IF_DROP(&p->if_snd); 266 /* XXX stats */ 267 ifp->if_oerrors++; 268 m_freem(m); 269 continue; 270 } 271 IF_ENQUEUE(&p->if_snd, m); 272 if ((p->if_flags & IFF_OACTIVE) == 0) { 273 p->if_start(p); | 264 if (IF_HANDOFF(&p->if_snd, m, p)) |
274 ifp->if_opackets++; | 265 ifp->if_opackets++; |
275 } | 266 else 267 ifp->if_oerrors++; |
276 } 277 ifp->if_flags &= ~IFF_OACTIVE; 278 279 return; 280} 281 282int 283vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t) --- 253 unchanged lines hidden --- | 268 } 269 ifp->if_flags &= ~IFF_OACTIVE; 270 271 return; 272} 273 274int 275vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t) --- 253 unchanged lines hidden --- |