summaryrefslogtreecommitdiffstats
path: root/Src/osmocombb/src/shared/libosmocore/include/osmocom/core/socket.h
diff options
context:
space:
mode:
authorTom2011-08-16 13:19:29 +0200
committerTom2011-08-16 13:19:29 +0200
commit7be0213030d2ce50e618e72b5a90e4c5b63c59a4 (patch)
tree98f7f3b0d38c863153f6d95a7129d867c43b652a /Src/osmocombb/src/shared/libosmocore/include/osmocom/core/socket.h
parentremoved whole lib since compiled files were on index (diff)
downloadimsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.tar.gz
imsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.tar.xz
imsi-catcher-detection-7be0213030d2ce50e618e72b5a90e4c5b63c59a4.zip
checked in clean osmocombb lib
Diffstat (limited to 'Src/osmocombb/src/shared/libosmocore/include/osmocom/core/socket.h')
-rw-r--r--Src/osmocombb/src/shared/libosmocore/include/osmocom/core/socket.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Src/osmocombb/src/shared/libosmocore/include/osmocom/core/socket.h b/Src/osmocombb/src/shared/libosmocore/include/osmocom/core/socket.h
new file mode 100644
index 0000000..612b12c
--- /dev/null
+++ b/Src/osmocombb/src/shared/libosmocore/include/osmocom/core/socket.h
@@ -0,0 +1,25 @@
+#ifndef _OSMOCORE_SOCKET_H
+#define _OSMOCORE_SOCKET_H
+
+#include <stdint.h>
+
+struct sockaddr;
+
+/* flags for osmo_sock_init. */
+#define OSMO_SOCK_F_CONNECT (1 << 0)
+#define OSMO_SOCK_F_BIND (1 << 1)
+#define OSMO_SOCK_F_NONBLOCK (1 << 2)
+
+int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto,
+ const char *host, uint16_t port, unsigned int flags);
+
+int osmo_sock_init_ofd(struct osmo_fd *ofd, int family, int type, int proto,
+ const char *host, uint16_t port, unsigned int flags);
+
+int osmo_sock_init_sa(struct sockaddr *ss, uint16_t type,
+ uint8_t proto, unsigned int flags);
+
+/* determine if the given address is a local address */
+int osmo_sockaddr_is_local(struct sockaddr *addr, unsigned int addrlen);
+
+#endif /* _OSMOCORE_SOCKET_H */