summaryrefslogtreecommitdiff
path: root/networking/udhcp/packet.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* udhcp: we were forgetting to set right op byte in tha packetDenis Vlasenko2008-02-201-6/+1
| | | | | for DHCPDECLINE. Fixing, and making code smaller.
* Makefile: change version to 1.10.0.svnDenis Vlasenko2007-12-241-32/+41
| | | | | | | | | | | udhcpc: make UDP packet sending the same as raw sending in regards to error messages. Minor code size shrink. Total size grows due to added messages: text data bss dec hex filename 770312 683 7244 778239 bdfff busybox_old 770327 683 7244 778254 be00e busybox_unstripped
* udhcp: decided to not send "short" dhcp packets,Denis Vlasenko2007-12-211-1/+6
| | | | | but lets add comments how to do it if needed.
* udhcp: fix oversized packet sending (introduced by "slack for bad dhcp ↵Denis Vlasenko2007-12-201-13/+23
| | | | | | | | | | | | | | | | | servers" options); slight optimizations and function renaming udhcp_send_raw_packet - 391 +391 udhcp_send_kernel_packet - 197 +197 udhcp_recv_packet - 134 +134 get_raw_packet 353 326 -27 udhcp_get_packet 134 - -134 udhcp_kernel_packet 197 - -197 udhcp_raw_packet 391 - -391 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 0/1 up/down: 722/-749) Total: -27 bytes
* dhcp: stop using magic constants; use (htonl(CONST) != a) - it's smallerDenis Vlasenko2007-11-231-5/+1
| | | | | | | function old new delta udhcp_get_packet 146 134 -12 get_raw_packet 368 353 -15
* introduce and use xdup2(int, int)Denis Vlasenko2007-08-181-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* udhcp: many small fixes:Denis Vlasenko2007-07-031-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | * 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: MAC_BCAST_ADDR and blank_chaddr are in fact constant, move to rodata.Denis Vlasenko2007-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* A bunch of defined(__GLIBC__) added. static-linking warning expandedDenis Vlasenko2006-12-181-1/+1
|
* introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),Denis Vlasenko2006-11-221-2/+1
| | | | | use them where appropriate. 200 bytes saved
* add compile-time check for correct DHCP packet sizeDenis Vlasenko2006-11-201-0/+4
|
* udhcp: fix indentation and style.Denis Vlasenko2006-11-181-16/+16
| | | | | Eliminate (group) a lot of smallish *.h files Remove lots of unneeded #includes
* add -Wundef, fix uncovered bugsDenis Vlasenko2006-11-171-1/+1
|
* message string changes, mostly for consistency, also -32 bytes in .rodataDenis Vlasenko2006-10-201-2/+2
|
* Implement optional syslog logging using ordinaryDenis Vlasenko2006-09-061-7/+7
| | | | | | 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
|
* Remove all usage of the "register" storage class specifier."Robert P. J. Day"2006-07-011-1/+1
|
* My first bout of untangling udhcp. Make lots of gratuitous #defines goRob Landley2006-05-281-7/+7
| | | | | | 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/+207
|
* remove in place of external linkMike Frysinger2006-03-231-207/+0
|
* sync busybox and udhcp treesMike Frysinger2006-03-231-2/+0
|
* Patch from Denis Vlasenko to constify things and fix a few typos.Rob Landley2006-02-221-3/+4
|
* Bug 751: file handle leaks can add up until available filehandles for theRob Landley2006-02-221-3/+9
| | | | process are exhausted.
* fix up yet more annoying signed/unsigned and mixed type errorsEric Andersen2006-01-301-1/+1
|
* just whitespaceTim Riker2006-01-251-4/+4
|
* Larry Doolittle writes:Eric Andersen2004-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-9/+9
|
* Use standard C99 typesEric Andersen2004-01-301-9/+9
|
* include headers with prototypes to make sure prototypes matchRuss Dill2003-12-161-0/+1
|
* Vodz, last_patch_88Glenn L McGrath2003-06-101-6/+4
|
* added full udhcp integrationRuss Dill2002-10-141-0/+203