Jonathan Santos | 03fd8d0 | 2011-05-25 13:54:02 -0400 | [diff] [blame^] | 1 | /* GSM 08.08 like API for OpenBSC */ |
| 2 | |
| 3 | #ifndef OPENBSC_BSC_API_H |
| 4 | #define OPENBSC_BSC_API_H |
| 5 | |
| 6 | #include "gsm_data.h" |
| 7 | |
| 8 | #define BSC_API_CONN_POL_ACCEPT 0 |
| 9 | #define BSC_API_CONN_POL_REJECT 1 |
| 10 | |
| 11 | struct bsc_api { |
| 12 | void (*sapi_n_reject)(struct gsm_subscriber_connection *conn, int dlci); |
| 13 | void (*cipher_mode_compl)(struct gsm_subscriber_connection *conn, |
| 14 | struct msgb *msg, uint8_t chosen_encr); |
| 15 | int (*compl_l3)(struct gsm_subscriber_connection *conn, |
| 16 | struct msgb *msg, uint16_t chosen_channel); |
| 17 | void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id, |
| 18 | struct msgb *msg); |
| 19 | void (*assign_compl)(struct gsm_subscriber_connection *conn, |
| 20 | uint8_t rr_cause, uint8_t chosen_channel, |
| 21 | uint8_t encr_alg_id, uint8_t speech_mode); |
| 22 | void (*assign_fail)(struct gsm_subscriber_connection *conn, |
| 23 | uint8_t cause, uint8_t *rr_cause); |
| 24 | int (*clear_request)(struct gsm_subscriber_connection *conn, |
| 25 | uint32_t cause); |
| 26 | }; |
| 27 | |
| 28 | int bsc_api_init(struct gsm_network *network, struct bsc_api *api); |
| 29 | int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, int link_id, int allow_sach); |
| 30 | int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, int full_rate); |
| 31 | int gsm0808_cipher_mode(struct gsm_subscriber_connection *conn, int cipher, |
| 32 | const uint8_t *key, int len, int include_imeisv); |
| 33 | int gsm0808_page(struct gsm_bts *bts, unsigned int page_group, |
| 34 | unsigned int mi_len, uint8_t *mi, int chan_type); |
| 35 | int gsm0808_clear(struct gsm_subscriber_connection *conn); |
| 36 | |
| 37 | #endif |