|
libnetconf2
4.6.6
NETCONF server and client library in C.
|
libnetconf2 session manipulation More...
#include "netconf.h"Go to the source code of this file.
Functions | |
| const char * | nc_session_cpblt (const struct nc_session *session, const char *capab) |
| Check capability presence in a session. More... | |
| void | nc_session_free (struct nc_session *session, void(*data_free)(void *)) |
| Free the NETCONF session object. More... | |
| const char *const * | nc_session_get_cpblts (const struct nc_session *session) |
| Get session capabilities. More... | |
| const struct ly_ctx * | nc_session_get_ctx (const struct nc_session *session) |
| Get session context. More... | |
| void * | nc_session_get_data (const struct nc_session *session) |
| Get the data assigned to a session. More... | |
| const char * | nc_session_get_host (const struct nc_session *session) |
| Get session host. More... | |
| uint32_t | nc_session_get_id (const struct nc_session *session) |
| Get session ID. More... | |
| uint32_t | nc_session_get_killed_by (const struct nc_session *session) |
| Get session killer session ID. More... | |
| const char * | nc_session_get_path (const struct nc_session *session) |
| Get session path (unix socket only). More... | |
| uint16_t | nc_session_get_port (const struct nc_session *session) |
| Get session port. More... | |
| NC_STATUS | nc_session_get_status (const struct nc_session *session) |
| Get session status. More... | |
| NC_SESSION_TERM_REASON | nc_session_get_term_reason (const struct nc_session *session) |
| Get session termination reason. More... | |
| NC_TRANSPORT_IMPL | nc_session_get_ti (const struct nc_session *session) |
| Get session transport used. More... | |
| const char * | nc_session_get_username (const struct nc_session *session) |
| Get session username. More... | |
| int | nc_session_get_version (const struct nc_session *session) |
| Get session NETCONF version. More... | |
| int | nc_session_is_callhome (const struct nc_session *session) |
| Learn whether a session was created using Call Home or not. More... | |
| void | nc_session_set_data (struct nc_session *session, void *data) |
| Assign arbitrary data to a session. More... | |
| const char * | nc_session_ssh_get_banner (const struct nc_session *session) |
| Get the SSH banner sent by the peer. More... | |
| const char * | nc_session_ssh_get_protocol_string (const struct nc_session *session) |
| Get the SSH protocol identification string sent by the peer. More... | |
| const char * | nc_yang_module_dir (void) |
| Get the directory with internal libnetconf2 YANG modules. More... | |
libnetconf2 session manipulation
This source code is licensed under BSD 3-Clause License (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at
https://opensource.org/licenses/BSD-3-Clause
Definition in file session.h.
| enum NC_SSH_AUTH_TYPE |
Enumeration of host key checking and known_hosts entry adding modes.
| enum NC_TLS_CTN_MAPTYPE |
Enumeration of cert-to-name mapping types.
| enum NC_PROT_VERSION |
| enum NC_STATUS |
Enumeration of possible session statuses.
| Enumerator | |
|---|---|
| NC_STATUS_ERR | error return code for function getting the session status |
| NC_STATUS_STARTING | session is not yet fully initiated |
| NC_STATUS_CLOSING | session is being closed |
| NC_STATUS_INVALID | session is not running and is supposed to be closed (nc_session_free()) |
| NC_STATUS_RUNNING | up and running |
| enum NC_TRANSPORT_IMPL |
Enumeration of transport implementations (ways how libnetconf implements NETCONF transport protocol)
| enum NC_CH_CONN_TYPE |
| enum NC_CH_START_WITH |
| NC_STATUS nc_session_get_status | ( | const struct nc_session * | session | ) |
Get session status.
| [in] | session | Session to get the information from. |
| NC_SESSION_TERM_REASON nc_session_get_term_reason | ( | const struct nc_session * | session | ) |
Get session termination reason.
| [in] | session | Session to get the information from. |
| uint32_t nc_session_get_killed_by | ( | const struct nc_session * | session | ) |
Get session killer session ID.
| [in] | session | Session to get the information from. |
| uint32_t nc_session_get_id | ( | const struct nc_session * | session | ) |
Get session ID.
| [in] | session | Session to get the information from. |
| int nc_session_get_version | ( | const struct nc_session * | session | ) |
Get session NETCONF version.
| [in] | session | Session to get the information from. |
| NC_TRANSPORT_IMPL nc_session_get_ti | ( | const struct nc_session * | session | ) |
Get session transport used.
| [in] | session | Session to get the information from. |
| const char* nc_session_get_username | ( | const struct nc_session * | session | ) |
Get session username.
| [in] | session | Session to get the information from. |
| const char* nc_session_get_host | ( | const struct nc_session * | session | ) |
Get session host.
| [in] | session | Session to get the information from. |
| uint16_t nc_session_get_port | ( | const struct nc_session * | session | ) |
Get session port.
| [in] | session | Session to get the information from. |
| const char* nc_session_ssh_get_protocol_string | ( | const struct nc_session * | session | ) |
Get the SSH protocol identification string sent by the peer.
| [in] | session | Session to get the protocol string from. |
| const char* nc_session_ssh_get_banner | ( | const struct nc_session * | session | ) |
Get the SSH banner sent by the peer.
| [in] | session | Session to get the banner from. |
| const char* nc_session_get_path | ( | const struct nc_session * | session | ) |
Get session path (unix socket only).
| [in] | session | Session to get the information from. |
| const struct ly_ctx* nc_session_get_ctx | ( | const struct nc_session * | session | ) |
Get session context.
| [in] | session | Session to get the information from. |
| const char* const* nc_session_get_cpblts | ( | const struct nc_session * | session | ) |
Get session capabilities.
| [in] | session | Session to get the information from. |
session capabilities. | const char* nc_session_cpblt | ( | const struct nc_session * | session, |
| const char * | capab | ||
| ) |
Check capability presence in a session.
| [in] | session | Session to check. |
| [in] | capab | Capability to look for, capability with any additional suffix will match. |
| void nc_session_set_data | ( | struct nc_session * | session, |
| void * | data | ||
| ) |
Assign arbitrary data to a session.
| [in] | session | Session to modify. |
| [in] | data | Data to be stored in the session. |
| void* nc_session_get_data | ( | const struct nc_session * | session | ) |
Get the data assigned to a session.
| [in] | session | Session to get the data from. |
| int nc_session_is_callhome | ( | const struct nc_session * | session | ) |
Learn whether a session was created using Call Home or not.
| [in] | session | Session to get the information from. |
| void nc_session_free | ( | struct nc_session * | session, |
| void(*)(void *) | data_free | ||
| ) |
Free the NETCONF session object.
| [in] | session | Object to free. |
| [in] | data_free | Session user data destructor. |
| const char* nc_yang_module_dir | ( | void | ) |
Get the directory with internal libnetconf2 YANG modules.