pub fn title(code: u8) -> Option<&'static str> {
    Some(match code {
        SUBNET_MASK => "Subnet Mask",

        TIME_OFFSET => "Time Offset",
        ROUTER => "Router",
        TIME_SERVER => "Time Server",
        NAME_SERVER => "Name Server",
        DOMAIN_NAME_SERVER => "Domain Name Server",
        LOG_SERVER => "Log Server",
        COOKIE_SERVER => "Cookie Server",
        LPR_SERVER => "LPR Server",
        IMPRESS_SERVER => "Impress Server",
        RESOURCE_LOCATION_SERVER => "Resource Location Server",
        HOST_NAME => "Host Name",
        BOOT_FILE_SIZE => "Boot File Size",
        MERIT_DUMP_FILE => "Merit Dump File",
        DOMAIN_NAME => "Domain Name",
        SWAP_SERVER => "Swap Server",
        ROOT_PATH => "Root Path",
        EXTENSIONS_PATH => "Extensions Path",

        // IP LAYER PARAMETERS PER HOST",
        IP_FORWARDING_ENABLE_DISABLE => "IP Forwarding Enable/Disable",
        NON_LOCAL_SOURCE_ROUTING_ENABLE_DISABLE => "Non-Local Source Routing Enable/Disable",
        POLICY_FILTER => "Policy Filter",
        MAXIMUM_DATAGRAM_REASSEMBLY_SIZE => "Maximum Datagram Reassembly Size",
        DEFAULT_IP_TIME_TO_LIVE => "Default IP Time-to-live",
        PATH_MTU_AGING_TIMEOUT => "Path MTU Aging Timeout",
        PATH_MTU_PLATEAU_TABLE => "Path MTU Plateau Table",

        // IP LAYER PARAMETERS PER INTERFACE",
        INTERFACE_MTU => "Interface MTU",
        ALL_SUBNETS_ARE_LOCAL => "All Subnets are Local",
        BROADCAST_ADDRESS => "Broadcast Address",
        PERFORM_MASK_DISCOVERY => "Perform Mask Discovery",
        MASK_SUPPLIER => "Mask Supplier",
        PERFORM_ROUTER_DISCOVERY => "Perform Router Discovery",
        ROUTER_SOLICITATION_ADDRESS => "Router Solicitation Address",
        STATIC_ROUTE => "Static Route",

        // LINK LAYER PARAMETERS PER INTERFACE",
        TRAILER_ENCAPSULATION => "Trailer Encapsulation",
        ARP_CACHE_TIMEOUT => "ARP Cache Timeout",
        ETHERNET_ENCAPSULATION => "Ethernet Encapsulation",

        // TCP PARAMETERS",
        TCP_DEFAULT_TTL => "TCP Default TTL",
        TCP_KEEPALIVE_INTERVAL => "TCP Keepalive Interval",
        TCP_KEEPALIVE_GARBAGE => "TCP Keepalive Garbage",

        // APPLICATION AND SERVICE PARAMETERS",
        NETWORK_INFORMATION_SERVICE_DOMAIN => "Network Information Service Domain",
        NETWORK_INFORMATION_SERVERS => "Network Information Servers",
        NETWORK_TIME_PROTOCOL_SERVERS => "Network Time Protocol Servers",
        VENDOR_SPECIFIC_INFORMATION => "Vendor Specific Information",
        NETBIOS_OVER_TCPIP_NAME_SERVER => "NetBIOS over TCP/IP Name Server",
        NETBIOS_OVER_TCPIP_DATAGRAM_DISTRIBUTION_SERVER => "NetBIOS over TCP/IP Datagram Distribution Server",
        NETBIOS_OVER_TCPIP_NODE_TYPE => "NetBIOS over TCP/IP Node Type",
        NETBIOS_OVER_TCPIP_SCOPE => "NetBIOS over TCP/IP Scope",
        XWINDOW_SYSTEM_FONT_SERVER => "X Window System Font Server",
        XWINDOW_SYSTEM_DISPLAY_MANAGER => "X Window System Display Manager",
        NETWORK_INFORMATION_SERVICEPLUS_DOMAIN => "Network Information Service+ Domain",
        NETWORK_INFORMATION_SERVICEPLUS_SERVERS => "Network Information Service+ Servers",
        MOBILE_IP_HOME_AGENT => "Mobile IP Home Agent",
        SIMPLE_MAIL_TRANSPORT_PROTOCOL => "Simple Mail Transport Protocol (SMTP) Server",
        POST_OFFICE_PROTOCOL_SERVER => "Post Office Protocol (POP3) Server",
        NETWORK_NEWS_TRANSPORT_PROTOCOL => "Network News Transport Protocol (NNTP) Server",
        DEFAULT_WORLD_WIDE_WEB_SERVER => "Default World Wide Web (WWW) Server",
        DEFAULT_FINGER_SERVER => "Default Finger Server",
        DEFAULT_INTERNET_RELAY_CHAT_SERVER => "Default Internet Relay Chat (IRC) Server",
        STREETTALK_SERVER => "StreetTalk Server",
        STREETTALK_DIRECTORY_ASSISTANCE => "StreetTalk Directory Assistance (STDA) Server",

        RELAY_AGENT_INFORMATION => "Relay Agent Information",

        // DHCP EXTENSIONS
        REQUESTED_IP_ADDRESS => "Requested IP Address",
        IP_ADDRESS_LEASE_TIME => "IP Address Lease Time",
        OVERLOAD => "Overload",
        DHCP_MESSAGE_TYPE => "DHCP Message Type",
        SERVER_IDENTIFIER => "Server Identifier",
        PARAMETER_REQUEST_LIST => "Parameter Request List",
        MESSAGE => "Message",
        MAXIMUM_DHCP_MESSAGE_SIZE => "Maximum DHCP Message Size",
        RENEWAL_TIME_VALUE => "Renewal (T1) Time Value",
        REBINDING_TIME_VALUE => "Rebinding (T2) Time Value",
        VENDOR_CLASS_IDENTIFIER => "Vendor class identifier",
        CLIENT_IDENTIFIER => "Client-identifier",

        // Find below
        TFTP_SERVER_NAME => "TFTP server name",
        BOOTFILE_NAME => "Bootfile name",

        USER_CLASS => "User Class",

        CLIENT_ARCHITECTURE => "Client Architecture",

        TZ_POSIX_STRING => "TZ-POSIX String",
        TZ_DATABASE_STRING => "TZ-Database String",
        CLASSLESS_ROUTE_FORMAT => "Classless Route Format",

        _ => return None,
    })
}
/// Returns title of DHCP Option code, if known.
Returns title of DHCP Option code, if known.
Returns title of DHCP Option code if known .
pub fn title(code: u8) -> Option<&'static str> {
    Some(match code {
        SUBNET_MASK => "Subnet Mask",
        TIME_OFFSET => "Time Offset",
        ROUTER => "Router",
        TIME_SERVER => "Time Server",
        NAME_SERVER => "Name Server",
        DOMAIN_NAME_SERVER => "Domain Name Server",
        LOG_SERVER => "Log Server",
        COOKIE_SERVER => "Cookie Server",
        LPR_SERVER => "LPR Server",
        IMPRESS_SERVER => "Impress Server",
        RESOURCE_LOCATION_SERVER => "Resource Location Server",
        HOST_NAME => "Host Name",
        BOOT_FILE_SIZE => "Boot File Size",
        MERIT_DUMP_FILE => "Merit Dump File",
        DOMAIN_NAME => "Domain Name",
        SWAP_SERVER => "Swap Server",
        ROOT_PATH => "Root Path",
        EXTENSIONS_PATH => "Extensions Path",
        // IP LAYER PARAMETERS PER HOST",
        IP_FORWARDING_ENABLE_DISABLE => "IP Forwarding Enable/Disable",
        NON_LOCAL_SOURCE_ROUTING_ENABLE_DISABLE => "Non-Local Source Routing Enable/Disable",
        POLICY_FILTER => "Policy Filter",
        MAXIMUM_DATAGRAM_REASSEMBLY_SIZE => "Maximum Datagram Reassembly Size",
        DEFAULT_IP_TIME_TO_LIVE => "Default IP Time-to-live",
        PATH_MTU_AGING_TIMEOUT => "Path MTU Aging Timeout",
        PATH_MTU_PLATEAU_TABLE => "Path MTU Plateau Table",
        // IP LAYER PARAMETERS PER INTERFACE",
        INTERFACE_MTU => "Interface MTU",
        ALL_SUBNETS_ARE_LOCAL => "All Subnets are Local",
        BROADCAST_ADDRESS => "Broadcast Address",
        PERFORM_MASK_DISCOVERY => "Perform Mask Discovery",
        MASK_SUPPLIER => "Mask Supplier",
        PERFORM_ROUTER_DISCOVERY => "Perform Router Discovery",
        ROUTER_SOLICITATION_ADDRESS => "Router Solicitation Address",
        STATIC_ROUTE => "Static Route",
        // LINK LAYER PARAMETERS PER INTERFACE",
        TRAILER_ENCAPSULATION => "Trailer Encapsulation",
        ARP_CACHE_TIMEOUT => "ARP Cache Timeout",
        ETHERNET_ENCAPSULATION => "Ethernet Encapsulation",
        // TCP PARAMETERS",
        TCP_DEFAULT_TTL => "TCP Default TTL",
        TCP_KEEPALIVE_INTERVAL => "TCP Keepalive Interval",
        TCP_KEEPALIVE_GARBAGE => "TCP Keepalive Garbage",
        // APPLICATION AND SERVICE PARAMETERS",
        NETWORK_INFORMATION_SERVICE_DOMAIN => "Network Information Service Domain",
        NETWORK_INFORMATION_SERVERS => "Network Information Servers",
        NETWORK_TIME_PROTOCOL_SERVERS => "Network Time Protocol Servers",
        VENDOR_SPECIFIC_INFORMATION => "Vendor Specific Information",
        NETBIOS_OVER_TCPIP_NAME_SERVER => "NetBIOS over TCP/IP Name Server",
        NETBIOS_OVER_TCPIP_DATAGRAM_DISTRIBUTION_SERVER => "NetBIOS over TCP/IP Datagram Distribution Server",
        NETBIOS_OVER_TCPIP_NODE_TYPE => "NetBIOS over TCP/IP Node Type",
        NETBIOS_OVER_TCPIP_SCOPE => "NetBIOS over TCP/IP Scope",
        XWINDOW_SYSTEM_FONT_SERVER => "X Window System Font Server",
        XWINDOW_SYSTEM_DISPLAY_MANAGER => "X Window System Display Manager",
        NETWORK_INFORMATION_SERVICEPLUS_DOMAIN => "Network Information Service+ Domain",
        NETWORK_INFORMATION_SERVICEPLUS_SERVERS => "Network Information Service+ Servers",
        MOBILE_IP_HOME_AGENT => "Mobile IP Home Agent",
        SIMPLE_MAIL_TRANSPORT_PROTOCOL => "Simple Mail Transport Protocol (SMTP) Server",
        POST_OFFICE_PROTOCOL_SERVER => "Post Office Protocol (POP3) Server",
        NETWORK_NEWS_TRANSPORT_PROTOCOL => "Network News Transport Protocol (NNTP) Server",
        DEFAULT_WORLD_WIDE_WEB_SERVER => "Default World Wide Web (WWW) Server",
        DEFAULT_FINGER_SERVER => "Default Finger Server",
        DEFAULT_INTERNET_RELAY_CHAT_SERVER => "Default Internet Relay Chat (IRC) Server",
        STREETTALK_SERVER => "StreetTalk Server",
        STREETTALK_DIRECTORY_ASSISTANCE => "StreetTalk Directory Assistance (STDA) Server",
        RELAY_AGENT_INFORMATION => "Relay Agent Information",
        // DHCP EXTENSIONS
        REQUESTED_IP_ADDRESS => "Requested IP Address",
        IP_ADDRESS_LEASE_TIME => "IP Address Lease Time",
        OVERLOAD => "Overload",
        DHCP_MESSAGE_TYPE => "DHCP Message Type",
        SERVER_IDENTIFIER => "Server Identifier",
        PARAMETER_REQUEST_LIST => "Parameter Request List",
        MESSAGE => "Message",
        MAXIMUM_DHCP_MESSAGE_SIZE => "Maximum DHCP Message Size",
        RENEWAL_TIME_VALUE => "Renewal (T1) Time Value",
        REBINDING_TIME_VALUE => "Rebinding (T2) Time Value",
        VENDOR_CLASS_IDENTIFIER => "Vendor class identifier",
        CLIENT_IDENTIFIER => "Client-identifier",
        // Find below
        TFTP_SERVER_NAME => "TFTP server name",
        BOOTFILE_NAME => "Bootfile name",
        USER_CLASS => "User Class",
        CLIENT_ARCHITECTURE => "Client Architecture",
        TZ_POSIX_STRING => "TZ-POSIX String",
        TZ_DATABASE_STRING => "TZ-Database String",
        CLASSLESS_ROUTE_FORMAT => "Classless Route Format",
        _ => return None,
    })
}
pub fn title ( code : u8 ) -> Option < & ' static str > { Some ( match code { SUBNET_MASK => " " , TIME_OFFSET => " " , ROUTER => " " , TIME_SERVER => " " , NAME_SERVER => " " , DOMAIN_NAME_SERVER => " " , LOG_SERVER => " " , COOKIE_SERVER => " " , LPR_SERVER => " " , IMPRESS_SERVER => " " , RESOURCE_LOCATION_SERVER => " " , HOST_NAME => " " , BOOT_FILE_SIZE => " " , MERIT_DUMP_FILE => " " , DOMAIN_NAME => " " , SWAP_SERVER => " " , ROOT_PATH => " " , EXTENSIONS_PATH => " " , // IP LAYER PARAMETERS PER HOST", IP_FORWARDING_ENABLE_DISABLE => " " , NON_LOCAL_SOURCE_ROUTING_ENABLE_DISABLE => " " , POLICY_FILTER => " " , MAXIMUM_DATAGRAM_REASSEMBLY_SIZE => " " , DEFAULT_IP_TIME_TO_LIVE => " " , PATH_MTU_AGING_TIMEOUT => " " , PATH_MTU_PLATEAU_TABLE => " " , // IP LAYER PARAMETERS PER INTERFACE", INTERFACE_MTU => " " , ALL_SUBNETS_ARE_LOCAL => " " , BROADCAST_ADDRESS => " " , PERFORM_MASK_DISCOVERY => " " , MASK_SUPPLIER => " " , PERFORM_ROUTER_DISCOVERY => " " , ROUTER_SOLICITATION_ADDRESS => " " , STATIC_ROUTE => " " , // LINK LAYER PARAMETERS PER INTERFACE", TRAILER_ENCAPSULATION => " " , ARP_CACHE_TIMEOUT => " " , ETHERNET_ENCAPSULATION => " " , // TCP PARAMETERS", TCP_DEFAULT_TTL => " " , TCP_KEEPALIVE_INTERVAL => " " , TCP_KEEPALIVE_GARBAGE => " " , // APPLICATION AND SERVICE PARAMETERS", NETWORK_INFORMATION_SERVICE_DOMAIN => " " , NETWORK_INFORMATION_SERVERS => " " , NETWORK_TIME_PROTOCOL_SERVERS => " " , VENDOR_SPECIFIC_INFORMATION => " " , NETBIOS_OVER_TCPIP_NAME_SERVER => " " , NETBIOS_OVER_TCPIP_DATAGRAM_DISTRIBUTION_SERVER => " " , NETBIOS_OVER_TCPIP_NODE_TYPE => " " , NETBIOS_OVER_TCPIP_SCOPE => " " , XWINDOW_SYSTEM_FONT_SERVER => " " , XWINDOW_SYSTEM_DISPLAY_MANAGER => " " , NETWORK_INFORMATION_SERVICEPLUS_DOMAIN => " " , NETWORK_INFORMATION_SERVICEPLUS_SERVERS => " " , MOBILE_IP_HOME_AGENT => " " , SIMPLE_MAIL_TRANSPORT_PROTOCOL => " " , POST_OFFICE_PROTOCOL_SERVER => " " , NETWORK_NEWS_TRANSPORT_PROTOCOL => " " , DEFAULT_WORLD_WIDE_WEB_SERVER => " " , DEFAULT_FINGER_SERVER => " " , DEFAULT_INTERNET_RELAY_CHAT_SERVER => " " , STREETTALK_SERVER => " " , STREETTALK_DIRECTORY_ASSISTANCE => " " , RELAY_AGENT_INFORMATION => " " , // DHCP EXTENSIONS REQUESTED_IP_ADDRESS => " " , IP_ADDRESS_LEASE_TIME => " " , OVERLOAD => " " , DHCP_MESSAGE_TYPE => " " , SERVER_IDENTIFIER => " " , PARAMETER_REQUEST_LIST => " " , MESSAGE => " " , MAXIMUM_DHCP_MESSAGE_SIZE => " " , RENEWAL_TIME_VALUE => " " , REBINDING_TIME_VALUE => " " , VENDOR_CLASS_IDENTIFIER => " " , CLIENT_IDENTIFIER => " " , // Find below TFTP_SERVER_NAME => " " , BOOTFILE_NAME => " " , USER_CLASS => " " , CLIENT_ARCHITECTURE => " " , TZ_POSIX_STRING => " " , TZ_DATABASE_STRING => " " , CLASSLESS_ROUTE_FORMAT => " " , _ => return None , } ) }
Returns title of DHCP Option code, if known.
Returns title of DHCP Option code if known .
code
u8
code
u8