Neels Hofmeyr | c4628a3 | 2018-12-07 14:47:34 +0100 | [diff] [blame] | 1 | /* E-interface messaging over a GSUP connection */ |
| 2 | #pragma once |
| 3 | |
| 4 | #include <osmocom/gsm/gsup.h> |
| 5 | #include <osmocom/msc/msc_roles.h> |
| 6 | |
| 7 | struct osmo_fsm_inst; |
| 8 | struct gsm_network; |
| 9 | struct vlr_instance; |
| 10 | |
| 11 | /* E-interface: connection to a remote MSC via GSUP */ |
| 12 | struct e_link { |
| 13 | struct osmo_fsm_inst *msc_role; |
| 14 | struct gsup_client_mux *gcm; |
| 15 | uint8_t *remote_name; |
| 16 | size_t remote_name_len; |
| 17 | }; |
| 18 | |
| 19 | struct e_link *e_link_alloc(struct gsup_client_mux *gcm, struct osmo_fsm_inst *msc_role, |
| 20 | const uint8_t *remote_name, size_t remote_name_len); |
| 21 | void e_link_assign(struct e_link *e, struct osmo_fsm_inst *msc_role); |
| 22 | void e_link_free(struct e_link *e); |
| 23 | |
| 24 | int e_prep_gsup_msg(struct e_link *e, struct osmo_gsup_message *gsup_msg); |
| 25 | int e_tx(struct e_link *e, const struct osmo_gsup_message *gsup_msg); |
| 26 | |
| 27 | const char *e_link_name(struct e_link *e); |
| 28 | |
| 29 | void msc_a_i_t_gsup_init(struct gsm_network *net); |
| 30 | |
| 31 | enum osmo_gsup_entity msc_role_to_gsup_entity(enum msc_role role); |
| 32 | enum msc_role gsup_entity_to_msc_role(enum osmo_gsup_entity entity); |
| 33 | int gsup_msg_assign_an_apdu(struct osmo_gsup_message *gsup_msg, struct an_apdu *an_apdu); |
| 34 | |
| 35 | struct msgb *gsup_msg_to_msgb(const struct osmo_gsup_message *gsup_msg); |
| 36 | void gsup_msg_to_an_apdu(struct an_apdu *an_apdu, const struct osmo_gsup_message *gsup_msg); |