aboutsummaryrefslogtreecommitdiff
path: root/src/lib/net/socketpair.h
blob: b07016ab94dd4fcd015c4f0f202d1d8d31d871b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Copyright (c) 2003-2004, Roger Dingledine
 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
 * Copyright (c) 2007-2020, The Tor Project, Inc. */
/* See LICENSE for licensing information */

#ifndef TOR_SOCKETPAIR_H
#define TOR_SOCKETPAIR_H

/**
 * @file socketpair.h
 * @brief Header for socketpair.c
 **/

#include "orconfig.h"
#include "lib/testsupport/testsupport.h"
#include "lib/net/nettypes.h"

#if !defined(HAVE_SOCKETPAIR) || defined(_WIN32) || defined(TOR_UNIT_TESTS)
#define NEED_ERSATZ_SOCKETPAIR
int tor_ersatz_socketpair(int family, int type, int protocol,
                          tor_socket_t fd[2]);
#endif

#endif /* !defined(TOR_SOCKETPAIR_H) */