Home
last modified time | relevance | path

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

1234

/netbsd-src/sbin/ifconfig/
H A Daf_inet.c112 char hbuf[NI_MAXHOST]; in in_alias() local
121 hbuf, sizeof(hbuf), NULL, 0, niflag)) in in_alias()
122 strlcpy(hbuf, "", sizeof(hbuf)); /* some message? */ in in_alias()
123 printf("\tinet %s", hbuf); in in_alias()
130 hbuf, sizeof(hbuf), NULL, 0, niflag)) in in_alias()
131 strlcpy(hbuf, "", sizeof(hbuf)); /* some message? */ in in_alias()
132 printf(" -> %s", hbuf); in in_alias()
140 hbuf, sizeof(hbuf), NULL, 0, niflag)) in in_alias()
141 strlcpy(hbuf, "", sizeof(hbuf)); /* some message? */ in in_alias()
142 printf(" broadcast %s", hbuf); in in_alias()
H A Daf_inet6.c266 char hbuf[NI_MAXHOST]; in in6_alias() local
275 hbuf, sizeof(hbuf), NULL, 0, niflag)) in in6_alias()
276 strlcpy(hbuf, "", sizeof(hbuf)); /* some message? */ in in6_alias()
277 printf("\tinet6 %s", hbuf); in in6_alias()
286 hbuf[0] = '\0'; in in6_alias()
288 hbuf, sizeof(hbuf), NULL, 0, niflag)) in in6_alias()
289 strlcpy(hbuf, "", sizeof(hbuf)); /* some message? */ in in6_alias()
290 printf(" -> %s", hbuf); in in6_alias()
H A Dutil.c245 char hbuf[NI_MAXHOST]; in print_link_addresses() local
287 hbuf, sizeof(hbuf), NULL, 0, in print_link_addresses()
289 hbuf[0] != '\0') { in print_link_addresses()
291 print_active_only ? "address:" : "link", hbuf); in print_link_addresses()
/netbsd-src/usr.sbin/traceroute6/
H A Dtraceroute6.c362 char hbuf[NI_MAXHOST], src0[NI_MAXHOST], *ep; in main() local
508 if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, in main()
509 sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) in main()
510 strlcpy(hbuf, "?", sizeof(hbuf)); in main()
512 hostname, hbuf); in main()
661 if (getnameinfo((struct sockaddr *)&Dst, Dst.sin6_len, hbuf, in main()
662 sizeof(hbuf), NULL, 0, NI_NUMERICHOST)) in main()
663 strlcpy(hbuf, "(invalid)", sizeof(hbuf)); in main()
665 fprintf(stderr, " to %s (%s)", hostname, hbuf); in main()
930 char hbuf[NI_MAXHOST]; in packet_ok() local
[all …]
/netbsd-src/external/mpl/dhcp/dist/common/
H A Dlpf.c148 print_hw_addr (info -> hw_address.hbuf [0],
150 &info -> hw_address.hbuf [1]),
170 print_hw_addr (info -> hw_address.hbuf [0],
172 &info -> hw_address.hbuf [1]),
219 if (info -> hw_address.hbuf [0] == HTYPE_IEEE802)
228 print_hw_addr (info -> hw_address.hbuf [0],
230 &info -> hw_address.hbuf [1]),
246 print_hw_addr (info -> hw_address.hbuf [0],
248 &info -> hw_address.hbuf [1]),
555 hw->hbuf[0] = HTYPE_ETHER; in get_hw_addr()
[all …]
H A Ddlpi.c231 info -> hw_address.hbuf [0] = HTYPE_ETHER;
235 info -> hw_address.hbuf [0] = HTYPE_IEEE802;
238 info -> hw_address.hbuf [0] = HTYPE_FDDI;
253 memcpy (info -> dlpi_broadcast_addr.hbuf,
290 memcpy (&info -> hw_address.hbuf [1],
373 print_hw_addr (info -> hw_address.hbuf [0],
375 &info -> hw_address.hbuf [1]),
403 print_hw_addr (info -> hw_address.hbuf [0],
405 &info -> hw_address.hbuf [1]),
492 print_hw_addr (info -> hw_address.hbuf [0],
[all …]
H A Dupf.c111 info -> hw_address.hbuf [0] = ARPHRD_ETHER;
112 memcpy (&info -> hw_address.hbuf [1], param.end_addr, 6);
132 print_hw_addr (info -> hw_address.hbuf [0],
134 &info -> hw_address.hbuf [1]),
150 print_hw_addr (info -> hw_address.hbuf [0],
152 &info -> hw_address.hbuf [1]),
219 print_hw_addr (info -> hw_address.hbuf [0],
221 &info -> hw_address.hbuf [1]),
235 print_hw_addr (info -> hw_address.hbuf [0],
237 &info -> hw_address.hbuf [1]),
H A Dbpf.c145 print_hw_addr (info -> hw_address.hbuf [0],
147 &info -> hw_address.hbuf [1]),
166 print_hw_addr (info -> hw_address.hbuf [0],
168 &info -> hw_address.hbuf [1]),
376 print_hw_addr (info -> hw_address.hbuf [0],
378 &info -> hw_address.hbuf [1]),
393 print_hw_addr (info -> hw_address.hbuf [0],
395 &info -> hw_address.hbuf [1]),
684 hw->hbuf[0] = HTYPE_ETHER; in get_hw_addr()
685 memcpy(&hw->hbuf[1], LLADDR(sa), sa->sdl_alen); in get_hw_addr()
[all …]
H A Dnit.c107 info -> hw_address.hbuf [0] = ARPHRD_ETHER;
108 memcpy (&info -> hw_address.hbuf [1],
147 print_hw_addr (info -> hw_address.hbuf [0],
149 &info -> hw_address.hbuf [1]),
166 print_hw_addr (info -> hw_address.hbuf [0],
168 &info -> hw_address.hbuf [1]),
254 print_hw_addr (info -> hw_address.hbuf [0],
256 &info -> hw_address.hbuf [1]),
272 print_hw_addr (info -> hw_address.hbuf [0],
274 &info -> hw_address.hbuf [1]),
H A Dethernet.c52 memcpy (eh.ether_dhost, &to -> hbuf [1],
57 memcpy (eh.ether_shost, &interface -> hw_address.hbuf [1],
86 memcpy (&from -> hbuf [1], eh.ether_shost, sizeof (eh.ether_shost));
87 from -> hbuf [0] = ARPHRD_ETHER;
H A Dfddi.c57 memcpy (fh.fddi_dhost, &to -> hbuf [1],
60 &interface -> hw_address.hbuf [1], sizeof (fh.fddi_shost));
86 from -> hbuf [0] = HTYPE_FDDI;
87 memcpy (&from -> hbuf [1], fh.fddi_shost, sizeof fh.fddi_shost);
/netbsd-src/lib/libc/net/
H A Drcmd.c99 static char hbuf[MAXHOSTNAMELEN]; in rcmd_af() local
126 strlcpy(hbuf, res->ai_canonname, sizeof(hbuf)); in rcmd_af()
127 *ahost = hbuf; in rcmd_af()
158 static char hbuf[MAXHOSTNAMELEN]; in orcmd_af() local
180 strlcpy(hbuf, res->ai_canonname, sizeof(hbuf)); in orcmd_af()
181 *ahost = hbuf; in orcmd_af()
244 char hbuf[NI_MAXHOST]; in resrcmd() local
247 hbuf[0] = '\0'; in resrcmd()
249 hbuf, (socklen_t)sizeof(hbuf), NULL, 0, niflags) != in resrcmd()
251 strlcpy(hbuf, "(invalid)", sizeof(hbuf)); in resrcmd()
[all …]
/netbsd-src/usr.bin/pr/
H A Dpr.c183 char *hbuf = NULL; in onecol() local
204 if ((hbuf = malloc((unsigned)(HDBUF + offst)*sizeof(char))) == NULL) in onecol()
207 ohbuf = hbuf + offst; in onecol()
214 (void)memset(hbuf, (int)' ', offst); in onecol()
256 prhead(hbuf, fname, pagecnt)) in onecol()
312 free(hbuf); in onecol()
345 char *hbuf = NULL; in vertcol() local
364 if ((hbuf = malloc((unsigned)(HDBUF + offst)*sizeof(char))) == NULL) in vertcol()
366 ohbuf = hbuf + offst; in vertcol()
368 (void)memset(hbuf, (int)' ', offst); in vertcol()
[all …]
/netbsd-src/lib/libwrap/
H A Dsocket.c63 static char hbuf[MAXHOSTNAMELEN + 1]; local
70 if (strchr(name, '.') == 0 || strlen(name) + 2 > sizeof(hbuf))
71 strlcpy(hbuf, name, sizeof(hbuf));
73 (void)snprintf(hbuf, sizeof(hbuf), "%s.", name);
74 return hbuf;
/netbsd-src/usr.sbin/rtadvd/
H A Ddump.c80 static char hbuf[NI_MAXHOST]; in ether_str() local
84 hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) in ether_str()
85 snprintf(hbuf, sizeof(hbuf), "<invalid>"); in ether_str()
87 snprintf(hbuf, sizeof(hbuf), "NONE"); in ether_str()
89 return(hbuf); in ether_str()
/netbsd-src/bin/dd/
H A Dmisc.c194 char hbuf[7], nbuf[32]; in dd_write_msg() local
222 if (humanize_number(hbuf, sizeof(hbuf), in dd_write_msg()
226 ADDS(hbuf); in dd_write_msg()
234 if (humanize_number(hbuf, sizeof(hbuf), in dd_write_msg()
238 ADDS(hbuf); ADDS("/sec"); in dd_write_msg()
/netbsd-src/usr.bin/netstat/
H A Dif.c469 char hbuf[NI_MAXHOST]; /* for getnameinfo() */ in ia6_print() local
477 if (getnameinfo((struct sockaddr *)&as6, as6.sin6_len, hbuf, in ia6_print()
478 sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) { in ia6_print()
479 strlcpy(hbuf, "??", sizeof(hbuf)); in ia6_print()
482 n = strlen(hbuf) < 17 ? 17 : strlen(hbuf); in ia6_print()
485 printf("\n%25s %-*.*s ", "", n, n, hbuf); in ia6_print()
519 char hbuf[NI_MAXHOST]; /* for getnameinfo() */ in print_addr() local
596 hbuf, sizeof(hbuf), NULL, 0, in print_addr()
598 strlcpy(hbuf, "?", sizeof(hbuf)); in print_addr()
600 cp = hbuf; in print_addr()
[all …]
/netbsd-src/usr.bin/systat/
H A Dnetcmds.c365 char hbuf[NI_MAXHOST]; in showhosts() local
376 if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), NULL, 0, in showhosts()
378 strlcpy(hbuf, "(invalid)", sizeof(hbuf)); in showhosts()
381 printw("%s ", hbuf); in showhosts()
/netbsd-src/usr.sbin/trpt/
H A Dtrpt.c393 char hbuf[MAXHOSTNAMELEN]; in tcp_trace() local
438 hbuf, sizeof(hbuf)); in tcp_trace()
440 hbuf, ntohs(th->th_sport)); in tcp_trace()
448 hbuf, sizeof(hbuf)); in tcp_trace()
450 hbuf, ntohs(th->th_dport)); in tcp_trace()
/netbsd-src/external/bsd/mdocml/dist/
H A Dtbl_html.c120 char hbuf[32], vbuf[32]; in print_tbl() local
190 (void)snprintf(hbuf, sizeof(hbuf), in print_tbl()
192 hspans = hbuf; in print_tbl()
/netbsd-src/libexec/rexecd/
H A Drexecd.c128 char hbuf[NI_MAXHOST]; in main() local
129 if (getnameinfo((struct sockaddr *)&from, fromlen, hbuf, in main()
130 sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) { in main()
131 (void)strlcpy(hbuf, "invalid", sizeof(hbuf)); in main()
136 hbuf); in main()
/netbsd-src/usr.bin/last/
H A Dwant.c46 static char hbuf[512]; in gethost()
47 hbuf[0] = '\0'; in gethost()
48 (void)sockaddr_snprintf(hbuf, sizeof(hbuf), "%a", in gethost()
50 return hbuf; in gethost()
/netbsd-src/sbin/canconfig/
H A Dcanconfig.c358 char hbuf[8]; in show_timings() local
371 humanize_number(hbuf, sizeof(hbuf), cltc.cltc_clock_freq, "Hz", in show_timings()
376 prefix, hbuf, in show_timings()
396 humanize_number(hbuf, sizeof(hbuf), bps, "bps", in show_timings()
398 printf(", %s", hbuf); in show_timings()
/netbsd-src/share/examples/refuse/ian/libfetch/
H A Dhttp.c815 char hbuf[MAXHOSTNAMELEN + 7], *host; in _http_request() local
863 snprintf(hbuf, sizeof(hbuf), "[%s]", url->host); in _http_request()
864 host = hbuf; in _http_request()
868 if (host != hbuf) { in _http_request()
869 strcpy(hbuf, host); in _http_request()
870 host = hbuf; in _http_request()
872 snprintf(hbuf + strlen(hbuf), in _http_request()
873 sizeof(hbuf) - strlen(hbuf), ":%d", url->port); in _http_request()
/netbsd-src/usr.sbin/lpr/common_source/
H A Dcommon.c139 char hbuf[NI_MAXSERV], *ptr; in getport() local
148 (void)strlcpy(hbuf, rhost, sizeof(hbuf)); in getport()
149 for (ptr = hbuf; *ptr; ptr++) in getport()
152 port = hbuf; in getport()

1234