Help: ICE_ICELIB_PIC_RECV

Receives a packet from a port/processor module

Function PIC_RECV - Receives a packet from a port/processor module

PIC	p	Handle to Device 
int	node	Port/Processor Module node ID (-1=useDefault)
int	*head	Pointer to packet header for RMIF packets
int	*data	Pointer to packet data 
int	bytes	Number of bytes to write
int	flags   0=Normal, PKT_RMIF for RMIF packets, PKT_ACMD for command packets

Receives a packet from a processor module output socket.
If flags indicate there is a packet header involved (i.e. PKT_RMIF), the
packet header is read into *head.  The <bytes> parameter is the maximum
length of the transfer into the *data buffer.

For ACMD commands, this follows a PKTF_BUS_RD, or PKTF_MEM_RD.  The header values
should be the values from the send() command. The data will be returned in *data. 

All packet transfers are rounded up to 8-byte boundaries.  Make sure the
data buffer supports a read through the last 8-byte aligned field.  This
is to avoid extra memory copies in support of high-speed transfers.

See PIC_MSG for node IDs.

Returns the number of bytes read or -1 if nothing is available.