Index: uspace/srv/net/tl/tcp/tcp.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp.c	(revision 1bfd3d3b2991b8f2df4cff87d9723059528b9bd1)
+++ uspace/srv/net/tl/tcp/tcp.c	(revision dd5046dd1beda773c101cd57515df9157d461a36)
@@ -160,5 +160,5 @@
 };
 
-static int tcp_release_and_return(packet_t, int);
+static int tcp_release_and_return(packet_t *, int);
 static void tcp_prepare_operation_header(socket_core_t *, tcp_socket_data_t *,
     tcp_header_t *, int synchronize, int);
@@ -171,23 +171,23 @@
 static int tcp_release_after_timeout(void *);
 
-static int tcp_process_packet(device_id_t, packet_t, services_t);
+static int tcp_process_packet(device_id_t, packet_t *, services_t);
 static int tcp_connect_core(socket_core_t *, socket_cores_t *,
     struct sockaddr *, socklen_t);
 static int tcp_queue_prepare_packet(socket_core_t *, tcp_socket_data_t *,
-    packet_t, size_t);
-static int tcp_queue_packet(socket_core_t *, tcp_socket_data_t *, packet_t,
+    packet_t *, size_t);
+static int tcp_queue_packet(socket_core_t *, tcp_socket_data_t *, packet_t *,
     size_t);
-static packet_t tcp_get_packets_to_send(socket_core_t *, tcp_socket_data_t *);
-static void tcp_send_packets(device_id_t, packet_t);
+static packet_t *tcp_get_packets_to_send(socket_core_t *, tcp_socket_data_t *);
+static void tcp_send_packets(device_id_t, packet_t *);
 
 static void tcp_process_acknowledgement(socket_core_t *, tcp_socket_data_t *,
     tcp_header_t *);
-static packet_t tcp_send_prepare_packet(socket_core_t *, tcp_socket_data_t *,
-    packet_t, size_t, size_t);
-static packet_t tcp_prepare_copy(socket_core_t *, tcp_socket_data_t *, packet_t,
-    size_t, size_t);
+static packet_t *tcp_send_prepare_packet(socket_core_t *, tcp_socket_data_t *,
+    packet_t *, size_t, size_t);
+static packet_t *tcp_prepare_copy(socket_core_t *, tcp_socket_data_t *,
+    packet_t *, size_t, size_t);
 /* static */ void tcp_retransmit_packet(socket_core_t *, tcp_socket_data_t *,
     size_t);
-static int tcp_create_notification_packet(packet_t *, socket_core_t *,
+static int tcp_create_notification_packet(packet_t **, socket_core_t *,
     tcp_socket_data_t *, int, int);
 static void tcp_refresh_socket_data(tcp_socket_data_t *);
@@ -196,15 +196,15 @@
 
 static int tcp_process_listen(socket_core_t *, tcp_socket_data_t *,
-    tcp_header_t *, packet_t, struct sockaddr *, struct sockaddr *, size_t);
+    tcp_header_t *, packet_t *, struct sockaddr *, struct sockaddr *, size_t);
 static int tcp_process_syn_sent(socket_core_t *, tcp_socket_data_t *,
-    tcp_header_t *, packet_t);
+    tcp_header_t *, packet_t *);
 static int tcp_process_syn_received(socket_core_t *, tcp_socket_data_t *,
-    tcp_header_t *, packet_t);
+    tcp_header_t *, packet_t *);
 static int tcp_process_established(socket_core_t *, tcp_socket_data_t *,
-    tcp_header_t *, packet_t, int, size_t);
+    tcp_header_t *, packet_t *, int, size_t);
 static int tcp_queue_received_packet(socket_core_t *, tcp_socket_data_t *,
-    packet_t, int, size_t);
-
-static int tcp_received_msg(device_id_t, packet_t, services_t, services_t);
+    packet_t *, int, size_t);
+
+static int tcp_received_msg(device_id_t, packet_t *, services_t, services_t);
 static int tcp_process_client_messages(ipc_callid_t, ipc_call_t);
 
@@ -262,5 +262,5 @@
 }
 
