Dhcp_wireSourceDHCP client port 68
DHCP server port 67
Conversions of ops.
Conversions of msgtypes.
type option_code = | PAD| SUBNET_MASK| TIME_OFFSET| ROUTERS| TIME_SERVERS| NAME_SERVERS| DNS_SERVERS| LOG_SERVERS| COOKIE_SERVERS| LPR_SERVERS| IMPRESS_SERVERS| RSCLOCATION_SERVERS| HOSTNAME| BOOTFILE_SIZE| MERIT_DUMPFILE| DOMAIN_NAME| SWAP_SERVER| ROOT_PATH| EXTENSION_PATH| IPFORWARDING| NLSR| POLICY_FILTERS| MAX_DATAGRAM| DEFAULT_IP_TTL| PMTU_AGEING_TIMO| PMTU_PLATEAU_TABLE| INTERFACE_MTU| ALL_SUBNETS_LOCAL| BROADCAST_ADDR| PERFORM_MASK_DISCOVERY| MASK_SUPPLIER| PERFORM_ROUTER_DISC| ROUTER_SOL_ADDR| STATIC_ROUTES| TRAILER_ENCAPSULATION| ARP_CACHE_TIMO| ETHERNET_ENCAPSULATION| TCP_DEFAULT_TTL| TCP_KEEPALIVE_INTERVAL| TCP_KEEPALIVE_GARBAGE| NIS_DOMAIN| NIS_SERVERS| NTP_SERVERS| VENDOR_SPECIFIC| NETBIOS_NAME_SERVERS| NETBIOS_DATAGRAM_DISTRIB_SERVERS| NETBIOS_NODE| NETBIOS_SCOPE| XWINDOW_FONT_SERVERS| XWINDOW_DISPLAY_MANAGERS| REQUEST_IP| IP_LEASE_TIME| OPTION_OVERLOAD| MESSAGE_TYPE| SERVER_IDENTIFIER| PARAMETER_REQUESTS| MESSAGE| MAX_MESSAGE| RENEWAL_T1| REBINDING_T2| VENDOR_CLASS_ID| CLIENT_ID| NETWARE_IP_DOMAIN| NETWARE_IP_OPTION| NIS_PLUS_DOMAIN| NIS_PLUS_SERVERS| TFTP_SERVER_NAME| BOOTFILE_NAME| MOBILE_IP_HOME_AGENT| SMTP_SERVERS| POP3_SERVERS| NNTP_SERVERS| WWW_SERVERS| FINGER_SERVERS| IRC_SERVERS| STREETTALK_SERVERS| STREETTALK_DA| USER_CLASS| DIRECTORY_AGENT| SERVICE_SCOPE| RAPID_COMMIT| CLIENT_FQDN| RELAY_AGENT_INFORMATION| ISNS| UNASSIGNED_84| NDS_SERVERS| NDS_TREE_NAME| NDS_CONTEXT| BCMCS_CONTROLLER_DOMAIN_NAME_LIST| BCMCS_CONTROLLER_IPV4_ADDR| AUTHENTICATION| CLIENT_LAST_TRANSACTION_TIME| ASSOCIATED_IPS| CLIENT_SYSTEM| CLIENT_NDI| LDAP| UNASSIGNED_96| UUID_GUID| USER_AUTH| GEOCONF_CIVIC| PCODE| TCODE| UNASSIGNED_102| UNASSIGNED_103| UNASSIGNED_104| UNASSIGNED_105| UNASSIGNED_106| UNASSIGNED_107| UNASSIGNED_108| UNASSIGNED_109| UNASSIGNED_110| UNASSIGNED_111| NETINFO_ADDRESS| NETINFO_TAG| URL| UNASSIGNED_115| AUTO_CONFIG| NAME_SERVICE_SEARCH| SUBNET_SELECTION| DOMAIN_SEARCH| SIP_SERVERS| CLASSLESS_STATIC_ROUTE| CCC| GEOCONF| VI_VENDOR_CLASS| VI_VENDOR_INFO| UNASSIGNED_126| UNASSIGNED_127| PXE_128| PXE_129| PXE_130| PXE_131| PXE_132| PXE_133| PXE_134| PXE_135| PANA_AGENT| V4_LOST| CAPWAP_AC_V4| IPV4_ADDRESS_MOS| IPV4_FQDN_MOS| SIP_UA_DOMAINS| IPV4_ADDRESS_ANDSF| UNASSIGNED_143| GEOLOCK| FORCENEW_NONCE_CAPABLE| RDNSS_SELECTION| UNASSIGNED_147| UNASSIGNED_148| UNASSIGNED_149| MISC_150| STATUS_CODE| ABSOLUTE_TIME| START_TIME_OF_STATE| QUERY_START_TIME| QUERY_END_TIME| DHCP_STATE| DATA_SOURCE| V4_PCP_SERVER| V4_PORTPARAMS| DHCP_CAPTIVE_PORTAL| UNASSIGNED_161| UNASSIGNED_162| UNASSIGNED_163| UNASSIGNED_164| UNASSIGNED_165| UNASSIGNED_166| UNASSIGNED_167| UNASSIGNED_168| UNASSIGNED_169| UNASSIGNED_170| UNASSIGNED_171| UNASSIGNED_172| UNASSIGNED_173| UNASSIGNED_174| ETHERBOOT_175| IP_TELEFONE| ETHERBOOT_177| UNASSIGNED_178| UNASSIGNED_179| UNASSIGNED_180| UNASSIGNED_181| UNASSIGNED_182| UNASSIGNED_183| UNASSIGNED_184| UNASSIGNED_185| UNASSIGNED_186| UNASSIGNED_187| UNASSIGNED_188| UNASSIGNED_189| UNASSIGNED_190| UNASSIGNED_191| UNASSIGNED_192| UNASSIGNED_193| UNASSIGNED_194| UNASSIGNED_195| UNASSIGNED_196| UNASSIGNED_197| UNASSIGNED_198| UNASSIGNED_199| UNASSIGNED_200| UNASSIGNED_201| UNASSIGNED_202| UNASSIGNED_203| UNASSIGNED_204| UNASSIGNED_205| UNASSIGNED_206| UNASSIGNED_207| PXE_LINUX| CONFIGURATION_FILE| PATH_PREFIX| REBOOT_TIME| OPTION_6RD| V4_ACCESS_DOMAIN| UNASSIGNED_214| UNASSIGNED_215| UNASSIGNED_216| UNASSIGNED_217| UNASSIGNED_218| UNASSIGNED_219| SUBNET_ALLOCATION| VIRTUAL_SUBNET_SELECTION| UNASSIGNED_222| UNASSIGNED_223| RESERVED_224| RESERVED_225| RESERVED_226| RESERVED_227| RESERVED_228| RESERVED_229| RESERVED_230| RESERVED_231| RESERVED_232| RESERVED_233| RESERVED_234| RESERVED_235| RESERVED_236| RESERVED_237| RESERVED_238| RESERVED_239| RESERVED_240| RESERVED_241| RESERVED_242| RESERVED_243| RESERVED_244| RESERVED_245| RESERVED_246| RESERVED_247| RESERVED_248| PRIVATE_CLASSLESS_STATIC_ROUTE| RESERVED_250| RESERVED_251| WEB_PROXY_AUTO_DISC| RESERVED_253| RESERVED_254| ENDConversions of DHCP option_codes.
Conversions of htype.
Conversions of flags.
type client_id = | Hwaddr of Macaddr.t| Id of int * stringA client_id is usually a mac address from a dhcp_option, but it can also be an opaque string. See client_id_of_pkt.
Conversions of client_id.
type dhcp_option = | Pad| Subnet_mask of Ipaddr.V4.t| Time_offset of int32| Routers of Ipaddr.V4.t list| Time_servers of Ipaddr.V4.t list| Name_servers of Ipaddr.V4.t list| Dns_servers of Ipaddr.V4.t list| Log_servers of Ipaddr.V4.t list| Cookie_servers of Ipaddr.V4.t list| Lpr_servers of Ipaddr.V4.t list| Impress_servers of Ipaddr.V4.t list| Rsclocation_servers of Ipaddr.V4.t list| Hostname of string| Bootfile_size of int| Merit_dumpfile of string| Domain_name of string| Swap_server of Ipaddr.V4.t| Root_path of string| Extension_path of string| Ipforwarding of bool| Nlsr of bool| Policy_filters of Ipaddr.V4.Prefix.t list| Max_datagram of int| Default_ip_ttl of int| Pmtu_ageing_timo of int32| Pmtu_plateau_table of int list| Interface_mtu of int| All_subnets_local of bool| Broadcast_addr of Ipaddr.V4.t| Perform_mask_discovery of bool| Mask_supplier of bool| Perform_router_disc of bool| Router_sol_addr of Ipaddr.V4.t| Static_routes of (Ipaddr.V4.t * Ipaddr.V4.t) list| Trailer_encapsulation of bool| Arp_cache_timo of int32| Ethernet_encapsulation of bool| Tcp_default_ttl of int| Tcp_keepalive_interval of int32| Tcp_keepalive_garbage of int| Nis_domain of string| Nis_servers of Ipaddr.V4.t list| Ntp_servers of Ipaddr.V4.t list| Vendor_specific of string| Netbios_name_servers of Ipaddr.V4.t list| Netbios_datagram_distrib_servers of Ipaddr.V4.t list| Netbios_node of int| Netbios_scope of string| Xwindow_font_servers of Ipaddr.V4.t list| Xwindow_display_managers of Ipaddr.V4.t list| Request_ip of Ipaddr.V4.t| Ip_lease_time of int32| Option_overload of int| Message_type of msgtype| Server_identifier of Ipaddr.V4.t| Parameter_requests of option_code list| Message of string| Max_message of int| Renewal_t1 of int32| Rebinding_t2 of int32| Vendor_class_id of string| Client_id of client_id| Netware_ip_domain of string| Netware_ip_option of string| Nis_plus_domain of string| Nis_plus_servers of Ipaddr.V4.t list| Tftp_server_name of string| Bootfile_name of string| Mobile_ip_home_agent of Ipaddr.V4.t list| Smtp_servers of Ipaddr.V4.t list| Pop3_servers of Ipaddr.V4.t list| Nntp_servers of Ipaddr.V4.t list| Www_servers of Ipaddr.V4.t list| Finger_servers of Ipaddr.V4.t list| Irc_servers of Ipaddr.V4.t list| Streettalk_servers of Ipaddr.V4.t list| Streettalk_da of Ipaddr.V4.t list| User_class of string| Directory_agent of string| Service_scope of string| Rapid_commit| Client_fqdn of string| Relay_agent_information of string| Isns of string| Nds_servers of string| Nds_tree_name of string| Nds_context of string| Bcmcs_controller_domain_name_list of string| Bcmcs_controller_ipv4_addrs of Ipaddr.V4.t list| Authentication of string| Client_last_transaction_time of int32| Associated_ips of Ipaddr.V4.t list| Client_system of string| Client_ndi of string| Ldap of string| Uuid_guid of string| User_auth of string| Geoconf_civic of string| Pcode of string| Tcode of string| Netinfo_address of string| Netinfo_tag of string| Url of string| Auto_config of int| Name_service_search of string| Subnet_selection of Ipaddr.V4.t| Domain_search of string| Sip_servers of string| Classless_static_route of string| Ccc of string| Geoconf of string| Vi_vendor_class of string| Vi_vendor_info of string| Pxe_128 of string| Pxe_129 of string| Pxe_130 of string| Pxe_131 of string| Pxe_132 of string| Pxe_133 of string| Pxe_134 of string| Pxe_135 of string| Pana_agent of string| V4_lost of string| Capwap_ac_v4 of string| Ipv4_address_mos of string| Ipv4_fqdn_mos of string| Sip_ua_domains of string| Ipv4_address_andsf of string| Geolock of string| Forcenew_nonce_capable of string| Rdnss_selection of string| Misc_150 of string| Status_code of string| Absolute_time of int32| Start_time_of_state of int32| Query_start_time of int32| Query_end_time of int32| Dhcp_state of int| Data_source of int| V4_pcp_server of string| V4_portparams of string| Dhcp_captive_portal of string| Etherboot_175 of string| Ip_telefone of string| Etherboot_177 of string| Pxe_linux of int32| Configuration_file of string| Path_prefix of string| Reboot_time of int32| Option_6rd of string| V4_access_domain of string| Subnet_allocation of int| Virtual_subnet_selection of string| Private_classless_static_route of string| Web_proxy_auto_disc of string| End| Unassigned of option_code * stringNot all options are currently implemented.
Conversions of dhcp_option.
find_option f l finds the first option where f evaluates to Some value on list l
collect_options f l collects all options where f evaluates to Some value on list l, this is useful for list options like Routers, if multiple list options are found, the resulting list is flattened.
type pkt = {srcmac : Macaddr.t;dstmac : Macaddr.t;srcip : Ipaddr.V4.t;dstip : Ipaddr.V4.t;srcport : int;dstport : int;op : op;htype : htype;hlen : int;hops : int;xid : int32;secs : int;flags : flags;ciaddr : Ipaddr.V4.t;yiaddr : Ipaddr.V4.t;siaddr : Ipaddr.V4.t;giaddr : Ipaddr.V4.t;chaddr : Macaddr.t;sname : string;file : string;options : dhcp_option list;}Conversions for pkt.
Helpers.