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