INtime SDK Help
hpeAllocateReceiveBufferSet
INtime SDK v7 > About INtime > Networking and I/O > High-Performance Ethernet > hpeAllocateReceiveBufferSet

Allocates a receive buffer set which is compatible with the network device. The allocated buffer set will be passed to hpeAttachReceiveBufferSet. The allocated structure must be freed using hpeFreeReceiveBufferSet.

HPESTATUS hpeAllocateReceiveBufferSet(
    HPEHANDLE devhandle,  
    HPERXBUFFERSET ** rx_buffer_set, 
    DWORD buffer_count, 
    DWORD buffer_size
);

Parameters

devhandle
A handle value for the device.
rx_buffer_set
A pointer to a pointer to a HPERXBUFFERSET structure which will be filled by the call.
buffer_count
Number of buffers to be allocated. The number of buffers should be (the number of receiving packets at a time) + 1, because some of the drivers only receive packets one less than the number of attached buffers due to the limitation of their ring buffer structure.
buffer_size
Size of each buffer. The buffer must be large enough for receiving an entire packet, excluding the 4 bytes CRC field at the end of the packet.

Return Values

A status value indicating the success or failure of the operation:

E_OK The operation completed successfully.
E_EXIST The handle given is not a handle for an open HPE interface.
E_PARAM One of the fields rx_buffer_set or buffer_size is not valid.
E_LIMIT The buffer_size parameter is out of range.
E_MEM Not enough heap memory to allocate the buffer set.

Requirements

Versions Defined in Include Link to
INtime 4.0 intime/rt/include/hpeif2.h hpeif2.h hpeif2.lib
See Also