diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-05-23 19:01:34 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-05-23 19:01:34 +0200 |
| commit | 3056d012d3d5da853535488619f12beeea59a6a4 (patch) | |
| tree | 4b5a511154e0241b9ca4724534995d443d9baac3 /include/osmocom/core/socket.h | |
| parent | dd93bf46ed0c3c75c1e330db2197703c0b6f8cda (diff) | |
| parent | f7a1bcce0cea50650517e305d59e674475f913d0 (diff) | |
Merge branch 'master' of git.osmocom.org:libosmocore
Diffstat (limited to 'include/osmocom/core/socket.h')
| -rw-r--r-- | include/osmocom/core/socket.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h new file mode 100644 index 00000000..b2601c76 --- /dev/null +++ b/include/osmocom/core/socket.h @@ -0,0 +1,20 @@ +#ifndef _OSMOCORE_SOCKET_H +#define _OSMOCORE_SOCKET_H + +#include <stdint.h> + +struct sockaddr; + +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_ofd(struct osmo_fd *ofd, int family, int type, int 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 */ +int osmo_sockaddr_is_local(struct sockaddr *addr, unsigned int addrlen); + +#endif /* _OSMOCORE_SOCKET_H */ |
