I assume you mean type
type inet:ip-address (found in
ietf-inet-types.yang) and you have
confd_value_t value. You just need to extract
IPV6. is it correct?
In that case (as described in ConfD User Gude) you shoudl first check
type element (if it is
C_IPV6) and according to taht extract ipv4 or ipv6 using
The union type has no special confdvalue_t representation - elements are represented as one of the member types according to the current value instantiation. This means that for unions that comprise different "primitive" types, applications must check the type element to determine the type, and the type safe alternatives to the cdb_get() and maapi_get_elem() functions can not be used.
inet:ip-addressThe ip-address type represents an IP address and is IP version neutral. The format of the textual representations implies the IP version.This is a union of the inet:ipv4-address and inet:ipv6-address types defined below. The representation is thus identical to the representation for one of these types.