Tor 0.4.9.0-alpha-dev
entry_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 entry_port_cfg_st.h
9 * @brief Configuration structure for client ports.
10 **/
11
12#ifndef ENTRY_PORT_CFG_ST_H
13#define ENTRY_PORT_CFG_ST_H
14
15#include "lib/cc/torint.h"
16#include "core/or/or.h"
17
19 /* Client port types (socks, dns, trans, natd) only: */
20 uint8_t isolation_flags; /**< Zero or more isolation flags */
21 int session_group; /**< A session group, or -1 if this port is not in a
22 * session group. */
23
24 /* Socks only: */
25 /** When both no-auth and user/pass are advertised by a SOCKS client, select
26 * no-auth. */
27 unsigned int socks_prefer_no_auth : 1;
28 /** When ISO_SOCKSAUTH is in use, Keep-Alive circuits indefinitely. */
29 unsigned int socks_iso_keep_alive : 1;
30
31 /* Client port types only: */
32 unsigned int ipv4_traffic : 1;
33 unsigned int ipv6_traffic : 1;
34 unsigned int prefer_ipv6 : 1;
35 unsigned int dns_request : 1;
36 unsigned int onion_traffic : 1;
37
38 /** For a socks listener: should we cache IPv4/IPv6 DNS information that
39 * exit nodes tell us?
40 *
41 * @{ */
42 unsigned int cache_ipv4_answers : 1;
43 unsigned int cache_ipv6_answers : 1;
44 /** @} */
45 /** For a socks listeners: if we find an answer in our client-side DNS cache,
46 * should we use it?
47 *
48 * @{ */
49 unsigned int use_cached_ipv4_answers : 1;
50 unsigned int use_cached_ipv6_answers : 1;
51 /** @} */
52 /** For socks listeners: When we can automap an address to IPv4 or IPv6,
53 * do we prefer IPv6? */
54 unsigned int prefer_ipv6_virtaddr : 1;
55
56 /** For socks listeners: can we send back the extended SOCKS5 error code? */
57 unsigned int extended_socks5_codes : 1;
58
59};
60
61#endif /* !defined(ENTRY_PORT_CFG_ST_H) */
Master header file for Tor-specific functionality.
unsigned int cache_ipv4_answers
unsigned int socks_iso_keep_alive
unsigned int use_cached_ipv4_answers
unsigned int prefer_ipv6_virtaddr
unsigned int socks_prefer_no_auth
unsigned int extended_socks5_codes
Integer definitions used throughout Tor.