Lines Matching refs:len
66 size_t len = strlen(*s); in option_append() local
68 if (len > 255 || len == 0) in option_append()
71 total += 1 + len; in option_append()
82 size_t len = strlen(*s); in option_append() local
84 options[*offset] = len; in option_append()
85 memcpy(&options[*offset + 1], *s, len); in option_append()
86 *offset += 1 + len; in option_append()
279 uint8_t code, len; in parse_options() local
297 len = options[offset ++]; in parse_options()
299 if (buflen < offset + len) in parse_options()
306 if (len != 1) in parse_options()
315 if (len == 0) in parse_options()
322 if (memchr(option, 0, len - 1)) in parse_options()
325 string = memdup_suffix0((const char *) option, len); in parse_options()
337 if (len != 1) in parse_options()
347 cb(code, len, option, userdata); in parse_options()
352 offset += len; in parse_options()
361 int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_callback_t cb, void *userdata, … in dhcp_option_parse() argument
370 if (len < sizeof(DHCPMessage)) in dhcp_option_parse()
373 len -= sizeof(DHCPMessage); in dhcp_option_parse()
375 … r = parse_options(message->options, len, &overload, &message_type, &error_message, cb, userdata); in dhcp_option_parse()