package charrua
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=1e70defcd57a803acf4e905ceae4d9e5a763e6400e4216a207fe99bc94c099af
sha512=dcb137df2b1d04d8bcaad730ba4340d9f649076fdd76e2a3797eee779c96501254339f0357693ee4a49e7c406a653889843d5a1d2f63bb43e15e45f1ea12b3e1
doc/charrua/Dhcp_wire/index.html
Module Dhcp_wireSource
DHCP general data
DHCP client port 68
DHCP server port 67
DHCP header opcodes
Conversions of ops.
DHCP message type option values
Conversions of msgtypes.
DHCP option codes (names only, for use in parameter requests)
type option_code = | PAD| SUBNET_MASK| TIME_OFFSET| ROUTERS| DNS_SERVERS| LOG_SERVERS| LPR_SERVERS| HOSTNAME| BOOTFILE_SIZE| DOMAIN_NAME| SWAP_SERVER| ROOT_PATH| EXTENSION_PATH| IPFORWARDING| NLSR| POLICY_FILTERS| MAX_DATAGRAM| DEFAULT_IP_TTL| INTERFACE_MTU| ALL_SUBNETS_LOCAL| BROADCAST_ADDR| PERFORM_ROUTER_DISC| ROUTER_SOL_ADDR| STATIC_ROUTES| TRAILER_ENCAPSULATION| ARP_CACHE_TIMO| ETHERNET_ENCAPSULATION| TCP_DEFAULT_TTL| TCP_KEEPALIVE_INTERVAL| 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| NIS_PLUS_DOMAIN| NIS_PLUS_SERVERS| TFTP_SERVER_NAME| BOOTFILE_NAME| MOBILE_IP_HOME_AGENT| SMTP_SERVERS| POP3_SERVERS| NNTP_SERVERS| IRC_SERVERS| USER_CLASS| RAPID_COMMIT| CLIENT_FQDN| RELAY_AGENT_INFORMATION| CLIENT_SYSTEM| CLIENT_NDI| UUID_GUID| PCODE| TCODE| IPV6ONLY| SUBNET_SELECTION| DOMAIN_SEARCH| SIP_SERVERS| CLASSLESS_STATIC_ROUTE| VI_VENDOR_CLASS| VI_VENDOR_INFO| MISC_150| PRIVATE_CLASSLESS_STATIC_ROUTE| WEB_PROXY_AUTO_DISC| END| OTHER of int
Conversions of DHCP option_codes.
DHCP hardware type
Conversions of htype.
DHCP header flags
Conversions of flags.
DHCP Client identifier
type client_id = | Hwaddr of Macaddr.t| Id of int * string(*A client_id is usually a mac address from a
*)dhcp_option, but it can also be an opaque string. Seeclient_id_of_pkt.
Conversions of client_id.
type client_fqdn =
[ `Server_A | `Overriden | `No_update | `Wire_encoding ] list
* [ `raw ] Domain_name.tA client_fqdn is some flags, and a domain name.
Conversions of client_fqdn.
DHCP options
type dhcp_option = | Pad| Subnet_mask of Ipaddr.V4.t| Time_offset of int32| Routers of Ipaddr.V4.t list| Dns_servers of Ipaddr.V4.t list| Log_servers of Ipaddr.V4.t list| Lpr_servers of Ipaddr.V4.t list| Hostname of string| Bootfile_size of int| 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| Interface_mtu of int| All_subnets_local of bool| Broadcast_addr of Ipaddr.V4.t| 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| 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| 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| Irc_servers of Ipaddr.V4.t list| User_class of string| Rapid_commit| Client_fqdn of client_fqdn| Relay_agent_information of string| Client_system of string| Client_ndi of string| Uuid_guid of string| Pcode of string| Tcode of string| IPv6_only of int32| Subnet_selection of Ipaddr.V4.t| Domain_search of string| Sip_servers of string| Classless_static_route of string| Vi_vendor_class of (int32 * string list) list| Vi_vendor_info of (int32 * (int * string) list) list(*Vendor-identifying vendor information. It's a non-empty list of pairs of enterprise numbers and suboptions. The sub options is a pair of a u8 (0-255) and sub-option data
*)| Misc_150 of string| Private_classless_static_route of string| Web_proxy_auto_disc of string| End| Other of int * string(*Not 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.
DHCP Packet - fixed-length fields, plus a variable-length list of options
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.