ReactOS 0.4.16-dev-292-gbbdcc14
dhcpd.h
Go to the documentation of this file.
1/* $OpenBSD: dhcpd.h,v 1.33 2004/05/06 22:29:15 deraadt Exp $ */
2
3/*
4 * Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
5 * Copyright (c) 1995, 1996, 1997, 1998, 1999
6 * The Internet Software Consortium. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of The Internet Software Consortium nor the names
18 * of its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
22 * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
23 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 * DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
26 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
29 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * This software has been written for the Internet Software Consortium
36 * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
37 * Enterprises. To learn more about the Internet Software Consortium,
38 * see ``http://www.vix.com/isc''. To learn more about Vixie
39 * Enterprises, see ``http://www.vix.com''.
40 */
41
42#pragma once
43
44#include <winsock2.h>
45#include <iphlpapi.h>
46#include "stdint.h"
47
48#define IFNAMSIZ MAX_INTERFACE_NAME_LEN
49
50#define ETH_ALEN 6
51#define ETHER_ADDR_LEN ETH_ALEN
52#include <pshpack1.h>
54{
55 u_int8_t ether_dhost[ETH_ALEN]; /* destination eth addr */
56 u_int8_t ether_shost[ETH_ALEN]; /* source ether addr */
57 u_int16_t ether_type; /* packet type ID field */
58};
59#include <poppack.h>
60
61struct ip
62 {
63 unsigned int ip_hl:4; /* header length */
64 unsigned int ip_v:4; /* version */
65 u_int8_t ip_tos; /* type of service */
66 u_short ip_len; /* total length */
67 u_short ip_id; /* identification */
68 u_short ip_off; /* fragment offset field */
69#define IP_RF 0x8000 /* reserved fragment flag */
70#define IP_DF 0x4000 /* dont fragment flag */
71#define IP_MF 0x2000 /* more fragments flag */
72#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
73 u_int8_t ip_ttl; /* time to live */
74 u_int8_t ip_p; /* protocol */
75 u_short ip_sum; /* checksum */
76 struct in_addr ip_src, ip_dst; /* source and dest address */
77 };
78
79struct udphdr {
80 u_int16_t uh_sport; /* source port */
81 u_int16_t uh_dport; /* destination port */
82 u_int16_t uh_ulen; /* udp length */
83 u_int16_t uh_sum; /* udp checksum */
84};
85
86#define ETHERTYPE_IP 0x0800
87#define IPTOS_LOWDELAY 0x10
88#define ARPHRD_ETHER 1
89
90// FIXME: I have no idea what this should be!
91#define SIZE_T_MAX 1600
92
93#define USE_SOCKET_RECEIVE
94#define USE_SOCKET_SEND
95
96#include <sys/types.h>
97#include <sys/stat.h>
98//#include <sys/time.h>
99#include <ctype.h>
100#include <fcntl.h>
101#include <limits.h>
102//#include <unistd.h>
103#include <stdio.h>
104#include <stdlib.h>
105#include <string.h>
106#include <time.h>
107//#include <unistd.h>
108
109#include "dhcp.h"
110#include "tree.h"
111
112#define LOCAL_PORT 68
113#define REMOTE_PORT 67
114
116 int len;
118};
119
122 char *string;
123};
124
125struct iaddr {
126 int len;
127 unsigned char iabuf[16];
128};
129
130struct iaddrlist {
132 struct iaddr addr;
133};
134
135struct packet {
144 struct option_data options[256];
145};
146
147struct hardware {
151};
152
158#ifdef __REACTOS__
159 time_t obtained;
160 struct iaddr serveraddress;
161#endif
162 char *filename;
164 unsigned int is_static : 1;
165 unsigned int is_bootp : 1;
166 struct option_data options[256];
167};
168
169/* Possible states in which the client can be. */
180
183 enum {
189
206};
207
210 struct client_lease *new;
225};
226
234 unsigned char *rbuf;
235 size_t rbuf_max;
237 size_t rbuf_len;
241 int dead;
243};
244
245struct timeout {
246 struct timeout *next;
248 void (*func)(void *);
249 void *what;
250};
251
252struct protocol {
253 struct protocol *next;
254 int fd;
255 void (*handler)(struct protocol *);
256 void *local;
257};
258
259#define DEFAULT_HASH_SIZE 97
260
263 unsigned char *name;
264 int len;
265 unsigned char *value;
266};
267
271};
272
273/* Default path to dhcpd config file. */
274#define _PATH_DHCLIENT_CONF "/etc/dhclient.conf"
275#define _PATH_DHCLIENT_DB "/var/db/dhclient.leases"
276#define DHCPD_LOG_FACILITY LOG_DAEMON
277
278#define MAX_TIME 0x7fffffff
279#define MIN_TIME 0
280
281/* External definitions... */
282
283/* options.c */
284int cons_options(struct packet *, struct dhcp_packet *, int,
285 struct tree_cache **);
286char *pretty_print_option(unsigned int,
287 unsigned char *, int, int, int);
288void do_packet(struct interface_info *, struct dhcp_packet *,
289 int, unsigned int, struct iaddr, struct hardware *);
290
291/* errwarn.c */
292extern int warnings_occurred;
293#ifdef _MSC_VER
294void error(char *, ...);
295int warning(char *, ...);
296int note(char *, ...);
297int debug(char *, ...);
298int parse_warn(char *, ...);
299#else
300void error(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
301int warning(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
302int note(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
303int debug(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
304int parse_warn(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
305#endif
306
307/* conflex.c */
308extern int lexline, lexchar;
309extern char *token_line, *tlname;
310extern char comments[4096];
311extern int comment_index;
312extern int eol_token;
313void new_parse(char *);
314int next_token(char **, FILE *);
315int peek_token(char **, FILE *);
316
317/* parse.c */
321int parse_ip_addr(FILE *, struct iaddr *);
324unsigned char *parse_numeric_aggregate(FILE *, unsigned char *, int *,
325 int, int, int);
326void convert_num(unsigned char *, char *, int, int);
328
329/* tree.c */
331
332/* alloc.c */
333struct string_list *new_string_list(size_t size);
334struct hash_table *new_hash_table(int);
335struct hash_bucket *new_hash_bucket(void);
336void dfree(void *, char *);
337void free_hash_bucket(struct hash_bucket *, char *);
338
339
340/* bpf.c */
342void if_register_send(struct interface_info *);
344ssize_t send_packet(struct interface_info *, struct dhcp_packet *, size_t,
345 struct in_addr, struct sockaddr_in *, struct hardware *);
346ssize_t receive_packet(struct interface_info *, unsigned char *, size_t,
347 struct sockaddr_in *, struct hardware *);
348
349/* dispatch.c */
350extern void (*bootp_packet_handler)(struct interface_info *,
351 struct dhcp_packet *, int, unsigned int, struct iaddr, struct hardware *);
355void got_one(struct protocol *);
356void add_timeout(time_t, void (*)(void *), void *);
357void cancel_timeout(void (*)(void *), void *);
358void add_protocol(char *, int, void (*)(struct protocol *), void *);
359void remove_protocol(struct protocol *);
361int interface_link_status(char *);
362
363/* hash.c */
364struct hash_table *new_hash(void);
365void add_hash(struct hash_table *, unsigned char *, int, unsigned char *);
366unsigned char *hash_lookup(struct hash_table *, unsigned char *, int);
367
368/* tables.c */
369extern struct dhcp_option dhcp_options[256];
370extern unsigned char dhcp_option_default_priority_list[];
372extern struct hash_table universe_hash;
373extern struct universe dhcp_universe;
374void initialize_universes(void);
375
376/* convert.c */
377u_int32_t getULong(unsigned char *);
378int32_t getLong(unsigned char *);
379u_int16_t getUShort(unsigned char *);
380int16_t getShort(unsigned char *);
381void putULong(unsigned char *, u_int32_t);
382void putLong(unsigned char *, int32_t);
383void putUShort(unsigned char *, unsigned int);
384void putShort(unsigned char *, int);
385
386/* inet.c */
389int addr_eq(struct iaddr, struct iaddr);
390char *piaddr(struct iaddr);
391
392/* dhclient.c */
393extern char *path_dhclient_conf;
394extern char *path_dhclient_db;
395extern time_t cur_time;
396extern int log_priority;
397extern int log_perror;
398
399extern struct client_config top_level_config;
400
401void dhcpoffer(struct packet *);
402void dhcpack(struct packet *);
403void dhcpnak(struct packet *);
404
405void send_discover(void *);
406void send_request(void *);
407void send_decline(void *);
408
409void state_reboot(void *);
410void state_init(void *);
411void state_selecting(void *);
412void state_requesting(void *);
413void state_bound(void *);
414void state_panic(void *);
415
416void bind_lease(struct interface_info *);
417
418void make_discover(struct interface_info *, struct client_lease *);
419void make_request(struct interface_info *, struct client_lease *);
420void make_decline(struct interface_info *, struct client_lease *);
421
422void free_client_lease(struct client_lease *);
424void write_client_lease(struct interface_info *, struct client_lease *, int);
425
426void priv_script_init(struct interface_info *, char *, char *);
427void priv_script_write_params(struct interface_info *, char *, struct client_lease *);
429
430void script_init(char *, struct string_list *);
431void script_write_params(char *, struct client_lease *);
432int script_go(void);
434 const char *, const char *, const char *, ...);
435void script_set_env(struct client_state *, const char *, const char *,
436 const char *);
438int dhcp_option_ev_name(char *, size_t, struct dhcp_option *);
439
440struct client_lease *packet_to_lease(struct packet *);
441void go_daemon(void);
443
444void bootp(struct packet *);
445void dhcp(struct packet *);
446
447/* packet.c */
448void assemble_hw_header(struct interface_info *, unsigned char *,
449 int *, struct hardware *);
450void assemble_udp_ip_header(unsigned char *, int *, u_int32_t, u_int32_t,
451 unsigned int, unsigned char *, int);
452ssize_t decode_hw_header(unsigned char *, int, struct hardware *);
453ssize_t decode_udp_ip_header(unsigned char *, int, struct sockaddr_in *,
454 unsigned char *, int);
455
456/* ethernet.c */
457void assemble_ethernet_header(struct interface_info *, unsigned char *,
458 int *, struct hardware *);
460 int, struct hardware *);
461
462/* clparse.c */
463int read_client_conf(struct interface_info *);
466 struct client_config *);
467int parse_X(FILE *, u_int8_t *, int);
475 struct interface_info **);
477void parse_string_list(FILE *, struct string_list **, int);
479
480/* privsep.c */
481struct buf *buf_open(size_t);
482int buf_add(struct buf *, void *, size_t);
483int buf_close(int, struct buf *);
484ssize_t buf_read(int, void *, size_t);
HANDLE hStopEvent
Definition: dhcpcsvc.c:19
void assemble_udp_ip_header(unsigned char *, int *, u_int32_t, u_int32_t, unsigned int, unsigned char *, int)
void state_reboot(void *)
Definition: dhclient.c:172
void make_discover(struct interface_info *, struct client_lease *)
Definition: dhclient.c:1256
ssize_t decode_ethernet_header(struct interface_info *, unsigned char *, int, struct hardware *)
struct client_lease * packet_to_lease(struct packet *)
Definition: dhclient.c:829
pair cons(caddr_t, pair)
Definition: tree.c:57
void parse_lease_time(FILE *, time_t *)
ssize_t buf_read(int, void *, size_t)
void bootp(struct packet *)
Definition: dhclient.c:654
struct string_list * new_string_list(size_t size)
Definition: alloc.c:46
void putLong(unsigned char *, int32_t)
struct iaddr broadcast_addr(struct iaddr, struct iaddr)
Definition: util.c:167
ssize_t send_packet(struct interface_info *, struct dhcp_packet *, size_t, struct in_addr, struct sockaddr_in *, struct hardware *)
Definition: socket.c:9
int parse_option_list(FILE *, u_int8_t *)
void go_daemon(void)
void int int note(char *,...) __attribute__((__format__(__printf__
int warnings_occurred
void skip_to_semi(FILE *)
void send_decline(void *)
Definition: dhclient.c:1242
char * token_line
void reinitialize_interfaces(void)
char * path_dhclient_db
Definition: dhclient.c:74
void parse_client_lease_statement(FILE *, int)
void client_location_changed(void)
void dispatch_imsg(int)
int read_client_conf(struct interface_info *)
Definition: util.c:106
void putUShort(unsigned char *, unsigned int)
void make_request(struct interface_info *, struct client_lease *)
Definition: dhclient.c:1339
int parse_X(FILE *, u_int8_t *, int)
void dfree(void *, char *)
Definition: alloc.c:79
int16_t getShort(unsigned char *)
Definition: util.c:84
void initialize_universes(void)
Definition: tables.c:674
void parse_interface_declaration(FILE *, struct client_config *)
unsigned char * hash_lookup(struct hash_table *, unsigned char *, int)
Definition: hash.c:144
void parse_client_lease_declaration(FILE *, struct client_lease *, struct interface_info **)
void dispatch(HANDLE hStopEvent)
Definition: dispatch.c:70
void dhcpnak(struct packet *)
Definition: dhclient.c:915
char comments[4096]
void write_client_lease(struct interface_info *, struct client_lease *, int)
Definition: dhclient.c:1555
u_int16_t getUShort(unsigned char *)
Definition: util.c:88
int comment_index
void dhcpack(struct packet *)
Definition: dhclient.c:316
int sizeof_dhcp_option_default_priority_list
Definition: tables.c:408
void make_decline(struct interface_info *, struct client_lease *)
Definition: dhclient.c:1441
int parse_semi(FILE *)
char * path_dhclient_conf
Definition: dhclient.c:73
unsigned char dhcp_option_default_priority_list[]
Definition: tables.c:329
struct hash_table universe_hash
Definition: tables.c:672
void priv_script_init(struct interface_info *, char *, char *)
Definition: dhclient.c:1621
void make_client_config(struct interface_info *, struct client_config *)
int cons_options(struct packet *, struct dhcp_packet *, int, struct tree_cache **)
Definition: options.c:199
void state_selecting(void *)
Definition: dhclient.c:235
void state_panic(void *)
Definition: dhclient.c:1061
char * tlname
Definition: dhcpd.h:309
void parse_client_statement(FILE *, struct interface_info *, struct client_config *)
struct iaddr subnet_number(struct iaddr, struct iaddr)
Definition: util.c:172
void assemble_ethernet_header(struct interface_info *, unsigned char *, int *, struct hardware *)
int addr_eq(struct iaddr, struct iaddr)
Definition: util.c:100
int peek_token(char **, FILE *)
int priv_script_go(void)
char * parse_string(FILE *)
void int int int int int lexline
int interface_link_status(char *)
Definition: dispatch.c:424
struct buf * buf_open(size_t)
void free_client_lease(struct client_lease *)
Definition: dhclient.c:1515
time_t cur_time
void add_timeout(time_t, void(*)(void *), void *)
Definition: dispatch.c:253
dhcp_state
Definition: dhcpd.h:170
@ S_REBOOTING
Definition: dhcpd.h:171
@ S_BOUND
Definition: dhcpd.h:175
@ S_RENEWING
Definition: dhcpd.h:176
@ S_REBINDING
Definition: dhcpd.h:177
@ S_SELECTING
Definition: dhcpd.h:173
@ S_REQUESTING
Definition: dhcpd.h:174
@ S_INIT
Definition: dhcpd.h:172
@ S_STATIC
Definition: dhcpd.h:178
void parse_hardware_param(FILE *, struct hardware *)
void discover_interfaces(struct interface_info *)
struct dhcp_option * parse_option_decl(FILE *, struct option_data *)
u_int32_t getULong(unsigned char *)
Definition: util.c:96
ssize_t receive_packet(struct interface_info *, unsigned char *, size_t, struct sockaddr_in *, struct hardware *)
Definition: socket.c:34
void priv_script_write_params(struct interface_info *, char *, struct client_lease *)
Definition: dhclient.c:1629
void convert_num(unsigned char *, char *, int, int)
struct hash_table * new_hash_table(int)
Definition: alloc.c:57
time_t parse_date(FILE *)
void add_protocol(char *, int, void(*)(struct protocol *), void *)
Definition: dispatch.c:342
void rewrite_client_leases(struct interface_info *)
Definition: dhclient.c:1533
void dhcp(struct packet *)
Definition: dhclient.c:674
#define ETH_ALEN
Definition: dhcpd.h:50
struct universe dhcp_universe
Definition: tables.c:67
char * piaddr(struct iaddr)
Definition: util.c:6
void new_parse(char *)
ssize_t decode_udp_ip_header(unsigned char *, int, struct sockaddr_in *, unsigned char *, int)
int parse_ip_addr(FILE *, struct iaddr *)
int log_perror
Definition: dhclient.c:76
void dhcpoffer(struct packet *)
Definition: dhclient.c:710
unsigned char * parse_numeric_aggregate(FILE *, unsigned char *, int *, int, int, int)
void if_register_receive(struct interface_info *)
Definition: adapter.c:575
void state_bound(void *)
Definition: dhclient.c:628
void got_one(struct protocol *)
Definition: dispatch.c:194
int eol_token
int script_go(void)
struct protocol * find_protocol_by_adapter(struct interface_info *)
Definition: dispatch.c:412
void assemble_hw_header(struct interface_info *, unsigned char *, int *, struct hardware *)
void state_requesting(void *)
void make_client_state(struct interface_info *)
void do_packet(struct interface_info *, struct dhcp_packet *, int, unsigned int, struct iaddr, struct hardware *)
Definition: options.c:635
void int int int int int lexchar
Definition: dhcpd.h:308
struct hash_table * new_hash(void)
Definition: hash.c:53
int buf_add(struct buf *, void *, size_t)
void script_flush_env(struct client_state *)
void bind_lease(struct interface_info *)
Definition: dhclient.c:580
void putShort(unsigned char *, int)
struct client_config top_level_config
int32_t getLong(unsigned char *)
Definition: util.c:92
void state_init(void *)
Definition: dhclient.c:210
void script_init(char *, struct string_list *)
int buf_close(int, struct buf *)
void remove_protocol(struct protocol *)
Definition: dispatch.c:359
#define IFNAMSIZ
Definition: dhcpd.h:48
int next_token(char **, FILE *)
void free_hash_bucket(struct hash_bucket *, char *)
Definition: alloc.c:89
void client_envadd(struct client_state *, const char *, const char *, const char *,...)
void parse_reject_statement(FILE *, struct client_config *)
int log_priority
Definition: dhclient.c:92
#define DEFAULT_HASH_SIZE
Definition: dhcpd.h:259
struct interface_info * interface_or_dummy(char *)
ssize_t decode_hw_header(unsigned char *, int, struct hardware *)
char * pretty_print_option(unsigned int, unsigned char *, int, int, int)
Definition: options.c:396
void script_set_env(struct client_state *, const char *, const char *, const char *)
void add_hash(struct hash_table *, unsigned char *, int, unsigned char *)
Definition: hash.c:82
struct hash_bucket * new_hash_bucket(void)
Definition: alloc.c:71
void read_client_leases(void)
void(* bootp_packet_handler)(struct interface_info *, struct dhcp_packet *, int, unsigned int, struct iaddr, struct hardware *)
Definition: dispatch.c:59
void putULong(unsigned char *, u_int32_t)
int if_register_bpf(struct interface_info *)
struct dhcp_option dhcp_options[256]
Definition: tables.c:68
void script_write_params(char *, struct client_lease *)
void int int int int parse_warn(char *,...) __attribute__((__format__(__printf__
void if_register_send(struct interface_info *)
Definition: adapter.c:571
void send_discover(void *)
Definition: dhclient.c:955
void parse_string_list(FILE *, struct string_list **, int)
void cancel_timeout(void(*)(void *), void *)
Definition: dispatch.c:316
int dhcp_option_ev_name(char *, size_t, struct dhcp_option *)
Definition: dhclient.c:1767
unsigned short u_short
Definition: types.h:81
INT32 int32_t
Definition: types.h:71
INT16 int16_t
Definition: types.h:70
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
__kernel_time_t time_t
Definition: linux.h:252
GLsizeiptr size
Definition: glext.h:5919
GLenum func
Definition: glext.h:6028
GLuint address
Definition: glext.h:9393
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum const GLvoid * addr
Definition: glext.h:9621
#define debug(msg)
Definition: key_call.c:71
#define error(str)
Definition: mkdosfs.c:1605
unsigned int u_int32_t
Definition: rosdhcp.h:35
unsigned short u_int16_t
Definition: rosdhcp.h:34
unsigned char u_int8_t
Definition: rosdhcp.h:33
char * caddr_t
Definition: rosdhcp.h:36
int ssize_t
Definition: rosdhcp.h:48
#define warning(s)
Definition: debug.h:83
u_int8_t requested_options[256]
Definition: dhcpd.h:192
time_t retry_interval
Definition: dhcpd.h:196
time_t timeout
Definition: dhcpd.h:194
enum client_config::@26 bootp_policy
char * script_name
Definition: dhcpd.h:201
time_t reboot_timeout
Definition: dhcpd.h:198
time_t select_interval
Definition: dhcpd.h:197
time_t initial_interval
Definition: dhcpd.h:195
struct option_data send_options[256]
Definition: dhcpd.h:190
enum client_config::@25 default_actions[256]
struct iaddrlist * reject_list
Definition: dhcpd.h:205
struct string_list * medium
Definition: dhcpd.h:204
struct string_list * media
Definition: dhcpd.h:200
u_int8_t required_options[256]
Definition: dhcpd.h:191
int requested_option_count
Definition: dhcpd.h:193
@ ACTION_DEFAULT
Definition: dhcpd.h:184
@ ACTION_SUPERSEDE
Definition: dhcpd.h:185
@ ACTION_APPEND
Definition: dhcpd.h:187
@ ACTION_PREPEND
Definition: dhcpd.h:186
struct option_data defaults[256]
Definition: dhcpd.h:182
time_t backoff_cutoff
Definition: dhcpd.h:199
unsigned int is_static
Definition: dhcpd.h:164
struct string_list * medium
Definition: dhcpd.h:163
char * filename
Definition: dhcpd.h:162
char * server_name
Definition: dhcpd.h:157
unsigned int is_bootp
Definition: dhcpd.h:165
struct client_lease * next
Definition: dhcpd.h:154
time_t renewal
Definition: dhcpd.h:155
time_t rebind
Definition: dhcpd.h:155
time_t expiry
Definition: dhcpd.h:155
struct client_lease * alias
Definition: dhcpd.h:213
struct client_lease * active
Definition: dhcpd.h:209
struct client_config * config
Definition: dhcpd.h:224
struct client_lease * leases
Definition: dhcpd.h:212
enum dhcp_state state
Definition: dhcpd.h:214
struct iaddr requested_address
Definition: dhcpd.h:223
time_t first_sending
Definition: dhcpd.h:218
struct iaddr destination
Definition: dhcpd.h:215
time_t interval
Definition: dhcpd.h:219
u_int16_t secs
Definition: dhcpd.h:217
struct client_lease * offered_leases
Definition: dhcpd.h:211
struct string_list * medium
Definition: dhcpd.h:220
u_int32_t xid
Definition: dhcpd.h:216
int packet_length
Definition: dhcpd.h:222
u_int8_t ether_shost[ETH_ALEN]
Definition: dhcpd.h:56
u_int16_t ether_type
Definition: dhcpd.h:57
u_int8_t ether_dhost[ETH_ALEN]
Definition: dhcpd.h:55
u_int8_t hlen
Definition: dhcpd.h:149
u_int8_t htype
Definition: dhcpd.h:148
u_int8_t haddr[16]
Definition: dhcpd.h:150
struct hash_bucket * next
Definition: dhcpd.h:262
unsigned char * name
Definition: dhcpd.h:263
int len
Definition: dhcpd.h:264
unsigned char * value
Definition: dhcpd.h:265
struct hash_bucket * buckets[DEFAULT_HASH_SIZE]
Definition: dhcpd.h:270
int hash_count
Definition: dhcpd.h:269
Definition: dhcpd.h:125
int len
Definition: dhcpd.h:126
unsigned char iabuf[16]
Definition: dhcpd.h:127
struct iaddrlist * next
Definition: dhcpd.h:131
Definition: tcpip.h:126
struct interface_info * next
Definition: dhcpd.h:228
struct client_state * client
Definition: dhcpd.h:238
size_t rbuf_len
Definition: dhcpd.h:237
int rfdesc
Definition: dhcpd.h:232
u_int16_t index
Definition: dhcpd.h:242
struct hardware hw_address
Definition: dhcpd.h:229
unsigned char * rbuf
Definition: dhcpd.h:234
int wfdesc
Definition: dhcpd.h:233
struct in_addr primary_address
Definition: dhcpd.h:230
size_t rbuf_max
Definition: dhcpd.h:235
size_t rbuf_offset
Definition: dhcpd.h:236
int errors
Definition: dhcpd.h:240
int noifmedia
Definition: dhcpd.h:239
Definition: dhcpd.h:62
u_int8_t ip_tos
Definition: dhcpd.h:65
u_short ip_id
Definition: dhcpd.h:67
u_int8_t ip_p
Definition: dhcpd.h:74
unsigned int ip_v
Definition: dhcpd.h:64
struct in_addr ip_src ip_dst
Definition: dhcpd.h:76
u_short ip_sum
Definition: dhcpd.h:75
u_short ip_len
Definition: dhcpd.h:66
unsigned int ip_hl
Definition: dhcpd.h:63
u_int8_t ip_ttl
Definition: dhcpd.h:73
u_short ip_off
Definition: dhcpd.h:68
Definition: name.c:39
int len
Definition: dhcpd.h:116
u_int8_t * data
Definition: dhcpd.h:117
Definition: dhcpd.h:135
struct hardware * haddr
Definition: dhcpd.h:143
int client_port
Definition: dhcpd.h:140
struct dhcp_packet * raw
Definition: dhcpd.h:136
int packet_length
Definition: dhcpd.h:137
struct interface_info * interface
Definition: dhcpd.h:142
int options_valid
Definition: dhcpd.h:139
int packet_type
Definition: dhcpd.h:138
struct iaddr client_addr
Definition: dhcpd.h:141
Definition: _pair.h:47
struct protocol * next
Definition: dhcpd.h:253
void(* handler)(struct protocol *)
Definition: dhcpd.h:255
void * local
Definition: dhcpd.h:256
int fd
Definition: dhcpd.h:254
struct string_list * next
Definition: dhcpd.h:121
char * string
Definition: dhcpd.h:122
Definition: dhcpd.h:245
void * what
Definition: dhcpd.h:249
time_t when
Definition: dhcpd.h:247
struct timeout * next
Definition: dhcpd.h:246
Definition: dhcpd.h:79
u_int16_t uh_dport
Definition: dhcpd.h:81
u_int16_t uh_sport
Definition: dhcpd.h:80
u_int16_t uh_ulen
Definition: dhcpd.h:82
u_int16_t uh_sum
Definition: dhcpd.h:83
Definition: tree.h:55