libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Functions | Variables
bsd.h File Reference

BSD Sockets. More...

#include <libtransistor/types.h>
#include <libtransistor/loader_config.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <poll.h>
Include dependency graph for bsd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  addrinfo_fixed
 

Functions

result_t bsd_init ()
 
result_t bsd_init_ex (bool require_override, loader_config_socket_service_t service)
 
const char * bsd_get_socket_service_name ()
 
handle_t bsd_get_socket_service_handle ()
 
loader_config_socket_service_t bsd_get_socket_service ()
 
int bsd_socket (int domain, int type, int protocol)
 
int bsd_recv (int socket, void *message, size_t length, int flags)
 
int bsd_send (int socket, const void *data, size_t length, int flags)
 
int bsd_sendto (int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len)
 
int bsd_accept (int socket, struct sockaddr *address, socklen_t *address_len)
 
int bsd_bind (int socket, const struct sockaddr *address, socklen_t address_len)
 
int bsd_connect (int socket, const struct sockaddr *address, socklen_t address_len)
 
int bsd_getsockname (int socket, struct sockaddr *address, socklen_t *address_len)
 
int bsd_listen (int socket, int backlog)
 
int bsd_setsockopt (int socket, int level, int option_name, const void *option_value, socklen_t option_len)
 
int bsd_shutdown (int socket, int how)
 
int bsd_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)
 
int bsd_poll (struct pollfd *fds, int nfds, int timeout)
 
int bsd_getaddrinfo (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
 
int bsd_getaddrinfo_fixed (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo_fixed *res, int num_addrinfos)
 
void bsd_freeaddrinfo (struct addrinfo *res)
 
int bsd_close (int socket)
 
void bsd_finalize ()
 
result_t bsd_ai_pack (const struct addrinfo *ai, uint8_t *buf, size_t size)
 
result_t bsd_ai_unpack (struct addrinfo *ai, const uint8_t *buf, size_t size, int limit)
 

Variables

result_t bsd_result
 
int bsd_errno
 

Detailed Description

BSD Sockets.