aboutsummaryrefslogtreecommitdiffstats
path: root/include/openbsc/osmo_bsc.h
blob: 262014759f91392507470b47efb98a3594cbea5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* OpenBSC BSC code */

#ifndef OSMO_BSC_H
#define OSMO_BSC_H

#include "bsc_api.h"

struct sccp_connection;

struct osmo_bsc_sccp_con {
	struct llist_head entry;

	int ciphering_handled;
	int rtp_port;

	/* SCCP connection realted */
	struct sccp_connection *sccp;
	struct bsc_msc_connection *msc_con;
	struct osmo_timer_list sccp_it_timeout;
	struct osmo_timer_list sccp_cc_timeout;

	struct llist_head sccp_queue;
	unsigned int sccp_queue_size;

	struct gsm_subscriber_connection *conn;
	uint8_t new_subscriber;
};

struct bsc_api *osmo_bsc_api();

int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, struct msgb *msg);
int bsc_open_connection(struct osmo_bsc_sccp_con *sccp, struct msgb *msg);
int bsc_create_new_connection(struct gsm_subscriber_connection *conn);
int bsc_delete_connection(struct osmo_bsc_sccp_con *sccp);

int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);

int bsc_handle_udt(struct gsm_network *net, struct bsc_msc_connection *conn, struct msgb *msg, unsigned int length);
int bsc_handle_dt1(struct osmo_bsc_sccp_con *conn, struct msgb *msg, unsigned int len);


#endif