![]() |
yumapro
25.10-1
YumaPro SDK
|
NCX Data Model Get Operation callback handler for virtual data that is not stored in a val_value_t tree. More...

Data Structures | |
| struct | getcb_keyval_t |
| Key value holder, temp Q of ordered key leaf values used while parsing a path to store the keys until they are all collected. More... | |
| struct | getcb_get2_lookup_t |
| GET2 lookup struct. More... | |
| struct | getcb_get2_select_t |
| GET2 select struct. More... | |
| struct | getcb_get2_getbulk_t |
| GET2 getbulk struct This is only used for YANG list objects to produce N getnext entries at a time. More... | |
| struct | getcb_get2_t |
| GET2 control block. More... | |
Macros | |
| #define | GETCB_GET2_SM_MPID_MALLOCED(G) (G)->sm_mpid_malloced |
| set to TRUE on SIL-SA because the MPID is live set to FALSE on SIL because the MPID is a backptr to a real MP valroot | |
Typedefs | |
| typedef status_t(* | getcb_fn_t) (ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval) |
| GET1 Callback function for agent node get handler. More... | |
| typedef status_t(* | getcb_fn2_t) (ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb) |
| GET2 PRODUCER FUNCTION. More... | |
| typedef getcb_walker_status_t(* | getcb_get2_walker_fn_t) (getcb_walker_mode_t walker_mode, getcb_get2_t *get2cb, obj_template_t *obj, val_value_t *val, void *cookie) |
| GET2 CONSUMER FUNCTION. More... | |
Enumerations | |
| enum | getcb_mode_t { GETCB_NONE , GETCB_GET_VALUE , GETCB_GETNEXT_VALUE } |
| get callback retrieval types; only get2 supports getnext More... | |
| enum | getcb_walker_mode_t |
| get2 walker callback modes | |
| enum | getcb_walker_status_t |
| get2 walker callback return status values | |
Functions | |
| void | getcb_init_get2cb (getcb_get2_t *get2cb) |
| Init a GET2 control block. More... | |
| getcb_get2_t * | getcb_new_get2cb (void) |
| Malloc and init a new get2 control block. More... | |
| void | getcb_free_get2cb (getcb_get2_t *get2cb) |
| Clean and free a malloced GET2 control block. More... | |
| void | getcb_clean_get2cb (getcb_get2_t *get2cb, boolean reuse) |
| Clean a get2 control block. More... | |
| void | getcb_add_return_val (getcb_get2_t *get2cb, val_value_t *val) |
| Add a return val to a get2cb return_valQ. More... | |
| val_value_t * | getcb_find_return_val (getcb_get2_t *get2cb, obj_template_t *obj) |
| Find a return val in the get2cb return_valQ. More... | |
| val_value_t * | getcb_find_return_val2 (getcb_get2_t *get2cb, xmlns_id_t obj_nsid, const xmlChar *obj_name) |
| Find a return val in the get2cb return_valQ use { NSID, NAME } instead of object pointer. More... | |
| val_value_t * | getcb_find_return_val_str (getcb_get2_t *get2cb, xmlns_id_t obj_nsid, const xmlChar *obj_name, const xmlChar *valstr) |
| Find a return val in the get2cb return_valQ use { NSID, NAME } instead of object pointer. More... | |
| val_value_t * | getcb_find_next_return_val (getcb_get2_t *get2cb, val_value_t *curval) |
| Find the next matching return val in the get2cb return_valQ. More... | |
| val_value_t * | getcb_find_key (getcb_get2_t *get2cb, obj_template_t *obj) |
| Find an input keyval in the get2cb keyQ. More... | |
| val_value_t * | getcb_find_key_str (getcb_get2_t *get2cb, const xmlChar *modname, const xmlChar *objname) |
| Find an input keyval in the get2cb keyQ with a string. More... | |
| val_value_t * | getcb_find_key_num (getcb_get2_t *get2cb, const xmlChar *modname, const xmlChar *objname, uint32 keynum) |
| Find an input keyval in the get2cb keyQ. More... | |
| val_value_t * | getcb_find_key_lvl (getcb_get2_t *get2cb, const xmlChar *modname, const xmlChar *objname, uint32 objlvl) |
| Find an input keyval in the get2cb keyQ. More... | |
| val_value_t * | getcb_find_match (getcb_get2_t *get2cb, obj_template_t *obj) |
| Find an input keyval in the get2cb matchQ. More... | |
| void | getcb_add_key (getcb_get2_t *get2cb, val_value_t *val) |
| Add a keyval to a get2cb keyQ. More... | |
| void | getcb_add_match (getcb_get2_t *get2cb, val_value_t *val) |
| Add a match node to a get2cb matchQ. More... | |
| status_t | getcb_add_select (getcb_get2_t *get2cb, const xmlChar *modname, const xmlChar *objname) |
| Add a select node to a get2cb matchQ. More... | |
| void | getcb_add_return_key (getcb_get2_t *get2cb, val_value_t *val) |
| Add a return keyval to a get2cb return_keyQ. More... | |
| val_value_t * | getcb_find_return_key (getcb_get2_t *get2cb, obj_template_t *obj) |
| Find a return keyval in the get2cb return_keyQ. More... | |
| val_value_t * | getcb_find_return_key2 (getcb_get2_t *get2cb, xmlns_id_t obj_nsid, const xmlChar *obj_name) |
| Find a return keyval in the get2cb return_keyQ Use { NSID, NAME } instead of object pointer. More... | |
| void | getcb_move_return_keys (getcb_get2_t *get2cb) |
| Move the return keys to the keyQ replacing the nodes in the keyQ if already there. More... | |
| void | getcb_undo_move_return_keys (getcb_get2_t *get2cb) |
| Move back the return keys from the keyQ. More... | |
| void | getcb_clean_return_data (getcb_get2_t *get2cb) |
| Clean the return data in the return_val and return_valQ. More... | |
| val_value_t * | getcb_get2cb_to_request_val (getcb_get2_t *get2cb, obj_template_t *get_request_obj, boolean preserve_data, xml_msg_hdr_t *msg, status_t *res) |
| Convert a get2cb struct to a <get-request> value tree. More... | |
| getcb_get2_t * | getcb_request_val_to_get2cb (val_value_t *get_request_val, boolean preserve_data, status_t *res) |
| Convert a <get-request> value tree into a get2cb struct. More... | |
| val_value_t * | getcb_get2cb_to_response_val (getcb_get2_t *get2cb, obj_template_t *response_obj, boolean preserve_data, status_t *res) |
| Convert a get2cb struct to a <get-response> value tree. More... | |
| getcb_get2_t * | getcb_response_val_to_get2cb (val_value_t *response_val, boolean preserve_data, status_t *res) |
| Convert a <get-response> value to a get2cb struct. More... | |
| void | getcb_add_return_get2cb (getcb_get2_t *get2cb, getcb_get2_t *return_get2cb) |
| Add a return get2cb to a get2cb responseQ Used for get-bulk support. More... | |
| status_t | getcb_move_response_get2cb (getcb_get2_t *response_get2cb, getcb_get2_t *get2cb) |
| Move the return fields from the return get2cb to the target get2cb. More... | |
| status_t | getcb_replace_response_get2cb (getcb_get2_t *response_get2cb, getcb_get2_t *get2cb, boolean replace_mode) |
| Move the return fields from the return get2cb to the target get2cb Can clean out old data first. More... | |
| status_t | getcb_get2_child_obj (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *parentval, getcb_get2_t *parent_get2cb, obj_template_t *obj, boolean with_defaults, getcb_get2_walker_fn_t walkerfn, void *cookie) |
| Process the instances of an object for the object itself and 0 or more nest levels of descendant nodes. More... | |
| status_t | getcb_get2_child_obj_ex (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *parentval, getcb_get2_t *parent_get2cb, obj_template_t *obj, boolean with_defaults, getcb_get2_walker_fn_t walkerfn, void *cookie, getcb_get2_t *force_get2cb, getcb_api_mode_t api_mode) |
| Process the instances of an object for the object itself and 0 or more nest levels of descendant nodes Use the get2cb pointer if provided. More... | |
| status_t | getcb_handle_acmtest (ses_cb_t *scb, xml_msg_hdr_t *msg, val_nodetest_fn_t testfn, getcb_get2_t *get2cb) |
| check the access control and testfn callback for a node that would have it skipped because the write_full_check_val function is skipped More... | |
| getcb_keyval_t * | getcb_new_keyval (const xmlChar *keyval) |
| Create a new GET2 keyval holder. More... | |
| getcb_keyval_t * | getcb_new_keyval2 (val_value_t *keynode, obj_template_t *keyobj, boolean fixed_value) |
| Create a new Get2 keyval holder using val backptr. More... | |
| getcb_keyval_t * | getcb_new_keyval3 (const xmlChar *keyval, obj_template_t *keyobj, boolean fixed_value) |
| Create a new Get2 keyval holder using value string. More... | |
| void | getcb_free_keyval (getcb_keyval_t *keyval) |
| Free a GET2 keyval. More... | |
| void | getcb_clean_keyvalQ (dlq_hdr_t *que) |
| Free all the Get2 keyvals from a dlq_hdr. More... | |
| getcb_get2_lookup_t * | getcb_new_get2_lookup (obj_template_t *obj, dlq_hdr_t *keyvalQ) |
| Create a new getcb_get2_lookup struct. More... | |
| void | getcb_free_get2_lookup (getcb_get2_lookup_t *lookup) |
| Free a getcb_get2_lookup struct. More... | |
| void | getcb_clean_get2_lookupQ (dlq_hdr_t *lookupQ) |
| Clean a queue of getcb_get2_lookup_t. More... | |
| getcb_get2_lookup_t * | getcb_find_get2_lookup (obj_template_t *obj, dlq_hdr_t *lookupQ) |
| Find a getcb_get2_lookup struct. More... | |
| getcb_get2_select_t * | getcb_new_get2_select (const xmlChar *modname, const xmlChar *objname) |
| Create a new getcb_select_t struct. More... | |
| void | getcb_free_get2_select (getcb_get2_select_t *select_node) |
| Free a getcb_get2_select struct. More... | |
| boolean | getcb_find_get2_select (getcb_get2_t *get2cb, const xmlChar *modname, const xmlChar *objname) |
| Find a getcb_get2_select struct. More... | |
| void | getcb_dump_get2cb (getcb_get2_t *get2cb) |
| Print the interesting fields in a get2cb. More... | |
| boolean | getcb_need_get2 (obj_template_t *curobj, obj_template_t *reqobj) |
| check if the node has a get2 callback or in a choice/case subtree that has get2 callback More... | |
| boolean | getcb_need_get2_ex (obj_template_t *curobj, obj_template_t *reqobj, uint32 *choicecnt, obj_template_t **top_choice) |
| check if the node has a get2 callback or in a choice/case subtree that has get2 callback More... | |
| obj_template_t * | getcb_first_requested_child (getcb_get2_t *get2cb, obj_template_t *parent_obj) |
| Check if the specified object has any terminal nodes that need to be returned for a get2 request. More... | |
| obj_template_t * | getcb_next_requested_child (getcb_get2_t *get2cb, obj_template_t *curchild) |
| Check if the specified object has any more terminal nodes that need to be returned for a get2 request. More... | |
| status_t | getcb_set_active_case (getcb_get2_t *get2cb, const xmlChar *active_case_modname, const xmlChar *active_case) |
| Set the active case to the specified object. More... | |
| getcb_get2_getbulk_t * | getcb_new_get2_getbulk (void) |
| Create a new getcb_get2_getbulk struct. More... | |
| void | getcb_free_get2_getbulk (getcb_get2_getbulk_t *getbulk) |
| Free a getcb_get2_getbulk struct. More... | |
| status_t | getcb_finish_getbulk_entry (getcb_get2_t *get2cb) |
| Gather the current response in a getbulk entry and save it in the getcb->getbulkQ; The getcb is ready to start another getcb GETNEXT response after this function is complete. More... | |
| status_t | getcb_pre_get2_choices (xml_msg_hdr_t *msg, ses_cb_t *scb, getcb_get2_t *parent_get2cb, obj_template_t *targobj, val_value_t *curval, uint32 choice_cnt, obj_template_t *top_choice, boolean *force_remove, getcb_get2_t **ret_get2cb) |
| Invoke the get2 callbacks for each of the implied choice-stmt nodes in a subtree or REST resource request. More... | |
| void | getcb_log_walker (const xmlChar *caller, getcb_walker_mode_t walker_mode, const xmlChar *objname, const xmlChar *valname) |
| Print some logging info for a GET2 walker consumer callback. More... | |
| status_t | getcb_clone_keyQ (dlq_hdr_t *srcQ, dlq_hdr_t *destQ) |
| Copy all the key val_value_t structs to the other queue. More... | |
| boolean | getcb_is_get_exact (getcb_get2_t *get2cb) |
| Check if the getcb represents a response that is for a get-exact or a getnext. More... | |
| void | getcb_clean_responseQ (getcb_get2_t *get2cb) |
| Clean the response Q within a get2cb. More... | |
| void | getcb_add_return_aioQ (getcb_get2_t *get2cb, val_value_t *val) |
| Add a return val to a get2cb return_aioQ. More... | |
| void | getcb_clean_return_aioQ (getcb_get2_t *get2cb) |
| Clean the return data return_aioQ. More... | |
| boolean | getcb_get2_allowed (xml_msg_hdr_t *msg, obj_template_t *chobj) |
| Check if the current node and operation are allowed to use the GET2 callback if there is one; Used to keep NMDA and non-NMDA operations separate. More... | |
| getcb_get2_t * | getcb_new_parent_get2cb (obj_template_t *obj, dlq_hdr_t *keyQ) |
| Create a new get2 control block for the parent Used for XGET operation to fill the list's parent get2cb. More... | |
| boolean | getcb_match_keys_lookup (obj_template_t *useobj, val_value_t *useval, getcb_get2_lookup_t *lookup) |
| Match the requested list entry. More... | |
| boolean | getcb_match_keys_getcb (obj_template_t *useobj, val_value_t *useval, getcb_get2_t *get2cb) |
| Match the requested list entry. More... | |
| boolean | getcb_match_keys_keyQ (obj_template_t *useobj, val_value_t *useval, dlq_hdr_t *srcQ) |
| Match the requested list entry. More... | |
| status_t | getcb_add_return_aio_buff (getcb_get2_t *get2cb, const xmlChar *buffer) |
| Add a return buffer to a get2cb control block and set encoding type. More... | |
| void | getcb_clean_return_aio_buff (getcb_get2_t *get2cb) |
| Clean the return AIO buffer, XML or JSON buffer. More... | |
| val_value_t * | getcb_get2cb_to_val (getcb_get2_t *get2cb, status_t *retres) |
| Convert a GET2 CB to the equivalent val_value_t tree only container and list are supported. More... | |
NCX Data Model Get Operation callback handler for virtual data that is not stored in a val_value_t tree.
These callback functions are used to provide temporary val_value_t structures that MUST BE FREED by the caller after they are used!!!
The <get> callback function has several sub-mode functions to support the retrieval of virtual data, mixed with the real data tree of a configuration database.
Submode 1: GETCB_GET_METAQ
Retrieve a Queue header of val_value_t structs
representing the attributes for the specified value node
Submode x: GETCB_GET_LEAFVAL
Retrieve the simple value contents of a virtual value leaf node
| typedef status_t(* getcb_fn2_t) (ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb) |
GET2 PRODUCER FUNCTION.
Callback function for server object handler get2 callback Used to provide main and/or subsystem retrieval of instances of a specific named object
| scb | session control block making the request | |
| msg | incoming XML message header | |
| [in,out] | get2cb | get2 control block for this callback request
|
| typedef status_t(* getcb_fn_t) (ses_cb_t *scb, getcb_mode_t cbmode, const val_value_t *virval, val_value_t *dstval) |
GET1 Callback function for agent node get handler.
| scb | session that issued the get (may be NULL) can be used for access control purposes | |
| cbmode | reason for the callback | |
| virval | place-holder node in the data model for this virtual value node | |
| [out] | dstval | pointer to value output struct *dstval should be filled in, depending on the callback reason |
| typedef getcb_walker_status_t(* getcb_get2_walker_fn_t) (getcb_walker_mode_t walker_mode, getcb_get2_t *get2cb, obj_template_t *obj, val_value_t *val, void *cookie) |
GET2 CONSUMER FUNCTION.
Callback function for get2 walker to process received instances of a specific object
| walker_mode | callback reason
GETCB_WALK_MODE_START
start a list or container instance
GETCB_WALK_MODE_TERMINAL,
contains a complete terminal node (leaf, leaf-list, anyxml)
GETCB_WALK_MODE_END
end a list or container instance
GETCB_WALK_MODE_1SHOT
agt_tree callback mode to retrieve entire get2cb in
1 callback for procesing. Only 1 level of processing
is done in 1-shot mode, even if complex child nodes exist
|
| get2cb | get2 control block for this callback request from the get2 producer |
| obj | template for object being processed |
| val | instance of the value but only if walker_mode == GETCB_WALK_MODE_TERMINAL NULL if not used |
| cookie | consumer cookie given at the start of walk |
GETCB_WALK_STAT_CONTINUE
to coninue to the next instance or object
GETCB_WALK_STAT_STOP_OBJECT
to coninue to the next object
GETCB_WALK_STAT_STOP_WALK
to stop the walk completely
| enum getcb_mode_t |
| void getcb_add_key | ( | getcb_get2_t * | get2cb, |
| val_value_t * | val | ||
| ) |
Add a keyval to a get2cb keyQ.
This is NOT the return key Q! This is not a user API for a GET2 callback
| get2cb | get2 control block to use |
| val | value to add |


