|  | @@ -0,0 +1,414 @@
 | 
		
	
		
			
			|  | 1 | +# pydhcplib
 | 
		
	
		
			
			|  | 2 | +# Copyright (C) 2008 Mathieu Ignacio -- mignacio@april.org
 | 
		
	
		
			
			|  | 3 | +#
 | 
		
	
		
			
			|  | 4 | +# This file is part of pydhcplib.
 | 
		
	
		
			
			|  | 5 | +# Pydhcplib is free software; you can redistribute it and/or modify
 | 
		
	
		
			
			|  | 6 | +# it under the terms of the GNU General Public License as published by
 | 
		
	
		
			
			|  | 7 | +# the Free Software Foundation; either version 3 of the License, or
 | 
		
	
		
			
			|  | 8 | +# (at your option) any later version.
 | 
		
	
		
			
			|  | 9 | +#
 | 
		
	
		
			
			|  | 10 | +# This program is distributed in the hope that it will be useful,
 | 
		
	
		
			
			|  | 11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
		
	
		
			
			|  | 12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
		
	
		
			
			|  | 13 | +# GNU General Public License for more details.
 | 
		
	
		
			
			|  | 14 | +#
 | 
		
	
		
			
			|  | 15 | +# You should have received a copy of the GNU General Public License
 | 
		
	
		
			
			|  | 16 | +# along with this program. If not, see <http://www.gnu.org/licenses/>.
 | 
		
	
		
			
			|  | 17 | +
 | 
		
	
		
			
			|  | 18 | +
 | 
		
	
		
			
			|  | 19 | +MagicCookie = [99,130,83,99]
 | 
		
	
		
			
			|  | 20 | +PyDhcpLibVersion = '0.6'
 | 
		
	
		
			
			|  | 21 | +
 | 
		
	
		
			
			|  | 22 | +# DhcpBaseOptions = '{fieldname':[location,length]}
 | 
		
	
		
			
			|  | 23 | +DhcpFields = {'op':[0,1],
 | 
		
	
		
			
			|  | 24 | +                     'htype':[1,1],
 | 
		
	
		
			
			|  | 25 | +                     'hlen':[2,1],
 | 
		
	
		
			
			|  | 26 | +                     'hops':[3,1],
 | 
		
	
		
			
			|  | 27 | +                     'xid':[4,4],
 | 
		
	
		
			
			|  | 28 | +                     'secs':[8,2],
 | 
		
	
		
			
			|  | 29 | +                     'flags':[10,2],
 | 
		
	
		
			
			|  | 30 | +                     'ciaddr':[12,4],
 | 
		
	
		
			
			|  | 31 | +                     'yiaddr':[16,4],
 | 
		
	
		
			
			|  | 32 | +                     'siaddr':[20,4],
 | 
		
	
		
			
			|  | 33 | +                     'giaddr':[24,4],
 | 
		
	
		
			
			|  | 34 | +                     'chaddr':[28,16],
 | 
		
	
		
			
			|  | 35 | +                     'sname':[44,64],
 | 
		
	
		
			
			|  | 36 | +                     'file':[108,128]
 | 
		
	
		
			
			|  | 37 | +                     }
 | 
		
	
		
			
			|  | 38 | +DhcpFieldsName = { 'op' : { '0': 'ERROR_UNDEF', '1' : 'BOOTREQUEST' , '2' : 'BOOTREPLY'},
 | 
		
	
		
			
			|  | 39 | +                   'dhcp_message_type' : { '0': 'ERROR_UNDEF', '1': 'DHCP_DISCOVER', '2': 'DHCP_OFFER',
 | 
		
	
		
			
			|  | 40 | +                                           '3' : 'DHCP_REQUEST','4':'DHCP_DECLINE', '5': 'DHCP_ACK', '6': 'DHCP_NACK',
 | 
		
	
		
			
			|  | 41 | +                                           '7': 'DHCP_RELEASE', '8' : 'DHCP_INFORM' }
 | 
		
	
		
			
			|  | 42 | +                   }
 | 
		
	
		
			
			|  | 43 | +DhcpNames = { 'ERROR_UNDEF':0 , 'BOOTREQUEST':1 , 'BOOTREPLY':2 ,
 | 
		
	
		
			
			|  | 44 | +              'DHCP_DISCOVER':1 , 'DHCP_OFFER':2 , 'DHCP_REQUEST':3 ,
 | 
		
	
		
			
			|  | 45 | +              'DHCP_DECLINE':4 , 'DHCP_ACK':5 , 'DHCP_NACK':6 ,
 | 
		
	
		
			
			|  | 46 | +              'DHCP_RELEASE':7 , 'DHCP_INFORM':8 }
 | 
		
	
		
			
			|  | 47 | +
 | 
		
	
		
			
			|  | 48 | +DhcpFieldsTypes = {'op':"int",
 | 
		
	
		
			
			|  | 49 | +                     'htype':"int",
 | 
		
	
		
			
			|  | 50 | +                     'hlen':"int",
 | 
		
	
		
			
			|  | 51 | +                     'hops':"int",
 | 
		
	
		
			
			|  | 52 | +                     'xid':"int4",
 | 
		
	
		
			
			|  | 53 | +                     'secs':"int2",
 | 
		
	
		
			
			|  | 54 | +                     'flags':"int2",
 | 
		
	
		
			
			|  | 55 | +                     'ciaddr':"ipv4",
 | 
		
	
		
			
			|  | 56 | +                     'yiaddr':"ipv4",
 | 
		
	
		
			
			|  | 57 | +                     'siaddr':"ipv4",
 | 
		
	
		
			
			|  | 58 | +                     'giaddr':"ipv4",
 | 
		
	
		
			
			|  | 59 | +                     'chaddr':"hwmac",
 | 
		
	
		
			
			|  | 60 | +                     'sname':"str",
 | 
		
	
		
			
			|  | 61 | +                     'file':"str"
 | 
		
	
		
			
			|  | 62 | +                     }
 | 
		
	
		
			
			|  | 63 | +
 | 
		
	
		
			
			|  | 64 | +# DhcpOptions = 'option_name':option_code
 | 
		
	
		
			
			|  | 65 | +DhcpOptions = {'pad':0,
 | 
		
	
		
			
			|  | 66 | +
 | 
		
	
		
			
			|  | 67 | +               # Vendor Extension
 | 
		
	
		
			
			|  | 68 | +               'subnet_mask':1,'time_offset':2,
 | 
		
	
		
			
			|  | 69 | +               'router':3,'time_server':4,'name_server':5,
 | 
		
	
		
			
			|  | 70 | +               'domain_name_server':6,'log_server':7,
 | 
		
	
		
			
			|  | 71 | +               'cookie_server':8,'lpr_server':9,
 | 
		
	
		
			
			|  | 72 | +               'impress_server':10,'resource_location_server':11,
 | 
		
	
		
			
			|  | 73 | +               'host_name':12,'boot_file':13,'merit_dump_file':14,
 | 
		
	
		
			
			|  | 74 | +               'domain_name':15,'swap_server':16,'root_path':17,'extensions_path':18,
 | 
		
	
		
			
			|  | 75 | +
 | 
		
	
		
			
			|  | 76 | +               # IP layer parameters per host
 | 
		
	
		
			
			|  | 77 | +               'ip_forwarding':19,'nonlocal_source_rooting':20,
 | 
		
	
		
			
			|  | 78 | +               'policy_filter':21,'maximum_datagram_reassembly_size':22,
 | 
		
	
		
			
			|  | 79 | +               'default_ip_time-to-live':23,'path_mtu_aging_timeout':24,
 | 
		
	
		
			
			|  | 80 | +               'path_mtu_table':25,
 | 
		
	
		
			
			|  | 81 | +
 | 
		
	
		
			
			|  | 82 | +               # IP layer parameters per interface
 | 
		
	
		
			
			|  | 83 | +               'interface_mtu':26,'all_subnets_are_local':27,
 | 
		
	
		
			
			|  | 84 | +               'broadcast_address':28,'perform_mask_discovery':29,
 | 
		
	
		
			
			|  | 85 | +               'mask_supplier':30,'perform_router_discovery':31,
 | 
		
	
		
			
			|  | 86 | +               'routeur_solicitation_address':32,'static_route':33,
 | 
		
	
		
			
			|  | 87 | +
 | 
		
	
		
			
			|  | 88 | +               # link layer parameters per interface
 | 
		
	
		
			
			|  | 89 | +               'trailer_encapsulation':34,'arp_cache_timeout':35,
 | 
		
	
		
			
			|  | 90 | +               'ethernet_encapsulation':36,
 | 
		
	
		
			
			|  | 91 | +
 | 
		
	
		
			
			|  | 92 | +               # TCP parameters
 | 
		
	
		
			
			|  | 93 | +               'tcp_default_ttl':37,'tcp_keepalive_interval':38,
 | 
		
	
		
			
			|  | 94 | +               'tcp_keepalive_garbage':39,
 | 
		
	
		
			
			|  | 95 | +
 | 
		
	
		
			
			|  | 96 | +               # Applications and service parameters
 | 
		
	
		
			
			|  | 97 | +               'nis_domain':40,
 | 
		
	
		
			
			|  | 98 | +               'nis_servers':41,
 | 
		
	
		
			
			|  | 99 | +               'ntp_servers':42,
 | 
		
	
		
			
			|  | 100 | +               'vendor_specific':43,
 | 
		
	
		
			
			|  | 101 | +               'nbns':44,
 | 
		
	
		
			
			|  | 102 | +               'nbdd':45,'nb_node_type':46,
 | 
		
	
		
			
			|  | 103 | +               'nb_scope':47,'x_window_system_font_server':48,
 | 
		
	
		
			
			|  | 104 | +               'x_window_system_display_manager':49,
 | 
		
	
		
			
			|  | 105 | +
 | 
		
	
		
			
			|  | 106 | +               # DHCP extensions
 | 
		
	
		
			
			|  | 107 | +               'request_ip_address':50,
 | 
		
	
		
			
			|  | 108 | +               'ip_address_lease_time':51,
 | 
		
	
		
			
			|  | 109 | +               'overload':52,
 | 
		
	
		
			
			|  | 110 | +               'dhcp_message_type':53,
 | 
		
	
		
			
			|  | 111 | +               'server_identifier':54,
 | 
		
	
		
			
			|  | 112 | +               'parameter_request_list':55,
 | 
		
	
		
			
			|  | 113 | +               'message':56,
 | 
		
	
		
			
			|  | 114 | +               'maximum_dhcp_message_size':57,
 | 
		
	
		
			
			|  | 115 | +               'renewal_time_value':58,
 | 
		
	
		
			
			|  | 116 | +               'rebinding_time_value':59,
 | 
		
	
		
			
			|  | 117 | +               'vendor_class':60,
 | 
		
	
		
			
			|  | 118 | +               'client_identifier':61,
 | 
		
	
		
			
			|  | 119 | +
 | 
		
	
		
			
			|  | 120 | +               # Add from RFC 2132 
 | 
		
	
		
			
			|  | 121 | +               'netware_ip_domain_name':62,
 | 
		
	
		
			
			|  | 122 | +               'netware_ip_sub_options':63,
 | 
		
	
		
			
			|  | 123 | +               
 | 
		
	
		
			
			|  | 124 | +               'nis+_domain':64,
 | 
		
	
		
			
			|  | 125 | +               'nis+_servers':65,
 | 
		
	
		
			
			|  | 126 | +               'tftp_server_name':66,
 | 
		
	
		
			
			|  | 127 | +               'bootfile_name':67,
 | 
		
	
		
			
			|  | 128 | +               'mobile_ip_home_agent':68,
 | 
		
	
		
			
			|  | 129 | +               'smtp_servers':69,
 | 
		
	
		
			
			|  | 130 | +               'pop_servers':70,
 | 
		
	
		
			
			|  | 131 | +               'nntp_servers':71,
 | 
		
	
		
			
			|  | 132 | +               'default_www_server':72,
 | 
		
	
		
			
			|  | 133 | +               'default_finger_server':73,
 | 
		
	
		
			
			|  | 134 | +               'default_irc_server':74,
 | 
		
	
		
			
			|  | 135 | +               'streettalk_server':75,
 | 
		
	
		
			
			|  | 136 | +               'streettalk_directory_assistance_server':76,
 | 
		
	
		
			
			|  | 137 | +
 | 
		
	
		
			
			|  | 138 | +               'user_class':77,
 | 
		
	
		
			
			|  | 139 | +               'directory_agent':78,
 | 
		
	
		
			
			|  | 140 | +               'service_scope':79,
 | 
		
	
		
			
			|  | 141 | +               'rapid_commit':80,
 | 
		
	
		
			
			|  | 142 | +
 | 
		
	
		
			
			|  | 143 | +               'client_fqdn':81,
 | 
		
	
		
			
			|  | 144 | +               'relay_agent':82,
 | 
		
	
		
			
			|  | 145 | +               'internet_storage_name_service':83,
 | 
		
	
		
			
			|  | 146 | +               '84':84,
 | 
		
	
		
			
			|  | 147 | +               'nds_server':85,
 | 
		
	
		
			
			|  | 148 | +               'nds_tree_name':86,
 | 
		
	
		
			
			|  | 149 | +               'nds_context':87,
 | 
		
	
		
			
			|  | 150 | +               '88':88,
 | 
		
	
		
			
			|  | 151 | +               '89':89,
 | 
		
	
		
			
			|  | 152 | +               'authentication':90,
 | 
		
	
		
			
			|  | 153 | +               'client_last_transaction_time':91,
 | 
		
	
		
			
			|  | 154 | +               'associated_ip':92,
 | 
		
	
		
			
			|  | 155 | +               'client_system':93,
 | 
		
	
		
			
			|  | 156 | +               'client_ndi':94,
 | 
		
	
		
			
			|  | 157 | +               'ldap':95,
 | 
		
	
		
			
			|  | 158 | +               'unassigned':96,
 | 
		
	
		
			
			|  | 159 | +               'uuid_guid':97,
 | 
		
	
		
			
			|  | 160 | +               'open_group_user_auth':98,
 | 
		
	
		
			
			|  | 161 | +               'unassigned':99,
 | 
		
	
		
			
			|  | 162 | +               'unassigned':100,
 | 
		
	
		
			
			|  | 163 | +               'unassigned':101,
 | 
		
	
		
			
			|  | 164 | +               'unassigned':102,
 | 
		
	
		
			
			|  | 165 | +               'unassigned':103,
 | 
		
	
		
			
			|  | 166 | +               'unassigned':104,
 | 
		
	
		
			
			|  | 167 | +               'unassigned':105,
 | 
		
	
		
			
			|  | 168 | +               'unassigned':106,
 | 
		
	
		
			
			|  | 169 | +               'unassigned':107,
 | 
		
	
		
			
			|  | 170 | +               'unassigned':108,
 | 
		
	
		
			
			|  | 171 | +               'unassigned':109,
 | 
		
	
		
			
			|  | 172 | +               'unassigned':110,
 | 
		
	
		
			
			|  | 173 | +               'unassigned':111,
 | 
		
	
		
			
			|  | 174 | +               'netinfo_address':112,
 | 
		
	
		
			
			|  | 175 | +               'netinfo_tag':113,
 | 
		
	
		
			
			|  | 176 | +               'url':114,
 | 
		
	
		
			
			|  | 177 | +               'unassigned':115,
 | 
		
	
		
			
			|  | 178 | +               'auto_config':116,
 | 
		
	
		
			
			|  | 179 | +               'name_service_search':117,
 | 
		
	
		
			
			|  | 180 | +               'subnet_selection':118,
 | 
		
	
		
			
			|  | 181 | +               'domain_search':119,
 | 
		
	
		
			
			|  | 182 | +               'sip_servers':120,
 | 
		
	
		
			
			|  | 183 | +               'classless_static_route':121,
 | 
		
	
		
			
			|  | 184 | +               'cablelabs_client_configuration':122,
 | 
		
	
		
			
			|  | 185 | +               'geoconf':123,
 | 
		
	
		
			
			|  | 186 | +               'vendor_class':124,
 | 
		
	
		
			
			|  | 187 | +               'vendor_specific':125,
 | 
		
	
		
			
			|  | 188 | +               '126':126,'127':127,'128':128,'129':129,
 | 
		
	
		
			
			|  | 189 | +               '130':130,'131':131,'132':132,'133':133,
 | 
		
	
		
			
			|  | 190 | +               '134':134,'135':135,'136':136,'137':137,
 | 
		
	
		
			
			|  | 191 | +               '138':138,'139':139,'140':140,'141':141,
 | 
		
	
		
			
			|  | 192 | +               '142':142,'143':143,'144':144,'145':145,
 | 
		
	
		
			
			|  | 193 | +               '146':146,'147':147,'148':148,'149':149,
 | 
		
	
		
			
			|  | 194 | +               '150':150,'151':151,'152':152,'153':153,
 | 
		
	
		
			
			|  | 195 | +               '154':154,'155':155,'156':156,'157':157,
 | 
		
	
		
			
			|  | 196 | +               '158':158,'159':159,'160':160,'161':161,
 | 
		
	
		
			
			|  | 197 | +               '162':162,'163':163,'164':164,'165':165,
 | 
		
	
		
			
			|  | 198 | +               '166':166,'167':167,'168':168,'169':169,
 | 
		
	
		
			
			|  | 199 | +               '170':170,'171':171,'172':172,'173':173,
 | 
		
	
		
			
			|  | 200 | +               '174':174,'175':175,'176':176,'177':177,
 | 
		
	
		
			
			|  | 201 | +               '178':178,'179':179,'180':180,'181':181,
 | 
		
	
		
			
			|  | 202 | +               '182':182,'183':183,'184':184,'185':185,
 | 
		
	
		
			
			|  | 203 | +               '186':186,'187':187,'188':188,'189':189,
 | 
		
	
		
			
			|  | 204 | +               '190':190,'191':191,'192':192,'193':193,
 | 
		
	
		
			
			|  | 205 | +               '194':194,'195':195,'196':196,'197':197,
 | 
		
	
		
			
			|  | 206 | +               '198':198,'199':199,'200':200,'201':201,
 | 
		
	
		
			
			|  | 207 | +               '202':202,'203':203,'204':204,'205':205,
 | 
		
	
		
			
			|  | 208 | +               '206':206,'207':207,'208':208,'209':209,
 | 
		
	
		
			
			|  | 209 | +               '210':210,'211':211,'212':212,'213':213,
 | 
		
	
		
			
			|  | 210 | +               '214':214,'215':215,'216':216,'217':217,
 | 
		
	
		
			
			|  | 211 | +               '218':218,'219':219,'220':220,'221':221,
 | 
		
	
		
			
			|  | 212 | +               '222':222,'223':223,'224':224,'225':225,
 | 
		
	
		
			
			|  | 213 | +               '226':226,'227':227,'228':228,'229':229,
 | 
		
	
		
			
			|  | 214 | +               '230':230,'231':231,'232':232,'233':233,
 | 
		
	
		
			
			|  | 215 | +               '234':234,'235':235,'236':236,'237':237,
 | 
		
	
		
			
			|  | 216 | +               '238':238,'239':239,'240':240,'241':241,
 | 
		
	
		
			
			|  | 217 | +               '242':242,'243':243,'244':244,'245':245,
 | 
		
	
		
			
			|  | 218 | +               '246':246,'247':247,'248':248,'249':249,
 | 
		
	
		
			
			|  | 219 | +               '250':250,'251':251,'252':252,'253':253,
 | 
		
	
		
			
			|  | 220 | +               '254':254,'end':255
 | 
		
	
		
			
			|  | 221 | +
 | 
		
	
		
			
			|  | 222 | +               }
 | 
		
	
		
			
			|  | 223 | +
 | 
		
	
		
			
			|  | 224 | +# DhcpOptionsList : reverse of DhcpOptions
 | 
		
	
		
			
			|  | 225 | +DhcpOptionsList = ['pad',
 | 
		
	
		
			
			|  | 226 | +
 | 
		
	
		
			
			|  | 227 | +                   # Vendor Extension
 | 
		
	
		
			
			|  | 228 | +                   'subnet_mask','time_offset',
 | 
		
	
		
			
			|  | 229 | +                   'router','time_server','name_server',
 | 
		
	
		
			
			|  | 230 | +                   'domain_name_server','log_server',
 | 
		
	
		
			
			|  | 231 | +                   'cookie_server','lpr_server',
 | 
		
	
		
			
			|  | 232 | +                   'impress_server','resource_location_server',
 | 
		
	
		
			
			|  | 233 | +                   'host_name','boot_file','merit_dump_file',
 | 
		
	
		
			
			|  | 234 | +                   'domain_name','swap_server','root_path','extensions_path',
 | 
		
	
		
			
			|  | 235 | +                   
 | 
		
	
		
			
			|  | 236 | +                   # IP layer parameters per host
 | 
		
	
		
			
			|  | 237 | +                   'ip_forwarding','nonlocal_source_rooting',
 | 
		
	
		
			
			|  | 238 | +                   'policy_filter','maximum_datagram_reassembly_size',
 | 
		
	
		
			
			|  | 239 | +                   'default_ip_time-to-live','path_mtu_aging_timeout',
 | 
		
	
		
			
			|  | 240 | +                   'path_mtu_table',
 | 
		
	
		
			
			|  | 241 | +                   
 | 
		
	
		
			
			|  | 242 | +                   # IP layer parameters per interface
 | 
		
	
		
			
			|  | 243 | +                   'interface_mtu','all_subnets_are_local',
 | 
		
	
		
			
			|  | 244 | +                   'broadcast_address','perform_mask_discovery',
 | 
		
	
		
			
			|  | 245 | +                   'mask_supplier','perform_router_discovery',
 | 
		
	
		
			
			|  | 246 | +                   'routeur_solicitation_address','static_route',
 | 
		
	
		
			
			|  | 247 | +                   
 | 
		
	
		
			
			|  | 248 | +                   # link layer parameters per interface
 | 
		
	
		
			
			|  | 249 | +                   'trailer_encapsulation','arp_cache_timeout',
 | 
		
	
		
			
			|  | 250 | +                   'ethernet_encapsulation',
 | 
		
	
		
			
			|  | 251 | +                   
 | 
		
	
		
			
			|  | 252 | +                   # TCP parameters
 | 
		
	
		
			
			|  | 253 | +                   'tcp_default_ttl','tcp_keepalive_interval',
 | 
		
	
		
			
			|  | 254 | +                   'tcp_keepalive_garbage',
 | 
		
	
		
			
			|  | 255 | +                   
 | 
		
	
		
			
			|  | 256 | +                   # Applications and service parameters
 | 
		
	
		
			
			|  | 257 | +                   'nis_domain',
 | 
		
	
		
			
			|  | 258 | +                   'nis_servers',
 | 
		
	
		
			
			|  | 259 | +                   'ntp_servers',
 | 
		
	
		
			
			|  | 260 | +                   'vendor_specific','nbns',
 | 
		
	
		
			
			|  | 261 | +                   'nbdd','nd_node_type',
 | 
		
	
		
			
			|  | 262 | +                   'nb_scope','x_window_system_font_server',
 | 
		
	
		
			
			|  | 263 | +                   'x_window_system_display_manager',
 | 
		
	
		
			
			|  | 264 | +
 | 
		
	
		
			
			|  | 265 | +                   # DHCP extensions
 | 
		
	
		
			
			|  | 266 | +                   'request_ip_address',
 | 
		
	
		
			
			|  | 267 | +                   'ip_address_lease_time',
 | 
		
	
		
			
			|  | 268 | +                   'overload',
 | 
		
	
		
			
			|  | 269 | +                   'dhcp_message_type',
 | 
		
	
		
			
			|  | 270 | +                   'server_identifier',
 | 
		
	
		
			
			|  | 271 | +                   'parameter_request_list',
 | 
		
	
		
			
			|  | 272 | +                   'message',
 | 
		
	
		
			
			|  | 273 | +                   'maximum_dhcp_message_size',
 | 
		
	
		
			
			|  | 274 | +                   'renewal_time_value',
 | 
		
	
		
			
			|  | 275 | +                   'rebinding_time_value',
 | 
		
	
		
			
			|  | 276 | +                   'vendor_class',
 | 
		
	
		
			
			|  | 277 | +                   'client_identifier',
 | 
		
	
		
			
			|  | 278 | +                   
 | 
		
	
		
			
			|  | 279 | +
 | 
		
	
		
			
			|  | 280 | +                   # adds from RFC 2132,2242
 | 
		
	
		
			
			|  | 281 | +                   'netware_ip_domain_name',
 | 
		
	
		
			
			|  | 282 | +                   'netware_ip_sub_options',
 | 
		
	
		
			
			|  | 283 | +                   'nis+_domain',
 | 
		
	
		
			
			|  | 284 | +                   'nis+_servers',
 | 
		
	
		
			
			|  | 285 | +                   'tftp_server_name',
 | 
		
	
		
			
			|  | 286 | +                   'bootfile_name',
 | 
		
	
		
			
			|  | 287 | +                   'mobile_ip_home_agent',
 | 
		
	
		
			
			|  | 288 | +                   'smtp_servers',
 | 
		
	
		
			
			|  | 289 | +                   'pop_servers',
 | 
		
	
		
			
			|  | 290 | +                   'nntp_servers',
 | 
		
	
		
			
			|  | 291 | +                   'default_www_server',
 | 
		
	
		
			
			|  | 292 | +                   'default_finger_server',
 | 
		
	
		
			
			|  | 293 | +                   'default_irc_server',
 | 
		
	
		
			
			|  | 294 | +                   'streettalk_server',
 | 
		
	
		
			
			|  | 295 | +                   'streettalk_directory_assistance_server',
 | 
		
	
		
			
			|  | 296 | +                   'user_class','directory_agent','service_scope',
 | 
		
	
		
			
			|  | 297 | +
 | 
		
	
		
			
			|  | 298 | +                   # 80
 | 
		
	
		
			
			|  | 299 | +                   'rapid_commit','client_fqdn','relay_agent',
 | 
		
	
		
			
			|  | 300 | +                   'internet_storage_name_service',
 | 
		
	
		
			
			|  | 301 | +                   '84',
 | 
		
	
		
			
			|  | 302 | +                   'nds_server','nds_tree_name','nds_context',
 | 
		
	
		
			
			|  | 303 | +                   '88','89',
 | 
		
	
		
			
			|  | 304 | +
 | 
		
	
		
			
			|  | 305 | +                   #90
 | 
		
	
		
			
			|  | 306 | +                   'authentication',
 | 
		
	
		
			
			|  | 307 | +                   'client_last_transaction_time','associated_ip', #RFC 4388
 | 
		
	
		
			
			|  | 308 | +                   'client_system', 'client_ndi', #RFC 3679
 | 
		
	
		
			
			|  | 309 | +                   'ldap','unassigned','uuid_guid', #RFC 3679
 | 
		
	
		
			
			|  | 310 | +                   'open_group_user_auth', #RFC 2485
 | 
		
	
		
			
			|  | 311 | +
 | 
		
	
		
			
			|  | 312 | +                   # 99->115 RFC3679 
 | 
		
	
		
			
			|  | 313 | +                   'unassigned','unassigned','unassigned',
 | 
		
	
		
			
			|  | 314 | +                   'unassigned','unassigned','unassigned',
 | 
		
	
		
			
			|  | 315 | +                   'unassigned','unassigned','unassigned',
 | 
		
	
		
			
			|  | 316 | +                   'unassigned','unassigned','unassigned',
 | 
		
	
		
			
			|  | 317 | +                   'unassigned','netinfo_address','netinfo_tag',
 | 
		
	
		
			
			|  | 318 | +                   'url','unassigned',
 | 
		
	
		
			
			|  | 319 | +
 | 
		
	
		
			
			|  | 320 | +                   #116
 | 
		
	
		
			
			|  | 321 | +                   'auto_config','name_service_search','subnet_selection',
 | 
		
	
		
			
			|  | 322 | +                   'domain_search','sip_servers','classless_static_route',
 | 
		
	
		
			
			|  | 323 | +                   'cablelabs_client_configuration','geoconf',
 | 
		
	
		
			
			|  | 324 | +
 | 
		
	
		
			
			|  | 325 | +                   #124
 | 
		
	
		
			
			|  | 326 | +                   'vendor_class', 'vendor_specific',
 | 
		
	
		
			
			|  | 327 | +
 | 
		
	
		
			
			|  | 328 | +                   '126','127','128','129',
 | 
		
	
		
			
			|  | 329 | +                   '130','131','132','133','134','135','136','137','138','139',
 | 
		
	
		
			
			|  | 330 | +                   '140','141','142','143','144','145','146','147','148','149',
 | 
		
	
		
			
			|  | 331 | +                   '150','151','152','153','154','155','156','157','158','159',
 | 
		
	
		
			
			|  | 332 | +                   '160','161','162','163','164','165','166','167','168','169',
 | 
		
	
		
			
			|  | 333 | +                   '170','171','172','173','174','175','176','177','178','179',
 | 
		
	
		
			
			|  | 334 | +                   '180','181','182','183','184','185','186','187','188','189',
 | 
		
	
		
			
			|  | 335 | +                   '190','191','192','193','194','195','196','197','198','199',
 | 
		
	
		
			
			|  | 336 | +                   '200','201','202','203','204','205','206','207','208','209',
 | 
		
	
		
			
			|  | 337 | +                   '210','211','212','213','214','215','216','217','218','219',
 | 
		
	
		
			
			|  | 338 | +                   '220','221','222','223','224','225','226','227','228','229',
 | 
		
	
		
			
			|  | 339 | +                   '230','231','232','233','234','235','236','237','238','239',
 | 
		
	
		
			
			|  | 340 | +                   '240','241','242','243','244','245','246','247','248','249',
 | 
		
	
		
			
			|  | 341 | +                   '250','251','252','253','254',
 | 
		
	
		
			
			|  | 342 | +
 | 
		
	
		
			
			|  | 343 | +                   'end'
 | 
		
	
		
			
			|  | 344 | +                   ] 
 | 
		
	
		
			
			|  | 345 | +
 | 
		
	
		
			
			|  | 346 | +
 | 
		
	
		
			
			|  | 347 | +# See http://www.iana.org/assignments/bootp-dhcp-parameters
 | 
		
	
		
			
			|  | 348 | +# FIXME : verify all ipv4+ options, somes are 32 bits...
 | 
		
	
		
			
			|  | 349 | +
 | 
		
	
		
			
			|  | 350 | +DhcpOptionsTypes = {0:"none", 1:"ipv4", 2:"ipv4", 3:"ipv4+", 
 | 
		
	
		
			
			|  | 351 | +                    4:"ipv4+", 5:"ipv4+", 6:"ipv4+", 7:"ipv4+", 
 | 
		
	
		
			
			|  | 352 | +                    8:"ipv4+", 9:"ipv4+", 10:"ipv4+", 11:"ipv4+", 
 | 
		
	
		
			
			|  | 353 | +                    12:"string", 13:"16-bits", 14:"string", 15:"string", 
 | 
		
	
		
			
			|  | 354 | +                    16:"ipv4", 17:"string", 18:"string", 19:"bool", 
 | 
		
	
		
			
			|  | 355 | +                    20:"bool", 21:"ipv4+", 22:"16-bits", 23:"char", 
 | 
		
	
		
			
			|  | 356 | +                    24:"ipv4", 25:"16-bits", 26:"16-bits", 27:"bool", 
 | 
		
	
		
			
			|  | 357 | +                    28:"ipv4", 29:"bool", 30:"bool", 31:"bool", 
 | 
		
	
		
			
			|  | 358 | +                    32:"ipv4", 33:"ipv4+", 34:"bool", 35:"32-bits", 
 | 
		
	
		
			
			|  | 359 | +                    36:"bool", 37:"char", 38:"32-bits", 39:"bool", 
 | 
		
	
		
			
			|  | 360 | +                    40:"string", 41:"ipv4+", 42:"ipv4+", 43:"string", 
 | 
		
	
		
			
			|  | 361 | +                    44:"ipv4+", 45:"ipv4+", 46:"char", 47:"string", 
 | 
		
	
		
			
			|  | 362 | +                    48:"ipv4+", 49:"ipv4+", 50:"ipv4", 51:"32-bits", 
 | 
		
	
		
			
			|  | 363 | +                    52:"char", 53:"char", 54:"32-bits", 55:"char+", 
 | 
		
	
		
			
			|  | 364 | +                    56:"string", 57:"16-bits", 58:"32-bits", 59:"32-bits", 
 | 
		
	
		
			
			|  | 365 | +                    60:"string", 61:"identifier", 62:"string", 63:"RFC2242", 
 | 
		
	
		
			
			|  | 366 | +                    64:"string", 65:"ipv4+", 66:"string", 67:"string", 
 | 
		
	
		
			
			|  | 367 | +                    68:"ipv4", 69:"ipv4+", 70:"ipv4+", 71:"ipv4+",                     
 | 
		
	
		
			
			|  | 368 | +                    72:"ipv4+", 73:"ipv4+", 74:"ipv4+", 75:"ipv4+", 
 | 
		
	
		
			
			|  | 369 | +                    76:"ipv4+", 77:"RFC3004", 78:"RFC2610", 79:"RFC2610", 
 | 
		
	
		
			
			|  | 370 | +                    80:"null", 81:"string", 82:"RFC3046", 83:"RFC4174", 
 | 
		
	
		
			
			|  | 371 | +                    84:"Unassigned", 85:"ipv4+", 86:"RFC2241", 87:"RFC2241", 
 | 
		
	
		
			
			|  | 372 | +                    88:"Unassigned", 89:"Unassigned", 90:"RFC3118", 91:"RFC4388", 
 | 
		
	
		
			
			|  | 373 | +                    92:"ipv4+", 93:"Unassigned", 94:"Unassigned", 95:"Unassigned", 
 | 
		
	
		
			
			|  | 374 | +                    96:"Unassigned", 97:"Unassigned", 98:"string", 99:"Unassigned", 
 | 
		
	
		
			
			|  | 375 | +                    100:"Unassigned", 101:"Unassigned", 102:"Unassigned", 103:"Unassigned", 
 | 
		
	
		
			
			|  | 376 | +                    104:"Unassigned", 105:"Unassigned", 106:"Unassigned", 107:"Unassigned", 
 | 
		
	
		
			
			|  | 377 | +                    108:"Unassigned", 109:"Unassigned", 110:"Unassigned", 111:"Unassigned", 
 | 
		
	
		
			
			|  | 378 | +                    112:"Unassigned", 113:"Unassigned", 114:"Unassigned", 115:"Unassigned", 
 | 
		
	
		
			
			|  | 379 | +                    116:"char", 117:"RFC2937", 118:"ipv4", 119:"RFC3397", 
 | 
		
	
		
			
			|  | 380 | +                    120:"RFC3361",
 | 
		
	
		
			
			|  | 381 | +
 | 
		
	
		
			
			|  | 382 | +                    #TODO
 | 
		
	
		
			
			|  | 383 | +                    121:"Unassigned", 122:"Unassigned", 123:"Unassigned", 
 | 
		
	
		
			
			|  | 384 | +                    124:"Unassigned", 125:"Unassigned", 126:"Unassigned", 127:"Unassigned", 
 | 
		
	
		
			
			|  | 385 | +                    128:"Unassigned", 129:"Unassigned", 130:"Unassigned", 131:"Unassigned", 
 | 
		
	
		
			
			|  | 386 | +                    132:"Unassigned", 133:"Unassigned", 134:"Unassigned", 135:"Unassigned", 
 | 
		
	
		
			
			|  | 387 | +                    136:"Unassigned", 137:"Unassigned", 138:"Unassigned", 139:"Unassigned", 
 | 
		
	
		
			
			|  | 388 | +                    140:"Unassigned", 141:"Unassigned", 142:"Unassigned", 143:"Unassigned", 
 | 
		
	
		
			
			|  | 389 | +                    144:"Unassigned", 145:"Unassigned", 146:"Unassigned", 147:"Unassigned", 
 | 
		
	
		
			
			|  | 390 | +                    148:"Unassigned", 149:"Unassigned", 150:"Unassigned", 151:"Unassigned", 
 | 
		
	
		
			
			|  | 391 | +                    152:"Unassigned", 153:"Unassigned", 154:"Unassigned", 155:"Unassigned", 
 | 
		
	
		
			
			|  | 392 | +                    156:"Unassigned", 157:"Unassigned", 158:"Unassigned", 159:"Unassigned", 
 | 
		
	
		
			
			|  | 393 | +                    160:"Unassigned", 161:"Unassigned", 162:"Unassigned", 163:"Unassigned", 
 | 
		
	
		
			
			|  | 394 | +                    164:"Unassigned", 165:"Unassigned", 166:"Unassigned", 167:"Unassigned", 
 | 
		
	
		
			
			|  | 395 | +                    168:"Unassigned", 169:"Unassigned", 170:"Unassigned", 171:"Unassigned", 
 | 
		
	
		
			
			|  | 396 | +                    172:"Unassigned", 173:"Unassigned", 174:"Unassigned", 175:"Unassigned", 
 | 
		
	
		
			
			|  | 397 | +                    176:"Unassigned", 177:"Unassigned", 178:"Unassigned", 179:"Unassigned", 
 | 
		
	
		
			
			|  | 398 | +                    180:"Unassigned", 181:"Unassigned", 182:"Unassigned", 183:"Unassigned", 
 | 
		
	
		
			
			|  | 399 | +                    184:"Unassigned", 185:"Unassigned", 186:"Unassigned", 187:"Unassigned", 
 | 
		
	
		
			
			|  | 400 | +                    188:"Unassigned", 189:"Unassigned", 190:"Unassigned", 191:"Unassigned", 
 | 
		
	
		
			
			|  | 401 | +                    192:"Unassigned", 193:"Unassigned", 194:"Unassigned", 195:"Unassigned", 
 | 
		
	
		
			
			|  | 402 | +                    196:"Unassigned", 197:"Unassigned", 198:"Unassigned", 199:"Unassigned", 
 | 
		
	
		
			
			|  | 403 | +                    200:"Unassigned", 201:"Unassigned", 202:"Unassigned", 203:"Unassigned", 
 | 
		
	
		
			
			|  | 404 | +                    204:"Unassigned", 205:"Unassigned", 206:"Unassigned", 207:"Unassigned", 
 | 
		
	
		
			
			|  | 405 | +                    208:"Unassigned", 209:"Unassigned", 210:"Unassigned", 211:"Unassigned", 
 | 
		
	
		
			
			|  | 406 | +                    212:"Unassigned", 213:"Unassigned", 214:"Unassigned", 215:"Unassigned", 
 | 
		
	
		
			
			|  | 407 | +                    216:"Unassigned", 217:"Unassigned", 218:"Unassigned", 219:"Unassigned", 
 | 
		
	
		
			
			|  | 408 | +                    220:"Unassigned", 221:"Unassigned", 222:"Unassigned", 223:"Unassigned", 
 | 
		
	
		
			
			|  | 409 | +                    224:"Unassigned", 225:"Unassigned", 226:"Unassigned", 227:"Unassigned", 
 | 
		
	
		
			
			|  | 410 | +                    228:"Unassigned", 229:"Unassigned", 230:"Unassigned", 231:"Unassigned", 
 | 
		
	
		
			
			|  | 411 | +                    232:"Unassigned", 233:"Unassigned", 234:"Unassigned", 235:"Unassigned", 
 | 
		
	
		
			
			|  | 412 | +                    236:"Unassigned", 237:"Unassigned", 238:"Unassigned", 239:"Unassigned", 
 | 
		
	
		
			
			|  | 413 | +                    240:"Unassigned", 241:"Unassigned", 242:"Unassigned", 243:"Unassigned", 
 | 
		
	
		
			
			|  | 414 | +                    244:"Unassigned", 245:"Unassigned"}
 |