Index: uspace/lib/c/generic/net/packet.c
===================================================================
--- uspace/lib/c/generic/net/packet.c	(revision 46d4d9f449e7933280b1877c70448602ec0ab0ae)
+++ uspace/lib/c/generic/net/packet.c	(revision 16ac75641abae11666390ba98d15747b42b342af)
@@ -62,5 +62,8 @@
 
 /** Type definition of the packet map page. */
-typedef packet_t *packet_map_t[PACKET_MAP_SIZE];
+typedef packet_t packet_map_t[PACKET_MAP_SIZE];
+
+/** Type definition of the packet map page pointer. */
+typedef packet_map_t * packet_map_ref;
 
 /** Packet map.
@@ -82,6 +85,6 @@
 /** Initializes the packet map.
  *
- * @return		EOK on success.
- * @return		ENOMEM if there is not enough memory left.
+ * @returns		EOK on success.
+ * @returns		ENOMEM if there is not enough memory left.
  */
 int pm_init(void)
@@ -101,11 +104,11 @@
  *
  * @param[in] packet_id	The packet identifier to be found.
- * @return		The found packet reference.
- * @return		NULL if the mapping does not exist.
- */
-packet_t *pm_find(packet_id_t packet_id)
-{
-	packet_map_t *map;
-	packet_t *packet;
+ * @returns		The found packet reference.
+ * @returns		NULL if the mapping does not exist.
+ */
+packet_t pm_find(packet_id_t packet_id)
+{
+	packet_map_ref map;
+	packet_t packet;
 
 	if (!packet_id)
@@ -130,12 +133,12 @@
  *
  * @param[in] packet	The packet to be remembered.
- * @return		EOK on success.
- * @return		EINVAL if the packet is not valid.
- * @return		EINVAL if the packet map is not initialized.
- * @return		ENOMEM if there is not enough memory left.
- */
-int pm_add(packet_t *packet)
-{
-	packet_map_t *map;
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet is not valid.
+ * @returns		EINVAL if the packet map is not initialized.
+ * @returns		ENOMEM if there is not enough memory left.
+ */
+int pm_add(packet_t packet)
+{
+	packet_map_ref map;
 	int rc;
 
@@ -151,5 +154,5 @@
 	} else {
 		do {
-			map = (packet_map_t *) malloc(sizeof(packet_map_t));
+			map = (packet_map_ref) malloc(sizeof(packet_map_t));
 			if (!map) {
 				fibril_rwlock_write_unlock(&pm_globals.lock);
@@ -177,6 +180,6 @@
 	int count;
 	int index;
-	packet_map_t *map;
-	packet_t *packet;
+	packet_map_ref map;
+	packet_t packet;
 
 	fibril_rwlock_write_lock(&pm_globals.lock);
@@ -205,11 +208,11 @@
  * @param[in] order	The packet order value.
  * @param[in] metric	The metric value of the packet.
- * @return		EOK on success.
- * @return		EINVAL if the first parameter is NULL.
- * @return		EINVAL if the packet is not valid.
- */
-int pq_add(packet_t **first, packet_t *packet, size_t order, size_t metric)
-{
-	packet_t *item;
+ * @returns		EOK on success.
+ * @returns		EINVAL if the first parameter is NULL.
+ * @returns		EINVAL if the packet is not valid.
+ */
+int pq_add(packet_t * first, packet_t packet, size_t order, size_t metric)
+{
+	packet_t item;
 
 	if (!first || !packet_is_valid(packet))
@@ -249,11 +252,11 @@
  * @param[in] first	The first packet of the queue.
  * @param[in] order	The packet order value.
- * @return		The packet with the given order.
- * @return		NULL if the first packet is not valid.
- * @return		NULL if the packet is not found.
- */
-packet_t *pq_find(packet_t *packet, size_t order)
-{
-	packet_t *item;
+ * @returns		The packet with the given order.
+ * @returns		NULL if the first packet is not valid.
+ * @returns		NULL if the packet is not found.
+ */
+packet_t pq_find(packet_t packet, size_t order)
+{
+	packet_t item;
 
 	if (!packet_is_valid(packet))
@@ -275,10 +278,10 @@
  * @param[in] packet	The packet in the queue.
  * @param[in] new_packet The new packet to be inserted.
- * @return		EOK on success.
- * @return		EINVAL if etiher of the packets is invalid.
- */
-int pq_insert_after(packet_t *packet, packet_t *new_packet)
-{
-	packet_t *item;
+ * @returns		EOK on success.
+ * @returns		EINVAL if etiher of the packets is invalid.
+ */
+int pq_insert_after(packet_t packet, packet_t new_packet)
+{
+	packet_t item;
 
 	if (!packet_is_valid(packet) || !packet_is_valid(new_packet))
@@ -298,13 +301,13 @@
  *
  * @param[in] packet	The packet to be detached.
- * @return		The next packet in the queue. If the packet is the first
+ * @returns		The next packet in the queue. If the packet is the first
  *			one of the queue, this becomes the new first one.
- * @return		NULL if there is no packet left.
- * @return		NULL if the packet is not valid.
- */
-packet_t *pq_detach(packet_t *packet)
-{
-	packet_t *next;
-	packet_t *previous;
+ * @returns		NULL if there is no packet left.
+ * @returns		NULL if the packet is not valid.
+ */
+packet_t pq_detach(packet_t packet)
+{
+	packet_t next;
+	packet_t previous;
 
 	if (!packet_is_valid(packet))
@@ -328,8 +331,8 @@
  * @param[in] order	The packet order value.
  * @param[in] metric	The metric value of the packet.
- * @return		EOK on success.
- * @return		EINVAL if the packet is invalid.
- */
-int pq_set_order(packet_t *packet, size_t order, size_t metric)
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet is invalid.
+ */
+int pq_set_order(packet_t packet, size_t order, size_t metric)
 {
 	if (!packet_is_valid(packet))
@@ -346,8 +349,8 @@
  * @param[out] order	The packet order value.
  * @param[out] metric	The metric value of the packet.
- * @return		EOK on success.
- * @return		EINVAL if the packet is invalid.
- */
-int pq_get_order(packet_t *packet, size_t *order, size_t *metric)
+ * @returns		EOK on success.
+ * @returns		EINVAL if the packet is invalid.
+ */
+int pq_get_order(packet_t packet, size_t *order, size_t *metric)
 {
 	if (!packet_is_valid(packet))
@@ -372,8 +375,8 @@
  *			packets after its detachment.
  */
-void pq_destroy(packet_t *first, void (*packet_release)(packet_t *packet))
-{
-	packet_t *actual;
-	packet_t *next;
+void pq_destroy(packet_t first, void (*packet_release)(packet_t packet))
+{
+	packet_t actual;
+	packet_t next;
 
 	actual = first;
@@ -391,9 +394,9 @@
  *
  * @param[in] packet	The packet queue member.
- * @return		The next packet in the queue.
- * @return		NULL if there is no next packet.
- * @return		NULL if the packet is not valid.
- */
-packet_t *pq_next(packet_t *packet)
+ * @returns		The next packet in the queue.
+ * @returns		NULL if there is no next packet.
+ * @returns		NULL if the packet is not valid.
+ */
+packet_t pq_next(packet_t packet)
 {
 	if (!packet_is_valid(packet))
@@ -406,9 +409,9 @@
  *
  * @param[in] packet	The packet queue member.
- * @return		The previous packet in the queue.
- * @return		NULL if there is no previous packet.
- * @return		NULL if the packet is not valid.
- */
-packet_t *pq_previous(packet_t *packet)
+ * @returns		The previous packet in the queue.
+ * @returns		NULL if there is no previous packet.
+ * @returns		NULL if the packet is not valid.
+ */
+packet_t pq_previous(packet_t packet)
 {
 	if (!packet_is_valid(packet))