| void getcb_add_match | ( | getcb_get2_t * | get2cb, |
| val_value_t * | val | ||
| ) |
Add a match node to a get2cb matchQ.
This is not a user API for a GET2 callback
| get2cb | get2 control block to use |
| val | value to add |


| status_t getcb_add_return_aio_buff | ( | getcb_get2_t * | get2cb, |
| const xmlChar * | buffer | ||
| ) |
Add a return buffer to a get2cb control block and set encoding type.
| get2cb | get2 control block to use |
| buffer | buffer used in the callback |

| void getcb_add_return_aioQ | ( | getcb_get2_t * | get2cb, |
| val_value_t * | val | ||
| ) |
Add a return val to a get2cb return_aioQ.
| get2cb | get2 control block to use |
| val | value to add |

| void getcb_add_return_get2cb | ( | getcb_get2_t * | get2cb, |
| getcb_get2_t * | return_get2cb | ||
| ) |
Add a return get2cb to a get2cb responseQ Used for get-bulk support.
| get2cb | get2 control block to use |
| return_get2cb | get2 control block to add to get2cb |

| void getcb_add_return_key | ( | getcb_get2_t * | get2cb, |
| val_value_t * | val | ||
| ) |
Add a return keyval to a get2cb return_keyQ.
This is an important GET2 callback API for a list node The list must add return keys in order to continue the walk through all list entries
| get2cb | get2 control block to use |
| val | value to add; pass off memory here |

