/netbsd-current/sys/net/npf/ |
H A D | npf_mbuf.c | 56 #define m_length(m) (nbuf)->nb_mops->getchainlen(m) 57 #define m_buflen(m) (nbuf)->nb_mops->getlen(m) 58 #define m_next_ptr(m) (nbuf)->nb_mops->getnext(m) 59 #define m_ensure_contig(m,t) (nbuf)->nb_mops->ensure_contig((m), (t)) 60 #define m_makewritable(m,o,l,f) (nbuf)->nb_mops->ensure_writable((m), (o+l)) 61 #define mtod(m,t) ((t)((nbuf)->nb_mops->getdata(m))) 75 nbuf_init(npf_t *npf, nbuf_t *nbuf, struct mbuf *m, const ifnet_t *ifp) argument 80 nbuf->nb_mops = npf->mbufops; 82 nbuf->nb_mbuf0 = m; 83 nbuf 89 nbuf_reset(nbuf_t *nbuf) argument 98 nbuf_dataptr(nbuf_t *nbuf) argument 105 nbuf_offset(const nbuf_t *nbuf) argument 115 nbuf_head_mbuf(nbuf_t *nbuf) argument 121 nbuf_flag_p(const nbuf_t *nbuf, int flag) argument 127 nbuf_unset_flag(nbuf_t *nbuf, int flag) argument 140 nbuf_advance(nbuf_t *nbuf, size_t len, size_t ensure) argument 187 nbuf_ensure_contig(nbuf_t *nbuf, size_t len) argument 241 nbuf_ensure_writable(nbuf_t *nbuf, size_t len) argument 270 nbuf_cksum_barrier(nbuf_t *nbuf, int di) argument 305 npf_mbuf_add_tag(nbuf_t *nbuf, struct mbuf *m, uint32_t val) argument 335 nbuf_add_tag(nbuf_t *nbuf, uint32_t val) argument 347 nbuf_find_tag(nbuf_t *nbuf, uint32_t *val) argument [all...] |
H A D | npf_inet.c | 279 nbuf_t *nbuf = npc->npc_nbuf; local 298 nbuf_reset(nbuf); 300 if ((cp = nbuf_advance(nbuf, step, cnt)) == NULL) { 341 if (nbuf_flag_p(nbuf, NBUF_DATAREF_RESET)) { 354 nbuf_t *nbuf = npc->npc_nbuf; local 372 nbuf_reset(nbuf); 374 if ((base = nbuf_advance(nbuf, step, cnt)) == NULL) { 417 if (nbuf_flag_p(nbuf, NBUF_DATAREF_RESET)) { 424 npf_cache_ip(npf_cache_t *npc, nbuf_t *nbuf) argument 426 const void *nptr = nbuf_dataptr(nbuf); 566 npf_cache_tcp(npf_cache_t *npc, nbuf_t *nbuf, unsigned hlen) argument 590 nbuf_t *nbuf = npc->npc_nbuf; local 671 nbuf_t *nbuf = npc->npc_nbuf; local [all...] |
H A D | npf_handler.c | 84 nbuf_t *nbuf = npc->npc_nbuf; local 89 m = nbuf_head_mbuf(nbuf); 104 /* Reassembly failed; free the mbuf, clear the nbuf. */ 107 memset(nbuf, 0, sizeof(nbuf_t)); 121 nbuf_init(npf, nbuf, m, nbuf->nb_ifp); 132 npf_packet_bypass_tag_p(nbuf_t *nbuf) argument 135 return nbuf_find_tag(nbuf, &ntag) == 0 && (ntag & NPF_NTAG_PASS) != 0; 146 nbuf_t nbuf; local 161 nbuf_init(npf, &nbuf, *m [all...] |
/netbsd-current/lib/libwrap/ |
H A D | expandm.c | 53 char *buf, *m, *nbuf; local 85 nbuf = realloc(buf, tlen + 1); 86 if (nbuf == NULL) 89 memcpy(nbuf + blen, ptr, nlen); 90 nbuf[tlen] = '\0'; 92 buf = nbuf; 97 if (asprintf(&nbuf, "%s%.*s%s", buf ? buf : "", 101 buf = nbuf; 104 if (asprintf(&nbuf, "%s%s%s", buf ? buf : "", ptr, sf ? sf : "") == -1) 109 *rbuf = nbuf; [all...] |
/netbsd-current/bin/dd/ |
H A D | misc.c | 194 char hbuf[7], nbuf[32]; local 217 (void)snprintf(nbuf, sizeof(nbuf), "%llu", 219 ADDS(nbuf); 229 (void)snprintf(nbuf, sizeof(nbuf), "%llu", 231 ADDS(nbuf); 241 (void)snprintf(nbuf, sizeof(nbuf), "%llu", 243 ADDS(nbuf); [all...] |
/netbsd-current/lib/libutil/ |
H A D | sockaddr_snprintf.c | 141 char abuf[1024], nbuf[1024], *addr = NULL; local 245 (void)snprintf(nbuf, sizeof(nbuf), "%d", p); 246 ADDS(nbuf); 251 (void)snprintf(nbuf, sizeof(nbuf), "%d", sa->sa_family); 252 ADDS(nbuf); 255 (void)snprintf(nbuf, sizeof(nbuf), "%zu", salen); 256 ADDS(nbuf); [all...] |
/netbsd-current/external/bsd/blocklist/port/ |
H A D | sockaddr_snprintf.c | 167 char abuf[1024], nbuf[1024], *addr = NULL; local 256 (void)snprintf(nbuf, sizeof(nbuf), "%d", p); 257 ADDS(nbuf); 262 (void)snprintf(nbuf, sizeof(nbuf), "%d", sa->sa_family); 263 ADDS(nbuf); 266 (void)snprintf(nbuf, sizeof(nbuf), "%d", SLEN(sa)); 267 ADDS(nbuf); [all...] |
H A D | fgetln.c | 66 char *nbuf = realloc(buf, nbufsiz); local 68 if (nbuf == NULL) { 75 buf = nbuf;
|
/netbsd-current/usr.sbin/npf/npftest/libnpftest/ |
H A D | npf_nbuf_test.c | 2 * NPF nbuf interface tests. 20 mbuf_consistency_check(nbuf_t *nbuf) argument 22 struct mbuf *m = nbuf_head_mbuf(nbuf); 35 nbuf_t nbuf; local 39 nbuf_init(npf_getkernctx(), &nbuf, m, dummy_ifp); local 41 nptr = nbuf_advance(&nbuf, (random() % 16) + 1, (random() % 16) + 1); 42 mbuf_consistency_check(&nbuf); 44 nbuf_reset(&nbuf); 49 nptr = nbuf_ensure_contig(&nbuf, sizeof(uint32_t)); 53 mbuf_consistency_check(&nbuf); [all...] |
/netbsd-current/tools/compat/ |
H A D | getline.c | 77 char *nbuf; local 80 if ((nbuf = realloc(*buf, nbufsiz)) == NULL) 82 *buf = nbuf; 84 eptr = nbuf + nbufsiz; 85 ptr = nbuf + d;
|
/netbsd-current/external/bsd/libfido2/dist/openbsd-compat/ |
H A D | bsd-getline.c | 81 char *nbuf; local 84 if ((nbuf = realloc(*buf, nbufsiz)) == NULL) 86 *buf = nbuf; 88 eptr = nbuf + nbufsiz; 89 ptr = nbuf + d;
|
/netbsd-current/external/bsd/tmux/dist/compat/ |
H A D | getline.c | 76 char *nbuf; local 79 if ((nbuf = realloc(*buf, nbufsiz)) == NULL) 81 *buf = nbuf; 83 eptr = nbuf + nbufsiz; 84 ptr = nbuf + d;
|
/netbsd-current/external/bsd/file/dist/src/ |
H A D | getline.c | 72 char *nbuf; local 75 if ((nbuf = realloc(*buf, nbufsiz)) == NULL) 77 *buf = nbuf; 79 eptr = nbuf + nbufsiz; 80 ptr = nbuf + d;
|
H A D | readelf.c | 359 unsigned char nbuf[BUFSIZ]; local 404 len = xph_filesz < sizeof(nbuf) ? xph_filesz : sizeof(nbuf); 406 if ((bufsize = pread(fd, nbuf, len, offs)) == -1) { 416 offset = donote(ms, nbuf, offset, CAST(size_t, bufsize), 555 do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, argument 559 if (namesz == 4 && strcmp(RCAST(char *, &nbuf[noff]), "GNU") == 0 && 581 memcpy(desc, &nbuf[doff], descsz); 587 if (namesz == 4 && strcmp(RCAST(char *, &nbuf[noff]), "Go") == 0 && 592 RCAST(const char *, &nbuf[dof 600 do_os_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, int swap, uint32_t namesz, uint32_t descsz, size_t noff, size_t doff, int *flags) argument 699 do_pax_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, int swap, uint32_t namesz, uint32_t descsz, size_t noff, size_t doff, int *flags) argument 739 do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, int swap, uint32_t namesz, uint32_t descsz, size_t noff, size_t doff, int *flags, size_t size, int clazz) argument 1019 do_auxv_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, int swap, uint32_t namesz __attribute__((__unused__)), uint32_t descsz __attribute__((__unused__)), size_t noff __attribute__((__unused__)), size_t doff, int *flags, size_t size __attribute__((__unused__)), int clazz, int fd, off_t ph_off, int ph_num, off_t fsize) argument 1171 unsigned char *nbuf = CAST(unsigned char *, vbuf); local 1363 void *nbuf; local 1668 unsigned char nbuf[BUFSIZ]; local [all...] |
/netbsd-current/external/bsd/mdocml/dist/ |
H A D | compat_getline.c | 34 char *nbuf; local 52 if ((nbuf = realloc(*buf, nbufsz)) == NULL) 54 *buf = nbuf;
|
/netbsd-current/usr.sbin/kvm_mkdb/ |
H A D | nlist_aout.c | 112 NLIST nbuf; local 174 data.data = (u_char *)&nbuf; 182 if (fread((char *)&nbuf, sizeof (NLIST), 1, fp) != 1) { 188 if (!nbuf._strx || nbuf.n_type&N_STAB) 191 key.data = (u_char *)strtab + nbuf._strx - sizeof(long); 206 voff = nbuf.n_value - kerntextoff + N_TXTADDR(ebuf); 207 if ((nbuf.n_type & N_TYPE) == N_TEXT) 233 data.data = (u_char *)&nbuf;
|
H A D | nlist_elf32.c | 98 struct nlist nbuf; local 239 data.data = (u_char *)&nbuf; 240 data.size = sizeof(nbuf); 289 nbuf.n_value = symp[i].st_value; 293 nbuf.n_type = N_UNDF; 296 nbuf.n_type = N_DATA; 299 nbuf.n_type = N_TEXT; 302 nbuf.n_type = N_FN; 306 nbuf.n_type |= N_EXT; 307 nbuf [all...] |
H A D | nlist_coff.c | 87 struct nlist nbuf; local 166 data.data = (u_char *)&nbuf; 167 data.size = sizeof(nbuf); 248 nbuf.n_value = val; 249 nbuf.n_type = N_EXT; /* XXX */ 250 nbuf.n_desc = 0; /* XXX */ 251 nbuf.n_other = 0; /* XXX */ 277 vma = nbuf.n_value; 338 data.data = (u_char *)&nbuf; 339 data.size = sizeof(nbuf); [all...] |
H A D | nlist_ecoff.c | 88 struct nlist nbuf; local 162 data.data = (u_char *)&nbuf; 163 data.size = sizeof(nbuf); 206 nbuf.n_value = esyms[i].es_value; 207 nbuf.n_type = N_EXT; /* XXX */ 208 nbuf.n_desc = 0; /* XXX */ 209 nbuf.n_other = 0; /* XXX */ 233 vma = nbuf.n_value; 262 data.data = (u_char *)&nbuf; 263 data.size = sizeof(nbuf); [all...] |
/netbsd-current/sys/arch/m68k/m68k/ |
H A D | regdump.c | 140 static char nbuf[9]; local 144 nbuf[0] = '\0'; 145 return(nbuf); 147 nbuf[len] = '\0'; 151 nbuf[i] = HEXDIGITS[x]; 154 return nbuf;
|
/netbsd-current/external/bsd/wpa/dist/src/utils/ |
H A D | wpabuf.c | 70 unsigned char *nbuf; local 72 nbuf = os_realloc(buf->buf, buf->used + add_len); 73 if (nbuf == NULL) 75 os_memset(nbuf + buf->used, 0, add_len); 76 buf->buf = nbuf; 79 nbuf = os_realloc(trace, sizeof(struct wpabuf_trace) + 82 if (nbuf == NULL) 84 trace = (struct wpabuf_trace *) nbuf; 86 os_memset(nbuf + sizeof(struct wpabuf_trace) + 90 nbuf [all...] |
/netbsd-current/tests/lib/libc/net/getaddrinfo/ |
H A D | h_gai.c | 114 char nbuf[14]; local 167 strncpy(nbuf, "(empty)", sizeof(nbuf)); 168 print1("arg:", &ai, p ? p : nbuf , q ? q : nbuf); 178 snprintf(nbuf, sizeof(nbuf), "ai%d:", i); 179 print1(nbuf, res, NULL, NULL);
|
/netbsd-current/external/bsd/nvi/dist/vi/ |
H A D | v_at.c | 48 char nbuf[20]; local 113 len = snprintf(nbuf, sizeof(nbuf), "%lu", vp->count); 114 CHAR2INT(sp, nbuf, len, wp, wlen);
|
/netbsd-current/usr.bin/ctags/ |
H A D | tree.c | 65 char nbuf[MAXTOKEN]; local 81 (void)snprintf(nbuf, sizeof(nbuf), "M%s", fp); 82 fp = strrchr(nbuf, '.'); 85 name = nbuf;
|
/netbsd-current/sys/arch/luna68k/stand/boot/ |
H A D | machdep.c | 191 static char nbuf[9]; local 196 nbuf[len] = '\0'; 200 nbuf[i] = x - 10 + 'A'; 202 nbuf[i] = x + '0'; 205 return nbuf;
|