15#define OUSTER_NET_ADDRSTRLEN 46
16#define OUSTER_NET_UDP_MAX_SIZE 65535
17#define OUSTER_NET_FLAGS_NONBLOCK 0x0001
18#define OUSTER_NET_FLAGS_REUSE 0x0002
19#define OUSTER_NET_FLAGS_IPV6ONLY 0x0004
20#define OUSTER_NET_FLAGS_IPV4 0x0008
21#define OUSTER_NET_FLAGS_IPV6 0x0010
22#define OUSTER_NET_FLAGS_UDP 0x0020
23#define OUSTER_NET_FLAGS_TCP 0x0040
24#define OUSTER_NET_FLAGS_BIND 0x0100
25#define OUSTER_NET_FLAGS_CONNECT 0x0200
36 char const *hint_service;
37 char const *hint_name;
44 char data[OUSTER_NET_ADDRSTRLEN];
75int64_t ouster_net_read(
int sock,
char *buf,
int len);
77uint64_t ouster_net_select(
int socks[],
int n,
const int timeout_sec,
const int timeout_usec);
79int32_t ouster_net_get_port(
int sock);
void ouster_net_addr_set_port(ouster_net_addr_t *addr, int port)
Set a port.
int ouster_net_sendto(int sock, char *buf, int size, int flags, ouster_net_addr_t *addr)
Send data from a socket to a network address.
void ouster_net_addr_set_ip4(ouster_net_addr_t *addr, char const *ip)
Set a IPv4 address.