blob: ef0f11a3b886418faada074a69f8e417930a8433 [file] [log] [blame]
Jonathan Santos03fd8d02011-05-25 13:54:02 -04001/* OpenBSC BSC code */
2
3#ifndef OSMO_BSC_H
4#define OSMO_BSC_H
5
6#include "bsc_api.h"
7
8struct sccp_connection;
9
10struct osmo_bsc_sccp_con {
11 struct llist_head entry;
12
13 int ciphering_handled;
14 int rtp_port;
15
16 /* SCCP connection realted */
17 struct sccp_connection *sccp;
18 struct bsc_msc_connection *msc_con;
19 struct timer_list sccp_it_timeout;
20 struct timer_list sccp_cc_timeout;
21
22 struct llist_head sccp_queue;
23 unsigned int sccp_queue_size;
24
25 struct gsm_subscriber_connection *conn;
26 uint8_t new_subscriber;
27};
28
29struct bsc_api *osmo_bsc_api();
30
31int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, struct msgb *msg);
32int bsc_open_connection(struct osmo_bsc_sccp_con *sccp, struct msgb *msg);
33int bsc_create_new_connection(struct gsm_subscriber_connection *conn);
34int bsc_delete_connection(struct osmo_bsc_sccp_con *sccp);
35
36int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
37int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
38
39int bsc_handle_udt(struct gsm_network *net, struct bsc_msc_connection *conn, struct msgb *msg, unsigned int length);
40int bsc_handle_dt1(struct osmo_bsc_sccp_con *conn, struct msgb *msg, unsigned int len);
41
42
43#endif