Lines Matching refs:ia
331 int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, const DHCP6IA *ia) { in dhcp6_option_append_ia() argument
341 assert_return(ia, -EINVAL); in dhcp6_option_append_ia()
345 switch (ia->type) { in dhcp6_option_append_ia()
350 .id = ia->header.id, in dhcp6_option_append_ia()
357 .id = ia->header.id, in dhcp6_option_append_ia()
378 LIST_FOREACH(addresses, addr, ia->addresses) { in dhcp6_option_append_ia()
379 if (ia->type == SD_DHCP6_OPTION_IA_PD) in dhcp6_option_append_ia()
389 return option_append_hdr(&ia_hdr, &ia_buflen, ia->type, len); in dhcp6_option_append_ia()
588 static int dhcp6_option_parse_ia_address(sd_dhcp6_client *client, DHCP6IA *ia, const uint8_t *data,… in dhcp6_option_parse_ia_address() argument
593 assert(ia); in dhcp6_option_parse_ia_address()
596 if (!IN_SET(ia->type, SD_DHCP6_OPTION_IA_NA, SD_DHCP6_OPTION_IA_TA)) in dhcp6_option_parse_ia_address()
627 LIST_PREPEND(addresses, ia->addresses, TAKE_PTR(a)); in dhcp6_option_parse_ia_address()
631 static int dhcp6_option_parse_ia_pdprefix(sd_dhcp6_client *client, DHCP6IA *ia, const uint8_t *data… in dhcp6_option_parse_ia_pdprefix() argument
636 assert(ia); in dhcp6_option_parse_ia_pdprefix()
639 if (ia->type != SD_DHCP6_OPTION_IA_PD) in dhcp6_option_parse_ia_pdprefix()
670 LIST_PREPEND(addresses, ia->addresses, TAKE_PTR(a)); in dhcp6_option_parse_ia_pdprefix()
682 _cleanup_(dhcp6_ia_freep) DHCP6IA *ia = NULL; in dhcp6_option_parse_ia()
716 ia = new(DHCP6IA, 1); in dhcp6_option_parse_ia()
717 if (!ia) in dhcp6_option_parse_ia()
720 *ia = (DHCP6IA) { in dhcp6_option_parse_ia()
723 memcpy(&ia->header, option_data, header_len); in dhcp6_option_parse_ia()
727 if (ia->header.id != iaid) in dhcp6_option_parse_ia()
733 lt_t1 = be32toh(ia->header.lifetime_t1); in dhcp6_option_parse_ia()
734 lt_t2 = be32toh(ia->header.lifetime_t2); in dhcp6_option_parse_ia()
756 r = dhcp6_option_parse_ia_address(client, ia, subdata, subdata_len); in dhcp6_option_parse_ia()
764 r = dhcp6_option_parse_ia_pdprefix(client, ia, subdata, subdata_len); in dhcp6_option_parse_ia()
792 if (!ia->addresses) in dhcp6_option_parse_ia()
796 *ret = TAKE_PTR(ia); in dhcp6_option_parse_ia()