Pablo Neira Ayuso | cab6e75 | 2014-02-05 18:56:17 +0100 | [diff] [blame] | 1 | #ifndef _OPENBSC_OSMUX_H_ |
| 2 | #define _OPENBSC_OSMUX_H_ |
| 3 | |
| 4 | #include <osmocom/netif/osmux.h> |
| 5 | |
Pablo Neira Ayuso | 308d5f8 | 2014-08-29 12:20:17 +0200 | [diff] [blame^] | 6 | #define OSMUX_PORT 1984 |
| 7 | |
Pablo Neira Ayuso | cab6e75 | 2014-02-05 18:56:17 +0100 | [diff] [blame] | 8 | enum { |
| 9 | OSMUX_ROLE_BSC = 0, |
| 10 | OSMUX_ROLE_BSC_NAT, |
| 11 | }; |
| 12 | |
| 13 | int osmux_init(int role, struct mgcp_config *cfg); |
Pablo Neira Ayuso | b769f3c | 2014-08-27 17:02:52 +0200 | [diff] [blame] | 14 | int osmux_enable_endpoint(struct mgcp_endpoint *endp, int role, |
| 15 | struct in_addr *addr, uint16_t port); |
| 16 | void osmux_disable_endpoint(struct mgcp_endpoint *endp); |
Pablo Neira Ayuso | cab6e75 | 2014-02-05 18:56:17 +0100 | [diff] [blame] | 17 | |
| 18 | int osmux_xfrm_to_rtp(struct mgcp_endpoint *endp, int type, char *buf, int rc); |
| 19 | int osmux_xfrm_to_osmux(int type, char *buf, int rc, struct mgcp_endpoint *endp); |
| 20 | |
| 21 | int osmux_send_dummy(struct mgcp_endpoint *endp); |
| 22 | |
Pablo Neira Ayuso | b769f3c | 2014-08-27 17:02:52 +0200 | [diff] [blame] | 23 | int osmux_get_cid(void); |
| 24 | void osmux_put_cid(uint8_t osmux_cid); |
| 25 | |
| 26 | enum osmux_state { |
| 27 | OSMUX_STATE_DISABLED = 0, |
| 28 | OSMUX_STATE_ACTIVATING, |
| 29 | OSMUX_STATE_ENABLED, |
| 30 | }; |
| 31 | |
Pablo Neira Ayuso | cab6e75 | 2014-02-05 18:56:17 +0100 | [diff] [blame] | 32 | #endif |