udi_nd_rx_rdy(3udi)
Network receive packet response
#include <udi.h>void udi_nd_rx_rdy ( udi_nic_rx_cb_t *cb );ARGUMENTS cb is a pointer to a Network Interface Metalanguage receive control block.
TARGET CHANNEL This request is issued to the ND over the Network Interface Metalanguage receive data transfer channel. If the NSR re-uses a control block previously returned to it by the ND then the channel parameter in that control block will already correctly identify the target channel.
DESCRIPTION The udi_nd_rx_rdy is used by the NSR to provide one or more udi_nic_rx_cb_t structures and associated receive buffers to the ND. The ND may then use these buffers to receive packets from the network and pass those packets to the NSR in udi_nsr_rx_ind or udi_nsr_exp_rx_ind indications. The ND must not allocate udi_nic_rx_cb_t control blocks internally because these are regulated by the NSR to implement flow control.
The ND must also refrain from allocating receive buffers internally if possible. In any event, the incoming data must always be passed to the NSR in the same buffer (or a direct udi_buf_write/udi_buf_copy version thereof) that was originally passed to the ND by the NSR. If the ND has initially received the packet into a separate buffer it must issue a udi_buf_copy or udi_buf_write operation to copy that packet into the buffer provided by the NSR to send that packet to the NSR.
The NSR will not expect the ND to preserve or receive packets during any period of time wherein the NSR has not provided the ND with enough receive control blocks and buffers to accomodate the incoming data. It is recommended but not required that the NSR provide the ND with buffers whose length is zero and that it provide at least rx_hw_threshold number of receive control blocks at any point in time. The ND must set the buffer size to the needed size (usually the max_pdu_size from the udi_nic_bind_cb_t) before calling udi_buf_dma_map.
The ND should return all of the control blocks to the NSR with a zero-length buffer upon receipt of a udi_nd_disable_req operation.
Note that if a udi_nd_unbind_req or udi_channel_closed operation occurs, the NSR will not return the receive control blocks or buffers to the ND device and will deallocate them internally.
This operation cannot be aborted.