37 #include <osmocom/core/linuxlist.h>
38 #include <osmocom/core/timer.h>
39 #include <osmocom/sccp/sccp.h>
40 #include <osmocom/core/select.h>
90 struct osmo_timer_list timer;
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Stores all information relating to an event list.
rlm_rcode_t
Return codes indicating the result of the module call.
sigtran_vector_type_t
Vector types.
@ SIGTRAN_VECTOR_TYPE_UMTS_QUINTUPLETS
RAND, XRES, CK, IK, AUTN.
@ SIGTRAN_VECTOR_TYPE_SIM_TRIPLETS
RAND, SRES, Kc.
@ SIGTRAN_REQUEST_THREAD_REGISTER
New worker thread to register.
@ SIGTRAN_REQUEST_MAP_SEND_AUTH_INFO
Request auth info.
@ SIGTRAN_REQUEST_LINK_DOWN
Take down a link.
@ SIGTRAN_REQUEST_THREAD_UNREGISTER
Worker thread to unregister.
@ SIGTRAN_REQUEST_EXIT
Causes the event loop to exit.
@ SIGTRAN_REQUEST_LINK_UP
Bring up a link.
bool dpc_is_set
Whether the DPC was set.
@ SIGTRAN_RESPONSE_OK
Request succeeded.
@ SIGTRAN_RESPONSE_NOOP
Request did nothing.
@ SIGTRAN_RESPONSE_FAIL
Request failed.
@ SIGTRAN_RESPONSE_NOTFOUND
User or device Not found.
uint8_t ssn
Subsystem number.
uint32_t mtp3_opc
MTP3 point codes (24bit!).
int sigtran_client_thread_register(fr_event_list_t *el)
Called by a new thread to register a new req_pipe.
bool sccp_route_on_ssn
Whether we should route on subsystem number.
struct mtp_link_set * mtp3_link_set
uint16_t sctp_dst_port
SCTP port of the service gateway.
int sigtran_ascii_to_tbcd(TALLOC_CTX *ctx, uint8_t **out, char const *ascii)
bool nai_is_set
Nature of address indicator is set.
unlang_action_t sigtran_client_map_send_auth_info(rlm_rcode_t *p_result, rlm_sigtran_t const *inst, request_t *request, sigtran_conn_t const *conn, int fd)
Create a MAP_SEND_AUTH_INFO request.
struct rlm_sigtran rlm_sigtran_t
sigtran_sccp_address_t sccp_called
The calling SCCP address.
fr_rb_node_t node
Entry in the tree of transactions.
uint8_t * imsi
BCD encoded IMSI.
char const * address
Address digits.
fr_ipaddr_t sctp_dst_ipaddr
IP of the Service Gateway.
uint16_t sctp_src_port
Local port to originate traffic from.
void sigtran_sccp_global_free(void)
int sigtran_sccp_global_title(TALLOC_CTX *ctx, uint8_t **out, int gt_ind, char const *digits, uint8_t tt, uint8_t np, uint8_t es, uint8_t nai)
Convert a global title to wire format for SCCP.
uint8_t np
Numbering plan.
struct sigtran_conn_conf sigtran_conn_conf_t
Configures a M3UA/MTP3/SCCP stack.
unsigned int num_vectors
Number of vectors requested.
uint32_t m3ua_beat_interval
fr_ipaddr_t sctp_src_ipaddr
Local IP to originate traffic from.
void sigtran_log_init(TALLOC_CTX *ctx)
Patch our logging system into libosmo's.
int sigtran_tcap_outgoing(UNUSED struct msgb *msg_in, void *ctx, sigtran_transaction_t *txn, struct osmo_fd *ofd)
uint32_t pc
14bit point code.
struct sigtran_transaction::@173 response
uint8_t const is_char_tbcd[]
Check is a char is valid Telephony Binary Coded Decimal.
tmpl_t * imsi
Subscriber identifier.
int sigtran_event_submit(struct osmo_fd *ofd, sigtran_transaction_t *txn)
Send response.
struct rlm_sigtran_thread rlm_sigtran_thread_t
sigtran_conn_t const * conn
Linkset associated with this instance.
bool pc_is_set
Point code is set.
sigtran_conn_conf_t conn_conf
Connection configuration.
int sigtran_event_start(void)
Start the libosmo event loop.
bool tt_is_set
Translation_type was provided.
struct sigtran_conn sigtran_conn_t
Represents a connection to a remote SS7 entity.
void sigtran_sccp_incoming(struct mtp_link_set *set, struct msgb *msg, int sls)
uint32_t * si
Service indicator.
int sigtran_client_thread_unregister(fr_event_list_t *el, int req_pipe_fd)
Signal that libosmo should unregister the other side of the pipe.
int sigtran_event_exit(void)
Signal that libosmo should exit.
sigtran_sccp_address_t sccp_calling
The called SCCP address.
int sigtran_client_link_down(sigtran_conn_t const **conn)
Destroy a connection.
sigtran_vector_type_t type
Type of vector returned.
tmpl_t * map_version
Application context version.
bool sccp_ai8
Address indicator bit 8.
struct sockaddr_sccp sccp_calling_sockaddr
Parsed version of the above.
uint32_t * opc
Origin point code.
bool es_is_set
Encoding scheme is set.
sigtran_conn_t const * conn
Connection to send request on.
sigtran_conn_conf_t * conf
uint8_t version
Application context version.
uint8_t es
Encoding scheme.
sigtran_sccp_global_title_t gt
int sigtran_sscp_init(sigtran_conn_t *conn)
Initialise libscctp.
struct sigtran_transaction::@172 request
struct sigtran_transaction sigtran_transaction_t
Request and response from the event loop.
sigtran_m3ua_route_t m3ua_routes
Routes to register with SG.
bool gt_is_set
Whether a global title was specified.
int sigtran_client_link_up(sigtran_conn_t const **out, sigtran_conn_conf_t const *conf)
Create a new connection.
struct sigtran_map_send_auth_info_res sigtran_map_send_auth_info_res_t
MAP send auth info response.
uint16_t m3ua_routing_context
struct sigtran_sccp_address sigtran_sccp_address_t
Structure representing a complete Q.173 SCCP address.
uint8_t const ascii_to_tbcd[]
Conversion table to transform ASCII to Telephony Binary Coded Decimal.
int sigtran_client_do_transaction(int fd, sigtran_transaction_t *txn)
struct sigtran_transaction::@174 ctx
struct mtp_link * mtp3_link
struct sigtran_sccp_global_title sigtran_sccp_global_title_t
char const * m3ua_traffic_mode_str
sigtran_vector_t * vector
Linked list of vectors.
uint8_t nai
Nature of address indicator.
uint8_t tt
Translation type.
sigtran_vector_t * next
Next vector in list.
bool ssn_is_set
Subsystem number is set.
uint32_t m3ua_ack_timeout
uint32_t dpc
Destination point code.
struct bsc_data * bsc_data
struct sigtran_m3ua_route sigtran_m3ua_route_t
int sigtran_sccp_global_init(void)
bool np_is_set
Numbering plan is set.
struct sockaddr_sccp sccp_called_sockaddr
Parsed version of the above.
bool m3ua_routes_is_set
Routes section was provided.
struct sigtran_map_send_auth_info_req sigtran_map_send_auth_info_req_t
MAP send auth info request.
Represents a connection to a remote SS7 entity.
Configures a M3UA/MTP3/SCCP stack.
MAP send auth info request.
MAP send auth info response.
Structure representing a complete Q.173 SCCP address.
Request and response from the event loop.
Authentication vector returned by HLR.
eap_aka_sim_process_conf_t * inst
fr_aka_sim_id_type_t type
static fr_event_list_t * el
static size_t char ** out