diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2011-04-11 16:32:58 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-04-12 21:50:47 +0200 |
commit | 23b1b808f1ce65b8aec3095b52e0bc3946cde4bb (patch) | |
tree | 2e14a52cd299ba59b78527afb0dd1037d28c7c31 /openbsc/src/ipaccess | |
parent | 91afbbc56a16fcfab5b9f67015ed18c1c285cf22 (diff) |
ipaccess-find: get rid of ipac_idtag_name()
Use generic ipaccess_idtag_name() available in libabis instead.
Diffstat (limited to 'openbsc/src/ipaccess')
-rw-r--r-- | openbsc/src/ipaccess/Makefile.am | 6 | ||||
-rw-r--r-- | openbsc/src/ipaccess/ipaccess-find.c | 22 |
2 files changed, 7 insertions, 21 deletions
diff --git a/openbsc/src/ipaccess/Makefile.am b/openbsc/src/ipaccess/Makefile.am index cff350558..4fe1e379f 100644 --- a/openbsc/src/ipaccess/Makefile.am +++ b/openbsc/src/ipaccess/Makefile.am @@ -4,6 +4,12 @@ AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(COVERAGE_LDFLAGS) bin_PROGRAMS = ipaccess-find ipaccess-config ipaccess-proxy +ipaccess_find_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libmsc/libmsc.a \ + $(top_builddir)/src/libabis/libabis.a \ + $(top_builddir)/src/libbsc/libbsc.a \ + $(top_builddir)/src/libtrau/libtrau.a \ + $(top_builddir)/src/libcommon/libcommon.a ipaccess_find_SOURCES = ipaccess-find.c ipaccess_config_SOURCES = ipaccess-config.c ipaccess-firmware.c network_listen.c diff --git a/openbsc/src/ipaccess/ipaccess-find.c b/openbsc/src/ipaccess/ipaccess-find.c index a27360937..987e35ce5 100644 --- a/openbsc/src/ipaccess/ipaccess-find.c +++ b/openbsc/src/ipaccess/ipaccess-find.c @@ -32,26 +32,6 @@ #include <openbsc/ipaccess.h> #include <openbsc/gsm_data.h> -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 udp_sock(const char *ifname) { int fd, rc, bc = 1; @@ -133,7 +113,7 @@ static int parse_response(unsigned char *buf, int len) t_len = *cur++; t_tag = *cur++; - printf("%s='%s' ", ipac_idtag_name(t_tag), cur); + printf("%s='%s' ", ipaccess_idtag_name(t_tag), cur); cur += t_len; } |