pxe.h
来自「Next BIOS Source code : Extensible Firmw」· C头文件 代码 · 共 689 行 · 第 1/2 页
H
689 行
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
IN PXENV_UNDI_MCAST_ADDR_t R_Mcast_Buf;/* multicast address list */
/* see note below */
} PXENV_UNDI_RESET_t;
/*++
Note: The NIC driver does not remember the multicast
addresses provided in any call. So the application must
provide the multicast address list with all the calls that
reset the receive unit of the adapter.
--*/
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
} PXENV_UNDI_SHUTDOWN_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
IN UINT16 OpenFlag; /* In: See description below */
IN UINT16 PktFilter; /* In: Filter for receiving */
/* packet. It takes the following */
/* values, multiple values can be */
/* ORed together. */
#define FLTR_DIRECTED 0x0001 /* directed/multicast */
#define FLTR_BRDCST 0x0002 /* broadcast packets */
#define FLTR_PRMSCS 0x0004 /* any packet on LAN */
#define FLTR_SRC_RTG 0x0008 /* source routing packet */
IN PXENV_UNDI_MCAST_ADDR_t McastBuffer; /* In: */
/* See t_PXENV_UNDI_MCAST_ADDR. */
} PXENV_UNDI_OPEN_t;
/*++
OpenFlag:
This is an input parameter and is adapter specific. This is
supported for Universal NDIS 2.0 driver to pass down the Open
flags provided by the protocol driver (See NDIS 2.0
specifications). This can be zero.
--*/
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
} PXENV_UNDI_CLOSE_t;
/* TBD - Transmit Block Descriptor
*/
#define MAX_DATA_BLKS 8
typedef struct {
IN UINT16 ImmedLength; /* In: Data buffer length in */
/* bytes. */
UINT16 XmitOffset; /* 16-bit segment & offset of the */
UINT16 XmitSegment; /* immediate data buffer. */
UINT16 DataBlkCount; /* In: Number of data blocks. */
struct DataBlk {
UINT8 TDPtrType; /* 0 => 32 bit Phys pointer in */
/* TDDataPtr, not supported in this */
/* version of LSA */
/* 1 => seg:offser in TDDataPtr which */
/* can be a real mode or 16-bit */
/* protected mode pointer */
UINT8 TDRsvdByte; /* Reserved, must be zero. */
UINT16 TDDataLen; /* Data block length in bytes. */
UINT16 TDDataPtrOffset; /* Far pointer to data buffer. */
UINT16 TDDataPtrSegment; /* Far pointer to data buffer. */
} DataBlock[MAX_DATA_BLKS];
} PXENV_UNDI_TBD_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
IN UINT8 Protocol; /* See description below */
#define P_UNKNOWN 0
#define P_IP 1
#define P_ARP 2
#define P_RARP 3
IN UINT8 XmitFlag; /* See description below */
#define XMT_DESTADDR 0x0000 /* destination address given */
#define XMT_BROADCAST 0x0001 /* use broadcast address */
IN UINT16 DestAddrOffset; /* 16-bit segment & offset of the */
IN UINT16 DestAddrSegment; /* destination media address */
/* See description below */
IN UINT16 TBDOffset; /* 16-bit segment & offset of the */
IN UINT16 TBDSegment; /* transmit buffer descriptor of type */
/* XmitBufferDesc */
IN UINT32 Reserved[2]; /* for future use */
} PXENV_UNDI_TRANSMIT_t;
/*++
Protocol:
This is the protocol of the upper layer that is calling
NICTransmit call. If the upper layer has filled the media
header this field must be 0.
XmitFlag:
If this flag is 0, the NIC driver expects a pointer to the
destination media address in the field DestMediaAddr. If 1,
the NIC driver fills the broadcast address for the
destination.
DestAddrOffset & DestAddrSegment:
This is a pointer to the hardware address of the destination
media. It can be null if the destination is not known in
which case the XmitFlag contains 1 for broadcast. Destination
media address must be obtained by the upper level protocol
(with Address Resolution Protocol) and NIC driver does not do
any address resolution.
--*/
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
IN PXENV_UNDI_MCAST_ADDR_t McastBuffer; /* In: */
/* See PXENV_UNDI_MCAST_ADDR_t. */
} PXENV_UNDI_SET_MCAST_ADDR_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
IN UINT8 StationAddress[ADDR_LEN]; /* new address to be set */
} PXENV_UNDI_SET_STATION_ADDR_t;
typedef struct s_PXENV_UNDI_SET_PACKET_FILTER {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
IN UINT8 filter; /* In: Receive filter value. */
/* see PXENV_UNDI_OPEN_t for values */
} PXENV_UNDI_SET_PACKET_FILTER_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
OUT UINT16 BaseIo; /* Out: Adapter's Base IO */
OUT UINT16 IntNumber; /* Out: IRQ number */
OUT UINT16 MaxTranUnit; /* Out: MTU */
OUT UINT16 HwType; /* Out: type of protocol at hardware level */
#define ETHER_TYPE 1
#define EXP_ETHER_TYPE 2
#define IEEE_TYPE 6
#define ARCNET_TYPE 7
/*++
other numbers can be obtained from rfc1010 for "Assigned
Numbers". This number may not be validated by the application
and hence adding new numbers to the list should be fine at any
time.
--*/
OUT UINT16 HwAddrLen; /* Out: actual length of hardware address */
OUT UINT8 CurrentNodeAddress[ADDR_LEN]; /* Out: Current hardware address*/
OUT UINT8 PermNodeAddress[ADDR_LEN]; /* Out: Permanent hardware address*/
OUT UINT16 ROMAddress; /* Out: ROM address */
OUT UINT16 RxBufCt; /* Out: receive Queue length */
OUT UINT16 TxBufCt; /* Out: Transmit Queue length */
} PXENV_UNDI_GET_INFORMATION_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
OUT UINT32 XmtGoodFrames; /* Out: No. of good transmissions */
OUT UINT32 RcvGoodFrames; /* Out: No. of good frames received */
OUT UINT32 RcvCRCErrors; /* Out: No. of frames with CRC error */
OUT UINT32 RcvResourceErrors; /* Out: no. of frames discarded - */
/* Out: receive Queue full */
} PXENV_UNDI_GET_STATISTICS_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
} PXENV_UNDI_CLEAR_STATISTICS_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
} PXENV_UNDI_INITIATE_DIAGS_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
} PXENV_UNDI_FORCE_INTERRUPT_t;
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
IN UINT32 InetAddr; /* In: IP Multicast Address */
OUT UINT8 MediaAddr[ADDR_LEN]; /* Out: corresponding hardware */
/* multicast address */
} PXENV_UNDI_GET_MCAST_ADDR_t;
typedef struct {
OUT UINT16 Status; /* OUT: PXENV_STATUS_xxx */
OUT UINT8 NicType; /* OUT: 2=PCI, 3=PnP */
union {
struct {
OUT UINT16 Vendor_ID; /* OUT: */
OUT UINT16 Dev_ID; /* OUT: */
OUT UINT8 Base_Class; /* OUT: */
OUT UINT8 Sub_Class; /* OUT: */
OUT UINT8 Prog_Intf; /* OUT: program interface */
OUT UINT8 Rev; /* OUT: Revision number */
OUT UINT16 BusDevFunc; /* OUT: Bus, Device */
/* & Function numbers */
OUT UINT16 SubVendor_ID; /* OUT: */
OUT UINT16 SubDevice_ID; /* OUT: */
} pci;
struct {
OUT UINT32 EISA_Dev_ID; /* Out: */
OUT UINT8 Base_Class; /* OUT: */
OUT UINT8 Sub_Class; /* OUT: */
OUT UINT8 Prog_Intf; /* OUT: program interface */
OUT UINT16 CardSelNum; /* OUT: Card Selector Number */
OUT UINT8 Reserved; /* to make it 10 bytes */
} pnp;
} pci_pnp_info;
} PXENV_UNDI_GET_NIC_TYPE_t;
typedef struct {
OUT UINT16 Status; /* OUT: PXENV_STATUS_xxx */
OUT UINT8 IfaceType[16]; /* OUT: Type name of MAC, AsciiZ */
/* format. This is used by the */
/* Universal NDIS Driver to fill */
/* the driver type in it's MAC */
/* Service specific */
/* characteristic table */
OUT UINT32 LinkSpeed; /* OUT: */
OUT UINT32 ServiceFlags; /* OUT: as defined in NDIS Spec 2.0X */
OUT UINT32 Reserved[4]; /* OUT: will be filled with 0s till */
/* defined */
} PXENV_UNDI_GET_NDIS_INFO_t;
typedef struct {
OUT UINT16 Status; /* OUT: PXENV_STATUS_xxx */
IN OUT UINT16 FuncFlag; /* In: PXENV_UNDI_ISR_IN_xxx */
/* Out: PXENV_UNDI_ISR_OUT_xxx */
OUT UINT16 BufferLength;
OUT UINT16 FrameLength;
OUT UINT16 FrameHeaderLength;
OUT UINT16 FrameOffset;
OUT UINT16 FrameSegSel;
OUT UINT8 ProtType;
OUT UINT8 PktType;
} PXENV_UNDI_ISR_t;
#define PXENV_UNDI_ISR_IN_START 1 /* This function must be first */
/* when an interrupt is received. */
/* It will tell us if the intr */
/* was generated by our device. */
#define PXENV_UNDI_ISR_IN_PROCESS 2 /* Call to start processing one of */
/* our interrupts. */
#define PXENV_UNDI_ISR_IN_GET_NEXT 3 /* Call to start/continue receiving */
/* data from receive buffer(s). */
/*++
Possible responses from PXENV_UNDI_ISR_IN_START
--*/
#define PXENV_UNDI_ISR_OUT_OURS 0 /* This is our interrupt. Deal */
/* with it. */
#define PXENV_UNDI_ISR_OUT_NOT_OURS 1 /* This is not our interrupt. */
/* Ignore it. */
/*++
Possible responses from PXENV_UNDI_ISR_IN_PROCESS and
PXENV_UNDI_ISR_IN_PROCESS
--*/
#define PXENV_UNDI_ISR_OUT_DONE 0 /* We are done processing this */
/* interrupt. */
#define PXENV_UNDI_ISR_OUT_TRANSMIT 2 /* We completed a transmit */
/* interrupt. */
#define PXENV_UNDI_ISR_OUT_RECEIVE 3 /* Get data from receive buffer. */
#define PXENV_UNDI_ISR_OUT_BUSY 4 /* ? */
typedef struct {
UINT16 Status; /* Out: PXENV_STATUS_xxx */
} PXENV_STOP_UNDI_t;
#define PXENV_UNDI_STARTED 1 /* not even initialized */
#define PXENV_UNDI_INITIALIZED 2 /* initialized and closed (not opened) */
#define PXENV_UNDI_OPENED 3 /* initialized & opened */
typedef struct {
OUT UINT16 Status; /* Out: PXENV_STATUS_xxx */
UINT16 UNDI_State;
} PXENV_UNDI_GET_STATE_t;
#pragma pack()
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?