Sylvain Munaut | 12ba778 | 2014-06-16 10:13:40 +0200 | [diff] [blame] | 1 | #pragma once |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 2 | |
| 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 Welte | 7fa89c2 | 2014-10-26 20:33:09 +0100 | [diff] [blame] | 13 | * 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 Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 15 | * (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 Welte | 7fa89c2 | 2014-10-26 20:33:09 +0100 | [diff] [blame] | 20 | * GNU General Public License for more details. |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 21 | * |
Harald Welte | 7fa89c2 | 2014-10-26 20:33:09 +0100 | [diff] [blame] | 22 | * You should have received a copy of the GNU General Public License |
Harald Welte | 30fabdf | 2012-09-10 08:54:35 +0200 | [diff] [blame] | 23 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 24 | * |
| 25 | */ |
| 26 | |
| 27 | |
| 28 | uint8_t *bssgp_msgb_tlli_put(struct msgb *msg, uint32_t tlli); |
| 29 | |
| 30 | int bssgp_tx_suspend(uint16_t nsei, uint32_t tlli, |
| 31 | const struct gprs_ra_id *ra_id); |
| 32 | |
| 33 | int bssgp_tx_resume(uint16_t nsei, uint32_t tlli, |
| 34 | const struct gprs_ra_id *ra_id, uint8_t suspend_ref); |
| 35 | |
| 36 | int bssgp_tx_ra_capa_upd(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag); |
| 37 | |
| 38 | int bssgp_tx_radio_status_tlli(struct bssgp_bvc_ctx *bctx, uint8_t cause, |
| 39 | uint32_t tlli); |
| 40 | |
| 41 | int bssgp_tx_radio_status_tmsi(struct bssgp_bvc_ctx *bctx, uint8_t cause, |
| 42 | uint32_t tmsi); |
| 43 | |
| 44 | int bssgp_tx_radio_status_imsi(struct bssgp_bvc_ctx *bctx, uint8_t cause, |
| 45 | const char *imsi); |
| 46 | |
| 47 | int 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 | |
| 51 | int bssgp_tx_llc_discarded(struct bssgp_bvc_ctx *bctx, uint32_t tlli, |
| 52 | uint8_t num_frames, uint32_t num_octets); |
| 53 | |
| 54 | int bssgp_tx_bvc_block(struct bssgp_bvc_ctx *bctx, uint8_t cause); |
| 55 | |
| 56 | int bssgp_tx_bvc_unblock(struct bssgp_bvc_ctx *bctx); |
| 57 | |
| 58 | int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause); |
| 59 | |
| 60 | int bssgp_tx_ul_ud(struct bssgp_bvc_ctx *bctx, uint32_t tlli, |
| 61 | const uint8_t *qos_profile, struct msgb *llc_pdu); |
| 62 | |
| 63 | int bssgp_rx_paging(struct bssgp_paging_info *pinfo, |
| 64 | struct msgb *msg); |
| 65 | |
Andreas Eversberg | f44ed8c | 2012-09-23 06:05:20 +0200 | [diff] [blame] | 66 | 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] | 67 | uint32_t bucket_size, uint32_t bucket_leak_rate, |
Jacob Erlbeck | 9385d1e | 2015-05-06 09:29:32 +0200 | [diff] [blame] | 68 | uint32_t bmax_default_ms, uint32_t r_default_ms, |
Harald Welte | e92866b | 2012-09-10 08:56:04 +0200 | [diff] [blame] | 69 | uint8_t *bucket_full_ratio, uint32_t *queue_delay_ms); |
| 70 | |
Andreas Eversberg | f44ed8c | 2012-09-23 06:05:20 +0200 | [diff] [blame] | 71 | 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] | 72 | uint32_t ms_bucket_size, uint32_t bucket_leak_rate, |
| 73 | uint8_t *bucket_full_ratio); |