Hello,
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 IPV4 or IPV6. is it correct?
In that case (as described in ConfD User Gude) you shoudl first check type element (if it is C_IPV4 or C_IPV6) and according to taht extract ipv4 or ipv6 using CONFD_GET_IPV4 or CONFD_GET_IPV6
_The union type has no special confd_value_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.
Our application should support both V4 and V6 at a time.
So if i try to retrieve V4 using confd_get_IPV4() func it will work. Then if the user gives V6 then the assertion fails stating that it accepts c_IPV4 .
So how can we make it possible to retrieve both values support from application ?