IPv4/6 Prefix as key

Hello,

What modifier to use in keypath for ipv4-prefex ?

Regards

Hello, please can you specify what modifier means? Is it type of the confd_value_t?

It is the name the confd_lib_cdb(3) man page uses for the printf-like things that can be given in CDB/MAAPI paths, see the PATHS section. And the answer to the question is that there is no specific “modifier” for individual confd_value_t types like C_IPV4PREFIX - there are a few for common C types, but for confd_value_t there is the generic %x, which covers all confd_value_t types - as long as the value is actually represented as a confd_value_t.

ok… I will try %x thanks for help…

@mnovak I ment modifier like %… as @per rightly mentioned … key path like “machine_id/ip{%ip4 %x}” , “10.10.10.1”, “24”

I hope that the above is just “pseudo code”/“conceptual”, because you certainly can’t give strings as the “arguments” for either %ip4 or %x - for strings you have to use %s. See the examples in the PATHS section of confd_lib_cdb(3).