summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
* introduce and use xdup2(int, int)Denis Vlasenko2007-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stop checking whether setsockopt_reuseaddr(int fd) was successful (it always is) remove second parameter (sockllen) from xmalloc_sockaddr2xxxxx functions sockaddr2str 142 156 +14 collect_blk 467 474 +7 xdup2 28 33 +5 singlemount 4456 4454 -2 print_host 214 212 -2 nslookup_main 139 137 -2 ftpgetput_main 414 412 -2 udhcpd_main 1258 1255 -3 udhcpc_main 2405 2402 -3 traceroute_main 4125 4122 -3 nc_main 1072 1069 -3 buffer_fill_and_print 76 73 -3 xmalloc_sockaddr2hostonly_noport 18 14 -4 xmalloc_sockaddr2host_noport 18 14 -4 xmalloc_sockaddr2host 15 11 -4 xmalloc_sockaddr2dotted_noport 18 14 -4 xmalloc_sockaddr2dotted 18 14 -4 wget_main 2618 2614 -4 ping_main 393 389 -4 ip_port_str 120 115 -5 dhcprelay_main 1146 1141 -5 dnsd_main 1531 1525 -6 passwd_main 1110 1102 -8 udhcp_kernel_packet 206 197 -9 udhcp_listen_socket 154 144 -10 getty_main 2576 2566 -10 setup 655 640 -15 xmove_fd 51 34 -17 dolisten 759 742 -17 tcpudpsvd_main 1866 1836 -30 startservice 339 299 -40
* if pidfile turned out to be !regular file, do not unlink it.Denis Vlasenko2007-08-151-1/+1
| | | | | It's most probably the /dev/null.
* udhcpd: add -f "foreground" and -S "syslog" optionsDenis Vlasenko2007-08-141-2/+4
| | | | | | | | | | | | | | | udhcpc: add -S "syslog" options remove CONFIG_FEATURE_UDHCP_SYSLOG function old new delta udhcpd_main 1168 1201 +33 udhcpc_main 2414 2425 +11 static.udhcpc_longopts 191 200 +9 qgravechar 112 108 -4 packed_usage 22843 22827 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 53/-20) Total: 33 bytes
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-1/+1
| | | | | | | | | 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
* udhcp: slight shrinkDenis Vlasenko2007-08-021-30/+39
| | | | | | | | | | | | | | | | | udhcpd_main 1171 1208 +37 udhcpc_main 2363 2387 +24 dhcprelay_main 1145 1146 +1 dhcprelay_stopflag 4 1 -3 dhcprelay_signal_handler 11 8 -3 client_background 46 42 -4 udhcp_read_interface 230 211 -19 udhcp_make_pidfile 76 - -76 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 3/4 up/down: 62/-105) Total: -43 bytes text data bss dec hex filename 770052 1096 11228 782376 bf028 busybox_old 769980 1096 11228 782304 befe0 busybox_unstripped
* start_stop_daemon: NOMMU fixes, round 2 by Alex Landau <landau_alex@yahoo.com>Denis Vlasenko2007-08-021-0/+2
| | | | | dhcpc: fixed "ifupdown + udhcpc_without_pidpile_creation" bug
* Replace index_in_[sub]str_array with index_in_[sub]strings,Denis Vlasenko2007-07-241-1/+1
| | | | | | | | | 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
* rework long option handling. saves ~1.2kDenis Vlasenko2007-07-231-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta tar_longopts - 222 +222 static.udhcpc_longopts - 192 +192 start_stop_daemon_longopts - 150 +150 getopt32 1045 1185 +140 static.wget_longopts - 111 +111 static.od_longopts - 105 +105 getopt_longopts - 96 +96 install_longopts - 67 +67 ipcalc_longopts - 63 +63 static.hwclock_longopts - 54 +54 ftpgetput_longopts - 52 +52 static.dumpleases_longopts - 32 +32 env_longopts - 31 +31 runparts_longopts - 30 +30 mv_longopts - 24 +24 mkdir_longopts - 19 +19 find_pair 164 180 +16 bb_null_long_options - 16 +16 setconsole_longopts - 10 +10 display_speed 91 98 +7 collect_blk 467 474 +7 show_color 4 1 -3 ls_main 913 904 -9 bb_default_long_options 16 - -16 ls_color_opt 32 10 -22 setconsole_long_options 32 - -32 arith 2077 2030 -47 mv_long_options 48 - -48 mkdir_long_options 48 - -48 env_long_options 48 - -48 static.options 248 184 -64 runparts_long_options 80 - -80 ftpgetput_long_options 96 - -96 static.hwclock_long_options 112 - -112 install_long_options 112 - -112 static.long_options 144 - -144 static.wget_long_options 160 - -160 longopts 160 - -160 static.arg_options 304 - -304 tar_long_options 320 - -320 long_options 384 - -384 ------------------------------------------------------------------------------ (add/remove: 17/15 grow/shrink: 4/5 up/down: 1444/-2209) Total: -765 bytes text data bss dec hex filename 782618 1328 11900 795846 c24c6 busybox_old 781354 1328 11900 794582 c1fd6 busybox_unstripped
* libbb: nuke BB_GETOPT_ERROR, always die if there are mutually exclusive optionsDenis Vlasenko2007-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | find_pair 164 180 +16 passwd_main 1222 1230 +8 display_speed 91 96 +5 msh_main 1335 1339 +4 qrealloc 38 36 -2 refresh 1190 1182 -8 cut_main 543 532 -11 sendCgi 1807 1794 -13 getopt32 1063 1045 -18 arith 2077 2030 -47 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/6 up/down: 33/-99) Total: -66 bytes text data bss dec hex filename 781548 1168 11900 794616 c1ff8 busybox_old 781452 1168 11900 794520 c1f98 busybox_unstripped
* udhcp: many small fixes:Denis Vlasenko2007-07-031-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+1
| | | | | | | | | | (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
* udhcpc: stop deleting our own pidfile if we daemonize.Denis Vlasenko2007-05-031-6/+14
| | | | | udhcp[cd]: stop using atexit magic fir pidfile removal.
* udhcp: MAC_BCAST_ADDR and blank_chaddr are in fact constant, move to rodata.Denis Vlasenko2007-04-071-15/+21
| | | | | | | | | | | | | | | | | | | | | | 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
* - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"Bernhard Reutner-Fischer2007-04-041-2/+2
|
* Move udhcp to new NOMMU helpers.Denis Vlasenko2007-03-261-3/+18
| | | | | | Fix server part to compile under NOMMU. Client is not compilable yet. On MMU everything compiles (and maybe even works :)
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* fix potentially misaligned 32-bit accessesDenis Vlasenko2007-01-181-3/+6
|
* - use xlisten/xsocket some more. Saves .25 kBBernhard Reutner-Fischer2006-12-191-4/+0
|
* fix support for globally disabling --long-options.Denis Vlasenko2006-11-291-1/+4
| | | | (disabling them saves ~4K on fully configured bbox)
* udhcpc: convert to getopt32Denis Vlasenko2006-11-271-153/+124
|
* udhcp: fix indentation and style.Denis Vlasenko2006-11-181-16/+1
| | | | | Eliminate (group) a lot of smallish *.h files Remove lots of unneeded #includes
* small style fixesDenis Vlasenko2006-10-121-3/+3
|
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-2/+2
|
* Yet another silly little byte saving. couldn't -> cannotDenis Vlasenko2006-09-291-1/+1
|
* several fixes from openWRT projectDenis Vlasenko2006-09-261-2/+12
|
* Build fixes for gcc 4.0 with -Werror, from Tito.Rob Landley2006-09-111-1/+1
|
* Fix (hopefully) bug 976. Need more thorough audit.Denis Vlasenko2006-09-071-6/+12
| | | | | Restore erroneously removed FEATURE_UDHCP_SYSLOG.
* Implement optional syslog logging using ordinaryDenis Vlasenko2006-09-061-21/+21
| | | | | | bb_xx_msg calls, and convert networking/* to it. The rest of bbox will be converted gradually.
* Standardize on the vi editing directives being on the first line."Robert P. J. Day"2006-07-021-0/+1
|
* Various cleanups I made while going through Erik Hovland's patch submissions,Rob Landley2006-06-251-42/+3
| | | | some of which are even from him. :)
* - reuse strings and messages. Saves about 600BBernhard Reutner-Fischer2006-06-071-1/+1
|
* My first bout of untangling udhcp. Make lots of gratuitous #defines goRob Landley2006-05-281-17/+16
| | | | | | 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...
* Consolidate #include <sys/time.h> so libbb.h does it.Rob Landley2006-05-271-1/+0
|
* add back in udhcp supportMike Frysinger2006-05-081-0/+574
|
* remove in place of external linkMike Frysinger2006-03-231-573/+0
|
* sync busybox and udhcp treesMike Frysinger2006-03-231-0/+1
|
* Roy Walker writes:Eric Andersen2006-03-201-2/+9
| | | | | | | | | | | | | | | | | Here is a patch against the current subversion repository, that makes udhcpc have an adjustable timeout. Works for both foreground and before it drops to the background. This brings it more in-line with ISC dhcpc. Use like so: udhcpc --timeout=10 ... or udhcpc -T 10 ... Still shooting for 1.1.1 this month? Would really be great if you could get this in that release. Please give credit to Paul Pacheco - ppacheco@gmail.com.
* Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)Rob Landley2006-03-011-4/+4
| | | | from before "if(x) free(x)".
* Patch from Giuseppe Ciotta to specify retry count.Rob Landley2006-02-201-3/+8
|
* fix up yet more annoying signed/unsigned and mixed type errorsEric Andersen2006-01-301-4/+4
|
* just whitespaceTim Riker2006-01-251-3/+3
|
* - add platform.h.Bernhard Reutner-Fischer2006-01-221-15/+3
| | | | - use shorter boilerplate while at it.
* more make safe the exported namespace for udhcp. Move to bb-specific file ↵"Vladimir N. Oleynik"2005-09-231-1/+1
| | | | for reduce change into udhcp-CVS
* add support for setting the dhcp vendor class option (option 60). Paul Fox2005-09-221-2/+23
| | | | | | udhcpc now has a -V (--vendorclass), which will replace the default "udhcpRELEASE" string in this option.
* allow suppression of default client-id. fixes bug 000037. allowsPaul Fox2005-08-011-3/+12
| | | | busybox to match kernel and u-boot behavior with respect to client-id.
* remove duplicate check against chaddr.Paul Fox2005-07-211-3/+0
|
* applying fix for:Paul Fox2005-07-201-0/+5
| | | | | 0000260: udhcpc doesn't validate client hardware address
* Tobias Krawutschke found a bug where the DHCP client would accept packetsRob Landley2005-05-261-0/+3
| | | | | with the wrong ARP address, meaning we could easily get somebody else's IP. That is a bad thing, and this is the minimal two-line fix.
* Revert the uptime() removal. Let the list sort it out...Rob Landley2005-05-041-2/+2
|