aboutsummaryrefslogtreecommitdiff
path: root/networking/ip.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ip link: support for the CAN netlinkDario Binacchi2024-02-261-2/+53
| | | | | | | | | | | | | | | | | | | | I developed this application to test the Linux kernel series [1]. As described in it I could not use the iproute2 package since the microcontroller is without MMU. function old new delta do_set_can - 920 +920 packed_usage 34645 34908 +263 get_float_1000 - 164 +164 .rodata 105427 105539 +112 do_iplink 1313 1381 +68 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/0 up/down: 1527/0) Total: 1527 bytes cc: Marc Kleine-Budde <mkl@pengutronix.de> [1] https://marc.info/?l=linux-netdev&m=167999323611710&w=2 Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update applet size estimatesDenys Vlasenko2023-07-101-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Remove "select PLATFORM_LINUX"Denys Vlasenko2022-11-291-6/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix non-Linux buildsSamuel Thibault2022-11-291-0/+6
| | | | | | | | | | | Various tools are Linuxish and should thus only attempted to build on Linux only. Some features are also Linux-only. Also, libresolv is used on all GNU platforms, notably GNU/Hurd and GNU/kfreeBSD. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip: added support for setting netns on devicesNicholas Niro2021-10-071-1/+1
| | | | | | | | | | | | | function old new delta set_netns - 130 +130 do_iplink 1252 1315 +63 .rodata 104173 104179 +6 packed_usage 34020 33993 -27 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/1 up/down: 199/-27) Total: 172 bytes Signed-off-by: Nicholas Niro <blowfist@xroutine.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nillyDenys Vlasenko2020-11-301-1/+1
| | | | | | | | text data bss dec hex filename 1021988 559 5052 1027599 fae0f busybox_old 1021236 559 5052 1026847 fab1f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip rule: add support for fwmark/fwmask for policy routingRui Salvaterra2020-10-031-1/+1
| | | | | | | | | | This adds support for fwmark/fwmask in ip rule which is needed, for example, in OpenWrt's mwan3. Masks are supported since Linux 2.6.19. Fixes: https://bugs.busybox.net/show_bug.cgi?id=11621 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: drop PLATFORM_LINUXRon Yorston2020-08-131-7/+0
| | | | | | | | | | | | | | | PLATFORM_LINUX is a hidden configuration option which is disabled by default and enabled at over a hundred locations for features that are deemed to be Linux specific. The only effect of PLATFORM_LINUX is to control compilation of libbb/match_fstype.c. This file is only needed by mount and umount. Remove all references to PLATFORM_LINUX and compile match_fstype.c if mount or umount is enabled. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip: Add support for "noprefixroute" optionChristian Eggers2020-07-311-1/+3
| | | | | | | | | | | The "noprefixroute" option suppresses automatic generation of a routing table entry based on the interface's ip address. The ifa_flags field has only 8 bit. If higher bits are set, rta_tb[IFA_FLAGS] has to be used instead. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: update size informationDenys Vlasenko2018-12-281-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip: tweak --help textDenys Vlasenko2018-08-141-4/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove stray newline in "iplink --help"Denys Vlasenko2018-03-081-1/+1
| | | | | | | function old new delta packed_usage 32547 32550 +3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* iplink: implement support for selecting a master interfaceJan Luebbe2018-02-201-1/+2
| | | | | | | | | | | | | | | Attaching an interface to a VRF is done by setting the interface's master. Besides VRF, this can also be used for bridges. function old new delta set_master - 142 +142 do_iplink 1262 1357 +95 packed_usage 32546 32539 -7 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 237/-7) Total: 230 bytes Signed-off-by: Jan Luebbe <jluebbe@debian.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip link: support "add TYPE vrf", improve --helpJan Luebbe2018-02-201-4/+53
| | | | | | | | | | | | | | VRF interfaces have a mandatory table parameter, which needs to be specified using a RTNL attribute. function old new delta do_add_or_delete 1150 1254 +104 packed_usage 32444 32546 +102 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 206/0) Total: 206 bytes Signed-off-by: Jan Luebbe <jluebbe@debian.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip,ip*: make them NOEXECDenys Vlasenko2017-09-181-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: trim/improve item names and help texts, take 2Denys Vlasenko2017-07-271-8/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-20/+20
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ipaddress: tweak help text more: mention "brd +" syntaxDenys Vlasenko2017-04-071-6/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ipaddress: tweak help textDenys Vlasenko2017-04-071-8/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* iproute: support advmss optionDenys Vlasenko2017-04-071-1/+1
| | | | | | | | | | | | function old new delta iproute_modify 1164 1221 +57 str_is_lock - 22 +22 packed_usage 31372 31382 +10 do_iproute 157 132 -25 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/1 up/down: 89/-25) Total: 64 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* iproute: update help text, add commented-out code for unsupported optionsDenys Vlasenko2017-04-061-4/+35
| | | | | | | | | | | function old new delta packed_usage 31327 31372 +45 do_iproute 132 157 +25 iproute_modify 1162 1164 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 72/0) Total: 72 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* iplink: implement "set promisc on|off". Closes 4682Denys Vlasenko2017-04-061-2/+2
| | | | | | | | function old new delta do_iplink 1232 1269 +37 packed_usage 31337 31327 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip link: tidying upDenys Vlasenko2017-04-061-5/+2
| | | | | | Misplaced comment. --help was wrong: dynamic on|off is not supported. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip: better --helpDenys Vlasenko2017-01-211-33/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was: Usage: ip [OPTIONS] address|route|link|tunnel|neigh|rule [COMMAND] ip [OPTIONS] OBJECT [COMMAND] where OBJECT := address|route|link|tunnel|neigh|rule OPTIONS := -f[amily] inet|inet6|link | -o[neline] User: instead of repeating list of OBJECTs twice, you could at least show available COMMANDs... Now: Usage: ip [OPTIONS] address|route|link|tunnel|neigh|rule [COMMAND] OPTIONS := -f[amily] inet|inet6|link | -o[neline] COMMAND := ip addr add|del IFADDR dev IFACE | show|flush [dev IFACE] [to PREFIX] ip route list|flush|add|del|change|append|replace|test ROUTE ip link set IFACE [up|down] [arp on|off] | show [IFACE] ip tunnel add|change|del|show [NAME] [mode ipip|gre|sit] [remote ADDR] [local ADDR] [ttl TTL] ip neigh show|flush [to PREFIX] [dev DEV] [nud STATE] ip rule [list] | add|del SELECTOR ACTION While at it, tweak tc --help too (it stays disabled, thus no effect) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* more ip --help fixesDenys Vlasenko2017-01-211-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make --help texts smallerDenys Vlasenko2017-01-211-37/+37
| | | | | | | function old new delta packed_usage 31035 30968 -67 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip: make ip aliases individually selectableDenys Vlasenko2016-12-221-77/+85
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ipneigh: add this shortcur similar to other "ip <CMD>" shortcutsDenys Vlasenko2016-11-231-1/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Convert all networking/* applets to "new style" applet definitionsDenys Vlasenko2016-11-231-0/+124
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* networking: add 'ip neigh' commandCurt Brune2015-10-141-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch ports the 'ip neigh' command, originally written by Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>, 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 <curt@cumulusnetworks.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip addr: support change and replace commandsMichael Tokarev2015-07-011-1/+1
| | | | | Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* iproute: fix help textDenys Vlasenko2011-12-061-7/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+1
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move remaining help text from include/usage.src.hPere Orga2011-04-111-0/+73
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace cleanupDenys Vlasenko2010-10-291-3/+1
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libiproute: code shrink by adding FAST_FUNCDenys Vlasenko2010-07-241-2/+2
| | | | | | | | | | | | | | | | | function old new delta ipaddr_list_or_flush 1282 1293 +11 ip_parse_common_args 153 151 -2 ip_main 53 50 -3 ip_do 19 15 -4 do_iptunnel 985 980 -5 do_iprule 982 977 -5 do_iplink 1637 1631 -6 do_iproute 2105 2098 -7 do_ipaddr 1406 1398 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/8 up/down: 11/-40) Total: -29 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip: fix "ip r" breakageDenys Vlasenko2010-07-241-39/+23
| | | | | | | | | | function old new delta static.ip_func_ptrs - 32 +32 ip_main 110 53 -57 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 32/-57) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-10/+10
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* iproute: fix ipXXX utilities trying to parse their applet nameDenis Vlasenko2008-12-041-1/+1
| | | | | as their 1st parameter.
* - update my name. No obj-code changes ;)Bernhard Reutner-Fischer2008-09-251-1/+1
|
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-7/+7
|
* whitespace fixesDenis Vlasenko2008-03-281-5/+5
|
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
* vi: introduce FEATURE_VI_8BIT (as vi currently is not Unicode capable,Denis Vlasenko2007-12-221-1/+1
| | | | | | people may want to disable display of high-bit chars) ip: build fixlet
* ip: stop propagating argc; optimize ip_parse_common_argsDenis Vlasenko2007-11-181-22/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta find_pair 167 187 +20 static.families - 17 +17 die_must_be_on_off - 11 +11 ... on_off 33 22 -11 do_ipaddr 103 90 -13 do_iptunnel 1001 986 -15 iproute_list_or_flush 1237 1217 -20 static.ip_common_commands 43 22 -21 do_iproute 2217 2193 -24 parse_args 1444 1414 -30 ip_do 47 16 -31 do_iprule 994 963 -31 ip_main 153 113 -40 ipaddr_modify 1357 1305 -52 ipaddr_list_or_flush 2543 2490 -53 ip_parse_common_args 294 159 -135 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 4/24 up/down: 85/-563) Total: -478 bytes text data bss dec hex filename 775561 966 9236 785763 bfd63 busybox_old 775073 962 9236 785271 bfb77 busybox_unstripped
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-6/+6
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-1/+1
| | | | | | | | | trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
* Replace index_in_[sub]str_array with index_in_[sub]strings,Denis Vlasenko2007-07-241-10/+9
| | | | | | | | | which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes. text data bss dec hex filename 781266 1328 11844 794438 c1f46 busybox_old 781010 1328 11844 794182 c1e46 busybox_unstripped