From 29b9206e804e8e5d5f6ea6f9d8c1f8af35332480 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 4 Jul 2017 23:08:44 +0200 Subject: move openbsc/* to repos root This is the first step in creating this repository from the legacy openbsc.git. Like all other Osmocom repositories, keep the autoconf and automake files in the repository root. openbsc.git has been the sole exception, which ends now. Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7 --- include/openbsc/osmux.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 include/openbsc/osmux.h (limited to 'include/openbsc/osmux.h') diff --git a/include/openbsc/osmux.h b/include/openbsc/osmux.h new file mode 100644 index 000000000..0b64a7f1e --- /dev/null +++ b/include/openbsc/osmux.h @@ -0,0 +1,42 @@ +#ifndef _OPENBSC_OSMUX_H_ +#define _OPENBSC_OSMUX_H_ + +#include + +#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, int role, + 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 -- cgit v1.2.3