libosmo-sigtran 1.8.0.40-5951.202402232026
Osmocom SIGTRAN library
ss7_internal.h
Go to the documentation of this file.
1#pragma once
2
3/* Internal header used by libosmo-sccp, not available publicly for lib users */
4
5#include <stdbool.h>
6#include <stdint.h>
8
9extern bool ss7_initialized;
10uint32_t ss7_find_free_l_rk_id(struct osmo_ss7_instance *inst);
11
12bool ss7_ipv6_sctp_supported(const char *host, bool bind);
13
14struct osmo_ss7_as *ss7_as_alloc(struct osmo_ss7_instance *inst, const char *name,
16
17struct osmo_ss7_asp *ss7_asp_alloc(struct osmo_ss7_instance *inst, const char *name,
18 uint16_t remote_port, uint16_t local_port,
21bool ss7_asp_is_started(const struct osmo_ss7_asp *asp);
22int ss7_asp_get_fd(const struct osmo_ss7_asp *asp);
24
26int ss7_asp_ipa_srv_conn_cb(struct osmo_stream_srv *conn);
27int ss7_asp_xua_srv_conn_cb(struct osmo_stream_srv *conn);
28int ss7_asp_xua_srv_conn_closed_cb(struct osmo_stream_srv *srv);
30int ss7_asp_apply_primary_address(const struct osmo_ss7_asp *asp);
31int ss7_asp_apply_new_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx);
32int ss7_asp_apply_drop_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx);
33
34bool ss7_asp_peer_match_host(const struct osmo_ss7_asp_peer *peer, const char *host, bool host_is_v6);
35int ss7_asp_peer_find_host(const struct osmo_ss7_asp_peer *peer, const char *host);
36
38
42};
43
48};
osmo_ss7_asp_protocol
Definition: osmo_ss7.h:277
bool ss7_asp_is_started(const struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:668
int ss7_asp_peer_find_host(const struct osmo_ss7_asp_peer *peer, const char *host)
Find the exact IP address match and return its index in the array.
Definition: osmo_ss7_asp_peer.c:285
int ss7_asp_xua_srv_conn_closed_cb(struct osmo_stream_srv *srv)
Definition: osmo_ss7_asp.c:990
int ss7_asp_apply_primary_address(const struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:257
int ss7_asp_xua_srv_conn_cb(struct osmo_stream_srv *conn)
Definition: osmo_ss7_asp.c:775
ss7_asp_ctr
Definition: ss7_internal.h:44
@ SS7_ASP_CTR_PKT_TX_TOTAL
Definition: ss7_internal.h:47
@ SS7_ASP_CTR_PKT_RX_UNKNOWN
Definition: ss7_internal.h:46
@ SS7_ASP_CTR_PKT_RX_TOTAL
Definition: ss7_internal.h:45
bool ss7_ipv6_sctp_supported(const char *host, bool bind)
Definition: osmo_ss7.c:963
int ss7_asp_apply_peer_primary_address(const struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:215
int ss7_asp_get_fd(const struct osmo_ss7_asp *asp)
Get the fd of a given ASP.
Definition: osmo_ss7_asp.c:1142
struct osmo_ss7_asp * ss7_asp_alloc(struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto)
Definition: osmo_ss7_asp.c:504
uint32_t ss7_find_free_l_rk_id(struct osmo_ss7_instance *inst)
Definition: osmo_ss7.c:83
int ss7_asp_proto_to_ip_proto(enum osmo_ss7_asp_protocol proto)
Definition: osmo_ss7_asp.c:130
bool ss7_initialized
Definition: osmo_ss7.c:59
int ss7_asp_apply_new_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx)
Definition: osmo_ss7_asp.c:171
bool ss7_xua_server_set_default_local_hosts(struct osmo_xua_server *oxs)
Definition: osmo_ss7_xua_srv.c:298
struct osmo_ss7_asp * ss7_asp_find_by_socket_addr(int fd)
Find an ASP definition matching the local+remote IP/PORT of given fd.
Definition: osmo_ss7_asp.c:436
int ss7_asp_apply_drop_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx)
Definition: osmo_ss7_asp.c:193
struct osmo_ss7_as * ss7_as_alloc(struct osmo_ss7_instance *inst, const char *name, enum osmo_ss7_asp_protocol proto)
Allocate an Application Server.
Definition: osmo_ss7_as.c:70
ss7_as_ctr
Definition: ss7_internal.h:39
@ SS7_AS_CTR_RX_MSU_TOTAL
Definition: ss7_internal.h:40
@ SS7_AS_CTR_TX_MSU_TOTAL
Definition: ss7_internal.h:41
bool ss7_asp_peer_match_host(const struct osmo_ss7_asp_peer *peer, const char *host, bool host_is_v6)
Definition: osmo_ss7_asp_peer.c:266
int ss7_asp_ipa_srv_conn_cb(struct osmo_stream_srv *conn)
Definition: osmo_ss7_asp.c:740
bool ss7_asp_set_default_peer_hosts(struct osmo_ss7_asp *asp)
Definition: osmo_ss7_asp.c:368
Definition: osmo_ss7.h:300
char * name
Definition: osmo_ss7.h:318
enum osmo_ss7_asp_protocol proto
Definition: osmo_ss7.h:320
struct osmo_ss7_instance * inst
Definition: osmo_ss7.h:303
Definition: osmo_ss7.h:365
Definition: osmo_ss7.h:390
enum osmo_ss7_asp_protocol proto
Definition: osmo_ss7.h:431
struct osmo_ss7_instance * inst
Definition: osmo_ss7.h:393
char * name
Definition: osmo_ss7.h:429
Definition: osmo_ss7.h:73
Definition: osmo_ss7.h:527