libosmo-sigtran 2.0.0.52-6412
Osmocom SIGTRAN library
ss7_xua_srv.h File Reference
#include <stdint.h>
#include <unistd.h>
#include <osmocom/core/defs.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/prim.h>
#include <osmocom/netif/stream.h>
#include <osmocom/sigtran/osmo_ss7.h>

Go to the source code of this file.

Data Structures

struct  osmo_xua_layer_manager
 
struct  osmo_xua_server
 

Functions

struct osmo_xua_serverss7_xua_server_find (struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, uint16_t local_port) OSMO_DEPRECATED("Use ss7_xua_server_find2() instead")
 find an xUA server with the given parameters More...
 
struct osmo_xua_serverss7_xua_server_find2 (struct osmo_ss7_instance *inst, int trans_proto, enum osmo_ss7_asp_protocol proto, uint16_t local_port)
 find an xUA server with the given parameters More...
 
struct osmo_xua_serverss7_xua_server_create (struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, uint16_t local_port, const char *local_host) OSMO_DEPRECATED("Use ss7_xua_server_create2() instead")
 create a new xUA server configured with given ip/port More...
 
struct osmo_xua_serverss7_xua_server_create2 (struct osmo_ss7_instance *inst, int trans_proto, enum osmo_ss7_asp_protocol proto, uint16_t local_port, const char *local_host)
 create a new xUA server configured with given ip/port More...
 
int ss7_xua_server_bind (struct osmo_xua_server *xs)
 Set the xUA server to bind/listen to the currently configured ip/port. More...
 
int ss7_xua_server_set_local_host (struct osmo_xua_server *xs, const char *local_host)
 
int ss7_xua_server_set_local_hosts (struct osmo_xua_server *xs, const char **local_hosts, size_t local_host_cnt)
 
int ss7_xua_server_add_local_host (struct osmo_xua_server *xs, const char *local_host)
 
int ss7_xua_server_del_local_host (struct osmo_xua_server *xs, const char *local_host)
 
void ss7_xua_server_destroy (struct osmo_xua_server *xs)
 
bool ss7_xua_server_set_default_local_hosts (struct osmo_xua_server *oxs)
 

Function Documentation

◆ ss7_xua_server_add_local_host()

int ss7_xua_server_add_local_host ( struct osmo_xua_server xs,
const char *  local_host 
)

◆ ss7_xua_server_bind()

int ss7_xua_server_bind ( struct osmo_xua_server xs)

◆ ss7_xua_server_create()

struct osmo_xua_server * ss7_xua_server_create ( struct osmo_ss7_instance inst,
enum osmo_ss7_asp_protocol  proto,
uint16_t  local_port,
const char *  local_host 
)

create a new xUA server configured with given ip/port

Parameters
[in]ctxtalloc allocation context
[in]protoprotocol (xUA variant) to use
[in]local_portlocal SCTP port to bind/listen to
[in]local_hostlocal IP address to bind/listen to (optional)
Returns
callee-allocated osmo_xua_server in case of success

References osmo_xua_server::inst, osmo_xua_server::proto, ss7_default_trans_proto_for_asp_proto(), ss7_xua_server_create2(), and osmo_xua_server::trans_proto.

◆ ss7_xua_server_create2()

struct osmo_xua_server * ss7_xua_server_create2 ( struct osmo_ss7_instance inst,
int  trans_proto,
enum osmo_ss7_asp_protocol  proto,
uint16_t  local_port,
const char *  local_host 
)

create a new xUA server configured with given ip/port

Parameters
[in]instSS7 Instance on which we operate
[in]trans_prototransport protocol to use (one of IPPROTO_*)
[in]protoprotocol (xUA variant) to use
[in]local_portlocal SCTP port to bind/listen to
[in]local_hostlocal IP address to bind/listen to (optional)
Returns
callee-allocated osmo_xua_server in case of success

References osmo_xua_server::asp_list, osmo_xua_server::cfg, osmo_xua_server::inst, osmo_xua_server::list, osmo_xua_server::local, OSMO_SS7_ASP_PROT_SUA, osmo_ss7_asp_protocol_name(), osmo_ss7_asp_protocol_vals, osmo_ss7_ensure_sccp(), osmo_ss7_asp_peer::port, osmo_xua_server::proto, osmo_xua_server::server, ss7_asp_protocol_check_trans_proto(), ss7_initialized, ss7_xua_server_set_local_host(), osmo_xua_server::trans_proto, xua_accept_cb(), and osmo_ss7_instance::xua_servers.

Referenced by DEFUN_ATTR(), osmo_sccp_simple_server_on_ss7_id(), and ss7_xua_server_create().

◆ ss7_xua_server_del_local_host()

int ss7_xua_server_del_local_host ( struct osmo_xua_server xs,
const char *  local_host 
)

◆ ss7_xua_server_destroy()

◆ ss7_xua_server_find()

struct osmo_xua_server * ss7_xua_server_find ( struct osmo_ss7_instance inst,
enum osmo_ss7_asp_protocol  proto,
uint16_t  local_port 
)

find an xUA server with the given parameters

Parameters
[in]instSS7 Instance on which we operate
[in]protoprotocol (xUA variant) in use
[in]local_portlocal port of the server
Returns
osmo_xua_server or NULL (not found)

References osmo_xua_server::inst, osmo_xua_server::proto, ss7_default_trans_proto_for_asp_proto(), ss7_xua_server_find2(), and osmo_xua_server::trans_proto.

◆ ss7_xua_server_find2()

struct osmo_xua_server * ss7_xua_server_find2 ( struct osmo_ss7_instance inst,
int  trans_proto,
enum osmo_ss7_asp_protocol  proto,
uint16_t  local_port 
)

find an xUA server with the given parameters

Parameters
[in]instSS7 Instance on which we operate
[in]trans_prototransport protocol in use (one of IPPROTO_*)
[in]protoprotocol (xUA variant) in use
[in]local_portlocal port of the server
Returns
osmo_xua_server or NULL (not found)

References osmo_xua_server::cfg, osmo_xua_server::inst, osmo_xua_server::list, osmo_xua_server::local, osmo_ss7_asp_peer::port, osmo_xua_server::proto, ss7_initialized, osmo_xua_server::trans_proto, and osmo_ss7_instance::xua_servers.

Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), and ss7_xua_server_find().

◆ ss7_xua_server_set_default_local_hosts()

◆ ss7_xua_server_set_local_host()

int ss7_xua_server_set_local_host ( struct osmo_xua_server xs,
const char *  local_host 
)

◆ ss7_xua_server_set_local_hosts()

int ss7_xua_server_set_local_hosts ( struct osmo_xua_server xs,
const char **  local_hosts,
size_t  local_host_cnt 
)