| void getcb_add_return_val | ( | getcb_get2_t * | get2cb, |
| val_value_t * | val | ||
| ) |
Add a return val to a get2cb return_valQ.
Important API needed by GET2 callbacks to add return values
| get2cb | get2 control block to use |
| val | value to add; pass off memory; will be cleaned when the get2cb is freed |

| status_t getcb_add_select | ( | getcb_get2_t * | get2cb, |
| const xmlChar * | modname, | ||
| const xmlChar * | objname | ||
| ) |
Add a select node to a get2cb matchQ.
This is not a user API for a GET2 callback
| get2cb | get2 control block to use |
| modname | module name of the select node |
| objname | object name of the select node |


| void getcb_clean_get2_lookupQ | ( | dlq_hdr_t * | lookupQ | ) |
Clean a queue of getcb_get2_lookup_t.
| lookupQ | queue of getcb_get2_lookup_t to clean |


| void getcb_clean_get2cb | ( | getcb_get2_t * | get2cb, |
| boolean | reuse | ||
| ) |
Clean a get2 control block.
| get2cb | get2 control block to clean |
| reuse | TRUE if the get2cb will be reused |


| void getcb_clean_keyvalQ | ( | dlq_hdr_t * | que | ) |
Free all the Get2 keyvals from a dlq_hdr.
| que | Q of getcb_keyval_t to clean |

