Lines Matching refs:client_id
58 struct dhcpv4_client_id client_id; member
199 uint8_t *client_id, uint8_t *len) in dhcpv4_find_client_id_option() argument
219 memcpy(client_id, opt, optlen); in dhcpv4_find_client_id_option()
355 struct dhcpv4_client_id *client_id) in dhcpv4_encode_client_id_option() argument
357 if (buf == NULL || *buflen < client_id->len + 2) { in dhcpv4_encode_client_id_option()
362 buf[1] = client_id->len; in dhcpv4_encode_client_id_option()
363 memcpy(&buf[2], client_id->buf, client_id->len); in dhcpv4_encode_client_id_option()
365 *buflen -= client_id->len + 2; in dhcpv4_encode_client_id_option()
367 return buf + client_id->len + 2; in dhcpv4_encode_client_id_option()
611 struct dhcpv4_client_id *client_id) in dhcpv4_send_offer() argument
627 buf = dhcpv4_encode_client_id_option(buf, &buflen, client_id); in dhcpv4_send_offer()
651 struct dhcpv4_client_id *client_id, in dhcpv4_send_ack() argument
671 buf = dhcpv4_encode_client_id_option(buf, &buflen, client_id); in dhcpv4_send_ack()
694 struct dhcpv4_client_id *client_id) in dhcpv4_send_nak() argument
709 buf = dhcpv4_encode_client_id_option(buf, &buflen, client_id); in dhcpv4_send_nak()
732 uint8_t optlen, struct dhcpv4_client_id *client_id) in dhcpv4_get_client_id() argument
736 client_id->len = sizeof(client_id->buf); in dhcpv4_get_client_id()
738 ret = dhcpv4_find_client_id_option(options, optlen, client_id->buf, in dhcpv4_get_client_id()
739 &client_id->len); in dhcpv4_get_client_id()
750 client_id->buf[0] = msg->htype; in dhcpv4_get_client_id()
751 memcpy(client_id->buf + 1, msg->chaddr, msg->hlen); in dhcpv4_get_client_id()
752 client_id->len = msg->hlen + 1; in dhcpv4_get_client_id()
857 new_slot->client_id.len = probe_ctx->slot->client_id.len; in echo_reply_handler()
858 memcpy(new_slot->client_id.buf, probe_ctx->slot->client_id.buf, in echo_reply_handler()
859 new_slot->client_id.len); in echo_reply_handler()
888 struct dhcpv4_client_id *client_id) in dhcpv4_server_probe_setup() argument
904 ctx->probe_ctx.client_id = *client_id; in dhcpv4_server_probe_setup()
919 &ctx->probe_ctx.client_id) < 0) { in dhcpv4_server_probe_timeout()
946 struct dhcpv4_client_id client_id; in dhcpv4_handle_discover() local
950 ret = dhcpv4_get_client_id(msg, options, optlen, &client_id); in dhcpv4_handle_discover()
967 slot->client_id.len == client_id.len && in dhcpv4_handle_discover()
968 memcmp(slot->client_id.buf, client_id.buf, in dhcpv4_handle_discover()
969 client_id.len) == 0) { in dhcpv4_handle_discover()
984 ret = address_provider_callback(ctx->iface, &client_id, &addr, in dhcpv4_handle_discover()
1069 ¶ms, &client_id) < 0) { in dhcpv4_handle_discover()
1081 lease_time, ¶ms, &client_id) < 0) { in dhcpv4_handle_discover()
1093 selected->client_id.len = client_id.len; in dhcpv4_handle_discover()
1094 memcpy(selected->client_id.buf, client_id.buf, client_id.len); in dhcpv4_handle_discover()
1106 struct dhcpv4_client_id client_id; in dhcpv4_handle_request() local
1118 ret = dhcpv4_get_client_id(msg, options, optlen, &client_id); in dhcpv4_handle_request()
1150 slot->client_id.len == client_id.len && in dhcpv4_handle_request()
1151 memcmp(slot->client_id.buf, client_id.buf, in dhcpv4_handle_request()
1152 client_id.len) == 0 && in dhcpv4_handle_request()
1166 ¶ms, &client_id, false) < 0) { in dhcpv4_handle_request()
1194 dhcpv4_send_nak(ctx, msg, &client_id); in dhcpv4_handle_request()
1200 if (slot->client_id.len == client_id.len && in dhcpv4_handle_request()
1201 memcmp(slot->client_id.buf, client_id.buf, in dhcpv4_handle_request()
1202 client_id.len) == 0 && in dhcpv4_handle_request()
1217 &client_id, false) < 0) { in dhcpv4_handle_request()
1226 dhcpv4_send_nak(ctx, msg, &client_id); in dhcpv4_handle_request()
1229 dhcpv4_send_nak(ctx, msg, &client_id); in dhcpv4_handle_request()
1242 dhcpv4_send_nak(ctx, msg, &client_id); in dhcpv4_handle_request()
1256 selected->client_id.len == client_id.len && in dhcpv4_handle_request()
1257 memcmp(selected->client_id.buf, client_id.buf, in dhcpv4_handle_request()
1258 client_id.len) == 0) { in dhcpv4_handle_request()
1263 ¶ms, &client_id, false) < 0) { in dhcpv4_handle_request()
1272 dhcpv4_send_nak(ctx, msg, &client_id); in dhcpv4_handle_request()
1281 struct dhcpv4_client_id client_id; in dhcpv4_handle_decline() local
1296 ret = dhcpv4_get_client_id(msg, options, optlen, &client_id); in dhcpv4_handle_decline()
1316 slot->client_id.len == client_id.len && in dhcpv4_handle_decline()
1317 memcmp(slot->client_id.buf, client_id.buf, in dhcpv4_handle_decline()
1318 client_id.len) == 0 && in dhcpv4_handle_decline()
1334 struct dhcpv4_client_id client_id; in dhcpv4_handle_release() local
1349 ret = dhcpv4_get_client_id(msg, options, optlen, &client_id); in dhcpv4_handle_release()
1361 slot->client_id.len == client_id.len && in dhcpv4_handle_release()
1362 memcmp(slot->client_id.buf, client_id.buf, in dhcpv4_handle_release()
1363 client_id.len) == 0 && in dhcpv4_handle_release()