yumapro  20.10-10
YumaPro SDK

Session Control Block. More...

#include <ses.h>

Collaboration diagram for ses_cb_t:

Data Fields

dlq_hdr_t qhdr
 queued by manager only
 
ses_type_t type
 session type
 
uint32 protocols_requested
 bitmask
 
ncx_protocol_t protocol
 protocol version in use
 
ses_transport_t transport
 transport type
 
ncx_msg_encoding_t encoding
 HTTP msg encoding.
 
ses_state_t state
 session state
 
ses_mode_t mode
 session mode
 
ses_id_t sid
 session ID
 
ses_id_t killedbysid
 killed-by session ID
 
ses_id_t rollback_sid
 session ID for rollback
 
ses_term_reason_t termreason
 termination reason
 
time_t hello_time
 used for hello timeout
 
time_t last_rpc_time
 used for idle timeout
 
xmlChar * start_time
 dateTime start time
 
xmlChar * username
 user ID
 
xmlChar * peeraddr
 Inet address string.
 
xmlChar * subsys_id
 used for YCONTROL session only More...
 
int tid
 Thread ID representing session.
 
void * tcb
 Thread control block.
 
boolean locks_released
 Signal release point in kill.
 
boolean conn_closed
 T: scb IO closed last buffer.
 
boolean active
 <hello> completed ok
 
boolean notif_active
 subscription active
 
boolean stream_output
 buffer/stream svr
 
boolean noxmlns
 xml-nons display-mode
 
boolean framing11
 T: base:1.1, F: base:1.0.
 
boolean keep_xmlns
 T: parse extern, F: msg.
 
boolean warn_xml
 T: xml warns, F: no warn.
 
boolean rawxml_mode
 T: expand_anyxml, F: normal.
 
boolean direct_mode
 T: yp-shell, F: normal.
 
boolean msg_mode
 T:msg-indent F:indent.
 
boolean ycontrol
 T: is ycontrol session.
 
boolean dbapi
 T: is DB-API session.
 
boolean dbapi_system
 T: is DB-API system session.
 
boolean sse_mode
 T: Server Sent Events, F: normal.
 
boolean ypgnmi
 T: is gNMI ycontrol session.
 
boolean restconf_sse_mode
 T: RESTCONF SSE mode.
 
boolean restconf_notif
 REST SSE notifications in progress.
 
boolean json_1line
 T: output JSON leaf-list on 1 line.
 
boolean http_chunk_mode
 T: send HTTP chunks, F: normal.
 
boolean http_waitrn
 T: wait for EOchunk, F: no wait.
 
boolean json_attrs
 T: use JSON attributes.
 
boolean any_leaflist_attrs
 T: leaf-list has attrs.
 
boolean is_ycontrol_scb
 T: is ycontrol_scb for HA.
 
boolean is_ipv6
 T: using IPv6 address, F: IPv4.
 
boolean is_callhome
 T: callhome session.
 
boolean dropped
 T: session dropped in a msg.
 
boolean start_tls
 T: need to start TLS session first.
 
boolean checksum_mode
 T: add out byte to checksum.
 
uint32 last_ch
 save in case cr/lf in SSE mode
 
struct val_value_t_ * leaflist
 JSON attrs backptr.
 
ncx_display_mode_t in_encoding
 input encoding can be different in RESTCONF, set by the Content-Type header
 
ncx_display_mode_t out_encoding
 output encoding can be different in RESTCONF, set by the Accept header
 
xmlTextReaderPtr reader
 input stream reader
 
FILE * fp
 set if output to a file
 
int fd
 set if output to a socket
 
ses_read_fn_t rdfn
 set if external write fn
 
ses_write_fn_t wrfn
 set if external read fn
 
uint32 inendpos
 inside framing directive
 
ses_instate_t instate
 input state enum
 
uint32 buffcnt
 current buffer count
 
uint32 freecnt
 current freeQ count
 
dlq_hdr_t msgQ
 Q of ses_msg_t input.
 
dlq_hdr_t freeQ
 Q of ses_msg_buff_t.
 
dlq_hdr_t outQ
 Q of ses_msg_buff_t.
 
