mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
This commit contains the bulky work of moving all address parsing to support IPv6 together with IPv4. Some specific patches required for full IPv6+IPv4 support requiring behavioral changes come after this one. Full Osmux IPv6 support is left out of the scope of this patch. Depends: libosmocore.git Ie07a38b05b7888885dba4ae795e9f3d9a561543d (> 1.4.0) Depends: libosmocore.git I59bf4b4b3ed14766a5a5285923d1ffa9fc8b2294 (> 1.4.0) Change-Id: I504ca776d88fd852bbaef07060c125980db3fdd7
41 lines
1.3 KiB
C
41 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include <osmocom/core/socket.h>
|
|
|
|
#include <osmocom/netif/osmux.h>
|
|
struct mgcp_conn_rtp;
|
|
|
|
#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_conn(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn,
|
|
struct osmo_sockaddr *addr, uint16_t port);
|
|
void conn_osmux_disable(struct mgcp_conn_rtp *conn);
|
|
int conn_osmux_allocate_cid(struct mgcp_conn_rtp *conn, int osmux_cid);
|
|
void conn_osmux_release_cid(struct mgcp_conn_rtp *conn);
|
|
int osmux_xfrm_to_osmux(char *buf, int buf_len, struct mgcp_conn_rtp *conn);
|
|
int osmux_send_dummy(struct mgcp_endpoint *endp, struct mgcp_conn_rtp *conn);
|
|
|
|
void osmux_cid_pool_get(uint8_t osmux_cid);
|
|
int osmux_cid_pool_get_next(void);
|
|
void osmux_cid_pool_put(uint8_t osmux_cid);
|
|
bool osmux_cid_pool_allocated(uint8_t osmux_cid);
|
|
int osmux_cid_pool_count_used(void);
|
|
|
|
enum osmux_state {
|
|
OSMUX_STATE_DISABLED = 0, /* Osmux not being currently used by endp */
|
|
OSMUX_STATE_ACTIVATING, /* Osmux was accepted in MGCP CRCX ACK. It can now be enabled by \ref osmux_enable_endpoint. */
|
|
OSMUX_STATE_ENABLED, /* Osmux was initialized by \ref osmux_enable_endpoint and can process frames */
|
|
};
|
|
|
|
enum osmux_usage {
|
|
OSMUX_USAGE_OFF = 0,
|
|
OSMUX_USAGE_ON = 1,
|
|
OSMUX_USAGE_ONLY = 2,
|
|
};
|