libnetconf2
1.1.48
NETCONF library for clients and servers
|
libnetconf2 session manipulation More...
#include "netconf.h"
Go to the source code of this file.
Functions | |
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... | |
uint32_t | nc_session_get_killed_by (const struct nc_session *session) |
Get session killer session ID. More... | |
uint32_t | nc_session_get_id (const struct nc_session *session) |
Get session ID. More... | |
uint32_t | nc_session_get_refcnt (const struct nc_session *session) |
Get reference count. More... | |
void | nc_session_reference (struct nc_session *session) |
Put a reference to the session in order to avoid unwanted release of session. More... | |
void | nc_session_dereference (struct nc_session *session) |
Take reference from the session. More... | |
int | nc_session_get_version (const struct nc_session *session) |
Get session NETCONF version. 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... | |
const char * | nc_session_get_host (const struct nc_session *session) |
Get session host. More... | |
uint16_t | nc_session_get_port (const struct nc_session *session) |
Get session port. More... | |
const char * | nc_session_get_path (const struct nc_session *session) |
Get session path (unix socket only). More... | |
struct ly_ctx * | nc_session_get_ctx (const struct nc_session *session) |
Get session context. More... | |
void | nc_session_set_data (struct nc_session *session, void *data) |
Assign arbitrary data to a session. More... | |
void * | nc_session_get_data (const struct nc_session *session) |
Get the data assigned to a session. More... | |
void | nc_session_free (struct nc_session *session, void(*data_free)(void *)) |
Free the NETCONF session object. More... | |
void | nc_thread_destroy (void) |
Free all the dynamically allocated thread-specific libssl/libcrypto resources. 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 |
enum NC_TLS_CTN_MAPTYPE |
Enumeration of cert-to-name mapping types.
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 |
enum NC_SSH_KEY_TYPE |
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. |
uint32_t nc_session_get_refcnt | ( | const struct nc_session * | session | ) |
Get reference count.
[in] | session | Session to get the information from. |
void nc_session_reference | ( | struct nc_session * | session | ) |
Put a reference to the session in order to avoid unwanted release of session.
[in] | session | Session to get the information from. |
void nc_session_dereference | ( | struct nc_session * | session | ) |
Take reference from the session.
[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_get_path | ( | const struct nc_session * | session | ) |
Get session path (unix socket only).
[in] | session | Session to get the information from. |
struct ly_ctx* nc_session_get_ctx | ( | const struct nc_session * | session | ) |
Get session context.
[in] | session | Session to get the information from. |
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. |
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. |
void nc_thread_destroy | ( | void | ) |
Free all the dynamically allocated thread-specific libssl/libcrypto resources.
This function should be called only if init (nc_client_init(), respectively nc_server_init()) was called. Call it in every thread your application creates just before the thread exits. In the last thread (usually the main one) call nc_client_destroy(), respectively nc_server_destroy().