Merge commit 'e476442cf0e84c65565ace545f5b73602b5f0ffc'
[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
6 struct sockaddr;
7
8 int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto,
9                    const char *host, uint16_t port, int connect0_bind1);
10
11 int osmo_sock_init_sa(struct sockaddr *ss, uint16_t type,
12                       uint8_t proto, int connect0_bind1);
13
14 /* determine if the given address is a local address */
15 int osmo_sockaddr_is_local(struct sockaddr *addr, unsigned int addrlen);
16
17 #endif /* _OSMOCORE_SOCKET_H */