38#include <sys/select.h>
196#if defined(WITH_SNMP) && defined(WITH_RESTCONF)
248 const char *client_addr);
269 boolean clear_locks);
GET1 and GET2 Callback Support.
void agt_ses_thread_kill_session(ses_cb_t *scb, ses_id_t killedby, ses_term_reason_t termreason)
Kill the specified session; called from session thread.
Definition: agt_ses.c:1219
void agt_ses_free_dummy_session(ses_cb_t *scb)
Free a dummy session control block.
Definition: agt_ses.c:695
boolean agt_ses_request_close(ses_cb_t *scb, ses_id_t killedby, ses_term_reason_t termreason)
Start the close of the specified session.
Definition: agt_ses.c:1157
status_t agt_ses_get_outNotifications(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the outNotifications counter
Definition: agt_ses.c:2194
void agt_ses_go_active(void)
Activate MGMT sessions because YP-HA mode is active.
Definition: agt_ses.c:2488
void agt_ses_set_max_user_sessions(uint16 val)
Set the max-user-sessions parameter.
Definition: agt_ses.c:2736
void agt_ses_set_max_cli_sessions(uint16 val)
Set the max-cli-sessions parameter.
Definition: agt_ses.c:2717
boolean agt_ses_max_cli_sessions(void)
Check if max-cli-sessions parameter has been reached.
Definition: agt_ses.c:2585
ses_cb_t * agt_ses_new_session_tls(ses_transport_t transport, int fd, const char *client_addr)
Create a real agent session control block for TLS.
Definition: agt_ses.c:888
status_t agt_ses_set_dummy_session_acm(ses_cb_t *dummy_session, ses_id_t use_sid)
Set the session ID and username of the user that will be responsible for the rollback if needed.
Definition: agt_ses.c:577
status_t agt_ses_get_inRpcs(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the inRpcs counter
Definition: agt_ses.c:2104
status_t agt_ses_get_session_outNotifications(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the outNotifications counter
Definition: agt_ses.c:2374
status_t agt_ses_get_inBadHellos(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the inBadHellos counter
Definition: agt_ses.c:2074
status_t agt_ses_get_droppedSessions(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the droppedSessions counter
Definition: agt_ses.c:2224
status_t agt_ses_get_outRpcErrors(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the outRpcErrors counter
Definition: agt_ses.c:2164
void agt_ses_check_timeouts(ses_id_t sid)
Check if any sessions need to be dropped because they have been idle too long.
Definition: agt_ses.c:1811
ses_cb_t * agt_ses_new_dummy_session(void)
Create a dummy session control block.
Definition: agt_ses.c:537
ses_cb_t * agt_ses_get_session_for_id(ses_id_t sid)
get the session for the supplied sid
Definition: agt_ses.c:2438
void agt_ses_set_hello_timeout(uint32 val)
Set the hello-timeout parameter.
Definition: agt_ses.c:2755
status_t agt_ses_get_session_inRpcs(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the session/inRpcs counter
Definition: agt_ses.c:2254
status_t agt_ses_get_inBadRpcs(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the inBadRpcs counter
Definition: agt_ses.c:2134
void agt_ses_kill_session(ses_cb_t *scb, ses_id_t killedby, ses_term_reason_t termreason)
Kill the specified session.
Definition: agt_ses.c:1314
ses_cb_t * agt_ses_new_snmp_session(void)
Create a dummy SNMP session control block.
Definition: agt_ses.c:790
void agt_ses_set_max_sessions(uint16 val)
Set the max-sessions parameter.
Definition: agt_ses.c:2698
boolean agt_ses_session_id_valid(ses_id_t sid)
Check if a session-id is for an active session.
Definition: agt_ses.c:1132
boolean agt_ses_process_first_ready(boolean ycontrol)
Check the readyQ and process the first message, if any.
Definition: agt_ses.c:1576
void agt_ses_free_coap_session(ses_cb_t *scb)
Free a dummy CoAP session control block.
Definition: agt_ses.c:764
void agt_ses_invalidate_session_acm_caches(void)
Invalidate all session ACM caches so they will be rebuilt.
Definition: agt_ses.c:2410
boolean agt_ses_max_user_sessions(const xmlChar *user)
Check if max-user-sessions parameter has been reached.
Definition: agt_ses.c:2632
ses_cb_t * agt_ses_new_session(ses_transport_t transport, int fd)
Create a real server session control block.
Definition: agt_ses.c:863
uint32 agt_ses_mgmt_session_count(void)
Get number of management sessions open.
Definition: agt_ses.c:2458
void agt_ses_go_standby(void)
Deactivate MGMT sessions because YP-HA mode is standby.
Definition: agt_ses.c:2503
void agt_ses_cleanup(void)
Cleanup the session manager module data structures.
Definition: agt_ses.c:501
status_t agt_ses_set_dummy_session_tcb(ses_cb_t *dummy_session, ses_id_t use_sid)
Set the session TCB if needed.
Definition: agt_ses.c:649
boolean agt_ses_process_first_ready_by_sid(ses_id_t sid)
Check the readyQ and process the first message matching session, if any.
Definition: agt_ses.c:1548
status_t agt_ses_get_session_inBadRpcs(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the inBadRpcs counter
Definition: agt_ses.c:2294
status_t agt_ses_get_inSessions(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the inSessions counter
Definition: agt_ses.c:2044
void agt_ses_fill_writeset(fd_set *fdset, int *maxfdnum)
Drain the ses_msg outreadyQ and set the specified fdset Used by agt_ncxserver write_fd_set.
Definition: agt_ses.c:2005
void agt_ses_set_idle_timeout(uint32 val)
Set the idle-timeout parameter.
Definition: agt_ses.c:2774
status_t agt_ses_get_session_outRpcErrors(ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval)
<get> operation handler for the outRpcErrors counter
Definition: agt_ses.c:2334
status_t agt_ses_init(void)
INIT 1: Initialize the session manager module data structures.
Definition: agt_ses.c:467
void agt_ses_free_session2(ses_cb_t *scb, boolean clear_locks)
Free a real session control block but with optional unlocking.
Definition: agt_ses.c:943
void agt_ses_free_snmp_session(ses_cb_t *scb)
Free a dummy snmp session control block.
Definition: agt_ses.c:834
void agt_ses_free_session(ses_cb_t *scb)
Free a real session control block.
Definition: agt_ses.c:924
boolean agt_ses_ssh_port_allowed(uint16 port)
Check if the port number used for SSH connect is okay.
Definition: agt_ses.c:1955
ses_cb_t * agt_ses_new_coap_session(void)
Create a dummy CoAP session control block.
Definition: agt_ses.c:720
void agt_ses_remove_subsys(ses_id_t sid)
Remove a subsystem session for an HA Standby.
Definition: agt_ses.c:2549
getcb_mode_t
get callback retrieval types; only get2 supports getnext
Definition: getcb.h:259
status_t
global error return code
Definition: status_enum.h:210
ses_transport_t
NETCONF Transport Types.
Definition: ses.h:359
ses_term_reason_t
Session Termination reason.
Definition: ses.h:417
uint32 ses_id_t
Session ID.
Definition: ses.h:335
NETCONF Session Common definitions module.
Global error messages for status code enumerations.
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:912
Value Node Basic Support.