Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 1 | /* gprs_bssgp_pcu.h |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 2 | * |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 3 | * Copyright (C) 2012 Ivan Klyuchnikov |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | */ |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 19 | |
| 20 | #ifndef GPRS_BSSGP_PCU_H |
| 21 | #define GPRS_BSSGP_PCU_H |
| 22 | |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 23 | |
| 24 | extern "C" { |
| 25 | #include <osmocom/core/talloc.h> |
| 26 | #include <osmocom/core/rate_ctr.h> |
Ivan Kluchnikov | a9f1ff2 | 2012-05-24 22:25:06 +0400 | [diff] [blame] | 27 | #include <osmocom/core/logging.h> |
Harald Welte | d679009 | 2012-06-18 12:21:03 +0800 | [diff] [blame] | 28 | #include <osmocom/core/signal.h> |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 29 | #include <osmocom/core/application.h> |
Harald Welte | d679009 | 2012-06-18 12:21:03 +0800 | [diff] [blame] | 30 | #include <osmocom/gprs/gprs_ns.h> |
| 31 | #include <osmocom/gprs/gprs_bssgp.h> |
| 32 | #include <osmocom/gprs/gprs_msgb.h> |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 33 | |
Ivan Kluchnikov | 8aa4c52 | 2012-02-20 15:15:12 +0400 | [diff] [blame] | 34 | int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause); |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 35 | |
| 36 | int bssgp_tx_ul_ud(struct bssgp_bvc_ctx *bctx, uint32_t tlli, const uint8_t *qos_profile, struct msgb *llc_pdu); |
| 37 | |
| 38 | struct bssgp_bvc_ctx *btsctx_alloc(uint16_t bvci, uint16_t nsei); |
| 39 | } |
Ivan Kluchnikov | a9f1ff2 | 2012-05-24 22:25:06 +0400 | [diff] [blame] | 40 | #include <gprs_debug.h> |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 41 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 42 | #define QOS_PROFILE 0 |
Ivan Kluchnikov | 3fa42b2 | 2012-06-04 19:07:25 +0400 | [diff] [blame] | 43 | #define BSSGP_HDR_LEN 53 |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 44 | #define NS_HDR_LEN 4 |
Ivan Kluchnikov | b172b1b | 2012-06-07 01:51:49 +0400 | [diff] [blame] | 45 | #define IE_LLC_PDU 14 |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 46 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 47 | extern struct bssgp_bvc_ctx *bctx; |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 48 | |
Ivan Kluchnikov | 5e0df93 | 2012-06-12 15:33:52 +0400 | [diff] [blame] | 49 | int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg, struct tlv_parsed *tp); |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 50 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 51 | int gprs_bssgp_pcu_rx_ptp(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx); |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 52 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 53 | int gprs_bssgp_pcu_rx_sign(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx); |
| 54 | |
| 55 | int gprs_bssgp_pcu_rcvmsg(struct msgb *msg); |
| 56 | |
Andreas Eversberg | bf5a0f6 | 2012-07-06 08:58:22 +0200 | [diff] [blame] | 57 | int gprs_bssgp_create(uint32_t sgsn_ip, uint16_t sgsn_port, uint16_t nsei, |
| 58 | uint16_t nsvci, uint16_t bvci, uint16_t mcc, uint16_t mnc, uint16_t lac, |
| 59 | uint16_t rac, uint16_t cell_id); |
| 60 | |
| 61 | void gprs_bssgp_destroy(void); |
| 62 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 63 | #endif // GPRS_BSSGP_PCU_H |