ng_message.h (68876) | ng_message.h (69922) |
---|---|
1 2/* 3 * ng_message.h 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 22 unchanged lines hidden (view full) --- 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 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 * Author: Julian Elischer <julian@freebsd.org> 38 * | 1 2/* 3 * ng_message.h 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 22 unchanged lines hidden (view full) --- 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 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 * Author: Julian Elischer <julian@freebsd.org> 38 * |
39 * $FreeBSD: head/sys/netgraph/ng_message.h 68876 2000-11-18 15:17:43Z dwmalone $ | 39 * $FreeBSD: head/sys/netgraph/ng_message.h 69922 2000-12-12 18:52:14Z julian $ |
40 * $Whistle: ng_message.h,v 1.12 1999/01/25 01:17:44 archie Exp $ 41 */ 42 43#ifndef _NETGRAPH_NG_MESSAGE_H_ 44#define _NETGRAPH_NG_MESSAGE_H_ 1 45 46/* ASCII string size limits */ 47#define NG_TYPELEN 15 /* max type name len (16 with null) */ --- 30 unchanged lines hidden (view full) --- 78 { "cmd", &ng_parse_uint32_type }, \ 79 { "cmdstr", &ng_parse_cmdbuf_type }, \ 80 { "data", (dtype) }, \ 81 { NULL }, \ 82 } \ 83} 84 85/* Negraph type binary compatibility field */ | 40 * $Whistle: ng_message.h,v 1.12 1999/01/25 01:17:44 archie Exp $ 41 */ 42 43#ifndef _NETGRAPH_NG_MESSAGE_H_ 44#define _NETGRAPH_NG_MESSAGE_H_ 1 45 46/* ASCII string size limits */ 47#define NG_TYPELEN 15 /* max type name len (16 with null) */ --- 30 unchanged lines hidden (view full) --- 78 { "cmd", &ng_parse_uint32_type }, \ 79 { "cmdstr", &ng_parse_cmdbuf_type }, \ 80 { "data", (dtype) }, \ 81 { NULL }, \ 82 } \ 83} 84 85/* Negraph type binary compatibility field */ |
86#define NG_VERSION 3 | 86#define NG_VERSION 4 |
87 88/* Flags field flags */ 89#define NGF_ORIG 0x0000 /* the msg is the original request */ 90#define NGF_RESP 0x0001 /* the message is a response */ 91 92/* Type of a unique node ID */ 93#define ng_ID_t unsigned int 94 --- 17 unchanged lines hidden (view full) --- 112#define NGM_LISTNAMES 8 /* list all globally named nodes */ 113#define NGM_LISTNODES 9 /* list all nodes, named and unnamed */ 114#define NGM_LISTTYPES 10 /* list all installed node types */ 115#define NGM_TEXT_STATUS 11 /* (optional) get text status report */ 116#define NGM_BINARY2ASCII 12 /* convert struct ng_mesg to ascii */ 117#define NGM_ASCII2BINARY 13 /* convert ascii to struct ng_mesg */ 118#define NGM_TEXT_CONFIG 14 /* (optional) get/set text config */ 119 | 87 88/* Flags field flags */ 89#define NGF_ORIG 0x0000 /* the msg is the original request */ 90#define NGF_RESP 0x0001 /* the message is a response */ 91 92/* Type of a unique node ID */ 93#define ng_ID_t unsigned int 94 --- 17 unchanged lines hidden (view full) --- 112#define NGM_LISTNAMES 8 /* list all globally named nodes */ 113#define NGM_LISTNODES 9 /* list all nodes, named and unnamed */ 114#define NGM_LISTTYPES 10 /* list all installed node types */ 115#define NGM_TEXT_STATUS 11 /* (optional) get text status report */ 116#define NGM_BINARY2ASCII 12 /* convert struct ng_mesg to ascii */ 117#define NGM_ASCII2BINARY 13 /* convert ascii to struct ng_mesg */ 118#define NGM_TEXT_CONFIG 14 /* (optional) get/set text config */ 119 |
120/* 121 * Flow control and intra node control messages. 122 * These are routed between nodes to allow flow control and to allow 123 * events to be passed around the graph. 124 * There will be some form of default handling for these but I 125 * do not yet know what it is.. 126 */ 127 128/* Generic message type cookie */ 129#define NGM_FLOW_COOKIE 851672669 /* temp for debugging */ 130 131/* Upstream messages */ 132#define NGM_LINK_IS_UP 32 /* e.g. carrier found - no data */ 133#define NGM_LINK_IS_DOWN 33 /* carrier lost, includes queue state */ 134#define NGM_HIGH_WATER_PASSED 34 /* includes queue state */ 135#define NGM_LOW_WATER_PASSED 35 /* includes queue state */ 136#define NGM_SYNC_QUEUE_STATE 36 /* sync response from sending packet */ 137 138/* Downstream messages */ 139#define NGM_DROP_LINK 41 /* drop DTR, etc. - stay in the graph */ 140#define NGM_RAISE LINK 42 /* if you previously dropped it */ 141#define NGM_FLUSH_QUEUE 43 /* no data */ 142#define NGM_GET_BANDWIDTH 44 /* either real or measured */ 143#define NGM_SET_XMIT_Q_LIMITS 45 /* includes queue state */ 144#define NGM_GET_XMIT_Q_LIMITS 46 /* returns queue state */ 145#define NGM_MICROMANAGE 47 /* We want sync. queue state reply 146 for each packet sent down */ 147#define NGM_SET_FLOW_MANAGER 48 /* send flow control here */ |
|
120/* Structure used for NGM_MKPEER */ 121struct ngm_mkpeer { 122 char type[NG_TYPELEN + 1]; /* peer type */ 123 char ourhook[NG_HOOKLEN + 1]; /* hook name */ 124 char peerhook[NG_HOOKLEN + 1]; /* peer hook name */ 125}; 126 127/* Keep this in sync with the above structure definition */ --- 138 unchanged lines hidden (view full) --- 266#define NG_GENERIC_TYPELIST_INFO(tiarraytype) { \ 267 { \ 268 { "numtypes", &ng_parse_uint32_type }, \ 269 { "typeinfo", (tiarraytype) }, \ 270 { NULL }, \ 271 } \ 272} 273 | 148/* Structure used for NGM_MKPEER */ 149struct ngm_mkpeer { 150 char type[NG_TYPELEN + 1]; /* peer type */ 151 char ourhook[NG_HOOKLEN + 1]; /* hook name */ 152 char peerhook[NG_HOOKLEN + 1]; /* peer hook name */ 153}; 154 155/* Keep this in sync with the above structure definition */ --- 138 unchanged lines hidden (view full) --- 294#define NG_GENERIC_TYPELIST_INFO(tiarraytype) { \ 295 { \ 296 { "numtypes", &ng_parse_uint32_type }, \ 297 { "typeinfo", (tiarraytype) }, \ 298 { NULL }, \ 299 } \ 300} 301 |
302struct ngm_bandwidth { 303 u_int64_t nominal_in; 304 u_int64_t seen_in; 305 u_int64_t nominal_out; 306 u_int64_t seen_out; 307}; 308 309/* Keep this in sync with the above structure definition */ 310#define NG_GENERIC_BANDWIDTH_INFO() { \ 311 { \ 312 { "nominal_in", &ng_parse_uint64_type }, \ 313 { "seen_in", &ng_parse_uint64_type }, \ 314 { "nominal_out", &ng_parse_uint64_type }, \ 315 { "seen_out", &ng_parse_uint64_type }, \ 316 { NULL }, \ 317 } \ 318} 319 |
|
274/* | 320/* |
321 * Information about a node's 'output' queue. 322 * This is NOT the netgraph input queueing mechanism, 323 * but rather any queue the node may implement internally 324 * This has to consider ALTQ if we are to work with it. 325 * As far as I can see, ALTQ counts PACKETS, not bytes. 326 * If ALTQ has several queues and one has passed a watermark 327 * we should have the priority of that queue be real (and not -1) 328 * XXX ALTQ stuff is just an idea..... 329 */ 330struct ngm_queue_state { 331 u_int queue_priority; /* maybe only low-pri is full. -1 = all*/ 332 u_int max_queuelen_bytes; 333 u_int max_queuelen_packets; 334 u_int low_watermark; 335 u_int high_watermark; 336 u_int current; 337}; 338 339/* Keep this in sync with the above structure definition */ 340#define NG_GENERIC_QUEUE_INFO() { \ 341 { \ 342 { "max_queuelen_bytes", &ng_parse_uint_type }, \ 343 { "max_queuelen_packets", &ng_parse_uint_type }, \ 344 { "high_watermark", &ng_parse_uint_type }, \ 345 { "low_watermark", &ng_parse_uint_type }, \ 346 { "current", &ng_parse_uint_type }, \ 347 { NULL }, \ 348 } \ 349} 350 351/* Tell a node who to send async flow control info to. */ 352struct flow_manager { 353 ng_ID_t id; /* unique identifier */ 354}; 355 356/* Keep this in sync with the above structure definition */ 357#define NG_GENERIC_FLOW_MANAGER_INFO() { \ 358 { \ 359 { "id", &ng_parse_hint32_type }, \ 360 { NULL }, \ 361 } \ 362} 363 364 365/* |
|
275 * For netgraph nodes that are somehow associated with file descriptors 276 * (e.g., a device that has a /dev entry and is also a netgraph node), 277 * we define a generic ioctl for requesting the corresponding nodeinfo 278 * structure and for assigning a name (if there isn't one already). 279 * 280 * For these to you need to also #include <sys/ioccom.h>. 281 */ 282 --- 46 unchanged lines hidden --- | 366 * For netgraph nodes that are somehow associated with file descriptors 367 * (e.g., a device that has a /dev entry and is also a netgraph node), 368 * we define a generic ioctl for requesting the corresponding nodeinfo 369 * structure and for assigning a name (if there isn't one already). 370 * 371 * For these to you need to also #include <sys/ioccom.h>. 372 */ 373 --- 46 unchanged lines hidden --- |