Tor 0.4.9.0-alpha-dev
tor_cmdline_mode.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-2021, The Tor Project, Inc. */
5/* See LICENSE for licensing information */
6
7/**
8 * \file tor_cmdline_mode.h
9 * \brief Declare the tor_cmdline_mode_t enumeration
10 **/
11
12#ifndef TOR_CMDLINE_MODE_H
13#define TOR_CMDLINE_MODE_H
14
15/**
16 * Enumeration to describe which command Tor is running. These commands
17 * are controlled by command-line options.
18 **/
19typedef enum {
20 CMD_RUN_TOR=0, /**< The default: run Tor as a daemon. */
21 CMD_LIST_FINGERPRINT, /**< Running --list-fingerprint. */
22 CMD_HASH_PASSWORD, /**< Running --hash-password. */
23 CMD_VERIFY_CONFIG, /**< Running --verify-config. */
24 CMD_DUMP_CONFIG, /**< Running --dump-config. */
25 CMD_KEYGEN, /**< Running --keygen */
26 CMD_KEY_EXPIRATION, /**< Running --key-expiration */
27 CMD_IMMEDIATE, /**< Special value: indicates a command that is handled
28 * immediately during configuration processing. */
29 CMD_RUN_UNITTESTS, /**< Special value: indicates that we have entered
30 * the Tor code from the unit tests, not from the
31 * regular Tor binary at all. */
33
34#endif /* !defined(TOR_CMDLINE_MODE_H) */
tor_cmdline_mode_t
@ CMD_HASH_PASSWORD
@ CMD_LIST_FINGERPRINT
@ CMD_VERIFY_CONFIG
@ CMD_RUN_TOR
@ CMD_KEY_EXPIRATION
@ CMD_KEYGEN
@ CMD_DUMP_CONFIG
@ CMD_IMMEDIATE
@ CMD_RUN_UNITTESTS