From 69934701fd1b18327b3a779cb292a728834b2d0d Mon Sep 17 00:00:00 2001 From: Curt Brune Date: Wed, 14 Oct 2015 12:53:47 +0200 Subject: networking: add 'ip neigh' command This patch ports the 'ip neigh' command, originally written by Alexey Kuznetsov, , to busybox. The base of the port is the version of iproute that shipped with Debian Squeeze, taken from: http://http.debian.net/debian/pool/main/i/iproute/iproute_20100519.orig.tar.gz This patch has actively been used by the Open Network Install Environment (ONIE) project for over 3 years without incident. function old new delta print_neigh - 933 +933 ipneigh_list_or_flush - 742 +742 get_hz - 109 +109 do_ipneigh - 62 +62 do_iproute 2112 2153 +41 packed_usage 30647 30667 +20 ipneigh_main - 14 +14 static.ip_neigh_commands - 12 +12 static.nuds - 9 +9 static.ip_func_ptrs 32 36 +4 print_route 1858 1727 -131 ------------------------------------------------------------------------------ (add/remove: 8/0 grow/shrink: 3/1 up/down: 1946/-131) Total: 1815 bytes Signed-off-by: Curt Brune Signed-off-by: Denys Vlasenko --- networking/Config.src | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'networking/Config.src') diff --git a/networking/Config.src b/networking/Config.src index 43ccbf385..8c7417f86 100644 --- a/networking/Config.src +++ b/networking/Config.src @@ -554,6 +554,13 @@ config FEATURE_IP_RULE help Add support for rule commands to "ip". +config FEATURE_IP_NEIGH + bool "ip neighbor" + default y + depends on IP + help + Add support for neighbor commands to "ip". + config FEATURE_IP_SHORT_FORMS bool "Support short forms of ip commands" default y @@ -565,6 +572,7 @@ config FEATURE_IP_SHORT_FORMS ip route -> iproute ip tunnel -> iptunnel ip rule -> iprule + ip neigh -> ipneigh Say N unless you desparately need the short form of the ip object commands. @@ -604,6 +612,11 @@ config IPRULE default y depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_RULE +config IPNEIGH + bool + default y + depends on FEATURE_IP_SHORT_FORMS && FEATURE_IP_NEIGH + config IPCALC bool "ipcalc" default y -- cgit v1.2.3