| 1 | #ifndef _GSM_04_08_H |
|---|
| 2 | #define _GSM_04_08_H |
|---|
| 3 | |
|---|
| 4 | #include <openbsc/meas_rep.h> |
|---|
| 5 | |
|---|
| 6 | #include <osmocore/protocol/gsm_04_08.h> |
|---|
| 7 | #include <osmocore/gsm48.h> |
|---|
| 8 | |
|---|
| 9 | struct msgb; |
|---|
| 10 | struct gsm_bts; |
|---|
| 11 | struct gsm_subscriber; |
|---|
| 12 | struct gsm_network; |
|---|
| 13 | struct gsm_trans; |
|---|
| 14 | |
|---|
| 15 | /* config options controlling the behaviour of the lower leves */ |
|---|
| 16 | void gsm0408_allow_everyone(int allow); |
|---|
| 17 | |
|---|
| 18 | int gsm0408_rcvmsg(struct msgb *msg, u_int8_t link_id); |
|---|
| 19 | void gsm0408_generate_lai(struct gsm48_loc_area_id *lai48, u_int16_t mcc, |
|---|
| 20 | u_int16_t mnc, u_int16_t lac); |
|---|
| 21 | enum gsm_chan_t get_ctype_by_chreq(struct gsm_bts *bts, u_int8_t ra, int neci); |
|---|
| 22 | enum gsm_chreq_reason_t get_reason_by_chreq(struct gsm_bts *bts, u_int8_t ra, int neci); |
|---|
| 23 | |
|---|
| 24 | int gsm48_tx_mm_info(struct gsm_lchan *lchan); |
|---|
| 25 | int gsm48_tx_mm_auth_req(struct gsm_lchan *lchan, u_int8_t *rand, int key_seq); |
|---|
| 26 | int gsm48_tx_mm_auth_rej(struct gsm_lchan *lchan); |
|---|
| 27 | struct msgb *gsm48_msgb_alloc(void); |
|---|
| 28 | int gsm48_sendmsg(struct msgb *msg, struct gsm_trans *trans); |
|---|
| 29 | int gsm48_generate_mid_from_tmsi(u_int8_t *buf, u_int32_t tmsi); |
|---|
| 30 | int gsm48_generate_mid_from_imsi(u_int8_t *buf, const char* imsi); |
|---|
| 31 | int gsm48_mi_to_string(char *string, const int str_len, const u_int8_t *mi, const int mi_len); |
|---|
| 32 | |
|---|
| 33 | int gsm48_send_rr_release(struct gsm_lchan *lchan); |
|---|
| 34 | int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv); |
|---|
| 35 | int gsm48_send_rr_app_info(struct gsm_lchan *lchan, u_int8_t apdu_id, |
|---|
| 36 | u_int8_t apdu_len, const u_int8_t *apdu); |
|---|
| 37 | int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, u_int8_t power_class); |
|---|
| 38 | int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan, |
|---|
| 39 | u_int8_t power_command, u_int8_t ho_ref); |
|---|
| 40 | |
|---|
| 41 | int bsc_upqueue(struct gsm_network *net); |
|---|
| 42 | |
|---|
| 43 | int mncc_send(struct gsm_network *net, int msg_type, void *arg); |
|---|
| 44 | |
|---|
| 45 | /* convert a ASCII phone number to call-control BCD */ |
|---|
| 46 | int encode_bcd_number(u_int8_t *bcd_lv, u_int8_t max_len, |
|---|
| 47 | int h_len, const char *input); |
|---|
| 48 | int decode_bcd_number(char *output, int output_len, const u_int8_t *bcd_lv, |
|---|
| 49 | int h_len); |
|---|
| 50 | |
|---|
| 51 | extern const char *gsm0408_cc_msg_names[]; |
|---|
| 52 | |
|---|
| 53 | int send_siemens_mrpci(struct gsm_lchan *lchan, u_int8_t *classmark2_lv); |
|---|
| 54 | int gsm48_paging_extract_mi(struct msgb *msg, char *mi_string, u_int8_t *mi_type); |
|---|
| 55 | int gsm48_handle_paging_resp(struct msgb *msg, struct gsm_subscriber *subscr); |
|---|
| 56 | |
|---|
| 57 | int gsm48_lchan_modify(struct gsm_lchan *lchan, u_int8_t lchan_mode); |
|---|
| 58 | int gsm48_rx_rr_modif_ack(struct msgb *msg); |
|---|
| 59 | int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg); |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | #endif |
|---|