/systemd/src/network/ |
H A D | networkd-dhcp6.c | 95 sd_dhcp6_lease *lease; local 99 r = sd_dhcp6_client_get_lease(client, &lease); 103 sd_dhcp6_lease_reset_address_iter(lease); 105 while (sd_dhcp6_lease_get_address(lease, &ip6_addr, 133 log_link_warning(link, "DHCPv6 lease lost");
|
H A D | networkd-dhcp4.c | 24 #include "dhcp-lease-internal.h" 157 log_link_warning(link, "DHCP lease lost"); 248 /* If a hostname was set due to the lease, then unset it now. */ 316 sd_dhcp_lease *lease; local 326 r = sd_dhcp_client_get_lease(client, &lease); 328 return log_link_warning_errno(link, r, "DHCP error: no lease: %m"); 332 link->dhcp_lease = sd_dhcp_lease_ref(lease); 335 r = sd_dhcp_lease_get_address(lease, &address); 339 r = sd_dhcp_lease_get_netmask(lease, &netmask); 360 sd_dhcp_lease *lease; local [all...] |
/systemd/src/libsystemd-network/ |
H A D | sd-dhcp6-lease.c | 24 #include "dhcp6-lease-internal.h" 79 int dhcp6_lease_set_serverid(sd_dhcp6_lease *lease, const uint8_t *id, argument 81 assert_return(lease, -EINVAL); 84 free(lease->serverid); 86 lease->serverid = memdup(id, len); 87 if (!lease->serverid) 90 lease->serverid_len = len; 95 int dhcp6_lease_get_serverid(sd_dhcp6_lease *lease, uint8_t **id, size_t *len) { argument 96 assert_return(lease, -EINVAL); 100 *id = lease 106 dhcp6_lease_set_preference(sd_dhcp6_lease *lease, uint8_t preference) argument 114 dhcp6_lease_get_preference(sd_dhcp6_lease *lease, uint8_t *preference) argument 125 dhcp6_lease_set_rapid_commit(sd_dhcp6_lease *lease) argument 133 dhcp6_lease_get_rapid_commit(sd_dhcp6_lease *lease, bool *rapid_commit) argument 142 dhcp6_lease_get_iaid(sd_dhcp6_lease *lease, be32_t *iaid) argument 151 sd_dhcp6_lease_get_address(sd_dhcp6_lease *lease, struct in6_addr *addr, uint32_t *lifetime_preferred, uint32_t *lifetime_valid) argument 173 sd_dhcp6_lease_reset_address_iter(sd_dhcp6_lease *lease) argument 178 dhcp6_lease_set_dns(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) argument 202 sd_dhcp6_lease_get_dns(sd_dhcp6_lease *lease, struct in6_addr **addrs) argument 214 dhcp6_lease_set_domains(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) argument 236 sd_dhcp6_lease_get_domains(sd_dhcp6_lease *lease, char ***domains) argument 248 dhcp6_lease_set_ntp(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) argument 303 dhcp6_lease_set_sntp(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) argument 335 sd_dhcp6_lease_get_ntp_addrs(sd_dhcp6_lease *lease, struct in6_addr **addrs) argument 348 sd_dhcp6_lease_get_ntp_fqdn(sd_dhcp6_lease *lease, char ***ntp_fqdn) argument 360 sd_dhcp6_lease_ref(sd_dhcp6_lease *lease) argument 371 sd_dhcp6_lease_unref(sd_dhcp6_lease *lease) argument 398 sd_dhcp6_lease *lease; local [all...] |
H A D | test-dhcp-client.c | 358 sd_dhcp_lease *lease; local 364 assert_se(sd_dhcp_client_get_lease(client, &lease) >= 0); 365 assert_se(lease); 367 assert_se(sd_dhcp_lease_get_address(lease, &addr) >= 0); 371 assert_se(sd_dhcp_lease_get_netmask(lease, &addr) >= 0); 375 assert_se(sd_dhcp_lease_get_router(lease, &addr) >= 0);
|
H A D | test-dhcp6-client.c | 31 #include "dhcp6-lease-internal.h" 206 _cleanup_(sd_dhcp6_lease_unrefp) sd_dhcp6_lease *lease = NULL; 223 assert_se(dhcp6_lease_new(&lease) >= 0); 254 &lease->ia) >= 0); 262 assert_se(dhcp6_lease_set_serverid(lease, optval, 270 assert_se(dhcp6_lease_set_preference(lease, 281 assert_se(dhcp6_lease_set_dns(lease, optval, 287 assert_se(dhcp6_lease_set_domains(lease, optval, 293 assert_se(dhcp6_lease_set_sntp(lease, optval, 307 sd_dhcp6_lease_reset_address_iter(lease); 361 sd_dhcp6_lease *lease; local 560 sd_dhcp6_lease *lease; local [all...] |
H A D | sd-dhcp-lease.c | 27 #include "sd-dhcp-lease.h" 30 #include "dhcp-lease-internal.h" 44 int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr) { argument 45 assert_return(lease, -EINVAL); 48 if (lease->address == 0) 51 addr->s_addr = lease->address; 55 int sd_dhcp_lease_get_broadcast(sd_dhcp_lease *lease, struct in_addr *addr) { argument 56 assert_return(lease, -EINVAL); 59 if (!lease->have_broadcast) 62 addr->s_addr = lease 66 sd_dhcp_lease_get_lifetime(sd_dhcp_lease *lease, uint32_t *lifetime) argument 77 sd_dhcp_lease_get_t1(sd_dhcp_lease *lease, uint32_t *t1) argument 88 sd_dhcp_lease_get_t2(sd_dhcp_lease *lease, uint32_t *t2) argument 99 sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu) argument 110 sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, const struct in_addr **addr) argument 121 sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr) argument 132 sd_dhcp_lease_get_domainname(sd_dhcp_lease *lease, const char **domainname) argument 143 sd_dhcp_lease_get_hostname(sd_dhcp_lease *lease, const char **hostname) argument 154 sd_dhcp_lease_get_root_path(sd_dhcp_lease *lease, const char **root_path) argument 165 sd_dhcp_lease_get_router(sd_dhcp_lease *lease, struct in_addr *addr) argument 176 sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr) argument 187 sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_addr *addr) argument 198 sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *addr) argument 213 sd_dhcp_lease_get_routes(sd_dhcp_lease *lease, sd_dhcp_route ***routes) argument 234 sd_dhcp_lease_get_vendor_specific(sd_dhcp_lease *lease, const void **data, size_t *data_len) argument 247 sd_dhcp_lease_ref(sd_dhcp_lease *lease) argument 258 sd_dhcp_lease_unref(sd_dhcp_lease *lease) argument 513 sd_dhcp_lease *lease = userdata; local 682 dhcp_lease_insert_private_option(sd_dhcp_lease *lease, uint8_t tag, const void *data, uint8_t len) argument 713 sd_dhcp_lease *lease; local 726 dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) argument 1088 dhcp_lease_set_default_subnet_mask(sd_dhcp_lease *lease) argument 1110 sd_dhcp_lease_get_client_id(sd_dhcp_lease *lease, const void **client_id, size_t *client_id_len) argument 1124 dhcp_lease_set_client_id(sd_dhcp_lease *lease, const void *client_id, size_t client_id_len) argument 1145 sd_dhcp_lease_get_timezone(sd_dhcp_lease *lease, const char **tz) argument [all...] |
H A D | sd-dhcp-server.c | 145 static void dhcp_lease_free(DHCPLease *lease) { argument 146 if (!lease) 149 free(lease->client_id.data); 150 free(lease); 154 DHCPLease *lease; local 175 while ((lease = hashmap_steal_first(server->leases_by_client_id))) 176 dhcp_lease_free(lease); 848 DHCPLease *lease; local 852 lease = new0(DHCPLease, 1); 853 lease 1054 DHCPLease *lease = server->bound_leases[i]; local [all...] |
H A D | sd-dhcp6-client.c | 30 #include "dhcp6-lease-internal.h" 55 struct sd_dhcp6_lease *lease; member in struct:sd_dhcp6_client 272 if (!client->lease) 276 *ret = client->lease; 286 static void client_set_lease(sd_dhcp6_client *client, sd_dhcp6_lease *lease) { argument 287 if (client->lease) { 288 dhcp6_lease_clear_timers(&client->lease->ia); 289 sd_dhcp6_lease_unref(client->lease); 291 client->lease = lease; 672 client_parse_message(sd_dhcp6_client *client, DHCP6Message *message, size_t len, sd_dhcp6_lease *lease) argument [all...] |
H A D | sd-dhcp-client.c | 35 #include "dhcp-lease-internal.h" 106 sd_dhcp_lease *lease; member in struct:sd_dhcp_client 360 *ret = client->lease; 389 client->lease = sd_dhcp_lease_unref(client->lease); 438 refuse to issue an DHCP lease if 'secs' is set to zero */ 489 /* Some DHCP servers will refuse to issue an DHCP lease if the Client 593 and lease time in the DHCPDISCOVER message. The client may include 595 address be assigned, and may include the ’IP address lease time’ 596 option to suggest the lease tim [all...] |