Lines Matching full:off

104 			const char *s, int *off, const u_char *start,
107 const u_char *data, int *off, char *cbuf, int cbuflen,
121 static int ng_parse_skip_value(const char *s, int off, int *lenp);
147 const char *string, int *off, u_char *buf, int *buflen)
149 return INVOKE(type, parse)(type, string, off, buf, buf, buflen);
159 int off = 0;
161 return INVOKE(type, unparse)(type, data, &off, cbuf, cbuflen);
183 const char *s, int *off, const u_char *const start,
186 return ng_parse_composite(type, s, off, start, buf, buflen, CT_STRUCT);
191 const u_char *data, int *off, char *cbuf, int cbuflen)
193 return ng_unparse_composite(type, data, off, cbuf, cbuflen, CT_STRUCT);
200 int off = 0;
203 "{}", &off, start, buf, buflen, CT_STRUCT);
237 const char *s, int *off, const u_char *const start,
241 s, off, start, buf, buflen, CT_FIXEDARRAY);
246 const u_char *data, int *off, char *cbuf, int cbuflen)
249 data, off, cbuf, cbuflen, CT_FIXEDARRAY);
256 int off = 0;
259 "[]", &off, start, buf, buflen, CT_FIXEDARRAY);
286 const char *s, int *off, const u_char *const start,
289 return ng_parse_composite(type, s, off, start, buf, buflen, CT_ARRAY);
294 const u_char *data, int *off, char *cbuf, int cbuflen)
296 return ng_unparse_composite(type, data, off, cbuf, cbuflen, CT_ARRAY);
303 int off = 0;
306 "[]", &off, start, buf, buflen, CT_ARRAY);
333 const char *s, int *off, const u_char *const start,
340 val = strtol(s + *off, &eptr, 0);
341 if (val < (int8_t)0x80 || val > (u_int8_t)0xff || eptr == s + *off)
343 *off = eptr - s;
352 const u_char *data, int *off, char *cbuf, int cbuflen)
359 bcopy(data + *off, &val, sizeof(int8_t));
378 *off += sizeof(int8_t);
428 const char *s, int *off, const u_char *const start,
435 val = strtol(s + *off, &eptr, 0);
437 || val > (u_int16_t)0xffff || eptr == s + *off)
439 *off = eptr - s;
448 const u_char *data, int *off, char *cbuf, int cbuflen)
455 bcopy(data + *off, &val, sizeof(int16_t));
474 *off += sizeof(int16_t);
524 const char *s, int *off, const u_char *const start,
532 val = strtol(s + *off, &eptr, 0);
534 val = strtoul(s + *off, &eptr, 0);
536 || val > (u_int32_t)0xffffffff || eptr == s + *off)
538 *off = eptr - s;
547 const u_char *data, int *off, char *cbuf, int cbuflen)
554 bcopy(data + *off, &val, sizeof(int32_t));
573 *off += sizeof(int32_t);
623 const char *s, int *off, const u_char *const start,
630 val = strtoq(s + *off, &eptr, 0);
631 if (eptr == s + *off)
633 *off = eptr - s;
642 const u_char *data, int *off, char *cbuf, int cbuflen)
649 bcopy(data + *off, &val, sizeof(int64_t));
668 *off += sizeof(int64_t);
718 const char *s, int *off, const u_char *const start,
725 if ((sval = ng_get_string_token(s, off, &len, &slen)) == NULL)
727 *off += len;
736 const u_char *data, int *off, char *cbuf, int cbuflen)
738 const char *const raw = (const char *)data + *off;
748 *off += strlen(raw) + 1;
781 const char *s, int *off, const u_char *const start,
789 if ((sval = ng_get_string_token(s, off, &len, &slen)) == NULL)
795 *off += len;
805 const u_char *data, int *off, char *cbuf, int cbuflen)
808 int error, temp = *off;
812 *off += fi->bufSize;
885 const char *s, int *off, const u_char *const start,
892 if ((sval = ng_get_string_token(s, off, &len, &slen)) == NULL)
898 *off += len;
908 const u_char *data, int *off, char *cbuf, int cbuflen)
910 const char *const raw = (const char *)data + *off + 2;
911 const int slen = *((const u_int16_t *)(data + *off));
922 *off += slen + 2;
953 const char *s, int *off, const u_char *const start,
960 s, off, start, buf + i, buflen)) != 0)
963 if (s[*off] != '.')
965 (*off)++;
974 const u_char *data, int *off, char *cbuf, int cbuflen)
979 bcopy(data + *off, &ip, sizeof(ip));
984 *off += sizeof(ip);
1017 const char *s, int *const off, const u_char *const start,
1027 val = strtoul(s + *off, &eptr, 16);
1028 if (val > 0xff || eptr == s + *off)
1031 *off = (eptr - s);
1035 (*off)++;
1044 const u_char *data, int *off, char *cbuf, int cbuflen)
1049 data[*off], data[*off + 1], data[*off + 2],
1050 data[*off + 3], data[*off + 4], data[*off + 5]);
1053 *off += ETHER_ADDR_LEN;
1094 const char *s, int *off, const u_char *const start,
1102 if ((str = ng_get_string_token(s, off, &toklen, &slen)) != NULL) {
1118 *off += toklen;
1126 return ng_array_parse(&subtype, s, off, start, buf, buflen);
1132 const u_char *data, int *off, char *cbuf, int cbuflen)
1138 return ng_array_unparse(&subtype, data, off, cbuf, cbuflen);
1200 int *off, const u_char *const start, u_char *const buf, int *buflen,
1219 if (ng_parse_get_token(s, off, &len)
1224 *off += len;
1231 tok = ng_parse_get_token(s, off, &len);
1233 *off += len;
1258 off2 = *off + len;
1265 ul = strtoul(s + *off, &eptr, 0);
1266 if (ul == ULONG_MAX || eptr - (s + *off) != len) {
1272 *off += len + len2;
1286 if (strncmp(&s[*off], field->name, len) == 0
1294 *off += len;
1297 if (ng_parse_get_token(s, off, &len) != T_EQUALS) {
1301 *off += len;
1316 while (isspace(s[*off]))
1317 (*off)++;
1318 foff[index] = *off;
1319 if ((error = ng_parse_skip_value(s, *off, &len)) != 0)
1321 *off += len;
1346 *off = foff[index];
1348 s, off, start, buf + blen, &vlen);
1379 int *off, char *cbuf, int cbuflen, const enum comptype ctype)
1383 const int num = ng_get_composite_len(type, data, data + *off, ctype);
1405 *off += ng_parse_get_elem_pad(type, index, ctype, *off);
1411 if (sizeof(*hdr) + *off < workSize) {
1412 int tempsize = workSize - sizeof(*hdr) - *off;
1414 bcopy(hdr, workBuf, sizeof(*hdr) + *off);
1416 + sizeof(*hdr), workBuf + sizeof(*hdr) + *off,
1418 && bcmp(workBuf + sizeof(*hdr) + *off,
1419 data + *off, tempsize) == 0) {
1420 *off += tempsize;
1447 (etype, data, off, cbuf, cbuflen)) != 0) {
1647 int off = off0;
1651 switch (ng_parse_get_token(s, &off, &len)) {
1671 off += len;
1673 *lenp = off - off0;
1732 int start, off;
1744 for (slen = 0, off = 1, p = cbuf; *p != '\0'; slen++, off++, p++) {
1747 *lenp = off + 1;
1760 off++;
1764 off++;
1768 off++;
1772 off++;
1776 off++;
1780 off++;
1787 off++;
1797 off++;
1820 int off = 0;
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';