netgraph.4 (69922) | netgraph.4 (70159) |
---|---|
1.\" Copyright (c) 1996-1999 Whistle Communications, Inc. 2.\" All rights reserved. 3.\" 4.\" Subject to the following obligations and disclaimer of warranty, use and 5.\" redistribution of this software, in source or object code forms, with or 6.\" without modifications are expressly permitted by Whistle Communications; 7.\" provided, however, that: 8.\" 1. Any and all reproductions of the source or object code must include the --- 19 unchanged lines hidden (view full) --- 28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 31.\" OF SUCH DAMAGE. 32.\" 33.\" Authors: Julian Elischer <julian@FreeBSD.org> 34.\" Archie Cobbs <archie@FreeBSD.org> 35.\" | 1.\" Copyright (c) 1996-1999 Whistle Communications, Inc. 2.\" All rights reserved. 3.\" 4.\" Subject to the following obligations and disclaimer of warranty, use and 5.\" redistribution of this software, in source or object code forms, with or 6.\" without modifications are expressly permitted by Whistle Communications; 7.\" provided, however, that: 8.\" 1. Any and all reproductions of the source or object code must include the --- 19 unchanged lines hidden (view full) --- 28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30.\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 31.\" OF SUCH DAMAGE. 32.\" 33.\" Authors: Julian Elischer <julian@FreeBSD.org> 34.\" Archie Cobbs <archie@FreeBSD.org> 35.\" |
36.\" $FreeBSD: head/share/man/man4/netgraph.4 69922 2000-12-12 18:52:14Z julian $ | 36.\" $FreeBSD: head/share/man/man4/netgraph.4 70159 2000-12-18 20:03:32Z julian $ |
37.\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $ 38.\" 39.Dd January 19, 1999 40.Dt NETGRAPH 4 41.Os FreeBSD 42.Sh NAME 43.Nm netgraph 44.Nd graph based kernel networking subsystem --- 575 unchanged lines hidden (view full) --- 620 u_int32_t cookie; /* typecookie */ 621 int cmd; /* command number */ 622 const char *name; /* command name */ 623 const struct ng_parse_type *mesgType; /* args if !NGF_RESP */ 624 const struct ng_parse_type *respType; /* args if NGF_RESP */ 625}; 626 627struct ng_type { | 37.\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $ 38.\" 39.Dd January 19, 1999 40.Dt NETGRAPH 4 41.Os FreeBSD 42.Sh NAME 43.Nm netgraph 44.Nd graph based kernel networking subsystem --- 575 unchanged lines hidden (view full) --- 620 u_int32_t cookie; /* typecookie */ 621 int cmd; /* command number */ 622 const char *name; /* command name */ 623 const struct ng_parse_type *mesgType; /* args if !NGF_RESP */ 624 const struct ng_parse_type *respType; /* args if NGF_RESP */ 625}; 626 627struct ng_type { |
628 u_int32_t version; /* Must equal NG_VERSION */ | 628 u_int32_t version; /* Must equal NG_ABI_VERSION */ |
629 const char *name; /* Unique type name */ 630 631 /* Module event handler */ 632 modeventhand_t mod_event; /* Handle load/unload (optional) */ 633 634 /* Constructor */ 635 int (*constructor)(node_p *node); /* Create a new node */ 636 --- 36 unchanged lines hidden (view full) --- 673 u_long token; /* Reply should have the same token */ 674 u_long typecookie; /* Node type understanding this message */ 675 u_long cmd; /* Command identifier */ 676 u_char cmdstr[NG_CMDSTRLEN+1]; /* Cmd string (for debug) */ 677 } header; 678 char data[0]; /* Start of cmd/resp data */ 679}; 680 | 629 const char *name; /* Unique type name */ 630 631 /* Module event handler */ 632 modeventhand_t mod_event; /* Handle load/unload (optional) */ 633 634 /* Constructor */ 635 int (*constructor)(node_p *node); /* Create a new node */ 636 --- 36 unchanged lines hidden (view full) --- 673 u_long token; /* Reply should have the same token */ 674 u_long typecookie; /* Node type understanding this message */ 675 u_long cmd; /* Command identifier */ 676 u_char cmdstr[NG_CMDSTRLEN+1]; /* Cmd string (for debug) */ 677 } header; 678 char data[0]; /* Start of cmd/resp data */ 679}; 680 |
681#define NG_VERSION 3 /* Netgraph version */ | 681#define NG_ABI_VERSION 5 /* Netgraph kernel ABI version */ 682#define NG_VERSION 4 /* Netgraph message version */ |
682#define NGF_ORIG 0x0000 /* Command */ 683#define NGF_RESP 0x0001 /* Response */ 684.Ed 685.Pp 686Control messages have the fixed header shown above, followed by a 687variable length data section which depends on the type cookie 688and the command. Each field is explained below: 689.Bl -tag -width xxx 690.It Dv version | 683#define NGF_ORIG 0x0000 /* Command */ 684#define NGF_RESP 0x0001 /* Response */ 685.Ed 686.Pp 687Control messages have the fixed header shown above, followed by a 688variable length data section which depends on the type cookie 689and the command. Each field is explained below: 690.Bl -tag -width xxx 691.It Dv version |
691Indicates the version of netgraph itself. The current version is | 692Indicates the version of the netgraph message protocol itself. The current version is |
692.Dv NG_VERSION . 693.It Dv arglen 694This is the length of any extra arguments, which begin at 695.Dv data . 696.It Dv flags 697Indicates whether this is a command or a response control message. 698.It Dv token 699The --- 538 unchanged lines hidden --- | 693.Dv NG_VERSION . 694.It Dv arglen 695This is the length of any extra arguments, which begin at 696.Dv data . 697.It Dv flags 698Indicates whether this is a command or a response control message. 699.It Dv token 700The --- 538 unchanged lines hidden --- |