Changeset 99404 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/NetworkPkg/Include/Library/IpIoLib.h
- Timestamp:
- Apr 14, 2023 3:17:44 PM (22 months ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-145445 /vendor/edk2/current 103735-103757,103769-103776,129194-156846
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/NetworkPkg/Include/Library/IpIoLib.h
r85718 r99404 20 20 // from IP 21 21 // 22 #define ICMP_TYPE_UNREACH 23 #define ICMP_TYPE_TIMXCEED 24 #define ICMP_TYPE_PARAMPROB 25 #define ICMP_TYPE_SOURCEQUENCH 26 27 #define ICMP_CODE_UNREACH_NET 028 #define ICMP_CODE_UNREACH_HOST 129 #define ICMP_CODE_UNREACH_PROTOCOL 230 #define ICMP_CODE_UNREACH_PORT 331 #define ICMP_CODE_UNREACH_NEEDFRAG 432 #define ICMP_CODE_UNREACH_SRCFAIL 533 #define ICMP_CODE_UNREACH_NET_UNKNOWN 634 #define ICMP_CODE_UNREACH_HOST_UNKNOWN 735 #define ICMP_CODE_UNREACH_ISOLATED 836 #define ICMP_CODE_UNREACH_NET_PROHIB 937 #define ICMP_CODE_UNREACH_HOST_PROHIB 1038 #define ICMP_CODE_UNREACH_TOSNET 1139 #define ICMP_CODE_UNREACH_TOSHOST 1222 #define ICMP_TYPE_UNREACH 3 23 #define ICMP_TYPE_TIMXCEED 11 24 #define ICMP_TYPE_PARAMPROB 12 25 #define ICMP_TYPE_SOURCEQUENCH 4 26 27 #define ICMP_CODE_UNREACH_NET 0 28 #define ICMP_CODE_UNREACH_HOST 1 29 #define ICMP_CODE_UNREACH_PROTOCOL 2 30 #define ICMP_CODE_UNREACH_PORT 3 31 #define ICMP_CODE_UNREACH_NEEDFRAG 4 32 #define ICMP_CODE_UNREACH_SRCFAIL 5 33 #define ICMP_CODE_UNREACH_NET_UNKNOWN 6 34 #define ICMP_CODE_UNREACH_HOST_UNKNOWN 7 35 #define ICMP_CODE_UNREACH_ISOLATED 8 36 #define ICMP_CODE_UNREACH_NET_PROHIB 9 37 #define ICMP_CODE_UNREACH_HOST_PROHIB 10 38 #define ICMP_CODE_UNREACH_TOSNET 11 39 #define ICMP_CODE_UNREACH_TOSHOST 12 40 40 41 41 /** … … 48 48 @return The IP header length. 49 49 **/ 50 #define EFI_IP4_HEADER_LEN(HdrPtr) ((HdrPtr)->HeaderLength << 2)50 #define EFI_IP4_HEADER_LEN(HdrPtr) ((HdrPtr)->HeaderLength << 2) 51 51 52 52 /** … … 72 72 #define NET_PROTO_HDR(Buf, Type) ((Type *) ((Buf)->BlockOp[0].Head)) 73 73 74 75 74 extern EFI_IP4_CONFIG_DATA mIp4IoDefaultIpConfigData; 76 75 extern EFI_IP6_CONFIG_DATA mIp6IoDefaultIpConfigData; 77 78 76 79 77 /// … … 83 81 /// 84 82 85 #define ICMP_ERR_UNREACH_NET 86 #define ICMP_ERR_UNREACH_HOST 87 #define ICMP_ERR_UNREACH_PROTOCOL 88 #define ICMP_ERR_UNREACH_PORT 89 #define ICMP_ERR_MSGSIZE 90 #define ICMP_ERR_UNREACH_SRCFAIL 91 #define ICMP_ERR_TIMXCEED_INTRANS 92 #define ICMP_ERR_TIMXCEED_REASS 93 #define ICMP_ERR_QUENCH 94 #define ICMP_ERR_PARAMPROB 95 96 #define ICMP6_ERR_UNREACH_NET 097 #define ICMP6_ERR_UNREACH_HOST 198 #define ICMP6_ERR_UNREACH_PROTOCOL 299 #define ICMP6_ERR_UNREACH_PORT 3100 #define ICMP6_ERR_PACKAGE_TOOBIG 4101 #define ICMP6_ERR_TIMXCEED_HOPLIMIT 5102 #define ICMP6_ERR_TIMXCEED_REASS 6103 #define ICMP6_ERR_PARAMPROB_HEADER 7104 #define ICMP6_ERR_PARAMPROB_NEXHEADER 8105 #define ICMP6_ERR_PARAMPROB_IPV6OPTION 983 #define ICMP_ERR_UNREACH_NET 0 84 #define ICMP_ERR_UNREACH_HOST 1 85 #define ICMP_ERR_UNREACH_PROTOCOL 2 86 #define ICMP_ERR_UNREACH_PORT 3 87 #define ICMP_ERR_MSGSIZE 4 88 #define ICMP_ERR_UNREACH_SRCFAIL 5 89 #define ICMP_ERR_TIMXCEED_INTRANS 6 90 #define ICMP_ERR_TIMXCEED_REASS 7 91 #define ICMP_ERR_QUENCH 8 92 #define ICMP_ERR_PARAMPROB 9 93 94 #define ICMP6_ERR_UNREACH_NET 0 95 #define ICMP6_ERR_UNREACH_HOST 1 96 #define ICMP6_ERR_UNREACH_PROTOCOL 2 97 #define ICMP6_ERR_UNREACH_PORT 3 98 #define ICMP6_ERR_PACKAGE_TOOBIG 4 99 #define ICMP6_ERR_TIMXCEED_HOPLIMIT 5 100 #define ICMP6_ERR_TIMXCEED_REASS 6 101 #define ICMP6_ERR_PARAMPROB_HEADER 7 102 #define ICMP6_ERR_PARAMPROB_NEXHEADER 8 103 #define ICMP6_ERR_PARAMPROB_IPV6OPTION 9 106 104 107 105 /// … … 109 107 /// 110 108 typedef struct { 111 BOOLEAN 112 BOOLEAN 109 BOOLEAN IsHard; 110 BOOLEAN Notify; 113 111 } ICMP_ERROR_INFO; 114 112 115 113 typedef union { 116 EFI_IP4_COMPLETION_TOKEN Ip4Token;117 EFI_IP6_COMPLETION_TOKEN Ip6Token;114 EFI_IP4_COMPLETION_TOKEN Ip4Token; 115 EFI_IP6_COMPLETION_TOKEN Ip6Token; 118 116 } IP_IO_IP_COMPLETION_TOKEN; 119 117 120 118 typedef union { 121 EFI_IP4_TRANSMIT_DATA 122 EFI_IP6_TRANSMIT_DATA 119 EFI_IP4_TRANSMIT_DATA Ip4TxData; 120 EFI_IP6_TRANSMIT_DATA Ip6TxData; 123 121 } IP_IO_IP_TX_DATA; 124 122 125 123 typedef union { 126 EFI_IP4_RECEIVE_DATA 127 EFI_IP6_RECEIVE_DATA 124 EFI_IP4_RECEIVE_DATA Ip4RxData; 125 EFI_IP6_RECEIVE_DATA Ip6RxData; 128 126 } IP_IO_IP_RX_DATA; 129 127 130 128 typedef union { 131 EFI_IP4_OVERRIDE_DATA 132 EFI_IP6_OVERRIDE_DATA 129 EFI_IP4_OVERRIDE_DATA Ip4OverrideData; 130 EFI_IP6_OVERRIDE_DATA Ip6OverrideData; 133 131 } IP_IO_OVERRIDE; 134 132 135 133 typedef union { 136 EFI_IP4_CONFIG_DATA 137 EFI_IP6_CONFIG_DATA 134 EFI_IP4_CONFIG_DATA Ip4CfgData; 135 EFI_IP6_CONFIG_DATA Ip6CfgData; 138 136 } IP_IO_IP_CONFIG_DATA; 139 137 140 138 typedef union { 141 EFI_IP4_HEADER 142 EFI_IP6_HEADER 139 EFI_IP4_HEADER *Ip4Hdr; 140 EFI_IP6_HEADER *Ip6Hdr; 143 141 } IP_IO_IP_HEADER; 144 142 145 143 typedef union { 146 IP4_ADDR 147 UINT8 144 IP4_ADDR SubnetMask; 145 UINT8 PrefixLength; 148 146 } IP_IO_IP_MASK; 149 147 150 148 typedef union { 151 EFI_IP4_PROTOCOL *Ip4;152 EFI_IP6_PROTOCOL *Ip6;149 EFI_IP4_PROTOCOL *Ip4; 150 EFI_IP6_PROTOCOL *Ip6; 153 151 } IP_IO_IP_PROTOCOL; 154 152 … … 157 155 /// 158 156 typedef struct _EFI_NET_SESSION_DATA { 159 EFI_IP_ADDRESS Source;///< Source IP of the received packet.160 EFI_IP_ADDRESS Dest;///< Destination IP of the received packet.161 IP_IO_IP_HEADER IpHdr;///< IP header of the received packet.162 UINT32 IpHdrLen;///< IP header length of the received packet.157 EFI_IP_ADDRESS Source; ///< Source IP of the received packet. 158 EFI_IP_ADDRESS Dest; ///< Destination IP of the received packet. 159 IP_IO_IP_HEADER IpHdr; ///< IP header of the received packet. 160 UINT32 IpHdrLen; ///< IP header length of the received packet. 163 161 ///< For IPv6, it includes the IP6 header 164 162 ///< length and extension header length. For 165 163 ///< IPv4, it includes the IP4 header length 166 164 ///< and options length. 167 UINT8 IpVersion;///< The IP version of the received packet.165 UINT8 IpVersion; ///< The IP version of the received packet. 168 166 } EFI_NET_SESSION_DATA; 169 167 … … 181 179 typedef 182 180 VOID 183 (EFIAPI *PKT_RCVD_NOTIFY) 181 (EFIAPI *PKT_RCVD_NOTIFY)( 184 182 IN EFI_STATUS Status, 185 183 IN UINT8 IcmpErr, … … 202 200 typedef 203 201 VOID 204 (EFIAPI *PKT_SENT_NOTIFY) 202 (EFIAPI *PKT_SENT_NOTIFY)( 205 203 IN EFI_STATUS Status, 206 204 IN VOID *Context, … … 217 215 /// The node used to link this IpIo to the active IpIo list. 218 216 /// 219 LIST_ENTRY 217 LIST_ENTRY Entry; 220 218 221 219 /// 222 220 /// The list used to maintain the IP instance for different sending purpose. 223 221 /// 224 LIST_ENTRY 225 226 EFI_HANDLE 227 EFI_HANDLE 228 EFI_HANDLE 222 LIST_ENTRY IpList; 223 224 EFI_HANDLE Controller; 225 EFI_HANDLE Image; 226 EFI_HANDLE ChildHandle; 229 227 // 230 228 // The IP instance consumed by this IP_IO 231 229 // 232 IP_IO_IP_PROTOCOL 233 BOOLEAN 230 IP_IO_IP_PROTOCOL Ip; 231 BOOLEAN IsConfigured; 234 232 235 233 /// 236 234 /// Some ip configuration data can be changed. 237 235 /// 238 UINT8 236 UINT8 Protocol; 239 237 240 238 /// 241 239 /// Token and event used to get data from IP. 242 240 /// 243 IP_IO_IP_COMPLETION_TOKEN 241 IP_IO_IP_COMPLETION_TOKEN RcvToken; 244 242 245 243 /// 246 244 /// List entry used to link the token passed to IP_IO. 247 245 /// 248 LIST_ENTRY 246 LIST_ENTRY PendingSndList; 249 247 250 248 // 251 249 // User interface used to get notify from IP_IO 252 250 // 253 VOID *RcvdContext;///< See IP_IO_OPEN_DATA::RcvdContext.254 VOID *SndContext;///< See IP_IO_OPEN_DATA::SndContext.255 PKT_RCVD_NOTIFY PktRcvdNotify;///< See IP_IO_OPEN_DATA::PktRcvdNotify.256 PKT_SENT_NOTIFY PktSentNotify;///< See IP_IO_OPEN_DATA::PktSentNotify.257 UINT8 258 IP4_ADDR 259 IP4_ADDR 251 VOID *RcvdContext; ///< See IP_IO_OPEN_DATA::RcvdContext. 252 VOID *SndContext; ///< See IP_IO_OPEN_DATA::SndContext. 253 PKT_RCVD_NOTIFY PktRcvdNotify; ///< See IP_IO_OPEN_DATA::PktRcvdNotify. 254 PKT_SENT_NOTIFY PktSentNotify; ///< See IP_IO_OPEN_DATA::PktSentNotify. 255 UINT8 IpVersion; 256 IP4_ADDR StationIp; 257 IP4_ADDR SubnetMask; 260 258 } IP_IO; 261 259 … … 265 263 /// 266 264 typedef struct _IP_IO_OPEN_DATA { 267 IP_IO_IP_CONFIG_DATA IpConfigData;///< Configuration of the IP instance.268 VOID *RcvdContext;///< Context data used by receive callback.269 VOID *SndContext;///< Context data used by send callback.270 PKT_RCVD_NOTIFY PktRcvdNotify;///< Receive callback.271 PKT_SENT_NOTIFY PktSentNotify;///< Send callback.265 IP_IO_IP_CONFIG_DATA IpConfigData; ///< Configuration of the IP instance. 266 VOID *RcvdContext; ///< Context data used by receive callback. 267 VOID *SndContext; ///< Context data used by send callback. 268 PKT_RCVD_NOTIFY PktRcvdNotify; ///< Receive callback. 269 PKT_SENT_NOTIFY PktSentNotify; ///< Send callback. 272 270 } IP_IO_OPEN_DATA; 273 271 … … 279 277 /// 280 278 typedef struct _IP_IO_SEND_ENTRY { 281 LIST_ENTRY Entry;282 IP_IO *IpIo;283 VOID *Context;284 VOID *NotifyData;285 IP_IO_IP_PROTOCOL Ip;286 NET_BUF *Pkt;287 IP_IO_IP_COMPLETION_TOKEN SndToken;279 LIST_ENTRY Entry; 280 IP_IO *IpIo; 281 VOID *Context; 282 VOID *NotifyData; 283 IP_IO_IP_PROTOCOL Ip; 284 NET_BUF *Pkt; 285 IP_IO_IP_COMPLETION_TOKEN SndToken; 288 286 } IP_IO_SEND_ENTRY; 289 287 … … 293 291 /// 294 292 typedef struct _IP_IO_IP_INFO { 295 EFI_IP_ADDRESS Addr;296 IP_IO_IP_MASK PreMask;297 LIST_ENTRY Entry;298 EFI_HANDLE ChildHandle;299 IP_IO_IP_PROTOCOL Ip;300 IP_IO_IP_COMPLETION_TOKEN DummyRcvToken;301 INTN RefCnt;302 UINT8 IpVersion;293 EFI_IP_ADDRESS Addr; 294 IP_IO_IP_MASK PreMask; 295 LIST_ENTRY Entry; 296 EFI_HANDLE ChildHandle; 297 IP_IO_IP_PROTOCOL Ip; 298 IP_IO_IP_COMPLETION_TOKEN DummyRcvToken; 299 INTN RefCnt; 300 UINT8 IpVersion; 303 301 } IP_IO_IP_INFO; 304 302 … … 324 322 EFIAPI 325 323 IpIoCreate ( 326 IN EFI_HANDLE Image,327 IN EFI_HANDLE Controller,328 IN UINT8 IpVersion324 IN EFI_HANDLE Image, 325 IN EFI_HANDLE Controller, 326 IN UINT8 IpVersion 329 327 ); 330 328 … … 345 343 EFIAPI 346 344 IpIoDestroy ( 347 IN OUT IP_IO *IpIo345 IN OUT IP_IO *IpIo 348 346 ); 349 347 … … 366 364 EFIAPI 367 365 IpIoStop ( 368 IN OUT IP_IO *IpIo366 IN OUT IP_IO *IpIo 369 367 ); 370 368 … … 395 393 EFIAPI 396 394 IpIoOpen ( 397 IN OUT IP_IO *IpIo,398 IN IP_IO_OPEN_DATA *OpenData395 IN OUT IP_IO *IpIo, 396 IN IP_IO_OPEN_DATA *OpenData 399 397 ); 400 398 … … 428 426 EFIAPI 429 427 IpIoSend ( 430 IN OUT IP_IO *IpIo,431 IN OUT NET_BUF *Pkt,432 IN IP_IO_IP_INFO *Sender OPTIONAL,433 IN VOID *Context OPTIONAL,434 IN VOID *NotifyData OPTIONAL,435 IN EFI_IP_ADDRESS *Dest OPTIONAL,436 IN IP_IO_OVERRIDE *OverrideData OPTIONAL428 IN OUT IP_IO *IpIo, 429 IN OUT NET_BUF *Pkt, 430 IN IP_IO_IP_INFO *Sender OPTIONAL, 431 IN VOID *Context OPTIONAL, 432 IN VOID *NotifyData OPTIONAL, 433 IN EFI_IP_ADDRESS *Dest OPTIONAL, 434 IN IP_IO_OVERRIDE *OverrideData OPTIONAL 437 435 ); 438 436 … … 497 495 EFIAPI 498 496 IpIoConfigIp ( 499 IN OUT IP_IO_IP_INFO 500 IN OUT VOID 497 IN OUT IP_IO_IP_INFO *IpInfo, 498 IN OUT VOID *IpConfigData OPTIONAL 501 499 ); 502 500 … … 518 516 EFIAPI 519 517 IpIoRemoveIp ( 520 IN IP_IO 521 IN IP_IO_IP_INFO 518 IN IP_IO *IpIo, 519 IN IP_IO_IP_INFO *IpInfo 522 520 ); 523 521 … … 565 563 EFIAPI 566 564 IpIoGetIcmpErrStatus ( 567 IN UINT8 568 IN UINT8 569 OUT BOOLEAN 570 OUT BOOLEAN 565 IN UINT8 IcmpError, 566 IN UINT8 IpVersion, 567 OUT BOOLEAN *IsHard OPTIONAL, 568 OUT BOOLEAN *Notify OPTIONAL 571 569 ); 572 570 … … 605 603 606 604 #endif 607
Note:
See TracChangeset
for help on using the changeset viewer.