Tor  0.4.4.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-2020, 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. */
19 struct 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 
30  entry_port_cfg_t entry_cfg;
31 
32  server_port_cfg_t server_cfg;
33 
34  /* Unix sockets only: */
35  /** Path for an AF_UNIX address */
36  char unix_addr[FLEXIBLE_ARRAY_MEMBER];
37 };
38 
39 #endif /* !defined(PORT_CFG_ST_H) */
Configuration structure for client ports.
uint8_t type
Definition: port_cfg_st.h:23
char unix_addr[FLEXIBLE_ARRAY_MEMBER]
Definition: port_cfg_st.h:36
tor_addr_t addr
Definition: port_cfg_st.h:20
Cnfiguration structure for server ports.
unsigned is_unix_addr
Definition: port_cfg_st.h:24