tor  0.4.2.1-alpha-dev
Data Structures | Macros | Typedefs | Functions
control_cmd.h File Reference
#include "lib/malloc/malloc.h"

Go to the source code of this file.

Data Structures

struct  control_cmd_syntax_t
 

Macros

#define control_cmd_args_free(v)   FREE_AND_NULL(control_cmd_args_t, control_cmd_args_free_, (v))
 

Typedefs

typedef struct control_cmd_args_t control_cmd_args_t
 
typedef struct control_cmd_syntax_t control_cmd_syntax_t
 

Functions

int handle_control_command (control_connection_t *conn, uint32_t cmd_data_len, char *args)
 
void control_cmd_free_all (void)
 
void control_cmd_args_free_ (control_cmd_args_t *args)
 
void control_cmd_args_wipe (control_cmd_args_t *args)
 

Detailed Description

Header file for control_cmd.c.

Definition in file control_cmd.h.

Typedef Documentation

◆ control_cmd_syntax_t

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.

Function Documentation

◆ control_cmd_args_free_()

void control_cmd_args_free_ ( control_cmd_args_t args)

Release all storage held in args

Definition at line 69 of file control_cmd.c.

References control_cmd_args_t::args, SMARTLIST_FOREACH, and tor_free.

◆ control_cmd_args_wipe()

void control_cmd_args_wipe ( control_cmd_args_t args)

◆ handle_control_command()

int handle_control_command ( control_connection_t conn,
uint32_t  cmd_data_len,
char *  args 
)

Run a given controller command, as selected by the current_cmd field of conn.

Definition at line 2370 of file control_cmd.c.

References CONTROL_COMMANDS, control_printf_endreply(), control_connection_t::current_cmd, handle_single_control_command(), N_CONTROL_COMMANDS, control_cmd_def_t::name, and tor_assert().