summaryrefslogtreecommitdiff
path: root/sbin/dhclient/dhcpd.h
AgeCommit message (Collapse)Author
2007-02-25remove unused/dangling prototypes and comment reference;Kevin Steves
from Mark Lumsden
2007-01-27We only poll on the bpf fd and the routing socket fd. No need forKenneth R Westerback
complex list code to keep track. So nuke it. Also eliminate unnecessary variable ('dead') that means 'rfdesc is closed'. Just set rfdesc to -1 when it is closed and use that. As suggested by millert@ and claudio@, don't bother setting revents members to zero since poll() does that. Np functional change, just less code. 'looks good' claudio@ 'I like where this is going' henning@
2007-01-25Cleanup some more code. Eliminate dhcp(), bootp(), parse_options() byKenneth R Westerback
moving the minimal code into do_packet(). Eliminate repeated code for checking the client hardware address and the reject list by putting those checks into do_packet as well. No functional change, just much easier to read. ok stevesk@
2007-01-16More cleanup. Eliminate 'struct packet' by cleverly passing asKenneth R Westerback
parameters just those things actually needed and using existing structs and information. No functional change. ok stevesk@
2007-01-11Since bootp_packet_handler is always set to do_packet before weKenneth R Westerback
process any packets, eliminate that abstraction and just call do_packet directly. No functional change. ok stevesk
2007-01-04Eliminate the 'len' parameter from send_packet() since it alwaysKenneth R Westerback
contains the global value client->packet_length. Use client->packet_length. No functional change. Suggested by stevesk@.
2007-01-04Another round of cleanup. There is only one instance of structKenneth R Westerback
dhcp_packet and it is contained in the global *client. So don't pass around pointers to a struct that contains a pointer to the dhcp_packet instance. Just use the global client->packet. Eliminate unused struct packet members and parameter lists accordingly. No functional change. Suggestions by stevesk@. ok stevesk@
2007-01-04<sys/un.h> not neededKevin Steves
2006-12-27Since we only have the single global struct interface_info, weKenneth R Westerback
obviously have single global struct client_state and struct client_config nested inside interface_info and client_state respectively. Pull them out to their own global variables and eliminate a bunch (i.e. hundreds) of multi-level dereferences. Make it much nicer to read. No functional change. "makes sense" henning@ Testing stevesk@, ok stevesk@
2006-12-26Our dhclient only handles one interface. Simplify code by using theKenneth R Westerback
single, global, instance of 'struct interface_info' (ifi) rather than passing around pointers to it. "I agree" henning@ Testing moritz@ stevesk@, ok stevesk@
2006-12-22delete prototypes for functions that don't existKevin Steves
2006-12-16make /sbin/dhclient-script consistent with other paths; ok henning@Kevin Steves
2006-11-27Recognize when we are sending to a unicast destination IP address andKevin Steves
instead of using BPF, which currently will always set the destination MAC to broadcast, send using a SOCK_RAW socket and sendmsg() so the frame has a unicast destination MAC. Fixes an issue when using a bootp forwarder where unicast DHCPREQUESTs are dropped at the router/gateway until we reach T2/REBINDING and change the destination IP to broadcast. ok henning@ (but doesn't like using a raw socket for this)
2006-11-27remove invalid commentKevin Steves
2006-11-21remove unused #defines, no binary change; ok henning@Kevin Steves
2006-11-21re-order includes and eliminate duplicates, no binary change; ok henning@Kevin Steves
2006-08-29some net if devices do not media negotiate (for link) until brought up.Theo de Raadt
(for some drivers, this is a bug. for others, it is part of how they work) therefore before doing the 10-second link test, we must bring the if up. ok krw, tested marco ckuethe
2006-05-08add 'link-timeout n' seconds option to grammer, from fkr@hazardous.orgTheo de Raadt
default remains 10 seconds.
2005-08-05remove duplicate privsep prototypes and put allMoritz Jodeit
of them into privsep.h. ok krw@ henning@
2005-08-02Rip out code dealing with multiple/nested interfaces. Each instance ofKenneth R Westerback
dhclient is responsible for one interface. Simply skip interface declarations for other interfaces and store all info in the one interface structure. tested by dlg@, ok henning@
2005-07-17Insist on correct hardware addresses in dhclient.conf andKenneth R Westerback
dhclient.leases.<if> files. Simplify parse_numeric_aggregate() as a result, rendering tree.c and tree.h redundant. ok millert@
2005-07-16Rejig struct string_list to use char array rather than char pointer, andKenneth R Westerback
eliminate new_parse_string. alloc.c becomes redundant. Junk a couple of unused fields (env, envc) in struct client_state. suggestions by & ok millert@
2005-07-16Eliminate unnecessary 'code' field from struct option. MakeKenneth R Westerback
dhcp_options const. ok henning@
2005-07-13Repair/rationalize option handling to ensure valid option section isKenneth R Westerback
always sent. Fold store_options into cons_options. Eliminate priority list of options. ok deraadt@
2005-07-11Expunge unused hashing code and variables.Kenneth R Westerback
2005-07-09Clean out a few more unused/uninitialized variables.Kenneth R Westerback
ok millert@
2005-07-09Clean out a few more unused/uninitialized variables.Kenneth R Westerback
ok henning@
2005-07-09Since we never add more than the default dhcp_universe, expunge theKenneth R Westerback
code to handle mulitple 'vendor' universes. Don't bother with a specific error message about 'vendor'. An unsupported option is an unsupported option, and a '.' in an option name is a syntax error. ok henning@
2005-07-08More dead and moribund code removal/cleanup. This time unused parametersKenneth R Westerback
and associated code for store_options(). ok henning@
2005-07-08Eliminate unused code and associated parameters.Kenneth R Westerback
ok deraadt@
2005-07-07Eliminate unused code and associated parameter.Kenneth R Westerback
ok deraadt@ millert@.
2005-07-07Eliminate tree_cache structure in favour of option_data. EliminateKenneth R Westerback
redundant level of indirection in building and using option_data arrays while constructing outgoing packets. Make option_data len field unsigned. ok henning@. 'cool!' deraadt@.
2004-05-06remove more unused codeTheo de Raadt
2004-05-04do not overload libc function names causing linker troublesMichael Shalayeff
2004-05-04remove things not used, spotted by lint mostly; ok henningTheo de Raadt
2004-05-04more shrink and lint fixes; henning okTheo de Raadt
2004-05-04privilege seperate dhclient.Henning Brauer
the privileged child's duty is the dhclient-script env setup & exection. the parent process now chroots to /var/empty and drops privileges to _dhcp mostly hacked at vancouver airport with some feedback from krw@ and otto@, tested to not break installs by krw@
2004-04-14get rif of the few dmalloc/dfree occurances that were leftHenning Brauer
2004-04-14turns out more is obsolete nowHenning Brauer
inspired by diff from Emil Mikulic <emikulic@dmr.ath.cx>
2004-03-05remove even more gooTheo de Raadt
2004-03-02more pruning; henning okTheo de Raadt
2004-03-02zap interface flagsHenning Brauer
2004-03-02we deal with one interface at a time, so remove the interface list gunk.Henning Brauer
2004-03-02remove dummy_interfaces and fallback_interface gunkHenning Brauer
2004-03-02our interface discovery is so quiet now (nonexistant) that we don't need aHenning Brauer
quiet_interface_discovery flag any more
2004-03-02since we're dealing with one interface and not quite a few ones we can giveHenning Brauer
this one onterface as parameter to discove_interfaces and get rid of quite some of the multiple-interface-discover logic
2004-02-25doesn't quite make sense to have a wrapper to a wrapper to the incredibleHenning Brauer
amount of ~ 20 lines of code in their own file... and another one bites the dust
2004-02-24whack unused token ring code and a few empty functionsHenning Brauer
2004-02-24zap more unused crapHenning Brauer
2004-02-24get rid of tons of structs we never use, a lot of new_someotherjunk functionsHenning Brauer
in alloc.c we never call, and a shitload of genius comments like char *script_name; /* name of script */ char *server_name; /* name of server */ etc etc etc...