Deleted Added
sdiff udiff text old ( 111790 ) new ( 111888 )
full compact
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 $
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;
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;
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;
451 schednetisr(NETISR_IP);
452 inq = &ipintrq;
453 break;
454
455 case ETHERTYPE_ARP:
456 if (ifp->if_flags & IFF_NOARP)
457 goto dropanyway;
458 schednetisr(NETISR_ARP);
459 inq = &arpintrq;
460 break;
461#endif /* INET */
462#ifdef IPX_SNAP /* XXX: Not supported! */
463 case ETHERTYPE_IPX:
464 th->iso88025_shost[0] &= ~(TR_RII);
465 schednetisr(NETISR_IPX);
466 inq = &ipxintrq;
467 break;
468#endif /* IPX_SNAP */
469#ifdef NOT_YET
470#ifdef INET6
471 case ETHERTYPE_IPV6:
472 th->iso88025_shost[0] &= ~(TR_RII);
473 schednetisr(NETISR_IPV6);
474 inq = &ip6intrq;
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 }
546
547 if (! IF_HANDOFF(inq, m, NULL))
548 printf("iso88025_input: Packet dropped (Queue full).\n");
549}