ReactOS 0.4.16-dev-91-g764881a
|
#include <winsock2.h>
#include <iphlpapi.h>
#include "stdint.h"
#include <pshpack1.h>
#include <poppack.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "dhcp.h"
#include "tree.h"
Go to the source code of this file.
Classes | |
struct | ether_header |
struct | ip |
struct | udphdr |
struct | option_data |
struct | string_list |
struct | iaddr |
struct | iaddrlist |
struct | packet |
struct | hardware |
struct | client_lease |
struct | client_config |
struct | client_state |
struct | interface_info |
struct | timeout |
struct | protocol |
struct | hash_bucket |
struct | hash_table |
Macros | |
#define | IFNAMSIZ MAX_INTERFACE_NAME_LEN |
#define | ETH_ALEN 6 |
#define | ETHER_ADDR_LEN ETH_ALEN |
#define | IP_RF 0x8000 /* reserved fragment flag */ |
#define | IP_DF 0x4000 /* dont fragment flag */ |
#define | IP_MF 0x2000 /* more fragments flag */ |
#define | IP_OFFMASK 0x1fff /* mask for fragmenting bits */ |
#define | ETHERTYPE_IP 0x0800 |
#define | IPTOS_LOWDELAY 0x10 |
#define | ARPHRD_ETHER 1 |
#define | SIZE_T_MAX 1600 |
#define | USE_SOCKET_RECEIVE |
#define | USE_SOCKET_SEND |
#define | LOCAL_PORT 68 |
#define | REMOTE_PORT 67 |
#define | DEFAULT_HASH_SIZE 97 |
#define | _PATH_DHCLIENT_CONF "/etc/dhclient.conf" |
#define | _PATH_DHCLIENT_DB "/var/db/dhclient.leases" |
#define | DHCPD_LOG_FACILITY LOG_DAEMON |
#define | MAX_TIME 0x7fffffff |
#define | MIN_TIME 0 |
Enumerations | |
enum | dhcp_state { S_REBOOTING , S_INIT , S_SELECTING , S_REQUESTING , S_BOUND , S_RENEWING , S_REBINDING , S_STATIC } |
#define DHCPD_LOG_FACILITY LOG_DAEMON |
#define IFNAMSIZ MAX_INTERFACE_NAME_LEN |
#define LOCAL_PORT 68 |
Enumerator | |
---|---|
S_REBOOTING | |
S_INIT | |
S_SELECTING | |
S_REQUESTING | |
S_BOUND | |
S_RENEWING | |
S_REBINDING | |
S_STATIC |
Definition at line 170 of file dhcpd.h.
Definition at line 82 of file hash.c.
Referenced by assign_file_addresses(), assign_inodes(), compute_linkcount(), and initialize_universes().
Definition at line 342 of file dispatch.c.
Referenced by AdapterDiscoveryThread(), DSLeaseIpAddress(), and DSRenewIpAddressLease().
Definition at line 253 of file dispatch.c.
Referenced by bind_lease(), dhcpoffer(), send_discover(), and send_request().
void assemble_ethernet_header | ( | struct interface_info * | , |
unsigned char * | , | ||
int * | , | ||
struct hardware * | |||
) |
void assemble_udp_ip_header | ( | unsigned char * | , |
int * | , | ||
u_int32_t | , | ||
u_int32_t | , | ||
unsigned int | , | ||
unsigned char * | , | ||
int | |||
) |
void bind_lease | ( | struct interface_info * | ip | ) |
Definition at line 580 of file dhclient.c.
Referenced by dhcpack(), and state_selecting().
Definition at line 654 of file dhclient.c.
Referenced by do_packet().
Definition at line 167 of file util.c.
Referenced by priv_script_write_params().
Referenced by LoadCentralDirectoryRecord().
Definition at line 316 of file dispatch.c.
Referenced by dhcpack(), dhcpnak(), dhcpoffer(), send_request(), and state_selecting().
Definition at line 57 of file tree.c.
Referenced by xmlParseConditionalSections(), xmlParseContentInternal(), xmlParseExternalSubset(), xmlParseInternalSubset(), and xmlParseStartTag2().
int cons_options | ( | struct packet * | inpacket, |
struct dhcp_packet * | outpacket, | ||
int | mms, | ||
struct tree_cache ** | options | ||
) |
Definition at line 199 of file options.c.
Referenced by make_decline(), make_discover(), and make_request().
ssize_t decode_ethernet_header | ( | struct interface_info * | , |
unsigned char * | , | ||
int | , | ||
struct hardware * | |||
) |
ssize_t decode_udp_ip_header | ( | unsigned char * | , |
int | , | ||
struct sockaddr_in * | , | ||
unsigned char * | , | ||
int | |||
) |
Definition at line 79 of file alloc.c.
Referenced by do_host_lookup(), free_hash_bucket(), tree_concat(), and tree_evaluate().
Definition at line 674 of file dhclient.c.
Referenced by do_packet().
int dhcp_option_ev_name | ( | char * | buf, |
size_t | buflen, | ||
struct dhcp_option * | option | ||
) |
Definition at line 1767 of file dhclient.c.
Referenced by priv_script_write_params().
Definition at line 316 of file dhclient.c.
Referenced by dhcp().
Definition at line 915 of file dhclient.c.
Referenced by dhcp().
Definition at line 710 of file dhclient.c.
void discover_interfaces | ( | struct interface_info * | ) |
Definition at line 70 of file dispatch.c.
Referenced by create_database(), create_list(), create_view(), CxxHandleV8Frame(), database_invoke(), ICreateTypeInfo2_fnSetTypeFlags(), init_test_dispatch(), InstallerImpl_OpenDatabase(), InstallerImpl_OpenPackage(), InstallerImpl_Products(), InstallerImpl_RelatedProducts(), InstallerImpl_SummaryInformation(), main(), run_script(), ServiceMain(), session_invoke(), svc_create(), svc_reg(), svc_tp_create(), test_CreateTypeLib(), test_IConnectionPoint(), test_IWinHttpRequest_Invoke(), test_ParseDisplayName(), test_recinfo(), test_VarCat(), and test_VarUI1FromDisp().
void do_packet | ( | struct interface_info * | interface, |
struct dhcp_packet * | packet, | ||
int | len, | ||
unsigned int | from_port, | ||
struct iaddr | from, | ||
struct hardware * | hfrom | ||
) |
Definition at line 635 of file options.c.
Referenced by init_client().
Definition at line 128 of file uimain.c.
struct protocol * find_protocol_by_adapter | ( | struct interface_info * | info | ) |
Definition at line 412 of file dispatch.c.
Referenced by AdapterDiscoveryThread(), DSLeaseIpAddress(), DSReleaseIpAddressLease(), DSRenewIpAddressLease(), DSStaticRefreshParams(), and IsReconnectHackNeeded().
void free_client_lease | ( | struct client_lease * | lease | ) |
Definition at line 1515 of file dhclient.c.
Referenced by bind_lease(), dhcpnak(), packet_to_lease(), and state_selecting().
void free_hash_bucket | ( | struct hash_bucket * | ptr, |
char * | name | ||
) |
Definition at line 89 of file alloc.c.
Referenced by delete_hash_entry().
Definition at line 88 of file util.c.
Referenced by cons_options(), and pretty_print_option().
Definition at line 194 of file dispatch.c.
Referenced by AdapterDiscoveryThread(), dispatch(), DSLeaseIpAddress(), DSRenewIpAddressLease(), and slurpstring().
int if_register_bpf | ( | struct interface_info * | ) |
void if_register_receive | ( | struct interface_info * | ip | ) |
void if_register_send | ( | struct interface_info * | ip | ) |
Definition at line 424 of file dispatch.c.
struct interface_info * interface_or_dummy | ( | char * | ) |
void make_client_config | ( | struct interface_info * | , |
struct client_config * | |||
) |
void make_client_state | ( | struct interface_info * | ) |
void make_decline | ( | struct interface_info * | ip, |
struct client_lease * | lease | ||
) |
Definition at line 1441 of file dhclient.c.
void make_discover | ( | struct interface_info * | ip, |
struct client_lease * | lease | ||
) |
Definition at line 1256 of file dhclient.c.
Referenced by state_init().
void make_request | ( | struct interface_info * | ip, |
struct client_lease * | lease | ||
) |
Definition at line 1339 of file dhclient.c.
Referenced by state_bound(), state_reboot(), and state_selecting().
struct hash_table * new_hash | ( | void | ) |
Definition at line 53 of file hash.c.
Referenced by initialize_universes(), and test_put_hash().
struct hash_bucket * new_hash_bucket | ( | void | ) |
struct hash_table * new_hash_table | ( | int | count | ) |
struct string_list * new_string_list | ( | size_t | size | ) |
Referenced by get_token(), and wcstok_s().
struct client_lease * packet_to_lease | ( | struct packet * | packet | ) |
Definition at line 829 of file dhclient.c.
Referenced by dhcpack(), and dhcpoffer().
void parse_client_lease_declaration | ( | FILE * | , |
struct client_lease * | , | ||
struct interface_info ** | |||
) |
void parse_client_statement | ( | FILE * | , |
struct interface_info * | , | ||
struct client_config * | |||
) |
void parse_interface_declaration | ( | FILE * | , |
struct client_config * | |||
) |
struct dhcp_option * parse_option_decl | ( | FILE * | , |
struct option_data * | |||
) |
void parse_reject_statement | ( | FILE * | , |
struct client_config * | |||
) |
void parse_string_list | ( | FILE * | , |
struct string_list ** | , | ||
int | |||
) |
Definition at line 6 of file util.c.
Referenced by bind_lease(), bootp(), dhcp(), dhcpack(), dhcpnak(), dhcpoffer(), priv_script_write_params(), set_name_servers(), setup_adapter(), and write_client_lease().
char * pretty_print_option | ( | unsigned int | code, |
unsigned char * | data, | ||
int | len, | ||
int | emit_commas, | ||
int | emit_quotes | ||
) |
Definition at line 396 of file options.c.
Referenced by check_option(), priv_script_write_params(), and write_client_lease().
void priv_script_init | ( | struct interface_info * | ip, |
char * | reason, | ||
char * | medium | ||
) |
Definition at line 1621 of file dhclient.c.
void priv_script_write_params | ( | struct interface_info * | ip, |
char * | prefix, | ||
struct client_lease * | lease | ||
) |
Definition at line 1629 of file dhclient.c.
int read_client_conf | ( | struct interface_info * | ifi | ) |
Definition at line 106 of file util.c.
Referenced by AdapterDiscoveryThread().
ssize_t receive_packet | ( | struct interface_info * | ip, |
unsigned char * | packet_data, | ||
size_t | packet_len, | ||
struct sockaddr_in * | dest, | ||
struct hardware * | hardware | ||
) |
Definition at line 34 of file socket.c.
Referenced by got_one().
Definition at line 359 of file dispatch.c.
Referenced by AdapterDiscoveryThread(), DSLeaseIpAddress(), DSReleaseIpAddressLease(), DSRenewIpAddressLease(), DSStaticRefreshParams(), and got_one().
void rewrite_client_leases | ( | struct interface_info * | ifi | ) |
Definition at line 1533 of file dhclient.c.
Referenced by write_client_lease().
void script_flush_env | ( | struct client_state * | ) |
void script_init | ( | char * | , |
struct string_list * | |||
) |
Referenced by priv_script_write_params().
void script_write_params | ( | char * | , |
struct client_lease * | |||
) |
Definition at line 1242 of file dhclient.c.
Definition at line 955 of file dhclient.c.
Referenced by dhcpoffer(), send_discover(), state_init(), and state_selecting().
ssize_t send_packet | ( | struct interface_info * | ip, |
struct dhcp_packet * | p, | ||
size_t | size, | ||
struct in_addr | addr, | ||
struct sockaddr_in * | broadcast, | ||
struct hardware * | hardware | ||
) |
Definition at line 9 of file socket.c.
Referenced by send_decline(), send_discover(), and send_request().
void send_request | ( | void * | ipp | ) |
Definition at line 1113 of file dhclient.c.
Definition at line 628 of file dhclient.c.
Referenced by bind_lease().
Definition at line 210 of file dhclient.c.
Referenced by AdapterDiscoveryThread(), device_init(), dhcpnak(), send_request(), state_reboot(), state_selecting(), wined3d_cs_create(), wined3d_cs_exec_reset_state(), and wined3d_device_reset().
Definition at line 1061 of file dhclient.c.
Referenced by send_discover().
Definition at line 172 of file dhclient.c.
Referenced by DSLeaseIpAddress(), and DSRenewIpAddressLease().
Definition at line 235 of file dhclient.c.
Referenced by dhcpoffer(), and state_selecting().
Definition at line 172 of file util.c.
Referenced by priv_script_write_params().
void write_client_lease | ( | struct interface_info * | ip, |
struct client_lease * | lease, | ||
int | rewrite | ||
) |
Definition at line 1555 of file dhclient.c.
Referenced by rewrite_client_leases().
|
extern |
Definition at line 59 of file dispatch.c.
Referenced by got_one(), and init_client().
|
extern |
|
extern |
Referenced by D3DDisassemble(), and D3DXDisassembleShader().
|
extern |
Referenced by bind_lease(), create_msft_typelib(), dhcpack(), dhcpoffer(), dispatch(), do_host_lookup(), FreeUrlCacheSpaceW(), main(), rpcrt4_http_timer_calc_timeout(), send_discover(), send_request(), state_selecting(), TIME_MMSysTimeCallback(), urlcache_hash_entry_is_locked(), and urlcache_rate_entry().
Definition at line 329 of file tables.c.
Referenced by cons_options().
|
extern |
Definition at line 68 of file tables.c.
Referenced by initialize_universes(), parse_option_buffer(), pretty_print_option(), priv_script_write_params(), and write_client_lease().
Definition at line 67 of file tables.c.
Referenced by initialize_universes().
|
extern |
|
extern |
Definition at line 76 of file dhclient.c.
|
extern |
Definition at line 92 of file dhclient.c.
|
extern |
Definition at line 73 of file dhclient.c.
|
extern |
Definition at line 74 of file dhclient.c.
Referenced by rewrite_client_leases(), and write_client_lease().
|
extern |
Definition at line 408 of file tables.c.
Referenced by cons_options().
|
extern |
|
extern |
|
extern |
Definition at line 672 of file tables.c.
Referenced by initialize_universes().
|
extern |