Purpose of maapi_get_elem

what is the purpose of this api ? is there any documentation that explains each of the apis ?

Hello,

the maapi_get_elem is explained in the man pages or in the ConffD user Guide, section confd_lib_maapi.

From ConfD User Guide:

int maapi_get_elem(int sock,  int thandle,  confd_value_t *v,  const char *fmt,  ...);

This reads a value from the path in fmt and writes the result into the result parameter confd_value_t. The path must lead to a leaf node in the data tree. Note that for the C_BUF, C_BINARY,C_LIST, C_OBJECTREF, C_OID, C_QNAME, and C_HEXSTR confd_value_t types the buffer(s) pointed to are allocated using malloc(3), it is up to the user of this interface to free them using confd_free_value().