diff options
author | Archie Cobbs <archie@FreeBSD.org> | 2000-06-26 23:34:54 +0000 |
---|---|---|
committer | Archie Cobbs <archie@FreeBSD.org> | 2000-06-26 23:34:54 +0000 |
commit | e1e1452d61eba73053f24863d9724d24bec9424c (patch) | |
tree | a110d9f771df2cebe8605938647401f7e8449d5f /sys/netgraph/ng_ether.h | |
parent | 29f42a6aee893e76b5d8e03399b90e3ebd483696 (diff) | |
download | src-e1e1452d61eba73053f24863d9724d24bec9424c.tar.gz src-e1e1452d61eba73053f24863d9724d24bec9424c.zip |
Make the ng_ether(4) node type dynamically loadable like the rest.
This means 'options NETGRAPH' is no longer necessary in order to get
netgraph-enabled Ethernet interfaces. This supports loading/unloading
the ng_ether.ko and attaching/detaching the Ethernet interface in any
order.
Add two new hooks 'upper' and 'lower' to allow access to the protocol
demux engine and the raw device, respectively. This enables bridging
to be defined as a netgraph node, if so desired.
Reviewed by: freebsd-net@freebsd.org
Notes
Notes:
svn path=/head/; revision=62143
Diffstat (limited to 'sys/netgraph/ng_ether.h')
-rw-r--r-- | sys/netgraph/ng_ether.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netgraph/ng_ether.h b/sys/netgraph/ng_ether.h index f492361b6374..71c73a98ce20 100644 --- a/sys/netgraph/ng_ether.h +++ b/sys/netgraph/ng_ether.h @@ -45,18 +45,18 @@ /* Node type name and magic cookie */ #define NG_ETHER_NODE_TYPE "ether" -#define NGM_ETHER_COOKIE 917786904 +#define NGM_ETHER_COOKIE 917786905 /* Hook names */ -#define NG_ETHER_HOOK_ORPHAN "orphans" -#define NG_ETHER_HOOK_DIVERT "divert" +#define NG_ETHER_HOOK_LOWER "lower" /* connection to raw device */ +#define NG_ETHER_HOOK_UPPER "upper" /* connection to upper layers */ +#define NG_ETHER_HOOK_DIVERT "divert" /* alias for lower */ +#define NG_ETHER_HOOK_ORPHAN "orphans" /* like lower, unknowns only */ -/* For adding/removing Ethernet multicast addresses */ +/* Netgraph control messages */ enum { - NGM_ETHER_ADD_MULTICAST = 1, /* supply struct ether_addr */ - NGM_ETHER_DEL_MULTICAST, /* supply struct ether_addr */ - NGM_ETHER_GET_MULTICAST, /* returns array of struct ether_addr */ - NGM_ETHER_CLR_MULTICAST, /* clears all multicast addresses */ + NGM_ETHER_GET_IFNAME = 1, /* get the interface name */ + NGM_ETHER_GET_IFINDEX, /* get the interface global index # */ }; #endif /* _NETGRAPH_NG_ETHER_H_ */ |