2011-05-21 16:54:32 +00:00
|
|
|
#ifndef _OSMOCORE_SOCKET_H
|
|
|
|
#define _OSMOCORE_SOCKET_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2011-05-22 10:25:57 +00:00
|
|
|
|
|
|
|
struct sockaddr;
|
2011-05-21 16:54:32 +00:00
|
|
|
|
|
|
|
int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto,
|
|
|
|
const char *host, uint16_t port, int connect0_bind1);
|
|
|
|
|
|
|
|
int osmo_sock_init_sa(struct sockaddr *ss, uint16_t type,
|
|
|
|
uint8_t proto, int connect0_bind1);
|
|
|
|
|
|
|
|
/* determine if the given address is a local address */
|
2011-05-22 10:25:57 +00:00
|
|
|
int osmo_sockaddr_is_local(struct sockaddr *addr, unsigned int addrlen);
|
2011-05-21 16:54:32 +00:00
|
|
|
|
|
|
|
#endif /* _OSMOCORE_SOCKET_H */
|