Lines Matching refs:len

21         int len;  member
86 size_t len = sizeof(DHCPMessage) + optlen; in test_message_init() local
89 message = malloc0(len); in test_message_init()
105 assert_se(dhcp_option_parse(message, len, NULL, NULL, NULL) >= 0); in test_message_init()
112 size_t len = sizeof(DHCPMessage) + optlen; in create_message() local
114 message = malloc0(len); in create_message()
144 static int test_options_cb(uint8_t code, uint8_t len, const void *option, void *userdata) { in test_options_cb() argument
151 assert_se((!desc && !code && !len) || desc); in test_options_cb()
165 desclen = &desc->len; in test_options_cb()
197 len, optlen); in test_options_cb()
200 assert_se(len == optlen); in test_options_cb()
202 for (unsigned i = 0; i < len; i++) { in test_options_cb()
218 if (desc->pos != -1 && desc->pos == desc->len) in test_options_cb()
253 optlen = desc->len; in test_options()
274 …_cleanup_free_ DHCPMessage *message = create_message(&desc->options[0], desc->len, NULL, 0, NULL, … in test_option_removal()
276 … assert_se(dhcp_option_parse(message, sizeof(DHCPMessage) + desc->len, NULL, NULL, NULL) >= 0); in test_option_removal()
277 …assert_se((desc->len = dhcp_option_remove_option(message->options, desc->len, SD_DHCP_OPTION_MESSA… in test_option_removal()
278 … assert_se(dhcp_option_parse(message, sizeof(DHCPMessage) + desc->len, NULL, NULL, NULL) < 0); in test_option_removal()
294 size_t offset = 0, len, pos; in test_option_set() local
317 len = 11; in test_option_set()
318 while (pos < len && the_options[pos] != SD_DHCP_OPTION_END) { in test_option_set()
319 assert_se(dhcp_option_append(result, len, &offset, DHCP_OVERLOAD_SNAME, in test_option_set()
329 if (pos < len) in test_option_set()