sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
--- a/ip/ip.c
+++ b/ip/ip.c
-@@ -71,30 +71,42 @@ static const struct cmd {
+@@ -73,30 +73,42 @@ static const struct cmd {
int (*func)(int argc, char **argv);
} cmds[] = {
{ "address", do_ipaddr },
{ "link", do_iplink },
+#ifndef IPROUTE2_TINY
{ "l2tp", do_ipl2tp },
- { "fou", do_ipfou },
+ { "fou", do_ipfou },
+#endif
{ "tunnel", do_iptunnel },
{ "tunl", do_iptunnel },
{ "tap", do_iptuntap },
{ "token", do_iptoken },
{ "tcpmetrics", do_tcp_metrics },
- { "tcp_metrics",do_tcp_metrics },
+ { "tcp_metrics", do_tcp_metrics },
+#endif
{ "monitor", do_ipmonitor },
+#ifndef IPROUTE2_TINY
};
--- a/lib/utils.c
+++ b/lib/utils.c
-@@ -642,6 +642,7 @@ const char *rt_addr_n2a(int af, const vo
- case AF_INET:
- case AF_INET6:
+@@ -675,6 +675,7 @@ const char *rt_addr_n2a(int af, int len,
return inet_ntop(af, addr, buf, buflen);
+ case AF_MPLS:
+ return mpls_ntop(af, addr, buf, buflen);
+#ifndef IPROUTE2_TINY
case AF_IPX:
return ipx_ntop(af, addr, buf, buflen);
case AF_DECnet:
-@@ -650,6 +651,7 @@ const char *rt_addr_n2a(int af, const vo
+@@ -683,6 +684,7 @@ const char *rt_addr_n2a(int af, int len,
memcpy(dna.a_addr, addr, 2);
return dnet_ntop(af, &dna, buf, buflen);
}
+#endif
+ case AF_PACKET:
+ return ll_addr_n2a(addr, len, ARPHRD_VOID, buf, buflen);
default:
- return "???";
- }
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -4,6 +4,10 @@ ifeq ($(IP_CONFIG_SETNS),y)