| void getcb_clean_responseQ | ( | getcb_get2_t * | get2cb | ) |
Clean the response Q within a get2cb.
| get2cb | get control block to clean |


| void getcb_clean_return_aio_buff | ( | getcb_get2_t * | get2cb | ) |
Clean the return AIO buffer, XML or JSON buffer.
| get2cb | get2 control block to use for cleaning |

| void getcb_clean_return_aioQ | ( | getcb_get2_t * | get2cb | ) |
Clean the return data return_aioQ.
| get2cb | get2 control block to clean |


| void getcb_clean_return_data | ( | getcb_get2_t * | get2cb | ) |
Clean the return data in the return_val and return_valQ.
| get2cb | get2 control block to clean |

| status_t getcb_clone_keyQ | ( | dlq_hdr_t * | srcQ, |
| dlq_hdr_t * | destQ | ||
| ) |
Copy all the key val_value_t structs to the other queue.
| srcQ | source Q of val_value_t |
| destQ | destination Q of val_value_t |


| void getcb_dump_get2cb | ( | getcb_get2_t * | get2cb | ) |
Print the interesting fields in a get2cb.
| get2cb | get2 control block to use |


| getcb_get2_lookup_t * getcb_find_get2_lookup | ( | obj_template_t * | obj, |
| dlq_hdr_t * | lookupQ | ||
| ) |
Find a getcb_get2_lookup struct.
| obj | object to find |
| lookupQ | queue of getcb_get2_lookup_t to search |
| boolean getcb_find_get2_select | ( | getcb_get2_t * | get2cb, |
| const xmlChar * | modname, | ||
| const xmlChar * | objname | ||
| ) |
Find a getcb_get2_select struct.
| get2cb | get2 control block to check |
| modname | module name to find |
| objname | object name to find |

