Lines Matching refs:datalen

109 static uint8_t *dhcpv4_find_option(uint8_t *data, size_t datalen,  in dhcpv4_find_option()  argument
114 while (datalen > 0) { in dhcpv4_find_option()
123 datalen--; in dhcpv4_find_option()
132 if (datalen < 2) { in dhcpv4_find_option()
138 if (datalen < len + 2) { in dhcpv4_find_option()
150 datalen -= len + 2; in dhcpv4_find_option()
156 static int dhcpv4_find_message_type_option(uint8_t *data, size_t datalen, in dhcpv4_find_message_type_option() argument
162 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_message_type_option()
177 static int dhcpv4_find_server_id_option(uint8_t *data, size_t datalen, in dhcpv4_find_server_id_option() argument
183 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_server_id_option()
198 static int dhcpv4_find_client_id_option(uint8_t *data, size_t datalen, in dhcpv4_find_client_id_option() argument
204 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_client_id_option()
225 static int dhcpv4_find_requested_ip_option(uint8_t *data, size_t datalen, in dhcpv4_find_requested_ip_option() argument
231 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_requested_ip_option()
246 static int dhcpv4_find_ip_lease_time_option(uint8_t *data, size_t datalen, in dhcpv4_find_ip_lease_time_option() argument
252 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_ip_lease_time_option()
268 uint8_t *data, size_t datalen, in dhcpv4_find_parameter_request_list_option() argument
274 opt = dhcpv4_find_option(data, datalen, &optlen, in dhcpv4_find_parameter_request_list_option()
1426 size_t datalen) in dhcpv4_process_data() argument
1432 if (datalen < sizeof(struct dhcp_msg)) { in dhcpv4_process_data()
1445 datalen -= sizeof(struct dhcp_msg); in dhcpv4_process_data()
1448 if (datalen < (SIZE_OF_SNAME + SIZE_OF_FILE + SIZE_OF_MAGIC_COOKIE)) { in dhcpv4_process_data()
1453 datalen -= SIZE_OF_SNAME + SIZE_OF_FILE + SIZE_OF_MAGIC_COOKIE; in dhcpv4_process_data()
1456 ret = dhcpv4_find_message_type_option(data, datalen, &msgtype); in dhcpv4_process_data()
1466 dhcpv4_handle_discover(ctx, msg, data, datalen); in dhcpv4_process_data()
1469 dhcpv4_handle_request(ctx, msg, data, datalen); in dhcpv4_process_data()
1472 dhcpv4_handle_decline(ctx, msg, data, datalen); in dhcpv4_process_data()
1475 dhcpv4_handle_release(ctx, msg, data, datalen); in dhcpv4_process_data()
1478 dhcpv4_handle_inform(ctx, msg, data, datalen); in dhcpv4_process_data()