| /netbsd/src/external/bsd/ntp/dist/sntp/ |
| D | kod_management.c | 25 const char *hostname, in search_entry() argument 32 if (!strcmp(kod_db[a]->hostname, hostname)) in search_entry() 44 if (!strcmp(kod_db[a]->hostname, hostname)) { in search_entry() 55 const char * hostname, in add_entry() argument 66 strlcpy(pke->hostname, hostname, sizeof(pke->hostname)); in add_entry() 72 if (strcmp(kod_db[n]->hostname, pke->hostname) >= 0) in add_entry() 76 0 == strcmp(kod_db[n]->hostname, pke->hostname)) { in add_entry() 93 const char * hostname, in delete_entry() argument 100 if (!strcmp(kod_db[a]->hostname, hostname) in delete_entry() 170 kod_db[a]->hostname); in write_kod_db() [all …]
|
| /netbsd/src/external/bsd/libevent/dist/sample/ |
| D | hostcheck.c | 164 static int hostmatch(const char *hostname, const char *pattern) in hostmatch() argument 171 return Curl_raw_equal(pattern, hostname) ? in hostmatch() 184 return Curl_raw_equal(pattern, hostname) ? in hostmatch() 187 hostname_label_end = strchr(hostname, '.'); in hostmatch() 195 if(hostname_label_end - hostname < pattern_label_end - pattern) in hostmatch() 200 return Curl_raw_nequal(pattern, hostname, prefixlen) && in hostmatch() 206 int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) in Curl_cert_hostcheck() argument 209 !hostname || !*hostname) /* sanity check */ in Curl_cert_hostcheck() 212 if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */ in Curl_cert_hostcheck() 215 if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH) in Curl_cert_hostcheck()
|
| D | openssl_hostname_validation.c | 65 static HostnameValidationResult matches_common_name(const char *hostname, const X509 *server_cert) { in matches_common_name() argument 96 if (Curl_cert_hostcheck(common_name_str, hostname) == CURL_HOST_MATCH) { in matches_common_name() 113 static HostnameValidationResult matches_subject_alternative_name(const char *hostname, const X509 *… in matches_subject_alternative_name() argument 140 if (Curl_cert_hostcheck(dns_name, hostname) in matches_subject_alternative_name() 165 HostnameValidationResult validate_hostname(const char *hostname, const X509 *server_cert) { in validate_hostname() argument 168 if((hostname == NULL) || (server_cert == NULL)) in validate_hostname() 172 result = matches_subject_alternative_name(hostname, server_cert); in validate_hostname() 175 result = matches_common_name(hostname, server_cert); in validate_hostname()
|
| /netbsd/src/usr.sbin/ypserv/common/ |
| D | localhostname.c | 52 char hostname[MAXHOSTNAMELEN + 1]; in localhostname() local 55 if (gethostname(hostname, sizeof(hostname))) in localhostname() 57 hostname[sizeof(hostname) - 1] = '\0'; in localhostname() 65 if (strchr(hostname, '.')) { in localhostname() 66 strlcpy(buf, hostname, buflen); in localhostname() 77 error = getaddrinfo(hostname, NULL, &hints, &res); in localhostname() 79 errx(1, "getaddrinfo(%s) failed: %s", hostname, in localhostname()
|
| /netbsd/src/external/gpl2/xcvs/dist/lib/ |
| D | xgethostname.c | 55 char *hostname = NULL; in xgethostname() local 65 hostname = x2realloc (hostname, &size); in xgethostname() 67 hostname[size_1 - 1] = '\0'; in xgethostname() 70 if (gethostname (hostname, size_1) == 0) in xgethostname() 72 if (! hostname[size_1 - 1]) in xgethostname() 80 free (hostname); in xgethostname() 86 return hostname; in xgethostname()
|
| /netbsd/src/lib/libc/compat/net/ |
| D | compat_ns_addr.c | 59 char *hostname, *socketname, *cp; in ns_addr() local 73 if ((hostname = strchr(buf, '#')) != NULL) in ns_addr() 76 hostname = strchr(buf, '.'); in ns_addr() 78 ((hostname && cp < hostname) || (hostname == 0))) { in ns_addr() 79 hostname = cp; in ns_addr() 84 if (hostname) in ns_addr() 85 *hostname++ = 0; in ns_addr() 89 if (hostname == 0) in ns_addr() 92 socketname = strchr(hostname, separator); in ns_addr() 98 Field(hostname, addr.x_host.c_host, 6); in ns_addr()
|
| /netbsd/src/external/ibm-public/postfix/dist/src/util/ |
| D | inet_addr_host.c | 67 int inet_addr_host(INET_ADDR_LIST *addr_list, const char *hostname) in inet_addr_host() argument 88 if (*hostname == 0) { in inet_addr_host() 91 } else if (*hostname == '[' in inet_addr_host() 92 && hostname[(hostnamelen = strlen(hostname)) - 1] == ']') { in inet_addr_host() 93 hname = mystrndup(hostname + 1, hostnamelen - 2); in inet_addr_host() 96 hname = hostname; in inet_addr_host() 109 myname, res->ai_family, hostname); in inet_addr_host() 131 if (hname && hname != hostname) in inet_addr_host()
|
| D | myaddrinfo.c | 304 int hostname_to_sockaddr_pf(const char *hostname, int pf, in hostname_to_sockaddr_pf() argument 335 if (hostname == 0) { in hostname_to_sockaddr_pf() 347 if (inet_pton(AF_INET, hostname, (void *) &addr) == 1) { in hostname_to_sockaddr_pf() 359 if ((hp = gethostbyname(hostname)) == 0) in hostname_to_sockaddr_pf() 439 if (!hostname) { in hostname_to_sockaddr_pf() 447 hostname = "::"; in hostname_to_sockaddr_pf() 450 hostname = "0.0.0.0"; in hostname_to_sockaddr_pf() 461 err = getaddrinfo(hostname, service, &hints, res); in hostname_to_sockaddr_pf() 651 MAI_HOSTNAME_STR *hostname, in sockaddr_to_hostname() argument 673 if (hostname != 0) { in sockaddr_to_hostname() [all …]
|
| /netbsd/src/lib/libc/net/ |
| D | ethers.c | 82 ether_ntohost(char *hostname, const struct ether_addr *e) in ether_ntohost() argument 88 _DIAGASSERT(hostname != NULL); in ether_ntohost() 119 ypbuflen = ether_line(ypbuf, &try, hostname); in ether_ntohost() 126 if (ether_line(p, &try, hostname) == 0 && in ether_ntohost() 141 ether_hostton(const char *hostname, struct ether_addr *e) in ether_hostton() argument 147 int hostlen = (int)strlen(hostname); in ether_hostton() 150 _DIAGASSERT(hostname != NULL); in ether_hostton() 170 if (yp_match(ypdom, "ethers.byname", hostname, hostlen, in ether_hostton() 180 if (ether_line(p, e, try) == 0 && strcmp(hostname, try) == 0) in ether_hostton() 194 ether_line(const char *l, struct ether_addr *e, char *hostname) in ether_line() argument [all …]
|
| /netbsd/src/bin/hostname/ |
| D | hostname.c | 60 char *p, hostname[MAXHOSTNAMELEN + 1]; in main() local 83 if (gethostname(hostname, sizeof(hostname))) in main() 85 hostname[sizeof(hostname) - 1] = '\0'; in main() 86 if (sflag && (p = strchr(hostname, '.'))) in main() 88 (void)printf("%s\n", hostname); in main()
|
| /netbsd/src/crypto/external/bsd/openssh/dist/ |
| D | auth-rhosts.c | 57 check_rhosts_file(const char *filename, const char *hostname, in check_rhosts_file() argument 153 if (!innetgr(host + 1, hostname, NULL, NULL) && in check_rhosts_file() 156 } else if (strcasecmp(host, hostname) && in check_rhosts_file() 191 auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, in auth_rhosts2() argument 201 client_user, hostname, ipaddr); in auth_rhosts2() 242 if (check_rhosts_file(_PATH_RHOSTS_EQUIV, hostname, ipaddr, in auth_rhosts2() 245 "/etc/hosts.equiv.", hostname, ipaddr); in auth_rhosts2() 248 if (check_rhosts_file(_PATH_SSH_HOSTS_EQUIV, hostname, ipaddr, in auth_rhosts2() 251 "%.100s.", hostname, ipaddr, _PATH_SSH_HOSTS_EQUIV); in auth_rhosts2() 319 if (check_rhosts_file(path, hostname, ipaddr, in auth_rhosts2() [all …]
|
| D | dns.c | 168 is_numeric_hostname(const char *hostname) in is_numeric_hostname() argument 176 if (hostname == NULL) { in is_numeric_hostname() 185 if (getaddrinfo(hostname, NULL, &hints, &ai) == 0) { in is_numeric_hostname() 198 verify_host_key_dns(const char *hostname, struct sockaddr *address, in verify_host_key_dns() argument 220 if (is_numeric_hostname(hostname)) { in verify_host_key_dns() 225 result = getrrsetbyname(hostname, DNS_RDATACLASS_IN, in verify_host_key_dns() 307 export_dns_rr(const char *hostname, struct sshkey *key, FILE *f, int generic, in export_dns_rr() argument 325 hostname, DNS_RDATATYPE_SSHFP, in export_dns_rr() 329 fprintf(f, "%s IN SSHFP %d %d ", hostname, in export_dns_rr()
|
| /netbsd/src/usr.bin/talk/ |
| D | get_names.c | 56 char hostname[MAXHOSTNAMELEN + 1]; in get_names() local 78 (void)estrlcpy(hostname, cp, sizeof(hostname)); in get_names() 80 if (gethostname(hostname, sizeof(hostname)) == -1) in get_names() 82 hostname[sizeof(hostname) - 1] = '\0'; in get_names() 84 my_machine_name = hostname; in get_names()
|
| /netbsd/src/lib/libutil/ |
| D | pidlock.c | 52 char hostname[MAXHOSTNAMELEN + 1]; in pidlock() local 66 if (gethostname(hostname, sizeof(hostname))) in pidlock() 68 hostname[sizeof(hostname) - 1] = '\0'; in pidlock() 71 for (p = hostname; *p != '\0'; p++) { in pidlock() 82 (int) getpid(), hostname) >= (int)sizeof(tempfile)) { in pidlock() 96 len = strlen(hostname); in pidlock() 97 if ((size_t)write(f, hostname, len) != len in pidlock() 141 strcmp(s, hostname) == 0) { in pidlock()
|
| /netbsd/src/usr.bin/login/ |
| D | common.c | 80 char term[64], *envinit[1], *hostname, *tty, *nested; variable 175 hname = (hostname == NULL) ? "?" : hostname; in update_db() 196 } else if (hostname) { in update_db() 247 if (hostname) { in doutmpx() 248 (void)strncpy(utmpx.ut_host, hostname, sizeof(utmpx.ut_host)); in doutmpx() 285 if (hostname) in dolastlogx() 286 (void)strncpy(ll.ll_host, hostname, sizeof(ll.ll_host)); in dolastlogx() 307 if (hostname) in doutmp() 308 (void)strncpy(utmp.ut_host, hostname, sizeof(utmp.ut_host)); in doutmp() 339 if (hostname) in dolastlog() [all …]
|
| /netbsd/src/external/bsd/ntp/dist/ntpd/ |
| D | ntp_peer.c | 178 const char * hostname, in findexistingpeer_name() argument 191 if (p->hostname != NULL in findexistingpeer_name() 196 && !strcasecmp(p->hostname, hostname)) in findexistingpeer_name() 266 const char * hostname, in findexistingpeer() argument 273 if (hostname != NULL) in findexistingpeer() 274 return findexistingpeer_name(hostname, AF(addr), in findexistingpeer() 524 if (p->hostname != NULL) in free_peer() 525 free(p->hostname); in free_peer() 574 const char * hostname, in peer_config() argument 603 if (hostname != NULL && SOCK_UNSPEC(srcadr)) in peer_config() [all …]
|
| /netbsd/src/external/bsd/am-utils/dist/fsinfo/ |
| D | fsinfo.c | 58 char hostname[MAXHOSTNAMELEN + 1]; variable 125 xstrlcpy(hostname, optarg, sizeof(hostname)); in fsi_get_args() 232 if (!*hostname && gethostname(hostname, sizeof(hostname)) < 0) { in main() 236 hostname[sizeof(hostname) - 1] = '\0'; in main()
|
| /netbsd/src/crypto/external/bsd/heimdal/dist/lib/krb5/ |
| D | krbhst.c | 163 strlcpy(hi->hostname, rr->u.srv->target, len + 1); in srv_find_realm() 190 char *hostname; member 266 memcpy(hi->hostname, &p[1], q - p - 1); in parse_hostspec() 267 hi->hostname[q - p - 1] = '\0'; in parse_hostspec() 272 } else if(strsep_copy(&p, ":", hi->hostname, strlen(spec) + 1) < 0) { in parse_hostspec() 278 hi->hostname[strcspn(hi->hostname, "/")] = '\0'; in parse_hostspec() 279 strlwr(hi->hostname); in parse_hostspec() 308 size_t hostnamelen = strlen(from->hostname); in _krb5_krbhost_info_move() 320 memcpy((*to)->hostname, from->hostname, hostnamelen + 1); in _krb5_krbhost_info_move() 333 strcmp(h->hostname, host->hostname) == 0) { in append_host_hostinfo() [all …]
|
| /netbsd/src/usr.sbin/rpc.statd/ |
| D | statd.c | 242 char hostname[MAXHOSTNAMELEN + 1]; in change_host() local 245 strncpy(hostname, hostnamep, MAXHOSTNAMELEN + 1); in change_host() 248 for (ptr = hostname; *ptr; ptr++) in change_host() 252 key.data = hostname; in change_host() 253 key.size = ptr - hostname + 1; in change_host() 277 find_host(char *hostname, HostInfo *hp) in find_host() argument 282 for (ptr = hostname; *ptr; ptr++) in find_host() 286 key.data = hostname; in find_host() 287 key.size = ptr - hostname + 1; in find_host() 559 notify_one_host(const char *hostname) in notify_one_host() argument [all …]
|
| /netbsd/src/usr.sbin/timed/timedc/ |
| D | cmds.c | 131 daydiff(const char *hostname, const struct sockaddr_in *addr) in daydiff() argument 185 hostname, (unsigned long)sec); in daydiff() 198 warnx("%s will not tell us the date", hostname); in daydiff() 243 const char *hostname; in clockdiff() local 249 if ((hostname = getaddr(*argv, &server, port)) == NULL) in clockdiff() 263 printf("%s is down\n", hostname); in clockdiff() 267 hostname); in clockdiff() 270 printf("%s is unreachable\n", hostname); in clockdiff() 283 hostname, avg/SECDAY, myname(CACHED)); in clockdiff() 287 hostname, -avg/SECDAY, myname(CACHED)); in clockdiff() [all …]
|
| /netbsd/src/external/bsd/tmux/usr.bin/tmux/ |
| D | utempter.c | 60 doutmpx(const char *username, const char *hostname, const char *tty, in doutmpx() argument 69 if (hostname) in doutmpx() 70 (void)strncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); in doutmpx() 82 login_utmpx(const char *username, const char *hostname, const char *tty, in login_utmpx() argument 85 doutmpx(username, hostname, tty, now, USER_PROCESS, getpid()); in login_utmpx() 97 login_utmp(const char *username, const char *hostname, const char *tty, in login_utmp() argument 104 if (hostname) in login_utmp() 105 (void)strncpy(ut.ut_host, hostname, sizeof(ut.ut_host)); in login_utmp()
|
| /netbsd/src/usr.sbin/fwctl/ |
| D | eui64.c | 97 static int eui64_line(const char *l, struct eui64 *e, char *hostname, 105 eui64_line(const char *l, struct eui64 *e, char *hostname, size_t len) in eui64_line() argument 127 if (strlcpy(hostname, cur, len) <= len) in eui64_line() 225 eui64_ntohost(char *hostname, size_t len, const struct eui64 *id) in eui64_ntohost() argument 262 strcpy(hostname, local_host); in eui64_ntohost() 276 eui64_hostton(const char *hostname, struct eui64 *id) in eui64_hostton() argument 297 if (yp_match(yp_domain, "eui64.byname", hostname, in eui64_hostton() 298 strlen(hostname), &result, &resultlen)) { in eui64_hostton() 308 if (strcmp(hostname, local_host) == 0) { in eui64_hostton()
|
| /netbsd/src/external/bsd/ntp/dist/scripts/monitoring/ |
| D | ntptrap | 161 sub hostname 199 … &debug(sprintf("Request: %s: %s(%d)",&hostname($addr), &ntp'cntrlop_name($op), $assoc)); #';)) 257 &debug("-Packet from ",&hostname($from)); 262 … &debug(sprintf("%s uses auth_keyid %d",&hostname($from),$auth_keyid)) if defined($auth_keyid); 319 &debug(sprintf("Refreshing trap for %s", &hostname($addr))); 333 &hostname(substr($tag,$[,4)), 338 &hostname(substr($tag,$[,4)), 351 &hostname($from),$seq); 400 &hostname(pack("C4",split(/\./,$srcadr)))); 430 &debug("Set trap ok from ",&hostname($from)); [all …]
|
| /netbsd/src/crypto/external/cpl/trousers/dist/src/tcsd/ |
| D | tcsd_threads.c | 89 tcsd_thread_create(int socket, char *hostname) in tcsd_thread_create() argument 112 if (hostname != NULL) { in tcsd_thread_create() 114 " from %s refused.", tm->max_threads, hostname); in tcsd_thread_create() 137 if (hostname != NULL) in tcsd_thread_create() 138 tm->thread_data[thread_num].hostname = hostname; in tcsd_thread_create() 167 if (hostname != NULL) { in tcsd_thread_create() 169 tm->thread_data[thread_num].hostname = NULL; in tcsd_thread_create() 170 free(hostname); in tcsd_thread_create() 339 if(data->hostname != NULL) { in tcsd_thread_run() 340 free(data->hostname); in tcsd_thread_run() [all …]
|
| /netbsd/src/external/gpl2/xcvs/dist/src/ |
| D | root.c | 391 newroot->hostname = NULL; in new_cvsroot_t() 428 if (root->hostname != NULL) in free_cvsroot_t() 429 free (root->hostname); in free_cvsroot_t() 730 newroot->hostname = xstrdup (cvsroot_copy); in parse_cvsroot() 753 if (newroot->username && ! newroot->hostname) in parse_cvsroot() 771 if (newroot->username || newroot->hostname) in parse_cvsroot() 804 if (newroot->username || newroot->hostname) in parse_cvsroot() 810 newroot->hostname = xstrdup("server"); /* for error messages */ in parse_cvsroot() 867 if (check_hostname && !newroot->hostname) in parse_cvsroot() 924 char *p, *hostname; in normalize_cvsroot() local [all …]
|