Changeset 1bfd3d3 in mainline for uspace/lib/c/generic/net/packet.c
- Timestamp:
- 2010-11-19T22:02:09Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 973ef9fc, a9c6b966
- Parents:
- cc3c2a1c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/net/packet.c
rcc3c2a1c r1bfd3d3 82 82 /** Initializes the packet map. 83 83 * 84 * @return sEOK on success.85 * @return sENOMEM if there is not enough memory left.84 * @return EOK on success. 85 * @return ENOMEM if there is not enough memory left. 86 86 */ 87 87 int pm_init(void) … … 101 101 * 102 102 * @param[in] packet_id The packet identifier to be found. 103 * @return sThe found packet reference.104 * @return sNULL if the mapping does not exist.103 * @return The found packet reference. 104 * @return NULL if the mapping does not exist. 105 105 */ 106 106 packet_t pm_find(packet_id_t packet_id) … … 130 130 * 131 131 * @param[in] packet The packet to be remembered. 132 * @return sEOK on success.133 * @return sEINVAL if the packet is not valid.134 * @return sEINVAL if the packet map is not initialized.135 * @return sENOMEM if there is not enough memory left.132 * @return EOK on success. 133 * @return EINVAL if the packet is not valid. 134 * @return EINVAL if the packet map is not initialized. 135 * @return ENOMEM if there is not enough memory left. 136 136 */ 137 137 int pm_add(packet_t packet) … … 205 205 * @param[in] order The packet order value. 206 206 * @param[in] metric The metric value of the packet. 207 * @return sEOK on success.208 * @return sEINVAL if the first parameter is NULL.209 * @return sEINVAL if the packet is not valid.207 * @return EOK on success. 208 * @return EINVAL if the first parameter is NULL. 209 * @return EINVAL if the packet is not valid. 210 210 */ 211 211 int pq_add(packet_t * first, packet_t packet, size_t order, size_t metric) … … 249 249 * @param[in] first The first packet of the queue. 250 250 * @param[in] order The packet order value. 251 * @return sThe packet with the given order.252 * @return sNULL if the first packet is not valid.253 * @return sNULL if the packet is not found.251 * @return The packet with the given order. 252 * @return NULL if the first packet is not valid. 253 * @return NULL if the packet is not found. 254 254 */ 255 255 packet_t pq_find(packet_t packet, size_t order) … … 275 275 * @param[in] packet The packet in the queue. 276 276 * @param[in] new_packet The new packet to be inserted. 277 * @return sEOK on success.278 * @return sEINVAL if etiher of the packets is invalid.277 * @return EOK on success. 278 * @return EINVAL if etiher of the packets is invalid. 279 279 */ 280 280 int pq_insert_after(packet_t packet, packet_t new_packet) … … 298 298 * 299 299 * @param[in] packet The packet to be detached. 300 * @return sThe next packet in the queue. If the packet is the first300 * @return The next packet in the queue. If the packet is the first 301 301 * one of the queue, this becomes the new first one. 302 * @return sNULL if there is no packet left.303 * @return sNULL if the packet is not valid.302 * @return NULL if there is no packet left. 303 * @return NULL if the packet is not valid. 304 304 */ 305 305 packet_t pq_detach(packet_t packet) … … 328 328 * @param[in] order The packet order value. 329 329 * @param[in] metric The metric value of the packet. 330 * @return sEOK on success.331 * @return sEINVAL if the packet is invalid.330 * @return EOK on success. 331 * @return EINVAL if the packet is invalid. 332 332 */ 333 333 int pq_set_order(packet_t packet, size_t order, size_t metric) … … 346 346 * @param[out] order The packet order value. 347 347 * @param[out] metric The metric value of the packet. 348 * @return sEOK on success.349 * @return sEINVAL if the packet is invalid.348 * @return EOK on success. 349 * @return EINVAL if the packet is invalid. 350 350 */ 351 351 int pq_get_order(packet_t packet, size_t *order, size_t *metric) … … 391 391 * 392 392 * @param[in] packet The packet queue member. 393 * @return sThe next packet in the queue.394 * @return sNULL if there is no next packet.395 * @return sNULL if the packet is not valid.393 * @return The next packet in the queue. 394 * @return NULL if there is no next packet. 395 * @return NULL if the packet is not valid. 396 396 */ 397 397 packet_t pq_next(packet_t packet) … … 406 406 * 407 407 * @param[in] packet The packet queue member. 408 * @return sThe previous packet in the queue.409 * @return sNULL if there is no previous packet.410 * @return sNULL if the packet is not valid.408 * @return The previous packet in the queue. 409 * @return NULL if there is no previous packet. 410 * @return NULL if the packet is not valid. 411 411 */ 412 412 packet_t pq_previous(packet_t packet)
Note:
See TracChangeset
for help on using the changeset viewer.