| val_value_t * getcb_find_key | ( | getcb_get2_t * | get2cb, |
| obj_template_t * | obj | ||
| ) |
Find an input keyval in the get2cb keyQ.
Use an object template to search the return value queue
| get2cb | get2 control block to use |
| obj | key object type to find |

| val_value_t * getcb_find_key_lvl | ( | getcb_get2_t * | get2cb, |
| const xmlChar * | modname, | ||
| const xmlChar * | objname, | ||
| uint32 | objlvl | ||
| ) |
Find an input keyval in the get2cb keyQ.
*** USE string parameters and object level number ****
| get2cb | get2 control block to use |
| modname | module name of object to find |
| objname | name of object type to find |
| objlvl | object level |
| val_value_t * getcb_find_key_num | ( | getcb_get2_t * | get2cb, |
| const xmlChar * | modname, | ||
| const xmlChar * | objname, | ||
| uint32 | keynum | ||
| ) |
Find an input keyval in the get2cb keyQ.
*** USE string parameters and key number **** Needed because some nested lists can have the same name
| get2cb | get2 control block to use |
| modname | module name of object to find |
| objname | name of object type to find |
| keynum | key number [1 .. N] |
| val_value_t * getcb_find_key_str | ( | getcb_get2_t * | get2cb, |
| const xmlChar * | modname, | ||
| const xmlChar * | objname | ||
| ) |
Find an input keyval in the get2cb keyQ with a string.
Use the object name string to search the return value queue
| get2cb | get2 control block to use |
| modname | module name of the key object |
| objname | object name of the key object |
| val_value_t * getcb_find_match | ( | getcb_get2_t * | get2cb, |
| obj_template_t * | obj | ||
| ) |
Find an input keyval in the get2cb matchQ.
| get2cb | get2 control block to use |
| obj | object type to find |
| val_value_t * getcb_find_next_return_val | ( | getcb_get2_t * | get2cb, |
| val_value_t * | curval | ||
| ) |
Find the next matching return val in the get2cb return_valQ.
| get2cb | get2 control block to use |
| curval | current value pointer |


| val_value_t * getcb_find_return_key | ( | getcb_get2_t * | get2cb, |
| obj_template_t * | obj | ||
| ) |
Find a return keyval in the get2cb return_keyQ.
| get2cb | get2 control block to use |
| obj | object type to find |

| val_value_t * getcb_find_return_key2 | ( | getcb_get2_t * | get2cb, |
| xmlns_id_t | obj_nsid, | ||
| const xmlChar * | obj_name | ||
| ) |
Find a return keyval in the get2cb return_keyQ Use { NSID, NAME } instead of object pointer.
| get2cb | get2 control block to use |
| obj_nsid | namespace ID of object to find |
| obj_name | name of object to find |
| val_value_t * getcb_find_return_val | ( | getcb_get2_t * | get2cb, |
| obj_template_t * | obj | ||
| ) |
Find a return val in the get2cb return_valQ.
| get2cb | get2 control block to use |
| obj | object type to find |
| val_value_t * getcb_find_return_val2 | ( | getcb_get2_t * | get2cb, |
| xmlns_id_t | obj_nsid, | ||
| const xmlChar * | obj_name | ||
| ) |
Find a return val in the get2cb return_valQ use { NSID, NAME } instead of object pointer.
| get2cb | get2 control block to use |
| obj_nsid | object module namespace to find |
| obj_name | object local-name to find |
| val_value_t * getcb_find_return_val_str | ( | getcb_get2_t * | get2cb, |
| xmlns_id_t | obj_nsid, | ||
| const xmlChar * | obj_name, | ||
| const xmlChar * | valstr | ||
| ) |
Find a return val in the get2cb return_valQ use { NSID, NAME } instead of object pointer.
Used in Leaf-list search to find the actual match
| get2cb | get2 control block to use |
| obj_nsid | object module namespace to find |
| obj_name | object local-name to find |
| valstr | value encoded as a string |
| status_t getcb_finish_getbulk_entry | ( | getcb_get2_t * | get2cb | ) |
Gather the current response in a getbulk entry and save it in the getcb->getbulkQ; The getcb is ready to start another getcb GETNEXT response after this function is complete.
| [in,out] | get2cb | GET2 control block to use
|

