Commit Graph

24 Commits

Author SHA1 Message Date
Denis Vlasenko
551ffdccea more of pointless whitespace fixes 2009-04-01 19:48:05 +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
db12d1d733 Fix forgotten license comments 2008-12-07 00:52:58 +00:00
Denis Vlasenko
f1980f67d3 dhcp: add FAST_FUNC as appropriate. -160 bytes. 2008-09-26 09:34:59 +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
22a80d1e7d udhcpd: fix bug: s/memcmp() != 0/memcmp() == 0/
(by David Updegraff <dave@cray.com>)
2007-08-09 08:04:05 +00:00
Denis Vlasenko
49a128a156 remove accumulated stray trailing whitespace 2007-07-17 21:42:59 +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
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
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +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
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
4e864a36b6 Finish remerging busybox udhcp and udhcp. Some cleanups as well. 2003-12-18 22:25:38 +00:00
Russ Dill
76729b8c69 include headers with prototypes to make sure prototypes match 2003-12-16 20:44:15 +00:00
Glenn L McGrath
24833430bc Vodz, last_patch_88 2003-06-10 17:22:49 +00:00
Russ Dill
61fb48930f added full udhcp integration 2002-10-14 21:41:28 +00:00