blob: 1feb0a2e3889f284456f26d567707ffbc336f7d6 [file] [log] [blame]
Holger Hans Peter Freyther7127b022014-08-04 11:52:52 +02001/* GPRS utility functions */
2
3/* (C) 2010 by Harald Welte <laforge@gnumonks.org>
4 * (C) 2010-2014 by On-Waves
5 * (C) 2013 by Holger Hans Peter Freyther
6 * All Rights Reserved
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Affero General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22#pragma once
23
24#include <stdint.h>
25#include <sys/types.h>
26
27struct msgb;
28
29struct msgb *gprs_msgb_copy(const struct msgb *msg, const char *name);
30int gprs_msgb_resize_area(struct msgb *msg, uint8_t *area,
31 size_t old_size, size_t new_size);
32char *gprs_apn_to_str(char *out_str, const uint8_t *apn_enc, size_t rest_chars);
33int gprs_str_to_apn(uint8_t *apn_enc, const char *str, size_t max_chars);