Tor  0.4.5.0-alpha-dev
control_cmd_args_st.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * \file control_cmd_args_st.h
9  * \brief Definition for control_cmd_args_t
10  **/
11 
12 #ifndef TOR_CONTROL_CMD_ST_H
13 #define TOR_CONTROL_CMD_ST_H
14 
15 struct smartlist_t;
16 struct config_line_t;
17 
18 /**
19  * Parsed arguments for a control command.
20  *
21  * WORK IN PROGRESS: This structure is going to get more complex as this
22  * branch goes on.
23  **/
25  /**
26  * The command itself, as provided by the controller. Not owned by this
27  * structure.
28  **/
29  const char *command;
30  /**
31  * Positional arguments to the command.
32  **/
33  struct smartlist_t *args;
34  /**
35  * Keyword arguments to the command.
36  **/
38  /**
39  * Number of bytes in <b>cmddata</b>; 0 if <b>cmddata</b> is not set.
40  **/
41  size_t cmddata_len;
42  /**
43  * A multiline object passed with this command.
44  **/
45  char *cmddata;
46  /**
47  * If set, a nul-terminated string containing the raw unparsed arguments.
48  **/
49  const char *raw_body;
50 };
51 
52 #endif /* !defined(TOR_CONTROL_CMD_ST_H) */
control_cmd_args_t
Definition: control_cmd_args_st.h:24
control_cmd_args_t::kwargs
struct config_line_t * kwargs
Definition: control_cmd_args_st.h:37
control_cmd_args_t::args
struct smartlist_t * args
Definition: control_cmd_args_st.h:33
control_cmd_args_t::raw_body
const char * raw_body
Definition: control_cmd_args_st.h:49
control_cmd_args_t::command
const char * command
Definition: control_cmd_args_st.h:29
config_line_t
Definition: confline.h:29
control_cmd_args_t::cmddata
char * cmddata
Definition: control_cmd_args_st.h:45
smartlist_t
Definition: smartlist_core.h:26
control_cmd_args_t::cmddata_len
size_t cmddata_len
Definition: control_cmd_args_st.h:41