summaryrefslogtreecommitdiff
path: root/lib/memdebug.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-10-10 16:56:35 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-10-14 17:40:12 +0200
commitad164eceb3ce6721d34a3418e0dacabd4f4ff904 (patch)
tree7ae3bdc1411b57b96b68a9a0ccef16904ec22c98 /lib/memdebug.h
parent4af3c777a9996f32c5a23db0ecf29996197dfdbc (diff)
downloadcurl-ad164eceb3ce6721d34a3418e0dacabd4f4ff904.tar.gz
memdebug: trace send, recv and socket
... to allow them to be included in torture tests too. closes #1980
Diffstat (limited to 'lib/memdebug.h')
-rw-r--r--lib/memdebug.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/memdebug.h b/lib/memdebug.h
index 835dab38c..c6b9225f4 100644
--- a/lib/memdebug.h
+++ b/lib/memdebug.h
@@ -8,7 +8,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -66,6 +66,12 @@ CURL_EXTERN int curl_socketpair(int domain, int type, int protocol,
int line, const char *source);
#endif
+/* send/receive sockets */
+CURL_EXTERN ssize_t curl_dosend(int sockfd, const void *buf, size_t len,
+ int flags, int line, const char *source);
+CURL_EXTERN ssize_t curl_dorecv(int sockfd, void *buf, size_t len, int flags,
+ int line, const char *source);
+
/* FILE functions */
CURL_EXTERN FILE *curl_fopen(const char *file, const char *mode, int line,
const char *source);
@@ -84,6 +90,8 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
#define calloc(nbelem,size) curl_docalloc(nbelem, size, __LINE__, __FILE__)
#define realloc(ptr,size) curl_dorealloc(ptr, size, __LINE__, __FILE__)
#define free(ptr) curl_dofree(ptr, __LINE__, __FILE__)
+#define send(a,b,c,d) curl_dosend(a,b,c,d, __LINE__, __FILE__)
+#define recv(a,b,c,d) curl_dorecv(a,b,c,d, __LINE__, __FILE__)
#ifdef WIN32
# ifdef UNICODE