blob: f34281e36333904318cb53f46ea3c557502cb25d [file] [log] [blame]
Harald Welte30fabdf2012-09-10 08:54:35 +02001#ifndef _BSSGP_BSS_H
2#define _BSSGP_BSS_H
3
4#include <osmocom/core/msgb.h>
5#include <osmocom/gprs/gprs_bssgp.h>
6
7/* GPRS BSSGP protocol implementation as per 3GPP TS 08.18 */
8
9/* (C) 2009-2012 by Harald Welte <laforge@gnumonks.org>
10 *
11 * All Rights Reserved
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU Affero General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Affero General Public License for more details.
22 *
23 * You should have received a copy of the GNU Affero General Public License
24 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 *
26 */
27
28
29uint8_t *bssgp_msgb_tlli_put(struct msgb *msg, uint32_t tlli);
30
31int bssgp_tx_suspend(uint16_t nsei, uint32_t tlli,
32 const struct gprs_ra_id *ra_id);
33
34int bssgp_tx_resume(uint16_t nsei, uint32_t tlli,
35 const struct gprs_ra_id *ra_id, uint8_t suspend_ref);
36
37int bssgp_tx_ra_capa_upd(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag);
38
39int bssgp_tx_radio_status_tlli(struct bssgp_bvc_ctx *bctx, uint8_t cause,
40 uint32_t tlli);
41
42int bssgp_tx_radio_status_tmsi(struct bssgp_bvc_ctx *bctx, uint8_t cause,
43 uint32_t tmsi);
44
45int bssgp_tx_radio_status_imsi(struct bssgp_bvc_ctx *bctx, uint8_t cause,
46 const char *imsi);
47
48int bssgp_tx_flush_ll_ack(struct bssgp_bvc_ctx *bctx, uint32_t tlli,
49 uint8_t action, uint16_t bvci_new,
50 uint32_t num_octets);
51
52int bssgp_tx_llc_discarded(struct bssgp_bvc_ctx *bctx, uint32_t tlli,
53 uint8_t num_frames, uint32_t num_octets);
54
55int bssgp_tx_bvc_block(struct bssgp_bvc_ctx *bctx, uint8_t cause);
56
57int bssgp_tx_bvc_unblock(struct bssgp_bvc_ctx *bctx);
58
59int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause);
60
61int bssgp_tx_ul_ud(struct bssgp_bvc_ctx *bctx, uint32_t tlli,
62 const uint8_t *qos_profile, struct msgb *llc_pdu);
63
64int bssgp_rx_paging(struct bssgp_paging_info *pinfo,
65 struct msgb *msg);
66
Andreas Eversbergf44ed8c2012-09-23 06:05:20 +020067int bssgp_tx_fc_bvc(struct bssgp_bvc_ctx *bctx, uint8_t tag,
Harald Weltee92866b2012-09-10 08:56:04 +020068 uint32_t bucket_size, uint32_t bucket_leak_rate,
69 uint16_t bmax_default_ms, uint32_t r_default_ms,
70 uint8_t *bucket_full_ratio, uint32_t *queue_delay_ms);
71
Andreas Eversbergf44ed8c2012-09-23 06:05:20 +020072int bssgp_tx_fc_ms(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag,
Harald Weltee92866b2012-09-10 08:56:04 +020073 uint32_t ms_bucket_size, uint32_t bucket_leak_rate,
74 uint8_t *bucket_full_ratio);
Harald Welte30fabdf2012-09-10 08:54:35 +020075#endif