blob: decce6bcfd2228763d985481d8f70467147daf9b [file] [log] [blame]
Ivan Kluchnikov5c2f9fb2012-02-05 02:27:17 +04001/*GPRSSocket.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 GPRSSOCKET_H
21#define GPRSSOCKET_H
22
23#include <BitVector.h>
Ivan Kluchnikov34506402012-02-20 15:24:16 +040024#include "gsm_rlcmac.h"
25
26
27enum DataBlockDispatcherState {
28 WaitSequenceStart,
29 WaitNextBlock,
30 WaitNextSequence
31};
32
33void sendToGSMTAP(uint8_t * data, unsigned len);
Ivan Kluchnikov5c2f9fb2012-02-05 02:27:17 +040034
35void sendToOpenBTS(BitVector * vector);
36
37void writePUack(BitVector * dest, uint8_t TFI, uint32_t TLLI, unsigned CV, unsigned BSN);
38
Ivan Kluchnikov34506402012-02-20 15:24:16 +040039void RLCMACExtractData(uint8_t* tfi, uint32_t* tlli, RlcMacUplinkDataBlock_t * dataBlock, uint8_t* rlc_data, unsigned* dataIndex);
40
41void sendUplinkAck(uint8_t tfi, uint32_t tlli, RlcMacUplinkDataBlock_t * dataBlock);
42
43void RLCMACDispatchDataBlock(BitVector *vector, uint8_t* tfi, uint32_t* tlli, uint8_t* rlc_data, unsigned* dataIndex);
44
45void RLCMACDispatchBlock(BitVector *vector);
Ivan Kluchnikov5c2f9fb2012-02-05 02:27:17 +040046
47void *RLCMACSocket(void *);
48
49#endif // GPRSSOCKET_H