70 struct nc_session*
nc_session_dummy(
const char* sid,
const char* username,
const char* hostname,
struct nc_cpblts *capabilities);
211 int nc_cpblts_add(
struct nc_cpblts *capabilities,
const char* capability_string);
223 int nc_cpblts_remove(
struct nc_cpblts *capabilities,
const char* capability_string);
233 int nc_cpblts_enabled(
const struct nc_session* session,
const char* capability_string);
244 const char*
nc_cpblts_get(
const struct nc_cpblts *c,
const char* capability_string);
const char * nc_cpblts_iter_next(struct nc_cpblts *c)
Get the next capability string from the given NETCONF capabilities structure.
NC_TRANSPORT
Supported NETCONF transport protocols enumeration. To change currently used transport protocol...
Definition: netconf.h:410
void nc_cpblts_free(struct nc_cpblts *c)
Free NETCONF capabilities structure.
int nc_session_monitor(struct nc_session *session)
Add the session into the internal list of monitored sessions that are returned as part of netconf-sta...
void nc_cpblts_iter_start(struct nc_cpblts *c)
Move NETCONF capabilities structure iterator to the beginning of the capability strings list...
Functions implementing transport layer for NETCONF.
NC_MSG_TYPE nc_session_recv_notif(struct nc_session *session, int timeout, nc_ntf **ntf)
Receive a <notification> message from the specified NETCONF session. This function is supposed to be ...
struct nc_cpblts * nc_session_get_cpblts(const struct nc_session *session)
Get list of capabilities associated with the session.
NC_TRANSPORT nc_session_get_transport(const struct nc_session *session)
Get transport protocol used for the NETCONF session.
struct nc_session * nc_session_dummy(const char *sid, const char *username, const char *hostname, struct nc_cpblts *capabilities)
Create a disconnected session structure.
int nc_msgid_compare(const nc_msgid id1, const nc_msgid id2)
Compare two message IDs if they are the same.
int nc_cpblts_add(struct nc_cpblts *capabilities, const char *capability_string)
Add another capability string into the NETCONF capabilities structure.
NC_SESSION_STATUS
Enumeration of the possible states of a NETCONF session.
Definition: netconf.h:109
struct nc_msg nc_reply
reply message.
Definition: netconf.h:62
int nc_cpblts_enabled(const struct nc_session *session, const char *capability_string)
Check if the given capability is supported by the session.
NC_SESSION_STATUS nc_session_get_status(const struct nc_session *session)
Get information about the session current status.
int nc_session_send_notif(struct nc_session *session, const nc_ntf *ntf)
Send <notification> message from server to client.
int nc_session_notif_allowed(struct nc_session *session)
Tell me if the notification subscription is allowed on the given session.
struct nc_msg nc_ntf
Event notification message.
Definition: netconf.h:68
struct nc_cpblts * nc_session_get_cpblts_default(void)
Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...
int nc_cpblts_count(const struct nc_cpblts *c)
Get the number of capabilities in the structure.
const nc_msgid nc_session_send_rpc(struct nc_session *session, nc_rpc *rpc)
Send <rpc> request via specified NETCONF session. This function is supposed to be performed only by N...
int nc_session_get_eventfd(const struct nc_session *session)
Get the input file descriptor to asynchronous control of input events.
struct nc_cpblts * nc_cpblts_new(const char *const list[])
Create a new NETCONF capabilities structure.
struct nc_msg nc_rpc
rpc message.
Definition: netconf.h:56
const nc_msgid nc_session_send_reply(struct nc_session *session, const nc_rpc *rpc, const nc_reply *reply)
Send <rpc-reply> response via specified NETCONF session. This function is supposed to be performed on...
NC_MSG_TYPE
Enumeration of NETCONF message types.
Definition: netconf.h:136
const char * nc_cpblts_get(const struct nc_cpblts *c, const char *capability_string)
Get complete capability string including parameters.
NC_MSG_TYPE nc_session_recv_reply(struct nc_session *session, int timeout, nc_reply **reply)
Receive <rpc-reply> response from the specified NETCONF session. This function is supposed to be perf...
int nc_session_get_version(const struct nc_session *session)
Get NETCONF protocol version used in the given session.
int nc_cpblts_remove(struct nc_cpblts *capabilities, const char *capability_string)
Remove the specified capability string from the NETCONF capabilities structure.
const char * nc_session_get_port(const struct nc_session *session)
Get NETCONF session port number.
#define nc_msgid
Type representing NETCONF message-id attribute.
Definition: netconf.h:91
void nc_session_free(struct nc_session *session)
Cleanup the session structure and free all the allocated resources.
NC_MSG_TYPE nc_session_send_recv(struct nc_session *session, nc_rpc *rpc, nc_reply **reply)
Send <rpc> and receive <rpc-reply> via the specified NETCONF session.
libnetconf's general public functions and structures definitions.
const char * nc_session_get_user(const struct nc_session *session)
Get NETCONF session username.
NC_MSG_TYPE nc_session_recv_rpc(struct nc_session *session, int timeout, nc_rpc **rpc)
Receive <rpc> request from the specified NETCONF session. This function is supposed to be performed o...
const char * nc_session_get_id(const struct nc_session *session)
Get NETCONF session ID.
const char * nc_session_get_host(const struct nc_session *session)
Get NETCONF session host.