Home
last modified time | relevance | path

Searched refs:duid (Results 1 – 18 of 18) sorted by relevance

/systemd-251/src/network/
Dnetworkd-dhcp-common.c102 static bool duid_needs_product_uuid(const DUID *duid) { in duid_needs_product_uuid() argument
103 assert(duid); in duid_needs_product_uuid()
105 return duid->type == DUID_TYPE_UUID && duid->raw_data_len == 0; in duid_needs_product_uuid()
111 const DUID *duid; in link_get_duid() local
117 duid = family == AF_INET ? &link->network->dhcp_duid : &link->network->dhcp6_duid; in link_get_duid()
118 if (duid->type != _DUID_TYPE_INVALID) { in link_get_duid()
119 if (duid_needs_product_uuid(duid)) in link_get_duid()
122 return duid; in link_get_duid()
126 duid = family == AF_INET ? &link->manager->dhcp_duid : &link->manager->dhcp6_duid; in link_get_duid()
127 if (link->hw_addr.length == 0 && IN_SET(duid->type, DUID_TYPE_LLT, DUID_TYPE_LL)) in link_get_duid()
[all …]
Dnetworkd-dhcp6.c545 const DUID *duid; in dhcp6_set_identifier() local
562 duid = link_get_dhcp6_duid(link); in dhcp6_set_identifier()
563 if (duid->type == DUID_TYPE_LLT && duid->raw_data_len == 0) in dhcp6_set_identifier()
564 r = sd_dhcp6_client_set_duid_llt(client, duid->llt_time); in dhcp6_set_identifier()
567 duid->type, in dhcp6_set_identifier()
568 duid->raw_data_len > 0 ? duid->raw_data : NULL, in dhcp6_set_identifier()
569 duid->raw_data_len); in dhcp6_set_identifier()
792 _cleanup_free_ char *duid = NULL; in link_serialize_dhcp6_client() local
805 r = sd_dhcp6_client_duid_as_string(link->dhcp6_client, &duid); in link_serialize_dhcp6_client()
807 fprintf(f, "DHCP6_CLIENT_DUID=%s\n", duid); in link_serialize_dhcp6_client()
Dnetworkd-dhcp4.c1255 const DUID *duid = link_get_dhcp4_duid(link); in dhcp4_set_client_identifier() local
1257 if (duid->type == DUID_TYPE_LLT && duid->raw_data_len == 0) in dhcp4_set_client_identifier()
1261 duid->llt_time); in dhcp4_set_client_identifier()
1266 duid->type, in dhcp4_set_client_identifier()
1267duid->raw_data_len > 0 ? duid->raw_data : NULL, in dhcp4_set_client_identifier()
1268 duid->raw_data_len); in dhcp4_set_client_identifier()
1275 const DUID *duid = link_get_dhcp4_duid(link); in dhcp4_set_client_identifier() local
1277 if (duid->type == DUID_TYPE_LLT && duid->raw_data_len == 0) in dhcp4_set_client_identifier()
1279 duid->llt_time); in dhcp4_set_client_identifier()
1282 duid->type, in dhcp4_set_client_identifier()
[all …]
Dnetworkd-dhcp-common.h74 int dhcp_configure_duid(Link *link, const DUID *duid);
Dnetworkctl.c1552 _cleanup_free_ char *t = NULL, *network = NULL, *iaid = NULL, *duid = NULL, in link_status_one() local
2274 r = sd_network_link_get_dhcp6_client_duid_string(info->ifindex, &duid); in link_status_one()
2279 TABLE_STRING, duid); in link_status_one()
/systemd-251/src/libsystemd-network/
Ddhcp-identifier.c32 struct duid d; in dhcp_validate_duid_len()
67 …const uint8_t *addr, size_t addr_len, uint16_t arp_type, usec_t t, struct duid *ret_duid, size_t *… in dhcp_identifier_set_duid_llt()
94 *ret_len = offsetof(struct duid, llt.haddr) + addr_len; in dhcp_identifier_set_duid_llt()
99 …t_duid_ll(const uint8_t *addr, size_t addr_len, uint16_t arp_type, struct duid *ret_duid, size_t *… in dhcp_identifier_set_duid_ll()
118 *ret_len = offsetof(struct duid, ll.haddr) + addr_len; in dhcp_identifier_set_duid_ll()
123 int dhcp_identifier_set_duid_en(bool test_mode, struct duid *ret_duid, size_t *ret_len) { in dhcp_identifier_set_duid_en()
149 *ret_len = offsetof(struct duid, en.id) + sizeof(ret_duid->en.id); in dhcp_identifier_set_duid_en()
157 static int dhcp_identifier_set_duid_uuid(struct duid *ret_duid, size_t *ret_len) { in dhcp_identifier_set_duid_uuid()
171 *ret_len = offsetof(struct duid, uuid.uuid) + sizeof(machine_id); in dhcp_identifier_set_duid_uuid()
183 struct duid *ret_duid, in dhcp_identifier_set_duid()
Dsd-dhcp6-client.c184 return dhcp_identifier_set_duid_en(client->test_mode, &client->duid, &client->duid_len); in client_ensure_duid()
195 const void *duid, in dhcp6_client_set_duid_internal() argument
202 assert_return(duid_len == 0 || duid, -EINVAL); in dhcp6_client_set_duid_internal()
204 if (duid) { in dhcp6_client_set_duid_internal()
214 client->duid.type = htobe16(duid_type); in dhcp6_client_set_duid_internal()
215 memcpy(&client->duid.raw.data, duid, duid_len); in dhcp6_client_set_duid_internal()
216 client->duid_len = sizeof(client->duid.type) + duid_len; in dhcp6_client_set_duid_internal()
220 … client->arp_type, llt_time, client->test_mode, &client->duid, &client->duid_len); in dhcp6_client_set_duid_internal()
237 const void *duid, in sd_dhcp6_client_set_duid() argument
239 return dhcp6_client_set_duid_internal(client, duid_type, duid, duid_len, 0); in sd_dhcp6_client_set_duid()
[all …]
Ddhcp-identifier.h28 struct duid { struct
58 int dhcp_identifier_set_duid_en(bool test_mode, struct duid *ret_duid, size_t *ret_len);
66 struct duid *ret_duid,
Dsd-dhcp-client.c64 struct duid duid; member
211 uint16_t duid_type = be16toh(client_id->ns.duid.type); in sd_dhcp_client_id_to_string()
454 const void *duid, in dhcp_client_set_iaid_duid_internal() argument
463 assert_return(duid_len == 0 || duid, -EINVAL); in dhcp_client_set_iaid_duid_internal()
465 if (duid) { in dhcp_client_set_iaid_duid_internal()
488 if (duid) { in dhcp_client_set_iaid_duid_internal()
489 client->client_id.ns.duid.type = htobe16(duid_type); in dhcp_client_set_iaid_duid_internal()
490 memcpy(&client->client_id.ns.duid.raw.data, duid, duid_len); in dhcp_client_set_iaid_duid_internal()
491 len = sizeof(client->client_id.ns.duid.type) + duid_len; in dhcp_client_set_iaid_duid_internal()
496 &client->client_id.ns.duid, &len); in dhcp_client_set_iaid_duid_internal()
[all …]
Ddhcp6-internal.h64 struct duid duid; member
Dtest-dhcp-client.c163 struct duid duid; in check_options() local
166 … assert_se(dhcp_identifier_set_duid_en(/* test_mode = */ true, &duid, &duid_len) >= 0); in check_options()
174 assert_se(memcmp((uint8_t*) option + 5, &duid, duid_len) == 0); in check_options()
Dtest-dhcp6-client.c433 static const uint8_t duid[] = { in TEST() local
441 assert_se(sd_dhcp6_client_set_duid(client, 2, duid, sizeof(duid)) >= 0); in TEST()
Dsd-dhcp6-lease.c624 if (memcmp_nn(clientid, clientid_len, &client->duid, client->duid_len) != 0) in dhcp6_lease_parse_message()
/systemd-251/src/systemd/
Dsd-dhcp6-client.h216 const void *duid,
229 char **duid);
Dsd-dhcp-client.h264 const void *duid,
274 const void *duid,
Dsd-network.h189 int sd_network_link_get_dhcp6_client_duid_string(int ifindex, char **duid);
/systemd-251/src/libsystemd/sd-network/
Dsd-network.c220 int sd_network_link_get_dhcp6_client_duid_string(int ifindex, char **duid) { in sd_network_link_get_dhcp6_client_duid_string() argument
221 return network_link_get_string(ifindex, "DHCP6_CLIENT_DUID", duid); in sd_network_link_get_dhcp6_client_duid_string()
/systemd-251/
DNEWS5857 * networkd's ClientIdentifier= now accepts a new option "duid-only". If