User`s guide

Aironet Wireless Communications, Inc. 7-38 Confidential and Proprietary
Receiving an 802.3 Packet
The following is sample code for receiving a packet:
typedef struct {
/* 802.3 packet header (802.3 packet format) */
unsigned short Status;
unsigned short PayloadLen;
unsigned char DstAddr[6];
unsigned char SrcAddr[6];
} tdsPktHdr;
struct {
tdsPktHdr header;
char payload[2312];
}
unsigned short Fid;
unsigned short receive_802_3_packet(void)
{
if ( (IN4500(EVSTAT) & EV_RX) == 0) return NO_PACKET;
Fid = IN4500(RXFID);
if (bap0_setup(Fid, 0x34) != SUCCESS) return ERROR;
// read the 802.3 header
bap0_read(&rxpkt.header, sizeof(rxpkt.header));
// read the packet payload
if (rxpkt.header.PayloadLen) {
bap0_read(&rxpkt.payload, rxpkt.header.PayloadLen);
}
// acknowledge reception
OUT4500(EVACK, EV_RX);
return SUCCESS;
}
Note, that this leaves the receive packet destination/source/payload in a suitable (contiguous) format for
passing up to higher layers.