Lines Matching refs:optlen
276 int dhcp6_lease_add_dns(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) { in dhcp6_lease_add_dns() argument
278 assert(optval || optlen == 0); in dhcp6_lease_add_dns()
280 if (optlen == 0) in dhcp6_lease_add_dns()
283 return dhcp6_option_parse_addresses(optval, optlen, &lease->dns, &lease->dns_count); in dhcp6_lease_add_dns()
298 int dhcp6_lease_add_domains(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) { in dhcp6_lease_add_domains() argument
303 assert(optval || optlen == 0); in dhcp6_lease_add_domains()
305 if (optlen == 0) in dhcp6_lease_add_domains()
308 r = dhcp6_option_parse_domainname_list(optval, optlen, &domains); in dhcp6_lease_add_domains()
326 int dhcp6_lease_add_ntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) { in dhcp6_lease_add_ntp() argument
330 assert(optval || optlen == 0); in dhcp6_lease_add_ntp()
332 for (size_t offset = 0; offset < optlen;) { in dhcp6_lease_add_ntp()
337 r = dhcp6_option_parse(optval, optlen, &offset, &subopt, &sublen, &subval); in dhcp6_lease_add_ntp()
374 int dhcp6_lease_add_sntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) { in dhcp6_lease_add_sntp() argument
376 assert(optval || optlen == 0); in dhcp6_lease_add_sntp()
378 if (optlen == 0) in dhcp6_lease_add_sntp()
382 return dhcp6_option_parse_addresses(optval, optlen, &lease->sntp, &lease->sntp_count); in dhcp6_lease_add_sntp()
415 int dhcp6_lease_set_fqdn(sd_dhcp6_lease *lease, const uint8_t *optval, size_t optlen) { in dhcp6_lease_set_fqdn() argument
420 assert(optval || optlen == 0); in dhcp6_lease_set_fqdn()
422 if (optlen == 0) in dhcp6_lease_set_fqdn()
425 if (optlen < 2) in dhcp6_lease_set_fqdn()
430 r = dhcp6_option_parse_domainname(optval + 1, optlen - 1, &fqdn); in dhcp6_lease_set_fqdn()
465 size_t optlen; in dhcp6_lease_parse_message() local
468 r = dhcp6_option_parse(message->options, len, &offset, &optcode, &optlen, &optval); in dhcp6_lease_parse_message()
478 r = dhcp6_lease_set_clientid(lease, optval, optlen); in dhcp6_lease_parse_message()
489 r = dhcp6_lease_set_serverid(lease, optval, optlen); in dhcp6_lease_parse_message()
496 if (optlen != 1) in dhcp6_lease_parse_message()
508 r = dhcp6_option_parse_status(optval, optlen, &msg); in dhcp6_lease_parse_message()
528 … r = dhcp6_option_parse_ia(client, client->ia_na.header.id, optcode, optlen, optval, &ia); in dhcp6_lease_parse_message()
551 … r = dhcp6_option_parse_ia(client, client->ia_pd.header.id, optcode, optlen, optval, &ia); in dhcp6_lease_parse_message()
574 r = dhcp6_lease_add_dns(lease, optval, optlen); in dhcp6_lease_parse_message()
581 r = dhcp6_lease_add_domains(lease, optval, optlen); in dhcp6_lease_parse_message()
588 r = dhcp6_lease_add_ntp(lease, optval, optlen); in dhcp6_lease_parse_message()
595 r = dhcp6_lease_add_sntp(lease, optval, optlen); in dhcp6_lease_parse_message()
602 r = dhcp6_lease_set_fqdn(lease, optval, optlen); in dhcp6_lease_parse_message()
609 if (optlen != 4) in dhcp6_lease_parse_message()