diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-04 11:52:52 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-08-04 11:52:52 +0200 |
commit | 7127b0295eed1edea29ea88b352c2cfbff59c610 (patch) | |
tree | 5dbcaa6bcbeae16ccad84226a8c400b0b5df071a /openbsc/include/openbsc | |
parent | 1ddd9e518e9d2b335249239955174718d35ef6ef (diff) |
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
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r-- | openbsc/include/openbsc/Makefile.am | 2 | ||||
-rw-r--r-- | openbsc/include/openbsc/gprs_utils.h | 33 |
2 files changed, 34 insertions, 1 deletions
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 <laforge@gnumonks.org> + * (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 <http://www.gnu.org/licenses/>. + * + */ +#pragma once + +#include <stdint.h> +#include <sys/types.h> + +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); |