| obj_template_t * getcb_first_requested_child | ( | getcb_get2_t * | get2cb, |
| obj_template_t * | parent_obj | ||
| ) |
Check if the specified object has any terminal nodes that need to be returned for a get2 request.
Return the first one
The get2cb will be examined:
Any content-match nodes will be returned but no filtering of these objects will be done
Any key leaf nodes will be skipped; Processing of key leafs is done first and is never skipped
| get2cb | get2 control block to use |
| parent_obj | target object usually the obj from get2cb but could be the active case object for a choice callback |

| void getcb_free_get2_getbulk | ( | getcb_get2_getbulk_t * | getbulk | ) |
Free a getcb_get2_getbulk struct.
| getbulk | getcb getbulk record to free |


| void getcb_free_get2_lookup | ( | getcb_get2_lookup_t * | lookup | ) |
Free a getcb_get2_lookup struct.
| lookup | getcb lookup record to free |


| void getcb_free_get2_select | ( | getcb_get2_select_t * | select_node | ) |
Free a getcb_get2_select struct.
| select_node | getcb select record to free |

| void getcb_free_get2cb | ( | getcb_get2_t * | get2cb | ) |
Clean and free a malloced GET2 control block.
| get2cb | get2 control block to free |


| void getcb_free_keyval | ( | getcb_keyval_t * | keyval | ) |
Free a GET2 keyval.
| keyval | keyval to free |

| boolean getcb_get2_allowed | ( | xml_msg_hdr_t * | msg, |
| obj_template_t * | chobj | ||
| ) |
Check if the current node and operation are allowed to use the GET2 callback if there is one; Used to keep NMDA and non-NMDA operations separate.
| msg | xml_msg_hdr in progress |
| chobj | child object to check |


| status_t getcb_get2_child_obj | ( | ses_cb_t * | scb, |
| xml_msg_hdr_t * | msg, | ||
| val_value_t * | parentval, | ||
| getcb_get2_t * | parent_get2cb, | ||
| obj_template_t * | obj, | ||
| boolean | with_defaults, | ||
| getcb_get2_walker_fn_t | walkerfn, | ||
| void * | cookie | ||
| ) |
Process the instances of an object for the object itself and 0 or more nest levels of descendant nodes.
Called from xml_wr and other functions that need to access the operational data returned from a GET2 callback
| scb | the session control block getting the reply |
| msg | the xml_msg header in use for the response |
| parentval | the parent value; ancestor if parent_get2cb used This is usually the last real val_value_t config node before the child GET2 nodes are accessed |
| parent_get2cb | the get2 control block of the parent when called recursively for nested complex nodes |
| obj | the object template for the value(s) to write |
| with_defaults | TRUE if the default nodes should be processed FALSE if default nodes should be skipped |
| walkerfn | get2 walker callback to process value instances |
| cookie | the opaque parameter block to pass to the walkerfn |

| status_t getcb_get2_child_obj_ex | ( | ses_cb_t * | scb, |
| xml_msg_hdr_t * | msg, | ||
| val_value_t * | parentval, | ||
| getcb_get2_t * | parent_get2cb, | ||
| obj_template_t * | obj, | ||
| boolean | with_defaults, | ||
| getcb_get2_walker_fn_t | walkerfn, | ||
| void * | cookie, | ||
| getcb_get2_t * | force_get2cb, | ||
| getcb_api_mode_t | api_mode | ||
| ) |
Process the instances of an object for the object itself and 0 or more nest levels of descendant nodes Use the get2cb pointer if provided.
The force_get2cb is for an internal API
The API mode used for access to internal procedures in GET2 Normal mode is a GET2 walk. 1-shot is GET-exact for a leafref lookup, etc.
| scb | the session control block getting the reply |
| msg | the xml_msg header in use for the response |
| parentval | the parent value; ancestor if parent_get2cb used This is usually the last real val_value_t config node before the child GET2 nodes are accessed |
| parent_get2cb | the get2 control block of the parent when called recursively for nested complex nodes |
| obj | the object template for the value(s) to write |
| with_defaults | TRUE if the default nodes should be processed FALSE if default nodes should be skipped |
| walkerfn | get2 walker callback to process value instances |
| cookie | the opaque parameter block to pass to the walkerfn |
| force_get2cb | pointer to get2 control block to use instead of a private one inside the function call |
| api_mode | normal for XML, JSON walks; 1shot for tree walk |


| val_value_t * getcb_get2cb_to_request_val | ( | getcb_get2_t * | get2cb, |
| obj_template_t * | get_request_obj, | ||
| boolean | preserve_data, | ||
| xml_msg_hdr_t * | msg, | ||
| status_t * | res | ||
| ) |
Convert a get2cb struct to a <get-request> value tree.
| get2cb | get2 control block to use | |
| get_request_obj | object template for <get-request> object | |
| preserve_data | TRUE to preserve the data in get2cb FALSE if OK to move some data from request to get2cb instead of cloning it | |
| msg | message header to use (may be NULL; used only for NMDA) | |
| [out] | res | address of return status; *res return status |


