/** @file
This header file contains all of the PXE type definitions,
structure prototypes, global variables and constants that
are needed for porting PXE to EFI.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
32/64-bit PXE specification:
alpha-4, 99-Dec-17.
**/
#ifndef __EFI_PXE_H__
#define __EFI_PXE_H__
#pragma pack(1)
#define PXE_BUSTYPE(a, b, c, d) \
( \
(((PXE_UINT32) (d) & 0xFF) << 24) | (((PXE_UINT32) (c) & 0xFF) << 16) | (((PXE_UINT32) (b) & 0xFF) << 8) | \
((PXE_UINT32) (a) & 0xFF) \
)
///
/// UNDI ROM ID and devive ID signature.
///
///
/// BUS ROM ID signatures.
///
#define PXE_SWAP_UINT16(n) ((((PXE_UINT16) (n) & 0x00FF) << 8) | (((PXE_UINT16) (n) & 0xFF00) >> 8))
#define PXE_SWAP_UINT32(n) \
#define PXE_SWAP_UINT64(n) \
#define PXE_VOLATILE volatile
///
/// Typedef unsigned long PXE_UINT64.
///
///
/// Return UNDI operational state.
///
///
/// Change UNDI operational state from Stopped to Started.
///
///
/// Change UNDI operational state from Started to Stopped.
///
///
/// Get UNDI initialization information.
///
///
/// Get NIC configuration information.
///
///
/// Changed UNDI operational state from Started to Initialized.
///
///
/// Re-initialize the NIC H/W.
///
///
/// Change the UNDI operational state from Initialized to Started.
///
///
/// Read & change state of external interrupt enables.
///
///
/// Read & change state of packet receive filters.
///
///
/// Read & change station MAC address.
///
///
/// Read traffic statistics.
///
///
/// Convert multicast IP address to multicast MAC address.
///
///
/// Read or change non-volatile storage on the NIC.
///
///
/// Get & clear interrupt status.
///
///
/// Fill media header in packet for transmit.
///
///
/// Transmit packet(s).
///
///
/// Receive packet.
///
///
/// Last valid PXE UNDI OpCode number.
///
//
// //////////////////////////////////////
// UNDI Get State
//
// No OpFlags
////////////////////////////////////////
// UNDI Start
//
// No OpFlags
////////////////////////////////////////
// UNDI Stop
//
// No OpFlags
////////////////////////////////////////
// UNDI Get Init Info
//
// No Opflags
////////////////////////////////////////
// UNDI Get Config Info
//
// No Opflags
///
/// UNDI Initialize
///
///
///
/// UNDI Reset
///
///
/// UNDI Shutdown.
///
/// No OpFlags.
///
/// UNDI Interrupt Enables.
///
///
/// Select whether to enable or disable external interrupt signals.
/// Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS.
///
///
/// Enable receive interrupts. An external interrupt will be generated
/// after a complete non-error packet has been received.
///
///
/// Enable transmit interrupts. An external interrupt will be generated
/// after a complete non-error packet has been transmitted.
///
///
/// Enable command interrupts. An external interrupt will be generated
/// when command execution stops.
///
///
/// Generate software interrupt. Setting this bit generates an external
/// interrupt, if it is supported by the hardware.
///
///
/// UNDI Receive Filters.
///
///
/// Select whether to enable or disable receive filters.
/// Setting both enable and disable will return PXE_STATCODE_INVALID_OPCODE.
///
///
/// To reset the contents of the multicast MAC address filter list,
/// set this OpFlag:
///
///
/// Enable unicast packet receiving. Packets sent to the current station
/// MAC address will be received.
///
///
/// Enable broadcast packet receiving. Packets sent to the broadcast
/// MAC address will be received.
///
///
/// Enable filtered multicast packet receiving. Packets sent to any
/// of the multicast MAC addresses in the multicast MAC address filter
/// list will be received. If the filter list is empty, no multicast
///
///
/// Enable promiscuous packet receiving. All packets will be received.
///
///
/// Enable promiscuous multicast packet receiving. All multicast
/// packets will be received.
///
///
/// UNDI Station Address.
///
///
/// UNDI Statistics.
///
///
/// UNDI MCast IP to MAC.
///
///
/// Identify the type of IP address in the CPB.
///
///
/// UNDI NvData.
///
///
/// Select the type of non-volatile data operation.
///
///
/// UNDI Get Status.
///
///
/// Return current interrupt status. This will also clear any interrupts
/// that are currently set. This can be used in a polling routine. The
/// interrupt flags are still set and cleared even when the interrupts
/// are disabled.
///
///
/// Return list of transmitted buffers for recycling. Transmit buffers
/// must not be changed or unallocated until they have recycled. After
/// issuing a transmit command, wait for a transmit complete interrupt.
/// When a transmit complete interrupt is received, read the transmitted
/// buffers. Do not plan on getting one buffer per interrupt. Some
/// NICs and UNDIs may transmit multiple buffers per interrupt.
///
///
/// Return current media status.
///
///
/// UNDI Fill Header.
///
///
/// UNDI Transmit.
///
///
/// S/W UNDI only. Return after the packet has been transmitted. A
/// transmit complete interrupt will still be generated and the transmit
/// buffer will have to be recycled.
///
///
/// UNDI Receive.
///
/// No OpFlags.
///
///
/// PXE STATFLAGS.
///
///
/// Common StatFlags that can be returned by all commands.
///
///
/// The COMMAND_COMPLETE and COMMAND_FAILED status flags must be
/// implemented by all UNDIs. COMMAND_QUEUED is only needed by UNDIs
/// that support command queuing.
///
///
/// UNDI Get State.
///
///
/// UNDI Start.
///
/// No additional StatFlags.
///
///
/// UNDI Get Init Info.
///
///
/// UNDI Initialize.
///
///
/// UNDI Reset.
///
///
/// UNDI Shutdown.
///
/// No additional StatFlags.
///
/// UNDI Interrupt Enables.
///
///
/// If set, receive interrupts are enabled.
///
///
/// If set, transmit interrupts are enabled.
///
///
/// If set, command interrupts are enabled.
///
///
/// UNDI Receive Filters.
///
///
/// If set, unicast packets will be received.
///
///
/// If set, broadcast packets will be received.
///
///
/// If set, multicast packets that match up with the multicast address
/// filter list will be received.
///
///
/// If set, all packets will be received.
///
///
/// If set, all multicast packets will be received.
///
///
/// UNDI Station Address.
///
/// No additional StatFlags.
///
///
/// UNDI Statistics.
///
/// No additional StatFlags.
///
///
//// UNDI MCast IP to MAC.
////
//// No additional StatFlags.
///
/// UNDI NvData.
///
/// No additional StatFlags.
///
///
/// UNDI Get Status.
///
///
/// Use to determine if an interrupt has occurred.
///
///
/// If set, at least one receive interrupt occurred.
///
///
/// If set, at least one transmit interrupt occurred.
///
///
/// If set, at least one command interrupt occurred.
///
///
/// If set, at least one software interrupt occurred.
///
///
/// This flag is set if the transmitted buffer queue is empty. This flag
/// will be set if all transmitted buffer addresses get written into the DB.
///
///
/// This flag is set if no transmitted buffer addresses were written
/// into the DB. (This could be because DBsize was too small.)
///
///
/// This flag is set if there is no media detected.
///
///
/// UNDI Fill Header.
///
/// No additional StatFlags.
///
///
/// UNDI Transmit.
///
/// No additional StatFlags.
///
/// UNDI Receive
///.
///
/// No additional StatFlags.
///
///
/// Common StatCodes returned by all UNDI commands, UNDI protocol functions
/// and BC protocol functions.
///
///
/// This interface number must be passed to the S/W UNDI Start command.
///
///
/// This interface number is returned by the S/W UNDI Get State and
/// Start commands if information in the CDB, CPB or DB is invalid.
///
///
/// Setting this flag directs the UNDI to queue this command for later
/// execution if the UNDI is busy and it supports command queuing.
/// If queuing is not supported, a PXE_STATCODE_INVALID_CONTROL error
/// is returned. If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL
/// error is returned.
///
///
/// These two bit values are used to determine if there are more UNDI
/// CDB structures following this one. If the link bit is set, there
/// must be a CDB structure following this one. Execution will start
/// on the next CDB structure as soon as this one completes successfully.
/// If an error is generated by this command, execution will stop.
///
///
/// This information is from the ARP section of RFC 1700.
///
/// 1 Ethernet (10Mb) [JBP]
/// 2 Experimental Ethernet (3Mb) [JBP]
/// 3 Amateur Radio AX.25 [PXK]
/// 4 Proteon ProNET Token Ring [JBP]
/// 5 Chaos [GXP]
/// 6 IEEE 802 Networks [JBP]
/// 7 ARCNET [JBP]
/// 8 Hyperchannel [JBP]
/// 9 Lanstar [TU]
/// 10 Autonet Short Address [MXB1]
/// 11 LocalTalk [JKR1]
/// 12 LocalNet (IBM* PCNet or SYTEK* LocalNET) [JXM]
/// 13 Ultra link [RXD2]
/// 14 SMDS [GXC1]
/// 15 Frame Relay [AGM]
/// 16 Asynchronous Transmission Mode (ATM) [JXB2]
/// 17 HDLC [JBP]
/// 18 Fibre Channel [Yakov Rekhter]
/// 19 Asynchronous Transmission Mode (ATM) [Mark Laubach]
/// 20 Serial Line [JBP]
/// 21 Asynchronous Transmission Mode (ATM) [MXB1]
///
/// * Other names and brands may be claimed as the property of others.
///
typedef struct s_pxe_hw_undi {
///< reserved ///< vendor use.
///< UINT32 Status; ///< status port.
///< UINT32 Command; ///< command port.
///< UINT64 CDBaddr; ///< CDB address port.
///<
} PXE_HW_UNDI;
///
/// Status port bit definitions.
///
///
/// UNDI operation state.
///
///
/// If set, last command failed.
///
///
/// If set, identifies enabled receive filters.
///
///
/// If set, identifies enabled external interrupts.
///
///
/// If set, identifies pending interrupts.
///
///
/// Command port definitions.
///
///
/// If set, CDB identified in CDBaddr port is given to UNDI.
/// If not set, other bits in this word will be processed.
///
///
///
///
///
///
/// Use these to clear pending external interrupts.
///
typedef struct s_pxe_sw_undi {
} PXE_SW_UNDI;
typedef union u_pxe_undi {
} PXE_UNDI;
///
/// Signature of !PXE structure.
///
///
/// !PXE structure format revision
///.
///
/// UNDI command interface revision. These are the values that get sent
/// in option 94 (Client Network Interface Identifier) in the DHCP Discover
/// and PXE Boot Server Request packets.
///
///
/// Implementation flags.
///
typedef struct s_pxe_cdb {
} PXE_CDB;
typedef union u_pxe_ip_addr {
} PXE_IP_ADDR;
typedef union pxe_device {
///
/// PCI and PC Card NICs are both identified using bus, device
/// and function numbers. For PC Card, this may require PC
/// Card services to be loaded in the BIOS or preboot
/// environment.
///
struct {
///
/// See S/W UNDI ROMID structure definition for PCI and
/// PCC BusType definitions.
///
///
/// Bus, device & function numbers that locate this device.
///
}
} PXE_DEVICE;
///
/// cpb and db definitions
///
typedef struct s_pxe_cpb_start_30 {
///
/// PXE_VOID Delay(UINTN microseconds);
///
/// UNDI will never request a delay smaller than 10 microseconds
/// and will always request delays in increments of 10 microseconds.
/// The Delay() CallBack routine must delay between n and n + 10
/// microseconds before returning control to the UNDI.
///
/// This field cannot be set to zero.
///
///
/// PXE_VOID Block(UINT32 enable);
///
/// UNDI may need to block multi-threaded/multi-processor access to
/// critical code sections when programming or accessing the network
/// device. To this end, a blocking service is needed by the UNDI.
/// When UNDI needs a block, it will call Block() passing a non-zero
/// value. When UNDI no longer needs a block, it will call Block()
/// with a zero value. When called, if the Block() is already enabled,
/// do not return control to the UNDI until the previous Block() is
/// disabled.
///
/// This field cannot be set to zero.
///
///
/// PXE_VOID Virt2Phys(UINT64 virtual, UINT64 physical_ptr);
///
/// UNDI will pass the virtual address of a buffer and the virtual
/// address of a 64-bit physical buffer. Convert the virtual address
/// to a physical address and write the result to the physical address
/// buffer. If virtual and physical addresses are the same, just
/// copy the virtual address to the physical address buffer.
///
/// This field can be set to zero if virtual and physical addresses
/// are equal.
///
///
/// PXE_VOID Mem_IO(UINT8 read_write, UINT8 len, UINT64 port,
/// UINT64 buf_addr);
///
/// UNDI will read or write the device io space using this call back
/// function. It passes the number of bytes as the len parameter and it
/// will be either 1,2,4 or 8.
///
/// This field can not be set to zero.
///
typedef struct s_pxe_cpb_start_31 {
///
/// PXE_VOID Delay(UINT64 UnqId, UINTN microseconds);
///
/// UNDI will never request a delay smaller than 10 microseconds
/// and will always request delays in increments of 10 microseconds.
/// The Delay() CallBack routine must delay between n and n + 10
/// microseconds before returning control to the UNDI.
///
/// This field cannot be set to zero.
///
///
/// PXE_VOID Block(UINT64 unq_id, UINT32 enable);
///
/// UNDI may need to block multi-threaded/multi-processor access to
/// critical code sections when programming or accessing the network
/// device. To this end, a blocking service is needed by the UNDI.
/// When UNDI needs a block, it will call Block() passing a non-zero
/// value. When UNDI no longer needs a block, it will call Block()
/// with a zero value. When called, if the Block() is already enabled,
/// do not return control to the UNDI until the previous Block() is
/// disabled.
///
/// This field cannot be set to zero.
///
///
/// PXE_VOID Virt2Phys(UINT64 UnqId, UINT64 virtual, UINT64 physical_ptr);
///
/// UNDI will pass the virtual address of a buffer and the virtual
/// address of a 64-bit physical buffer. Convert the virtual address
/// to a physical address and write the result to the physical address
/// buffer. If virtual and physical addresses are the same, just
/// copy the virtual address to the physical address buffer.
///
/// This field can be set to zero if virtual and physical addresses
/// are equal.
///
///
/// PXE_VOID Mem_IO(UINT64 UnqId, UINT8 read_write, UINT8 len, UINT64 port,
/// UINT64 buf_addr);
///
/// UNDI will read or write the device io space using this call back
/// function. It passes the number of bytes as the len parameter and it
/// will be either 1,2,4 or 8.
///
/// This field can not be set to zero.
///
///
/// PXE_VOID Map_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,
/// UINT32 Direction, UINT64 mapped_addr);
///
/// UNDI will pass the virtual address of a buffer, direction of the data
/// and a place holder (pointer) for the mapped address.
/// This call will Map the given address to a physical DMA address and write
/// the result to the mapped_addr pointer. If there is no need to
/// map the given address to a lower address (i.e. the given address is
/// associated with a physical address that is already compatible to be
/// used with the DMA, it converts the given virtual address to it's
/// physical address and write that in the mapped address pointer.
///
/// This field can be set to zero if there is no mapping service available.
///
///
/// PXE_VOID UnMap_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size,
/// UINT32 Direction, UINT64 mapped_addr);
///
/// UNDI will pass the virtual and mapped addresses of a buffer.
/// This call will un map the given address.
///
/// This field can be set to zero if there is no unmapping service available.
///
///
/// PXE_VOID Sync_Mem(UINT64 unq_id, UINT64 virtual,
/// UINT32 size, UINT32 Direction, UINT64 mapped_addr);
///
/// UNDI will pass the virtual and mapped addresses of a buffer.
/// This call will synchronize the contents of both the virtual and mapped.
/// buffers for the given Direction.
///
/// This field can be set to zero if there is no service available.
///
///
/// protocol driver can provide anything for this Unique_ID, UNDI remembers
/// that as just a 64bit value assocaited to the interface specified by
/// the ifnum and gives it back as a parameter to all the call-back routines
/// when calling for that interface!
///
#define TO_AND_FROM_DEVICE 0
#define PXE_IO_READ 0
typedef struct s_pxe_db_get_init_info {
///
/// Minimum length of locked memory buffer that must be given to
/// the Initialize command. Giving UNDI more memory will generally
/// give better performance.
///
/// If MemoryRequired is zero, the UNDI does not need and will not
/// use system memory to receive and transmit packets.
///
///
///
///
/// Supported link speeds are in units of mega bits. Common ethernet
/// values are 10, 100 and 1000. Unused LinkSpeeds[] entries are zero
/// filled.
///
///
/// Number of non-volatile storage items.
///
///
/// Width of non-volatile storage item in bytes. 0, 1, 2 or 4
///
///
/// Media header length. This is the typical media header length for
/// this UNDI. This information is needed when allocating receive
/// and transmit buffers.
///
///
/// Number of bytes in the NIC hardware (MAC) address.
///
///
/// Maximum number of multicast MAC addresses in the multicast
/// MAC address filter list.
///
///
/// Default number and size of transmit and receive buffers that will
/// be allocated by the UNDI. If MemoryRequired is non-zero, this
/// allocation will come out of the memory buffer given to the Initialize
/// command. If MemoryRequired is zero, this allocation will come out of
/// memory on the NIC.
///
///
/// Hardware interface types defined in the Assigned Numbers RFC
/// and used in DHCP and ARP packets.
/// See the PXE_IFTYPE typedef and PXE_IFTYPE_xxx macros.
///
///
/// Supported duplex. See PXE_DUPLEX_xxxxx #defines below.
///
///
/// Supported loopback options. See PXE_LOOPBACK_xxxxx #defines below.
///
typedef struct s_pxe_pci_config_info {
///
/// This is the flag field for the PXE_DB_GET_CONFIG_INFO union.
/// For PCI bus devices, this field is set to PXE_BUSTYPE_PCI.
///
///
/// This identifies the PCI network device that this UNDI interface.
/// is bound to.
///
///
/// This is a copy of the PCI configuration space for this
/// network device.
///
union {
} Config;
typedef struct s_pxe_pcc_config_info {
///
/// This is the flag field for the PXE_DB_GET_CONFIG_INFO union.
/// For PCC bus devices, this field is set to PXE_BUSTYPE_PCC.
///
///
/// This identifies the PCC network device that this UNDI interface
/// is bound to.
///
///
/// This is a copy of the PCC configuration space for this
/// network device.
///
union {
} Config;
typedef union u_pxe_db_get_config_info {
typedef struct s_pxe_cpb_initialize {
///
/// Address of first (lowest) byte of the memory buffer. This buffer must
/// be in contiguous physical memory and cannot be swapped out. The UNDI
/// will be using this for transmit and receive buffering.
///
///
/// MemoryLength must be greater than or equal to MemoryRequired
/// returned by the Get Init Info command.
///
///
///
///
/// Suggested number and size of receive and transmit buffers to
/// allocate. If MemoryAddr and MemoryLength are non-zero, this
/// allocation comes out of the supplied memory buffer. If MemoryAddr
/// and MemoryLength are zero, this allocation comes out of memory
/// on the NIC.
///
/// If these fields are set to zero, the UNDI will allocate buffer
/// counts and sizes as it sees fit.
///
///
/// The following configuration parameters are optional and must be zero
/// to use the default values.
///
#define LOOPBACK_NORMAL 0
typedef struct s_pxe_db_initialize {
///
/// Actual amount of memory used from the supplied memory buffer. This
/// may be less that the amount of memory suppllied and may be zero if
/// the UNDI and network device do not use external memory buffers.
///
/// Memory used by the UNDI and network device is allocated from the
/// lowest memory buffer address.
///
///
/// Actual number and size of receive and transmit buffers that were
/// allocated.
///
typedef struct s_pxe_cpb_receive_filters {
///
/// List of multicast MAC addresses. This list, if present, will
/// replace the existing multicast MAC address filter list.
///
typedef struct s_pxe_db_receive_filters {
///
/// Filtered multicast MAC address list.
///
typedef struct s_pxe_cpb_station_address {
///
/// If supplied and supported, the current station MAC address
/// will be changed.
///
typedef struct s_pxe_dpb_station_address {
///
/// Current station MAC address.
///
///
/// Station broadcast MAC address.
///
///
/// Permanent station MAC address.
///
typedef struct s_pxe_db_statistics {
///
/// Bit field identifying what statistic data is collected by the
/// If bit 0x00 is set, Data[0x00] is collected.
/// If bit 0x01 is set, Data[0x01] is collected.
/// If bit 0x20 is set, Data[0x20] is collected.
/// If bit 0x21 is set, Data[0x21] is collected.
/// Etc.
///
///
/// Statistic data.
///
///
/// Total number of frames received. Includes frames with errors and
/// dropped frames.
///
///
/// Number of valid frames received and copied into receive buffers.
///
///
/// Number of frames below the minimum length for the media.
/// This would be <64 for ethernet.
///
///
/// Number of frames longer than the maxminum length for the
/// media. This would be >1500 for ethernet.
///
///
/// Valid frames that were dropped because receive buffers were full.
///
///
/// Number of valid unicast frames received and not dropped.
///
///
/// Number of valid broadcast frames received and not dropped.
///
///
/// Number of valid mutlicast frames received and not dropped.
///
///
/// Number of frames w/ CRC or alignment errors.
///
///
/// Total number of bytes received. Includes frames with errors
/// and dropped frames.
///
///
/// Transmit statistics.
///
///
/// Number of collisions detection on this subnet.
///
///
/// Number of frames destined for unsupported protocol.
///
typedef struct s_pxe_cpb_mcast_ip_to_mac {
///
/// Multicast IP address to be converted to multicast MAC address.
///
typedef struct s_pxe_db_mcast_ip_to_mac {
///
/// Multicast MAC address.
///
typedef struct s_pxe_cpb_nvdata_sparse {
///
/// NvData item list. Only items in this list will be updated.
///
struct {
///
/// Non-volatile storage address to be changed.
///
///
/// Data item to write into above storage address.
///
union {
} Data;
///
/// When using bulk update, the size of the CPB structure must be
/// the same size as the non-volatile NIC storage.
///
typedef union u_pxe_cpb_nvdata_bulk {
///
/// Array of byte-wide data items.
///
///
/// Array of word-wide data items.
///
///
/// Array of dword-wide data items.
///
typedef struct s_pxe_db_nvdata {
///
/// Arrays of data items from non-volatile storage.
///
union {
///
/// Array of byte-wide data items.
///
///
/// Array of word-wide data items.
///
///
/// Array of dword-wide data items.
///
} Data;
typedef struct s_pxe_db_get_status {
///
/// Length of next receive frame (header + data). If this is zero,
/// there is no next receive frame available.
///
///
/// Reserved, set to zero.
///
///
/// Addresses of transmitted buffers that need to be recycled.
///
typedef struct s_pxe_cpb_fill_header {
///
/// Source and destination MAC addresses. These will be copied into
/// the media header without doing byte swapping.
///
///
/// Address of first byte of media header. The first byte of packet data
/// follows the last byte of the media header.
///
///
/// Length of packet data in bytes (not including the media header).
///
///
/// Protocol type. This will be copied into the media header without
/// doing byte swapping. Protocol type numbers can be obtained from
/// the Assigned Numbers RFC 1700.
///
///
/// Length of the media header in bytes.
///
typedef struct s_pxe_cpb_fill_header_fragmented {
///
/// Source and destination MAC addresses. These will be copied into
/// the media header without doing byte swapping.
///
///
/// Length of packet data in bytes (not including the media header).
///
///
/// Protocol type. This will be copied into the media header without
/// doing byte swapping. Protocol type numbers can be obtained from
/// the Assigned Numbers RFC 1700.
///
///
/// Length of the media header in bytes.
///
///
/// Number of packet fragment descriptors.
///
///
/// Reserved, must be set to zero.
///
///
/// Array of packet fragment descriptors. The first byte of the media
/// header is the first byte of the first fragment.
///
struct {
///
/// Address of this packet fragment.
///
///
/// Length of this packet fragment.
///
///
/// Reserved, must be set to zero.
///
}
typedef struct s_pxe_cpb_transmit {
///
/// Address of first byte of frame buffer. This is also the first byte
/// of the media header.
///
///
/// Length of the data portion of the frame buffer in bytes. Do not
/// include the length of the media header.
///
///
/// Length of the media header in bytes.
///
///
/// Reserved, must be zero.
///
typedef struct s_pxe_cpb_transmit_fragments {
///
/// Length of packet data in bytes (not including the media header).
///
///
/// Length of the media header in bytes.
///
///
/// Number of packet fragment descriptors.
///
///
/// Array of frame fragment descriptors. The first byte of the first
/// fragment is also the first byte of the media header.
///
struct {
///
/// Address of this frame fragment.
///
///
/// Length of this frame fragment.
///
///
/// Reserved, must be set to zero.
///
}
typedef struct s_pxe_cpb_receive {
///
/// Address of first byte of receive buffer. This is also the first byte
/// of the frame header.
///
///
/// Length of receive buffer. This must be large enough to hold the
/// received frame (media header + data). If the length of smaller than
/// the received frame, data will be lost.
///
///
/// Reserved, must be set to zero.
///
typedef struct s_pxe_db_receive {
///
/// Source and destination MAC addresses from media header.
///
///
/// Length of received frame. May be larger than receive buffer size.
/// The receive buffer will not be overwritten. This is how to tell
/// if data was lost because the receive buffer was too small.
///
///
/// Protocol type from media header.
///
///
/// Length of media header in received frame.
///
///
/// Type of receive frame.
///
///
/// Reserved, must be zero.
///
#pragma pack()
#endif