| /openbsd-src/usr.sbin/eigrpd/ |
| H A D | rtp.c | 29 static struct pbuf *rtp_buf_new(struct ibuf *); 30 static struct pbuf *rtp_buf_hold(struct pbuf *); 31 static void rtp_buf_release(struct pbuf *); 32 static struct packet *rtp_packet_new(struct nbr *, uint32_t, struct pbuf *); 40 static struct pbuf * 43 struct pbuf *pbuf; in rtp_buf_new() local 45 if ((pbuf = calloc(1, sizeof(*pbuf))) == NULL) in rtp_buf_new() 47 pbuf->buf = buf; in rtp_buf_new() 49 return (pbuf); in rtp_buf_new() 52 static struct pbuf * [all …]
|
| /openbsd-src/usr.sbin/tcpdump/ |
| H A D | print-etherip.c | 62 const u_char *pbuf = bp; in etherip_print() local 73 switch (*pbuf >> 4) { in etherip_print() 97 pbuf += hlen; in etherip_print() 102 ether_print(pbuf, len); in etherip_print() 103 eh = (struct ether_header *)pbuf; in etherip_print() 108 etype = EXTRACT_16BITS(pbuf + offsetof(struct ether_header, ether_type)); in etherip_print() 109 pbuf += sizeof(struct ether_header); in etherip_print() 116 if (llc_print(pbuf, len, plen, ESRC(eh), EDST(eh)) == 0) { in etherip_print() 124 default_print(pbuf, plen); in etherip_print() 126 } else if (ether_encap_print(etype, pbuf, len, plen) == 0) { in etherip_print() [all …]
|
| /openbsd-src/lib/libcrypto/asn1/ |
| H A D | bio_ndef.c | 100 static int ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg); 101 static int ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg); 102 static int ndef_suffix(BIO *b, unsigned char **pbuf, int *plen, void *parg); 103 static int ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg); 174 ndef_prefix(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_prefix() argument 189 *pbuf = p; in ndef_prefix() 194 *plen = *ndef_aux->boundary - *pbuf; in ndef_prefix() 200 ndef_prefix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_prefix_free() argument 210 *pbuf = NULL; in ndef_prefix_free() 217 ndef_suffix_free(BIO *b, unsigned char **pbuf, int *plen, void *parg) in ndef_suffix_free() argument [all …]
|
| /openbsd-src/usr.sbin/smtpd/ |
| H A D | mda_variables.c | 242 char tmpbuf[EXPAND_BUFFER], *ptmp, *pbuf, *ebuf; in mda_expand_format() local 254 pbuf = buf; in mda_expand_format() 259 if (strncmp(pbuf, "~/", 2) == 0) { in mda_expand_format() 268 pbuf += 2; in mda_expand_format() 272 for (; *pbuf && ret < sizeof tmpbuf; ret += tmpret) { in mda_expand_format() 273 if (*pbuf == '%' && *(pbuf + 1) == '%') { in mda_expand_format() 274 *ptmp++ = *pbuf++; in mda_expand_format() 275 pbuf += 1; in mda_expand_format() 280 if (*pbuf != '%' || *(pbuf + 1) != '{') { in mda_expand_format() 281 *ptmp++ = *pbuf++; in mda_expand_format() [all …]
|
| H A D | aliases.c | 38 char *pbuf; in aliases_get() local 46 pbuf = strchr(buf, *env->sc_subaddressing_delim); in aliases_get() 47 if (pbuf) { in aliases_get() 53 *pbuf = '\0'; in aliases_get() 89 char *pbuf; in aliases_virtual_get() local 106 pbuf = strchr(user, *env->sc_subaddressing_delim); in aliases_virtual_get() 107 if (pbuf) { in aliases_virtual_get() 108 if (!bsnprintf(tag, sizeof(tag), "%s", pbuf + 1)) in aliases_virtual_get() 111 *pbuf = '\0'; in aliases_virtual_get()
|
| /openbsd-src/usr.sbin/makefs/ |
| H A D | msdos.c | 170 char pbuf[PATH_MAX]; in msdos_populate_dir() local 177 if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s", path, in msdos_populate_dir() 178 cur->name) >= sizeof(pbuf)) { in msdos_populate_dir() 179 warnx("path %s too long", pbuf); in msdos_populate_dir() 199 if ((de = msdosfs_mkdire(pbuf, dir, cur)) == NULL) { in msdos_populate_dir() 200 warn("msdosfs_mkdire %s", pbuf); in msdos_populate_dir() 203 if (msdos_populate_dir(pbuf, de, cur->child, cur, in msdos_populate_dir() 205 warn("msdos_populate_dir %s", pbuf); in msdos_populate_dir() 214 if (msdosfs_mkfile(pbuf, dir, cur) == NULL) { in msdos_populate_dir() 215 warn("msdosfs_mkfile %s", pbuf); in msdos_populate_dir()
|
| /openbsd-src/lib/libskey/ |
| H A D | skeylogin.c | 422 char secret[SKEY_MAX_SEED_LEN], pbuf[SKEY_MAX_PW_LEN+1], *p, *u; in skey_fakeprompt() local 432 if (gethostname(pbuf, sizeof(pbuf)) == -1) in skey_fakeprompt() 433 *(p = pbuf) = '.'; in skey_fakeprompt() 435 for (p = pbuf; isalnum((unsigned char)*p); p++) in skey_fakeprompt() 439 if (*p && p - pbuf < 4) in skey_fakeprompt() 440 (void)strncpy(p, "asjd", 4 - (p - pbuf)); in skey_fakeprompt() 441 pbuf[4] = '\0'; in skey_fakeprompt() 469 pbuf[i] = (ptr % 10) + '0'; in skey_fakeprompt() 472 pbuf[i] = '\0'; in skey_fakeprompt() 481 skey_get_algorithm(), ptr, SKEY_MAX_SEED_LEN, pbuf); in skey_fakeprompt() [all …]
|
| /openbsd-src/usr.sbin/dhcpd/ |
| H A D | inet.c | 157 static char pbuf[32]; in piaddr() local 161 strlcpy(pbuf, "<null address>", sizeof(pbuf)); in piaddr() 163 s = inet_ntop(AF_INET, &addr.iabuf, pbuf, sizeof pbuf); in piaddr() 165 strlcpy(pbuf, "<invalid address>", sizeof(pbuf)); in piaddr() 167 return (pbuf); in piaddr()
|
| /openbsd-src/lib/libc/stdio/ |
| H A D | open_memstream.c | 31 char **pbuf; /* point to the stream */ member 56 *st->pbuf = st->string = p; in memstream_write() 113 open_memstream(char **pbuf, size_t *psize) in open_memstream() argument 118 if (pbuf == NULL || psize == NULL) { in open_memstream() 140 st->pbuf = pbuf; in open_memstream() 143 *pbuf = st->string; in open_memstream()
|
| H A D | open_wmemstream.c | 32 wchar_t **pbuf; /* point to the stream */ member 58 *st->pbuf = st->string = p; in wmemstream_write() 123 open_wmemstream(wchar_t **pbuf, size_t *psize) in open_wmemstream() argument 128 if (pbuf == NULL || psize == NULL) { in open_wmemstream() 150 st->pbuf = pbuf; in open_wmemstream() 154 *pbuf = st->string; in open_wmemstream()
|
| /openbsd-src/usr.bin/dig/lib/isc/ |
| H A D | sockaddr.c | 109 char pbuf[sizeof("65000")]; in isc_sockaddr_totext() local 123 snprintf(pbuf, sizeof(pbuf), "%u", ntohs(sin->sin_port)); in isc_sockaddr_totext() 127 snprintf(pbuf, sizeof(pbuf), "%u", ntohs(sin6->sin6_port)); in isc_sockaddr_totext() 133 plen = strlen(pbuf); in isc_sockaddr_totext() 134 INSIST(plen < sizeof(pbuf)); in isc_sockaddr_totext() 147 isc_buffer_putmem(target, (const unsigned char *)pbuf, plen); in isc_sockaddr_totext()
|
| /openbsd-src/sys/dev/ |
| H A D | softraid_raid6.c | 81 void *pbuf; member 383 void *pbuf, *data, *qbuf; in sr_raid6_rw() local 568 pbuf = sr_block_get(sd, length); in sr_raid6_rw() 569 if (pbuf == NULL) in sr_raid6_rw() 575 sr_raid6_xorp(pbuf, data, length); in sr_raid6_rw() 580 SCSI_DATA_IN, 0, pbuf, qbuf, gf_pow[chunk])) in sr_raid6_rw() 585 SCSI_DATA_IN, 0, pbuf, NULL, 0)) in sr_raid6_rw() 599 if (sr_raid6_addio(wu, pchunk, lba, length, pbuf, in sr_raid6_rw() 674 if (pq->pbuf) in sr_raid6_intr() 676 sr_raid6_xorp(pq->pbuf, ccb->ccb_buf.b_data, in sr_raid6_intr() [all …]
|
| /openbsd-src/lib/libcrypto/evp/ |
| H A D | evp_pbe.c | 244 const unsigned char *pbuf; in PKCS5_PBE_keyivgen() local 259 pbuf = param->value.sequence->data; in PKCS5_PBE_keyivgen() 260 if (!(pbe = d2i_PBEPARAM(NULL, &pbuf, param->value.sequence->length))) { in PKCS5_PBE_keyivgen() 422 const unsigned char *pbuf; in PKCS5_v2_PBE_keyivgen() local 434 pbuf = param->value.sequence->data; in PKCS5_v2_PBE_keyivgen() 436 if (!(pbe2 = d2i_PBE2PARAM(NULL, &pbuf, plen))) { in PKCS5_v2_PBE_keyivgen() 510 const unsigned char *pbuf; in PKCS5_v2_PBKDF2_keyivgen() local 535 pbuf = param->value.sequence->data; in PKCS5_v2_PBKDF2_keyivgen() 538 if (!(kdf = d2i_PBKDF2PARAM(NULL, &pbuf, plen)) ) { in PKCS5_v2_PBKDF2_keyivgen() 605 const unsigned char *pbuf; in PKCS12_PBE_keyivgen() local [all …]
|
| /openbsd-src/games/hack/ |
| H A D | hack.topl.c | 212 char pbuf[BUFSZ]; in vpline() local 213 char *bp = pbuf, *tl; in vpline() 217 (void) vsnprintf(pbuf, sizeof pbuf, line, ap); in vpline() 218 if(flags.toplin == 1 && !strcmp(pbuf, toplines)) return; in vpline()
|
| /openbsd-src/regress/lib/libcrypto/bio/ |
| H A D | bio_mem.c | 34 BUF_MEM *pbuf; in bio_mem_test() local 72 if (!BIO_get_mem_ptr(bio, &pbuf)) { in bio_mem_test() 76 if (pbuf->length != data_len) { in bio_mem_test() 78 pbuf->length, data_len); in bio_mem_test() 81 if (memcmp(pbuf->data, data, data_len) != 0) { in bio_mem_test() 85 pbuf = NULL; in bio_mem_test()
|
| /openbsd-src/lib/libc/net/ |
| H A D | ruserok.c | 92 char pbuf[PATH_MAX], pwbuf[_PW_BUF_LEN]; in iruserok_sa() local 113 len = snprintf(pbuf, sizeof pbuf, "%s/.rhosts", pwd->pw_dir); in iruserok_sa() 114 if (len < 0 || len >= sizeof pbuf) in iruserok_sa() 124 hostf = fopen(pbuf, "re"); in iruserok_sa() 134 if (lstat(pbuf, &sbuf) == -1) in iruserok_sa()
|
| H A D | rcmd.c | 64 char pbuf[NI_MAXSERV]; in rcmd_af() local 96 snprintf(pbuf, sizeof(pbuf), "%u", ntohs(rport)); in rcmd_af() 101 error = getaddrinfo(*ahost, pbuf, &hints, &res); in rcmd_af()
|
| /openbsd-src/usr.bin/awk/ |
| H A D | lib.c | 139 int getrec(char **pbuf, int *pbufsize, bool isrecord) /* get next input record */ in getrec() argument 142 char *buf = *pbuf; in getrec() 197 *pbuf = buf; in getrec() 208 *pbuf = buf; in getrec() 221 extern int readcsvrec(char **pbuf, int *pbufsize, FILE *inf, bool newflag); 223 int readrec(char **pbuf, int *pbufsize, FILE *inf, bool newflag) /* read one record into buf */ in readrec() argument 226 char *rr = *pbuf, *buf = *pbuf; in readrec() 280 *pbuf = buf; in readrec() 294 int readcsvrec(char **pbuf, in argument [all...] |
| /openbsd-src/gnu/usr.bin/binutils/gdb/ |
| H A D | aix-thread.c | 671 struct pd_thread *pbuf; in sync_threadlists() local 681 pbuf = (struct pd_thread *) xmalloc (psize * sizeof *pbuf); in sync_threadlists() 696 pbuf = (struct pd_thread *) xrealloc (pbuf, in sync_threadlists() 697 psize * sizeof *pbuf); in sync_threadlists() 699 pbuf[pcount].pdtid = pdtid; in sync_threadlists() 700 pbuf[pcount].pthid = pthid; in sync_threadlists() 706 status = pthdb_pthread_tid (pd_session, pbuf[pi].pdtid, &tid); in sync_threadlists() 709 pbuf[pi].tid = tid; in sync_threadlists() 712 qsort (pbuf, pcount, sizeof *pbuf, pcmp); in sync_threadlists() 734 thread = add_thread (BUILD_THREAD (pbuf[pi].pthid, infpid)); in sync_threadlists() [all …]
|
| /openbsd-src/usr.sbin/lpr/common_source/ |
| H A D | common.c | 119 char pbuf[NI_MAXSERV]; in getport() local 130 snprintf(pbuf, sizeof(pbuf), "%d", rport); in getport() 132 snprintf(pbuf, sizeof(pbuf), "printer"); in getport() 134 error = getaddrinfo(rhost, pbuf, &hints, &res); in getport()
|
| /openbsd-src/libexec/login_passwd/ |
| H A D | login_passwd.c | 58 char response[1024], pbuf[1024], *pass = ""; in main() local 150 pass = readpassphrase("Password:", pbuf, sizeof(pbuf), in main()
|
| /openbsd-src/sbin/isakmpd/ |
| H A D | vendor.c | 112 u_int8_t *pbuf = p->p; in check_vendor_openbsd() local 121 vlen = GET_ISAKMP_GEN_LENGTH(pbuf) - ISAKMP_GEN_SZ; in check_vendor_openbsd() 131 if (memcmp(openbsd_vendor_cap[i].hash, pbuf + ISAKMP_GEN_SZ, in check_vendor_openbsd()
|
| /openbsd-src/sys/dev/pci/ |
| H A D | neo.c | 138 u_int32_t buftop, pbuf, rbuf, cbuf, acbuf; member 396 return (nm_rd(sc, NM_PBUFFER_CURRP, 4) - sc->pbuf); in nmchan_getptr() 419 nm_wr(sc, NM_PBUFFER_WMARK, sc->pbuf + sc->pwmark, 4); in neo_intr() 514 sc->pbuf = sc->rbuf - NM_BUFFSIZE; in nm_init() 515 sc->acbuf = sc->pbuf - (NM_TOTAL_COEFF_COUNT * 4); in nm_init() 800 nm_wr(sc, NM_PBUFFER_START, sc->pbuf, 4); in neo_trigger_output() 801 nm_wr(sc, NM_PBUFFER_END, sc->pbuf + sc->pbufsize - ssz, 4); in neo_trigger_output() 802 nm_wr(sc, NM_PBUFFER_CURRP, sc->pbuf, 4); in neo_trigger_output() 803 nm_wr(sc, NM_PBUFFER_WMARK, sc->pbuf + sc->pwmark, 4); in neo_trigger_output() 900 rv = (char *)sc->bufioh + sc->pbuf; in neo_malloc()
|
| /openbsd-src/usr.sbin/mopd/otherOS/ |
| H A D | pf-snit.c | 317 struct strbuf pbuf, dbuf; local 324 pbuf.len = sizeof(struct sockaddr); 325 pbuf.buf = (char *) &sa; 331 if (putmsg(fd, &pbuf, &dbuf, 0) == 0)
|
| /openbsd-src/lib/libcrypto/ec/ |
| H A D | ec_print.c | |