Merge commit '33cb71ac91fb870702dbb71595dba4a554001e3c'
[osmocom-bb.git] / src / shared / libosmocore / include / osmocom / core / socket.h
1 #ifndef _OSMOCORE_SOCKET_H
2 #define _OSMOCORE_SOCKET_H
3
4 #include <stdint.h>
5 #include <sys/socket.h>
6
7 int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto,
8                    const char *host, uint16_t port, int connect0_bind1);
9
10 int osmo_sock_init_sa(struct sockaddr *ss, uint16_t type,
11                       uint8_t proto, int connect0_bind1);
12
13 /* determine if the given address is a local address */
14 int osmo_sockaddr_is_local(struct sockaddr *addr, socklen_t addrlen);
15
16 #endif /* _OSMOCORE_SOCKET_H */