Home
last modified time | relevance | path

Searched refs:hbuf (Results 1 – 25 of 68) sorted by relevance

123

/openbsd/lib/libc/net/
H A Drcmd.c63 static char hbuf[HOST_NAME_MAX+1]; in rcmd_af() local
108 strlcpy(hbuf, res->ai_canonname, sizeof(hbuf)); in rcmd_af()
109 *ahost = hbuf; in rcmd_af()
149 char hbuf[NI_MAXHOST]; in rcmd_af() local
152 hbuf[0] = '\0'; in rcmd_af()
154 hbuf, sizeof(hbuf), NULL, 0, niflags) != 0) in rcmd_af()
155 strlcpy(hbuf, "(invalid)", sizeof hbuf); in rcmd_af()
160 hbuf[0] = '\0'; in rcmd_af()
162 hbuf, sizeof(hbuf), NULL, 0, niflags) != 0) in rcmd_af()
163 strlcpy(hbuf, "(invalid)", sizeof hbuf); in rcmd_af()
[all …]
H A Drcmdsh.c59 static char hbuf[HOST_NAME_MAX+1]; in rcmdsh() local
84 strlcpy(hbuf, res->ai_canonname, sizeof(hbuf)); in rcmdsh()
85 *ahost = hbuf; in rcmdsh()
/openbsd/usr.sbin/slaacctl/
H A Dslaacctl.c187 char hbuf[NI_MAXHOST], whenbuf[255]; in show_interface_msg() local
205 cei->ll_address.sin6_len, hbuf, sizeof(hbuf), NULL, 0, in show_interface_msg()
208 printf("\t inet6: %s\n", hbuf); in show_interface_msg()
214 cei_ra->from.sin6_len, hbuf, sizeof(hbuf), NULL, 0, in show_interface_msg()
225 printf("\tRouter Advertisement from %s\n", hbuf); in show_interface_msg()
266 cei_addr_proposal->addr.sin6_len, hbuf, sizeof(hbuf), in show_interface_msg()
296 printf("\t\t%s, %s/%u\n", hbuf, inet_ntop(AF_INET6, in show_interface_msg()
307 cei_dfr_proposal->addr.sin6_len, hbuf, sizeof(hbuf), in show_interface_msg()
313 printf("\t\trouter: %s\n", hbuf); in show_interface_msg()
339 cei_rdns_proposal->from.sin6_len, hbuf, sizeof(hbuf), in show_interface_msg()
[all …]
/openbsd/usr.bin/finger/
H A Dnet.c56 char hbuf[NI_MAXHOST]; in netfinger() local
93 if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), in netfinger()
95 strlcpy(hbuf, "(invalid)", sizeof hbuf); in netfinger()
97 (void)printf("[%s/%s]\n", host, hbuf); in netfinger()
/openbsd/usr.sbin/bgpd/
H A Dmrt.c518 ibuf_close(&mrt->wbuf, hbuf); in mrt_dump_entry_mp()
526 ibuf_free(hbuf); in mrt_dump_entry_mp()
611 ibuf_close(&mrt->wbuf, hbuf); in mrt_dump_entry()
618 ibuf_free(hbuf); in mrt_dump_entry()
758 ibuf_close(&mrt->wbuf, hbuf); in mrt_dump_entry_v2()
760 hbuf = NULL; in mrt_dump_entry_v2()
777 ibuf_close(&mrt->wbuf, hbuf); in mrt_dump_entry_v2()
779 hbuf = NULL; in mrt_dump_entry_v2()
789 ibuf_free(hbuf); in mrt_dump_entry_v2()
854 ibuf_close(&mrt->wbuf, hbuf); in mrt_dump_v2_hdr()
[all …]
/openbsd/usr.sbin/radiusd/
H A Dutil.c84 char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; in addrport_tostring() local
87 if (getnameinfo(sa, salen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), in addrport_tostring()
93 ret = snprintf(buf, lbuf, "[%s]:%s", hbuf, sbuf); in addrport_tostring()
97 ret = snprintf(buf, lbuf, "%s:%s", hbuf, sbuf); in addrport_tostring()
/openbsd/sbin/isakmpd/
H A Dnat_traversal.c255 u_int8_t *hbuf, *buf; in nat_t_add_nat_d() local
258 hbuf = nat_t_generate_nat_d_hash(msg, sa, &hbuflen); in nat_t_add_nat_d()
259 if (!hbuf) { in nat_t_add_nat_d()
269 free(hbuf); in nat_t_add_nat_d()
274 memcpy(buf + ISAKMP_NAT_D_DATA_OFF, hbuf, hbuflen); in nat_t_add_nat_d()
275 free(hbuf); in nat_t_add_nat_d()
315 u_int8_t *hbuf; in nat_t_match_nat_d_payload() local
327 hbuf = nat_t_generate_nat_d_hash(msg, sa, &hbuflen); in nat_t_match_nat_d_payload()
328 if (!hbuf) in nat_t_match_nat_d_payload()
336 if (memcmp(p->p + ISAKMP_NAT_D_DATA_OFF, hbuf, hbuflen) == 0) { in nat_t_match_nat_d_payload()
[all …]
/openbsd/usr.sbin/npppd/npppd/
H A Dnpppd_radius.c203 char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; in npppd_ppp_radius_acct_reqcb() local
206 if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), in npppd_ppp_radius_acct_reqcb()
209 strlcpy(hbuf, "unknown", sizeof(hbuf)); in npppd_ppp_radius_acct_reqcb()
214 ppp_id, hbuf, sbuf); in npppd_ppp_radius_acct_reqcb()
436 char hbuf[NI_MAXHOST], buf[128]; in pptp_put_tunnel_attributes() local
458 sizeof(hbuf), NULL, 0, NI_NUMERICHOST)) in pptp_put_tunnel_attributes()
460 ATTR_STR(RADIUS_TYPE_TUNNEL_CLIENT_ENDPOINT, hbuf); in pptp_put_tunnel_attributes()
464 sizeof(hbuf), NULL, 0, NI_NUMERICHOST)) in pptp_put_tunnel_attributes()
492 char hbuf[NI_MAXHOST], buf[128]; in l2tp_put_tunnel_attributes() local
514 sizeof(hbuf), NULL, 0, NI_NUMERICHOST)) in l2tp_put_tunnel_attributes()
[all …]
/openbsd/usr.bin/pr/
H A Dpr.c191 char *hbuf = NULL; in onecol() local
216 ohbuf = hbuf + offst; in onecol()
333 free(hbuf); in onecol()
368 char *hbuf = NULL; in vertcol() local
390 ohbuf = hbuf + offst; in vertcol()
660 free(hbuf); in vertcol()
687 char *hbuf = NULL; in horzcol() local
706 ohbuf = hbuf + offst; in horzcol()
824 free(hbuf); in horzcol()
910 char *hbuf = NULL; in mulfile() local
[all …]
/openbsd/usr.bin/dig/lib/dns/rdata/generic/
H A Dloc_29.c40 char hbuf[sizeof("90000000m")]; in totext_loc() local
70 snprintf(hbuf, sizeof(hbuf), in totext_loc()
73 snprintf(hbuf, sizeof(hbuf), in totext_loc()
138 sbuf, hbuf, vbuf); in totext_loc()
/openbsd/usr.sbin/npppd/common/
H A Dnet_utils.c145 char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; in addrport_tostring() local
147 if (getnameinfo(sa, salen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), in addrport_tostring()
154 strlcat(buf, hbuf, lbuf); in addrport_tostring()
159 strlcpy(buf, hbuf, lbuf); in addrport_tostring()
/openbsd/usr.sbin/traceroute/
H A Dtraceroute.c303 char hbuf[NI_MAXHOST]; in main() local
639 if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, in main()
640 sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) in main()
641 strlcpy(hbuf, "?", sizeof(hbuf)); in main()
643 "addresses; using %s", hostname, hbuf); in main()
867 if (getnameinfo(to, to->sa_len, hbuf, in main()
868 sizeof(hbuf), NULL, 0, NI_NUMERICHOST)) in main()
869 strlcpy(hbuf, "(invalid)", sizeof(hbuf)); in main()
915 char hbuf[NI_MAXHOST]; in sock_read() local
947 &ip->ip_dst, hbuf, sizeof(hbuf)), &tr_results[recv_seq]); in sock_read()
[all …]
H A Dworker.c580 char hbuf[NI_MAXHOST]; in packet_ok6() local
586 hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) in packet_ok6()
587 strlcpy(hbuf, "invalid", sizeof(hbuf)); in packet_ok6()
589 hbuf); in packet_ok6()
680 char hbuf[NI_MAXHOST]; in print() local
683 tr_res->hbuf, sizeof(tr_res->hbuf), NULL, 0, NI_NUMERICHOST) != 0) in print()
684 strlcpy(tr_res->hbuf, "invalid", sizeof(hbuf)); in print()
1115 if (*tr_results[i].hbuf != '\0') { in print_result_row()
1121 tr_results[i].hbuf : in print_result_row()
1123 tr_results[i].hbuf); in print_result_row()
[all …]
/openbsd/sbin/dhcpleased/
H A Dprintconf.c104 char hbuf[INET_ADDRSTRLEN]; in print_config() local
124 hbuf, sizeof(hbuf)) == NULL) in print_config()
126 printf("\tignore %s\n", hbuf); in print_config()
/openbsd/usr.sbin/httpd/
H A Dserver_fcgi.c97 char hbuf[HOST_NAME_MAX+1]; in server_fcgi() local
113 memset(hbuf, 0, sizeof(hbuf)); in server_fcgi()
285 (void)print_host(&clt->clt_ss, hbuf, sizeof(hbuf)); in server_fcgi()
286 if (fcgi_add_param(&param, "REMOTE_ADDR", hbuf, clt) == -1) { in server_fcgi()
291 (void)snprintf(hbuf, sizeof(hbuf), "%d", ntohs(clt->clt_port)); in server_fcgi()
292 if (fcgi_add_param(&param, "REMOTE_PORT", hbuf, clt) == -1) { in server_fcgi()
323 (void)print_host(&clt->clt_srv_ss, hbuf, sizeof(hbuf)); in server_fcgi()
324 if (fcgi_add_param(&param, "SERVER_ADDR", hbuf, clt) == -1) { in server_fcgi()
329 (void)snprintf(hbuf, sizeof(hbuf), "%d", in server_fcgi()
331 if (fcgi_add_param(&param, "SERVER_PORT", hbuf, clt) == -1) { in server_fcgi()
/openbsd/usr.sbin/acme-client/
H A Dhttp.c42 char *hbuf; /* header transfer buffer */ member
384 free(x->hbuf); in http_close()
515 if ((buf = strdup(trans->hbuf)) == NULL) { in http_head_parse()
599 return trans->hbuf; in http_head_read()
620 pp = recallocarray(trans->hbuf, in http_head_read()
626 trans->hbuf = pp; in http_head_read()
627 memcpy(trans->hbuf + trans->hbufsz, buf, ssz); in http_head_read()
630 ep = memmem(trans->hbuf, trans->hbufsz, "\r\n\r\n", 4); in http_head_read()
646 if (strlen(trans->hbuf) != (uintptr_t)(ep - trans->hbuf)) { in http_head_read()
656 trans->bbufsz = (trans->hbuf + trans->hbufsz) - ep; in http_head_read()
[all …]
/openbsd/usr.sbin/ocspcheck/
H A Dhttp.c41 char *hbuf; /* header transfer buffer */ member
376 free(x->hbuf); in http_close()
509 if ((buf = strdup(trans->hbuf)) == NULL) { in http_head_parse()
593 return trans->hbuf; in http_head_read()
614 pp = realloc(trans->hbuf, trans->hbufsz + ssz); in http_head_read()
619 trans->hbuf = pp; in http_head_read()
620 memcpy(trans->hbuf + trans->hbufsz, buf, ssz); in http_head_read()
623 ep = memmem(trans->hbuf, trans->hbufsz, "\r\n\r\n", 4); in http_head_read()
639 if (strlen(trans->hbuf) != (uintptr_t)(ep - trans->hbuf)) { in http_head_read()
649 trans->bbufsz = (trans->hbuf + trans->hbufsz) - ep; in http_head_read()
[all …]
/openbsd/sbin/slaacd/
H A Dengine.c1380 const char *hbuf; in parse_ra() local
1391 hbuf); in parse_ra()
1407 hbuf); in parse_ra()
1428 hbuf); in parse_ra()
1686 const char *hbuf; in debug_log_ra() local
1698 hbuf); in debug_log_ra()
1712 hbuf); in debug_log_ra()
1718 hbuf); in debug_log_ra()
2155 const char *hbuf; in gen_address_proposal() local
2248 const char *hbuf; in gen_dfr_proposal() local
[all …]
/openbsd/usr.sbin/ldpd/
H A Dprintconf.c200 char hbuf[NI_MAXHOST]; in print_auth() local
203 hbuf, sizeof(hbuf)) == NULL) in print_auth()
206 printf(" %s", hbuf); in print_auth()
/openbsd/libexec/ld.so/
H A Dlibrary.c108 char hbuf[4096], *exec_start = 0; in _dl_tryload_shlib() local
144 _dl_read(libfile, hbuf, sizeof(hbuf)); in _dl_tryload_shlib()
145 ehdr = (Elf_Ehdr *)hbuf; in _dl_tryload_shlib()
161 phdp = (Elf_Phdr *)(hbuf + ehdr->e_phoff); in _dl_tryload_shlib()
224 phdp = (Elf_Phdr *)(hbuf + ehdr->e_phoff); in _dl_tryload_shlib()
H A Dlibrary_mquery.c116 char hbuf[4096], *exec_start; in _dl_tryload_shlib() local
147 _dl_read(libfile, hbuf, sizeof(hbuf)); in _dl_tryload_shlib()
148 ehdr = (Elf_Ehdr *)hbuf; in _dl_tryload_shlib()
171 phdp = (Elf_Phdr *)(hbuf + ehdr->e_phoff); in _dl_tryload_shlib()
312 phdp = (Elf_Phdr *)(hbuf + ehdr->e_phoff); in _dl_tryload_shlib()
/openbsd/usr.bin/telnet/
H A Dcommands.c1443 char hbuf[HOST_NAME_MAX+1]; in env_init() local
1446 gethostname(hbuf, sizeof hbuf); in env_init()
1448 if (asprintf (&cp, "%s%s", hbuf, cp2) == -1) in env_init()
1826 char hbuf[NI_MAXHOST]; in tn() local
1828 if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), in tn()
1830 strlcpy(hbuf, "(invalid)", sizeof(hbuf)); in tn()
1832 printf("Trying %s...\r\n", hbuf); in tn()
1876 char hbuf[NI_MAXHOST]; in tn() local
1878 if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), in tn()
1880 strlcpy(hbuf, "(invalid)", sizeof(hbuf)); in tn()
[all …]
/openbsd/usr.sbin/npppd/l2tp/
H A Dl2tpd.c264 char hbuf[NI_MAXHOST + NI_MAXSERV + 16]; in l2tpd_listener_start() local
298 _this->bind.sin6.sin6_len, hbuf, sizeof(hbuf))); in l2tpd_listener_start()
394 _this->bind.sin6.sin6_len, hbuf, sizeof(hbuf)), _this->tun_name); in l2tpd_listener_start()
436 char hbuf[NI_MAXHOST + NI_MAXSERV + 16]; in l2tpd_listener_stop() local
444 _this->bind.sin6.sin6_len, hbuf, sizeof(hbuf))); in l2tpd_listener_stop()
/openbsd/usr.bin/mandoc/
H A Dtbl_html.c122 char hbuf[4], vbuf[4]; in print_tbl() local
194 (void)snprintf(hbuf, sizeof(hbuf), in print_tbl()
196 hspans = hbuf; in print_tbl()
/openbsd/usr.sbin/trpt/
H A Dtrpt.c312 char hbuf[INET6_ADDRSTRLEN]; in tcp_trace() local
334 hbuf, sizeof(hbuf)), ntohs(ti->ti_sport)); in tcp_trace()
337 hbuf, sizeof(hbuf)), ntohs(ti->ti_dport)); in tcp_trace()

123