Implement SCCP/TCAP glue layer.
More...
#include <osmocom/core/talloc.h>
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/util/debug.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
#include "sigtran.h"
#include "libosmo-m3ua/include/cellmgr_debug.h"
#include "libosmo-m3ua/include/mtp_data.h"
#include "libosmo-m3ua/include/sctp_m3ua.h"
Go to the source code of this file.
|
void | sigtran_sccp_global_free (void) |
|
int | sigtran_sccp_global_init (void) |
|
void | sigtran_sccp_incoming (UNUSED struct mtp_link_set *set, struct msgb *msg, UNUSED int sls) |
| Wrapper to pass data off to libsccp for processing. More...
|
|
static void | sigtran_sccp_outgoing (UNUSED struct sccp_connection *sscp_conn, struct msgb *msg, UNUSED void *write_ctx, void *ctx) |
| Wrapper to pass data down to MTP3 layer for processing. More...
|
|
int | sigtran_sscp_init (sigtran_conn_t *conn) |
| Initialise libscctp. More...
|
|
static int | sigtran_tcap_incoming (struct msgb *msg, UNUSED unsigned int length, UNUSED void *ctx) |
| Incoming data. More...
|
|
int | sigtran_tcap_outgoing (UNUSED struct msgb *msg_in, void *ctx, sigtran_transaction_t *txn, UNUSED struct osmo_fd *ofd) |
| Send a request with static MAP data in it. More...
|
|
static void | sigtran_tcap_timeout (void *data) |
|
static int | sigtran_txn_cmp (void const *one, void const *two) |
| Compare rounds of a transaction. More...
|
|
Implement SCCP/TCAP glue layer.
- Id
- 7911a8da148463176e4344fea79a2347e63d30f6
- Author
- Arran Cudbard-Bell
- Copyright
- 2016 Network RADIUS SAS (licen.nosp@m.se@n.nosp@m.etwor.nosp@m.krad.nosp@m.ius.c.nosp@m.om)
Definition in file sccp.c.
◆ LOG_PREFIX
#define LOG_PREFIX "sigtran - osmocom thread" |
◆ sigtran_memdup
Value: do { \
p++; \
DEBUG4("Start 0x%02x len %u", (unsigned int)(tcap - p), p[0]); \
if (p[0] >= (len - (p - tcap))) { \
ERROR("Invalid length %u specified for vector component", p[0]); \
return -1; \
} \
vec->_x = talloc_memdup(vec, p + 1, p[0]); \
talloc_set_type(vec->_x,
uint8_t); \
p += p[0] + 1; \
} while (0)
◆ sigtran_sccp_global_free()
void sigtran_sccp_global_free |
( |
void |
| ) |
|
◆ sigtran_sccp_global_init()
int sigtran_sccp_global_init |
( |
void |
| ) |
|
◆ sigtran_sccp_incoming()
void sigtran_sccp_incoming |
( |
UNUSED struct mtp_link_set * |
set, |
|
|
struct msgb * |
msg, |
|
|
UNUSED int |
sls |
|
) |
| |
Wrapper to pass data off to libsccp for processing.
- Parameters
-
set | Link set data was received on. |
msg | Data from the lower layer. |
sls | Link number the data was received on. |
Definition at line 352 of file sccp.c.
◆ sigtran_sccp_outgoing()
static void sigtran_sccp_outgoing |
( |
UNUSED struct sccp_connection * |
sscp_conn, |
|
|
struct msgb * |
msg, |
|
|
UNUSED void * |
write_ctx, |
|
|
void * |
ctx |
|
) |
| |
|
static |
Wrapper to pass data down to MTP3 layer for processing.
This is the write callback for the SCCP Code.
Definition at line 336 of file sccp.c.
◆ sigtran_sscp_init()
Initialise libscctp.
Definition at line 360 of file sccp.c.
◆ sigtran_tcap_incoming()
static int sigtran_tcap_incoming |
( |
struct msgb * |
msg, |
|
|
UNUSED unsigned int |
length, |
|
|
UNUSED void * |
ctx |
|
) |
| |
|
static |
Incoming data.
This should be called by the SCCP functions to give us result data
Definition at line 215 of file sccp.c.
◆ sigtran_tcap_outgoing()
Send a request with static MAP data in it.
SCCP will add its headers and call sigtran_sccp_outgoing
- Returns
- 0 on success.
- <0 on failure.
Definition at line 98 of file sccp.c.
◆ sigtran_tcap_timeout()
static void sigtran_tcap_timeout |
( |
void * |
data | ) |
|
|
static |
◆ sigtran_txn_cmp()
static int sigtran_txn_cmp |
( |
void const * |
one, |
|
|
void const * |
two |
|
) |
| |
|
static |
Compare rounds of a transaction.
Definition at line 61 of file sccp.c.
◆ last_txn_id
Global transaction ID.
Definition at line 54 of file sccp.c.
◆ txn_tree
Global transaction tree... Should really be per module.
Definition at line 55 of file sccp.c.
◆ txn_tree_inst