blob: 1a2aa0fbd31e57722f5c3346ce77589f17032649 [file] [log] [blame]
Holger Hans Peter Freyther58db60c2013-11-13 20:45:40 +01001/*
2 * Copyright (C) 2013 by Holger Hans Peter Freyther
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#include "tbf.h"
20
21extern "C" {
22#include <osmocom/core/utils.h>
23}
24
25
26uint8_t *gprs_rlc_data::prepare(size_t block_data_len)
27{
28 /* todo.. only set it once if it turns out to be a bottleneck */
29 memset(block, 0x0, ARRAY_SIZE(block));
30 memset(block, 0x2b, block_data_len);
31
32 return block;
33}
Holger Hans Peter Freyther321f3c32013-11-23 16:06:54 +010034
35void gprs_rlc_v_b::reset()
36{
37 for (size_t i = 0; i < ARRAY_SIZE(m_v_b); ++i)
38 mark_invalid(i);
39}