- 時間撮記:
- 2023-4-14 下午03:17:44 (2 年 以前)
- svn:sync-xref-src-repo-rev:
- 156854
- 位置:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
屬性 svn:mergeinfo
由 (切換已刪除的分支)
變更至 (切換已刪除的分支)/vendor/edk2/current 103735-103757,103769-103776,129194-145445 /vendor/edk2/current 103735-103757,103769-103776,129194-156846
-
屬性 svn:mergeinfo
由 (切換已刪除的分支)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Protocol/Dhcp4.h
r80721 r99404 28 28 typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL; 29 29 30 31 30 #pragma pack(1) 32 31 typedef struct { … … 34 33 /// DHCP option code. 35 34 /// 36 UINT8 35 UINT8 OpCode; 37 36 /// 38 37 /// Length of the DHCP option data. Not present if OpCode is 0 or 255. 39 38 /// 40 UINT8 39 UINT8 Length; 41 40 /// 42 41 /// Start of the DHCP option data. Not present if OpCode is 0 or 255 or if Length is zero. 43 42 /// 44 UINT8 43 UINT8 Data[1]; 45 44 } EFI_DHCP4_PACKET_OPTION; 46 45 #pragma pack() 47 48 46 49 47 #pragma pack(1) … … 52 50 /// 53 51 typedef struct { 54 UINT8 OpCode;55 UINT8 HwType;56 UINT8 HwAddrLen;57 UINT8 Hops;58 UINT32 Xid;59 UINT16 Seconds;60 UINT16 Reserved;61 EFI_IPv4_ADDRESS ClientAddr; ///< Client IP address from client.62 EFI_IPv4_ADDRESS YourAddr; ///< Client IP address from server.63 EFI_IPv4_ADDRESS ServerAddr; ///< IP address of next server in bootstrap.64 EFI_IPv4_ADDRESS GatewayAddr; ///< Relay agent IP address.65 UINT8 ClientHwAddr[16]; ///< Client hardware address.66 CHAR8 ServerName[64];67 CHAR8 BootFileName[128];68 } EFI_DHCP4_HEADER;52 UINT8 OpCode; 53 UINT8 HwType; 54 UINT8 HwAddrLen; 55 UINT8 Hops; 56 UINT32 Xid; 57 UINT16 Seconds; 58 UINT16 Reserved; 59 EFI_IPv4_ADDRESS ClientAddr; ///< Client IP address from client. 60 EFI_IPv4_ADDRESS YourAddr; ///< Client IP address from server. 61 EFI_IPv4_ADDRESS ServerAddr; ///< IP address of next server in bootstrap. 62 EFI_IPv4_ADDRESS GatewayAddr; ///< Relay agent IP address. 63 UINT8 ClientHwAddr[16]; ///< Client hardware address. 64 CHAR8 ServerName[64]; 65 CHAR8 BootFileName[128]; 66 } EFI_DHCP4_HEADER; 69 67 #pragma pack() 70 71 68 72 69 #pragma pack(1) … … 75 72 /// Size of the EFI_DHCP4_PACKET buffer. 76 73 /// 77 UINT32 74 UINT32 Size; 78 75 /// 79 76 /// Length of the EFI_DHCP4_PACKET from the first byte of the Header field 80 77 /// to the last byte of the Option[] field. 81 78 /// 82 UINT32 79 UINT32 Length; 83 80 84 81 struct { … … 86 83 /// DHCP packet header. 87 84 /// 88 EFI_DHCP4_HEADER Header;85 EFI_DHCP4_HEADER Header; 89 86 /// 90 87 /// DHCP magik cookie in network byte order. 91 88 /// 92 UINT32 Magik;89 UINT32 Magik; 93 90 /// 94 91 /// Start of the DHCP packed option data. 95 92 /// 96 UINT8 Option[1];93 UINT8 Option[1]; 97 94 } Dhcp4; 98 95 } EFI_DHCP4_PACKET; 99 96 #pragma pack() 100 97 101 102 98 typedef enum { 103 99 /// 104 100 /// The EFI DHCPv4 Protocol driver is stopped. 105 101 /// 106 Dhcp4Stopped 102 Dhcp4Stopped = 0x0, 107 103 /// 108 104 /// The EFI DHCPv4 Protocol driver is inactive. 109 105 /// 110 Dhcp4Init 106 Dhcp4Init = 0x1, 111 107 /// 112 108 /// The EFI DHCPv4 Protocol driver is collecting DHCP offer packets from DHCP servers. 113 109 /// 114 Dhcp4Selecting 110 Dhcp4Selecting = 0x2, 115 111 /// 116 112 /// The EFI DHCPv4 Protocol driver has sent the request to the DHCP server and is waiting for a response. 117 113 /// 118 Dhcp4Requesting 114 Dhcp4Requesting = 0x3, 119 115 /// 120 116 /// The DHCP configuration has completed. 121 117 /// 122 Dhcp4Bound 118 Dhcp4Bound = 0x4, 123 119 /// 124 120 /// The DHCP configuration is being renewed and another request has 125 121 /// been sent out, but it has not received a response from the server yet. 126 122 /// 127 Dhcp4Renewing 123 Dhcp4Renewing = 0x5, 128 124 /// 129 125 /// The DHCP configuration has timed out and the EFI DHCPv4 130 126 /// Protocol driver is trying to extend the lease time. 131 127 /// 132 Dhcp4Rebinding 128 Dhcp4Rebinding = 0x6, 133 129 /// 134 130 /// The EFI DHCPv4 Protocol driver was initialized with a previously 135 131 /// allocated or known IP address. 136 132 /// 137 Dhcp4InitReboot 133 Dhcp4InitReboot = 0x7, 138 134 /// 139 135 /// The EFI DHCPv4 Protocol driver is seeking to reuse the previously 140 136 /// allocated IP address by sending a request to the DHCP server. 141 137 /// 142 Dhcp4Rebooting 138 Dhcp4Rebooting = 0x8 143 139 } EFI_DHCP4_STATE; 144 140 145 146 typedef enum{ 141 typedef enum { 147 142 /// 148 143 /// The packet to start the configuration sequence is about to be sent. 149 144 /// 150 Dhcp4SendDiscover 145 Dhcp4SendDiscover = 0x01, 151 146 /// 152 147 /// A reply packet was just received. 153 148 /// 154 Dhcp4RcvdOffer 149 Dhcp4RcvdOffer = 0x02, 155 150 /// 156 151 /// It is time for Dhcp4Callback to select an offer. 157 152 /// 158 Dhcp4SelectOffer 153 Dhcp4SelectOffer = 0x03, 159 154 /// 160 155 /// A request packet is about to be sent. 161 156 /// 162 Dhcp4SendRequest 157 Dhcp4SendRequest = 0x04, 163 158 /// 164 159 /// A DHCPACK packet was received and will be passed to Dhcp4Callback. 165 160 /// 166 Dhcp4RcvdAck 161 Dhcp4RcvdAck = 0x05, 167 162 /// 168 163 /// A DHCPNAK packet was received and will be passed to Dhcp4Callback. 169 164 /// 170 Dhcp4RcvdNak 165 Dhcp4RcvdNak = 0x06, 171 166 /// 172 167 /// A decline packet is about to be sent. 173 168 /// 174 Dhcp4SendDecline 169 Dhcp4SendDecline = 0x07, 175 170 /// 176 171 /// The DHCP configuration process has completed. No packet is associated with this event. … … 181 176 /// that originally issued the network address. No packet is associated with this event. 182 177 /// 183 Dhcp4EnterRenewing 178 Dhcp4EnterRenewing = 0x09, 184 179 /// 185 180 /// It is time to enter the Dhcp4Rebinding state and to contact any server. … … 192 187 /// the Dhcp4Renewing or Dhcp4Rebinding state. No packet is associated with this event. 193 188 /// 194 Dhcp4AddressLost 189 Dhcp4AddressLost = 0x0b, 195 190 /// 196 191 /// The DHCP process failed because a DHCPNAK packet was received or the user … … 198 193 /// No packet is associated with this event. 199 194 /// 200 Dhcp4Fail 195 Dhcp4Fail = 0x0c 201 196 } EFI_DHCP4_EVENT; 202 197 … … 250 245 /// Set to zero to use the default try counts and timeout values. 251 246 /// 252 UINT32 247 UINT32 DiscoverTryCount; 253 248 /// 254 249 /// The maximum amount of time (in seconds) to wait for returned packets in each … … 256 251 /// of one second. Set to NULL to use default timeout values. 257 252 /// 258 UINT32 253 UINT32 *DiscoverTimeout; 259 254 /// 260 255 /// The number of times to try sending a packet during the Dhcp4SendRequest event … … 262 257 /// failure. Set to zero to use the default try counts and timeout values. 263 258 /// 264 UINT32 259 UINT32 RequestTryCount; 265 260 /// 266 261 /// The maximum amount of time (in seconds) to wait for return packets in each of the retries. … … 268 263 /// Set to NULL to use default timeout values. 269 264 /// 270 UINT32 265 UINT32 *RequestTimeout; 271 266 /// 272 267 /// For a DHCPDISCOVER, setting this parameter to the previously allocated IP … … 276 271 /// which was assigned to the client during a DHCPDISCOVER. 277 272 /// 278 EFI_IPv4_ADDRESS 273 EFI_IPv4_ADDRESS ClientAddress; 279 274 /// 280 275 /// The callback function to intercept various events that occurred in 281 276 /// the DHCP configuration process. Set to NULL to ignore all those events. 282 277 /// 283 EFI_DHCP4_CALLBACK 278 EFI_DHCP4_CALLBACK Dhcp4Callback; 284 279 /// 285 280 /// The pointer to the context that will be passed to Dhcp4Callback when it is called. 286 281 /// 287 VOID 282 VOID *CallbackContext; 288 283 /// 289 284 /// Number of DHCP options in the OptionList. 290 285 /// 291 UINT32 286 UINT32 OptionCount; 292 287 /// 293 288 /// List of DHCP options to be included in every packet that is sent during the … … 297 292 /// returns. Ignored if OptionCount is zero. 298 293 /// 299 EFI_DHCP4_PACKET_OPTION 294 EFI_DHCP4_PACKET_OPTION **OptionList; 300 295 } EFI_DHCP4_CONFIG_DATA; 301 296 302 303 297 typedef struct { 304 298 /// 305 299 /// The EFI DHCPv4 Protocol driver operating state. 306 300 /// 307 EFI_DHCP4_STATE 301 EFI_DHCP4_STATE State; 308 302 /// 309 303 /// The configuration data of the current EFI DHCPv4 Protocol driver instance. 310 304 /// 311 EFI_DHCP4_CONFIG_DATA 305 EFI_DHCP4_CONFIG_DATA ConfigData; 312 306 /// 313 307 /// The client IP address that was acquired from the DHCP server. If it is zero, 314 308 /// the DHCP acquisition has not completed yet and the following fields in this structure are undefined. 315 309 /// 316 EFI_IPv4_ADDRESS 310 EFI_IPv4_ADDRESS ClientAddress; 317 311 /// 318 312 /// The local hardware address. 319 313 /// 320 EFI_MAC_ADDRESS 314 EFI_MAC_ADDRESS ClientMacAddress; 321 315 /// 322 316 /// The server IP address that is providing the DHCP service to this client. 323 317 /// 324 EFI_IPv4_ADDRESS 318 EFI_IPv4_ADDRESS ServerAddress; 325 319 /// 326 320 /// The router IP address that was acquired from the DHCP server. 327 321 /// May be zero if the server does not offer this address. 328 322 /// 329 EFI_IPv4_ADDRESS 323 EFI_IPv4_ADDRESS RouterAddress; 330 324 /// 331 325 /// The subnet mask of the connected network that was acquired from the DHCP server. 332 326 /// 333 EFI_IPv4_ADDRESS 327 EFI_IPv4_ADDRESS SubnetMask; 334 328 /// 335 329 /// The lease time (in 1-second units) of the configured IP address. … … 337 331 /// A default lease of 7 days is used if the DHCP server does not provide a value. 338 332 /// 339 UINT32 333 UINT32 LeaseTime; 340 334 /// 341 335 /// The cached latest DHCPACK or DHCPNAK or BOOTP REPLY packet. May be NULL if no packet is cached. 342 336 /// 343 EFI_DHCP4_PACKET 337 EFI_DHCP4_PACKET *ReplyPacket; 344 338 } EFI_DHCP4_MODE_DATA; 345 339 346 347 340 typedef struct { 348 341 /// 349 342 /// Alternate listening address. It can be a unicast, multicast, or broadcast address. 350 343 /// 351 EFI_IPv4_ADDRESS 344 EFI_IPv4_ADDRESS ListenAddress; 352 345 /// 353 346 /// The subnet mask of above listening unicast/broadcast IP address. 354 347 /// Ignored if ListenAddress is a multicast address. 355 348 /// 356 EFI_IPv4_ADDRESS 349 EFI_IPv4_ADDRESS SubnetMask; 357 350 /// 358 351 /// Alternate station source (or listening) port number. 359 352 /// If zero, then the default station port number (68) will be used. 360 353 /// 361 UINT16 354 UINT16 ListenPort; 362 355 } EFI_DHCP4_LISTEN_POINT; 363 356 364 365 357 typedef struct { 366 358 /// 367 359 /// The completion status of transmitting and receiving. 368 360 /// 369 EFI_STATUS Status;361 EFI_STATUS Status; 370 362 /// 371 363 /// If not NULL, the event that will be signaled when the collection process 372 364 /// completes. If NULL, this function will busy-wait until the collection process competes. 373 365 /// 374 EFI_EVENT CompletionEvent;366 EFI_EVENT CompletionEvent; 375 367 /// 376 368 /// The pointer to the server IP address. This address may be a unicast, multicast, or broadcast address. 377 369 /// 378 EFI_IPv4_ADDRESS RemoteAddress;370 EFI_IPv4_ADDRESS RemoteAddress; 379 371 /// 380 372 /// The server listening port number. If zero, the default server listening port number (67) will be used. 381 373 /// 382 UINT16 RemotePort;374 UINT16 RemotePort; 383 375 /// 384 376 /// The pointer to the gateway address to override the existing setting. 385 377 /// 386 EFI_IPv4_ADDRESS GatewayAddress;378 EFI_IPv4_ADDRESS GatewayAddress; 387 379 /// 388 380 /// The number of entries in ListenPoints. If zero, the default station address and port number 68 are used. 389 381 /// 390 UINT32 ListenPointCount;382 UINT32 ListenPointCount; 391 383 /// 392 384 /// An array of station address and port number pairs that are used as receiving filters. 393 385 /// The first entry is also used as the source address and source port of the outgoing packet. 394 386 /// 395 EFI_DHCP4_LISTEN_POINT *ListenPoints;387 EFI_DHCP4_LISTEN_POINT *ListenPoints; 396 388 /// 397 389 /// The number of seconds to collect responses. Zero is invalid. 398 390 /// 399 UINT32 TimeoutValue;391 UINT32 TimeoutValue; 400 392 /// 401 393 /// The pointer to the packet to be transmitted. 402 394 /// 403 EFI_DHCP4_PACKET *Packet;395 EFI_DHCP4_PACKET *Packet; 404 396 /// 405 397 /// Number of received packets. 406 398 /// 407 UINT32 ResponseCount;399 UINT32 ResponseCount; 408 400 /// 409 401 /// The pointer to the allocated list of received packets. 410 402 /// 411 EFI_DHCP4_PACKET *ResponseList;403 EFI_DHCP4_PACKET *ResponseList; 412 404 } EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN; 413 414 405 415 406 /** … … 488 479 ); 489 480 490 491 481 /** 492 482 Starts the DHCP configuration process. … … 678 668 ); 679 669 680 681 670 /** 682 671 Transmits a DHCP formatted packet and optionally waits for responses. … … 711 700 ); 712 701 713 714 702 /** 715 703 Parses the packed DHCP option data. … … 758 746 /// 759 747 struct _EFI_DHCP4_PROTOCOL { 760 EFI_DHCP4_GET_MODE_DATA GetModeData;761 EFI_DHCP4_CONFIGURE Configure;762 EFI_DHCP4_START Start;763 EFI_DHCP4_RENEW_REBIND RenewRebind;764 EFI_DHCP4_RELEASE Release;765 EFI_DHCP4_STOP Stop;766 EFI_DHCP4_BUILD Build;767 EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive;768 EFI_DHCP4_PARSE Parse;748 EFI_DHCP4_GET_MODE_DATA GetModeData; 749 EFI_DHCP4_CONFIGURE Configure; 750 EFI_DHCP4_START Start; 751 EFI_DHCP4_RENEW_REBIND RenewRebind; 752 EFI_DHCP4_RELEASE Release; 753 EFI_DHCP4_STOP Stop; 754 EFI_DHCP4_BUILD Build; 755 EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive; 756 EFI_DHCP4_PARSE Parse; 769 757 }; 770 758 771 extern EFI_GUID gEfiDhcp4ProtocolGuid;772 extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid;759 extern EFI_GUID gEfiDhcp4ProtocolGuid; 760 extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid; 773 761 774 762 #endif
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器