/systemd/src/test/ |
H A D | test-hostname-util.c | 24 #include "hostname-util.h" 102 char path[] = "/tmp/hostname.XXXXXX"; 103 char *hostname; local 110 /* simple hostname */ 112 assert_se(read_hostname_config(path, &hostname) == 0); 113 assert_se(streq(hostname, "foo")); 114 hostname = mfree(hostname); 118 assert_se(read_hostname_config(path, &hostname) == 0); 119 assert_se(hostname); [all...] |
H A D | test-condition.c | 27 #include "hostname-util.h" 124 _cleanup_free_ char *hostname = NULL; local 142 hostname = gethostname_malloc(); 143 assert_se(hostname); 145 condition = condition_new(CONDITION_HOST, hostname, false, false);
|
/systemd/src/basic/ |
H A D | hostname-util.c | 30 #include "hostname-util.h" 149 bool is_localhost(const char *hostname) { argument 150 assert(hostname); 155 return strcaseeq(hostname, "localhost") || 156 strcaseeq(hostname, "localhost.") || 157 strcaseeq(hostname, "localdomain.") || 158 strcaseeq(hostname, "localdomain") || 159 endswith_no_case(hostname, ".localhost") || 160 endswith_no_case(hostname, ".localhost.") || 161 endswith_no_case(hostname, " 165 is_gateway_hostname(const char *hostname) argument 193 read_hostname_config(const char *path, char **hostname) argument [all...] |
/systemd/src/libsystemd-network/ |
H A D | dhcp-lease-internal.h | 78 char *hostname; member in struct:sd_dhcp_lease
|
H A D | sd-dhcp-lease.c | 36 #include "hostname-util.h" 143 int sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname) { argument 145 assert_return(hostname, -EINVAL); 147 if (!lease->hostname) 150 *hostname = lease->hostname; 278 free(lease->hostname); 592 r = lease_parse_domain(option, len, &lease->hostname); 918 "HOSTNAME", &lease->hostname,
|
H A D | sd-dhcp-client.c | 38 #include "hostname-util.h" 94 char *hostname; member in struct:sd_dhcp_client 302 const char *hostname) { 307 if (!hostname_is_valid(hostname, false) && !dns_name_is_valid(hostname)) 310 if (streq_ptr(client->hostname, hostname)) 313 if (hostname) { 314 new_hostname = strdup(hostname); 319 free(client->hostname); 301 sd_dhcp_client_set_hostname(sd_dhcp_client *client, const char *hostname) argument [all...] |
/systemd/src/network/ |
H A D | networkd-dhcp4.c | 25 #include "hostname-util.h" 240 const char *hostname = NULL; local 243 hostname = link->network->dhcp_hostname; 245 (void) sd_dhcp_lease_get_hostname(link->dhcp_lease, &hostname); 247 if (hostname) { 248 /* If a hostname was set due to the lease, then unset it now. */ 251 log_link_warning_errno(link, r, "Failed to reset transient hostname: %m"); 425 const char *hostname = NULL; local 428 hostname = link->network->dhcp_hostname; 430 (void) sd_dhcp_lease_get_hostname(lease, &hostname); 600 _cleanup_free_ char *hostname = NULL; local [all...] |
H A D | networkd-network.c | 28 #include "hostname-util.h" 804 char **hostname = data, *hn = NULL; local 821 free(*hostname); 822 *hostname = hostname_cleanup(hn);
|
H A D | networkd-link.c | 1039 log_link_warning_errno(link, sd_bus_error_get_errno(e), "Could not set hostname: %s", e->message); 1044 int link_set_hostname(Link *link, const char *hostname) { argument 1050 log_link_debug(link, "Setting transient hostname: '%s'", strna(hostname)); 1054 log_link_info(link, "Not connected to system bus, ignoring transient hostname."); 1068 hostname, 1072 return log_link_error_errno(link, r, "Could not set transient hostname: %m");
|
/systemd/src/journal-remote/ |
H A D | microhttpd-util.c | 264 int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) { argument 303 if (hostname) { 304 *hostname = buf; 318 int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) { argument
|
H A D | journal-gatewayd.c | 38 #include "hostname-util.h" 752 _cleanup_free_ char* hostname = NULL, *os_name = NULL; local 773 hostname = gethostname_malloc(); 774 if (!hostname) 793 "\"hostname\" : \"%s\"," 801 hostname_cleanup(hostname),
|
H A D | journal-remote.c | 455 static int request_meta(void **connection_cls, int fd, char *hostname) { argument 464 r = get_writer(server, hostname, &writer); 467 hostname); 469 source = source_new(fd, true, hostname, writer); 569 _cleanup_free_ char *hostname = NULL; local 614 r = check_permissions(connection, &code, &hostname); 618 r = getpeername_pretty(fd, false, &hostname); 621 "Cannot check remote hostname"); 624 assert(hostname); 626 r = request_meta(connection_cls, fd, hostname); 874 char *hostname; local 907 char *hostname, *p; local 1115 accept_connection(const char* type, int fd, SocketAddress *addr, char **hostname) argument 1172 char *hostname = NULL; local [all...] |
/systemd/src/hostname/ |
H A D | hostnamectl.c | 33 #include "hostname-util.h" 57 char *hostname; member in struct:StatusInfo 78 printf(" Static hostname: %s\n", strna(i->static_hostname)); 82 printf(" Pretty hostname: %s\n", i->pretty_hostname); 84 if (!isempty(i->hostname) && 85 !streq_ptr(i->hostname, i->static_hostname)) 86 printf("Transient hostname: %s\n", i->hostname); 158 { "Hostname", "s", NULL, offsetof(StatusInfo, hostname) }, 197 free(info.hostname); 254 char *hostname = args[1]; local [all...] |
/systemd/src/coredump/ |
H A D | coredumpctl.c | 367 *boot_id = NULL, *machine_id = NULL, *hostname = NULL, local 395 retrieve(d, l, "_HOSTNAME", &hostname); 504 if (hostname) 505 fprintf(file, " Hostname: %s\n", hostname);
|
/systemd/src/resolve/ |
H A D | resolve-tool.c | 629 const char *hostname, *canonical; local 631 r = sd_bus_message_read(reply, "qqqs", &priority, &weight, &port, &hostname); 643 hostname, port, 700 if (!streq(hostname, canonical))
|
H A D | resolved-bus.c | 214 log_error_errno(r, "Failed to send hostname reply: %m"); 239 const char *hostname; local 250 r = sd_bus_message_read(message, "isit", &ifindex, &hostname, &family, &flags); 257 r = dns_name_is_valid(hostname); 261 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid hostname '%s'", hostname); 267 r = dns_question_new_address(&question_utf8, family, hostname, false); 271 r = dns_question_new_address(&question_idna, family, hostname, true); 715 /* Note that above we appended the hostname as encoded in the 716 * SRV, and here the canonical hostname thi [all...] |
H A D | resolved-dns-rr.c | 508 int dns_resource_record_new_reverse(DnsResourceRecord **ret, int family, const union in_addr_union *address, const char *hostname) { argument 516 assert(hostname); 532 rr->ptr.name = strdup(hostname);
|
/systemd/src/shared/ |
H A D | logs-show.c | 38 #include "hostname-util.h" 220 _cleanup_free_ char *hostname = NULL, *identifier = NULL, *comm = NULL, *pid = NULL, *fake_pid = NULL, *message = NULL, *realtime = NULL, *monotonic = NULL, *priority = NULL; local 244 r = parse_field(data, length, "_HOSTNAME=", &hostname, &hostname_len); 370 if (hostname && shall_print(hostname, hostname_len, flags)) { 371 fprintf(f, " %.*s", (int) hostname_len, hostname);
|
/systemd/src/analyze/ |
H A D | analyze.c | 117 char *hostname; member in struct:host_info 327 free(hi->hostname); 442 { "Hostname", "s", NULL, offsetof(struct host_info, hostname) }, 664 strempty(host->hostname),
|