@@ -14,7 +14,6 @@ const char *rtnl_dsfield_get_name(int id);
const char *rtnl_group_n2a(int id, char *buf, int len);
int rtnl_rtprot_a2n(__u32 *id, const char *arg);
-int rtnl_addrprot_a2n(__u32 *id, const char *arg);
int rtnl_rtscope_a2n(__u32 *id, const char *arg);
int rtnl_rttable_a2n(__u32 *id, const char *arg);
int rtnl_rtrealm_a2n(__u32 *id, const char *arg);
@@ -255,39 +255,6 @@ numeric:
return buf;
}
-int rtnl_addrprot_a2n(__u32 *id, const char *arg)
-{
- static char *cache;
- static unsigned long res;
- char *end;
- int i;
-
- if (cache && strcmp(cache, arg) == 0) {
- *id = res;
- return 0;
- }
-
- if (!rtnl_addrprot_tab_initialized)
- rtnl_addrprot_initialize();
-
- for (i = 0; i < 256; i++) {
- if (rtnl_addrprot_tab[i] &&
- strcmp(rtnl_addrprot_tab[i], arg) == 0) {
- cache = rtnl_addrprot_tab[i];
- res = i;
- *id = res;
- return 0;
- }
- }
-
- res = strtoul(arg, &end, 0);
- if (!end || end == arg || *end || res > 255)
- return -1;
- *id = res;
- return 0;
-}
-
-
static char *rtnl_rtscope_tab[256] = {
[RT_SCOPE_UNIVERSE] = "global",
[RT_SCOPE_NOWHERE] = "nowhere",
This function is defined but never used in current code. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- include/rt_names.h | 1 - lib/rt_names.c | 33 --------------------------------- 2 files changed, 34 deletions(-)