Neels Hofmeyr | 17518fe | 2017-06-20 04:35:06 +0200 | [diff] [blame] | 1 | /*! \file gprs_bssgp_bss.h |
| 2 | * GPRS BSSGP protocol implementation as per 3GPP TS 08.18 */ |
| 3 | /* |
| 4 | * (C) 2009-2012 by Harald Welte <laforge@gnumonks.org> |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 5 | * |
| 6 | * All Rights Reserved |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
Harald Welte | 7fa89c2 | 2014-10-26 20:33:09 +0100 | [diff] [blame] | 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
Harald Welte | 7fa89c2 | 2014-10-26 20:33:09 +0100 | [diff] [blame] | 16 | * GNU General Public License for more details. |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 17 | * |
Harald Welte | 7fa89c2 | 2014-10-26 20:33:09 +0100 | [diff] [blame] | 18 | * You should have received a copy of the GNU General Public License |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | * |
| 21 | */ |
| 22 | |
Neels Hofmeyr | 17518fe | 2017-06-20 04:35:06 +0200 | [diff] [blame] | 23 | #pragma once |
| 24 | |
| 25 | #include <osmocom/core/msgb.h> |
| 26 | #include <osmocom/gprs/gprs_bssgp.h> |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 27 | |
| 28 | uint8_t *bssgp_msgb_tlli_put(struct msgb *msg, uint32_t tlli); |
Max | f1ad60e | 2018-01-05 14:19:33 +0100 | [diff] [blame] | 29 | uint8_t *bssgp_msgb_ra_put(struct msgb *msg, const struct gprs_ra_id *ra_id); |
Max | 8b8938f | 2017-06-29 19:48:29 +0200 | [diff] [blame] | 30 | int bssgp_tx_bvc_ptp_reset(uint16_t nsei, enum gprs_bssgp_cause cause); |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 31 | int bssgp_tx_suspend(uint16_t nsei, uint32_t tlli, |
| 32 | const struct gprs_ra_id *ra_id); |
| 33 | |
| 34 | int bssgp_tx_resume(uint16_t nsei, uint32_t tlli, |
| 35 | const struct gprs_ra_id *ra_id, uint8_t suspend_ref); |
| 36 | |
| 37 | int bssgp_tx_ra_capa_upd(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag); |
| 38 | |
| 39 | int bssgp_tx_radio_status_tlli(struct bssgp_bvc_ctx *bctx, uint8_t cause, |
| 40 | uint32_t tlli); |
| 41 | |
| 42 | int bssgp_tx_radio_status_tmsi(struct bssgp_bvc_ctx *bctx, uint8_t cause, |
| 43 | uint32_t tmsi); |
| 44 | |
| 45 | int bssgp_tx_radio_status_imsi(struct bssgp_bvc_ctx *bctx, uint8_t cause, |
| 46 | const char *imsi); |
| 47 | |
| 48 | int 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 | |
| 52 | int bssgp_tx_llc_discarded(struct bssgp_bvc_ctx *bctx, uint32_t tlli, |
| 53 | uint8_t num_frames, uint32_t num_octets); |
| 54 | |
| 55 | int bssgp_tx_bvc_block(struct bssgp_bvc_ctx *bctx, uint8_t cause); |
| 56 | |
| 57 | int bssgp_tx_bvc_unblock(struct bssgp_bvc_ctx *bctx); |
| 58 | |
| 59 | int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause); |
| 60 | |
| 61 | int bssgp_tx_ul_ud(struct bssgp_bvc_ctx *bctx, uint32_t tlli, |
| 62 | const uint8_t *qos_profile, struct msgb *llc_pdu); |
| 63 | |
| 64 | int bssgp_rx_paging(struct bssgp_paging_info *pinfo, |
| 65 | struct msgb *msg); |
| 66 | |
Andreas Eversberg | f44ed8c | 2012-09-23 06:05:20 +0200 | [diff] [blame] | 67 | int bssgp_tx_fc_bvc(struct bssgp_bvc_ctx *bctx, uint8_t tag, |
Harald Welte | e92866b | 2012-09-10 08:56:04 +0200 | [diff] [blame] | 68 | uint32_t bucket_size, uint32_t bucket_leak_rate, |
Jacob Erlbeck | 9385d1e | 2015-05-06 09:29:32 +0200 | [diff] [blame] | 69 | uint32_t bmax_default_ms, uint32_t r_default_ms, |
Harald Welte | e92866b | 2012-09-10 08:56:04 +0200 | [diff] [blame] | 70 | uint8_t *bucket_full_ratio, uint32_t *queue_delay_ms); |
| 71 | |
Andreas Eversberg | f44ed8c | 2012-09-23 06:05:20 +0200 | [diff] [blame] | 72 | int bssgp_tx_fc_ms(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag, |
Harald Welte | e92866b | 2012-09-10 08:56:04 +0200 | [diff] [blame] | 73 | uint32_t ms_bucket_size, uint32_t bucket_leak_rate, |
| 74 | uint8_t *bucket_full_ratio); |