105,10 → 105,10 |
* Tries to reuse free packets first. |
* Creates a new packet aligned to the memory page size if none available. |
* Locks the global data during its processing. |
* @param addr_len The source and destination addresses maximal length in bytes. Input parameter. |
* @param max_prefix The maximal prefix length in bytes. Input parameter. |
* @param max_content The maximal content length in bytes. Input parameter. |
* @param max_suffix The maximal suffix length in bytes. Input parameter. |
* @param[in] addr_len The source and destination addresses maximal length in bytes. |
* @param[in] max_prefix The maximal prefix length in bytes. |
* @param[in] max_content The maximal content length in bytes. |
* @param[in] max_suffix The maximal suffix length in bytes. |
* @returns The packet of dimensions at least as given. |
* @returns NULL if there is not enough memory left. |
*/ |
115,7 → 115,7 |
packet_t packet_get( size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix ); |
|
/** Releases the packet queue. |
* @param packet_id The first packet identifier. Input parameter. |
* @param[in] packet_id The first packet identifier. |
* @returns EOK on success. |
* @returns ENOENT if there is no such packet. |
*/ |
123,17 → 123,17 |
|
/** Releases the packet and returns it to the appropriate free packet queue. |
* Should be used only when the global data are locked. |
* @param packet The packet to be released. Input parameter. |
* @param[in] packet The packet to be released. |
*/ |
void packet_release( packet_t packet ); |
|
/** Creates a new packet of dimensions at least as given. |
* Should be used only when the global data are locked. |
* @param length The total length of the packet, including the header, the addresses and the data of the packet. Input parameter. |
* @param addr_len The source and destination addresses maximal length in bytes. Input parameter. |
* @param max_prefix The maximal prefix length in bytes. Input parameter. |
* @param max_content The maximal content length in bytes. Input parameter. |
* @param max_suffix The maximal suffix length in bytes. Input parameter. |
* @param[in] length The total length of the packet, including the header, the addresses and the data of the packet. |
* @param[in] addr_len The source and destination addresses maximal length in bytes. |
* @param[in] max_prefix The maximal prefix length in bytes. |
* @param[in] max_content The maximal content length in bytes. |
* @param[in] max_suffix The maximal suffix length in bytes. |
* @returns The packet of dimensions at least as given. |
* @returns NULL if there is not enough memory left. |
*/ |
140,16 → 140,16 |
packet_t packet_create( size_t length, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix ); |
|
/** Clears and initializes the packet according to the given dimensions. |
* @param packet The packet to be initialized. Input parameter. |
* @param addr_len The source and destination addresses maximal length in bytes. Input parameter. |
* @param max_prefix The maximal prefix length in bytes. Input parameter. |
* @param max_content The maximal content length in bytes. Input parameter. |
* @param max_suffix The maximal suffix length in bytes. Input parameter. |
* @param[in] packet The packet to be initialized. |
* @param[in] addr_len The source and destination addresses maximal length in bytes. |
* @param[in] max_prefix The maximal prefix length in bytes. |
* @param[in] max_content The maximal content length in bytes. |
* @param[in] max_suffix The maximal suffix length in bytes. |
*/ |
void packet_init( packet_t packet, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix ); |
|
/** Shares the packet memory block. |
* @param packet The packet to be shared. |
* @param[in] packet The packet to be shared. |
* @returns EOK on success. |
* @returns EINVAL if the packet is not valid. |
* @returns EINVAL if the calling module does not accept the memory. |