tor  0.4.2.0-alpha-dev
socketpair.h
1 /* Copyright (c) 2003-2004, Roger Dingledine
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2019, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 #ifndef TOR_SOCKETPAIR_H
7 #define TOR_SOCKETPAIR_H
8 
9 #include "orconfig.h"
11 #include "lib/net/nettypes.h"
12 
13 #if !defined(HAVE_SOCKETPAIR) || defined(_WIN32) || defined(TOR_UNIT_TESTS)
14 #define NEED_ERSATZ_SOCKETPAIR
15 int tor_ersatz_socketpair(int family, int type, int protocol,
16  tor_socket_t fd[2]);
17 #endif
18 
19 #endif /* !defined(TOR_SOCKETPAIR_H) */
Declarations for types used throughout the Tor networking system.
#define tor_socket_t
Definition: nettypes.h:36
Macros to implement mocking and selective exposure for the test code.