Lines Matching refs:client_id
36 … hashmap_remove_value(lease->server->bound_leases_by_client_id, &lease->client_id, lease); in dhcp_lease_free()
38 … hashmap_remove_value(lease->server->static_leases_by_client_id, &lease->client_id, lease); in dhcp_lease_free()
41 free(lease->client_id.data); in dhcp_lease_free()
764 free_and_replace(req->client_id.data, data); in parse_request()
765 req->client_id.length = len; in parse_request()
788 free(req->client_id.data); in dhcp_request_free()
804 if (!req->client_id.data) { in ensure_sane_request()
817 req->client_id.length = message->hlen + 1; in ensure_sane_request()
818 req->client_id.data = data; in ensure_sane_request()
826 if (!req->client_id.data) in ensure_sane_request()
829 … if (req->client_id.length <= 1 || req->client_id.length > sizeof(message->chaddr) + 1) in ensure_sane_request()
832 if (req->client_id.data[0] != 0x01) in ensure_sane_request()
835 message->hlen = req->client_id.length - 1; in ensure_sane_request()
836 memcpy(message->chaddr, req->client_id.data + 1, message->hlen); in ensure_sane_request()
950 const DHCPClientId *client_id, in prepare_new_lease() argument
965 .client_id.length = client_id->length, in prepare_new_lease()
971 lease->client_id.data = memdup(client_id->data, client_id->length); in prepare_new_lease()
972 if (!lease->client_id.data) in prepare_new_lease()
1004 r = prepare_new_lease(&lease, address, &req->client_id, in server_ack_request()
1012 …map_ensure_put(&server->bound_leases_by_client_id, &dhcp_lease_hash_ops, &lease->client_id, lease); in server_ack_request()
1096 existing_lease = hashmap_get(server->bound_leases_by_client_id, &req->client_id); in dhcp_server_handle_message()
1097 static_lease = hashmap_get(server->static_leases_by_client_id, &req->client_id); in dhcp_server_handle_message()
1124 client_id_hash_func(&req->client_id, &state); in dhcp_server_handle_message()
1629 uint8_t *client_id, in sd_dhcp_server_set_static_lease() argument
1636 assert_return(client_id, -EINVAL); in sd_dhcp_server_set_static_lease()
1647 .data = client_id, in sd_dhcp_server_set_static_lease()
1660 .client_id.length = client_id_size, in sd_dhcp_server_set_static_lease()
1662 lease->client_id.data = memdup(client_id, client_id_size); in sd_dhcp_server_set_static_lease()
1663 if (!lease->client_id.data) in sd_dhcp_server_set_static_lease()
1668 …ap_ensure_put(&server->static_leases_by_client_id, &dhcp_lease_hash_ops, &lease->client_id, lease); in sd_dhcp_server_set_static_lease()