Deleted Added
full compact
if_arcsubr.c (111767) if_arcsubr.c (111888)
1/* $NetBSD: if_arcsubr.c,v 1.36 2001/06/14 05:44:23 itojun Exp $ */
1/* $NetBSD: if_arcsubr.c,v 1.36 2001/06/14 05:44:23 itojun Exp $ */
2/* $FreeBSD: head/sys/net/if_arcsubr.c 111767 2003-03-02 21:34:37Z mdodd $ */
2/* $FreeBSD: head/sys/net/if_arcsubr.c 111888 2003-03-04 23:19:55Z jlemon $ */
3
4/*
5 * Copyright (c) 1994, 1995 Ignatios Souvatzis
6 * Copyright (c) 1982, 1989, 1993
7 * The Regents of the University of California. All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions

--- 491 unchanged lines hidden (view full) ---

502 * the ARCnet header.
503 */
504void
505arc_input(ifp, m)
506 struct ifnet *ifp;
507 struct mbuf *m;
508{
509 struct arc_header *ah;
3
4/*
5 * Copyright (c) 1994, 1995 Ignatios Souvatzis
6 * Copyright (c) 1982, 1989, 1993
7 * The Regents of the University of California. All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions

--- 491 unchanged lines hidden (view full) ---

502 * the ARCnet header.
503 */
504void
505arc_input(ifp, m)
506 struct ifnet *ifp;
507 struct mbuf *m;
508{
509 struct arc_header *ah;
510 struct ifqueue *inq;
510 int isr;
511 u_int8_t atype;
512
513 if ((ifp->if_flags & IFF_UP) == 0) {
514 m_freem(m);
515 return;
516 }
517
518 /* possibly defragment: */

--- 21 unchanged lines hidden (view full) ---

540
541 atype = ah->arc_type;
542 switch (atype) {
543#ifdef INET
544 case ARCTYPE_IP:
545 m_adj(m, ARC_HDRNEWLEN);
546 if (ipflow_fastforward(m))
547 return;
511 u_int8_t atype;
512
513 if ((ifp->if_flags & IFF_UP) == 0) {
514 m_freem(m);
515 return;
516 }
517
518 /* possibly defragment: */

--- 21 unchanged lines hidden (view full) ---

540
541 atype = ah->arc_type;
542 switch (atype) {
543#ifdef INET
544 case ARCTYPE_IP:
545 m_adj(m, ARC_HDRNEWLEN);
546 if (ipflow_fastforward(m))
547 return;
548 schednetisr(NETISR_IP);
549 inq = &ipintrq;
548 isr = NETISR_IP;
550 break;
551
552 case ARCTYPE_IP_OLD:
553 m_adj(m, ARC_HDRLEN);
554 if (ipflow_fastforward(m))
555 return;
549 break;
550
551 case ARCTYPE_IP_OLD:
552 m_adj(m, ARC_HDRLEN);
553 if (ipflow_fastforward(m))
554 return;
556 schednetisr(NETISR_IP);
557 inq = &ipintrq;
555 isr = NETISR_IP;
558 break;
559
560 case ARCTYPE_ARP:
561 if (ifp->if_flags & IFF_NOARP) {
562 /* Discard packet if ARP is disabled on interface */
563 m_freem(m);
564 return;
565 }
566 m_adj(m, ARC_HDRNEWLEN);
556 break;
557
558 case ARCTYPE_ARP:
559 if (ifp->if_flags & IFF_NOARP) {
560 /* Discard packet if ARP is disabled on interface */
561 m_freem(m);
562 return;
563 }
564 m_adj(m, ARC_HDRNEWLEN);
567 schednetisr(NETISR_ARP);
568 inq = &arpintrq;
565 isr = NETISR_ARP;
569#ifdef ARCNET_ALLOW_BROKEN_ARP
570 mtod(m, struct arphdr *)->ar_pro = htons(ETHERTYPE_IP);
571#endif
572 break;
573
574 case ARCTYPE_ARP_OLD:
575 if (ifp->if_flags & IFF_NOARP) {
576 /* Discard packet if ARP is disabled on interface */
577 m_freem(m);
578 return;
579 }
580 m_adj(m, ARC_HDRLEN);
566#ifdef ARCNET_ALLOW_BROKEN_ARP
567 mtod(m, struct arphdr *)->ar_pro = htons(ETHERTYPE_IP);
568#endif
569 break;
570
571 case ARCTYPE_ARP_OLD:
572 if (ifp->if_flags & IFF_NOARP) {
573 /* Discard packet if ARP is disabled on interface */
574 m_freem(m);
575 return;
576 }
577 m_adj(m, ARC_HDRLEN);
581 schednetisr(NETISR_ARP);
582 inq = &arpintrq;
578 isr = NETISR_ARP;
583#ifdef ARCNET_ALLOW_BROKEN_ARP
584 mtod(m, struct arphdr *)->ar_pro = htons(ETHERTYPE_IP);
585#endif
586 break;
587#endif
588#ifdef INET6
589 case ARCTYPE_INET6:
590 m_adj(m, ARC_HDRNEWLEN);
579#ifdef ARCNET_ALLOW_BROKEN_ARP
580 mtod(m, struct arphdr *)->ar_pro = htons(ETHERTYPE_IP);
581#endif
582 break;
583#endif
584#ifdef INET6
585 case ARCTYPE_INET6:
586 m_adj(m, ARC_HDRNEWLEN);
591 schednetisr(NETISR_IPV6);
592 inq = &ip6intrq;
587 isr = NETISR_IPV6;
593 break;
594#endif
595#ifdef IPX
596 case ARCTYPE_IPX:
597 m_adj(m, ARC_HDRNEWLEN);
588 break;
589#endif
590#ifdef IPX
591 case ARCTYPE_IPX:
592 m_adj(m, ARC_HDRNEWLEN);
598 schednetisr(NETISR_IPX);
599 inq = &ipxintrq;
593 isr = NETISR_IPX;
600 break;
601#endif
602 default:
603 m_freem(m);
604 return;
605 }
594 break;
595#endif
596 default:
597 m_freem(m);
598 return;
599 }
606
607 IF_HANDOFF(inq, m, NULL);
600 netisr_dispatch(isr, m);
608}
609
610/*
611 * Register (new) link level address.
612 */
613void
614arc_storelladdr(ifp, lla)
615 struct ifnet *ifp;

--- 223 unchanged lines hidden ---
601}
602
603/*
604 * Register (new) link level address.
605 */
606void
607arc_storelladdr(ifp, lla)
608 struct ifnet *ifp;

--- 223 unchanged lines hidden ---