aboutsummaryrefslogtreecommitdiffstats
path: root/gprs_bssgp_pcu.h
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2012-03-05 19:24:57 +0400
committerIvan Kluchnikov <kluchnikovi@gmail.com>2012-03-05 19:24:57 +0400
commit8ee6051b723032232b811c264e6fc64f0e5a4b5f (patch)
tree9a8428f684e29e7fde0e56f36a87fb1b46eeed4c /gprs_bssgp_pcu.h
parent34506406245a9589c05cb10e484726ea226e0c0e (diff)
Separation of GPRS PCU application from main OpenBTS code and changing PCU architecture (First step).
1. pcu - main program for GPRS PCU. 2. gprs_rlcmac - RLC/MAC layer implementation for PCU. Added list for TBF, TBF allocation, establishment, release. 3. gprs_bssgp_pcu - BSSGP protocol implementation for PCU. 4. pcu_l1_if - interface for communication PCU application with OpenBTS.
Diffstat (limited to 'gprs_bssgp_pcu.h')
-rw-r--r--gprs_bssgp_pcu.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/gprs_bssgp_pcu.h b/gprs_bssgp_pcu.h
new file mode 100644
index 00000000..1308cf7a
--- /dev/null
+++ b/gprs_bssgp_pcu.h
@@ -0,0 +1,68 @@
+/* gprs_bssgp_pcu.h
+ *
+ * Copyright (C) 2012 Ivan Klyuchnikov
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef GPRS_BSSGP_PCU_H
+#define GPRS_BSSGP_PCU_H
+
+
+extern "C" {
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/rate_ctr.h>
+#include <openbsc/debug.h>
+#include <openbsc/signal.h>
+#include <openbsc/gprs_ns.h>
+#include <openbsc/gprs_bssgp.h>
+#include <osmocom/core/application.h>
+
+int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause);
+
+int bssgp_tx_ul_ud(struct bssgp_bvc_ctx *bctx, uint32_t tlli, const uint8_t *qos_profile, struct msgb *llc_pdu);
+
+struct bssgp_bvc_ctx *btsctx_alloc(uint16_t bvci, uint16_t nsei);
+}
+
+#define BVCI 7
+#define NSEI 3
+
+#define QOS_PROFILE 0
+#define BSSGP_HDR_LEN 20
+#define NS_HDR_LEN 4
+#define MAX_LEN_PDU 60
+#define IE_PDU 14
+#define BLOCK_DATA_LEN 19
+#define BLOCK_LEN 23
+
+#define CELL_ID 3
+#define MNC 55
+#define MCC 905
+#define PCU_LAC 1000
+#define PCU_RAC 1
+
+
+extern struct bssgp_bvc_ctx *bctx;
+
+int gprs_bssgp_pcu_rx_dl_ud(struct msgb *msg);
+
+int gprs_bssgp_pcu_rx_ptp(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx);
+
+int gprs_bssgp_pcu_rx_sign(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx);
+
+int gprs_bssgp_pcu_rcvmsg(struct msgb *msg);
+
+#endif // GPRS_BSSGP_PCU_H