Deleted Added
sdiff udiff text old ( 141720 ) new ( 141721 )
full compact
1
2/*
3 * ng_ether.c
4 */
5
6/*-
7 * Copyright (c) 1996-2000 Whistle Communications, Inc.
8 * All rights reserved.

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

34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
37 * OF SUCH DAMAGE.
38 *
39 * Authors: Archie Cobbs <archie@freebsd.org>
40 * Julian Elischer <julian@freebsd.org>
41 *
42 * $FreeBSD: head/sys/netgraph/ng_ether.c 141720 2005-02-12 11:14:25Z ru $
43 */
44
45/*
46 * ng_ether(4) netgraph node type
47 */
48
49#include <sys/param.h>
50#include <sys/systm.h>
51#include <sys/kernel.h>
52#include <sys/malloc.h>
53#include <sys/mbuf.h>
54#include <sys/errno.h>
55#include <sys/syslog.h>
56#include <sys/socket.h>
57
58#include <net/bridge.h>
59#include <net/if.h>
60#include <net/if_types.h>
61#include <net/if_arp.h>
62#include <net/if_var.h>
63#include <net/ethernet.h>
64
65#include <netgraph/ng_message.h>
66#include <netgraph/netgraph.h>
67#include <netgraph/ng_parse.h>

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

166 },
167 {
168 NGM_ETHER_COOKIE,
169 NGM_ETHER_SET_AUTOSRC,
170 "setautosrc",
171 &ng_parse_int32_type,
172 NULL
173 },
174 { 0 }
175};
176
177static struct ng_type ng_ether_typestruct = {
178 .version = NG_ABI_VERSION,
179 .name = NG_ETHER_NODE_TYPE,
180 .mod_event = ng_ether_mod_event,
181 .constructor = ng_ether_constructor,

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

487 break;
488 case NGM_ETHER_SET_AUTOSRC:
489 if (msg->header.arglen != sizeof(u_int32_t)) {
490 error = EINVAL;
491 break;
492 }
493 priv->autoSrcAddr = !!*((u_int32_t *)msg->data);
494 break;
495 default:
496 error = EINVAL;
497 break;
498 }
499 break;
500 default:
501 error = EINVAL;
502 break;

--- 212 unchanged lines hidden ---