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> |
| 27 | #include <openbsc/debug.h> |
| 28 | #include <openbsc/signal.h> |
| 29 | #include <openbsc/gprs_ns.h> |
| 30 | #include <openbsc/gprs_bssgp.h> |
| 31 | #include <osmocom/core/application.h> |
| 32 | |
Ivan Kluchnikov | 8aa4c52 | 2012-02-20 15:15:12 +0400 | [diff] [blame] | 33 | 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] | 34 | |
| 35 | int bssgp_tx_ul_ud(struct bssgp_bvc_ctx *bctx, uint32_t tlli, const uint8_t *qos_profile, struct msgb *llc_pdu); |
| 36 | |
| 37 | struct bssgp_bvc_ctx *btsctx_alloc(uint16_t bvci, uint16_t nsei); |
| 38 | } |
| 39 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 40 | #define BVCI 7 |
| 41 | #define NSEI 3 |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 42 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 43 | #define QOS_PROFILE 0 |
| 44 | #define BSSGP_HDR_LEN 20 |
| 45 | #define NS_HDR_LEN 4 |
| 46 | #define MAX_LEN_PDU 60 |
| 47 | #define IE_PDU 14 |
| 48 | #define BLOCK_DATA_LEN 19 |
| 49 | #define BLOCK_LEN 23 |
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 | #define CELL_ID 3 |
| 52 | #define MNC 55 |
| 53 | #define MCC 905 |
| 54 | #define PCU_LAC 1000 |
| 55 | #define PCU_RAC 1 |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 56 | |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 57 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 58 | extern struct bssgp_bvc_ctx *bctx; |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 59 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 60 | int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg); |
Ivan Kluchnikov | 5c2f9fb | 2012-02-05 02:27:17 +0400 | [diff] [blame] | 61 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 62 | 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] | 63 | |
Ivan Kluchnikov | 8ee6051 | 2012-03-05 19:24:57 +0400 | [diff] [blame] | 64 | int gprs_bssgp_pcu_rx_sign(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx); |
| 65 | |
| 66 | int gprs_bssgp_pcu_rcvmsg(struct msgb *msg); |
| 67 | |
| 68 | #endif // GPRS_BSSGP_PCU_H |