diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-03 15:47:50 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-07-03 15:47:50 +0000 |
commit | 42b3dea9bfb8ac595c71089ee23012f44dd43eb2 (patch) | |
tree | b7b86d06a574d2af72bc79536d399905b5619959 /networking/udhcp/dhcpd.h | |
parent | 54e19da86d5496ec5f5787b85a2b6342be1d63d4 (diff) | |
download | busybox-w32-42b3dea9bfb8ac595c71089ee23012f44dd43eb2.tar.gz busybox-w32-42b3dea9bfb8ac595c71089ee23012f44dd43eb2.tar.bz2 busybox-w32-42b3dea9bfb8ac595c71089ee23012f44dd43eb2.zip |
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
Diffstat (limited to 'networking/udhcp/dhcpd.h')
-rw-r--r-- | networking/udhcp/dhcpd.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h index 05e3cf004..fc6b1d6ab 100644 --- a/networking/udhcp/dhcpd.h +++ b/networking/udhcp/dhcpd.h | |||
@@ -20,37 +20,37 @@ struct option_set { | |||
20 | }; | 20 | }; |
21 | 21 | ||
22 | struct static_lease { | 22 | struct static_lease { |
23 | struct static_lease *next; | ||
23 | uint8_t *mac; | 24 | uint8_t *mac; |
24 | uint32_t *ip; | 25 | uint32_t *ip; |
25 | struct static_lease *next; | ||
26 | }; | 26 | }; |
27 | 27 | ||
28 | struct server_config_t { | 28 | struct server_config_t { |
29 | uint32_t server; /* Our IP, in network order */ | 29 | uint32_t server; /* Our IP, in network order */ |
30 | /* start,end are in host order: we need to compare start <= ip <= end */ | 30 | /* start,end are in host order: we need to compare start <= ip <= end */ |
31 | uint32_t start_ip; /* Start address of leases, in host order */ | 31 | uint32_t start_ip; /* Start address of leases, in host order */ |
32 | uint32_t end_ip; /* End of leases, in host order */ | 32 | uint32_t end_ip; /* End of leases, in host order */ |
33 | struct option_set *options; /* List of DHCP options loaded from the config file */ | 33 | struct option_set *options; /* List of DHCP options loaded from the config file */ |
34 | char *interface; /* The name of the interface to use */ | 34 | char *interface; /* The name of the interface to use */ |
35 | int ifindex; /* Index number of the interface to use */ | 35 | int ifindex; /* Index number of the interface to use */ |
36 | uint8_t arp[6]; /* Our arp address */ | 36 | uint8_t arp[6]; /* Our arp address */ |
37 | char remaining; /* should the lease file be interpreted as lease time remaining, or | 37 | char remaining; /* should the lease file be interpreted as lease time remaining, or |
38 | * as the time the lease expires */ | 38 | * as the time the lease expires */ |
39 | unsigned long lease; /* lease time in seconds (host order) */ | 39 | uint32_t lease; /* lease time in seconds (host order) */ |
40 | unsigned long max_leases; /* maximum number of leases (including reserved address) */ | 40 | uint32_t max_leases; /* maximum number of leases (including reserved address) */ |
41 | unsigned long auto_time; /* how long should udhcpd wait before writing a config file. | 41 | uint32_t auto_time; /* how long should udhcpd wait before writing a config file. |
42 | * if this is zero, it will only write one on SIGUSR1 */ | 42 | * if this is zero, it will only write one on SIGUSR1 */ |
43 | unsigned long decline_time; /* how long an address is reserved if a client returns a | 43 | uint32_t decline_time; /* how long an address is reserved if a client returns a |
44 | * decline message */ | 44 | * decline message */ |
45 | unsigned long conflict_time; /* how long an arp conflict offender is leased for */ | 45 | uint32_t conflict_time; /* how long an arp conflict offender is leased for */ |
46 | unsigned long offer_time; /* how long an offered address is reserved */ | 46 | uint32_t offer_time; /* how long an offered address is reserved */ |
47 | unsigned long min_lease; /* minimum lease a client can request */ | 47 | uint32_t min_lease; /* minimum lease a client can request */ |
48 | char *lease_file; | 48 | char *lease_file; |
49 | char *pidfile; | 49 | char *pidfile; |
50 | char *notify_file; /* What to run whenever leases are written */ | 50 | char *notify_file; /* What to run whenever leases are written */ |
51 | uint32_t siaddr; /* next server bootp option */ | 51 | uint32_t siaddr; /* next server bootp option */ |
52 | char *sname; /* bootp server name */ | 52 | char *sname; /* bootp server name */ |
53 | char *boot_file; /* bootp boot file option */ | 53 | char *boot_file; /* bootp boot file option */ |
54 | struct static_lease *static_leases; /* List of ip/mac pairs to assign static leases */ | 54 | struct static_lease *static_leases; /* List of ip/mac pairs to assign static leases */ |
55 | }; | 55 | }; |
56 | 56 | ||