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,
286 dlq_hdr_t *rawparmQ);
467 const xmlChar *strval,
496 const xmlChar *strval,
526 const xmlChar *strval,
556 const xmlChar *strval,
dlq provides general double-linked list and queue support:
status_t
global error return code
Definition: status_enum.h:210
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:1930
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:2715
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:2669
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:2630
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:594
YANG module data structures Many internal representations of YANG module constructs.
Global error messages for status code enumerations.
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:859
One YANG data-def-stmt.
Definition: obj.h:1229
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:912