Remove special socket_wrapper code.
[samba.git] / lib / socket_wrapper / socket_wrapper.h
index b2d44769ff93bdf98a488b12dfd44793d9bdbc61..bd8cdca53fefedba77ea4be9ff2fcf271a2fa34a 100644 (file)
@@ -49,12 +49,17 @@ int swrap_getsockopt(int s, int level, int optname, void *optval, socklen_t *opt
 int swrap_setsockopt(int s, int  level,  int  optname,  const  void  *optval, socklen_t optlen);
 ssize_t swrap_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
 ssize_t swrap_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
+ssize_t swrap_sendmsg(int s, const struct msghdr *msg, int flags);
+ssize_t swrap_recvmsg(int s, struct msghdr *msg, int flags);
 int swrap_ioctl(int s, int req, void *ptr);
 ssize_t swrap_recv(int s, void *buf, size_t len, int flags);
+ssize_t swrap_read(int s, void *buf, size_t len);
 ssize_t swrap_send(int s, const void *buf, size_t len, int flags);
 int swrap_readv(int s, const struct iovec *vector, size_t count);
-int swrap_writev(int s, const struct iovec *vector, size_t count);
+ssize_t swrap_writev(int s, const struct iovec *vector, size_t count);
 int swrap_close(int);
+int swrap_dup(int oldfd);
+int swrap_dup2(int oldfd, int newfd);
 
 #ifdef SOCKET_WRAPPER_REPLACE
 
@@ -108,6 +113,16 @@ int swrap_close(int);
 #endif
 #define sendto(s,buf,len,flags,to,tolen)          swrap_sendto(s,buf,len,flags,to,tolen)
 
+#ifdef sendmsg
+#undef sendmsg
+#endif
+#define sendmsg(s,msg,flags)            swrap_sendmsg(s,msg,flags)
+
+#ifdef recvmsg
+#undef recvmsg
+#endif
+#define recvmsg(s,msg,flags)            swrap_recvmsg(s,msg,flags)
+
 #ifdef ioctl
 #undef ioctl
 #endif
@@ -118,6 +133,11 @@ int swrap_close(int);
 #endif
 #define recv(s,buf,len,flags)          swrap_recv(s,buf,len,flags)
 
+#ifdef read
+#undef read
+#endif
+#define read(s,buf,len)                swrap_read(s,buf,len)
+
 #ifdef send
 #undef send
 #endif
@@ -142,7 +162,16 @@ int swrap_close(int);
 #undef close
 #endif
 #define close(s)                       swrap_close(s)
+
+#ifdef dup
+#undef dup
 #endif
+#define dup(s)                 swrap_dup(s)
 
+#ifdef dup2
+#undef dup2
+#endif
+#define dup2(s, s2)            swrap_dup2(s, s2)
 
+#endif /* SOCKET_WRAPPER_REPLACE */
 #endif /* __SOCKET_WRAPPER_H__ */