tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

port_cfg_st.h (1302B)


      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 
     15 #include "core/or/entry_port_cfg_st.h"
     16 #include "core/or/server_port_cfg_st.h"
     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  unsigned explicit_addr : 1; /** Indicate if address was explicitly set or
     30                               * we are using the default address. */
     31 
     32  entry_port_cfg_t entry_cfg;
     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) */