Loading...
Searching...
No Matches
ss7_xua_srv.h
Go to the documentation of this file.
#pragma once
#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>
/***********************************************************************
* xUA Servers
***********************************************************************/
struct osmo_ss7_instance;
struct osmo_xua_layer_manager {
osmo_prim_cb prim_cb;
};
struct osmo_xua_server {
struct llist_head list;
struct osmo_ss7_instance *inst;
/* list of ASPs established via this server */
struct llist_head asp_list;
struct osmo_stream_srv_link *server;
struct {
bool accept_dyn_reg;
struct osmo_ss7_asp_peer local;
enum osmo_ss7_asp_protocol proto;
struct {
bool num_ostreams_present;
bool max_instreams_present;
uint16_t num_ostreams_value;
uint16_t max_instreams_value;
} sctp_init;
int trans_proto;
} cfg;
};
struct osmo_xua_server *
ss7_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");
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);
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)
OSMO_DEPRECATED("Use ss7_xua_server_create2() instead");
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);
int
ss7_xua_server_bind(struct osmo_xua_server *xs);
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);
osmo_ss7.h
osmo_ss7_asp_protocol
osmo_ss7_asp_protocol
Definition osmo_ss7.h:153
ss7_xua_server_add_local_host
int ss7_xua_server_add_local_host(struct osmo_xua_server *xs, const char *local_host)
Definition osmo_ss7_xua_srv.c:326
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)
Definition osmo_ss7_xua_srv.c:314
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
Definition osmo_ss7_xua_srv.c:201
ss7_xua_server_bind
int ss7_xua_server_bind(struct osmo_xua_server *xs)
Set the xUA server to bind/listen to the currently configured ip/port.
Definition osmo_ss7_xua_srv.c:275
ss7_xua_server_del_local_host
int ss7_xua_server_del_local_host(struct osmo_xua_server *xs, const char *local_host)
Definition osmo_ss7_xua_srv.c:337
ss7_xua_server_set_default_local_hosts
bool ss7_xua_server_set_default_local_hosts(struct osmo_xua_server *oxs)
Definition osmo_ss7_xua_srv.c:347
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) OSMO_DEPRECATED("Use ss7_xua_server_find2() instead")
find an xUA server with the given parameters
Definition osmo_ss7_xua_srv.c:414
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) OSMO_DEPRECATED("Use ss7_xua_server_create2() instead")
create a new xUA server configured with given ip/port
Definition osmo_ss7_xua_srv.c:260
ss7_xua_server_destroy
void ss7_xua_server_destroy(struct osmo_xua_server *xs)
Definition osmo_ss7_xua_srv.c:361
ss7_xua_server_set_local_host
int ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host)
Definition osmo_ss7_xua_srv.c:308
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
Definition osmo_ss7_xua_srv.c:386
osmo_ss7_asp_peer
Definition ss7_asp_peer.h:11
osmo_ss7_instance
Definition ss7_instance.h:20
osmo_xua_layer_manager
Definition ss7_xua_srv.h:18
osmo_xua_layer_manager::prim_cb
osmo_prim_cb prim_cb
Definition ss7_xua_srv.h:19
osmo_xua_server
Definition ss7_xua_srv.h:22
osmo_xua_server::server
struct osmo_stream_srv_link * server
Definition ss7_xua_srv.h:29
osmo_xua_server::max_instreams_value
uint16_t max_instreams_value
Definition ss7_xua_srv.h:39
osmo_xua_server::proto
enum osmo_ss7_asp_protocol proto
Definition ss7_xua_srv.h:34
osmo_xua_server::num_ostreams_present
bool num_ostreams_present
Definition ss7_xua_srv.h:36
osmo_xua_server::inst
struct osmo_ss7_instance * inst
Definition ss7_xua_srv.h:24
osmo_xua_server::asp_list
struct llist_head asp_list
Definition ss7_xua_srv.h:27
osmo_xua_server::accept_dyn_reg
bool accept_dyn_reg
Definition ss7_xua_srv.h:32
osmo_xua_server::num_ostreams_value
uint16_t num_ostreams_value
Definition ss7_xua_srv.h:38
osmo_xua_server::cfg
struct osmo_xua_server::@32 cfg
osmo_xua_server::list
struct llist_head list
Definition ss7_xua_srv.h:23
osmo_xua_server::max_instreams_present
bool max_instreams_present
Definition ss7_xua_srv.h:37
osmo_xua_server::trans_proto
int trans_proto
The underlaying transport protocol (one of IPPROTO_*)
Definition ss7_xua_srv.h:43