85#define SCRIPTMODE TRUE
86#define PLAINMODE FALSE
121typedef enum cli_mode_t_ {
130typedef struct cli_rawparm_t_ {
152 (*cli_xml_buffer_fn_t) (
const xmlChar *xmlbuff,
180typedef struct cli_inline_parms_t_ {
355 dlq_hdr_t *rawparmQ);
569 const xmlChar *strval,
598 const xmlChar *strval,
628 const xmlChar *strval,
658 const xmlChar *strval,
dlq provides general double-linked list and queue support:
status_t
global error return code
Definition: status_enum.h:219
status_t(* cli_var_replace_fn_t)(runstack_context_t *rcxt, val_value_t *val)
Check a val_value_t for variable usage to be replaced by the variable value.
Definition: cli.h:169
cli_rawparm_t * cli_new_empty_rawparm(const xmlChar *name)
Malloc and init a raw parm entry that has no value (NCX_BT_EMPTY)
Definition: cli.c:1422
val_value_t * cli_parse_inline(runstack_context_t *rcxt, int argc, char *argv[], obj_template_t *obj, boolean valonly, boolean script, boolean autocomp, boolean rawxml, cli_mode_t mode, status_t *status, cli_xml_buffer_fn_t cbfn, cli_var_replace_fn_t cbfn2)
schema based CLI support
Definition: cli.c:1931
void cli_clean_rawparmQ(dlq_hdr_t *parmQ)
Clean and free a Q of raw parm entries.
Definition: cli.c:1479
void cli_free_rawparm(cli_rawparm_t *parm)
Clean and free a raw parm entry.
Definition: cli.c:1451
status_t cli_parse_parm_ex(runstack_context_t *rcxt, val_value_t *val, obj_template_t *obj, const xmlChar *strval, boolean script, ncx_bad_data_t bad_data)
Create a val_value_t struct for the specified parm value, and insert it into the parent container val...
Definition: cli.c:2785
status_t cli_parse_parm_ret(runstack_context_t *rcxt, val_value_t *val, obj_template_t *obj, const xmlChar *strval, boolean script, val_value_t **retval)
Create a val_value_t struct for the specified parm value, and insert it into the parent container val...
Definition: cli.c:2739
val_value_t * cli_parse_inline2(runstack_context_t *rcxt, int argc, char *argv[], cli_inline_parms_t *parms, status_t *status)
schema based CLI support
Definition: cli.c:1989
cli_rawparm_t * cli_find_rawparm(const xmlChar *name, dlq_hdr_t *parmQ)
Find the specified raw parm entry.
Definition: cli.c:1510
status_t cli_parse_raw(int argc, char *argv[], dlq_hdr_t *rawparmQ)
Generate N sets of variable/value pairs for the specified boot-strap CLI parameters.
Definition: cli.c:1582
cli_mode_t
CLI parsing modes.
Definition: cli.h:121
cli_rawparm_t * cli_new_rawparm(const xmlChar *name, boolean xsdlist)
bootstrap CLI support Malloc and init a raw parm entry
Definition: cli.c:1388
status_t cli_parse_parm(runstack_context_t *rcxt, val_value_t *val, obj_template_t *obj, const xmlChar *strval, boolean script)
Create a val_value_t struct for the specified parm value, and insert it into the parent container val...
Definition: cli.c:2700
val_value_t *(* cli_xml_buffer_fn_t)(const xmlChar *xmlbuff, obj_template_t *targetobj, status_t *res)
Read an XML buffer and convert it into a real data structure.
Definition: cli.h:152
val_value_t * cli_parse(runstack_context_t *rcxt, int argc, char *argv[], obj_template_t *obj, boolean valonly, boolean script, boolean autocomp, cli_mode_t mode, status_t *status)
schema based CLI support
Definition: cli.c:1904
status_t cli_parse_parm_binary(runstack_context_t *rcxt, val_value_t *val, obj_template_t *obj, const xmlChar *strval, boolean script, val_value_t **retval)
Create a val_value_t struct for the specified parm value, and insert it into the value set Extended.
Definition: cli.c:680
@ CLI_MODE_PROGRAM
real argc, argv
Definition: cli.h:123
@ CLI_MODE_NONE
mode not set
Definition: cli.h:122
@ CLI_MODE_COMMAND
called from yangcli command parser
Definition: cli.h:124
ncx_bad_data_t
enumeration for CLI handling of bad input data used by yangcli, all others use NCX_BAD_DATA_ERROR
Definition: ncxtypes.h:595
YANG module data structures Many internal representations of YANG module constructs.
Global error messages for status code enumerations.
CLI inline parser parameter block.
Definition: cli.h:180
obj_template_t * obj
obj_template_t of the container that should be used to validate the input against the child nodes of ...
Definition: cli.h:185
cli_mode_t mode
mode
Definition: cli.h:230
boolean valonly
valonly
Definition: cli.h:192
boolean hide_unknown_error
hide_unknown_error used for show raw testing of the command line to see if it should be processed or ...
Definition: cli.h:221
cli_var_replace_fn_t cbfn2
cbfn2 inline data variable replacement callback function
Definition: cli.h:236
cli_xml_buffer_fn_t cbfn
cbfn inline XML data only: callback for XML buffer parsing
Definition: cli.h:233
boolean autocomp
autocomp
Definition: cli.h:206
boolean script
script
Definition: cli.h:198
boolean rawxml
rawxml XML parsing mode
Definition: cli.h:212
used for bootstrap CLI parms only, no validation
Definition: cli.h:130
int32 count
count field if duplicates
Definition: cli.h:137
char * value
stored value if set
Definition: cli.h:133
dlq_hdr_t qhdr
queue header to store rawparm in a dlq
Definition: cli.h:131
boolean hasvalue
indicates value is set
Definition: cli.h:134
const char * name
parameter name
Definition: cli.h:132
ncx_list_t * ncx_list
value if a list is expected
Definition: cli.h:136
boolean xsdlist
true if a list is expected
Definition: cli.h:135
header for a NCX List
Definition: ncxtypes.h:838
One YANG data-def-stmt.
Definition: obj.h:1284
Main runstact context control block used by yangcli to process script input loops and conditional sta...
Definition: runstack.h:256
one value to match one type
Definition: val.h:939