16#ifndef __PXE_BASE_CODE_PROTOCOL_H__
17#define __PXE_BASE_CODE_PROTOCOL_H__
22#define EFI_PXE_BASE_CODE_PROTOCOL_GUID \
24 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
64 CHAR8 ErrorString[127];
70#define EFI_PXE_BASE_CODE_MAX_IPCNT 8
82#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001
83#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002
84#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004
85#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008
107typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT;
109#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001
110#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002
111#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004
112#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008
113#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010
114#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020
119#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
120#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
121#define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM 2
122#define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI 3
123#define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO 4
124#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD 5
125#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM 6
126#define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG 7
127#define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW 8
128#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9 9
129#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10 10
130#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11 11
131#define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12 12
132#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL 13
133#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14
134#define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15
135#define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16
141#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535
143#define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF
144#define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000
152#if defined (MDE_CPU_IA32)
153#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0006
154#elif defined (MDE_CPU_X64)
155#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0007
156#elif defined (MDE_CPU_ARM)
157#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000A
158#elif defined (MDE_CPU_AARCH64)
159#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000B
160#elif defined (MDE_CPU_RISCV64)
161#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x001B
162#elif defined (MDE_CPU_LOONGARCH64)
163#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0027
171 BOOLEAN AcceptAnyResponse;
193 EFI_PXE_BASE_CODE_TFTP_FIRST,
194 EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE,
195 EFI_PXE_BASE_CODE_TFTP_READ_FILE,
196 EFI_PXE_BASE_CODE_TFTP_WRITE_FILE,
197 EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY,
198 EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE,
199 EFI_PXE_BASE_CODE_MTFTP_READ_FILE,
200 EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY,
201 EFI_PXE_BASE_CODE_MTFTP_LAST
211 EFI_PXE_BASE_CODE_UDP_PORT CPort;
212 EFI_PXE_BASE_CODE_UDP_PORT SPort;
213 UINT16 ListenTimeout;
214 UINT16 TransmitTimeout;
223 UINT8 BootpHwAddrLen;
228 UINT8 BootpCiAddr[4];
229 UINT8 BootpYiAddr[4];
230 UINT8 BootpSiAddr[4];
231 UINT8 BootpGiAddr[4];
232 UINT8 BootpHwAddr[16];
233 UINT8 BootpSrvName[64];
234 UINT8 BootpBootFile[128];
236 UINT8 DhcpOptions[56];
243 UINT32 MessageType : 8;
244 UINT32 TransactionId : 24;
245 UINT8 DhcpOptions[1024];
260#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8
261#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
271 BOOLEAN Ipv6Available;
272 BOOLEAN Ipv6Supported;
274 BOOLEAN BisSupported;
278 BOOLEAN DhcpDiscoverValid;
279 BOOLEAN DhcpAckReceived;
280 BOOLEAN ProxyOfferReceived;
281 BOOLEAN PxeDiscoverValid;
282 BOOLEAN PxeReplyReceived;
283 BOOLEAN PxeBisReplyReceived;
284 BOOLEAN IcmpErrorReceived;
285 BOOLEAN TftpErrorReceived;
286 BOOLEAN MakeCallbacks;
298 UINT32 ArpCacheEntries;
300 UINT32 RouteTableEntries;
441 IN BOOLEAN SortOffers
574 IN BOOLEAN Overwrite,
575 IN OUT UINT64 *BufferSize,
580 IN BOOLEAN DontUseBuffer
626 IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort,
874 BOOLEAN *NewDhcpDiscoverValid
OPTIONAL,
875 BOOLEAN *NewDhcpAckReceived
OPTIONAL,
876 BOOLEAN *NewProxyOfferReceived
OPTIONAL,
877 BOOLEAN *NewPxeDiscoverValid
OPTIONAL,
878 BOOLEAN *NewPxeReplyReceived
OPTIONAL,
879 BOOLEAN *NewPxeBisReplyReceived
OPTIONAL,
891#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000
896#define EFI_PXE_BASE_CODE_INTERFACE_REVISION EFI_PXE_BASE_CODE_PROTOCOL_REVISION
931extern EFI_GUID gEfiPxeBaseCodeProtocolGuid;
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_START)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN BOOLEAN UseIpv6)
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_MTFTP)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN EFI_PXE_BASE_CODE_TFTP_OPCODE Operation, IN OUT VOID *BufferPtr OPTIONAL, IN BOOLEAN Overwrite, IN OUT UINT64 *BufferSize, IN UINTN *BlockSize OPTIONAL, IN EFI_IP_ADDRESS *ServerIp, IN UINT8 *Filename OPTIONAL, IN EFI_PXE_BASE_CODE_MTFTP_INFO *Info OPTIONAL, IN BOOLEAN DontUseBuffer)
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_UDP_WRITE)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN UINT16 OpFlags, IN EFI_IP_ADDRESS *DestIp, IN EFI_PXE_BASE_CODE_UDP_PORT *DestPort, IN EFI_IP_ADDRESS *GatewayIp OPTIONAL, IN EFI_IP_ADDRESS *SrcIp OPTIONAL, IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort OPTIONAL, IN UINTN *HeaderSize OPTIONAL, IN VOID *HeaderPtr OPTIONAL, IN UINTN *BufferSize, IN VOID *BufferPtr)
EFI_PXE_BASE_CODE_TFTP_OPCODE
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_ARP)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN EFI_IP_ADDRESS *IpAddr, IN EFI_MAC_ADDRESS *MacAddr OPTIONAL)
#define EFI_PXE_BASE_CODE_MAX_IPCNT
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_SET_PARAMETERS)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN BOOLEAN *NewAutoArp OPTIONAL, IN BOOLEAN *NewSendGUID OPTIONAL, IN UINT8 *NewTTL OPTIONAL, IN UINT8 *NewToS OPTIONAL, IN BOOLEAN *NewMakeCallback OPTIONAL)
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_SET_PACKETS)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, BOOLEAN *NewDhcpDiscoverValid OPTIONAL, BOOLEAN *NewDhcpAckReceived OPTIONAL, BOOLEAN *NewProxyOfferReceived OPTIONAL, BOOLEAN *NewPxeDiscoverValid OPTIONAL, BOOLEAN *NewPxeReplyReceived OPTIONAL, BOOLEAN *NewPxeBisReplyReceived OPTIONAL, IN EFI_PXE_BASE_CODE_PACKET *NewDhcpDiscover OPTIONAL, IN EFI_PXE_BASE_CODE_PACKET *NewDhcpAck OPTIONAL, IN EFI_PXE_BASE_CODE_PACKET *NewProxyOffer OPTIONAL, IN EFI_PXE_BASE_CODE_PACKET *NewPxeDiscover OPTIONAL, IN EFI_PXE_BASE_CODE_PACKET *NewPxeReply OPTIONAL, IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL)
EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_STOP)(IN EFI_PXE_BASE_CODE_PROTOCOL *This)
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_SET_IP_FILTER)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter)
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_UDP_READ)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN UINT16 OpFlags, IN OUT EFI_IP_ADDRESS *DestIp OPTIONAL, IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort OPTIONAL, IN OUT EFI_IP_ADDRESS *SrcIp OPTIONAL, IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort OPTIONAL, IN UINTN *HeaderSize OPTIONAL, IN VOID *HeaderPtr OPTIONAL, IN OUT UINTN *BufferSize, IN VOID *BufferPtr)
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_DISCOVER)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN UINT16 Type, IN UINT16 *Layer, IN BOOLEAN UseBis, IN EFI_PXE_BASE_CODE_DISCOVER_INFO *Info OPTIONAL)
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_DHCP)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN BOOLEAN SortOffers)
EFI_STATUS(EFIAPI * EFI_PXE_BASE_CODE_SET_STATION_IP)(IN EFI_PXE_BASE_CODE_PROTOCOL *This, IN EFI_IP_ADDRESS *NewStationIp OPTIONAL, IN EFI_IP_ADDRESS *NewSubnetMask OPTIONAL)
EFI_PXE_BASE_CODE_MODE * Mode