Synopsis
CTL_ETH_TX_FRAME_t *ctl_eth_alloc_tx_frame(size_t header_byte_count,
                                           CTL_TIME_t timeout);
Description

ctl_eth_alloc_tx_frame allocate a new transmission frame from network memory and initializes fields within the frame. A header is allocated and assigned to the header member of the allocated frame. header_byte_count is the number of byes to allocate for the header, must be a multiple of four, and must include the alignment short. If the header size is not a multiple of four, the frame isn't allocated.

Once allocated, the header_byte_count of the frame is initialized to the header_byte_count parameter adjusted to remove the alignment short size.

Return Value

ctl_eth_alloc_tx_frame returns a pointer to the allocated frame or zero if the frame cannot be allocated.