ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/dhcpping/dhcpoptionlist.h
Revision: 1.1
Committed: Mon Jul 26 20:46:57 2004 UTC (19 years, 9 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Log Message:
*** empty log message ***

File Contents

# Content
1 #define MAX_DATA 1024
2
3 enum dhcpfieldtype {string, ip, multi, offset, time, number, opt_switch, node_type, bin};
4
5 /*
6 * string = \0 terminated char[]
7 * ip = 4 byte IP Address
8 * multi = vendor defined data with multiple entry pairs (length, data)+
9 * time = 4 byte unsinged int in seconds
10 * offset = 32-bit int, positive means east of the meridian, negative west
11 * number = unsigned int
12 * opt_switch = 0/1 switch
13 * node_type = 0x1 B-node
14 * 0x2 P-node
15 * 0x4 M-node
16 * 0x8 H-node
17 * bin = don't interpret at all - char
18 */
19
20 struct dhcpoption {
21 char name[50];
22 enum dhcpfieldtype type;
23 unsigned char min_len;
24 unsigned char max_len;
25 } DHCPOPT [256];
26
27 DHCPOPT[0] = {"Subnet Mask", ip, 4, 4};
28 DHCPOPT[1] = {"Time Offset", offset, 4, 4};
29 DHCPOPT[2] = {"Router Option", ip, 4, 0};
30 DHCPOPT[3] = {"Time Server Option", ip, 4, 0};
31 DHCPOPT[4] = {"Name Server Option", ip, 4, 0};
32 DHCPOPT[5] = {"Domain Name Server Option", ip, 4, 0};
33 DHCPOPT[6] = {"Log Server Option", ip, 4, 0};
34 DHCPOPT[7] = {"Cookie Server Option", ip, 4, 0};
35 DHCPOPT[8] = {"LPR Server Option", ip, 4, 0};
36 DHCPOPT[9] = {"Impress Server Option", ip, 4, 0};
37 DHCPOPT[10] = {"Resource Location Server Option", ip, 4, 0};
38 DHCPOPT[11] = {"Host Name Option", string, 1, 0};
39 DHCPOPT[12] = {"Boot File Size Option", number, 2, 2}; // unsigned 16-bit integer
40 DHCPOPT[13] = {"Merit Dump File", string, 1, 0};
41 DHCPOPT[14] = {"Domain Name", string, 1, 0};
42 DHCPOPT[15] = {"Swap Server", ip, 4, 4};
43 DHCPOPT[16] = {"Root Path", string, 1, 0};
44 DHCPOPT[17] = {"Extensions Path", string, 1, 0};
45 DHCPOPT[18] = {"IP Forwarding Enable/Disable Option", opt_switch, 1, 1};
46 DHCPOPT[19] = {"Non-Local Source Routing Enable/Disable Option", opt_switch, 1, 1};
47 DHCPOPT[20] = {"Policy Filter Option", ip, 8, 0};
48 DHCPOPT[21] = {"Maximum Datagram Reassembly Size", number, 2, 2};
49 DHCPOPT[22] = {"Default IP Time-to-live", number, 1, 1};
50 DHCPOPT[23] = {"Path MTU Aging Timeout Option", time, 4, 4};
51 DHCPOPT[24] = {"Path MTU Plateau Table Option", number, 2, 0}; // minimum mtu 68
52 DHCPOPT[25] = {"Interface MTU Option", number, 2, 2};
53 DHCPOPT[26] = {"All Subnets are Local Option", opt_switch, 1, 1};
54 DHCPOPT[27] = {"Broadcast Address Option", ip, 4, 4};
55 DHCPOPT[28] = {"Perform Mask Discovery Option", opt_switch, 1, 1};
56 DHCPOPT[29] = {"Mask Supplier Option", opt_switch, 1, 1};
57 DHCPOPT[30] = {"Perform Router Discovery Option", opt_switch, 1, 1};
58 DHCPOPT[31] = {"Router Solicitation Address Option", ip, 4, 4};
59 DHCPOPT[32] = {"Static Route Option", ip, 8, 0}; // Default Route 0.0.0.0 is illegal here
60 DHCPOPT[33] = {"Trailer Encapsulation Option", opt_switch, 1, 1};
61 DHCPOPT[34] = {"ARP Cache Timeout Option", time, 4, 4};
62 DHCPOPT[35] = {"Ethernet Encapsulation Option", opt_switch, 1, 1};
63 DHCPOPT[36] = {"TCP Default TTL Option", number, 1, 1};
64 DHCPOPT[37] = {"TCP Keepalive Interval Option", time, 4, 4};
65 DHCPOPT[38] = {"TCP Keepalive Garbage Option", opt_switch, 1, 1};
66 DHCPOPT[39] = {"Network Information Service Domain Option", string, 1, 0};
67 DHCPOPT[40] = {"Network Information Servers Option", ip, 4, 0};
68 DHCPOPT[41] = {"Network Time Protocol Servers Option", ip, 4, 0};
69 DHCPOPT[42] = {"Vendor Specific Information", multi, 0, 0};
70 DHCPOPT[43] = {"NetBIOS over TCP/IP Name Server Option", ip, 4, 0};
71 DHCPOPT[44] = {"NetBIOS over TCP/IP Datagram Distribution Server Option", ip, 4, 0};
72 DHCPOPT[45] = {"NetBIOS over TCP/IP Node Type Option", node_type, 1, 1};
73 DHCPOPT[46] = {"NetBIOS over TCP/IP Scope Option", string, 1, 0};
74 DHCPOPT[47] = {"X Window System Font Server Option", ip, 4, 0};
75 DHCPOPT[48] = {"X Window System Display Manager Option", ip, 4, 0};
76 DHCPOPT[49] = {"Requested IP Address", ip, 4, 4};
77 DHCPOPT[50] = {"IP Address Lease Time", time, 4, 4};
78 DHCPOPT[51] = {"Option Overload", opt_switch, 1, 1}; // values: 1,2,3
79 DHCPOPT[52] = {"DHCP Message Type", opt_switch, 1, 1}; // values: 1-8
80 DHCPOPT[53] = {"Server Identifier", ip, 4, 4};
81 DHCPOPT[54] = {"Parameter Request List", number, 1, 0};
82 DHCPOPT[55] = {"Message", string, 1, 0};
83 DHCPOPT[56] = {"Maximum DHCP Message Size", number, 2, 2};
84 DHCPOPT[57] = {"Renewal (T1) Time Value", time, 4, 4};
85 DHCPOPT[58] = {"Rebinding (T2) Time Value", time, 4, 4};
86 DHCPOPT[59] = {"Vendor class identifier", bin, 1, 0};
87 DHCPOPT[60] = {"Client-identifier", bin, 2, 0}; // first field: type then data
88 DHCPOPT[63] = {"Network Information Service+ Domain Option", string, 1, 0};
89 DHCPOPT[65] = {"TFTP server name", string, 1, 0};
90 DHCPOPT[66] = {"Bootfile name", string, 1, 0};
91 DHCPOPT[67] = {"Mobile IP Home Agent option", ip, 4, 0};
92 DHCPOPT[68] = {"Simple Mail Transport Protocol (SMTP) Server Option", ip, 4, 0};
93 DHCPOPT[69] = {"Post Office Protocol (POP3) Server Option", ip, 4, 0};
94 DHCPOPT[70] = {"Network News Transport Protocol (NNTP) Server Option", ip, 4, 0};
95 DHCPOPT[71] = {"Default World Wide Web (WWW) Server Option", ip, 4, 0};
96 DHCPOPT[72] = {"Default Finger Server Option", ip, 4, 0};
97 DHCPOPT[73] = {"Default Internet Relay Chat (IRC) Server Option", ip, 4, 0};
98 DHCPOPT[74] = {"StreetTalk Server Option", ip, 4, 0};
99 DHCPOPT[75] = {"StreetTalk Directory Assistance (STDA) Server Option", ip, 4, 0};
100