Deleted Added
full compact
ng_message.h (62471) ng_message.h (64508)
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@whistle.com>
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@whistle.com>
38 *
39 * $FreeBSD: head/sys/netgraph/ng_message.h 62471 2000-07-03 13:34:18Z phk $
39 * $FreeBSD: head/sys/netgraph/ng_message.h 64508 2000-08-10 22:45:54Z archie $
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) */

--- 16 unchanged lines hidden (view full) ---

64 u_char cmdstr[NG_CMDSTRLEN+1]; /* cmd string + \0 */
65 } header;
66 char data[0]; /* placeholder for actual data */
67};
68
69/* Keep this in sync with the above structure definition */
70#define NG_GENERIC_NG_MESG_INFO(dtype) { \
71 { \
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) */

--- 16 unchanged lines hidden (view full) ---

64 u_char cmdstr[NG_CMDSTRLEN+1]; /* cmd string + \0 */
65 } header;
66 char data[0]; /* placeholder for actual data */
67};
68
69/* Keep this in sync with the above structure definition */
70#define NG_GENERIC_NG_MESG_INFO(dtype) { \
71 { \
72 { "version", &ng_parse_int8_type }, \
73 { "spare", &ng_parse_int8_type }, \
74 { "arglen", &ng_parse_int16_type }, \
75 { "flags", &ng_parse_int32_type }, \
76 { "token", &ng_parse_int32_type }, \
77 { "typecookie", &ng_parse_int32_type }, \
78 { "cmd", &ng_parse_int32_type }, \
72 { "version", &ng_parse_uint8_type }, \
73 { "spare", &ng_parse_uint8_type }, \
74 { "arglen", &ng_parse_uint16_type }, \
75 { "flags", &ng_parse_hint32_type }, \
76 { "token", &ng_parse_uint32_type }, \
77 { "typecookie", &ng_parse_uint32_type }, \
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

--- 98 unchanged lines hidden (view full) ---

185 u_int32_t hooks; /* number of active hooks */
186};
187
188/* Keep this in sync with the above structure definition */
189#define NG_GENERIC_NODEINFO_INFO() { \
190 { \
191 { "name", &ng_parse_nodebuf_type }, \
192 { "type", &ng_parse_typebuf_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

--- 98 unchanged lines hidden (view full) ---

185 u_int32_t hooks; /* number of active hooks */
186};
187
188/* Keep this in sync with the above structure definition */
189#define NG_GENERIC_NODEINFO_INFO() { \
190 { \
191 { "name", &ng_parse_nodebuf_type }, \
192 { "type", &ng_parse_typebuf_type }, \
193 { "id", &ng_parse_int32_type }, \
194 { "hooks", &ng_parse_int32_type }, \
193 { "id", &ng_parse_hint32_type }, \
194 { "hooks", &ng_parse_uint32_type }, \
195 { NULL }, \
196 } \
197}
198
199/* Structure used for NGM_LISTHOOKS */
200struct linkinfo {
201 char ourhook[NG_HOOKLEN + 1]; /* hook name */
202 char peerhook[NG_HOOKLEN + 1]; /* peer hook */

--- 28 unchanged lines hidden (view full) ---

231struct namelist {
232 u_int32_t numnames;
233 struct nodeinfo nodeinfo[0];
234};
235
236/* Keep this in sync with the above structure definition */
237#define NG_GENERIC_LISTNODES_INFO(niarraytype) { \
238 { \
195 { NULL }, \
196 } \
197}
198
199/* Structure used for NGM_LISTHOOKS */
200struct linkinfo {
201 char ourhook[NG_HOOKLEN + 1]; /* hook name */
202 char peerhook[NG_HOOKLEN + 1]; /* peer hook */

--- 28 unchanged lines hidden (view full) ---

231struct namelist {
232 u_int32_t numnames;
233 struct nodeinfo nodeinfo[0];
234};
235
236/* Keep this in sync with the above structure definition */
237#define NG_GENERIC_LISTNODES_INFO(niarraytype) { \
238 { \
239 { "numnames", &ng_parse_int32_type }, \
239 { "numnames", &ng_parse_uint32_type }, \
240 { "nodeinfo", (niarraytype) }, \
241 { NULL }, \
242 } \
243}
244
245/* Structure used for NGM_LISTTYPES */
246struct typeinfo {
247 char type_name[NG_TYPELEN + 1]; /* name of type */
248 u_int32_t numnodes; /* number alive */
249};
250
251/* Keep this in sync with the above structure definition */
252#define NG_GENERIC_TYPEINFO_INFO() { \
253 { \
254 { "typename", &ng_parse_typebuf_type }, \
240 { "nodeinfo", (niarraytype) }, \
241 { NULL }, \
242 } \
243}
244
245/* Structure used for NGM_LISTTYPES */
246struct typeinfo {
247 char type_name[NG_TYPELEN + 1]; /* name of type */
248 u_int32_t numnodes; /* number alive */
249};
250
251/* Keep this in sync with the above structure definition */
252#define NG_GENERIC_TYPEINFO_INFO() { \
253 { \
254 { "typename", &ng_parse_typebuf_type }, \
255 { "typeinfo", &ng_parse_int32_type }, \
255 { "numnodes", &ng_parse_uint32_type }, \
256 { NULL }, \
257 } \
258}
259
260struct typelist {
261 u_int32_t numtypes;
262 struct typeinfo typeinfo[0];
263};
264
265/* Keep this in sync with the above structure definition */
266#define NG_GENERIC_TYPELIST_INFO(tiarraytype) { \
267 { \
256 { NULL }, \
257 } \
258}
259
260struct typelist {
261 u_int32_t numtypes;
262 struct typeinfo typeinfo[0];
263};
264
265/* Keep this in sync with the above structure definition */
266#define NG_GENERIC_TYPELIST_INFO(tiarraytype) { \
267 { \
268 { "numtypes", &ng_parse_int32_type }, \
268 { "numtypes", &ng_parse_uint32_type }, \
269 { "typeinfo", (tiarraytype) }, \
270 { NULL }, \
271 } \
272}
273
274/*
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),

--- 54 unchanged lines hidden ---
269 { "typeinfo", (tiarraytype) }, \
270 { NULL }, \
271 } \
272}
273
274/*
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),

--- 54 unchanged lines hidden ---