Tor 0.4.9.0-alpha-dev
port_cfg_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-2021, The Tor Project, Inc. */
5/* See LICENSE for licensing information */
6
7/**
8 * @file port_cfg_st.h
9 * @brief Listener port configuration structure.
10 **/
11
12#ifndef PORT_CFG_ST_H
13#define PORT_CFG_ST_H
14
17
18/** Configuration for a single port that we're listening on. */
19struct port_cfg_t {
20 tor_addr_t addr; /**< The actual IP to listen on, if !is_unix_addr. */
21 int port; /**< The configured port, or CFG_AUTO_PORT to tell Tor to pick its
22 * own port. */
23 uint8_t type; /**< One of CONN_TYPE_*_LISTENER */
24 unsigned is_unix_addr : 1; /**< True iff this is an AF_UNIX address. */
25
26 unsigned is_group_writable : 1;
27 unsigned is_world_writable : 1;
28 unsigned relax_dirmode_check : 1;
29 unsigned explicit_addr : 1; /** Indicate if address was explicitly set or
30 * we are using the default address. */
31
33
34 server_port_cfg_t server_cfg;
35
36 /* Unix sockets only: */
37 /** Path for an AF_UNIX address */
38 char unix_addr[FLEXIBLE_ARRAY_MEMBER];
39};
40
41#endif /* !defined(PORT_CFG_ST_H) */
Configuration structure for client ports.
Configuration structure for server ports.
char unix_addr[FLEXIBLE_ARRAY_MEMBER]
Definition: port_cfg_st.h:38
uint8_t type
Definition: port_cfg_st.h:23
unsigned is_unix_addr
Definition: port_cfg_st.h:24
entry_port_cfg_t entry_cfg
Definition: port_cfg_st.h:32
tor_addr_t addr
Definition: port_cfg_st.h:20