Changes in uspace/srv/net/structures/packet/packet.h [91478aa:aadf01e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/structures/packet/packet.h
r91478aa raadf01e 68 68 /** Reserved packet prefix length. 69 69 */ 70 size_t 70 size_t prefix; 71 71 /** Maximal packet content length. 72 72 */ 73 size_t 73 size_t content; 74 74 /** Reserved packet suffix length. 75 75 */ 76 size_t 76 size_t suffix; 77 77 /** Maximal packet address length. 78 78 */ 79 size_t 79 size_t addr_len; 80 80 }; 81 81 … … 89 89 * @returns NULL if the mapping does not exist. 90 90 */ 91 packet_t pm_find( packet_id_t packet_id);91 packet_t pm_find(packet_id_t packet_id); 92 92 93 93 /** Adds the packet mapping. … … 98 98 * @returns ENOMEM if there is not enough memory left. 99 99 */ 100 int pm_add( packet_t packet);100 int pm_add(packet_t packet); 101 101 102 102 /** Initializes the packet map. … … 104 104 * @returns ENOMEM if there is not enough memory left. 105 105 */ 106 int pm_init( void);106 int pm_init(void); 107 107 108 108 /** Releases the packet map. 109 109 */ 110 void pm_destroy( void);110 void pm_destroy(void); 111 111 112 112 /** Add packet to the sorted queue. … … 121 121 * @returns EINVAL if the packet is not valid. 122 122 */ 123 int pq_add( packet_t * first, packet_t packet, size_t order, size_t metric);123 int pq_add(packet_t * first, packet_t packet, size_t order, size_t metric); 124 124 125 125 /** Finds the packet with the given order. … … 130 130 * @returns NULL if the packet is not found. 131 131 */ 132 packet_t pq_find( packet_t first, size_t order);132 packet_t pq_find(packet_t first, size_t order); 133 133 134 134 /** Inserts packet after the given one. … … 138 138 * @returns EINVAL if etiher of the packets is invalid. 139 139 */ 140 int pq_insert_after( packet_t packet, packet_t new_packet);140 int pq_insert_after(packet_t packet, packet_t new_packet); 141 141 142 142 /** Detach the packet from the queue. … … 146 146 * @returns NULL if the packet is not valid. 147 147 */ 148 packet_t pq_detach( packet_t packet);148 packet_t pq_detach(packet_t packet); 149 149 150 150 /** Sets the packet order and metric attributes. … … 155 155 * @returns EINVAL if the packet is invalid.. 156 156 */ 157 int pq_set_order( packet_t packet, size_t order, size_t metric);157 int pq_set_order(packet_t packet, size_t order, size_t metric); 158 158 159 159 /** Sets the packet order and metric attributes. … … 164 164 * @returns EINVAL if the packet is invalid.. 165 165 */ 166 int pq_get_order( packet_t packet, size_t * order, size_t * metric);166 int pq_get_order(packet_t packet, size_t * order, size_t * metric); 167 167 168 168 /** Releases the whole queue. … … 171 171 * @param[in] packet_release The releasing function called for each of the packets after its detachment. 172 172 */ 173 void pq_destroy( packet_t first, void ( * packet_release )( packet_t packet));173 void pq_destroy(packet_t first, void (*packet_release)(packet_t packet)); 174 174 175 175 /** Returns the next packet in the queue. … … 179 179 * @returns NULL if the packet is not valid. 180 180 */ 181 packet_t pq_next( packet_t packet);181 packet_t pq_next(packet_t packet); 182 182 183 183 /** Returns the previous packet in the queue. … … 187 187 * @returns NULL if the packet is not valid. 188 188 */ 189 packet_t pq_previous( packet_t packet);189 packet_t pq_previous(packet_t packet); 190 190 191 191 /*@}*/
Note:
See TracChangeset
for help on using the changeset viewer.