CliXoN
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Enumerations | Functions | Variables
netconf_lib.h File Reference

Go to the source code of this file.

Enumerations

enum  target_type { RUNNING, CANDIDATE }
 
enum  transport_type { NETCONF_SSH, NETCONF_SOAP }
 
enum  test_option { SET, TEST_THEN_SET, TEST_ONLY }
 
enum  error_option { STOP_ON_ERROR, CONTINUE_ON_ERROR }
 

Functions

int add_preamble (cbuf *xf)
 
int add_postamble (cbuf *xf)
 
int add_error_preamble (cbuf *xf, char *reason)
 
int detect_endtag (char *tag, char ch, int *state)
 
char * netconf_get_target (cxobj *xn, char *path)
 
int add_error_postamble (cbuf *xf)
 
int netconf_output (int s, cbuf *xf, char *msg)
 

Variables

enum transport_type transport
 
int cc_closed
 

Enumeration Type Documentation

Enumerator
STOP_ON_ERROR 
CONTINUE_ON_ERROR 
Enumerator
RUNNING 
CANDIDATE 
Enumerator
SET 
TEST_THEN_SET 
TEST_ONLY 
Enumerator
NETCONF_SSH 
NETCONF_SOAP 

Function Documentation

int add_error_postamble ( cbuf *  xf)
int add_error_preamble ( cbuf *  xf,
char *  reason 
)
int add_postamble ( cbuf *  xf)
int add_preamble ( cbuf *  xf)
int detect_endtag ( char *  tag,
char  ch,
int *  state 
)

Look for a text pattern in an input string, one char at a time

Parameters
[in]tagWhat to look for
[in]chNew input character
[in,out]stateA state integer holding how far we have parsed.
Return values
0No, we havent detected end tag
1Yes, we have detected end tag! XXX: move to clicon_xml?
char* netconf_get_target ( cxobj *  xn,
char *  path 
)

Get "target" attribute, return actual database given candidate or running Caller must do error handling

Return values
dbnameActual database file name
int netconf_output ( int  s,
cbuf *  xf,
char *  msg 
)

Send netconf message from cbuf on socket

Parameters
[in]s
[in]cbCligen buffer that contains the XML message
[in]msgOnly for debug

Variable Documentation

int cc_closed
enum transport_type transport