Tor
0.4.7.0-alpha-dev
|
#include <control_cmd.h>
Data Fields | |
unsigned int | min_args |
unsigned int | max_args |
bool | accept_keywords |
const char ** | allowed_keywords |
unsigned | kvline_flags |
bool | want_cmddata |
bool | store_raw_body |
Definition for the syntax of a controller command, as parsed by control_cmd_parse_args.
WORK IN PROGRESS: This structure is going to get more complex as this branch goes on.
Definition at line 36 of file control_cmd.h.
bool accept_keywords |
If true, we should parse options after the positional arguments as a set of unordered flags and key=value arguments.
Requires that max_args is not UINT_MAX.
Definition at line 53 of file control_cmd.h.
const char** allowed_keywords |
If accept_keywords is true, then only the keywords listed in this (NULL-terminated) array are valid keywords for this command.
Definition at line 58 of file control_cmd.h.
Referenced by kvline_check_keyword_args().
unsigned kvline_flags |
If accept_keywords is true, this option is passed to kvline_parse() as its flags.
Definition at line 63 of file control_cmd.h.
unsigned int max_args |
Highest number of positional arguments that this command accepts. UINT_MAX for no limit.
Definition at line 46 of file control_cmd.h.
unsigned int min_args |
Lowest number of positional arguments that this command accepts. 0 for "it's okay not to have positional arguments."
Definition at line 41 of file control_cmd.h.
bool store_raw_body |
True iff this command needs access to the raw body of the input.
This should not be needed for pure commands; it is purely a legacy option.
Definition at line 74 of file control_cmd.h.
bool want_cmddata |
True iff this command wants to be followed by a multiline object.
Definition at line 67 of file control_cmd.h.