35 #include <sys/epoll.h>
45 int xlio_socket(
int __domain,
int __type,
int __protocol);
47 int xlio_close(
int __fd);
49 int xlio_shutdown(
int __fd,
int __how);
51 int xlio_listen(
int __fd,
int backlog);
53 int xlio_accept(
int __fd,
struct sockaddr *__addr, socklen_t *__addrlen);
55 int xlio_accept4(
int __fd,
struct sockaddr *__addr, socklen_t *__addrlen,
int __flags);
57 int xlio_bind(
int __fd,
const struct sockaddr *__addr, socklen_t __addrlen);
59 int xlio_connect(
int __fd,
const struct sockaddr *__to, socklen_t __tolen);
61 int xlio_setsockopt(
int __fd,
int __level,
int __optname, __const
void *__optval,
64 int xlio_getsockopt(
int __fd,
int __level,
int __optname,
void *__optval, socklen_t *__optlen);
66 int xlio_fcntl(
int __fd,
int __cmd, ...);
68 int xlio_fcntl64(
int __fd,
int __cmd, ...);
70 int xlio_getsockname(
int __fd,
struct sockaddr *__name, socklen_t *__namelen);
72 int xlio_getpeername(
int __fd,
struct sockaddr *__name, socklen_t *__namelen);
74 ssize_t xlio_read(
int __fd,
void *__buf,
size_t __nbytes);
76 ssize_t xlio_readv(
int __fd,
const struct iovec *iov,
int iovcnt);
78 ssize_t xlio_recv(
int __fd,
void *__buf,
size_t __nbytes,
int __flags);
80 ssize_t xlio_recvmsg(
int __fd,
struct msghdr *__msg,
int __flags);
84 int xlio_recvmmsg(
int __fd,
struct mmsghdr *__mmsghdr,
unsigned int __vlen,
int __flags,
85 const struct timespec *__timeout);
87 ssize_t xlio_recvfrom(
int __fd,
void *__buf,
size_t __nbytes,
int __flags,
struct sockaddr *__from,
88 socklen_t *__fromlen);
90 ssize_t xlio_write(
int __fd, __const
void *__buf,
size_t __nbytes);
92 ssize_t xlio_writev(
int __fd,
const struct iovec *iov,
int iovcnt);
94 ssize_t xlio_send(
int __fd, __const
void *__buf,
size_t __nbytes,
int __flags);
96 ssize_t xlio_sendmsg(
int __fd, __const
struct msghdr *__msg,
int __flags);
98 int xlio_sendmmsg(
int __fd,
struct mmsghdr *__mmsghdr,
unsigned int __vlen,
int __flags);
100 ssize_t xlio_sendto(
int __fd, __const
void *__buf,
size_t __nbytes,
int __flags,
101 const struct sockaddr *__to, socklen_t __tolen);
103 ssize_t xlio_sendfile(
int out_fd,
int in_fd, off_t *offset,
size_t count);
105 ssize_t xlio_sendfile64(
int out_fd,
int in_fd, __off64_t *offset,
size_t count);
107 int xlio_select(
int __nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds,
108 struct timeval *__timeout);
110 int xlio_pselect(
int __nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__errorfds,
111 const struct timespec *__timeout,
const sigset_t *__sigmask);
112 int xlio_poll(
struct pollfd *__fds, nfds_t __nfds,
int __timeout);
114 int xlio_ppoll(
struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
115 const sigset_t *__sigmask);
117 int xlio_epoll_create(
int __size);
119 int xlio_epoll_create1(
int __flags);
121 int xlio_epoll_ctl(
int __epfd,
int __op,
int __fd,
struct epoll_event *__event);
123 int xlio_epoll_wait(
int __epfd,
struct epoll_event *__events,
int __maxevents,
int __timeout);
125 int xlio_epoll_pwait(
int __epfd,
struct epoll_event *__events,
int __maxevents,
int __timeout,
126 const sigset_t *__sigmask);
127 int xlio_socketpair(
int __domain,
int __type,
int __protocol,
int __sv[2]);
129 int xlio_pipe(
int __filedes[2]);
131 int xlio_open(__const
char *__file,
int __oflag, ...);
133 int xlio_creat(
const char *__pathname, mode_t __mode);
135 int xlio_dup(
int __fd);
137 int xlio_dup2(
int __fd,
int __fd2);
147 int xlio_add_conf_rule(
const char *config_line);
156 int xlio_thread_offload(
int offload, pthread_t tid);
164 int xlio_dump_fd_stats(
int fd,
int log_level);
176 int xlio_register_recv_callback(
int s, xlio_recv_callback_t callback,
void *context);
int xlio_exit(void)
Finalize XLIO.
int xlio_init(void)
Initialize XLIO.
int xlio_init_ex(const struct xlio_init_attr *attr)
Initialize the XLIO Ultra API.
int xlio_poll_group_destroy(xlio_poll_group_t group)
Destroy a polling group.
int xlio_poll_group_create(const struct xlio_poll_group_attr *attr, xlio_poll_group_t *group_out)
Create a new polling group.
int xlio_poll_group_update(xlio_poll_group_t group, const struct xlio_poll_group_attr *attr)
Update polling group attributes.
uintptr_t xlio_poll_group_t
Polling group handle.
Definition: xlio_types.h:164
void xlio_poll_group_poll(xlio_poll_group_t group)
Poll for events on a polling group.
void xlio_socket_buf_free(xlio_socket_t sock, struct xlio_buf *buf)
Free a receive buffer (socket-specific)
void xlio_poll_group_buf_free(xlio_poll_group_t group, struct xlio_buf *buf)
Free a receive buffer (group-specific)
int xlio_socket_attach_group(xlio_socket_t sock, xlio_poll_group_t group)
Attach socket to polling group.
int xlio_socket_create(const struct xlio_socket_attr *attr, xlio_socket_t *sock_out)
Create a new XLIO socket.
int xlio_socket_update(xlio_socket_t sock, unsigned flags, uintptr_t userdata_sq)
Update socket attributes.
uintptr_t xlio_socket_t
Socket handle.
Definition: xlio_types.h:172
struct ibv_pd * xlio_socket_get_pd(xlio_socket_t sock)
Get InfiniBand protection domain.
int xlio_socket_listen(xlio_socket_t sock)
Listen for incoming connections.
int xlio_socket_getsockname(xlio_socket_t sock, struct sockaddr *addr, socklen_t *addrlen)
Get socket name.
int xlio_socket_destroy(xlio_socket_t sock)
Destroy an XLIO socket.
int xlio_socket_getpeername(xlio_socket_t sock, struct sockaddr *addr, socklen_t *addrlen)
Get peer name.
int xlio_socket_detach_group(xlio_socket_t sock)
Detach socket from polling group.
int xlio_socket_setsockopt(xlio_socket_t sock, int level, int optname, const void *optval, socklen_t optlen)
Set socket options.
int xlio_socket_bind(xlio_socket_t sock, const struct sockaddr *addr, socklen_t addrlen)
Bind socket to address.
int xlio_socket_connect(xlio_socket_t sock, const struct sockaddr *to, socklen_t tolen)
Connect socket to remote address.
void xlio_poll_group_flush(xlio_poll_group_t group)
Flush all dirty sockets in a polling group.
int xlio_socket_sendv(xlio_socket_t sock, const struct iovec *iov, unsigned iovcnt, const struct xlio_socket_send_attr *attr)
Send vectored data on a socket.
int xlio_socket_send(xlio_socket_t sock, const void *data, size_t len, const struct xlio_socket_send_attr *attr)
Send data on a socket.
void xlio_socket_flush(xlio_socket_t sock)
Flush pending data on a socket.
Buffer descriptor.
Definition: xlio_types.h:198
XLIO initialization attributes.
Definition: xlio_types.h:371
Polling group attributes.
Definition: xlio_types.h:414
Socket creation attributes.
Definition: xlio_types.h:450
Send operation attributes.
Definition: xlio_types.h:489
XLIO API type definitions and structures.