if_iso88025subr.c (111790) | if_iso88025subr.c (111888) |
---|---|
1/* 2 * Copyright (c) 1998, Larry Lile 3 * All rights reserved. 4 * 5 * For latest sources and information on this driver, please 6 * go to http://anarchy.stdio.com. 7 * 8 * Questions, comments or suggestions should be directed to --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/* 2 * Copyright (c) 1998, Larry Lile 3 * All rights reserved. 4 * 5 * For latest sources and information on this driver, please 6 * go to http://anarchy.stdio.com. 7 * 8 * Questions, comments or suggestions should be directed to --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/net/if_iso88025subr.c 111790 2003-03-03 05:04:57Z mdodd $ | 33 * $FreeBSD: head/sys/net/if_iso88025subr.c 111888 2003-03-04 23:19:55Z jlemon $ |
34 * 35 */ 36 37/* 38 * 39 * General ISO 802.5 (Token Ring) support routines 40 * 41 */ --- 346 unchanged lines hidden (view full) --- 388 * ISO 88025 de-encapsulation 389 */ 390void 391iso88025_input(ifp, th, m) 392 struct ifnet *ifp; 393 struct iso88025_header *th; 394 struct mbuf *m; 395{ | 34 * 35 */ 36 37/* 38 * 39 * General ISO 802.5 (Token Ring) support routines 40 * 41 */ --- 346 unchanged lines hidden (view full) --- 388 * ISO 88025 de-encapsulation 389 */ 390void 391iso88025_input(ifp, th, m) 392 struct ifnet *ifp; 393 struct iso88025_header *th; 394 struct mbuf *m; 395{ |
396 struct ifqueue *inq; | 396 int isr; |
397 struct llc *l; 398 399 if ((ifp->if_flags & IFF_UP) == 0) { 400 m_freem(m); 401 return; 402 } 403 404 getmicrotime(&ifp->if_lastchange); --- 15 unchanged lines hidden (view full) --- 420#ifdef IPX 421 case ETHERTYPE_IPX_8022: /* Thanks a bunch Novell */ 422 if ((l->llc_control != LLC_UI) || 423 (l->llc_ssap != ETHERTYPE_IPX_8022)) 424 goto dropanyway; 425 426 th->iso88025_shost[0] &= ~(TR_RII); 427 m_adj(m, 3); | 397 struct llc *l; 398 399 if ((ifp->if_flags & IFF_UP) == 0) { 400 m_freem(m); 401 return; 402 } 403 404 getmicrotime(&ifp->if_lastchange); --- 15 unchanged lines hidden (view full) --- 420#ifdef IPX 421 case ETHERTYPE_IPX_8022: /* Thanks a bunch Novell */ 422 if ((l->llc_control != LLC_UI) || 423 (l->llc_ssap != ETHERTYPE_IPX_8022)) 424 goto dropanyway; 425 426 th->iso88025_shost[0] &= ~(TR_RII); 427 m_adj(m, 3); |
428 schednetisr(NETISR_IPX); 429 inq = &ipxintrq; | 428 isr = NETISR_IPX; |
430 break; 431#endif /* IPX */ 432 case LLC_SNAP_LSAP: { 433 u_int16_t type; 434 if ((l->llc_control != LLC_UI) || 435 (l->llc_ssap != LLC_SNAP_LSAP)) 436 goto dropanyway; 437 --- 5 unchanged lines hidden (view full) --- 443 type = ntohs(l->llc_un.type_snap.ether_type); 444 m_adj(m, LLC_SNAPFRAMELEN); 445 switch (type) { 446#ifdef INET 447 case ETHERTYPE_IP: 448 th->iso88025_shost[0] &= ~(TR_RII); 449 if (ipflow_fastforward(m)) 450 return; | 429 break; 430#endif /* IPX */ 431 case LLC_SNAP_LSAP: { 432 u_int16_t type; 433 if ((l->llc_control != LLC_UI) || 434 (l->llc_ssap != LLC_SNAP_LSAP)) 435 goto dropanyway; 436 --- 5 unchanged lines hidden (view full) --- 442 type = ntohs(l->llc_un.type_snap.ether_type); 443 m_adj(m, LLC_SNAPFRAMELEN); 444 switch (type) { 445#ifdef INET 446 case ETHERTYPE_IP: 447 th->iso88025_shost[0] &= ~(TR_RII); 448 if (ipflow_fastforward(m)) 449 return; |
451 schednetisr(NETISR_IP); 452 inq = &ipintrq; | 450 isr = NETISR_IP; |
453 break; 454 455 case ETHERTYPE_ARP: 456 if (ifp->if_flags & IFF_NOARP) 457 goto dropanyway; | 451 break; 452 453 case ETHERTYPE_ARP: 454 if (ifp->if_flags & IFF_NOARP) 455 goto dropanyway; |
458 schednetisr(NETISR_ARP); 459 inq = &arpintrq; | 456 isr = NETISR_ARP; |
460 break; 461#endif /* INET */ 462#ifdef IPX_SNAP /* XXX: Not supported! */ 463 case ETHERTYPE_IPX: 464 th->iso88025_shost[0] &= ~(TR_RII); | 457 break; 458#endif /* INET */ 459#ifdef IPX_SNAP /* XXX: Not supported! */ 460 case ETHERTYPE_IPX: 461 th->iso88025_shost[0] &= ~(TR_RII); |
465 schednetisr(NETISR_IPX); 466 inq = &ipxintrq; | 462 isr = NETISR_IPX; |
467 break; 468#endif /* IPX_SNAP */ 469#ifdef NOT_YET 470#ifdef INET6 471 case ETHERTYPE_IPV6: 472 th->iso88025_shost[0] &= ~(TR_RII); | 463 break; 464#endif /* IPX_SNAP */ 465#ifdef NOT_YET 466#ifdef INET6 467 case ETHERTYPE_IPV6: 468 th->iso88025_shost[0] &= ~(TR_RII); |
473 schednetisr(NETISR_IPV6); 474 inq = &ip6intrq; | 469 isr = NETISR_IPV6; |
475 break; 476#endif /* INET6 */ 477#endif /* NOT_YET */ 478 default: 479 printf("iso88025_input: unexpected llc_snap ether_type 0x%02x\n", type); 480 m_freem(m); 481 return; 482 } --- 55 unchanged lines hidden (view full) --- 538 break; 539 default: 540 printf("iso88025_input: unknown dsap 0x%x\n", l->llc_dsap); 541 ifp->if_noproto++; 542 dropanyway: 543 m_freem(m); 544 return; 545 } | 470 break; 471#endif /* INET6 */ 472#endif /* NOT_YET */ 473 default: 474 printf("iso88025_input: unexpected llc_snap ether_type 0x%02x\n", type); 475 m_freem(m); 476 return; 477 } --- 55 unchanged lines hidden (view full) --- 533 break; 534 default: 535 printf("iso88025_input: unknown dsap 0x%x\n", l->llc_dsap); 536 ifp->if_noproto++; 537 dropanyway: 538 m_freem(m); 539 return; 540 } |
546 547 if (! IF_HANDOFF(inq, m, NULL)) 548 printf("iso88025_input: Packet dropped (Queue full).\n"); | 541 netisr_dispatch(isr, m); |
549} | 542} |