Data Structures |
| 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 |
Defines |
| #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
} |
Functions |
| int | cons_options (struct packet *, struct dhcp_packet *, int, struct tree_cache **, int, int, int, u_int8_t *, int) |
| char * | pretty_print_option (unsigned int, unsigned char *, int, int, int) |
| void | do_packet (struct interface_info *, struct dhcp_packet *, int, unsigned int, struct iaddr, struct hardware *) |
| void | error (char *,...) __attribute__((__format__(__printf__ |
| void int | warning (char *,...) __attribute__((__format__(__printf__ |
| void int int | note (char *,...) __attribute__((__format__(__printf__ |
| void int int int | debug (char *,...) __attribute__((__format__(__printf__ |
| void int int int int | parse_warn (char *,...) __attribute__((__format__(__printf__ |
| void | new_parse (char *) |
| int | next_token (char **, FILE *) |
| int | peek_token (char **, FILE *) |
| void | skip_to_semi (FILE *) |
| int | parse_semi (FILE *) |
| char * | parse_string (FILE *) |
| int | parse_ip_addr (FILE *, struct iaddr *) |
| void | parse_hardware_param (FILE *, struct hardware *) |
| void | parse_lease_time (FILE *, time_t *) |
| unsigned char * | parse_numeric_aggregate (FILE *, unsigned char *, int *, int, int, int) |
| void | convert_num (unsigned char *, char *, int, int) |
| time_t | parse_date (FILE *) |
| pair | cons (caddr_t, pair) |
| struct string_list * | new_string_list (size_t size) |
| struct hash_table * | new_hash_table (int) |
| struct hash_bucket * | new_hash_bucket (void) |
| void | dfree (void *, char *) |
| void | free_hash_bucket (struct hash_bucket *, char *) |
| int | if_register_bpf (struct interface_info *) |
| void | if_register_send (struct interface_info *) |
| void | if_register_receive (struct interface_info *) |
| ssize_t | send_packet (struct interface_info *, struct dhcp_packet *, size_t, struct in_addr, struct sockaddr_in *, struct hardware *) |
| ssize_t | receive_packet (struct interface_info *, unsigned char *, size_t, struct sockaddr_in *, struct hardware *) |
| void | discover_interfaces (struct interface_info *) |
| void | reinitialize_interfaces (void) |
| void | dispatch (void) |
| void | got_one (struct protocol *) |
| void | add_timeout (time_t, void(*)(void *), void *) |
| void | cancel_timeout (void(*)(void *), void *) |
| void | add_protocol (char *, int, void(*)(struct protocol *), void *) |
| void | remove_protocol (struct protocol *) |
| struct protocol * | find_protocol_by_adapter (struct interface_info *) |
| int | interface_link_status (char *) |
| struct hash_table * | new_hash (void) |
| void | add_hash (struct hash_table *, unsigned char *, int, unsigned char *) |
| unsigned char * | hash_lookup (struct hash_table *, unsigned char *, int) |
| void | initialize_universes (void) |
| u_int32_t | getULong (unsigned char *) |
| int32_t | getLong (unsigned char *) |
| u_int16_t | getUShort (unsigned char *) |
| int16_t | getShort (unsigned char *) |
| void | putULong (unsigned char *, u_int32_t) |
| void | putLong (unsigned char *, int32_t) |
| void | putUShort (unsigned char *, unsigned int) |
| void | putShort (unsigned char *, int) |
| struct iaddr | subnet_number (struct iaddr, struct iaddr) |
| struct iaddr | broadcast_addr (struct iaddr, struct iaddr) |
| int | addr_eq (struct iaddr, struct iaddr) |
| char * | piaddr (struct iaddr) |
| void | dhcpoffer (struct packet *) |
| void | dhcpack (struct packet *) |
| void | dhcpnak (struct packet *) |
| void | send_discover (void *) |
| void | send_request (void *) |
| void | send_decline (void *) |
| void | state_reboot (void *) |
| void | state_init (void *) |
| void | state_selecting (void *) |
| void | state_requesting (void *) |
| void | state_bound (void *) |
| void | state_panic (void *) |
| void | bind_lease (struct interface_info *) |
| void | make_discover (struct interface_info *, struct client_lease *) |
| void | make_request (struct interface_info *, struct client_lease *) |
| void | make_decline (struct interface_info *, struct client_lease *) |
| void | free_client_lease (struct client_lease *) |
| void | rewrite_client_leases (struct interface_info *) |
| void | write_client_lease (struct interface_info *, struct client_lease *, int) |
| void | priv_script_init (struct interface_info *, char *, char *) |
| void | priv_script_write_params (struct interface_info *, char *, struct client_lease *) |
| int | priv_script_go (void) |
| void | script_init (char *, struct string_list *) |
| void | script_write_params (char *, struct client_lease *) |
| int | script_go (void) |
| void | client_envadd (struct client_state *, const char *, const char *, const char *,...) |
| void | script_set_env (struct client_state *, const char *, const char *, const char *) |
| void | script_flush_env (struct client_state *) |
| int | dhcp_option_ev_name (char *, size_t, struct dhcp_option *) |
| struct client_lease * | packet_to_lease (struct packet *) |
| void | go_daemon (void) |
| void | client_location_changed (void) |
| void | bootp (struct packet *) |
| void | dhcp (struct packet *) |
| void | assemble_hw_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) |
| ssize_t | decode_hw_header (unsigned char *, int, struct hardware *) |
| ssize_t | decode_udp_ip_header (unsigned char *, int, struct sockaddr_in *, unsigned char *, int) |
| void | assemble_ethernet_header (struct interface_info *, unsigned char *, int *, struct hardware *) |
| ssize_t | decode_ethernet_header (struct interface_info *, unsigned char *, int, struct hardware *) |
| int | read_client_conf (struct interface_info *) |
| void | read_client_leases (void) |
| void | parse_client_statement (FILE *, struct interface_info *, struct client_config *) |
| int | parse_X (FILE *, u_int8_t *, int) |
| int | parse_option_list (FILE *, u_int8_t *) |
| void | parse_interface_declaration (FILE *, struct client_config *) |
| struct interface_info * | interface_or_dummy (char *) |
| void | make_client_state (struct interface_info *) |
| void | make_client_config (struct interface_info *, struct client_config *) |
| void | parse_client_lease_statement (FILE *, int) |
| void | parse_client_lease_declaration (FILE *, struct client_lease *, struct interface_info **) |
| struct dhcp_option * | parse_option_decl (FILE *, struct option_data *) |
| void | parse_string_list (FILE *, struct string_list **, int) |
| void | parse_reject_statement (FILE *, struct client_config *) |
| struct buf * | buf_open (size_t) |
| int | buf_add (struct buf *, void *, size_t) |
| int | buf_close (int, struct buf *) |
| ssize_t | buf_read (int, void *, size_t) |
| void | dispatch_imsg (int) |
Variables |
| int | warnings_occurred |
| void int int int int int | lexline |
| void int int int int int | lexchar |
| char * | token_line |
| char * | tlname |
| char | comments [4096] |
| int | comment_index |
| int | eol_token |
| void(* | bootp_packet_handler )(struct interface_info *, struct dhcp_packet *, int, unsigned int, struct iaddr, struct hardware *) |
| struct dhcp_option | dhcp_options [256] |
| unsigned char | dhcp_option_default_priority_list [] |
| int | sizeof_dhcp_option_default_priority_list |
| struct hash_table | universe_hash |
| struct universe | dhcp_universe |
| char * | path_dhclient_conf |
| char * | path_dhclient_db |
| time_t | cur_time |
| int | log_priority |
| int | log_perror |
| struct client_config | top_level_config |