15 #include<sys/socket.h>
16 #include<netinet/in.h>
25 struct sockaddr_in addr;
30 result_t bsd_init_ex(
bool require_override, loader_config_socket_service_t service);
32 const char *bsd_get_socket_service_name();
33 handle_t bsd_get_socket_service_handle();
34 loader_config_socket_service_t bsd_get_socket_service();
36 int bsd_socket(
int domain,
int type,
int protocol);
37 int bsd_recv(
int socket,
void *message,
size_t length,
int flags);
38 int bsd_send(
int socket,
const void *data,
size_t length,
int flags);
39 int bsd_sendto(
int socket,
const void *message,
size_t length,
int flags,
const struct sockaddr *dest_addr, socklen_t dest_len);
40 int bsd_accept(
int socket,
struct sockaddr *address, socklen_t *address_len);
41 int bsd_bind(
int socket,
const struct sockaddr *address, socklen_t address_len);
42 int bsd_connect(
int socket,
const struct sockaddr *address, socklen_t address_len);
43 int bsd_getsockname(
int socket,
struct sockaddr *address, socklen_t *address_len);
44 int bsd_listen(
int socket,
int backlog);
45 int bsd_setsockopt(
int socket,
int level,
int option_name,
const void *option_value, socklen_t option_len);
46 int bsd_shutdown(
int socket,
int how);
47 int bsd_select(
int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds,
struct timeval *timeout);
48 int bsd_poll(
struct pollfd *fds,
int nfds,
int timeout);
49 int bsd_getaddrinfo(
const char *node,
const char *service,
const struct addrinfo *hints,
struct addrinfo **res);
50 int bsd_getaddrinfo_fixed(
const char *node,
const char *service,
const struct addrinfo *hints,
struct addrinfo_fixed *res,
int num_addrinfos);
51 void bsd_freeaddrinfo(
struct addrinfo *res);
52 int bsd_close(
int socket);
55 result_t bsd_ai_pack(
const struct addrinfo *ai, uint8_t *buf,
size_t size);
56 result_t bsd_ai_unpack(
struct addrinfo *ai,
const uint8_t *buf,
size_t size,
int limit);
Homebrew ABI configuration.
uint32_t result_t
Function result.
Definition: types.h:51
uint32_t handle_t
Resource handle.
Definition: types.h:38