The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Declarations for various sigtran functions. More...
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/timer.h>
#include <osmocom/sccp/sccp.h>
#include <osmocom/core/select.h>
Go to the source code of this file.
Data Structures | |
struct | rlm_sigtran |
struct | rlm_sigtran_thread |
struct | sigtran_conn |
Represents a connection to a remote SS7 entity. More... | |
struct | sigtran_conn_conf |
Configures a M3UA/MTP3/SCCP stack. More... | |
struct | sigtran_m3ua_route |
struct | sigtran_map_send_auth_info_req |
MAP send auth info request. More... | |
struct | sigtran_map_send_auth_info_res |
MAP send auth info response. More... | |
struct | sigtran_sccp_address |
Structure representing a complete Q.173 SCCP address. More... | |
struct | sigtran_sccp_global_title |
struct | sigtran_transaction |
Request and response from the event loop. More... | |
struct | sigtran_transaction.ctx |
struct | sigtran_transaction.request |
struct | sigtran_transaction.response |
struct | sigtran_vector |
Authentication vector returned by HLR. More... | |
union | sigtran_vector.__unnamed176__ |
struct | sigtran_vector.__unnamed176__.sim |
struct | sigtran_vector.__unnamed176__.umts |
Typedefs | |
typedef struct rlm_sigtran | rlm_sigtran_t |
typedef struct rlm_sigtran_thread | rlm_sigtran_thread_t |
typedef struct sigtran_conn_conf | sigtran_conn_conf_t |
Configures a M3UA/MTP3/SCCP stack. More... | |
typedef struct sigtran_conn | sigtran_conn_t |
Represents a connection to a remote SS7 entity. More... | |
typedef struct sigtran_m3ua_route | sigtran_m3ua_route_t |
typedef struct sigtran_map_send_auth_info_req | sigtran_map_send_auth_info_req_t |
MAP send auth info request. More... | |
typedef struct sigtran_map_send_auth_info_res | sigtran_map_send_auth_info_res_t |
MAP send auth info response. More... | |
typedef struct sigtran_sccp_address | sigtran_sccp_address_t |
Structure representing a complete Q.173 SCCP address. More... | |
typedef struct sigtran_sccp_global_title | sigtran_sccp_global_title_t |
typedef struct sigtran_transaction | sigtran_transaction_t |
Request and response from the event loop. More... | |
typedef struct sigtran_vector | sigtran_vector_t |
Functions | |
int | sigtran_ascii_to_tbcd (TALLOC_CTX *ctx, uint8_t **out, char const *ascii) |
int | sigtran_client_do_transaction (int fd, sigtran_transaction_t *txn) |
int | sigtran_client_link_down (sigtran_conn_t const **conn) |
Destroy a connection. More... | |
int | sigtran_client_link_up (sigtran_conn_t const **out, sigtran_conn_conf_t const *conf) |
Create a new connection. More... | |
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. More... | |
int | sigtran_client_thread_register (fr_event_list_t *el) |
Called by a new thread to register a new req_pipe. More... | |
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. More... | |
int | sigtran_event_exit (void) |
Signal that libosmo should exit. More... | |
int | sigtran_event_start (void) |
Start the libosmo event loop. More... | |
int | sigtran_event_submit (struct osmo_fd *ofd, sigtran_transaction_t *txn) |
Send response. More... | |
void | sigtran_log_init (TALLOC_CTX *ctx) |
Patch our logging system into libosmo's. More... | |
void | sigtran_sccp_global_free (void) |
int | sigtran_sccp_global_init (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. More... | |
void | sigtran_sccp_incoming (struct mtp_link_set *set, struct msgb *msg, int sls) |
int | sigtran_sscp_init (sigtran_conn_t *conn) |
Initialise libscctp. More... | |
int | sigtran_tcap_outgoing (UNUSED struct msgb *msg_in, void *ctx, sigtran_transaction_t *txn, struct osmo_fd *ofd) |
Variables | |
uint8_t const | ascii_to_tbcd [] |
Conversion table to transform ASCII to Telephony Binary Coded Decimal. More... | |
int | ctrl_pipe [2] |
uint8_t const | is_char_tbcd [] |
Check is a char is valid Telephony Binary Coded Decimal. More... | |
Declarations for various sigtran functions.
Definition in file sigtran.h.
struct rlm_sigtran |
Data Fields | ||
---|---|---|
sigtran_conn_t const * | conn | Linkset associated with this instance. |
sigtran_conn_conf_t | conn_conf | Connection configuration. |
tmpl_t * | imsi | Subscriber identifier. |
struct rlm_sigtran_thread |
struct sigtran_conn |
Represents a connection to a remote SS7 entity.
Holds data necessary for M3UA/MTP3/SCCP.
Data Fields | ||
---|---|---|
struct bsc_data * | bsc_data | |
sigtran_conn_conf_t * | conf | |
struct mtp_link * | mtp3_link | |
struct mtp_link_set * | mtp3_link_set |
struct sigtran_conn_conf |
Data Fields | ||
---|---|---|
uint32_t | m3ua_ack_timeout | |
uint32_t | m3ua_beat_interval | |
uint16_t | m3ua_link_index | |
sigtran_m3ua_route_t | m3ua_routes | Routes to register with SG. |
bool | m3ua_routes_is_set | Routes section was provided. |
uint16_t | m3ua_routing_context | |
int | m3ua_traffic_mode | |
char const * | m3ua_traffic_mode_str | |
tmpl_t * | map_version | Application context version. |
uint32_t | mtp3_dpc | |
uint32_t | mtp3_opc | MTP3 point codes (24bit!). |
bool | sccp_ai8 | Address indicator bit 8. |
sigtran_sccp_address_t | sccp_called | The calling SCCP address. |
struct sockaddr_sccp | sccp_called_sockaddr | Parsed version of the above. |
sigtran_sccp_address_t | sccp_calling | The called SCCP address. |
struct sockaddr_sccp | sccp_calling_sockaddr | Parsed version of the above. |
bool | sccp_route_on_ssn | Whether we should route on subsystem number. |
fr_ipaddr_t | sctp_dst_ipaddr | IP of the Service Gateway. |
uint16_t | sctp_dst_port | SCTP port of the service gateway. |
fr_ipaddr_t | sctp_src_ipaddr | Local IP to originate traffic from. |
uint16_t | sctp_src_port | Local port to originate traffic from. |
uint32_t | sctp_timeout |
struct sigtran_m3ua_route |
struct sigtran_map_send_auth_info_req |
Data Fields | ||
---|---|---|
sigtran_conn_t const * | conn | Connection to send request on. |
uint8_t * | imsi | BCD encoded IMSI. |
unsigned int | num_vectors | Number of vectors requested. |
uint8_t | version | Application context version. |
struct sigtran_map_send_auth_info_res |
Data Fields | ||
---|---|---|
int | error | |
sigtran_vector_t * | vector | Linked list of vectors. |
struct sigtran_sccp_address |
struct sigtran_sccp_global_title |
Data Fields | ||
---|---|---|
char const * | address | Address digits. |
uint8_t | es | Encoding scheme. |
bool | es_is_set | Encoding scheme is set. |
uint8_t | nai | Nature of address indicator. |
bool | nai_is_set | Nature of address indicator is set. |
uint8_t | np | Numbering plan. |
bool | np_is_set | Numbering plan is set. |
uint8_t | tt | Translation type. |
bool | tt_is_set | Translation_type was provided. |
struct sigtran_transaction |
Request and response from the event loop.
We allocate the whole thing on the client side, as the client will be blocked waiting on the response from the event loop, and won't mind extra memory being allocated from this ctx.
Data Fields | ||
---|---|---|
struct sigtran_transaction | ctx | |
fr_rb_node_t | node | Entry in the tree of transactions. |
struct sigtran_transaction | request | |
struct sigtran_transaction | response |
struct sigtran_transaction.ctx |
struct sigtran_transaction.request |
Data Fields | ||
---|---|---|
void * | data | Data for the request. |
sigtran_request_type_t | type | Type of request. |
struct sigtran_transaction.response |
Data Fields | ||
---|---|---|
void * | data | Data for the response. |
sigtran_response_type_t | type | Type of response. |
struct sigtran_vector |
Data Fields | ||
---|---|---|
union sigtran_vector | __unnamed__ | |
sigtran_vector_t * | next | Next vector in list. |
sigtran_vector_type_t | type | Type of vector returned. |
union sigtran_vector.__unnamed176__ |
Data Fields | ||
---|---|---|
__unnamed176__ | sim | |
__unnamed176__ | umts |
struct sigtran_vector.__unnamed176__.sim |
struct sigtran_vector.__unnamed176__.umts |
typedef struct rlm_sigtran rlm_sigtran_t |
typedef struct rlm_sigtran_thread rlm_sigtran_thread_t |
typedef struct sigtran_conn_conf sigtran_conn_conf_t |
Configures a M3UA/MTP3/SCCP stack.
typedef struct sigtran_conn sigtran_conn_t |
Represents a connection to a remote SS7 entity.
Holds data necessary for M3UA/MTP3/SCCP.
typedef struct sigtran_m3ua_route sigtran_m3ua_route_t |
typedef struct sigtran_map_send_auth_info_req sigtran_map_send_auth_info_req_t |
MAP send auth info request.
typedef struct sigtran_map_send_auth_info_res sigtran_map_send_auth_info_res_t |
MAP send auth info response.
typedef struct sigtran_sccp_address sigtran_sccp_address_t |
Structure representing a complete Q.173 SCCP address.
typedef struct sigtran_sccp_global_title sigtran_sccp_global_title_t |
typedef struct sigtran_transaction sigtran_transaction_t |
Request and response from the event loop.
We allocate the whole thing on the client side, as the client will be blocked waiting on the response from the event loop, and won't mind extra memory being allocated from this ctx.
typedef struct sigtran_vector sigtran_vector_t |
int sigtran_ascii_to_tbcd | ( | TALLOC_CTX * | ctx, |
uint8_t ** | out, | ||
char const * | ascii | ||
) |
int sigtran_client_do_transaction | ( | int | fd, |
sigtran_transaction_t * | txn | ||
) |
int sigtran_client_link_down | ( | sigtran_conn_t const ** | conn | ) |
int sigtran_client_link_up | ( | sigtran_conn_t const ** | out, |
sigtran_conn_conf_t const * | conn_conf | ||
) |
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.
p_result | Where to write the result. |
inst | of rlm_sigtran. |
request | The current request. |
conn | current connection. |
fd | file descriptor on which the transaction is done |
Definition at line 406 of file client.c.
int sigtran_client_thread_register | ( | fr_event_list_t * | el | ) |
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.
[in] | el | the request pipe was registered to. |
[in] | req_pipe_fd | The rlm_sigtran side of the req_pipe. |
Definition at line 193 of file client.c.
int sigtran_event_exit | ( | void | ) |
int sigtran_event_start | ( | void | ) |
int sigtran_event_submit | ( | struct osmo_fd * | ofd, |
sigtran_transaction_t * | txn | ||
) |
void sigtran_log_init | ( | TALLOC_CTX * | ctx | ) |
void sigtran_sccp_global_free | ( | void | ) |
int sigtran_sccp_global_init | ( | 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.
[in] | ctx | To allocate the buffer in. |
[out] | out | Where to write the SCCP global title value. |
[in] | gt_ind | One of the SCCP_TITLE_IND_* macros.
|
[in] | digits | To convert to BCD (with nibbles reversed). |
[in] | tt | Title translation. |
[in] | es | Encoding scheme (specify in lower nibble).
|
[in] | np | Numbering plan (specify in lower nibble, will shift).
|
[in] | nai | Nature of address indicator.
|
Definition at line 170 of file sigtran.c.
void sigtran_sccp_incoming | ( | struct mtp_link_set * | set, |
struct msgb * | msg, | ||
int | sls | ||
) |
int sigtran_sscp_init | ( | sigtran_conn_t * | conn | ) |
int sigtran_tcap_outgoing | ( | UNUSED struct msgb * | msg_in, |
void * | ctx, | ||
sigtran_transaction_t * | txn, | ||
struct osmo_fd * | ofd | ||
) |
|
extern |