ses_msg_buff_toutbuff
 current output buffer
 
ses_ready_t inready
 header for inreadyQ
 
ses_ready_t outready
 header for outreadyQ
 
ses_stats_t stats
 per-session statistics
 
void * mgrcb
 if manager session, mgr_scb_t
 
struct rpc_msg_t_ * cur_rpc_msg
 for SIL-SA get callback
 
struct yangapi_cb_t_ * rcb
 REST-API control block.
 
xmlChar * entry_point
 REST-API entry point.
 
xmlChar startchunk [SES_MAX_STARTCHUNK_SIZE+1]
 base:1.1 chunk state handling; need to store number part of incoming chunk markers in the scb in case they are split across buffers
 
xmlChar * readbuff
 input buffer for session
 
uint32 readbuffsize
 input buffer size
 
int8 indent
 indent N spaces (0..9)
 
int8 msg_indent
 indent N spaces (-1..9)
 
uint32 linesize
 TERM line length.
 
ncx_withdefaults_t withdef
 with-defaults default
 
uint32 cache_timeout
 vir-val cache tmr in sec
 
struct agt_acm_cache_t_ * acm_cache
 agent access control for database reads and writes; for incoming agent <rpc> requests, the access control cache is used to minimize data structure processing during authorization procedures in agt/agt_acm.c there is a back-ptr embedded in the XML header so it can be easily passed to the agt_val and xml_wr functions
 
xmlChar * service_name
 variables for ycontrol sessions More...
 
boolean reading_header
 variables for SSL sessions; used by yangcli-pro More...
 
boolean content_length_based
 content len based msg body
 
boolean chunk_based
 chunked based msg body
 
int32 total_length
 total length
 
boolean use_traceid
 TRUE if OK to use Trace ID attr in the RPC calls.
 
ses_ypmode_t yp_mode
 YANG-PATCH mode: More...
 
boolean skip_modnames
 YPW-888: new restconf cli parameter to turn strict JSON YANG enconding off, do not include module names if a new cli paramerter present and true.
 
void * openssl_ctx
 backptr to TLS context
 
void * openssl_ssl
 malloced with SSL_new
 
void * get_cookie
 this pointer available to pass a cookie to a GET1 callback will not be freed when the scb is deleted
 
boolean remote_wait
 if there is a remote operation in progress then this flag will be set so new input can be held off on this session until the deferred reply is sent
 
dlq_hdr_t breadcrumbQ
 Queue of breadcrumb object back pointers used in XPath GET2 processing of when-stmts in operational state Contains backptr to obj_template_t to prevent loops. More...
 
ses_msg_tcurmsg
 pointer to current message to read set by agt only
 
boolean wildcard_ok
 set by yangcli when parsing an XML file and wildcard strings are allowed; read by mgr_val_parse checking string nodes for the wildcard pattern
 
boolean file_override
 set by server DB-API session to capture <rpc-reply> output to a file. More...
 
struct cfg_template_t_ * fake_candidate
 a fake candidate config for target=running YANG-PATCH
 
uint16 rfc8639_notif_cnt
 New subscriptions allow more than 1 per session.
 
uint32 checksum
 running checksum for YANG Push Simulated Operational mode
 
uint32 checksum_cnt
 byte count
 

Detailed Description

Session Control Block.

Field Documentation

dlq_hdr_t breadcrumbQ

Queue of breadcrumb object back pointers used in XPath GET2 processing of when-stmts in operational state Contains backptr to obj_template_t to prevent loops.

Q of ncx_backptr_t to obj_template_t

boolean file_override

set by server DB-API session to capture <rpc-reply> output to a file.

The session FD IO is not changed. During this mode the session output will go to scb->fp instead of scb->fd

boolean reading_header

variables for SSL sessions; used by yangcli-pro

T if reading hdr F if reading body

xmlChar* service_name

variables for ycontrol sessions

type of control session

xmlChar* subsys_id

used for YCONTROL session only

Matches subsystem config

ses_ypmode_t yp_mode

YANG-PATCH mode:

  • RESTCONF
  • NETCONF
  • HA

The documentation for this struct was generated from the following file: