diff options
Diffstat (limited to 'src/lib/net')
-rw-r--r-- | src/lib/net/buffers_net.c | 5 | ||||
-rw-r--r-- | src/lib/net/gethostname.c | 5 | ||||
-rw-r--r-- | src/lib/net/gethostname.h | 5 | ||||
-rw-r--r-- | src/lib/net/ipv4.c | 5 | ||||
-rw-r--r-- | src/lib/net/ipv4.h | 4 | ||||
-rw-r--r-- | src/lib/net/ipv6.c | 7 | ||||
-rw-r--r-- | src/lib/net/ipv6.h | 5 | ||||
-rw-r--r-- | src/lib/net/nettypes.h | 5 | ||||
-rw-r--r-- | src/lib/net/resolve.c | 5 | ||||
-rw-r--r-- | src/lib/net/resolve.h | 5 | ||||
-rw-r--r-- | src/lib/net/socket.c | 6 | ||||
-rw-r--r-- | src/lib/net/socket.h | 5 | ||||
-rw-r--r-- | src/lib/net/socks5_status.h | 10 |
13 files changed, 72 insertions, 0 deletions
diff --git a/src/lib/net/buffers_net.c b/src/lib/net/buffers_net.c index edc9954f22..2e6a096a06 100644 --- a/src/lib/net/buffers_net.c +++ b/src/lib/net/buffers_net.c @@ -4,6 +4,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file buffers_net.c + * \brief Read and write data on a buf_t object. + **/ + #define BUFFERS_PRIVATE #include "lib/net/buffers_net.h" #include "lib/container/buffers.h" diff --git a/src/lib/net/gethostname.c b/src/lib/net/gethostname.c index b6cc9b8e5f..1c4431af29 100644 --- a/src/lib/net/gethostname.c +++ b/src/lib/net/gethostname.c @@ -3,6 +3,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file gethostname.c + * \brief Mockable wrapper for gethostname(). + */ + #include "orconfig.h" #include "lib/net/gethostname.h" diff --git a/src/lib/net/gethostname.h b/src/lib/net/gethostname.h index d83c5fe096..7bf0ce5920 100644 --- a/src/lib/net/gethostname.h +++ b/src/lib/net/gethostname.h @@ -3,6 +3,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file gethostname.h + * \brief Header for gethostname.c + **/ + #ifndef TOR_GETHOSTNAME_H #define TOR_GETHOSTNAME_H diff --git a/src/lib/net/ipv4.c b/src/lib/net/ipv4.c index 18e69761e2..db1429f49c 100644 --- a/src/lib/net/ipv4.c +++ b/src/lib/net/ipv4.c @@ -3,6 +3,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file ipv4.c + * \brief Functions for encoding and decoding IPv4 addresses into strings + **/ + #include "orconfig.h" #include "lib/cc/torint.h" #include "lib/net/ipv4.h" diff --git a/src/lib/net/ipv4.h b/src/lib/net/ipv4.h index 1ccc729970..0127f09e09 100644 --- a/src/lib/net/ipv4.h +++ b/src/lib/net/ipv4.h @@ -3,6 +3,10 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file ipv4.h + * \brief Header for ipv4.c + **/ #ifndef TOR_IPV4_H #define TOR_IPV4_H diff --git a/src/lib/net/ipv6.c b/src/lib/net/ipv6.c index 35d7ddb901..630d6f1db4 100644 --- a/src/lib/net/ipv6.c +++ b/src/lib/net/ipv6.c @@ -3,6 +3,13 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file ipv6.c + * \brief Functions for encoding and decoding IPv6 addresses + * + * (Because these functions are generic, they can also handle IPv4 addresses). + **/ + #include "lib/net/ipv6.h" #include "lib/net/ipv4.h" #include "lib/string/util_string.h" diff --git a/src/lib/net/ipv6.h b/src/lib/net/ipv6.h index 0a12e046ac..4e5ef4da88 100644 --- a/src/lib/net/ipv6.h +++ b/src/lib/net/ipv6.h @@ -3,6 +3,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file ipv6.h + * \brief Header for ipv6.c + **/ + #ifndef TOR_IPV6_H #define TOR_IPV6_H diff --git a/src/lib/net/nettypes.h b/src/lib/net/nettypes.h index f212374368..f7f2ec7d6a 100644 --- a/src/lib/net/nettypes.h +++ b/src/lib/net/nettypes.h @@ -3,6 +3,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file nettypes.h + * \brief Declarations for types used throughout the Tor networking system + **/ + #ifndef TOR_NET_TYPES_H #define TOR_NET_TYPES_H diff --git a/src/lib/net/resolve.c b/src/lib/net/resolve.c index cbe368ccfb..c620d4f6ab 100644 --- a/src/lib/net/resolve.c +++ b/src/lib/net/resolve.c @@ -3,6 +3,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file resolve.c + * \brief Use the libc DNS resolver to convert hostnames into addresses. + **/ + #include "lib/net/resolve.h" #include "lib/net/address.h" #include "lib/malloc/util_malloc.h" diff --git a/src/lib/net/resolve.h b/src/lib/net/resolve.h index f2280ae7e8..c91aecfee4 100644 --- a/src/lib/net/resolve.h +++ b/src/lib/net/resolve.h @@ -3,6 +3,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file resolve.h + * \brief Header for resolve.c + **/ + #ifndef TOR_RESOLVE_H #define TOR_RESOLVE_H diff --git a/src/lib/net/socket.c b/src/lib/net/socket.c index dc3d1531ff..1b3238d998 100644 --- a/src/lib/net/socket.c +++ b/src/lib/net/socket.c @@ -3,6 +3,12 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file socket.c + * \brief Compatibility and utility functions for working with network + * sockets. + **/ + #define SOCKET_PRIVATE #include "lib/net/socket.h" #include "lib/net/address.h" diff --git a/src/lib/net/socket.h b/src/lib/net/socket.h index cb0ccbe817..e2092c727a 100644 --- a/src/lib/net/socket.h +++ b/src/lib/net/socket.h @@ -3,6 +3,11 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file socket.h + * \brief Header for socket.c + **/ + #ifndef TOR_SOCKET_H #define TOR_SOCKET_H diff --git a/src/lib/net/socks5_status.h b/src/lib/net/socks5_status.h index 74b9c91023..0f31132545 100644 --- a/src/lib/net/socks5_status.h +++ b/src/lib/net/socks5_status.h @@ -3,6 +3,16 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ +/** + * \file socks5_status.h + * \brief Status codes used by the SOCKS5 protocol. + **/ + +/* NOTE: it probably isn't necessary to put this header in lib/net, but + * we need it in _some_ lower-level layer for now, since it is used by + * tools/tor-resolve.c. + */ + #ifndef TOR_SOCKS5_STATUS_H #define TOR_SOCKS5_STATUS_H |