Lines Matching defs:cbuf

107 			const u_char *data, int *off, char *cbuf, int cbuflen,
157 const u_char *data, char *cbuf, int cbuflen)
161 return INVOKE(type, unparse)(type, data, &off, cbuf, cbuflen);
191 const u_char *data, int *off, char *cbuf, int cbuflen)
193 return ng_unparse_composite(type, data, off, cbuf, cbuflen, CT_STRUCT);
246 const u_char *data, int *off, char *cbuf, int cbuflen)
249 data, off, cbuf, cbuflen, CT_FIXEDARRAY);
294 const u_char *data, int *off, char *cbuf, int cbuflen)
296 return ng_unparse_composite(type, data, off, cbuf, cbuflen, CT_ARRAY);
352 const u_char *data, int *off, char *cbuf, int cbuflen)
376 if ((error = ng_parse_append(&cbuf, &cbuflen, fmt, fval)) != 0)
448 const u_char *data, int *off, char *cbuf, int cbuflen)
472 if ((error = ng_parse_append(&cbuf, &cbuflen, fmt, fval)) != 0)
547 const u_char *data, int *off, char *cbuf, int cbuflen)
571 if ((error = ng_parse_append(&cbuf, &cbuflen, fmt, fval)) != 0)
642 const u_char *data, int *off, char *cbuf, int cbuflen)
666 if ((error = ng_parse_append(&cbuf, &cbuflen, fmt, fval)) != 0)
736 const u_char *data, int *off, char *cbuf, int cbuflen)
744 if ((error = ng_parse_append(&cbuf, &cbuflen, "%s", s)) != 0) {
805 const u_char *data, int *off, char *cbuf, int cbuflen)
810 if ((error = ng_string_unparse(type, data, &temp, cbuf, cbuflen)) != 0)
908 const u_char *data, int *off, char *cbuf, int cbuflen)
917 if ((error = ng_parse_append(&cbuf, &cbuflen, "%s", s)) != 0) {
974 const u_char *data, int *off, char *cbuf, int cbuflen)
980 if ((error = ng_parse_append(&cbuf, &cbuflen, "%d.%d.%d.%d",
1044 const u_char *data, int *off, char *cbuf, int cbuflen)
1048 len = snprintf(cbuf, cbuflen, "%02x:%02x:%02x:%02x:%02x:%02x",
1132 const u_char *data, int *off, char *cbuf, int cbuflen)
1138 return ng_array_unparse(&subtype, data, off, cbuf, cbuflen);
1379 int *off, char *cbuf, int cbuflen, const enum comptype ctype)
1395 if ((error = ng_parse_append(&cbuf, &cbuflen, "%c",
1426 if ((error = ng_parse_append(&cbuf, &cbuflen, " ")) != 0)
1431 if ((error = ng_parse_append(&cbuf,
1440 if ((error = ng_parse_append(&cbuf,
1447 (etype, data, off, cbuf, cbuflen)) != 0) {
1451 cbuflen -= strlen(cbuf);
1452 cbuf += strlen(cbuf);
1457 error = ng_parse_append(&cbuf, &cbuflen, "%s%c",
1731 char *cbuf, *p;
1740 cbuf = malloc(strlen(s + start), M_NETGRAPH_PARSE, M_NOWAIT);
1741 if (cbuf == NULL)
1743 strcpy(cbuf, s + start + 1);
1744 for (slen = 0, off = 1, p = cbuf; *p != '\0'; slen++, off++, p++) {
1750 return (cbuf);
1807 free(cbuf, M_NETGRAPH_PARSE);
1819 char *cbuf;
1823 cbuf = malloc(strlen(raw) * 4 + 3, M_NETGRAPH_PARSE, M_NOWAIT);
1824 if (cbuf == NULL)
1826 cbuf[off++] = '"';
1830 cbuf[off++] = '\\';
1831 cbuf[off++] = 't';
1834 cbuf[off++] = '\\';
1835 cbuf[off++] = 'f';
1838 cbuf[off++] = '\\';
1839 cbuf[off++] = 'n';
1842 cbuf[off++] = '\\';
1843 cbuf[off++] = 'r';
1846 cbuf[off++] = '\\';
1847 cbuf[off++] = 'v';
1851 cbuf[off++] = '\\';
1852 cbuf[off++] = *raw;
1856 off += sprintf(cbuf + off,
1860 cbuf[off++] = *raw;
1864 cbuf[off++] = '"';
1865 cbuf[off] = '\0';
1866 return (cbuf);