summaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-03-31 14:37:09 -0400
committerNick Mathewson <nickm@torproject.org>2015-03-31 14:37:09 -0400
commit30e933b13660e62d10997f4809b3f13235b30325 (patch)
tree51047f6ec5b72865e0a5fbb0cac60fde115c916a /src/common/compat.h
parent732322b710d515a55ebbaa984fa12f19ccb333e8 (diff)
parentb49ffb2a21ccbcf62c3e38b822043b4302d8c26f (diff)
downloadtor-30e933b13660e62d10997f4809b3f13235b30325.tar.gz
tor-30e933b13660e62d10997f4809b3f13235b30325.zip
Merge branch 'ticket14710_squashed'
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 11b41cded9..5189b7e056 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -463,7 +463,8 @@ int tor_close_socket(tor_socket_t s);
tor_socket_t tor_open_socket_with_extensions(
int domain, int type, int protocol,
int cloexec, int nonblock);
-tor_socket_t tor_open_socket(int domain, int type, int protocol);
+MOCK_DECL(tor_socket_t,
+tor_open_socket,(int domain, int type, int protocol));
tor_socket_t tor_open_socket_nonblocking(int domain, int type, int protocol);
tor_socket_t tor_accept_socket(tor_socket_t sockfd, struct sockaddr *addr,
socklen_t *len);
@@ -474,8 +475,15 @@ tor_socket_t tor_accept_socket_with_extensions(tor_socket_t sockfd,
struct sockaddr *addr,
socklen_t *len,
int cloexec, int nonblock);
+MOCK_DECL(tor_socket_t,
+tor_connect_socket,(tor_socket_t socket,const struct sockaddr *address,
+ socklen_t address_len));
int get_n_open_sockets(void);
+MOCK_DECL(int,
+tor_getsockname,(tor_socket_t socket, struct sockaddr *address,
+ socklen_t *address_len));
+
#define tor_socket_send(s, buf, len, flags) send(s, buf, len, flags)
#define tor_socket_recv(s, buf, len, flags) recv(s, buf, len, flags)