if_stf.c (67708) | if_stf.c (69152) |
---|---|
1/* $FreeBSD: head/sys/net/if_stf.c 67708 2000-10-27 11:45:49Z phk $ */ | 1/* $FreeBSD: head/sys/net/if_stf.c 69152 2000-11-25 07:35:38Z jlemon $ */ |
2/* $KAME: if_stf.c,v 1.42 2000/08/15 07:24:23 itojun Exp $ */ 3 4/* 5 * Copyright (C) 2000 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 469 unchanged lines hidden (view full) --- 479 register struct mbuf *m; 480#endif 481{ 482 int off, proto; 483 struct stf_softc *sc; 484 struct ip *ip; 485 struct ip6_hdr *ip6; 486 u_int8_t otos, itos; | 2/* $KAME: if_stf.c,v 1.42 2000/08/15 07:24:23 itojun Exp $ */ 3 4/* 5 * Copyright (C) 2000 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 469 unchanged lines hidden (view full) --- 479 register struct mbuf *m; 480#endif 481{ 482 int off, proto; 483 struct stf_softc *sc; 484 struct ip *ip; 485 struct ip6_hdr *ip6; 486 u_int8_t otos, itos; |
487 int s, isr; | 487 int len, isr; |
488 struct ifqueue *ifq = NULL; 489 struct ifnet *ifp; 490 va_list ap; 491 492 va_start(ap, m); 493 off = va_arg(ap, int); 494 proto = va_arg(ap, int); 495 va_end(ap); --- 80 unchanged lines hidden (view full) --- 576 * Put the packet to the network layer input queue according to the 577 * specified address family. 578 * See net/if_gif.c for possible issues with packet processing 579 * reorder due to extra queueing. 580 */ 581 ifq = &ip6intrq; 582 isr = NETISR_IPV6; 583 | 488 struct ifqueue *ifq = NULL; 489 struct ifnet *ifp; 490 va_list ap; 491 492 va_start(ap, m); 493 off = va_arg(ap, int); 494 proto = va_arg(ap, int); 495 va_end(ap); --- 80 unchanged lines hidden (view full) --- 576 * Put the packet to the network layer input queue according to the 577 * specified address family. 578 * See net/if_gif.c for possible issues with packet processing 579 * reorder due to extra queueing. 580 */ 581 ifq = &ip6intrq; 582 isr = NETISR_IPV6; 583 |
584 s = splimp(); 585 if (IF_QFULL(ifq)) { 586 IF_DROP(ifq); /* update statistics */ 587 m_freem(m); 588 splx(s); | 584 len = m->m_pkthdr.len; 585 if (! IF_HANDOFF(ifq, m, NULL)) |
589 return; | 586 return; |
590 } 591 IF_ENQUEUE(ifq, m); | |
592 schednetisr(isr); 593 ifp->if_ipackets++; | 587 schednetisr(isr); 588 ifp->if_ipackets++; |
594 ifp->if_ibytes += m->m_pkthdr.len; 595 splx(s); | 589 ifp->if_ibytes += len; |
596} 597 598/* ARGSUSED */ 599static void 600stf_rtrequest(cmd, rt, sa) 601 int cmd; 602 struct rtentry *rt; 603#if defined(__bsdi__) && _BSDI_VERSION >= 199802 --- 55 unchanged lines hidden --- | 590} 591 592/* ARGSUSED */ 593static void 594stf_rtrequest(cmd, rt, sa) 595 int cmd; 596 struct rtentry *rt; 597#if defined(__bsdi__) && _BSDI_VERSION >= 199802 --- 55 unchanged lines hidden --- |