32/64-bit UNDI Specification
Version 1.02 12/12/00 465
G.4.19.2 Waiting for the Command to Execute
Monitor the upper two bits (14 & 15) in the CDB.StatFlags field. Until these bits change to
report PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED,
the command has not been executed by the UNDI.
StatFlags Reason
COMMAND_COMPLETE Command completed successfully. Frames received and DB is written.
COMMAND_FAILED Command failed. StatCode field contains error code.
COMMAND_QUEUED Command has been queued.
INITIALIZE Command has been not executed or queued.
G.4.19.3 Checking Command Execution Results
After command execution completes, either successfully or not, the CDB.StatCode field
contains the result of the command execution.
StatCode Reason
SUCCESS Command completed successfully. Frames received and DB is written.
INVALID_CDB One of the CDB fields was not set correctly.
INVALID_CPB One of the CPB fields was not set correctly.
BUSY UNDI is already processing commands. Try again later.
QUEUE_FULL Command queue is full. Wait for queued commands to complete. Try again
later.
NO_DATA Receive buffers are empty.
NOT_STARTED The UNDI is not started.
NOT_INITIALIZED The UNDI is not initialized.

Using the DB

If multiple frames per command are supported (see!PXE.Implementation flags), multiple
DBs can be packed together.
#pragma pack(1)
typedef struct s_pxe_db_receive {
// Source and destination MAC addresses from media header.
PXE_MAC_ADDR SrcAddr;
PXE_MAC_ADDR DestAddr;
// 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.
PXE_UINT32 FrameLen;