blob: 4349a37cc883c0b3bd305103d49ca4984a6f1c17 [file] [log] [blame]
Neels Hofmeyr7b656882017-07-09 22:09:18 +02001#pragma once
2
3void gsm_net_update_ctype(struct gsm_network *network);
4enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *network, uint8_t ra);
5int get_reason_by_chreq(uint8_t ra, int neci);
6int gsm48_send_rr_release(struct gsm_lchan *lchan);
7int send_siemens_mrpci(struct gsm_lchan *lchan,
8 uint8_t *classmark2_lv);
9int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn,
10 struct msgb *msg, struct bsc_subscr *bsub);
11int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv);
12void gsm48_lchan2chan_desc(struct gsm48_chan_desc *cd,
13 const struct gsm_lchan *lchan);
14int gsm48_multirate_config(uint8_t *lv, const struct amr_multirate_conf *mr, const struct amr_mode *modes);
15int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
16 uint8_t power_command, uint8_t ho_ref);
17int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t power_command);
18int gsm48_lchan_modify(struct gsm_lchan *lchan, uint8_t mode);
19int gsm48_rx_rr_modif_ack(struct msgb *msg);
20int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg);
21int gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn);
22int gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn,
23 enum gsm48_reject_value value);
24
Neels Hofmeyrb5400772018-02-13 23:48:24 +010025struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value);
26int gsm48_extract_mi(uint8_t *classmark2_lv, int length, char *mi_string, uint8_t *mi_type);
27int gsm48_paging_extract_mi(struct gsm48_pag_resp *resp, int length,
28 char *mi_string, uint8_t *mi_type);
29struct msgb *gsm48_create_loc_upd_rej(uint8_t cause);
30
Harald Weltef94cbf62018-03-17 21:40:32 +010031struct msgb *gsm48_create_rr_status(uint8_t cause);
32int gsm48_tx_rr_status(struct gsm_subscriber_connection *conn, uint8_t cause);
33
Neels Hofmeyr7b656882017-07-09 22:09:18 +020034#define GSM48_ALLOC_SIZE 2048
35#define GSM48_ALLOC_HEADROOM 256
36
37static inline struct msgb *gsm48_msgb_alloc_name(const char *name)
38{
39 return msgb_alloc_headroom(GSM48_ALLOC_SIZE, GSM48_ALLOC_HEADROOM,
40 name);
41}
Neels Hofmeyrd0d204a2018-06-08 18:46:04 +020042
43uint64_t str_to_imsi(const char *imsi_str);