| val_value_t * getcb_get2cb_to_response_val | ( | getcb_get2_t * | get2cb, |
| obj_template_t * | response_obj, | ||
| boolean | preserve_data, | ||
| status_t * | res | ||
| ) |
Convert a get2cb struct to a <get-response> value tree.
| get2cb | get2 control block to convert | |
| response_obj | object template for <get-response> | |
| preserve_data | TRUE to preserve the data in get2cb FALSE if OK to move some data from get2cb instead of cloning it | |
| [out] | res | address of return status; *res return status |

| val_value_t * getcb_get2cb_to_val | ( | getcb_get2_t * | get2cb, |
| status_t * | retres | ||
| ) |
Convert a GET2 CB to the equivalent val_value_t tree only container and list are supported.
| get2cb | GET CB to convert | |
| [out] | retres | address of return status; *retres status |

| status_t getcb_handle_acmtest | ( | ses_cb_t * | scb, |
| xml_msg_hdr_t * | msg, | ||
| val_nodetest_fn_t | testfn, | ||
| getcb_get2_t * | get2cb | ||
| ) |
check the access control and testfn callback for a node that would have it skipped because the write_full_check_val function is skipped
| scb | session control block |
| msg | xml_msg_hdr_t in progress |
| testfn | callback function to use, NULL if not used |
| get2cb | get2 control block to use |

| void getcb_init_get2cb | ( | getcb_get2_t * | get2cb | ) |
Init a GET2 control block.
| [in,out] | get2cb | GET2 control block to initialize get2cb initialized struct use GETCB_GET2_ macros to get and access fields |


| boolean getcb_is_get_exact | ( | getcb_get2_t * | get2cb | ) |
Check if the getcb represents a response that is for a get-exact or a getnext.
| get2cb | get control block to check |

| void getcb_log_walker | ( | const xmlChar * | caller, |
| getcb_walker_mode_t | walker_mode, | ||
| const xmlChar * | objname, | ||
| const xmlChar * | valname | ||
| ) |
Print some logging info for a GET2 walker consumer callback.
| caller | function name calling |
| walker_mode | enum for callback mode |
| objname | name of 'obj' parameter or NULL if none |
| valname | name of 'val' parameter or NULL if none |
| boolean getcb_match_keys_getcb | ( | obj_template_t * | useobj, |
| val_value_t * | useval, | ||
| getcb_get2_t * | get2cb | ||
| ) |
Match the requested list entry.
Use val value list node from All in One callback for check and the KeyQ in get2cb.
| useobj | object to use |
| useval | val value to match keys with |
| get2cb | get2 control block to use |

| boolean getcb_match_keys_keyQ | ( | obj_template_t * | useobj, |
| val_value_t * | useval, | ||
| dlq_hdr_t * | srcQ | ||
| ) |
Match the requested list entry.
Use val value list node from All in One callback for check and the Queue of val values.
| useobj | object to use |
| useval | val value to match keys with |
| srcQ | Queue of val values key entries |


| boolean getcb_match_keys_lookup | ( | obj_template_t * | useobj, |
| val_value_t * | useval, | ||
| getcb_get2_lookup_t * | lookup | ||
| ) |
Match the requested list entry.
Use val value list node from All in One callback for check and the KeyQ.
| useobj | object to use |
| useval | val value to match keys with |
| lookup | record to use to generate match expression |

| status_t getcb_move_response_get2cb | ( | getcb_get2_t * | response_get2cb, |
| getcb_get2_t * | get2cb | ||
| ) |
Move the return fields from the return get2cb to the target get2cb.
| response_get2cb | get2 control block to move from |
| get2cb | get2 control block to move to |


| void getcb_move_return_keys | ( | getcb_get2_t * | get2cb | ) |
Move the return keys to the keyQ replacing the nodes in the keyQ if already there.
| get2cb | get2 control block to use |

| boolean getcb_need_get2 | ( | obj_template_t * | curobj, |
| obj_template_t * | reqobj | ||
| ) |
check if the node has a get2 callback or in a choice/case subtree that has get2 callback
| curobj | ceiling object – data parent of 'reqobj' |
| reqobj | target object requested that may have get2 cb |


| boolean getcb_need_get2_ex | ( | obj_template_t * | curobj, |
| obj_template_t * | reqobj, | ||
| uint32 * | choicecnt, | ||
| obj_template_t ** | top_choice | ||
| ) |
check if the node has a get2 callback or in a choice/case subtree that has get2 callback
| curobj | ceiling object – data parent of 'reqobj' | |
| reqobj | target object requested that may have get2 cb | |
| [out] | choicecnt | address of return choice count *choicecnt number of implied choices that need to be retrieved |
| [out] | top_choice | address of return top_choice *top_choice topmost choice that needs to be retrieved |


| getcb_get2_getbulk_t * getcb_new_get2_getbulk | ( | void | ) |
Create a new getcb_get2_getbulk struct.


| getcb_get2_lookup_t * getcb_new_get2_lookup | ( | obj_template_t * | obj, |
| dlq_hdr_t * | keyvalQ | ||
| ) |
Create a new getcb_get2_lookup struct.
| obj | object template to save in the lookup |
| keyvalQ | Q of getcb_keyval_t to transfer |

