aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc/osmux.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-09-04 15:15:32 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-09-06 16:26:13 +0200
commitc01647914b97ab8a1079330e36d0e1d024d3a804 (patch)
treedc22a90b524e2a5517805a8757016997db9eb12d /include/osmocom/bsc/osmux.h
parent538635ad5d5564087d285eda042b0cad9610c70e (diff)
move include/openbsc to include/osmocom/bsc
Diffstat (limited to 'include/osmocom/bsc/osmux.h')
-rw-r--r--include/osmocom/bsc/osmux.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/include/osmocom/bsc/osmux.h b/include/osmocom/bsc/osmux.h
new file mode 100644
index 000000000..f3ea72a85
--- /dev/null
+++ b/include/osmocom/bsc/osmux.h
@@ -0,0 +1,41 @@
+#ifndef _OPENBSC_OSMUX_H_
+#define _OPENBSC_OSMUX_H_
+
+#include <osmocom/netif/osmux.h>
+
+#define OSMUX_PORT 1984
+
+enum {
+ OSMUX_ROLE_BSC = 0,
+ OSMUX_ROLE_BSC_NAT,
+};
+
+int osmux_init(int role, struct mgcp_config *cfg);
+int osmux_enable_endpoint(struct mgcp_endpoint *endp, struct in_addr *addr, uint16_t port);
+void osmux_disable_endpoint(struct mgcp_endpoint *endp);
+void osmux_allocate_cid(struct mgcp_endpoint *endp);
+void osmux_release_cid(struct mgcp_endpoint *endp);
+
+int osmux_xfrm_to_rtp(struct mgcp_endpoint *endp, int type, char *buf, int rc);
+int osmux_xfrm_to_osmux(int type, char *buf, int rc, struct mgcp_endpoint *endp);
+
+int osmux_send_dummy(struct mgcp_endpoint *endp);
+
+int osmux_get_cid(void);
+void osmux_put_cid(uint8_t osmux_cid);
+int osmux_used_cid(void);
+
+enum osmux_state {
+ OSMUX_STATE_DISABLED = 0,
+ OSMUX_STATE_NEGOTIATING,
+ OSMUX_STATE_ACTIVATING,
+ OSMUX_STATE_ENABLED,
+};
+
+enum osmux_usage {
+ OSMUX_USAGE_OFF = 0,
+ OSMUX_USAGE_ON = 1,
+ OSMUX_USAGE_ONLY = 2,
+};
+
+#endif