ng_ether.c (7ea5573cd8627fd8b1dcce65b31b18dd6b431e66) ng_ether.c (a176c2aeafbb65a03497c0034da633563c287f06)
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

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

48#include <sys/systm.h>
49#include <sys/kernel.h>
50#include <sys/malloc.h>
51#include <sys/mbuf.h>
52#include <sys/errno.h>
53#include <sys/syslog.h>
54#include <sys/socket.h>
55
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

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

48#include <sys/systm.h>
49#include <sys/kernel.h>
50#include <sys/malloc.h>
51#include <sys/mbuf.h>
52#include <sys/errno.h>
53#include <sys/syslog.h>
54#include <sys/socket.h>
55
56#include <net/bridge.h>
56#include <net/if.h>
57#include <net/if_types.h>
58#include <net/if_arp.h>
59#include <net/if_var.h>
60#include <net/ethernet.h>
61
62#include <netgraph/ng_message.h>
63#include <netgraph/netgraph.h>

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

547 */
548static int
549ng_ether_rcv_upper(node_p node, struct mbuf *m)
550{
551 const priv_p priv = NG_NODE_PRIVATE(node);
552
553 m->m_pkthdr.rcvif = priv->ifp;
554
57#include <net/if.h>
58#include <net/if_types.h>
59#include <net/if_arp.h>
60#include <net/if_var.h>
61#include <net/ethernet.h>
62
63#include <netgraph/ng_message.h>
64#include <netgraph/netgraph.h>

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

548 */
549static int
550ng_ether_rcv_upper(node_p node, struct mbuf *m)
551{
552 const priv_p priv = NG_NODE_PRIVATE(node);
553
554 m->m_pkthdr.rcvif = priv->ifp;
555
556 if (BDG_ACTIVE(priv->ifp) )
557 if ((m = bridge_in_ptr(priv->ifp, m)) == NULL)
558 return (0);
559
555 /* Route packet back in */
556 ether_demux(priv->ifp, m);
557 return (0);
558}
559
560/*
561 * Shutdown node. This resets the node but does not remove it
562 * unless the REALLY_DIE flag is set.

--- 117 unchanged lines hidden ---
560 /* Route packet back in */
561 ether_demux(priv->ifp, m);
562 return (0);
563}
564
565/*
566 * Shutdown node. This resets the node but does not remove it
567 * unless the REALLY_DIE flag is set.

--- 117 unchanged lines hidden ---