152419Sjulian 252419Sjulian/* 352419Sjulian * ng_ether.h 4139823Simp */ 5139823Simp 6139823Simp/*- 752419Sjulian * Copyright (c) 1996-1999 Whistle Communications, Inc. 852419Sjulian * All rights reserved. 952419Sjulian * 1052419Sjulian * Subject to the following obligations and disclaimer of warranty, use and 1152419Sjulian * redistribution of this software, in source or object code forms, with or 1252419Sjulian * without modifications are expressly permitted by Whistle Communications; 1352419Sjulian * provided, however, that: 1452419Sjulian * 1. Any and all reproductions of the source or object code must include the 1552419Sjulian * copyright notice above and the following disclaimer of warranties; and 1652419Sjulian * 2. No rights are granted, in any manner or form, to use Whistle 1752419Sjulian * Communications, Inc. trademarks, including the mark "WHISTLE 1852419Sjulian * COMMUNICATIONS" on advertising, endorsements, or otherwise except as 1952419Sjulian * such appears in the above copyright notice or in the software. 2052419Sjulian * 2152419Sjulian * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 2252419Sjulian * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 2352419Sjulian * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 2452419Sjulian * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 2552419Sjulian * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 2652419Sjulian * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 2752419Sjulian * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 2852419Sjulian * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 2952419Sjulian * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 3052419Sjulian * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 3152419Sjulian * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 3252419Sjulian * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 3352419Sjulian * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 3452419Sjulian * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3552419Sjulian * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 3652419Sjulian * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 3752419Sjulian * OF SUCH DAMAGE. 3852419Sjulian * 3967506Sjulian * Author: Archie Cobbs <archie@freebsd.org> 4052419Sjulian * 4152419Sjulian * $FreeBSD$ 4252419Sjulian * $Whistle: ng_ether.h,v 1.1 1999/02/02 03:17:22 julian Exp $ 4352419Sjulian */ 4452419Sjulian 4552419Sjulian#ifndef _NETGRAPH_NG_ETHER_H_ 4652419Sjulian#define _NETGRAPH_NG_ETHER_H_ 4752419Sjulian 4852419Sjulian/* Node type name and magic cookie */ 4952419Sjulian#define NG_ETHER_NODE_TYPE "ether" 50141756Sglebius#define NGM_ETHER_COOKIE 917786906 5152419Sjulian 5252419Sjulian/* Hook names */ 5362143Sarchie#define NG_ETHER_HOOK_LOWER "lower" /* connection to raw device */ 5462143Sarchie#define NG_ETHER_HOOK_UPPER "upper" /* connection to upper layers */ 5562143Sarchie#define NG_ETHER_HOOK_DIVERT "divert" /* alias for lower */ 5662143Sarchie#define NG_ETHER_HOOK_ORPHAN "orphans" /* like lower, unknowns only */ 5752419Sjulian 5862143Sarchie/* Netgraph control messages */ 5953913Sarchieenum { 6062143Sarchie NGM_ETHER_GET_IFNAME = 1, /* get the interface name */ 6162143Sarchie NGM_ETHER_GET_IFINDEX, /* get the interface global index # */ 6264358Sarchie NGM_ETHER_GET_ENADDR, /* get Ethernet address */ 6364653Sarchie NGM_ETHER_SET_ENADDR, /* set Ethernet address */ 6464653Sarchie NGM_ETHER_GET_PROMISC, /* get node's promiscuous mode bit */ 6564358Sarchie NGM_ETHER_SET_PROMISC, /* enable/disable promiscuous mode */ 6664653Sarchie NGM_ETHER_GET_AUTOSRC, /* get source address override */ 6764358Sarchie NGM_ETHER_SET_AUTOSRC, /* enable/disable src addr override */ 68141721Sglebius NGM_ETHER_ADD_MULTI, /* add multicast membership */ 69141721Sglebius NGM_ETHER_DEL_MULTI, /* delete multicast membership */ 70141910Sglebius NGM_ETHER_DETACH, /* our way to be shut down */ 7153913Sarchie}; 7253913Sarchie 7352419Sjulian#endif /* _NETGRAPH_NG_ETHER_H_ */ 74