2008-12-23 20:25:15 +00:00
|
|
|
#ifndef _GSM_04_08_H
|
|
|
|
#define _GSM_04_08_H
|
|
|
|
|
2009-11-29 18:07:28 +00:00
|
|
|
#include <openbsc/meas_rep.h>
|
|
|
|
|
2010-02-20 17:56:00 +00:00
|
|
|
#include <osmocore/protocol/gsm_04_08.h>
|
2010-03-02 22:18:30 +00:00
|
|
|
#include <osmocore/gsm48.h>
|
2009-08-01 05:26:59 +00:00
|
|
|
|
2008-12-25 23:28:35 +00:00
|
|
|
struct msgb;
|
|
|
|
struct gsm_bts;
|
2009-02-16 22:53:52 +00:00
|
|
|
struct gsm_subscriber;
|
2009-06-10 15:11:52 +00:00
|
|
|
struct gsm_network;
|
2009-07-23 19:13:03 +00:00
|
|
|
struct gsm_trans;
|
2010-06-15 05:16:52 +00:00
|
|
|
struct gsm_subscriber_connection;
|
2008-12-25 23:28:35 +00:00
|
|
|
|
2010-05-01 12:22:44 +00:00
|
|
|
#define GSM48_ALLOC_SIZE 1024
|
|
|
|
#define GSM48_ALLOC_HEADROOM 128
|
|
|
|
|
|
|
|
static inline struct msgb *gsm48_msgb_alloc(void)
|
|
|
|
{
|
|
|
|
return msgb_alloc_headroom(GSM48_ALLOC_SIZE, GSM48_ALLOC_HEADROOM,
|
|
|
|
"GSM 04.08");
|
|
|
|
}
|
|
|
|
|
2008-12-31 18:52:11 +00:00
|
|
|
/* config options controlling the behaviour of the lower leves */
|
2008-12-30 16:18:18 +00:00
|
|
|
void gsm0408_allow_everyone(int allow);
|
2010-06-15 05:16:52 +00:00
|
|
|
void gsm0408_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);
|
2008-12-31 18:52:11 +00:00
|
|
|
|
2009-08-14 09:41:12 +00:00
|
|
|
int gsm0408_rcvmsg(struct msgb *msg, u_int8_t link_id);
|
2009-11-16 16:12:38 +00:00
|
|
|
enum gsm_chan_t get_ctype_by_chreq(struct gsm_bts *bts, u_int8_t ra, int neci);
|
|
|
|
enum gsm_chreq_reason_t get_reason_by_chreq(struct gsm_bts *bts, u_int8_t ra, int neci);
|
2008-12-25 23:28:35 +00:00
|
|
|
|
2008-12-30 18:01:02 +00:00
|
|
|
int gsm48_tx_mm_info(struct gsm_lchan *lchan);
|
2009-12-23 23:23:46 +00:00
|
|
|
int gsm48_tx_mm_auth_req(struct gsm_lchan *lchan, u_int8_t *rand, int key_seq);
|
2009-08-12 20:56:50 +00:00
|
|
|
int gsm48_tx_mm_auth_rej(struct gsm_lchan *lchan);
|
2009-02-06 21:55:37 +00:00
|
|
|
int gsm48_send_rr_release(struct gsm_lchan *lchan);
|
2009-10-05 12:00:14 +00:00
|
|
|
int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv);
|
2009-08-15 21:32:44 +00:00
|
|
|
int gsm48_send_rr_app_info(struct gsm_lchan *lchan, u_int8_t apdu_id,
|
2009-10-22 13:42:19 +00:00
|
|
|
u_int8_t apdu_len, const u_int8_t *apdu);
|
2010-01-28 08:43:49 +00:00
|
|
|
int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, u_int8_t power_class);
|
2009-12-16 23:25:18 +00:00
|
|
|
int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
|
|
|
|
u_int8_t power_command, u_int8_t ho_ref);
|
2008-12-25 23:28:35 +00:00
|
|
|
|
2009-06-10 15:11:52 +00:00
|
|
|
int bsc_upqueue(struct gsm_network *net);
|
|
|
|
|
|
|
|
int mncc_send(struct gsm_network *net, int msg_type, void *arg);
|
|
|
|
|
2009-02-16 22:53:52 +00:00
|
|
|
/* convert a ASCII phone number to call-control BCD */
|
|
|
|
int encode_bcd_number(u_int8_t *bcd_lv, u_int8_t max_len,
|
2009-06-10 04:08:54 +00:00
|
|
|
int h_len, const char *input);
|
|
|
|
int decode_bcd_number(char *output, int output_len, const u_int8_t *bcd_lv,
|
|
|
|
int h_len);
|
2009-02-16 22:53:52 +00:00
|
|
|
|
2009-08-21 02:57:35 +00:00
|
|
|
int send_siemens_mrpci(struct gsm_lchan *lchan, u_int8_t *classmark2_lv);
|
2010-05-15 17:07:20 +00:00
|
|
|
int gsm48_extract_mi(uint8_t *classmark2, int length, char *mi_string, uint8_t *mi_type);
|
2010-05-15 17:51:14 +00:00
|
|
|
int gsm48_paging_extract_mi(struct gsm48_pag_resp *pag, int length, char *mi_string, u_int8_t *mi_type);
|
2009-08-21 03:18:21 +00:00
|
|
|
int gsm48_handle_paging_resp(struct msgb *msg, struct gsm_subscriber *subscr);
|
2009-08-21 02:57:35 +00:00
|
|
|
|
2009-11-18 21:57:02 +00:00
|
|
|
int gsm48_lchan_modify(struct gsm_lchan *lchan, u_int8_t lchan_mode);
|
2009-10-22 13:23:11 +00:00
|
|
|
int gsm48_rx_rr_modif_ack(struct msgb *msg);
|
2009-11-29 18:07:28 +00:00
|
|
|
int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg);
|
|
|
|
|
2009-10-22 13:13:00 +00:00
|
|
|
|
2008-12-23 20:25:15 +00:00
|
|
|
#endif
|