-int tcp_received_msg(device_id_t device_id, packet_t packet,
+int tcp_received_msg(device_id_t device_id, packet_t *packet,
     services_t receiver, services_t error)
 {
@@ -280,5 +280,5 @@
 }
 
-int tcp_process_packet(device_id_t device_id, packet_t packet, services_t error)
+int tcp_process_packet(device_id_t device_id, packet_t *packet, services_t error)
 {
 	size_t length;
@@ -288,5 +288,5 @@
 	socket_core_t *socket;
 	tcp_socket_data_t *socket_data;
-	packet_t next_packet;
+	packet_t *next_packet;
 	size_t total_length;
 	uint32_t checksum;
@@ -493,9 +493,9 @@
 
 int tcp_process_established(socket_core_t *socket, tcp_socket_data_t *
-    socket_data, tcp_header_t *header, packet_t packet, int fragments,
+    socket_data, tcp_header_t *header, packet_t *packet, int fragments,
     size_t total_length)
 {
-	packet_t next_packet;
-	packet_t tmp_packet;
+	packet_t *next_packet;
+	packet_t *tmp_packet;
 	uint32_t old_incoming;
 	size_t order;
@@ -801,5 +801,5 @@
 
 int tcp_queue_received_packet(socket_core_t *socket,
-    tcp_socket_data_t *socket_data, packet_t packet, int fragments,
+    tcp_socket_data_t *socket_data, packet_t *packet, int fragments,
     size_t total_length)
 {
@@ -838,7 +838,7 @@
 
 int tcp_process_syn_sent(socket_core_t *socket, tcp_socket_data_t *
-    socket_data, tcp_header_t *header, packet_t packet)
-{
-	packet_t next_packet;
+    socket_data, tcp_header_t *header, packet_t *packet)
+{
+	packet_t *next_packet;
 	int rc;
 
@@ -897,8 +897,8 @@
 int tcp_process_listen(socket_core_t *listening_socket,
     tcp_socket_data_t *listening_socket_data, tcp_header_t *header,
-    packet_t packet, struct sockaddr *src, struct sockaddr *dest,
+    packet_t *packet, struct sockaddr *src, struct sockaddr *dest,
     size_t addrlen)
 {
-	packet_t next_packet;
+	packet_t *next_packet;
 	socket_core_t *socket;
 	tcp_socket_data_t *socket_data;
@@ -1056,5 +1056,5 @@
 
 int tcp_process_syn_received(socket_core_t *socket,
-    tcp_socket_data_t *socket_data, tcp_header_t *header, packet_t packet)
+    tcp_socket_data_t *socket_data, tcp_header_t *header, packet_t *packet)
 {
 	socket_core_t *listening_socket;
@@ -1127,7 +1127,7 @@
 	size_t number;
 	size_t length;
-	packet_t packet;
-	packet_t next;
-	packet_t acknowledged = NULL;
+	packet_t *packet;
+	packet_t *next;
+	packet_t *acknowledged = NULL;
 	uint32_t old;
 
@@ -1232,5 +1232,5 @@
     ipc_call_t *answer, int *answer_count)
 {
-	packet_t packet;
+	packet_t *packet;
 	int rc;
 
@@ -1654,6 +1654,6 @@
     socket_data, size_t sequence_number)
 {
-	packet_t packet;
-	packet_t copy;
+	packet_t *packet;
+	packet_t *copy;
 	size_t data_length;
 
@@ -1736,5 +1736,5 @@
 {
 	tcp_socket_data_t *socket_data;
-	packet_t packet;
+	packet_t *packet;
 	int rc;
 
@@ -1824,5 +1824,5 @@
 
 int tcp_queue_prepare_packet(socket_core_t *socket,
-    tcp_socket_data_t *socket_data, packet_t packet, size_t data_length)
+    tcp_socket_data_t *socket_data, packet_t *packet, size_t data_length)
 {
 	tcp_header_t *header;
@@ -1855,5 +1855,5 @@
 
 int tcp_queue_packet(socket_core_t *socket, tcp_socket_data_t *socket_data,
-    packet_t packet, size_t data_length)
+    packet_t *packet, size_t data_length)
 {
 	int rc;
@@ -1876,11 +1876,11 @@
 }
 
-packet_t tcp_get_packets_to_send(socket_core_t *socket, tcp_socket_data_t *
+packet_t *tcp_get_packets_to_send(socket_core_t *socket, tcp_socket_data_t *
     socket_data)
 {
-	packet_t packet;
-	packet_t copy;
-	packet_t sending = NULL;
-	packet_t previous = NULL;
+	packet_t *packet;
+	packet_t *copy;
+	packet_t *sending = NULL;
+	packet_t *previous = NULL;
 	size_t data_length;
 	int rc;
@@ -1936,6 +1936,6 @@
 }
 
-packet_t tcp_send_prepare_packet(socket_core_t *socket, tcp_socket_data_t *
-    socket_data, packet_t packet, size_t data_length, size_t sequence_number)
+packet_t *tcp_send_prepare_packet(socket_core_t *socket, tcp_socket_data_t *
+    socket_data, packet_t *packet, size_t data_length, size_t sequence_number)
 {
 	tcp_header_t *header;
@@ -1997,8 +1997,8 @@
 }
 
-packet_t tcp_prepare_copy(socket_core_t *socket, tcp_socket_data_t *
-    socket_data, packet_t packet, size_t data_length, size_t sequence_number)
-{
-	packet_t copy;
+packet_t *tcp_prepare_copy(socket_core_t *socket, tcp_socket_data_t *
+    socket_data, packet_t *packet, size_t data_length, size_t sequence_number)
+{
+	packet_t *copy;
 
 	assert(socket);
@@ -2015,7 +2015,7 @@
 }
 
-void tcp_send_packets(device_id_t device_id, packet_t packet)
-{
-	packet_t next;
+void tcp_send_packets(device_id_t device_id, packet_t *packet)
+{
+	packet_t *next;
 
 	while (packet) {
@@ -2097,5 +2097,5 @@
 	tcp_socket_data_t *socket_data;
 	int packet_id;
-	packet_t packet;
+	packet_t *packet;
 	size_t length;
 	int rc;
@@ -2155,5 +2155,5 @@
 	tcp_socket_data_t *socket_data;
 	packet_dimension_t *packet_dimension;
-	packet_t packet;
+	packet_t *packet;
 	size_t total_length;
 	tcp_header_t *header;
@@ -2229,5 +2229,5 @@
 	socket_core_t *socket;
 	tcp_socket_data_t *socket_data;
-	packet_t packet;
+	packet_t *packet;
 	int rc;
 
@@ -2293,5 +2293,5 @@
 }
 
-int tcp_create_notification_packet(packet_t *packet, socket_core_t *socket,
+int tcp_create_notification_packet(packet_t **packet, socket_core_t *socket,
     tcp_socket_data_t *socket_data, int synchronize, int finalize)
 {
@@ -2442,5 +2442,5 @@
  * @return		The result parameter.
  */
-int tcp_release_and_return(packet_t packet, int result)
+int tcp_release_and_return(packet_t *packet, int result)
 {
 	pq_release_remote(tcp_globals.net_phone, packet_get_id(packet));
