47#include <sys/kernel.h>
49#include <sys/limits.h>
50#include <sys/malloc.h>
54#include <machine/stdarg.h>
56#include <net/ethernet.h>
58#include <netinet/in.h>
64#ifdef NG_SEPARATE_MALLOC
67#define M_NETGRAPH_PARSE M_NETGRAPH
86#define INT8_ALIGNMENT 1
87#define INT16_ALIGNMENT ((size_t)&((struct int16_temp *)0)->y)
88#define INT32_ALIGNMENT ((size_t)&((struct int32_temp *)0)->y)
89#define INT64_ALIGNMENT ((size_t)&((struct int64_temp *)0)->y)
105 const char *s,
int *off,
const u_char *start,
106 u_char *
const buf,
int *buflen,
enum comptype ctype);
108 const u_char *
data,
int *off,
char *cbuf,
int cbuflen,
111 int index,
const u_char *start, u_char *buf,
114 const u_char *start,
const u_char *buf,
119 int index,
enum comptype ctype,
int posn);
124 const char *fmt, ...);
127#define METHOD(t,m) (ng_get_ ## m ## _method(t))
128#define INVOKE(t,m) (*METHOD(t,m))
136#define ALIGNMENT(t) (METHOD(t, getAlign) == NULL ? \
137 0 : INVOKE(t, getAlign)(t))
148 const char *
string,
int *off, u_char *buf,
int *buflen)
158 const u_char *
data,
char *cbuf,
int cbuflen)
175 return (*func)(
type, buf, buf, buflen);
184 const char *s,
int *off,
const u_char *
const start,
185 u_char *
const buf,
int *buflen)
192 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
199 const u_char *
const start, u_char *buf,
int *buflen)
204 "{}", &off, start, buf, buflen,
CT_STRUCT);
213 for (field =
type->info; field->
name != NULL; field++) {
238 const char *s,
int *off,
const u_char *
const start,
239 u_char *
const buf,
int *buflen)
247 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
255 const u_char *
const start, u_char *buf,
int *buflen)
287 const char *s,
int *off,
const u_char *
const start,
288 u_char *
const buf,
int *buflen)
295 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
302 const u_char *
const start, u_char *buf,
int *buflen)
307 "[]", &off, start, buf, buflen,
CT_ARRAY);
334 const char *s,
int *off,
const u_char *
const start,
335 u_char *
const buf,
int *buflen)
341 val = strtol(s + *off, &eptr, 0);
342 if (val < (int8_t)0x80 || val > (u_int8_t)0xff || eptr == s + *off)
346 bcopy(&val8, buf,
sizeof(int8_t));
347 *buflen =
sizeof(int8_t);
353 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
360 bcopy(
data + *off, &val,
sizeof(int8_t));
361 switch ((intptr_t)
type->info) {
368 fval = (u_int8_t)val;
372 fval = (u_int8_t)val;
375 panic(
"%s: unknown type", __func__);
379 *off +=
sizeof(int8_t);
385 const u_char *
const start, u_char *buf,
int *buflen)
389 if (*buflen <
sizeof(int8_t))
392 bcopy(&val, buf,
sizeof(int8_t));
393 *buflen =
sizeof(int8_t);
429 const char *s,
int *off,
const u_char *
const start,
430 u_char *
const buf,
int *buflen)
436 val = strtol(s + *off, &eptr, 0);
437 if (val < (int16_t)0x8000
438 || val > (u_int16_t)0xffff || eptr == s + *off)
441 val16 = (int16_t)val;
442 bcopy(&val16, buf,
sizeof(int16_t));
443 *buflen =
sizeof(int16_t);
449 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
456 bcopy(
data + *off, &val,
sizeof(int16_t));
457 switch ((intptr_t)
type->info) {
464 fval = (u_int16_t)val;
468 fval = (u_int16_t)val;
471 panic(
"%s: unknown type", __func__);
475 *off +=
sizeof(int16_t);
481 const u_char *
const start, u_char *buf,
int *buflen)
485 if (*buflen <
sizeof(int16_t))
488 bcopy(&val, buf,
sizeof(int16_t));
489 *buflen =
sizeof(int16_t);
525 const char *s,
int *off,
const u_char *
const start,
526 u_char *
const buf,
int *buflen)
533 val = strtol(s + *off, &eptr, 0);
535 val = strtoul(s + *off, &eptr, 0);
536 if (val < (int32_t)0x80000000
537 || val > (u_int32_t)0xffffffff || eptr == s + *off)
540 val32 = (int32_t)val;
541 bcopy(&val32, buf,
sizeof(int32_t));
542 *buflen =
sizeof(int32_t);
548 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
555 bcopy(
data + *off, &val,
sizeof(int32_t));
556 switch ((intptr_t)
type->info) {
563 fval = (u_int32_t)val;
567 fval = (u_int32_t)val;
570 panic(
"%s: unknown type", __func__);
574 *off +=
sizeof(int32_t);
580 const u_char *
const start, u_char *buf,
int *buflen)
584 if (*buflen <
sizeof(int32_t))
587 bcopy(&val, buf,
sizeof(int32_t));
588 *buflen =
sizeof(int32_t);
624 const char *s,
int *off,
const u_char *
const start,
625 u_char *
const buf,
int *buflen)
631 val = strtoq(s + *off, &eptr, 0);
632 if (eptr == s + *off)
635 val64 = (int64_t)val;
636 bcopy(&val64, buf,
sizeof(int64_t));
637 *buflen =
sizeof(int64_t);
643 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
650 bcopy(
data + *off, &val,
sizeof(int64_t));
651 switch ((intptr_t)
type->info) {
658 fval = (u_int64_t)val;
662 fval = (u_int64_t)val;
665 panic(
"%s: unknown type", __func__);
669 *off +=
sizeof(int64_t);
675 const u_char *
const start, u_char *buf,
int *buflen)
679 if (*buflen <
sizeof(int64_t))
682 bcopy(&val, buf,
sizeof(int64_t));
683 *buflen =
sizeof(int64_t);
719 const char *s,
int *off,
const u_char *
const start,
720 u_char *
const buf,
int *buflen)
729 bcopy(sval, buf, slen + 1);
737 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
739 const char *
const raw = (
const char *)
data + *off;
749 *off += strlen(raw) + 1;
756 const u_char *
const start, u_char *buf,
int *buflen)
761 buf[0] = (u_char)
'\0';
782 const char *s,
int *off,
const u_char *
const start,
783 u_char *
const buf,
int *buflen)
797 bcopy(sval, buf, slen);
799 bzero(buf + slen, fi->
bufSize - slen);
806 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
809 int error, temp = *off;
819 const u_char *
const start, u_char *buf,
int *buflen)
886 const char *s,
int *off,
const u_char *
const start,
887 u_char *
const buf,
int *buflen)
895 if (slen > USHRT_MAX) {
900 *((u_int16_t *)buf) = (u_int16_t)slen;
901 bcopy(sval, buf + 2, slen);
909 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
911 const char *
const raw = (
const char *)
data + *off + 2;
912 const int slen = *((
const u_int16_t *)(
data + *off));
929 const u_char *
const start, u_char *buf,
int *buflen)
954 const char *s,
int *off,
const u_char *
const start,
955 u_char *
const buf,
int *buflen)
959 for (i = 0; i < 4; i++) {
961 s, off, start, buf + i, buflen)) != 0)
975 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
980 bcopy(
data + *off, &ip,
sizeof(ip));
982 ((u_char *)&ip)[0], ((u_char *)&ip)[1],
983 ((u_char *)&ip)[2], ((u_char *)&ip)[3])) != 0)
991 const u_char *
const start, u_char *buf,
int *buflen)
993 struct in_addr ip = { 0 };
995 if (*buflen <
sizeof(ip))
997 bcopy(&ip, buf,
sizeof(ip));
998 *buflen =
sizeof(ip);
1018 const char *s,
int *
const off,
const u_char *
const start,
1019 u_char *
const buf,
int *
const buflen)
1025 if (*buflen < ETHER_ADDR_LEN)
1027 for (i = 0; i < ETHER_ADDR_LEN; i++) {
1028 val = strtoul(s + *off, &eptr, 16);
1029 if (val > 0xff || eptr == s + *off)
1031 buf[i] = (u_char)val;
1033 if (i < ETHER_ADDR_LEN - 1) {
1039 *buflen = ETHER_ADDR_LEN;
1045 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
1049 len = snprintf(cbuf, cbuflen,
"%02x:%02x:%02x:%02x:%02x:%02x",
1054 *off += ETHER_ADDR_LEN;
1075 const u_char *start,
const u_char *buf)
1079 return (*getLength)(
type, start, buf);
1095 const char *s,
int *off,
const u_char *
const start,
1096 u_char *
const buf,
int *buflen)
1107 arraylen = (*getLength)(
type, start, buf);
1108 if (arraylen > *buflen) {
1112 if (slen > arraylen) {
1116 bcopy(str, buf, slen);
1117 bzero(buf + slen, arraylen - slen);
1133 const u_char *
data,
int *off,
char *cbuf,
int cbuflen)
1144 const u_char *
const start, u_char *buf,
int *buflen)
1170 const u_char *start,
const u_char *buf)
1174 msg = (
const struct ng_mesg *)(buf -
sizeof(*msg));
1201 int *off,
const u_char *
const start, u_char *
const buf,
int *buflen,
1208 int align, len, blen, error = 0;
1246 index = nextIndex++;
1259 index = nextIndex++;
1264 ul = strtoul(s + *off, &eptr, 0);
1265 if (ul == ULONG_MAX || eptr - (s + *off) != len) {
1270 nextIndex = index + 1;
1274 fields =
type->info;
1281 for (index = 0; index < num; index++) {
1283 field = &fields[index];
1285 if (strncmp(&s[*off], field->
name, len) == 0
1286 && field->
name[len] ==
'\0')
1311 if (foff[index] != 0) {
1315 while (isspace(s[*off]))
1324 for (blen = index = 0; index < num; index++) {
1331 for (k = 0; k <
pad; k++) {
1332 if (blen >= *buflen) {
1340 vlen = *buflen - blen;
1341 if (foff[index] == 0) {
1343 start, buf + blen, &vlen, ctype);
1347 s, off, start, buf + blen, &vlen);
1356 while (blen % align != 0) {
1357 if (blen >= *buflen) {
1378 int *off,
char *cbuf,
int cbuflen,
const enum comptype ctype)
1380 const struct ng_mesg *
const hdr
1383 const int workSize = 20 * 1024;
1384 int nextIndex = 0, didOne = 0;
1390 if (workBuf == NULL)
1395 (ctype ==
CT_STRUCT) ?
'{' :
'[')) != 0)
1399 for (index = 0; index < num; index++) {
1410 if (
sizeof(*hdr) + *off < workSize) {
1411 int tempsize = workSize -
sizeof(*hdr) - *off;
1413 bcopy(hdr, workBuf,
sizeof(*hdr) + *off);
1415 +
sizeof(*hdr), workBuf +
sizeof(*hdr) + *off,
1416 &tempsize, ctype) == 0
1417 && bcmp(workBuf +
sizeof(*hdr) + *off,
1418 data + *off, tempsize) == 0) {
1428 if (index != nextIndex) {
1431 &cbuflen,
"%d=", index)) != 0)
1437 fields =
type->info;
1440 &cbuflen,
"%s=", fields[index].
name)) != 0)
1445 if ((error =
INVOKE(etype, unparse)
1446 (etype,
data, off, cbuf, cbuflen)) != 0) {
1450 cbuflen -= strlen(cbuf);
1451 cbuf += strlen(cbuf);
1457 didOne ?
" " :
"", (ctype ==
CT_STRUCT) ?
'}' :
']');
1471 int index,
const u_char *
const start, u_char *buf,
int *buflen,
1486 index, start, buf, buflen);
1496 index, start, buf, buflen);
1501 panic(
"%s", __func__);
1508 return (EOPNOTSUPP);
1509 return (*func)(etype, start, buf, buflen);
1517 const u_char *
const start,
const u_char *buf,
1526 for (numFields = 0; ; numFields++) {
1528 fi = &fields[numFields];
1530 if (fi->
name == NULL)
1548 panic(
"%s", __func__);
1558 int index,
const enum comptype ctype)
1567 etype = fields[index].
type;
1585 panic(
"%s", __func__);
1596 int index,
enum comptype ctype,
int posn)
1612 return (align ? (align - (posn % align)) % align : 0);
1628 va_start(args, fmt);
1629 len = vsnprintf(*cbufp, *cbuflenp, fmt, args);
1631 if (len >= *cbuflenp)
1645 int len, nbracket, nbrace;
1648 len = nbracket = nbrace = 0;
1658 if (nbracket-- == 0)
1671 }
while (nbracket > 0 || nbrace > 0);
1687 while (isspace(s[*startp]))
1689 switch (s[*startp]) {
1714 for (i = *startp + 1; s[i] !=
'\0' && !isspace(s[i])
1715 && s[i] !=
'{' && s[i] !=
'}' && s[i] !=
'['
1716 && s[i] !=
']' && s[i] !=
'=' && s[i] !=
'"'; i++)
1718 *lenp = i - *startp;
1734 while (isspace(s[*startp]))
1737 if (s[*startp] !=
'"')
1742 strcpy(cbuf, s + start + 1);
1743 for (slen = 0, off = 1, p = cbuf; *p !=
'\0'; slen++, off++, p++) {
1750 }
else if (p[0] ==
'\\' && p[1] !=
'\0') {
1781 case '0':
case '1':
case '2':
case '3':
1782 case '4':
case '5':
case '6':
case '7':
1784 k < 3 && *v >=
'0' && *v <=
'7'; v++) {
1785 x = (x << 3) + (*v -
'0');
1791 for (v++, x = k = 0;
1792 k < 2 && isxdigit(*v); v++) {
1793 x = (x << 4) + (isdigit(*v) ?
1795 (tolower(*v) -
'a' + 10));
1826 for (i = 0; i < slen; i++, raw++) {
1854 if (*raw < 0x20 || *raw > 0x7e) {
1855 off += sprintf(cbuf + off,
1856 "\\x%02x", (u_char)*raw);
1875 while (t != NULL && t->
parse == NULL)
1877 return (t ? t->
parse : NULL);
1883 while (t != NULL && t->
unparse == NULL)
1885 return (t ? t->
unparse : NULL);
1899 while (t != NULL && t->
getAlign == NULL)
MALLOC_DEFINE(M_NG_CCATM, "ng_ccatm", "netgraph uni api node")
#define NG_GENERIC_NG_MESG_INFO(dtype)
const struct ng_parse_type ng_parse_typebuf_type
static const struct ng_parse_type ng_parse_bytearray_subtype
static int ng_enaddr_parse(const struct ng_parse_type *type, const char *s, int *const off, const u_char *const start, u_char *const buf, int *const buflen)
const struct ng_parse_type ng_parse_uint16_type
static int ng_bytearray_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
static int ng_int64_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
static int ng_parse_get_elem_pad(const struct ng_parse_type *type, int index, enum comptype ctype, int posn)
static int ng_bytearray_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
const struct ng_parse_type ng_parse_ng_mesg_type
static int ng_parse_skip_value(const char *s, int off, int *lenp)
static int ng_int32_getAlign(const struct ng_parse_type *type)
const struct ng_parse_type ng_parse_cmdbuf_type
const struct ng_parse_type ng_parse_int32_type
const struct ng_parse_type ng_parse_fixedstring_type
static int ng_int8_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
const struct ng_parse_type ng_parse_enaddr_type
static int ng_int16_getAlign(const struct ng_parse_type *type)
static int ng_sizedstring_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
const struct ng_parse_fixedstring_info ng_parse_hookbuf_info
static int ng_parse_bytearray_subtype_getLength(const struct ng_parse_type *type, const u_char *start, const u_char *buf)
const struct ng_parse_type ng_parse_pathbuf_type
const struct ng_parse_type ng_parse_uint64_type
static int ng_sizedstring_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
static int ng_ipaddr_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
char * ng_get_string_token(const char *s, int *startp, int *lenp, int *slenp)
static const struct ng_parse_array_info ng_parse_bytearray_subtype_info
const struct ng_parse_fixedstring_info ng_parse_nodebuf_info
static int ng_string_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
static int ng_fixedarray_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
const struct ng_parse_fixedstring_info ng_parse_typebuf_info
static int ng_int16_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
static int ng_array_getAlign(const struct ng_parse_type *type)
static int ng_get_composite_elem_default(const struct ng_parse_type *type, int index, const u_char *start, u_char *buf, int *buflen, enum comptype ctype)
const struct ng_parse_type ng_parse_bytearray_type
static int ng_int32_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
static int ng_sizedstring_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
static int ng_fixedstring_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
static int ng_int16_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
int ng_unparse(const struct ng_parse_type *type, const u_char *data, char *cbuf, int cbuflen)
static const struct ng_parse_type * ng_get_composite_etype(const struct ng_parse_type *type, int index, enum comptype ctype)
static int ng_int64_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
static int ng_struct_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
int ng_parse_getDefault(const struct ng_parse_type *type, u_char *buf, int *buflen)
static int ng_int8_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
const struct ng_parse_type ng_parse_ipaddr_type
static int ng_struct_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
static int ng_int8_getAlign(const struct ng_parse_type *type)
static int ng_int64_getAlign(const struct ng_parse_type *type)
const struct ng_parse_type ng_parse_fixedarray_type
static int ng_fixedarray_getAlign(const struct ng_parse_type *type)
static ng_getAlign_t * ng_get_getAlign_method(const struct ng_parse_type *t)
static int ng_fixedstring_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
const struct ng_parse_type ng_parse_int8_type
static int ng_string_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
const struct ng_parse_fixedstring_info ng_parse_pathbuf_info
static int ng_int8_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
static ng_unparse_t * ng_get_unparse_method(const struct ng_parse_type *t)
static ng_parse_t * ng_get_parse_method(const struct ng_parse_type *t)
const struct ng_parse_type ng_parse_array_type
const struct ng_parse_type ng_parse_string_type
static int ng_array_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
const struct ng_parse_type ng_parse_struct_type
static int ng_int32_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
static int ng_unparse_composite(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen, enum comptype ctype)
static int ng_parse_append(char **cbufp, int *cbuflenp, const char *fmt,...)
static int ng_fixedarray_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
const struct ng_parse_fixedstring_info ng_parse_cmdbuf_info
const struct ng_parse_type ng_parse_hint8_type
static int ng_enaddr_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
static int ng_string_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
static int ng_get_composite_len(const struct ng_parse_type *type, const u_char *start, const u_char *buf, enum comptype ctype)
static int ng_struct_getAlign(const struct ng_parse_type *type)
static int ng_int16_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
static const struct ng_parse_type ng_msg_data_type
const struct ng_parse_type ng_parse_uint32_type
const struct ng_parse_type ng_parse_hookbuf_type
const struct ng_parse_type ng_parse_hint64_type
static int ng_int32_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
const struct ng_parse_type ng_parse_int64_type
static int ng_array_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
static int ng_bytearray_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
static int ng_int64_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
static int ng_fixedstring_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
const struct ng_parse_type ng_parse_uint8_type
const struct ng_parse_type ng_parse_sizedstring_type
static int ng_array_unparse(const struct ng_parse_type *type, const u_char *data, int *off, char *cbuf, int cbuflen)
static int ng_ipaddr_getDefault(const struct ng_parse_type *type, const u_char *const start, u_char *buf, int *buflen)
const struct ng_parse_type ng_parse_nodebuf_type
static ng_getDefault_t * ng_get_getDefault_method(const struct ng_parse_type *t)
static int ng_ipaddr_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
char * ng_encode_string(const char *raw, int slen)
static int ng_fixedarray_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
const struct ng_parse_type ng_parse_hint16_type
const struct ng_parse_type ng_parse_hint32_type
static int ng_struct_parse(const struct ng_parse_type *type, const char *s, int *off, const u_char *const start, u_char *const buf, int *buflen)
static int ng_parse_ng_mesg_getLength(const struct ng_parse_type *type, const u_char *start, const u_char *buf)
int ng_parse(const struct ng_parse_type *type, const char *string, int *off, u_char *buf, int *buflen)
enum ng_parse_token ng_parse_get_token(const char *s, int *startp, int *lenp)
static int ng_parse_composite(const struct ng_parse_type *type, const char *s, int *off, const u_char *start, u_char *const buf, int *buflen, enum comptype ctype)
static const struct ng_parse_struct_field ng_parse_ng_mesg_type_fields[]
const struct ng_parse_type ng_parse_int16_type
int ng_getDefault_t(const struct ng_parse_type *type, const u_char *start, u_char *buf, int *buflen)
int ng_parse_array_getLength_t(const struct ng_parse_type *type, const u_char *start, const u_char *buf)
int ng_getAlign_t(const struct ng_parse_type *type)
int ng_unparse_t(const struct ng_parse_type *type, const u_char *data, int *off, char *buf, int buflen)
int ng_parse_t(const struct ng_parse_type *type, const char *string, int *off, const u_char *start, u_char *buf, int *buflen)
struct ng_mesg::ng_msghdr header
ng_parse_array_getDefault_t * getDefault
const struct ng_parse_type * elementType
ng_parse_array_getLength_t * getLength
const struct ng_parse_type * elementType
ng_parse_array_getDefault_t * getDefault
const struct ng_parse_type * type
ng_getDefault_t * getDefault
const struct ng_parse_type * supertype