82typedef struct ses_msg_tempchunk_t_ {
211 boolean start_chunk_mode);
305 const xmlChar *text);
348 dlq_hdr_t *tempchunkQ);
434 size_t retbuff_size);
dlq provides general double-linked list and queue support:
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:348
status_t
global error return code
Definition: status_enum.h:210
uint32 ses_id_t
Session ID.
Definition: ses.h:335
ses_msg_buff_t * ses_msg_next_outbuff(ses_cb_t *scb, ses_msg_buff_t *curbuff)
Get the next outQ buffer.
Definition: ses_msg.c:1636
void ses_msg_add_framing(ses_cb_t *scb, ses_msg_buff_t *buff)
Add the base:1.1 framing chars to the buffer and adjust the buffer size pointers.
Definition: ses_msg.c:1253
void ses_msg_init_buff(ses_cb_t *scb, boolean outbuff, ses_msg_buff_t *buff)
Init the buffer fields.
Definition: ses_msg.c:1352
void ses_msg_clean_tempchunkQ(dlq_hdr_t *tempchunkQ)
Clean a Q of ses_msg_tempchunk_t structs.
Definition: ses_msg.c:1556
size_t ses_msg_copy_buff(ses_msg_buff_t *buff, xmlChar *retbuff, size_t retbuff_size)
Copy the buffer data to another buffer.
Definition: ses_msg.c:1687
status_t ses_msg_send_buffs(ses_cb_t *scb, boolean *anyout)
Send multiple buffers to the session client socket Tries to send one packet at maximum MTU.
Definition: ses_msg.c:590
ses_ready_t * ses_msg_get_first_inready(boolean ycontrol)
Dequeue the first entry in the inreadyQ, if any.
Definition: ses_msg.c:1039
size_t ses_msg_buff_size(ses_msg_buff_t *buff)
Get the number of bytes in the buffer (not the buffer size)
Definition: ses_msg.c:1661
void ses_msg_finish_outmsg(ses_cb_t *scb)
Put the outbuff in the outQ if non-empty.
Definition: ses_msg.c:973
uint32 ses_msg_size_tempchunkQ(dlq_hdr_t *tempchunkQ)
Get the size of the message in the tempchunks.
Definition: ses_msg.c:1581
ses_ready_t * ses_msg_get_first_outready(void)
Dequeue the first entry in the outreadyQ, if any.
Definition: ses_msg.c:1112
status_t ses_msg_reset_message(ses_cb_t *scb, ses_msg_t *msg, dlq_hdr_t *tempchunkQ)
Reset a message to the provided buffer.
Definition: ses_msg.c:1388
ses_ready_t * ses_msg_get_first_outready_ycontrol(void)
Dequeue the first entry in the outreadyQ, if any Get a ycontrol entry.
Definition: ses_msg.c:1139
void ses_msg_free_buff(ses_cb_t *scb, ses_msg_buff_t *buff)
Free the session buffer chunk.
Definition: ses_msg.c:480
status_t ses_msg_new_msg(ses_msg_t **msg)
Malloc a new session message control header.
Definition: ses_msg.c:299
void ses_msg_make_outready_ycontrol(ses_cb_t *scb)
Put the session on the outreadyQ if it is not already there.
Definition: ses_msg.c:946
status_t ses_msg_new_buff(ses_cb_t *scb, boolean outbuff, ses_msg_buff_t **buff)
Malloc a new session buffer chuck.
Definition: ses_msg.c:397
void ses_msg_free_tempchunk(ses_msg_tempchunk_t *tc)
Free a temp chunk.
Definition: ses_msg.c:1535
void ses_msg_cleanup(void)
Cleanup the session message manager module data structures.
Definition: ses_msg.c:260
void ses_msg_free_msg(ses_cb_t *scb, ses_msg_t *msg)
Free the session message and all its buffer chunks.
Definition: ses_msg.c:345
void ses_msg_clean_msgQ(ses_cb_t *scb)
Clean all the input messages use by the scb Used by YP-COAP.
Definition: ses_msg.c:1886
ses_msg_tempchunk_t * ses_msg_new_tempchunk(xmlChar *chunk, uint32 chunklen)
Create a new temp chunk.
Definition: ses_msg.c:1511
boolean ses_msg_is_binary(const ses_msg_t *msg)
Check if the message is a binary message Used by YANG-CBOR.
Definition: ses_msg.c:1912
status_t ses_msg_new_output_buff(ses_cb_t *scb, boolean start_chunk_mode)
Put the current outbuff on the outQ.
Definition: ses_msg.c:829
void ses_msg_make_inready(ses_cb_t *scb)
Put the session on the inreadyQ if it is not already there.
Definition: ses_msg.c:894
void ses_msg_dump(log_debug_t lvl, const ses_msg_t *msg, const xmlChar *text)
Dump the message contents.
Definition: ses_msg.c:1168
ses_ready_t * ses_msg_get_first_inready_ses(ses_id_t sid)
Dequeue the first matching session entry in the inreadyQ, if any.
Definition: ses_msg.c:1073
ses_msg_buff_t * ses_msg_first_outbuff(ses_cb_t *scb)
Get the first outQ buffer.
Definition: ses_msg.c:1612
status_t ses_msg_write_buff(ses_cb_t *scb, ses_msg_buff_t *buff, xmlChar ch)
Add some text to the message buffer.
Definition: ses_msg.c:543
void ses_msg_make_outready(ses_cb_t *scb)
Put the session on the outreadyQ if it is not already there.
Definition: ses_msg.c:920
xmlChar * ses_msg_convert_outbuffs(ses_cb_t *scb, uint32 *len)
Clean the message out buffers for next use.
Definition: ses_msg.c:1762
status_t ses_msg_add_input_msg(ses_cb_t *scb, xmlChar *data, size_t datalen)
Make a ses_msg_t to fool the session handler into thinking the HTTP code path filled in a session inp...
Definition: ses_msg.c:1830
void ses_msg_init(void)
Initialize the session message manager module data structures.
Definition: ses_msg.c:236
void ses_msg_clean_outbuffs(ses_cb_t *scb)
Clean the message out buffers for next use.
Definition: ses_msg.c:1721
xmlChar * ses_msg_get_onebuff(ses_msg_t *msg, xmlChar **retbuff, uint32 *retlen)
Get the entire message as 1 buffer.
Definition: ses_msg.c:1946
NCX System Logging Manager.
NETCONF Session Common definitions module.
Session Control Block.
Definition: ses.h:573
Session Message Buffer.
Definition: ses.h:500
Session Message.
Definition: ses.h:535
save the chunks before putting them back into ses_buff_t structs
Definition: ses_msg.h:82
xmlChar * chunk
chunk
Definition: ses_msg.h:84
dlq_hdr_t qhdr
queue header
Definition: ses_msg.h:83
uint32 chunklen
chunk length
Definition: ses_msg.h:85
embedded Q header for the message ready Q The 'inq' flag is used to prevent queue corruption
Definition: ses.h:519