ng_ether.c (65305) | ng_ether.c (66061) |
---|---|
1 2/* 3 * ng_ether.c 4 * 5 * Copyright (c) 1996-2000 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 23 unchanged lines hidden (view full) --- 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Authors: Archie Cobbs <archie@freebsd.org> 38 * Julian Elischer <julian@freebsd.org> 39 * | 1 2/* 3 * ng_ether.c 4 * 5 * Copyright (c) 1996-2000 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 23 unchanged lines hidden (view full) --- 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * 37 * Authors: Archie Cobbs <archie@freebsd.org> 38 * Julian Elischer <julian@freebsd.org> 39 * |
40 * $FreeBSD: head/sys/netgraph/ng_ether.c 65305 2000-09-01 00:28:03Z archie $ | 40 * $FreeBSD: head/sys/netgraph/ng_ether.c 66061 2000-09-19 08:35:44Z julian $ |
41 */ 42 43/* 44 * ng_ether(4) netgraph node type 45 */ 46 47#include <sys/param.h> 48#include <sys/systm.h> --- 603 unchanged lines hidden (view full) --- 652 if (m->m_len < sizeof(*eh) && (m = m_pullup(m, sizeof(*eh))) == NULL) { 653 NG_FREE_META(meta); 654 return (ENOBUFS); 655 } 656 eh = mtod(m, struct ether_header *); 657 m->m_data += sizeof(*eh); 658 m->m_len -= sizeof(*eh); 659 m->m_pkthdr.len -= sizeof(*eh); | 41 */ 42 43/* 44 * ng_ether(4) netgraph node type 45 */ 46 47#include <sys/param.h> 48#include <sys/systm.h> --- 603 unchanged lines hidden (view full) --- 652 if (m->m_len < sizeof(*eh) && (m = m_pullup(m, sizeof(*eh))) == NULL) { 653 NG_FREE_META(meta); 654 return (ENOBUFS); 655 } 656 eh = mtod(m, struct ether_header *); 657 m->m_data += sizeof(*eh); 658 m->m_len -= sizeof(*eh); 659 m->m_pkthdr.len -= sizeof(*eh); |
660 m->m_pkthdr.rcvif = priv->ifp; |
|
660 661 /* Route packet back in */ 662 NG_FREE_META(meta); 663 ether_demux(priv->ifp, eh, m); 664 return (0); 665} 666 667/* --- 139 unchanged lines hidden --- | 661 662 /* Route packet back in */ 663 NG_FREE_META(meta); 664 ether_demux(priv->ifp, eh, m); 665 return (0); 666} 667 668/* --- 139 unchanged lines hidden --- |