tor

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

socketpair.h (680B)


      1 /* Copyright (c) 2003-2004, Roger Dingledine
      2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
      3 * Copyright (c) 2007-2021, The Tor Project, Inc. */
      4 /* See LICENSE for licensing information */
      5 
      6 #ifndef TOR_SOCKETPAIR_H
      7 #define TOR_SOCKETPAIR_H
      8 
      9 /**
     10 * @file socketpair.h
     11 * @brief Header for socketpair.c
     12 **/
     13 
     14 #include "orconfig.h"
     15 #include "lib/testsupport/testsupport.h"
     16 #include "lib/net/nettypes.h"
     17 
     18 #if !defined(HAVE_SOCKETPAIR) || defined(_WIN32) || defined(TOR_UNIT_TESTS)
     19 #define NEED_ERSATZ_SOCKETPAIR
     20 int tor_ersatz_socketpair(int family, int type, int protocol,
     21                          tor_socket_t fd[2]);
     22 #endif
     23 
     24 #endif /* !defined(TOR_SOCKETPAIR_H) */