Denis Vlasenko
186c2b3d0e
iproute: fix a bug where "ip r flush table main" was rejected,
...
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-26 18:29:52 +00:00
Denis Vlasenko
ed6a49c657
ip: stop propagating argc; optimize ip_parse_common_args
...
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-11-18 22:56:25 +00:00
Denis Vlasenko
1eecaf26b0
libiproute: add missing break's
2007-09-30 16:04:21 +00:00
Denis Vlasenko
6ca409e0e4
trylink: produce even more info about final link stage
...
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-08-12 20:58:27 +00:00
Denis Vlasenko
990d0f63ee
Replace index_in_[sub]str_array with index_in_[sub]strings,
...
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-07-24 15:54:42 +00:00
Denis Vlasenko
9a7d38fe24
delete tons of extra #includes
2007-05-31 22:42:12 +00:00
Bernhard Reutner-Fischer
ab51bf4e28
- fix compilation when ENABLE_FEATURE_IP_RULE was off
2007-04-16 14:56:01 +00:00
Bernhard Reutner-Fischer
c98c31783c
- shrink iproute a bit (-200 bytes). Untested
2007-04-12 11:36:56 +00:00
Bernhard Reutner-Fischer
b290889f02
- add xsendto and use where appropriate; shrink iplink; sanitize libiproute a bit.
...
-916 byte
2007-04-12 11:34:39 +00:00
Denis Vlasenko
50f7f446ec
bb_full_fd_action: remove potential xmalloc from NOFORK path
...
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 23:20:53 +00:00
Bernhard Reutner-Fischer
12c96a64a4
- set the scope properly. Thanks to Jean Wolter, who wrote:
...
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-11 16:23:57 +00:00
Denis Vlasenko
540a2a1f3b
libiproute: audit callgraph, shortcut error paths into die() functions.
...
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-04-07 01:14:45 +00:00
Denis Vlasenko
89ef65f024
preparatory patch for -Wwrite-strings #5
2007-01-29 23:43:18 +00:00
Denis Vlasenko
fd94efa41f
fix numbering in switch(): we don't have "del" anymore,
...
substring match on "delete" handles it ok. But we (I?)
forgot to renumber case labels...
2007-01-27 13:13:45 +00:00
Denis Vlasenko
f7996f3b70
Trailing whitespace removal over entire tree
2007-01-11 17:20:00 +00:00
Denis Vlasenko
c519320000
iproute: remove double get_hz optimization
2006-12-31 19:07:23 +00:00
Denis Vlasenko
13463af29f
remove commented out #includes etc
...
move get_hz to the only caller
2006-12-31 18:58:32 +00:00
Denis Vlasenko
98ee06d3d4
stop using __u32 etc. uint32_t is there for a reason
2006-12-31 18:57:37 +00:00
Denis Vlasenko
cda6c636ca
re-applying first post-1.3.x change
...
version change to 1.4.0.svn
2006-12-15 00:59:35 +00:00
Denis Vlasenko
44b2ea786e
back out last change - need to make busybox-1_3-stable branch first
2006-12-15 00:02:30 +00:00
Bernhard Reutner-Fischer
728534b3cb
- table support for ip route
2006-12-14 15:41:29 +00:00
Denis Vlasenko
5af906e7c8
rename: compare_string_array -> index_in_str_array
...
introduce index_in_substr_array and use it in
iproute2
2006-11-05 18:05:09 +00:00
Denis Vlasenko
9225854144
mostly style fixes
2006-11-01 10:25:35 +00:00
Denis Vlasenko
c6f188def8
silly size savings and capitalization fixes
2006-10-26 00:37:00 +00:00
Denis Vlasenko
c16bd212e3
silly switch style fix
2006-09-27 19:51:06 +00:00
Denis Vlasenko
3538b9a882
Implement optional syslog logging using ordinary
...
bb_xx_msg calls, and convert networking/* to it.
The rest of bbox will be converted gradually.
2006-09-06 18:36:50 +00:00
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
Rob Landley
ecae66ac16
Header cleanup: don't #include headers that libbb.h already includes.
2006-06-02 20:53:38 +00:00
Rob Landley
7723019c6b
Patch from Bernhard Fischer to remove some useless bits.
2006-05-17 20:24:53 +00:00
Bernhard Reutner-Fischer
9a67ca309c
- janitorial: include proper prototypes in libiproute.
2006-04-02 21:14:19 +00:00
Eric Andersen
d78aea8b8e
sort out yet more type issues
2006-01-30 18:00:02 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Bernhard Reutner-Fischer
86f5c9906b
- add platform.h.
...
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
Bernhard Reutner-Fischer
d1d23a6e67
- mark argument who of print_route as unused.
2006-01-12 12:08:46 +00:00
"Vladimir N. Oleynik"
2f0a5f947a
restore compare_string_array new interface (make broken by landley)
2005-12-06 12:00:39 +00:00
Bernhard Reutner-Fischer
ab1878245c
* uniq.c: remove unneeded include and use short boilerplate.
...
* 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.
2005-10-26 10:47:26 +00:00
Paul Fox
5dc0ceeb9e
applying fix for:
...
0000203: 'ip route flush cache' not implemented
2005-07-20 19:01:05 +00:00
Glenn L McGrath
4014ab1c60
Set default command to list rather than get, its default behaviour now
...
coincides with upstream. Patch from debian diff.
2004-08-11 08:10:58 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Eric Andersen
1a773a656e
Manousaridis Angelos writes:
...
Another issue I found was with the iproute utility. While using another
program I found that it failed because the "ip route del" command was
not found. I looked at the full iproute implementation and this command
exists. The busybox version has the "ip route delete" command. I have
created a patch which makes the "ip route del" command an alias to the
"ip route delete" command.
2003-12-19 10:47:40 +00:00
Glenn L McGrath
fbf0b8af41
iPatch from waldi, fixes usage of ip route flush (from)? (match|exact)
2003-04-26 02:22:19 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Glenn L McGrath
4a4c677fcc
Patch from Bastian Blank
...
- ip route flush
- different usage for telnetd in inetd mode
- changes for the default flags of the ip features
- if no /usr requested, udhcpc should use the script also without /usr.
2003-02-15 11:50:33 +00:00
Glenn L McGrath
275be87be7
Only included headers that are used.
2002-12-16 07:37:21 +00:00
Glenn L McGrath
18eae0031a
Save a few more bytes
2002-12-02 00:54:10 +00:00
Glenn L McGrath
c82f2324bd
Save a hundred bytes or so on the do_iproute function
2002-12-02 00:35:23 +00:00
Glenn L McGrath
e3e2a7b41c
Syntax error
2002-11-28 12:01:25 +00:00
Glenn L McGrath
1652855fbc
Style, error_msg
2002-11-28 11:17:19 +00:00
Glenn L McGrath
9048ae5923
Use standard error messages
2002-11-28 10:56:38 +00:00
Eric Andersen
5780adb586
Patch from Bastian Blank:
...
hi erik
the following patch fixes the handling of iproute add <route> dev <dev>.
the code got lost while removing things.
bastian
2002-11-15 09:12:47 +00:00