blob: b8beea9fb33179147edb22aa7bbe35b775428953 [file] [log] [blame]
Ivan Kluchnikov5c2f9fb2012-02-05 02:27:17 +04001/* bssgp.h
2 *
3 * Copyright (C) 2011 Ivan Klyuchnikov
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 */
19
20#ifndef BSSGP_H
21#define BSSGP_H
22
23extern "C" {
24#include <osmocom/core/talloc.h>
25#include <osmocom/core/rate_ctr.h>
26#include <openbsc/debug.h>
27#include <openbsc/signal.h>
28#include <openbsc/gprs_ns.h>
29#include <openbsc/gprs_bssgp.h>
30#include <osmocom/core/application.h>
31
32int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, struct gprs_nsvc * nsvc, uint16_t bvci, uint8_t cause);
33
34int bssgp_tx_ul_ud(struct bssgp_bvc_ctx *bctx, uint32_t tlli, const uint8_t *qos_profile, struct msgb *llc_pdu);
35
36struct bssgp_bvc_ctx *btsctx_alloc(uint16_t bvci, uint16_t nsei);
37}
38
39void sendRLC(uint32_t tlli, uint8_t *pdu, unsigned startIndex, unsigned endIndex);
40
41int gprs_bssgp_bss_rx_ptp(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx);
42
43int gprs_bssgp_bss_rx_sign(struct msgb *msg, struct tlv_parsed *tp, struct bssgp_bvc_ctx *bctx);
44
45int gprs_bssgp_bss_rcvmsg(struct msgb *msg);
46
47int sgsn_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, struct msgb *msg, uint16_t bvci);
48
49void sendToSGSN(uint8_t tfi, uint32_t tlli, uint8_t * rlc_data, unsigned dataLen);
50
51void RLCMACServer();
52
53#endif // BSSGP_H