libnetconf  0.10.0-146_trunk
NETCONF Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NETCONF rpc-reply (libxml2)

libnetconf's functions for handling the NETCONF <rpc-reply> messages. These functions accepts parameters as libxml2 structures. More...

Functions

nc_replyncxml_reply_build (xmlDocPtr reply_dump)
 Build <rpc-reply> message from the libxml2 document structure. This is the reverse function of the ncxml_reply_dump(). More...
 
nc_replyncxml_reply_data (const xmlNodePtr data)
 Create rpc-reply response with <data> content. More...
 
nc_replyncxml_reply_data_ns (const xmlNodePtr data, const char *ns)
 Create rpc-reply response with <data> content in the specified namespace. More...
 
xmlDocPtr ncxml_reply_dump (const nc_reply *reply)
 Dump the rpc-reply message into a libxml2 document structure. More...
 
xmlNodePtr ncxml_reply_get_data (const nc_reply *reply)
 Get <data> element in <rpc-reply> including its content. More...
 

Detailed Description

libnetconf's functions for handling the NETCONF <rpc-reply> messages. These functions accepts parameters as libxml2 structures.

Function Documentation

nc_reply* ncxml_reply_build ( xmlDocPtr  reply_dump)

Build <rpc-reply> message from the libxml2 document structure. This is the reverse function of the ncxml_reply_dump().

Parameters
[in]reply_dumpXML document structure with the NETCONF <rpc-reply> message. The structure is integrated into the internal rpc structure and caller should not access (or free) the given XML document anymore.
Returns
Complete reply structure used by libnetconf's functions.
nc_reply* ncxml_reply_data ( const xmlNodePtr  data)

Create rpc-reply response with <data> content.

Parameters
dataContent (possibly a node list) for the <rpc-reply>'s <data> element.
Returns
Created <rpc-reply> message.
nc_reply* ncxml_reply_data_ns ( const xmlNodePtr  data,
const char *  ns 
)

Create rpc-reply response with <data> content in the specified namespace.

Parameters
dataContent (possibly a node list) for the <rpc-reply>'s <data> element.
[in]nsDefault namespace for the data element.
Returns
Created <rpc-reply> message.
xmlDocPtr ncxml_reply_dump ( const nc_reply reply)

Dump the rpc-reply message into a libxml2 document structure.

Parameters
[in]replyrpc-reply message.
Returns
XML document of the NETCONF's <rpc-reply> message. Caller is supposed to free the returned structure with xmlFreeDoc().
xmlNodePtr ncxml_reply_get_data ( const nc_reply reply)

Get <data> element in <rpc-reply> including its content.

Parameters
replyrpc-reply message.
Returns
XML node <data> with its content. <data> is included to provide a valid (non-NULL) output in case of empty data returned (e.g. when all the data are filterred out). Caller is supposed to free the returned structure with xmlFreeNode().