1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_DHCP_IPV4_H 17 #define OHOS_DHCP_IPV4_H 18 19 // See: RFC 2132 DHCP Options and BOOTP Vendor Extensions March 1997 20 enum DhcpOptions { 21 22 /* 23 * 3. RFC 1497 Vendor Extensions 24 * This section lists the vendor extensions as defined in RFC 1497. 25 * They are defined here for completeness. 26 */ 27 PAD_OPTION = 0, 28 END_OPTION = 255, 29 30 SUBNET_MASK_OPTION = 1, 31 TIME_OFFSET_OPTION = 2, 32 ROUTER_OPTION = 3, 33 TIME_SERVER_OPTION = 4, 34 NAME_SERVER_OPTION = 5, 35 DOMAIN_NAME_SERVER_OPTION = 6, 36 LOG_SERVER_OPTION = 7, 37 COOKIE_SERVER_OPTION = 8, 38 LPR_SERVER_OPTION = 9, 39 IMPRESS_SERVER_OPTION = 10, 40 RESOURCE_LOCATION_SERVER_OPTION = 11, 41 HOST_NAME_OPTION = 12, 42 BOOT_FILE_SIZE_OPTION = 13, 43 MERIT_DUMP_FILE_OPTION = 14, 44 DOMAIN_NAME_OPTION = 15, 45 SWAP_SERVER_OPTION = 16, 46 ROOT_PATH_OPTION = 17, 47 EXTENSIONS_PATH_OPTION = 18, 48 49 /* 50 * IP Layer Parameters per Host 51 * This section details the options that affect the operation of the IP layer on a per-host basis. 52 */ 53 IP_FORWARDING_OPTION = 19, 54 NON_LOCAL_SOURCE_ROUTING_OPTION = 20, 55 POLICY_FILTER_OPTION = 21, 56 MAXIMUM_DATAGRAM_REASSEMBLY_SIZE_OPTION = 22, 57 DEFAULT_IP_TIME_TO_LIVE_OPTION = 23, 58 PATH_MTU_AGING_TIMEOUT_OPTION = 24, 59 PATH_MTU_PLATEAU_TABLE_OPTION = 25, 60 61 /* 62 * 5. IP Layer Parameters per Interface 63 * This section details the options that affect the operation of the IP layer on a per-interface basis. It is 64 * expected that a client can issue multiple requests, one per interface, in order to configure interfaces with 65 * their specific parameters. 66 */ 67 INTERFACE_MTU_OPTION = 26, 68 ALL_SUBNETS_ARE_LOCAL_OPTION = 27, 69 BROADCAST_ADDRESS_OPTION = 28, 70 PERFORM_MASK_DISCOVERY_OPTION = 29, 71 MASK_SUPPLIER_OPTION = 30, 72 PERFORM_ROUTER_DISCOVERY_OPTION = 31, 73 ROUTER_SOLICITATION_ADDRESS_OPTION = 32, 74 STATIC_ROUTE_OPTION = 33, 75 76 /* 77 * 6. Link Layer Parameters per Interface 78 * This section lists the options that affect the operation of the data link layer on a per-interface basis. 79 */ 80 TRAILER_ENCAPSULATION_OPTION = 34, // 6.1. Trailer Encapsulation Option 81 ARP_CACHE_TIMEOUT_OPTION = 35, // 6.2. ARP Cache Timeout Option 82 ETHERNET_ENCAPSULATION_OPTION = 36, // 6.3. Ethernet Encapsulation Option 83 84 /* 85 * 7. TCP Parameters 86 * This section lists the options that affect the operation of the TCP layer on a per-interface basis. 87 */ 88 TCP_DEFAULT_TTL_OPTION = 37, // 7.1. TCP Default TTL Option 89 TCP_KEEPALIVE_INTERVAL_OPTION = 38, // 7.2. TCP Keepalive Interval Option 90 TCP_KEEPALIVE_GARBAGE_OPTION = 39, // 7.3. TCP Keepalive Garbage Option 91 92 /* 93 * 8. Application and Service Parameters 94 * This section details some miscellaneous options used to configure miscellaneous applications and services. 95 */ 96 NETWORK_INFO_SERVICE_DOMAIN_OPTION = 40, // 8.1. Network Information Service Domain Option 97 NETWORK_INFO_SERVERS_OPTION = 41, // 8.2. Network Information Servers Option 98 NETWORK_TIME_PROTOCOL_SERVERS_OPTION = 42, // 8.3. Network Time Protocol Servers Option 99 VENDOR_SPECIFIC_INFO_OPTION = 43, // 8.4. Vendor Specific Information 100 NETBIOS_OVER_IP_NAME_SERVER_OPTION = 44, // 8.5. NetBIOS over TCP/IP Name Server Option 101 NETBIOS_OVER_IP_DATAGRAM_DIST_SERVER_OPTION = 45, // 8.6. NetBIOS over TCP/IP Datagram Distribution Server Option 102 NETBIOS_OVER_IP_NODE_TYPE_OPTION = 46, // 8.7. NetBIOS over TCP/IP Node Type Option 103 NETBIOS_OVER_IP_SCOPE_OPTION = 47, // 8.8. NetBIOS over TCP/IP Scope Option 104 X_WINDOW_SYSTEM_FONT_SERVER_OPTION = 48, // 8.9. X Window System Font Server Option 105 X_WINDOW_SYSTEM_DISPLAY_MANAGER_OPTION = 49, // 8.10. X Window System Display Manager Option 106 NETWORK_INFO_SERVICE_PLUS_DOMAIN_OPTION = 64, // 8.11. Network Information Service+ Domain Option 107 NETWORK_INFO_SERVICE_PLUS_SERVERS_OPTION = 65, // 8.12. Network Information Service+ Servers Option 108 MOBILE_IP_HOME_AGENT_OPTION = 68, // 8.13. Mobile IP Home Agent option 109 SMTP_SERVER_OPTION = 69, // 8.14. Simple Mail Transport Protocol (SMTP) Server Option 110 POP3_SERVER_OPTION = 70, // 8.15. Post Office Protocol (POP3) Server Option 111 NNTP_SERVER_OPTION = 71, // 8.16. Network News Transport Protocol (NNTP) Server Option 112 DEFAULT_WEB_SERVER_OPTION = 72, // 8.17. Default World Wide Web (WWW) Server Option 113 DEFAULT_FINGER_SERVER_OPTION = 73, // 8.18. Default Finger Server Option 114 DEFAULT_IRC_SERVER_OPTION = 74, // 8.19. Default Internet Relay Chat (IRC) Server Option 115 STREETTALK_SERVER_OPTION = 75, // 8.20. StreetTalk Server Option 116 STDA_SERVER_OPTION = 76, // 8.21. StreetTalk Directory Assistance (STDA) Server Option 117 118 /* 119 * 9. DHCP Extensions 120 * This section details the options that are specific to DHCP. 121 */ 122 REQUESTED_IP_ADDRESS_OPTION = 50, 123 IP_ADDRESS_LEASE_TIME_OPTION = 51, 124 OPTION_OVERLOAD_OPTION = 52, 125 TFTP_SERVER_NAME_OPTION = 66, 126 BOOTFILE_NAME_OPTION = 67, 127 DHCP_MESSAGE_TYPE_OPTION = 53, 128 SERVER_IDENTIFIER_OPTION = 54, 129 PARAMETER_REQUEST_LIST_OPTION = 55, 130 MESSAGE_OPTION = 56, 131 MAXIMUM_DHCP_MESSAGE_SIZE_OPTION = 57, 132 RENEWAL_TIME_VALUE_OPTION = 58, 133 REBINDING_TIME_VALUE_OPTION = 59, 134 VENDOR_CLASS_IDENTIFIER_OPTION = 60, 135 CLIENT_IDENTIFIER_OPTION = 61 136 }; 137 138 #endif