From 7127b0295eed1edea29ea88b352c2cfbff59c610 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 4 Aug 2014 11:52:52 +0200 Subject: gprs: Create a gprs_utils file and move to be shared code in there We intend to move some of these routines to libosmocore but to avoid a feature symbol clash we are prefixing these routines with gprs_. Done with Jacob --- openbsc/include/openbsc/Makefile.am | 2 +- openbsc/include/openbsc/gprs_utils.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 openbsc/include/openbsc/gprs_utils.h (limited to 'openbsc/include/openbsc') diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 23386f1f0..e1bef4c03 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -14,7 +14,7 @@ noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \ osmo_msc_data.h osmo_bsc_grace.h sms_queue.h abis_om2000.h \ bss.h gsm_data_shared.h control_cmd.h ipaccess.h mncc_int.h \ arfcn_range_encode.h nat_rewrite_trie.h bsc_nat_callstats.h \ - osmux.h mgcp_transcode.h rtp.h + osmux.h mgcp_transcode.h rtp.h gprs_utils.h openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h openbscdir = $(includedir)/openbsc diff --git a/openbsc/include/openbsc/gprs_utils.h b/openbsc/include/openbsc/gprs_utils.h new file mode 100644 index 000000000..1feb0a2e3 --- /dev/null +++ b/openbsc/include/openbsc/gprs_utils.h @@ -0,0 +1,33 @@ +/* GPRS utility functions */ + +/* (C) 2010 by Harald Welte + * (C) 2010-2014 by On-Waves + * (C) 2013 by Holger Hans Peter Freyther + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include +#include + +struct msgb; + +struct msgb *gprs_msgb_copy(const struct msgb *msg, const char *name); +int gprs_msgb_resize_area(struct msgb *msg, uint8_t *area, + size_t old_size, size_t new_size); +char *gprs_apn_to_str(char *out_str, const uint8_t *apn_enc, size_t rest_chars); +int gprs_str_to_apn(uint8_t *apn_enc, const char *str, size_t max_chars); -- cgit v1.2.3