blob: a3baa9d517b211ab247d023824a0e940c43b358b [file] [log] [blame]
Harald Welte33cb71a2011-05-21 18:54:32 +02001#ifndef _OSMOCORE_SOCKET_H
2#define _OSMOCORE_SOCKET_H
3
4#include <stdint.h>
Harald Weltee4764422011-05-22 12:25:57 +02005
6struct sockaddr;
Harald Welte33cb71a2011-05-21 18:54:32 +02007
8int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto,
9 const char *host, uint16_t port, int connect0_bind1);
10
11int 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 */
Harald Weltee4764422011-05-22 12:25:57 +020015int osmo_sockaddr_is_local(struct sockaddr *addr, unsigned int addrlen);
Harald Welte33cb71a2011-05-21 18:54:32 +020016
17#endif /* _OSMOCORE_SOCKET_H */