1518678f8Sopenharmony_ci/*
2518678f8Sopenharmony_ci * Copyright (C) 2021 Huawei Device Co., Ltd.
3518678f8Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4518678f8Sopenharmony_ci * you may not use this file except in compliance with the License.
5518678f8Sopenharmony_ci * You may obtain a copy of the License at
6518678f8Sopenharmony_ci *
7518678f8Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8518678f8Sopenharmony_ci *
9518678f8Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10518678f8Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11518678f8Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12518678f8Sopenharmony_ci * See the License for the specific language governing permissions and
13518678f8Sopenharmony_ci * limitations under the License.
14518678f8Sopenharmony_ci */
15518678f8Sopenharmony_ci
16518678f8Sopenharmony_ci#ifndef OHOS_DHCP_IPV4_H
17518678f8Sopenharmony_ci#define OHOS_DHCP_IPV4_H
18518678f8Sopenharmony_ci
19518678f8Sopenharmony_ci// See: RFC 2132        DHCP Options and BOOTP Vendor Extensions      March 1997
20518678f8Sopenharmony_cienum DhcpOptions {
21518678f8Sopenharmony_ci    /*
22518678f8Sopenharmony_ci     * 3. RFC 1497 Vendor Extensions
23518678f8Sopenharmony_ci     * This section lists the vendor extensions as defined in RFC 1497.
24518678f8Sopenharmony_ci     * They are defined here for completeness.
25518678f8Sopenharmony_ci     */
26518678f8Sopenharmony_ci    PAD_OPTION = 0,
27518678f8Sopenharmony_ci    END_OPTION = 255,
28518678f8Sopenharmony_ci
29518678f8Sopenharmony_ci    SUBNET_MASK_OPTION = 1,
30518678f8Sopenharmony_ci    TIME_OFFSET_OPTION = 2,
31518678f8Sopenharmony_ci    ROUTER_OPTION = 3,
32518678f8Sopenharmony_ci    TIME_SERVER_OPTION = 4,
33518678f8Sopenharmony_ci    NAME_SERVER_OPTION = 5,
34518678f8Sopenharmony_ci    DOMAIN_NAME_SERVER_OPTION = 6,
35518678f8Sopenharmony_ci    LOG_SERVER_OPTION = 7,
36518678f8Sopenharmony_ci    COOKIE_SERVER_OPTION = 8,
37518678f8Sopenharmony_ci    LPR_SERVER_OPTION = 9,
38518678f8Sopenharmony_ci    IMPRESS_SERVER_OPTION = 10,
39518678f8Sopenharmony_ci    RESOURCE_LOCATION_SERVER_OPTION = 11,
40518678f8Sopenharmony_ci    HOST_NAME_OPTION = 12,
41518678f8Sopenharmony_ci    BOOT_FILE_SIZE_OPTION = 13,
42518678f8Sopenharmony_ci    MERIT_DUMP_FILE_OPTION = 14,
43518678f8Sopenharmony_ci    DOMAIN_NAME_OPTION = 15,
44518678f8Sopenharmony_ci    SWAP_SERVER_OPTION = 16,
45518678f8Sopenharmony_ci    ROOT_PATH_OPTION = 17,
46518678f8Sopenharmony_ci    EXTENSIONS_PATH_OPTION = 18,
47518678f8Sopenharmony_ci
48518678f8Sopenharmony_ci    /*
49518678f8Sopenharmony_ci     * IP Layer Parameters per Host
50518678f8Sopenharmony_ci     * This section details the options that affect the operation of the IP layer on a per-host basis.
51518678f8Sopenharmony_ci     */
52518678f8Sopenharmony_ci    IP_FORWARDING_OPTION = 19,
53518678f8Sopenharmony_ci    NON_LOCAL_SOURCE_ROUTING_OPTION = 20,
54518678f8Sopenharmony_ci    POLICY_FILTER_OPTION = 21,
55518678f8Sopenharmony_ci    MAXIMUM_DATAGRAM_REASSEMBLY_SIZE_OPTION = 22,
56518678f8Sopenharmony_ci    DEFAULT_IP_TIME_TO_LIVE_OPTION = 23,
57518678f8Sopenharmony_ci    PATH_MTU_AGING_TIMEOUT_OPTION = 24,
58518678f8Sopenharmony_ci    PATH_MTU_PLATEAU_TABLE_OPTION = 25,
59518678f8Sopenharmony_ci
60518678f8Sopenharmony_ci    /*
61518678f8Sopenharmony_ci     * 5. IP Layer Parameters per Interface
62518678f8Sopenharmony_ci     * This section details the options that affect the operation of the IP layer on a per-interface basis.  It is
63518678f8Sopenharmony_ci     * expected that a client can issue multiple requests, one per interface, in order to configure interfaces with
64518678f8Sopenharmony_ci     * their specific parameters.
65518678f8Sopenharmony_ci     */
66518678f8Sopenharmony_ci    INTERFACE_MTU_OPTION = 26,
67518678f8Sopenharmony_ci    ALL_SUBNETS_ARE_LOCAL_OPTION = 27,
68518678f8Sopenharmony_ci    BROADCAST_ADDRESS_OPTION = 28,
69518678f8Sopenharmony_ci    PERFORM_MASK_DISCOVERY_OPTION = 29,
70518678f8Sopenharmony_ci    MASK_SUPPLIER_OPTION = 30,
71518678f8Sopenharmony_ci    PERFORM_ROUTER_DISCOVERY_OPTION = 31,
72518678f8Sopenharmony_ci    ROUTER_SOLICITATION_ADDRESS_OPTION = 32,
73518678f8Sopenharmony_ci    STATIC_ROUTE_OPTION = 33,
74518678f8Sopenharmony_ci
75518678f8Sopenharmony_ci    /*
76518678f8Sopenharmony_ci     * 6. Link Layer Parameters per Interface
77518678f8Sopenharmony_ci     * This section lists the options that affect the operation of the data link layer on a per-interface basis.
78518678f8Sopenharmony_ci     */
79518678f8Sopenharmony_ci    TRAILER_ENCAPSULATION_OPTION = 34,   // 6.1. Trailer Encapsulation Option
80518678f8Sopenharmony_ci    ARP_CACHE_TIMEOUT_OPTION = 35,       // 6.2. ARP Cache Timeout Option
81518678f8Sopenharmony_ci    ETHERNET_ENCAPSULATION_OPTION = 36,  // 6.3. Ethernet Encapsulation Option
82518678f8Sopenharmony_ci
83518678f8Sopenharmony_ci    /*
84518678f8Sopenharmony_ci     * 7. TCP Parameters
85518678f8Sopenharmony_ci     * This section lists the options that affect the operation of the TCP layer on a per-interface basis.
86518678f8Sopenharmony_ci     */
87518678f8Sopenharmony_ci    TCP_DEFAULT_TTL_OPTION = 37,         // 7.1. TCP Default TTL Option
88518678f8Sopenharmony_ci    TCP_KEEPALIVE_INTERVAL_OPTION = 38,  // 7.2. TCP Keepalive Interval Option
89518678f8Sopenharmony_ci    TCP_KEEPALIVE_GARBAGE_OPTION = 39,   // 7.3. TCP Keepalive Garbage Option
90518678f8Sopenharmony_ci
91518678f8Sopenharmony_ci    /*
92518678f8Sopenharmony_ci     * 8. Application and Service Parameters
93518678f8Sopenharmony_ci     * This section details some miscellaneous options used to configure miscellaneous applications and services.
94518678f8Sopenharmony_ci     */
95518678f8Sopenharmony_ci    NETWORK_INFO_SERVICE_DOMAIN_OPTION = 40,           // 8.1. Network Information Service Domain Option
96518678f8Sopenharmony_ci    NETWORK_INFO_SERVERS_OPTION = 41,                  // 8.2. Network Information Servers Option
97518678f8Sopenharmony_ci    NETWORK_TIME_PROTOCOL_SERVERS_OPTION = 42,         // 8.3. Network Time Protocol Servers Option
98518678f8Sopenharmony_ci    VENDOR_SPECIFIC_INFO_OPTION = 43,                  // 8.4. Vendor Specific Information
99518678f8Sopenharmony_ci    NETBIOS_OVER_IP_NAME_SERVER_OPTION = 44,           // 8.5. NetBIOS over TCP/IP Name Server Option
100518678f8Sopenharmony_ci    NETBIOS_OVER_IP_DATAGRAM_DIST_SERVER_OPTION = 45,  // 8.6. NetBIOS over TCP/IP Datagram Distribution Server Option
101518678f8Sopenharmony_ci    NETBIOS_OVER_IP_NODE_TYPE_OPTION = 46,             // 8.7. NetBIOS over TCP/IP Node Type Option
102518678f8Sopenharmony_ci    NETBIOS_OVER_IP_SCOPE_OPTION = 47,                 // 8.8. NetBIOS over TCP/IP Scope Option
103518678f8Sopenharmony_ci    X_WINDOW_SYSTEM_FONT_SERVER_OPTION = 48,           // 8.9. X Window System Font Server Option
104518678f8Sopenharmony_ci    X_WINDOW_SYSTEM_DISPLAY_MANAGER_OPTION = 49,       // 8.10. X Window System Display Manager Option
105518678f8Sopenharmony_ci    NETWORK_INFO_SERVICE_PLUS_DOMAIN_OPTION = 64,      // 8.11. Network Information Service+ Domain Option
106518678f8Sopenharmony_ci    NETWORK_INFO_SERVICE_PLUS_SERVERS_OPTION = 65,     // 8.12. Network Information Service+ Servers Option
107518678f8Sopenharmony_ci    MOBILE_IP_HOME_AGENT_OPTION = 68,                  // 8.13. Mobile IP Home Agent option
108518678f8Sopenharmony_ci    SMTP_SERVER_OPTION = 69,                           // 8.14. Simple Mail Transport Protocol (SMTP) Server Option
109518678f8Sopenharmony_ci    POP3_SERVER_OPTION = 70,                           // 8.15. Post Office Protocol (POP3) Server Option
110518678f8Sopenharmony_ci    NNTP_SERVER_OPTION = 71,                           // 8.16. Network News Transport Protocol (NNTP) Server Option
111518678f8Sopenharmony_ci    DEFAULT_WEB_SERVER_OPTION = 72,                    // 8.17. Default World Wide Web (WWW) Server Option
112518678f8Sopenharmony_ci    DEFAULT_FINGER_SERVER_OPTION = 73,                 // 8.18. Default Finger Server Option
113518678f8Sopenharmony_ci    DEFAULT_IRC_SERVER_OPTION = 74,                    // 8.19. Default Internet Relay Chat (IRC) Server Option
114518678f8Sopenharmony_ci    STREETTALK_SERVER_OPTION = 75,                     // 8.20. StreetTalk Server Option
115518678f8Sopenharmony_ci    STDA_SERVER_OPTION = 76,                           // 8.21. StreetTalk Directory Assistance (STDA) Server Option
116518678f8Sopenharmony_ci
117518678f8Sopenharmony_ci    /*
118518678f8Sopenharmony_ci     * 9. DHCP Extensions
119518678f8Sopenharmony_ci     * This section details the options that are specific to DHCP.
120518678f8Sopenharmony_ci     */
121518678f8Sopenharmony_ci    REQUESTED_IP_ADDRESS_OPTION = 50,
122518678f8Sopenharmony_ci    IP_ADDRESS_LEASE_TIME_OPTION = 51,
123518678f8Sopenharmony_ci    OPTION_OVERLOAD_OPTION = 52,
124518678f8Sopenharmony_ci    TFTP_SERVER_NAME_OPTION = 66,
125518678f8Sopenharmony_ci    BOOTFILE_NAME_OPTION = 67,
126518678f8Sopenharmony_ci    DHCP_MESSAGE_TYPE_OPTION = 53,
127518678f8Sopenharmony_ci    SERVER_IDENTIFIER_OPTION = 54,
128518678f8Sopenharmony_ci    PARAMETER_REQUEST_LIST_OPTION = 55,
129518678f8Sopenharmony_ci    MESSAGE_OPTION = 56,
130518678f8Sopenharmony_ci    MAXIMUM_DHCP_MESSAGE_SIZE_OPTION = 57,
131518678f8Sopenharmony_ci    RENEWAL_TIME_VALUE_OPTION = 58,
132518678f8Sopenharmony_ci    REBINDING_TIME_VALUE_OPTION = 59,
133518678f8Sopenharmony_ci    VENDOR_CLASS_IDENTIFIER_OPTION = 60,
134518678f8Sopenharmony_ci    CLIENT_IDENTIFIER_OPTION = 61,
135518678f8Sopenharmony_ci    USER_CLASS_OPTION = 77,
136518678f8Sopenharmony_ci    RAPID_COMMIT_OPTION = 80,
137518678f8Sopenharmony_ci    IPV6_ONLY_PREFERRED_OPTION = 108,
138518678f8Sopenharmony_ci    CAPTIVE_PORTAL_OPTION = 114
139518678f8Sopenharmony_ci};
140518678f8Sopenharmony_ci
141518678f8Sopenharmony_ci#endif