yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | /*! |
| 2 | * @file dhcp4c_struct.h |
| 3 | * @author Roger Huang <chaomin.haung@mediatek.com> |
| 4 | * @version 1.0 |
| 5 | * @section LICENSE |
| 6 | * |
| 7 | * This software is protected by Copyright and the information contained |
| 8 | * herein is confidential. The software may not be copied and the information |
| 9 | * contained herein may not be used or disclosed except with the written |
| 10 | * permission of MediaTek Inc. (C) 2005 |
| 11 | * |
| 12 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 13 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| 14 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 15 | * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 18 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 19 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 20 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 21 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 22 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 23 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 24 | * |
| 25 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 26 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 27 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 28 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 29 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 30 | * |
| 31 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| 32 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 33 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 34 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 35 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 36 | * |
| 37 | * @section DESCRIPTION |
| 38 | * This file provides structure definition of dhcp4c ( DHCPv4 Client ) |
| 39 | */ |
| 40 | |
| 41 | #ifndef _DHCP4C_STRUCT_H |
| 42 | #define _DHCP4C_STRUCT_H |
| 43 | |
| 44 | |
| 45 | /*! |
| 46 | * @brief dhcp4c_cause_e enumerate possible cause of DHCPv4 Client |
| 47 | * @param DHCP4C_CAUSE_MIN pseudo state |
| 48 | * @param DHCP4C_CAUSE_SUCCESS success |
| 49 | * @param DHCP4C_CAUSE_NO_INSTANCE no instance available |
| 50 | * @param DHCP4C_CAUSE_INVALID_PARAMETER parameter is invalid |
| 51 | * @param DHCP4C_CAUSE_INVALID_STATE not allow in this state |
| 52 | * @param DHCP4C_CAUSE_MAX pseudo state |
| 53 | */ |
| 54 | typedef enum _dhcp4c_cause { |
| 55 | DHCP4C_CAUSE_MIN = 0, |
| 56 | DHCP4C_CAUSE_SUCCESS = 1, |
| 57 | DHCP4C_CAUSE_NO_INSTANCE = 2, |
| 58 | DHCP4C_CAUSE_INVALID_PARAMETER = 3, |
| 59 | DHCP4C_CAUSE_INVALID_STATE = 4, |
| 60 | DHCP4C_CAUSE_MAX = 5, |
| 61 | } dhcp4c_cause_e; |
| 62 | |
| 63 | |
| 64 | /*! |
| 65 | * @brief dhcp4c_hardware_address_type_e enumerate possible hardward address |
| 66 | * type of DHCPv4 Client |
| 67 | * @param DHCP4C_HTYPE_MIN pseudo state |
| 68 | * @param DHCP4C_HTYPE_ETHERNET ethernet type |
| 69 | * @param DHCP4C_HTYPE_MAX pseudo state |
| 70 | */ |
| 71 | typedef enum _dhcp4c_hardware_address_type { |
| 72 | DHCP4C_HTYPE_MIN = 0, |
| 73 | DHCP4C_HTYPE_ETHERNET = 1, |
| 74 | DHCP4C_HTYPE_MAX = 2, |
| 75 | } dhcp4c_hardware_address_type_e; |
| 76 | |
| 77 | |
| 78 | #define DHCP4C_MAX_HARDWARE_ADDRESS_SIZE 16 |
| 79 | /*! |
| 80 | * @brief dhcp4c_activagte_req_struct describe activate request information |
| 81 | * of DHCPv4 Client |
| 82 | */ |
| 83 | typedef struct _dhcp4c_activate_req_struct { |
| 84 | /*! |
| 85 | * @brief ILM local parameter header |
| 86 | */ |
| 87 | LOCAL_PARA_HDR |
| 88 | /*! |
| 89 | * @brief ip instance identifier |
| 90 | */ |
| 91 | kal_uint8 ip_id; |
| 92 | /*! |
| 93 | * @brief hardware address type |
| 94 | */ |
| 95 | dhcp4c_hardware_address_type_e hardware_address_type; |
| 96 | /*! |
| 97 | * @brief hardware address |
| 98 | */ |
| 99 | kal_uint8 hardware_address[DHCP4C_MAX_HARDWARE_ADDRESS_SIZE]; |
| 100 | } dhcp4c_activate_req_struct; |
| 101 | |
| 102 | |
| 103 | /*! |
| 104 | * @brief dhcp4c_activate_rsp_struct describe activate response information |
| 105 | * of DHCPv4 Client |
| 106 | */ |
| 107 | typedef struct _dhcp4c_activate_rsp_struct { |
| 108 | /*! |
| 109 | * @brief ILM local parameter header |
| 110 | */ |
| 111 | LOCAL_PARA_HDR |
| 112 | /*! |
| 113 | * @brief ip instance identifier |
| 114 | */ |
| 115 | kal_uint8 ip_id; |
| 116 | /*! |
| 117 | * @brief DHCPv4 Client instance identifier |
| 118 | */ |
| 119 | kal_uint8 dhcp_id; |
| 120 | /*! |
| 121 | * @brief response cause |
| 122 | */ |
| 123 | dhcp4c_cause_e cause; |
| 124 | } dhcp4c_activate_rsp_struct; |
| 125 | |
| 126 | |
| 127 | /*! |
| 128 | * @brief dhcp4c_deactivate_req_struct describe deactivate request information |
| 129 | * of DHCPv4 Client |
| 130 | */ |
| 131 | typedef struct _dhcp4c_deactivate_req_struct { |
| 132 | /*! |
| 133 | * @brief ILM local parameter header |
| 134 | */ |
| 135 | LOCAL_PARA_HDR |
| 136 | /*! |
| 137 | * @brief ip instance identifier |
| 138 | */ |
| 139 | kal_uint8 ip_id; |
| 140 | /*! |
| 141 | * @brief DHCPv4 Client instance identifier |
| 142 | */ |
| 143 | kal_uint8 dhcp_id; |
| 144 | } dhcp4c_deactivate_req_struct; |
| 145 | |
| 146 | |
| 147 | /*! |
| 148 | * @brief dhcp4c_deactivate_rsp_struct describe deactivate response information |
| 149 | * of DHCPv4 Client |
| 150 | */ |
| 151 | typedef struct _dhcp4c_deactivate_rsp_struct { |
| 152 | /*! |
| 153 | * @brief ILM local parameter header |
| 154 | */ |
| 155 | LOCAL_PARA_HDR |
| 156 | /*! |
| 157 | * @brief ip instance identifier |
| 158 | */ |
| 159 | kal_uint8 ip_id; |
| 160 | /*! |
| 161 | * @brief DHCPv4 Client instance identifier |
| 162 | */ |
| 163 | kal_uint8 dhcp_id; |
| 164 | /*! |
| 165 | * @brief response cause |
| 166 | */ |
| 167 | dhcp4c_cause_e cause; |
| 168 | } dhcp4c_deactivate_rsp_struct; |
| 169 | |
| 170 | |
| 171 | /*! |
| 172 | * @brief dhcp4c_packet_req_struct describe packet request information |
| 173 | * of DHCPv4 Client |
| 174 | */ |
| 175 | typedef struct _dhcp4c_packet_req_struct { |
| 176 | /*! |
| 177 | * @brief ILM local parameter header |
| 178 | */ |
| 179 | LOCAL_PARA_HDR |
| 180 | /*! |
| 181 | * @brief ip instance identifier |
| 182 | */ |
| 183 | kal_uint8 ip_id; |
| 184 | /*! |
| 185 | * @brief DHCPv4 Client instance identifier |
| 186 | */ |
| 187 | kal_uint8 dhcp_id; |
| 188 | /*! |
| 189 | * @brief request gpd packet buffer |
| 190 | */ |
| 191 | void* gpd; |
| 192 | } dhcp4c_packet_req_struct; |
| 193 | |
| 194 | |
| 195 | /*! |
| 196 | * @brief dhcp4c_packet_ind_struct describe packet indicate information |
| 197 | * of DHCPv4 Client |
| 198 | */ |
| 199 | typedef struct _dhcp4c_packet_ind_struct { |
| 200 | /*! |
| 201 | * @brief ILM local parameter header |
| 202 | */ |
| 203 | LOCAL_PARA_HDR |
| 204 | /*! |
| 205 | * @brief ip instance identifier |
| 206 | */ |
| 207 | kal_uint8 ip_id; |
| 208 | /*! |
| 209 | * @brief DHCPv4 Client instance identifier |
| 210 | */ |
| 211 | kal_uint8 dhcp_id; |
| 212 | /*! |
| 213 | * @brief indicate gpd packet buffer |
| 214 | */ |
| 215 | void* gpd; |
| 216 | } dhcp4c_packet_ind_struct; |
| 217 | |
| 218 | |
| 219 | /*! |
| 220 | * @brief dhcp4c_ip_up_ind_struct describe ip up indicate information |
| 221 | * of DHCPv4 Client |
| 222 | */ |
| 223 | typedef struct _dhcp4c_ip_up_ind_struct { |
| 224 | /*! |
| 225 | * @brief ILM local parameter header |
| 226 | */ |
| 227 | LOCAL_PARA_HDR |
| 228 | /*! |
| 229 | * @brief ip instance identifier |
| 230 | */ |
| 231 | kal_uint8 ip_id; |
| 232 | /*! |
| 233 | * @brief DHCPv4 Client instance identifier |
| 234 | */ |
| 235 | kal_uint8 dhcp_id; |
| 236 | } dhcp4c_ip_up_ind_struct; |
| 237 | |
| 238 | |
| 239 | /*! |
| 240 | * @brief dhcp4c_ip_down_ind_struct describe ip down indicate information |
| 241 | * of DHCPv4 Client |
| 242 | */ |
| 243 | typedef struct _dhcp4c_ip_down_ind_struct { |
| 244 | /*! |
| 245 | * @brief ILM local parameter header |
| 246 | */ |
| 247 | LOCAL_PARA_HDR |
| 248 | /*! |
| 249 | * @brief ip instance identifier |
| 250 | */ |
| 251 | kal_uint8 ip_id; |
| 252 | /*! |
| 253 | * @brief DHCPv4 Client instance identifier |
| 254 | */ |
| 255 | kal_uint8 dhcp_id; |
| 256 | } dhcp4c_ip_down_ind_struct; |
| 257 | |
| 258 | |
| 259 | #endif // _DHCP4C_STRUCT_H |
| 260 | |