aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/ipaccess
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-04-07 14:15:11 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-04-07 23:28:00 +0200
commit66add64b719ba008aa140b01ef9d4cdd466326f3 (patch)
tree1a71517b6a83b2da765c39df3ce43e8d186c518c /openbsc/src/ipaccess
parent22f58a9a581494c6dd571f9a8e2e3a60b0f0369d (diff)
libabis: ipaccess: export ipaccess_idtag_name()
Now this is used by ipaccess-proxy, remove redundant implemention in it.
Diffstat (limited to 'openbsc/src/ipaccess')
-rw-r--r--openbsc/src/ipaccess/ipaccess-proxy.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c
index b8b42c025..c6538ff62 100644
--- a/openbsc/src/ipaccess/ipaccess-proxy.c
+++ b/openbsc/src/ipaccess/ipaccess-proxy.c
@@ -131,26 +131,6 @@ static int gprs_ns_cb(struct bsc_fd *bfd, unsigned int what);
#define PROXY_ALLOC_SIZE 1200
-static const char *idtag_names[] = {
- [IPAC_IDTAG_SERNR] = "Serial_Number",
- [IPAC_IDTAG_UNITNAME] = "Unit_Name",
- [IPAC_IDTAG_LOCATION1] = "Location_1",
- [IPAC_IDTAG_LOCATION2] = "Location_2",
- [IPAC_IDTAG_EQUIPVERS] = "Equipment_Version",
- [IPAC_IDTAG_SWVERSION] = "Software_Version",
- [IPAC_IDTAG_IPADDR] = "IP_Address",
- [IPAC_IDTAG_MACADDR] = "MAC_Address",
- [IPAC_IDTAG_UNIT] = "Unit_ID",
-};
-
-static const char *ipac_idtag_name(int tag)
-{
- if (tag >= ARRAY_SIZE(idtag_names))
- return "unknown";
-
- return idtag_names[tag];
-}
-
static int ipac_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len)
{
u_int8_t t_len;
@@ -161,7 +141,7 @@ static int ipac_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len)
t_len = *cur++;
t_tag = *cur++;
- DEBUGPC(DMI, "%s='%s' ", ipac_idtag_name(t_tag), cur);
+ DEBUGPC(DMI, "%s='%s' ", ipaccess_idtag_name(t_tag), cur);
dec->lv[t_tag].len = t_len;
dec->lv[t_tag].val = cur;