Page
Library
Module
Module type
Parameter
Class
Class type
Source
Dhcp_wire
SourceDHCP client port 68
DHCP server port 67
Conversions of op
s.
Conversions of msgtype
s.
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_INFO
| MISC_150
| PRIVATE_CLASSLESS_STATIC_ROUTE
| WEB_PROXY_AUTO_DISC
| END
| OTHER of int
Conversions of DHCP option_code
s.
Conversions of htype
.
Conversions of flags
.
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. See client_id_of_pkt
.
Conversions of client_id
.
type client_fqdn =
[ `Server_A | `Overriden | `No_update | `Wire_encoding ] list
* [ `raw ] Domain_name.t
A client_fqdn is some flags, and a domain name.
Conversions of client_fqdn
.
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_info of string
| 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.
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.