mirror of
https://github.com/samba-team/samba.git
synced 2025-12-21 20:23:50 +03:00
r18947: overload listen() and ioctl() in socket_wrapper
metze
(This used to be commit dfaccdca1b)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
ee97148354
commit
174742a74c
@@ -23,12 +23,14 @@ int swrap_socket(int family, int type, int protocol);
|
||||
int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
|
||||
int swrap_connect(int s, const struct sockaddr *serv_addr, socklen_t addrlen);
|
||||
int swrap_bind(int s, const struct sockaddr *myaddr, socklen_t addrlen);
|
||||
int swrap_listen(int s, int backlog);
|
||||
int swrap_getpeername(int s, struct sockaddr *name, socklen_t *addrlen);
|
||||
int swrap_getsockname(int s, struct sockaddr *name, socklen_t *addrlen);
|
||||
int swrap_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
|
||||
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);
|
||||
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_send(int s, const void *buf, size_t len, int flags);
|
||||
int swrap_close(int);
|
||||
@@ -50,6 +52,11 @@ int swrap_close(int);
|
||||
#endif
|
||||
#define bind(s,myaddr,addrlen) swrap_bind(s,myaddr,addrlen)
|
||||
|
||||
#ifdef listen
|
||||
#undef listen
|
||||
#endif
|
||||
#define listen(s,blog) swrap_listen(s,blog)
|
||||
|
||||
#ifdef getpeername
|
||||
#undef getpeername
|
||||
#endif
|
||||
@@ -80,6 +87,11 @@ int swrap_close(int);
|
||||
#endif
|
||||
#define sendto(s,buf,len,flags,to,tolen) swrap_sendto(s,buf,len,flags,to,tolen)
|
||||
|
||||
#ifdef ioctl
|
||||
#undef ioctl
|
||||
#endif
|
||||
#define ioctl(s,req,ptr) swrap_ioctl(s,req,ptr)
|
||||
|
||||
#ifdef recv
|
||||
#undef recv
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user