| getcb_get2_select_t * getcb_new_get2_select | ( | const xmlChar * | modname, |
| const xmlChar * | objname | ||
| ) |
Create a new getcb_select_t struct.
| modname | module name to use |
| objname | object name to use |

| getcb_get2_t * getcb_new_get2cb | ( | void | ) |
Malloc and init a new get2 control block.


| getcb_keyval_t * getcb_new_keyval | ( | const xmlChar * | keyval | ) |
Create a new GET2 keyval holder.
| keyval | key value string |

| getcb_keyval_t * getcb_new_keyval2 | ( | val_value_t * | keynode, |
| obj_template_t * | keyobj, | ||
| boolean | fixed_value | ||
| ) |
Create a new Get2 keyval holder using val backptr.
| keynode | val_value_t node for key value |
| keyobj | object template for real object |
| fixed_value | TRUE if a fixed value for getnext purposes |
| getcb_keyval_t * getcb_new_keyval3 | ( | const xmlChar * | keyval, |
| obj_template_t * | keyobj, | ||
| boolean | fixed_value | ||
| ) |
Create a new Get2 keyval holder using value string.
| keyval | string prepresentation of key value |
| keyobj | object template for real object |
| fixed_value | TRUE if a fixed value for getnext purposes |


| getcb_get2_t * getcb_new_parent_get2cb | ( | obj_template_t * | obj, |
| dlq_hdr_t * | keyQ | ||
| ) |
Create a new get2 control block for the parent Used for XGET operation to fill the list's parent get2cb.
| obj | object type to use |
| keyQ | Q of keys to transfer |

| obj_template_t * getcb_next_requested_child | ( | getcb_get2_t * | get2cb, |
| obj_template_t * | curchild | ||
| ) |
Check if the specified object has any more terminal nodes that need to be returned for a get2 request.
Return the next one
The get2cb will be examined:
Any content-match nodes will be returned but no filtering of these objects will be done
Any key leaf nodes will be skipped; Processing of key leafs is done first and is never skipped
| get2cb | get2 control block to use |
| curchild | current child; start search with next sibling |

| status_t getcb_pre_get2_choices | ( | xml_msg_hdr_t * | msg, |
| ses_cb_t * | scb, | ||
| getcb_get2_t * | parent_get2cb, | ||
| obj_template_t * | targobj, | ||
| val_value_t * | curval, | ||
| uint32 | choice_cnt, | ||
| obj_template_t * | top_choice, | ||
| boolean * | force_remove, | ||
| getcb_get2_t ** | ret_get2cb | ||
| ) |
Invoke the get2 callbacks for each of the implied choice-stmt nodes in a subtree or REST resource request.
These requests will only specify data nodes The choice-stmt and case-stmt are considered schema nodes and not data nodes
| msg | incoming or outgoing message header in progress | |
| scb | session control block NULL if no read access control is desired | |
| parent_get2cb | get2 control block for parent get2 object | |
| targobj | object template for the real object that is 'being retrieved after the choices. Needed to check if the proper case is active | |
| curval | current database node of the parent or ancestor of the object being retrieved | |
| choice_cnt | number of choices found | |
| top_choice | pointer to first choice to process | |
| [out] | force_remove | address of return force_remove flag *force_remove TRUE if the object template for a content match node was missing or if the callback returned any error for the content-match node FALSE if all content match nodes were OK |
| [out] | ret_get2cb | address of return get2cb of final choice *ret_get2cb is set to the get2 control block allocated for the final choice retrieved; may have terminal nodes in it |

| status_t getcb_replace_response_get2cb | ( | getcb_get2_t * | response_get2cb, |
| getcb_get2_t * | get2cb, | ||
| boolean | replace_mode | ||
| ) |
Move the return fields from the return get2cb to the target get2cb Can clean out old data first.
| response_get2cb | get2 control block to move from |
| get2cb | get2 control block to move to |
| replace_mode | TRUE to clean out old data first; FALSE if assumed get2cb return data is empty |


| getcb_get2_t * getcb_request_val_to_get2cb | ( | val_value_t * | get_request_val, |
| boolean | preserve_data, | ||
| status_t * | res | ||
| ) |
Convert a <get-request> value tree into a get2cb struct.
| get_request_val | value tree to convert | |
| preserve_data | TRUE to preserve the data in get_request_val FALSE if OK to move some data from request to get2cb instead of cloning it | |
| [out] | res | address of return status; *res return status |

| getcb_get2_t * getcb_response_val_to_get2cb | ( | val_value_t * | response_val, |
| boolean | preserve_data, | ||
| status_t * | res | ||
| ) |
Convert a <get-response> value to a get2cb struct.
| response_val | = response structure to convert | |
| preserve_data | TRUE to preserve the data in get_request_val FALSE if OK to move some data from request to get2cb instead of cloning it | |
| [out] | res | address of return status; *res return status |

| status_t getcb_set_active_case | ( | getcb_get2_t * | get2cb, |
| const xmlChar * | active_case_modname, | ||
| const xmlChar * | active_case | ||
| ) |
Set the active case to the specified object.
| get2cb | get2 control block to use |
| active_case_modname | module name to set |
| active_case | case name to set |

| void getcb_undo_move_return_keys | ( | getcb_get2_t * | get2cb | ) |
Move back the return keys from the keyQ.
| get2cb | get2 control block to use |
