blob: 8c01fd00b05eb12b574be3f1dae56ff6b0fea1b6 [file] [log] [blame]
Pablo Neira Ayusocab6e752014-02-05 18:56:17 +01001#ifndef _OPENBSC_OSMUX_H_
2#define _OPENBSC_OSMUX_H_
3
4#include <osmocom/netif/osmux.h>
5
Pablo Neira Ayuso308d5f82014-08-29 12:20:17 +02006#define OSMUX_PORT 1984
7
Pablo Neira Ayusocab6e752014-02-05 18:56:17 +01008enum {
9 OSMUX_ROLE_BSC = 0,
10 OSMUX_ROLE_BSC_NAT,
11};
12
13int osmux_init(int role, struct mgcp_config *cfg);
Pablo Neira Ayusob769f3c2014-08-27 17:02:52 +020014int osmux_enable_endpoint(struct mgcp_endpoint *endp, int role,
15 struct in_addr *addr, uint16_t port);
16void osmux_disable_endpoint(struct mgcp_endpoint *endp);
Pablo Neira Ayusocab6e752014-02-05 18:56:17 +010017
18int osmux_xfrm_to_rtp(struct mgcp_endpoint *endp, int type, char *buf, int rc);
19int osmux_xfrm_to_osmux(int type, char *buf, int rc, struct mgcp_endpoint *endp);
20
21int osmux_send_dummy(struct mgcp_endpoint *endp);
22
Pablo Neira Ayusob769f3c2014-08-27 17:02:52 +020023int osmux_get_cid(void);
24void osmux_put_cid(uint8_t osmux_cid);
25
26enum osmux_state {
27 OSMUX_STATE_DISABLED = 0,
28 OSMUX_STATE_ACTIVATING,
29 OSMUX_STATE_ENABLED,
30};
31
Pablo Neira Ayusocab6e752014-02-05 18:56:17 +010032#endif