aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpd.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dhcp: merge leases.c and static_leases.c into dhcpd.cDenys Vlasenko2016-10-041-14/+0
| | | | | | | | | | | | | | function old new delta send_offer 292 461 +169 udhcpd_main 1531 1588 +57 read_leases 330 332 +2 add_lease 314 312 -2 find_lease_by_mac 68 - -68 find_free_or_expired_nip 174 - -174 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 3/1 up/down: 228/-244) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dhcp: merge most of static_leases.c into dhcpd.cDenys Vlasenko2016-10-041-13/+0
| | | | | | | | | | | function old new delta read_staticlease 121 222 +101 add_static_lease 48 - -48 log_static_leases 68 - -68 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 1/0 up/down: 101/-116) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dhcp: merge files.c into dhcpd.cDenys Vlasenko2016-10-041-6/+0
| | | | | | | | | Added NOINLINE to two function, since my version of gcc would actualy increase code size otherwise. I see no size changes. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: add option for tweaking arppingMichel Stam2014-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some clients have a very short timeout for sending the DHCP DISCOVER, shorter than the arpping timeout of 2000 milliseconds that udhcpd uses by default. This patch allows tweaking the timeout, or disabling of arpping altogether, at the risk of handing out addresses which are already in use. function old new delta udhcpd_main 1460 1501 +41 udhcpc_main 2814 2851 +37 packed_usage 29957 29974 +17 arpping 477 493 +16 find_free_or_expired_nip 161 174 +13 send_offer 285 292 +7 nobody_responds_to_arp 85 89 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/0 up/down: 135/0) Total: 135 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc6: fix port numbers used if !FEATURE_UDHCP_PORTDenys Vlasenko2013-01-281-2/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | 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>
* dumpleases: better help textDenys Vlasenko2010-03-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: cosmetic cleanups; one case of s/full_read/xread/Denys Vlasenko2010-03-261-7/+3
| | | | | | | function old new delta dumpleases_main 632 623 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: move options.c to common.c; disable unused bool and s16 option codeDenys Vlasenko2010-03-261-1/+0
| | | | | | | | | | | | | | | | | 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>
* udhcpc: add -x OPT:VAL optionDenys Vlasenko2010-03-251-5/+0
| | | | | | | | | | | | | | | | | 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>
* udhcp: remove two unused fieldsDenys Vlasenko2010-03-231-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: tweak udhcpd.conf example and comments. no code changesDenys Vlasenko2010-03-211-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: move serverpacket.c into dhcpd.c, no other changesDenys Vlasenko2010-03-201-8/+0
| | | | | | | | | | | 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>
* udhcp[cd]: fix aliasing warningsDenys Vlasenko2010-02-051-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: fix a bug in add_lease where it was reading at [-1]Denys Vlasenko2009-07-071-2/+3
| | | | | | It is not correct when we read lease file! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: convert old-style logging in print_static_leasesDenys Vlasenko2009-06-171-10/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: logging improvements, field and variable renamesDenys Vlasenko2009-06-171-10/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: shorten mac len from 16 to 6 in lease fileDenys Vlasenko2009-06-171-17/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: change UDHCP_DEBUG into int, make verbosity selectable with -vDenys Vlasenko2009-06-171-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: add a few TODOsDenys Vlasenko2009-06-161-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: rename server/client_config.arp to server_mac and client_macDenys Vlasenko2009-06-161-9/+15
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: cleanup of static lease handlingDenys Vlasenko2009-06-161-9/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: rename sprintip to sprint_nip, siaddr to siaddr_nipDenys Vlasenko2009-06-161-10/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: rename giaddr to gateway_nip and server to server_nipDenys Vlasenko2009-06-161-1/+1
| | | | | | "nip" stands for "IP in network order" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: rename fields in struct dhcpOfferedAddrDenys Vlasenko2009-06-161-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: don't fail ARP check if returned MAC matches client's oneDenys Vlasenko2009-06-161-1/+1
| | | | | | Also, do not unicast replies to yiaddr. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make "pragma GCC visibility push(hidden)" less uglyDenis Vlasenko2009-04-091-9/+4
|
* dhcpd: remember and record hostnames; optimize get_optionDenis Vlasenko2009-04-011-3/+7
| | | | | | | | | | | | | | | | | 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
* udhcpd: disable opton to have absolute lease times in lease fileDenis Vlasenko2009-01-011-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* dhcp: add FAST_FUNC as appropriate. -160 bytes.Denis Vlasenko2008-09-261-17/+17
|
* udhcpc: regularize the names of receiving functions,Denis Vlasenko2008-05-211-3/+3
| | | | | | pause on "serious failure to receive". Some misc fixes are also folded in here.
* Use intra-DSO calls when we build libbusybox. No-op for normal build.Denis Vlasenko2008-05-091-0/+8
| | | | | | | | | 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
* udhcp: fix wrong order of args here: index_in_strings(opt, dhcp_option_strings);Denis Vlasenko2008-03-201-1/+1
| | | | | | | | code shrink while at it: function old new delta read_config 406 323 -83
* udhcp: make paths configurableDenis Vlasenko2008-02-201-1/+1
| | | | | syslogd: trivial build fix
* udhcp: ifdef out unused membersDenis Vlasenko2008-02-041-0/+2
|
* udhcp: optional support for non-standard DHCP ports (+300 bytes when selected)Denis Vlasenko2008-02-041-0/+9
|
* dhcp: heed TODO item - divorced options from their string descriptionsDenis Vlasenko2007-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* move udhcp_{client/server}_config to common_bufsiz1Denis Vlasenko2007-09-301-1/+2
| | | | | | | | | | | | | | | 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
* udhcp: many small fixes:Denis Vlasenko2007-07-031-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* udhcp: new config option "Rewrite the lease file at every new acknowledge"Denis Vlasenko2007-07-011-12/+6
| | | | | | | | | | (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
* udhcp: MAC_BCAST_ADDR and blank_chaddr are in fact constant, move to rodata.Denis Vlasenko2007-04-071-81/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* udhcp: fix indentation and style.Denis Vlasenko2006-11-181-6/+55
| | | | | Eliminate (group) a lot of smallish *.h files Remove lots of unneeded #includes
* Standardize on the vi editing directives being on the first line."Robert P. J. Day"2006-07-021-0/+1
|
* My first bout of untangling udhcp. Make lots of gratuitous #defines goRob Landley2006-05-281-1/+0
| | | | | | 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...
* add back in udhcp supportMike Frysinger2006-05-081-0/+141
|
* remove in place of external linkMike Frysinger2006-03-231-141/+0
|
* just whitespaceTim Riker2006-01-251-11/+11
|
* merge from udhcp moduleMike Frysinger2004-12-061-0/+1
|
* Wade Berrier writes:Eric Andersen2004-10-081-0/+7
| | | | | | | | | | | | | | | | | | | 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