summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-mss/stubs.c
blob: 6aed0f219a7f840f0528323b36d5544b717738f6 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include <errno.h>

#include <openbsc/debug.h>
#include <openbsc/gsm_subscriber.h>

struct gsm_subscriber_connection *connection_for_subscr(struct gsm_subscriber *subscr)
{
	struct gsm_bts *bts;
	struct gsm_network *net = subscr->group->net;
	struct gsm_lchan *lchan;

	/* FIXME: iterate over all existing GAN associations and see if we have
	 * any for subscr */

	return NULL;
}

/*! \brief process incoming 08.08 DTAP from MSC (send via GANC
 * association to MS) */
int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn,
			struct msgb *msg, int link_id, int allow_sacch)
{
	/* FIXME */

	return -EINVAL;
}

/* Release all occupied RF Channels but stay around for more. */
int gsm0808_clear(struct gsm_subscriber_connection *conn)
{
	/* FIXME */
	conn->lchan = NULL;
	conn->secondary_lchan = NULL;
	conn->ho_lchan = NULL;
	conn->bts = NULL;

	osmo_timer_del(&conn->T10);

	return 0;
}
/*! \brief We received a GSM 08.08 CIPHER MODE from the MSC */
int gsm0808_cipher_mode(struct gsm_subscriber_connection *conn, int cipher,
			const uint8_t *key, int len, int include_imeisv)
{
	if (cipher > 0 && key == NULL) {
		LOGP(DRSL, LOGL_ERROR, "Need to have an encrytpion key.\n");
		return -1;
	}

	if (len > MAX_A5_KEY_LEN) {
		LOGP(DRSL, LOGL_ERROR, "The key is too long: %d\n", len);
		return -1;
	}
}

/* MSC has requested that we page the given subscriber */
int paging_request(struct gsm_network *network, struct gsm_subscriber *subscr,
		   int type, gsm_cbfn *cbfn, void *data)
{
	/* FIXME */
	return -EINVAL;
}

/* Stop paging on all other bts' */
void paging_request_stop(struct gsm_bts *_bts, struct gsm_subscriber *subscr,
			 struct gsm_subscriber_connection *conn,
			 struct msgb *msg)
{
	/* FIXME */
}

/* cleanup at release subscriber_connection */
void subscr_con_free(struct gsm_subscriber_connection *conn)
{
	/* FIXME: merge with libbsc/bsc_api.c implementation */
	if (!conn)
		return;

	if (conn->subscr) {
		subscr_put(conn->subscr);
		conn->subscr = NULL;
	}

	if (conn->lchan) {
		LOGP(DNM, LOGL_ERROR, "The lchan should have been cleared.\n");
		conn->lchan->conn = NULL;
	}

	if (conn->secondary_lchan) {
		LOGP(DNM, LOGL_ERROR, "The secondary_lchan should have been cleared.\n");
		conn->secondary_lchan->conn = NULL;
	}

	llist_del(&conn->entry);
	talloc_free(conn);
}

void gsm_net_update_ctype(struct gsm_network *network)
{
	/* a MSC doesn't really need this, does it? */
	return;
}