aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute/iproute.c
AgeCommit message (Collapse)Author
2009-06-05*: add FAST_FUNC to function ptrs where it makes senseDenys Vlasenko
function old new delta evalcommand 1195 1209 +14 testcmd - 10 +10 printfcmd - 10 +10 echocmd - 10 +10 func_exec 270 276 +6 echo_dg 104 109 +5 store_nlmsg 85 89 +4 pseudo_exec_argv 195 198 +3 dotcmd 287 290 +3 machtime_stream 29 31 +2 discard_stream 24 26 +2 argstr 1299 1301 +2 killcmd 108 109 +1 evalfor 226 227 +1 daytime_stream 43 44 +1 run_list 2544 2543 -1 lookupvar 62 61 -1 ipaddr_modify 1310 1309 -1 ... parse_stream 2254 2245 -9 evalpipe 356 347 -9 collect_if 210 197 -13 read_opt 869 851 -18 handle_dollar 681 658 -23 print_addrinfo 1342 1303 -39 iterate_on_dir 156 59 -97 print_route 1709 1609 -100 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767) Total: -693 bytes text data bss dec hex filename 841748 467 7872 850087 cf8a7 busybox_old 841061 467 7872 849400 cf5f8 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-04-21*: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
2009-03-05networking/libiproute/*: code shrink by optimizing numeric conversionsDenis Vlasenko
and other misc stuff function old new delta print_tunnel 660 656 -4 format_host 5 - -5 get_unsigned 70 54 -16 get_u32 70 54 -16 do_iplink 1173 1151 -22 get_prefix 417 393 -24 print_rule 800 771 -29 print_addrinfo 1374 1342 -32 print_route 1745 1709 -36 iprule_modify 905 866 -39 iproute_modify 1105 1048 -57 get_integer 70 - -70 parse_args 1684 1440 -244 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/11 up/down: 0/-594) Total: -594 bytes text data bss dec hex filename 817378 476 7892 825746 c9992 busybox_old 816784 476 7892 825152 c9740 busybox_unstripped
2008-10-07- route metric support (Natanael Copa)Bernhard Reutner-Fischer
Adds about 75b
2008-07-21libbb: [x]fopen_for_{read,write} introduced and used.Denis Vlasenko
(by Valdimir) function old new delta config_open2 - 41 +41 config_read 507 542 +35 find_pair 169 187 +18 fopen_for_write - 14 +14 fopen_for_read - 14 +14 find_main 406 418 +12 xfopen_for_write - 10 +10 xfopen_for_read - 10 +10 popstring 134 140 +6 parse_inittab 396 401 +5 next_token 923 928 +5 pack_gzip 1659 1661 +2 bb__parsespent 117 119 +2 fallbackSort 1719 1717 -2 evalvar 1376 1374 -2 qrealloc 36 33 -3 ... ... ... ... singlemount 4579 4569 -10 process_stdin 443 433 -10 patch_main 1111 1101 -10 ifupdown_main 2175 2165 -10 file_action_grep 90 80 -10 uuidcache_init 649 637 -12 hush_main 797 785 -12 read_config 230 217 -13 dpkg_main 3835 3820 -15 read_line_input 3134 3110 -24 sysctl_main 232 203 -29 config_open 40 10 -30 WARN_BAD_LINE 44 - -44 login_main 1714 1575 -139 ------------------------------------------------------------------------------ (add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-06-29libiproute: print_route() always uses stdout, do not pass FILE pointer to it.Denis Vlasenko
libiproute: Use FAST_FUNC function old new delta iprule_modify 884 905 +21 ipaddr_modify 1289 1310 +21 rtnl_send 53 69 +16 xrtnl_wilddump_request 109 124 +15 xrtnl_dump_filter 394 403 +9 rtnl_talk 534 539 +5 print_addrinfo 1369 1374 +5 iproute_modify 1017 1020 +3 iprule_list 81 83 +2 xrtnl_open 163 161 -2 parse_rtattr 89 87 -2 ipaddr_list_or_flush 2176 2174 -2 addattr_l 91 88 -3 flush_update 116 108 -8 iproute_list_or_flush 1285 1263 -22 iproute_get 878 852 -26 print_route 1913 1752 -161 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 9/8 up/down: 97/-226) Total: -129 bytes
2008-06-25whitespace fixes. no code changesDenis Vlasenko
2008-06-12- make the first arg of the filter function passed to rtnl_dump_filter constantBernhard Reutner-Fischer
to match normal iproute. No obj-code changes.
2008-06-08ip: make numeric table work: "ip route list table 255". closes bug 3664.Denis Vlasenko
function old new delta iproute_list_or_flush 1270 1300 +30
2008-05-31libiproute: style fixes, and using smallint as appropriateDenis Vlasenko
function old new delta print_route 1730 1731 +1 print_addrinfo 1497 1498 +1 iproute_list_or_flush 1232 1229 -3 ipaddr_list_or_flush 2490 2484 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 2/-9) Total: -7 bytes
2008-03-20*: use fopen_or_warn in few more placesDenis Vlasenko
2008-01-04ip route: "ip route" was misbehaving (extra argv+1 ate 1st env var)Denis Vlasenko
2007-11-27ip route: add comment, no code changesDenis Vlasenko
2007-11-26iproute: fix a bug where "ip r flush table main" was rejected,Denis Vlasenko
add "ip r flush cache" (however I'm unsure it is really valid syntax) Add a few comments and stop mixing params and params' keywords.
2007-11-18ip: stop propagating argc; optimize ip_parse_common_argsDenis Vlasenko
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
2007-09-30libiproute: add missing break'sDenis Vlasenko
2007-08-12trylink: produce even more info about final link stageDenis Vlasenko
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
2007-07-24Replace index_in_[sub]str_array with index_in_[sub]strings,Denis Vlasenko
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
2007-05-31delete tons of extra #includesDenis Vlasenko
2007-04-16- fix compilation when ENABLE_FEATURE_IP_RULE was offBernhard Reutner-Fischer
2007-04-12- shrink iproute a bit (-200 bytes). UntestedBernhard Reutner-Fischer
2007-04-12- add xsendto and use where appropriate; shrink iplink; sanitize libiproute ↵Bernhard Reutner-Fischer
a bit. -916 byte
2007-04-11bb_full_fd_action: remove potential xmalloc from NOFORK pathDenis Vlasenko
cat: stop using stdio.h opens libbb: introduce & use open[3]_or_warn function old new delta open3_or_warn - 54 +54 bb_cat 115 144 +29 open_or_warn - 25 +25 unlzma 2404 2412 +8 chattr_main 334 339 +5 xstrtoul_range_sfx 251 255 +4 telnet_main 1514 1510 -4 static.opt 4 - -4 qgravechar 122 118 -4 fuser_add_pid 61 54 -7 fuser_add_inode 154 147 -7 writeFileToTarball 1542 1534 -8 refresh 1156 1148 -8 do_show 856 846 -10 read_leases 212 200 -12 setup_redirects 236 222 -14 iproute_list_or_flush 1582 1568 -14 read_config 427 411 -16 write_leases 284 264 -20 hash_file 338 318 -20 copy_file 1760 1740 -20 do_iproute 2610 2588 -22 bb_full_fd_action 320 269 -51 open_to_or_warn 103 49 -54 fuser_main 1660 1596 -64 .rodata 131160 131096 -64 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
2007-04-11- set the scope properly. Thanks to Jean Wolter, who wrote:Bernhard Reutner-Fischer
busybox ip and the original ip utility behave differently when setting the following route (verified with ip route show using the original ip utility): ip route add 10.0.0.138 dev eth0 Result for busybox ip: # ip route add 10.0.0.138 dev eth0 # /usr/local/bin/ip route show 10.0.0.138 dev eth0 Result for ip: # /usr/local/bin/ip route add 10.0.0.138 dev eth0 # /usr/local/bin/ip route show 10.0.0.138 dev eth0 scope link A following "ip route add default via 10.0.0.138" fails for busybox ip, since the kernel can not find a route to 10.0.0.138 (it replies with Network is unreachable). The reasons seems to be that the original ip utility explicitly sets the scope after parsing all parameters. This is missing in busybox, the attached patch fixes this. I took this from the original iproute sources and removed some variables, which are not needed for busybox.
2007-04-07libiproute: audit callgraph, shortcut error paths into die() functions.Denis Vlasenko
Kill a few statics, made other globals smaller: oneline is smallint, _SL_ is char function old new delta print_tunnel 693 731 +38 print_route 1775 1777 +2 print_addrinfo 1495 1497 +2 ipaddr_list_or_flush 2826 2828 +2 oneline 4 1 -3 _SL_ 4 1 -3 ipaddr_modify 1476 1472 -4 parse_address 124 119 -5 ip_parse_common_args 429 423 -6 on_off 53 46 -7 do_del_ioctl 113 106 -7 do_add_ioctl 120 113 -7 do_show 864 856 -8 iprule_list 157 148 -9 do_iptunnel 310 299 -11 do_add 143 126 -17 get_ctl_fd 95 76 -19 set_address 108 84 -24 ip_main 351 323 -28 static.ifr 32 - -32 parse_args 1992 1949 -43 iproute_list_or_flush 1673 1582 -91 do_iplink 1583 1485 -98 filter 280 - -280 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 4/18 up/down: 44/-702) Total: -658 bytes
2007-01-29preparatory patch for -Wwrite-strings #5Denis Vlasenko
2007-01-27fix numbering in switch(): we don't have "del" anymore,Denis Vlasenko
substring match on "delete" handles it ok. But we (I?) forgot to renumber case labels...
2007-01-11Trailing whitespace removal over entire treeDenis Vlasenko
2006-12-31iproute: remove double get_hz optimizationDenis Vlasenko
2006-12-31remove commented out #includes etcDenis Vlasenko
move get_hz to the only caller
2006-12-31stop using __u32 etc. uint32_t is there for a reasonDenis Vlasenko
2006-12-15re-applying first post-1.3.x changeDenis Vlasenko
version change to 1.4.0.svn
2006-12-15back out last change - need to make busybox-1_3-stable branch firstDenis Vlasenko
2006-12-14- table support for ip routeBernhard Reutner-Fischer
2006-11-05rename: compare_string_array -> index_in_str_arrayDenis Vlasenko
introduce index_in_substr_array and use it in iproute2
2006-11-01mostly style fixesDenis Vlasenko
2006-10-26silly size savings and capitalization fixesDenis Vlasenko
2006-09-27silly switch style fixDenis Vlasenko
2006-09-06Implement optional syslog logging using ordinaryDenis Vlasenko
bb_xx_msg calls, and convert networking/* to it. The rest of bbox will be converted gradually.
2006-06-07- reuse strings and messages. Saves about 600BBernhard Reutner-Fischer
2006-06-02Header cleanup: don't #include headers that libbb.h already includes.Rob Landley
2006-05-17Patch from Bernhard Fischer to remove some useless bits.Rob Landley
2006-04-02- janitorial: include proper prototypes in libiproute.Bernhard Reutner-Fischer
2006-01-30sort out yet more type issuesEric Andersen
2006-01-25just whitespaceTim Riker
2006-01-22- add platform.h.Bernhard Reutner-Fischer
- use shorter boilerplate while at it.
2006-01-12- mark argument who of print_route as unused.Bernhard Reutner-Fischer
2005-12-06restore compare_string_array new interface (make broken by landley)"Vladimir N. Oleynik"
2005-10-26 * uniq.c: remove unneeded include and use short boilerplate.Bernhard Reutner-Fischer
* coreutils.h: remove prototype of non-existing xgetoptfile_sort_uniq and add boilerplate. * networking/{ipaddr,ip,iplink,iproute,iptunnel}.c: touch includes and use short boilerplate. * libiproute/iproute.c: rename round to avoid clashes with older SuSE gcc and use short boilerplate.