Denys Vlasenko
0ef64bdb40
*: make GNU licensing statement forms more regular
...
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>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
c8a2ab1023
dumpleases: better help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-28 00:02:20 +01:00
Denys Vlasenko
385b4562e3
udhcp: cosmetic cleanups; one case of s/full_read/xread/
...
function old new delta
dumpleases_main 632 623 -9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 10:09:34 +01:00
Denys Vlasenko
a8f6b99987
udhcp: move options.c to common.c; disable unused bool and s16 option code
...
function old new delta
udhcp_add_binary_option - 94 +94
udhcp_str2nip - 42 +42
len_of_option_as_string 12 10 -2
dhcp_option_lengths 12 10 -2
udhcpc_main 2859 2851 -8
read_nip 42 - -42
xmalloc_optname_optval 590 536 -54
udhcp_str2optset 443 366 -77
udhcp_add_option_string 86 - -86
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 0/5 up/down: 136/-271) Total: -135 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 08:35:24 +01:00
Denys Vlasenko
7e6add1dfc
udhcpc: add -x OPT:VAL option
...
function old new delta
udhcp_str2optset - 443 +443
add_client_options - 160 +160
udhcpc_main 2753 2857 +104
packed_usage 26670 26689 +19
attach_option 380 385 +5
udhcpd_main 1964 1965 +1
udhcp_add_option_string 94 86 -8
add_param_req_option 128 - -128
read_opt 443 - -443
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/1 up/down: 732/-579) Total: 153 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-25 20:32:38 +01:00
Denys Vlasenko
6ef8def7cf
udhcp: remove two unused fields
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 02:17:52 +01:00
Denys Vlasenko
2e7aa92836
udhcp: tweak udhcpd.conf example and comments. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 02:22:07 +01:00
Denys Vlasenko
8a7c166ab9
udhcp: move serverpacket.c into dhcpd.c, no other changes
...
function old new delta
udhcpd_main 1480 1956 +476
send_inform 83 - -83
send_offer 376 - -376
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 1/0 up/down: 476/-459) Total: 17 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 03:48:11 +01:00
Denys Vlasenko
2f14263c40
udhcp[cd]: fix aliasing warnings
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-05 15:35:05 +01:00
Denys Vlasenko
95cc814dbd
udhcpd: fix a bug in add_lease where it was reading at [-1]
...
It is not correct when we read lease file!
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-07 14:59:30 +02:00
Denys Vlasenko
799d00e84c
udhcp: convert old-style logging in print_static_leases
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 13:44:04 +02:00
Denys Vlasenko
6947d2c7e1
udhcp: logging improvements, field and variable renames
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 13:24:03 +02:00
Denys Vlasenko
31af3d5a1d
udhcp: shorten mac len from 16 to 6 in lease file
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 11:57:09 +02:00
Denys Vlasenko
ac906fa85e
udhcp: change UDHCP_DEBUG into int, make verbosity selectable with -v
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17 11:54:52 +02:00
Denys Vlasenko
ed8982bfc0
udhcp: add a few TODOs
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 12:05:21 +02:00
Denys Vlasenko
26918dd28e
udhcp: rename server/client_config.arp to server_mac and client_mac
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 12:04:23 +02:00
Denys Vlasenko
cab3a0127c
udhcp: cleanup of static lease handling
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 12:03:12 +02:00
Denys Vlasenko
56f2d06c64
udhcp: rename sprintip to sprint_nip, siaddr to siaddr_nip
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 10:25:35 +02:00
Denys Vlasenko
990a617edf
udhcp: rename giaddr to gateway_nip and server to server_nip
...
"nip" stands for "IP in network order"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 10:23:55 +02:00
Denys Vlasenko
1d924f59b1
udhcp: rename fields in struct dhcpOfferedAddr
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 10:23:01 +02:00
Denys Vlasenko
47f2d7ef7d
udhcpd: don't fail ARP check if returned MAC matches client's one
...
Also, do not unicast replies to yiaddr.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16 10:20:27 +02:00
Denis Vlasenko
f81e8dbc74
*: make "pragma GCC visibility push(hidden)" less ugly
2009-04-09 12:35:13 +00:00
Denis Vlasenko
bd79c3d337
dhcpd: remember and record hostnames; optimize get_option
...
dumpleases: show hostnames
function old new delta
add_lease 230 292 +62
send_offer 403 421 +18
send_ACK 232 249 +17
read_leases 249 258 +9
dumpleases_main 604 609 +5
nobody_responds_to_arp 84 86 +2
udhcp_end_option 32 30 -2
udhcp_get_option 222 171 -51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/2 up/down: 113/-53) Total: 60 bytes
2009-04-01 12:36:09 +00:00
Denis Vlasenko
0416e3dde1
udhcpd: disable opton to have absolute lease times in lease file
...
(that does not work with dumpleases)
dumpleases: fix -a option.
networking/udhcp/*: code shrink, more compact static leases struture,
better comments, etc
function old new delta
find_free_or_expired_address - 147 +147
nobody_responds_to_arp - 84 +84
read_opt 781 830 +49
dumpleases_main 435 447 +12
send_ACK 229 232 +3
read_staticlease 90 93 +3
addStaticLease 60 61 +1
getIpByMac 46 43 -3
reservedIp 31 20 -11
keywords 304 288 -16
send_offer 428 403 -25
write_leases 225 193 -32
read_leases 184 143 -41
read_yn 64 - -64
find_address 191 - -191
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 5/6 up/down: 299/-383) Total: -84 bytes
2009-01-01 17:52:09 +00:00
Denis Vlasenko
f1980f67d3
dhcp: add FAST_FUNC as appropriate. -160 bytes.
2008-09-26 09:34:59 +00:00
Denis Vlasenko
6de8994440
udhcpc: regularize the names of receiving functions,
...
pause on "serious failure to receive".
Some misc fixes are also folded in here.
2008-05-21 07:05:06 +00:00
Denis Vlasenko
98636eb08c
Use intra-DSO calls when we build libbusybox. No-op for normal build.
...
This was Bernhard Fischer' idea.
text data bss dec hex filename
773549 7781 9740 791070 c121e busybox.t7/0_lib/libbusybox.so.1.11.0.svn_unstripped
769683 7397 9740 786820 c0184 busybox.t9t/0_lib/libbusybox.so.1.11.0.svn_unstripped
2008-05-09 17:59:34 +00:00
Denis Vlasenko
027271e5a9
udhcp: fix wrong order of args here: index_in_strings(opt, dhcp_option_strings);
...
code shrink while at it:
function old new delta
read_config 406 323 -83
2008-03-20 12:47:01 +00:00
Denis Vlasenko
84da0bf475
udhcp: make paths configurable
...
syslogd: trivial build fix
2008-02-20 22:29:52 +00:00
Denis Vlasenko
b386c1c614
udhcp: ifdef out unused members
2008-02-04 13:23:53 +00:00
Denis Vlasenko
d55fe3e595
udhcp: optional support for non-standard DHCP ports (+300 bytes when selected)
2008-02-04 13:12:16 +00:00
Denis Vlasenko
b539c8452f
dhcp: heed TODO item - divorced options from their string descriptions
...
code shrink while at it.
function old new delta
dhcp_option_strings - 258 +258
udhcp_run_script 1135 1174 +39
dhcp_option_lengths - 11 +11
udhcp_add_simple_option 93 92 -1
packet_num 4 - -4
read_opt 746 739 -7
udhcp_option_lengths 11 - -11
udhcpc_main 2590 2494 -96
dhcp_options 490 70 -420
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/4 up/down: 308/-539) Total: -231 bytes
text data bss dec hex filename
775309 929 9100 785338 bfbba busybox_old
775098 929 9084 785111 bfad7 busybox_unstripped
2007-11-29 08:17:45 +00:00
Denis Vlasenko
deabacdf91
move udhcp_{client/server}_config to common_bufsiz1
...
udhcp_run_script 1108 1151 +43
init_packet 209 210 +1
udhcpc_main 2395 2393 -2
udhcp_client_config 56 - -56
udhcp_server_config 88 - -88
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/1 up/down: 44/-146) Total: -102 bytes
text data bss dec hex filename
771326 1029 9696 782051 beee3 busybox_old
771383 1029 9552 781964 bee8c busybox_unstripped
2007-09-30 17:55:43 +00:00
Denis Vlasenko
42b3dea9bf
udhcp: many small fixes:
...
* arpping(): smaller and even probably fixed
* lots of variables/params converted: ulong -> uint32_t
* uptime() nuked in favor of monotonic_sec()
* udhcp_get_packet(): only one "bad vendor", simplify
function old new delta
reservedIp 36 35 -1
udhcpc_main 2462 2460 -2
addStaticLease 64 62 -2
static.broken_vendors 16 - -16
uptime 19 - -19
udhcpd_main 1273 1238 -35
udhcp_get_packet 223 184 -39
.rodata 144162 144106 -56
arpping 690 609 -81
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/7 up/down: 0/-251) Total: -251 bytes
text data bss dec hex filename
734241 3028 14400 751669 b7835 busybox_old
734005 3028 14400 751433 b7749 busybox_unstripped
2007-07-03 15:47:50 +00:00
Denis Vlasenko
c82b5108e1
udhcp: new config option "Rewrite the lease file at every new acknowledge"
...
(Mats Erik Andersson <mats@blue2net.com> (Blue2Net AB))
udhcp: consistently treat server_config.start/end IPs as host-order
fix IP parsing for 64bit machines
fix unsafe hton macro usage in read_opt()
do not chdir("/") when daemonizing
fix help text
2007-07-01 17:05:57 +00:00
Denis Vlasenko
fbd2918f5c
udhcp: MAC_BCAST_ADDR and blank_chaddr are in fact constant, move to rodata.
...
a few global variables reduced to smallints
function old new delta
add_lease 75 227 +152
static.blank_chaddr - 16 +16
MAC_BCAST_ADDR - 6 +6
sockfd 4 8 +4
udhcp_run_script 1153 1155 +2
state 8 5 -3
listen_mode 4 1 -3
perform_release 152 148 -4
fd 8 4 -4
blank_chaddr 16 - -16
udhcpc_main 2518 2497 -21
.rodata 131864 131832 -32
oldest_expired_lease 61 - -61
clear_lease 127 - -127
------------------------------------------------------------------------------
(add/remove: 2/3 grow/shrink: 3/6 up/down: 180/-271) Total: -91 bytes
2007-04-07 01:05:47 +00:00
Denis Vlasenko
5a3395bc01
udhcp: fix indentation and style.
...
Eliminate (group) a lot of smallish *.h files
Remove lots of unneeded #includes
2006-11-18 19:51:32 +00:00
"Robert P. J. Day"
63fc1a9e08
Standardize on the vi editing directives being on the first line.
2006-07-02 19:47:05 +00:00
Rob Landley
3f78561d63
My first bout of untangling udhcp. Make lots of gratuitous #defines go
...
away, substitutie BB_VER for an external VERSION, use busybox CONFIG symbols
rather than checking for them then defining others, etc. Lots more cleanup
to do...
2006-05-28 01:06:36 +00:00
Mike Frysinger
7031f62d9b
add back in udhcp support
2006-05-08 03:20:50 +00:00
Mike Frysinger
787140df39
remove in place of external link
2006-03-23 23:44:29 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Mike Frysinger
d824853de3
merge from udhcp module
2004-12-06 14:59:45 +00:00
Eric Andersen
abf58d6ba5
Wade Berrier writes:
...
Hello,
Here's a patch for a first attempt at static leases for udhcpd.
Included in the tarball are 2 files (static_leases.c, static_leases.h)
and a patch against the latest cvs.
In the config file you can configure static leases with the following
format:
static_lease 00:60:08:11:CE:4E 192.168.0.54
static_lease 00:60:08:11:CE:3E 192.168.0.44
Comments/suggestions/improvements are welcome.
Wade
2004-10-08 08:49:26 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Eric Andersen
ad95373efc
Use standard C99 types
2004-01-30 23:45:53 +00:00
Russ Dill
8b3845106a
why the complication of a static string rather than a define? gcc isn't dumb
2003-12-16 02:30:53 +00:00
Glenn L McGrath
24833430bc
Vodz, last_patch_88
2003-06-10 17:22:49 +00:00
Russ Dill
da970859da
version number oops
2002-11-05 20:10:21 +00:00
Russ Dill
61fb48930f
added full udhcp integration
2002-10-14 21:41:28 +00:00