19 #ifndef _XENO_POSIX_SOCKET_H
20 #define _XENO_POSIX_SOCKET_H
22 #if !(defined(__KERNEL__) || defined(__XENO_SIM__))
24 #pragma GCC system_header
26 #include_next <sys/socket.h>
32 int __real_socket(
int protocol_family,
int socket_type,
int protocol);
34 ssize_t __real_recvmsg(
int fd,
struct msghdr *msg,
int flags);
36 ssize_t __real_sendmsg(
int fd,
const struct msghdr *msg,
int flags);
38 ssize_t __real_recvfrom(
int fd,
void *buf,
size_t len,
int flags,
39 struct sockaddr *from, socklen_t *fromlen);
41 ssize_t __real_sendto(
int fd,
const void *buf,
size_t len,
int flags,
42 const struct sockaddr *to, socklen_t tolen);
44 ssize_t __real_recv(
int fd,
void *buf,
size_t len,
int flags);
46 ssize_t __real_send(
int fd,
const void *buf,
size_t len,
int flags);
48 int __real_getsockopt(
int fd,
int level,
int optname,
void *optval,
51 int __real_setsockopt(
int fd,
int level,
int optname,
const void *optval,
54 int __real_bind(
int fd,
const struct sockaddr *my_addr, socklen_t addrlen);
56 int __real_connect(
int fd,
const struct sockaddr *serv_addr,
59 int __real_listen(
int fd,
int backlog);
61 int __real_accept(
int fd,
struct sockaddr *addr, socklen_t *addrlen);
63 int __real_getsockname(
int fd,
struct sockaddr *name, socklen_t *namelen);
65 int __real_getpeername(
int fd,
struct sockaddr *name, socklen_t *namelen);
67 int __real_shutdown(
int fd,
int how);