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 123600 2003-12-17 12:40:34Z ru $ |
41 */ 42 43/* 44 * ng_ether(4) netgraph node type 45 */ 46 47#include <sys/param.h> 48#include <sys/systm.h> --- 55 unchanged lines hidden (view full) --- 104static ng_rcvmsg_t ng_ether_rcvmsg; 105static ng_shutdown_t ng_ether_shutdown; 106static ng_newhook_t ng_ether_newhook; 107static ng_connect_t ng_ether_connect; 108static ng_rcvdata_t ng_ether_rcvdata; 109static ng_disconnect_t ng_ether_disconnect; 110static int ng_ether_mod_event(module_t mod, int event, void *data); 111 |
112/* List of commands and how to convert arguments to/from ASCII */ 113static const struct ng_cmdlist ng_ether_cmdlist[] = { 114 { 115 NGM_ETHER_COOKIE, 116 NGM_ETHER_GET_IFNAME, 117 "getifname", 118 NULL, 119 &ng_parse_string_type --- 5 unchanged lines hidden (view full) --- 125 NULL, 126 &ng_parse_int32_type 127 }, 128 { 129 NGM_ETHER_COOKIE, 130 NGM_ETHER_GET_ENADDR, 131 "getenaddr", 132 NULL, |
133 &ng_parse_enaddr_type |
134 }, 135 { 136 NGM_ETHER_COOKIE, 137 NGM_ETHER_SET_ENADDR, 138 "setenaddr", |
139 &ng_parse_enaddr_type, |
140 NULL 141 }, 142 { 143 NGM_ETHER_COOKIE, 144 NGM_ETHER_GET_PROMISC, 145 "getpromisc", 146 NULL, 147 &ng_parse_int32_type --- 487 unchanged lines hidden (view full) --- 635 } else 636 panic("%s: weird hook", __func__); 637 if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) 638 && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) 639 ng_rmnode_self(NG_HOOK_NODE(hook)); /* reset node */ 640 return (0); 641} 642 |
643/****************************************************************** 644 INITIALIZATION 645******************************************************************/ 646 647/* 648 * Handle loading and unloading for this node type. 649 */ 650static int --- 57 unchanged lines hidden --- |