aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface_layer3.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-07-30 10:39:26 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-30 10:39:26 +0200
commit88f9d98ccc2b8719b826d1a34c3aad8af3e4c132 (patch)
treeae273a3cd971c762b5a4995c7792d305187f5dfc /openbsc/src/vty_interface_layer3.c
parent417920a66098b67c45bb1774148a21de6b5ba07d (diff)
Use hexparse() from libosmocore >= 0.1.14
Diffstat (limited to 'openbsc/src/vty_interface_layer3.c')
-rw-r--r--openbsc/src/vty_interface_layer3.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index 55fe1c06..fbb93c88 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -37,6 +37,7 @@
#include <openbsc/e1_input.h>
#include <openbsc/abis_nm.h>
#include <osmocore/gsm_utils.h>
+#include <osmocore/utils.h>
#include <openbsc/db.h>
#include <osmocore/talloc.h>
#include <openbsc/signal.h>
@@ -47,33 +48,6 @@
extern struct gsm_network *gsmnet_from_vty(struct vty *v);
-static int hexparse(const char *str, u_int8_t *b, int max_len)
-
-{
- int i, l, v;
-
- l = strlen(str);
- if ((l&1) || ((l>>1) > max_len))
- return -1;
-
- memset(b, 0x00, max_len);
-
- for (i=0; i<l; i++) {
- char c = str[i];
- if (c >= '0' && c <= '9')
- v = c - '0';
- else if (c >= 'a' && c <= 'f')
- v = 10 + (c - 'a');
- else if (c >= 'A' && c <= 'F')
- v = 10 + (c - 'A');
- else
- return -1;
- b[i>>1] |= v << (i&1 ? 0 : 4);
- }
-
- return i>>1;
-}
-
static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr)
{
int rc;