Index: uspace/srv/net/il/arp/arp.c
===================================================================
--- uspace/srv/net/il/arp/arp.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/il/arp/arp.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -457,5 +457,5 @@
 	uint8_t *des_proto;
 	int rc;
-
+	
 	length = packet_get_data_length(packet);
 	if (length <= sizeof(arp_header_t))
@@ -677,5 +677,5 @@
 int
 arp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *answer_count)
 {
 	measured_string_t *address;
@@ -696,6 +696,6 @@
 			return rc;
 		
-		rc = arp_device_message(IPC_GET_DEVICE(call),
-		    IPC_GET_SERVICE(call), ARP_GET_NETIF(call), address);
+		rc = arp_device_message(IPC_GET_DEVICE(*call),
+		    IPC_GET_SERVICE(*call), ARP_GET_NETIF(*call), address);
 		if (rc != EOK) {
 			free(address);
@@ -710,6 +710,6 @@
 		
 		fibril_mutex_lock(&arp_globals.lock);
-		rc = arp_translate_message(IPC_GET_DEVICE(call),
-		    IPC_GET_SERVICE(call), address, &translation);
+		rc = arp_translate_message(IPC_GET_DEVICE(*call),
+		    IPC_GET_SERVICE(*call), address, &translation);
 		free(address);
 		free(data);
@@ -727,5 +727,5 @@
 
 	case NET_ARP_CLEAR_DEVICE:
-		return arp_clear_device_req(0, IPC_GET_DEVICE(call));
+		return arp_clear_device_req(0, IPC_GET_DEVICE(*call));
 
 	case NET_ARP_CLEAR_ADDRESS:
@@ -734,6 +734,6 @@
 			return rc;
 		
-		arp_clear_address_req(0, IPC_GET_DEVICE(call),
-		    IPC_GET_SERVICE(call), address);
+		arp_clear_address_req(0, IPC_GET_DEVICE(*call),
+		    IPC_GET_SERVICE(*call), address);
 		free(address);
 		free(data);
@@ -750,5 +750,5 @@
 		
 		rc = packet_translate_remote(arp_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
@@ -757,5 +757,5 @@
 		do {
 			next = pq_detach(packet);
-			rc = arp_receive_message(IPC_GET_DEVICE(call), packet);
+			rc = arp_receive_message(IPC_GET_DEVICE(*call), packet);
 			if (rc != 1) {
 				pq_release_remote(arp_globals.net_phone,
@@ -769,6 +769,6 @@
 	
 	case NET_IL_MTU_CHANGED:
-		return arp_mtu_changed_message(IPC_GET_DEVICE(call),
-		    IPC_GET_MTU(call));
+		return arp_mtu_changed_message(IPC_GET_DEVICE(*call),
+		    IPC_GET_MTU(*call));
 	}
 	
@@ -791,8 +791,8 @@
 	while (true) {
 		ipc_call_t answer;
-		int answer_count;
+		size_t count;
 		
 		/* Clear the answer structure */
-		refresh_answer(&answer, &answer_count);
+		refresh_answer(&answer, &count);
 		
 		/* Fetch the next message */
@@ -802,5 +802,5 @@
 		/* Process the message */
 		int res = il_module_message_standalone(callid, &call, &answer,
-		    &answer_count);
+		    &count);
 		
 		/*
@@ -813,5 +813,5 @@
 		
 		/* Answer the message */
-		answer_call(callid, res, &answer, answer_count);
+		answer_call(callid, res, &answer, count);
 	}
 }
Index: uspace/srv/net/il/arp/arp_module.c
===================================================================
--- uspace/srv/net/il/arp/arp_module.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/il/arp/arp_module.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -58,7 +58,7 @@
 
 int il_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *count)
 {
-	return arp_message_standalone(callid, call, answer, answer_count);
+	return arp_message_standalone(callid, call, answer, count);
 }
 
Index: uspace/srv/net/il/arp/arp_module.h
===================================================================
--- uspace/srv/net/il/arp/arp_module.h	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/il/arp/arp_module.h	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -44,5 +44,5 @@
 extern int arp_initialize(async_client_conn_t);
 extern int arp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
-    int *);
+    size_t *);
 
 #endif
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/il/ip/ip.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -477,4 +477,9 @@
 		ip_globals.gateway.gateway.s_addr = gateway.s_addr;
 		ip_globals.gateway.netif = ip_netif;
+		
+		char defgateway[INET_ADDRSTRLEN];
+		inet_ntop(AF_INET, (uint8_t *) &gateway.s_addr,
+		    defgateway, INET_ADDRSTRLEN);
+		printf("%s: Default gateway (%s)\n", NAME, defgateway);
 	}
 
@@ -1069,16 +1074,15 @@
 	int index;
 	ip_route_t *route;
-
+	
 	if (!netif)
 		return NULL;
-
-	// start with the first one - the direct route
+	
+	/* Start with the first one (the direct route) */
 	for (index = 0; index < ip_routes_count(&netif->routes); index++) {
 		route = ip_routes_get_index(&netif->routes, index);
-		if (route &&
+		if ((route) &&
 		    ((route->address.s_addr & route->netmask.s_addr) ==
-		    (destination.s_addr & route->netmask.s_addr))) {
+		    (destination.s_addr & route->netmask.s_addr)))
 			return route;
-		}
 	}
 
@@ -1288,5 +1292,5 @@
 	if (device_id > 0) {
 		netif = ip_netifs_find(&ip_globals.netifs, device_id);
-		route = ip_netif_find_route(netif, * dest);
+		route = ip_netif_find_route(netif, *dest);
 		if (netif && !route && (ip_globals.gateway.netif == netif))
 			route = &ip_globals.gateway;
@@ -1318,5 +1322,5 @@
 		}
 	}
-
+	
 	// if the local host is the destination
 	if ((route->address.s_addr == dest->s_addr) &&
@@ -1562,5 +1566,5 @@
 	socklen_t addrlen;
 	int rc;
-
+	
 	header = (ip_header_t *) packet_get_data(packet);
 	if (!header)
@@ -1588,5 +1592,5 @@
 		return EINVAL;
 	}
-
+	
 	// process ipopt and get destination
 	dest = ip_get_destination(header);
@@ -1609,5 +1613,5 @@
 	if (rc != EOK)
 		return rc;
-
+	
 	route = ip_find_route(dest);
 	if (!route) {
@@ -1886,5 +1890,5 @@
 int
 ip_message_standalone(ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer,
-    int *answer_count)
+    size_t *answer_count)
 {
 	packet_t *packet;
@@ -1905,46 +1909,46 @@
 	
 	case IPC_M_CONNECT_TO_ME:
-		return ip_register(IL_GET_PROTO(call), IL_GET_SERVICE(call),
-		    IPC_GET_PHONE(call), NULL);
+		return ip_register(IL_GET_PROTO(*call), IL_GET_SERVICE(*call),
+		    IPC_GET_PHONE(*call), NULL);
 	
 	case NET_IL_DEVICE:
-		return ip_device_req_local(0, IPC_GET_DEVICE(call),
-		    IPC_GET_SERVICE(call));
+		return ip_device_req_local(0, IPC_GET_DEVICE(*call),
+		    IPC_GET_SERVICE(*call));
 	
 	case NET_IL_SEND:
 		rc = packet_translate_remote(ip_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return ip_send_msg_local(0, IPC_GET_DEVICE(call), packet, 0,
-		    IPC_GET_ERROR(call));
+		return ip_send_msg_local(0, IPC_GET_DEVICE(*call), packet, 0,
+		    IPC_GET_ERROR(*call));
 	
 	case NET_IL_DEVICE_STATE:
-		return ip_device_state_message(IPC_GET_DEVICE(call),
-		    IPC_GET_STATE(call));
+		return ip_device_state_message(IPC_GET_DEVICE(*call),
+		    IPC_GET_STATE(*call));
 	
 	case NET_IL_RECEIVED:
 		rc = packet_translate_remote(ip_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return ip_receive_message(IPC_GET_DEVICE(call), packet);
+		return ip_receive_message(IPC_GET_DEVICE(*call), packet);
 	
 	case NET_IP_RECEIVED_ERROR:
 		rc = packet_translate_remote(ip_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return ip_received_error_msg_local(0, IPC_GET_DEVICE(call),
-		    packet, IPC_GET_TARGET(call), IPC_GET_ERROR(call));
+		return ip_received_error_msg_local(0, IPC_GET_DEVICE(*call),
+		    packet, IPC_GET_TARGET(*call), IPC_GET_ERROR(*call));
 	
 	case NET_IP_ADD_ROUTE:
-		return ip_add_route_req_local(0, IPC_GET_DEVICE(call),
-		    IP_GET_ADDRESS(call), IP_GET_NETMASK(call),
-		    IP_GET_GATEWAY(call));
+		return ip_add_route_req_local(0, IPC_GET_DEVICE(*call),
+		    IP_GET_ADDRESS(*call), IP_GET_NETMASK(*call),
+		    IP_GET_GATEWAY(*call));
 
 	case NET_IP_SET_GATEWAY:
-		return ip_set_gateway_req_local(0, IPC_GET_DEVICE(call),
-		    IP_GET_GATEWAY(call));
+		return ip_set_gateway_req_local(0, IPC_GET_DEVICE(*call),
+		    IP_GET_GATEWAY(*call));
 
 	case NET_IP_GET_ROUTE:
@@ -1954,11 +1958,11 @@
 			return rc;
 		
-		rc = ip_get_route_req_local(0, IP_GET_PROTOCOL(call), addr,
+		rc = ip_get_route_req_local(0, IP_GET_PROTOCOL(*call), addr,
 		    (socklen_t) addrlen, &device_id, &header, &headerlen);
 		if (rc != EOK)
 			return rc;
 		
-		IPC_SET_DEVICE(answer, device_id);
-		IP_SET_HEADERLEN(answer, headerlen);
+		IPC_SET_DEVICE(*answer, device_id);
+		IP_SET_HEADERLEN(*answer, headerlen);
 		
 		*answer_count = 2;
@@ -1972,19 +1976,19 @@
 	
 	case NET_IL_PACKET_SPACE:
-		rc = ip_packet_size_message(IPC_GET_DEVICE(call), &addrlen,
+		rc = ip_packet_size_message(IPC_GET_DEVICE(*call), &addrlen,
 		    &prefix, &content, &suffix);
 		if (rc != EOK)
 			return rc;
 		
-		IPC_SET_ADDR(answer, addrlen);
-		IPC_SET_PREFIX(answer, prefix);
-		IPC_SET_CONTENT(answer, content);
-		IPC_SET_SUFFIX(answer, suffix);
+		IPC_SET_ADDR(*answer, addrlen);
+		IPC_SET_PREFIX(*answer, prefix);
+		IPC_SET_CONTENT(*answer, content);
+		IPC_SET_SUFFIX(*answer, suffix);
 		*answer_count = 4;
 		return EOK;
 	
 	case NET_IL_MTU_CHANGED:
-		return ip_mtu_changed_message(IPC_GET_DEVICE(call),
-		    IPC_GET_MTU(call));
+		return ip_mtu_changed_message(IPC_GET_DEVICE(*call),
+		    IPC_GET_MTU(*call));
 	}
 	
@@ -2007,8 +2011,8 @@
 	while (true) {
 		ipc_call_t answer;
-		int answer_count;
+		size_t count;
 		
 		/* Clear the answer structure */
-		refresh_answer(&answer, &answer_count);
+		refresh_answer(&answer, &count);
 		
 		/* Fetch the next message */
@@ -2018,5 +2022,5 @@
 		/* Process the message */
 		int res = il_module_message_standalone(callid, &call, &answer,
-		    &answer_count);
+		    &count);
 		
 		/*
@@ -2030,5 +2034,5 @@
 		
 		/* Answer the message */
-		answer_call(callid, res, &answer, answer_count);
+		answer_call(callid, res, &answer, count);
 	}
 }
Index: uspace/srv/net/il/ip/ip_module.c
===================================================================
--- uspace/srv/net/il/ip/ip_module.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/il/ip/ip_module.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -59,7 +59,7 @@
 int
 il_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *count)
 {
-	return ip_message_standalone(callid, call, answer, answer_count);
+	return ip_message_standalone(callid, call, answer, count);
 }
 
Index: uspace/srv/net/il/ip/ip_module.h
===================================================================
--- uspace/srv/net/il/ip/ip_module.h	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/il/ip/ip_module.h	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -43,5 +43,5 @@
 extern int ip_initialize(async_client_conn_t);
 extern int ip_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
-    int *);
+    size_t *);
 
 #endif
Index: uspace/srv/net/net/net.c
===================================================================
--- uspace/srv/net/net/net.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/net/net.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -474,7 +474,7 @@
 	
 	setting = measured_strings_find(&netif->configuration, (uint8_t *) CONF_IO, 0);
-	int io = setting ? strtol((char *) setting->value, NULL, 16) : 0;
-	
-	rc = netif_probe_req_remote(netif->driver->phone, netif->id, irq, io);
+	uintptr_t io = setting ? strtol((char *) setting->value, NULL, 16) : 0;
+	
+	rc = netif_probe_req(netif->driver->phone, netif->id, irq, (void *) io);
 	if (rc != EOK)
 		return rc;
@@ -511,5 +511,5 @@
 	}
 	
-	return netif_start_req_remote(netif->driver->phone, netif->id);
+	return netif_start_req(netif->driver->phone, netif->id);
 }
 
@@ -613,6 +613,6 @@
 /** Process the networking message.
  *
- * @param[in] callid        The message identifier.
- * @param[in] call          The message parameters.
+ * @param[in]  callid       The message identifier.
+ * @param[in]  call         The message parameters.
  * @param[out] answer       The message answer parameters.
  * @param[out] answer_count The last parameter for the actual answer
@@ -627,5 +627,5 @@
  */
 int net_message(ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer,
-    int *answer_count)
+    size_t *answer_count)
 {
 	measured_string_t *strings;
@@ -639,27 +639,27 @@
 	case NET_NET_GET_DEVICE_CONF:
 		rc = measured_strings_receive(&strings, &data,
-		    IPC_GET_COUNT(call));
+		    IPC_GET_COUNT(*call));
 		if (rc != EOK)
 			return rc;
-		net_get_device_conf_req(0, IPC_GET_DEVICE(call), &strings,
-		    IPC_GET_COUNT(call), NULL);
+		net_get_device_conf_req(0, IPC_GET_DEVICE(*call), &strings,
+		    IPC_GET_COUNT(*call), NULL);
 		
 		/* Strings should not contain received data anymore */
 		free(data);
 		
-		rc = measured_strings_reply(strings, IPC_GET_COUNT(call));
+		rc = measured_strings_reply(strings, IPC_GET_COUNT(*call));
 		free(strings);
 		return rc;
 	case NET_NET_GET_CONF:
 		rc = measured_strings_receive(&strings, &data,
-		    IPC_GET_COUNT(call));
+		    IPC_GET_COUNT(*call));
 		if (rc != EOK)
 			return rc;
-		net_get_conf_req(0, &strings, IPC_GET_COUNT(call), NULL);
+		net_get_conf_req(0, &strings, IPC_GET_COUNT(*call), NULL);
 		
 		/* Strings should not contain received data anymore */
 		free(data);
 		
-		rc = measured_strings_reply(strings, IPC_GET_COUNT(call));
+		rc = measured_strings_reply(strings, IPC_GET_COUNT(*call));
 		free(strings);
 		return rc;
@@ -688,5 +688,5 @@
 		/* Clear the answer structure */
 		ipc_call_t answer;
-		int answer_count;
+		size_t answer_count;
 		refresh_answer(&answer, &answer_count);
 		
Index: uspace/srv/net/net/net.h
===================================================================
--- uspace/srv/net/net/net.h	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/net/net.h	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -135,7 +135,7 @@
 extern int add_configuration(measured_strings_t *, const uint8_t *,
     const uint8_t *);
-extern int net_module_message(ipc_callid_t, ipc_call_t *, ipc_call_t *, int *);
+extern int net_module_message(ipc_callid_t, ipc_call_t *, ipc_call_t *, size_t *);
 extern int net_initialize_build(async_client_conn_t);
-extern int net_message(ipc_callid_t, ipc_call_t *, ipc_call_t *, int *);
+extern int net_message(ipc_callid_t, ipc_call_t *, ipc_call_t *, size_t *);
 
 #endif
Index: uspace/srv/net/net/net_standalone.c
===================================================================
--- uspace/srv/net/net/net_standalone.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/net/net_standalone.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -100,10 +100,10 @@
  */
 int net_module_message(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *count)
 {
-	if (IS_NET_PACKET_MESSAGE(call))
-		return packet_server_message(callid, call, answer, answer_count);
+	if (IS_NET_PACKET_MESSAGE(*call))
+		return packet_server_message(callid, call, answer, count);
 	
-	return net_message(callid, call, answer, answer_count);
+	return net_message(callid, call, answer, count);
 }
 
Index: uspace/srv/net/netif/lo/lo.c
===================================================================
--- uspace/srv/net/netif/lo/lo.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/netif/lo/lo.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -49,6 +49,5 @@
 #include <net/device.h>
 #include <nil_interface.h>
-#include <netif_interface.h>
-#include <netif_local.h>
+#include <netif_skel.h>
 
 /** Default hardware address. */
@@ -65,5 +64,5 @@
 
 int netif_specific_message(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *count)
 {
 	return ENOTSUP;
@@ -172,5 +171,5 @@
 }
 
-int netif_probe_message(device_id_t device_id, int irq, uintptr_t io)
+int netif_probe_message(device_id_t device_id, int irq, void *io)
 {
 	netif_device_t *device;
@@ -233,52 +232,8 @@
 }
 
-/** Default thread for new connections.
- *
- * @param[in] iid	The initial message identifier.
- * @param[in] icall	The initial message call structure.
- */
-static void netif_client_connection(ipc_callid_t iid, ipc_call_t *icall)
-{
-	/*
-	 * Accept the connection
-	 *  - Answer the first IPC_M_CONNECT_ME_TO call.
-	 */
-	ipc_answer_0(iid, EOK);
-	
-	while (true) {
-		ipc_call_t answer;
-		int answer_count;
-		
-		/* Clear the answer structure */
-		refresh_answer(&answer, &answer_count);
-		
-		/* Fetch the next message */
-		ipc_call_t call;
-		ipc_callid_t callid = async_get_call(&call);
-		
-		/* Process the message */
-		int res = netif_module_message(NAME, callid, &call, &answer,
-		    &answer_count);
-		
-		/*
-		 * End if told to either by the message or the processing
-		 * result.
-		 */
-		if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) ||
-		    (res == EHANGUP))
-			return;
-		
-		/* Answer the message */
-		answer_call(callid, res, &answer, answer_count);
-	}
-}
-
 int main(int argc, char *argv[])
 {
-	int rc;
-	
 	/* Start the module */
-	rc = netif_module_start(netif_client_connection);
-	return rc;
+	return netif_module_start();
 }
 
Index: uspace/srv/net/nil/eth/eth.c
===================================================================
--- uspace/srv/net/nil/eth/eth.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/nil/eth/eth.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -54,5 +54,5 @@
 #include <protocol_map.h>
 #include <net/device.h>
-#include <netif_interface.h>
+#include <netif_remote.h>
 #include <net_interface.h>
 #include <nil_interface.h>
@@ -239,14 +239,14 @@
 		switch (IPC_GET_IMETHOD(*icall)) {
 		case NET_NIL_DEVICE_STATE:
-			nil_device_state_msg_local(0, IPC_GET_DEVICE(icall),
-			    IPC_GET_STATE(icall));
+			nil_device_state_msg_local(0, IPC_GET_DEVICE(*icall),
+			    IPC_GET_STATE(*icall));
 			ipc_answer_0(iid, EOK);
 			break;
 		case NET_NIL_RECEIVED:
 			rc = packet_translate_remote(eth_globals.net_phone,
-			    &packet, IPC_GET_PACKET(icall));
+			    &packet, IPC_GET_PACKET(*icall));
 			if (rc == EOK) {
 				rc = nil_received_msg_local(0,
-				    IPC_GET_DEVICE(icall), packet, 0);
+				    IPC_GET_DEVICE(*icall), packet, 0);
 			}
 			ipc_answer_0(iid, (sysarg_t) rc);
@@ -837,5 +837,5 @@
 
 int nil_message_standalone(const char *name, ipc_callid_t callid,
-    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
+    ipc_call_t *call, ipc_call_t *answer, size_t *answer_count)
 {
 	measured_string_t *address;
@@ -853,26 +853,26 @@
 	
 	case NET_NIL_DEVICE:
-		return eth_device_message(IPC_GET_DEVICE(call),
-		    IPC_GET_SERVICE(call), IPC_GET_MTU(call));
+		return eth_device_message(IPC_GET_DEVICE(*call),
+		    IPC_GET_SERVICE(*call), IPC_GET_MTU(*call));
 	case NET_NIL_SEND:
 		rc = packet_translate_remote(eth_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return eth_send_message(IPC_GET_DEVICE(call), packet,
-		    IPC_GET_SERVICE(call));
+		return eth_send_message(IPC_GET_DEVICE(*call), packet,
+		    IPC_GET_SERVICE(*call));
 	case NET_NIL_PACKET_SPACE:
-		rc = eth_packet_space_message(IPC_GET_DEVICE(call), &addrlen,
+		rc = eth_packet_space_message(IPC_GET_DEVICE(*call), &addrlen,
 		    &prefix, &content, &suffix);
 		if (rc != EOK)
 			return rc;
-		IPC_SET_ADDR(answer, addrlen);
-		IPC_SET_PREFIX(answer, prefix);
-		IPC_SET_CONTENT(answer, content);
-		IPC_SET_SUFFIX(answer, suffix);
+		IPC_SET_ADDR(*answer, addrlen);
+		IPC_SET_PREFIX(*answer, prefix);
+		IPC_SET_CONTENT(*answer, content);
+		IPC_SET_SUFFIX(*answer, suffix);
 		*answer_count = 4;
 		return EOK;
 	case NET_NIL_ADDR:
-		rc = eth_addr_message(IPC_GET_DEVICE(call), ETH_LOCAL_ADDR,
+		rc = eth_addr_message(IPC_GET_DEVICE(*call), ETH_LOCAL_ADDR,
 		    &address);
 		if (rc != EOK)
@@ -880,5 +880,5 @@
 		return measured_strings_reply(address, 1);
 	case NET_NIL_BROADCAST_ADDR:
-		rc = eth_addr_message(IPC_GET_DEVICE(call), ETH_BROADCAST_ADDR,
+		rc = eth_addr_message(IPC_GET_DEVICE(*call), ETH_BROADCAST_ADDR,
 		    &address);
 		if (rc != EOK)
@@ -886,6 +886,6 @@
 		return measured_strings_reply(address, 1);
 	case IPC_M_CONNECT_TO_ME:
-		return eth_register_message(NIL_GET_PROTO(call),
-		    IPC_GET_PHONE(call));
+		return eth_register_message(NIL_GET_PROTO(*call),
+		    IPC_GET_PHONE(*call));
 	}
 	
@@ -908,8 +908,8 @@
 	while (true) {
 		ipc_call_t answer;
-		int answer_count;
+		size_t count;
 		
 		/* Clear the answer structure */
-		refresh_answer(&answer, &answer_count);
+		refresh_answer(&answer, &count);
 		
 		/* Fetch the next message */
@@ -919,5 +919,5 @@
 		/* Process the message */
 		int res = nil_module_message_standalone(NAME, callid, &call,
-		    &answer, &answer_count);
+		    &answer, &count);
 		
 		/*
@@ -930,5 +930,5 @@
 		
 		/* Answer the message */
-		answer_call(callid, res, &answer, answer_count);
+		answer_call(callid, res, &answer, count);
 	}
 }
Index: uspace/srv/net/nil/eth/eth_header.h
===================================================================
--- uspace/srv/net/nil/eth/eth_header.h	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/nil/eth/eth_header.h	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -42,14 +42,14 @@
 
 /** Ethernet address length. */
-#define ETH_ADDR	6
+#define ETH_ADDR  6
 
 /** Ethernet header preamble value. */
-#define ETH_PREAMBLE	0x55
+#define ETH_PREAMBLE  0x55
 
 /** Ethernet header start of frame value. */
-#define ETH_SFD		0xD5
+#define ETH_SFD  0xD5
 
 /** IEEE 802.2 unordered information control field. */
-#define IEEE_8023_2_UI	0x03
+#define IEEE_8023_2_UI  0x03
 
 /** Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
Index: uspace/srv/net/nil/eth/eth_module.c
===================================================================
--- uspace/srv/net/nil/eth/eth_module.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/nil/eth/eth_module.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -78,7 +78,7 @@
 
 int nil_module_message_standalone(const char *name, ipc_callid_t callid,
-    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
+    ipc_call_t *call, ipc_call_t *answer, size_t *count)
 {
-	return nil_message_standalone(name, callid, call, answer, answer_count);
+	return nil_message_standalone(name, callid, call, answer, count);
 }
 
Index: uspace/srv/net/nil/nildummy/nildummy.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/nil/nildummy/nildummy.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -47,5 +47,4 @@
 #include <net/modules.h>
 #include <net/device.h>
-#include <netif_interface.h>
 #include <nil_interface.h>
 #include <il_interface.h>
@@ -53,4 +52,5 @@
 #include <net/packet.h>
 #include <packet_remote.h>
+#include <netif_remote.h>
 #include <nil_local.h>
 
@@ -113,5 +113,5 @@
 		case NET_NIL_DEVICE_STATE:
 			rc = nil_device_state_msg_local(0,
-			    IPC_GET_DEVICE(icall), IPC_GET_STATE(icall));
+			    IPC_GET_DEVICE(*icall), IPC_GET_STATE(*icall));
 			ipc_answer_0(iid, (sysarg_t) rc);
 			break;
@@ -119,8 +119,8 @@
 		case NET_NIL_RECEIVED:
 			rc = packet_translate_remote(nildummy_globals.net_phone,
-			    &packet, IPC_GET_PACKET(icall));
+			    &packet, IPC_GET_PACKET(*icall));
 			if (rc == EOK) {
 				rc = nil_received_msg_local(0,
-				    IPC_GET_DEVICE(icall), packet, 0);
+				    IPC_GET_DEVICE(*icall), packet, 0);
 			}
 			ipc_answer_0(iid, (sysarg_t) rc);
@@ -375,5 +375,5 @@
 
 int nil_message_standalone(const char *name, ipc_callid_t callid,
-    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
+    ipc_call_t *call, ipc_call_t *answer, size_t *answer_count)
 {
 	measured_string_t *address;
@@ -391,29 +391,29 @@
 	
 	case NET_NIL_DEVICE:
-		return nildummy_device_message(IPC_GET_DEVICE(call),
-		    IPC_GET_SERVICE(call), IPC_GET_MTU(call));
+		return nildummy_device_message(IPC_GET_DEVICE(*call),
+		    IPC_GET_SERVICE(*call), IPC_GET_MTU(*call));
 	
 	case NET_NIL_SEND:
 		rc = packet_translate_remote(nildummy_globals.net_phone,
-		    &packet, IPC_GET_PACKET(call));
+		    &packet, IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return nildummy_send_message(IPC_GET_DEVICE(call), packet,
-		    IPC_GET_SERVICE(call));
+		return nildummy_send_message(IPC_GET_DEVICE(*call), packet,
+		    IPC_GET_SERVICE(*call));
 	
 	case NET_NIL_PACKET_SPACE:
-		rc = nildummy_packet_space_message(IPC_GET_DEVICE(call),
+		rc = nildummy_packet_space_message(IPC_GET_DEVICE(*call),
 		    &addrlen, &prefix, &content, &suffix);
 		if (rc != EOK)
 			return rc;
-		IPC_SET_ADDR(answer, addrlen);
-		IPC_SET_PREFIX(answer, prefix);
-		IPC_SET_CONTENT(answer, content);
-		IPC_SET_SUFFIX(answer, suffix);
+		IPC_SET_ADDR(*answer, addrlen);
+		IPC_SET_PREFIX(*answer, prefix);
+		IPC_SET_CONTENT(*answer, content);
+		IPC_SET_SUFFIX(*answer, suffix);
 		*answer_count = 4;
 		return EOK;
 	
 	case NET_NIL_ADDR:
-		rc = nildummy_addr_message(IPC_GET_DEVICE(call), &address);
+		rc = nildummy_addr_message(IPC_GET_DEVICE(*call), &address);
 		if (rc != EOK)
 			return rc;
@@ -421,5 +421,5 @@
 	
 	case NET_NIL_BROADCAST_ADDR:
-		rc = nildummy_addr_message(IPC_GET_DEVICE(call), &address);
+		rc = nildummy_addr_message(IPC_GET_DEVICE(*call), &address);
 		if (rc != EOK)
 			return rc;
@@ -427,6 +427,6 @@
 	
 	case IPC_M_CONNECT_TO_ME:
-		return nildummy_register_message(NIL_GET_PROTO(call),
-		    IPC_GET_PHONE(call));
+		return nildummy_register_message(NIL_GET_PROTO(*call),
+		    IPC_GET_PHONE(*call));
 	}
 	
@@ -449,8 +449,8 @@
 	while (true) {
 		ipc_call_t answer;
-		int answer_count;
+		size_t count;
 		
 		/* Clear the answer structure */
-		refresh_answer(&answer, &answer_count);
+		refresh_answer(&answer, &count);
 		
 		/* Fetch the next message */
@@ -460,5 +460,5 @@
 		/* Process the message */
 		int res = nil_module_message_standalone(NAME, callid, &call,
-		    &answer, &answer_count);
+		    &answer, &count);
 		
 		/*
@@ -471,5 +471,5 @@
 		
 		/* Answer the message */
-		answer_call(callid, res, &answer, answer_count);
+		answer_call(callid, res, &answer, count);
 	}
 }
Index: uspace/srv/net/nil/nildummy/nildummy_module.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy_module.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/nil/nildummy/nildummy_module.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -79,7 +79,7 @@
 
 int nil_module_message_standalone(const char *name, ipc_callid_t callid,
-    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
+    ipc_call_t *call, ipc_call_t *answer, size_t *count)
 {
-	return nil_message_standalone(name, callid, call, answer, answer_count);
+	return nil_message_standalone(name, callid, call, answer, count);
 }
 
Index: uspace/srv/net/tl/icmp/icmp.c
===================================================================
--- uspace/srv/net/tl/icmp/icmp.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/icmp/icmp.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -696,12 +696,12 @@
 	case NET_ICMP_DEST_UNREACH:
 		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
 		return icmp_destination_unreachable_msg_local(0,
-		    ICMP_GET_CODE(call), ICMP_GET_MTU(call), packet);
+		    ICMP_GET_CODE(*call), ICMP_GET_MTU(*call), packet);
 	case NET_ICMP_SOURCE_QUENCH:
 		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
@@ -709,16 +709,16 @@
 	case NET_ICMP_TIME_EXCEEDED:
 		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return icmp_time_exceeded_msg_local(0, ICMP_GET_CODE(call),
+		return icmp_time_exceeded_msg_local(0, ICMP_GET_CODE(*call),
 		    packet);
 	case NET_ICMP_PARAMETERPROB:
 		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return icmp_parameter_problem_msg_local(0, ICMP_GET_CODE(call),
-		    ICMP_GET_POINTER(call), packet);
+		return icmp_parameter_problem_msg_local(0, ICMP_GET_CODE(*call),
+		    ICMP_GET_POINTER(*call), packet);
 	default:
 		return ENOTSUP;
@@ -787,5 +787,5 @@
 	bool keep_on_going = true;
 	ipc_call_t answer;
-	int answer_count;
+	size_t answer_count;
 	size_t length;
 	struct sockaddr *addr;
@@ -894,5 +894,5 @@
  */
 int icmp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *answer_count)
 {
 	packet_t *packet;
@@ -903,12 +903,12 @@
 	case NET_TL_RECEIVED:
 		rc = packet_translate_remote(icmp_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return icmp_received_msg_local(IPC_GET_DEVICE(call), packet,
-		    SERVICE_ICMP, IPC_GET_ERROR(call));
+		return icmp_received_msg_local(IPC_GET_DEVICE(*call), packet,
+		    SERVICE_ICMP, IPC_GET_ERROR(*call));
 	
 	case NET_ICMP_INIT:
-		return icmp_process_client_messages(callid, * call);
+		return icmp_process_client_messages(callid, *call);
 	
 	default:
@@ -936,5 +936,5 @@
 	while (true) {
 		ipc_call_t answer;
-		int answer_count;
+		size_t answer_count;
 		
 		/* Clear the answer structure */
Index: uspace/srv/net/tl/icmp/icmp_module.c
===================================================================
--- uspace/srv/net/tl/icmp/icmp_module.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/icmp/icmp_module.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -86,7 +86,7 @@
 
 int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *count)
 {
-	return icmp_message_standalone(callid, call, answer, answer_count);
+	return icmp_message_standalone(callid, call, answer, count);
 }
 
Index: uspace/srv/net/tl/icmp/icmp_module.h
===================================================================
--- uspace/srv/net/tl/icmp/icmp_module.h	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/icmp/icmp_module.h	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -44,5 +44,5 @@
 extern int icmp_initialize(async_client_conn_t);
 extern int icmp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
-    int *);
+    size_t *);
 
 #endif
Index: uspace/srv/net/tl/tcp/tcp.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/tcp/tcp.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -1262,5 +1262,5 @@
 int
 tcp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *answer_count)
 {
 	packet_t *packet;
@@ -1276,11 +1276,11 @@
 //		fibril_rwlock_read_lock(&tcp_globals.lock);
 		rc = packet_translate_remote(tcp_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK) {
 //			fibril_rwlock_read_unlock(&tcp_globals.lock);
 			return rc;
 		}
-		rc = tcp_received_msg(IPC_GET_DEVICE(call), packet, SERVICE_TCP,
-		    IPC_GET_ERROR(call));
+		rc = tcp_received_msg(IPC_GET_DEVICE(*call), packet, SERVICE_TCP,
+		    IPC_GET_ERROR(*call));
 //		fibril_rwlock_read_unlock(&tcp_globals.lock);
 		return rc;
@@ -1323,5 +1323,5 @@
 	bool keep_on_going = true;
 	socket_cores_t local_sockets;
-	int app_phone = IPC_GET_PHONE(&call);
+	int app_phone = IPC_GET_PHONE(call);
 	struct sockaddr *addr;
 	int socket_id;
@@ -1330,5 +1330,5 @@
 	fibril_rwlock_t lock;
 	ipc_call_t answer;
-	int answer_count;
+	size_t answer_count;
 	tcp_socket_data_t *socket_data;
 	socket_core_t *socket;
@@ -2502,5 +2502,5 @@
 	while (true) {
 		ipc_call_t answer;
-		int answer_count;
+		size_t answer_count;
 
 		/* Clear the answer structure */
Index: uspace/srv/net/tl/tcp/tcp_module.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp_module.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/tcp/tcp_module.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -87,7 +87,7 @@
 
 int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *count)
 {
-	return tcp_message_standalone(callid, call, answer, answer_count);
+	return tcp_message_standalone(callid, call, answer, count);
 }
 
Index: uspace/srv/net/tl/tcp/tcp_module.h
===================================================================
--- uspace/srv/net/tl/tcp/tcp_module.h	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/tcp/tcp_module.h	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -44,5 +44,5 @@
 extern int tcp_initialize(async_client_conn_t);
 extern int tcp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
-    int *);
+    size_t *);
 
 #endif
Index: uspace/srv/net/tl/udp/udp.c
===================================================================
--- uspace/srv/net/tl/udp/udp.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/udp/udp.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -707,5 +707,5 @@
 	bool keep_on_going = true;
 	socket_cores_t local_sockets;
-	int app_phone = IPC_GET_PHONE(&call);
+	int app_phone = IPC_GET_PHONE(call);
 	struct sockaddr *addr;
 	int socket_id;
@@ -713,5 +713,5 @@
 	size_t size;
 	ipc_call_t answer;
-	int answer_count;
+	size_t answer_count;
 	packet_dimension_t *packet_dimension;
 
@@ -861,5 +861,5 @@
  */
 int udp_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *answer_count)
 {
 	packet_t *packet;
@@ -871,11 +871,11 @@
 	case NET_TL_RECEIVED:
 		rc = packet_translate_remote(udp_globals.net_phone, &packet,
-		    IPC_GET_PACKET(call));
+		    IPC_GET_PACKET(*call));
 		if (rc != EOK)
 			return rc;
-		return udp_received_msg(IPC_GET_DEVICE(call), packet,
-		    SERVICE_UDP, IPC_GET_ERROR(call));
+		return udp_received_msg(IPC_GET_DEVICE(*call), packet,
+		    SERVICE_UDP, IPC_GET_ERROR(*call));
 	case IPC_M_CONNECT_TO_ME:
-		return udp_process_client_messages(callid, * call);
+		return udp_process_client_messages(callid, *call);
 	}
 
@@ -898,5 +898,5 @@
 	while (true) {
 		ipc_call_t answer;
-		int answer_count;
+		size_t answer_count;
 		
 		/* Clear the answer structure */
Index: uspace/srv/net/tl/udp/udp_module.c
===================================================================
--- uspace/srv/net/tl/udp/udp_module.c	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/udp/udp_module.c	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -87,7 +87,7 @@
 
 int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
-    ipc_call_t *answer, int *answer_count)
+    ipc_call_t *answer, size_t *count)
 {
-	return udp_message_standalone(callid, call, answer, answer_count);
+	return udp_message_standalone(callid, call, answer, count);
 }
 
Index: uspace/srv/net/tl/udp/udp_module.h
===================================================================
--- uspace/srv/net/tl/udp/udp_module.h	(revision 3c106e8814a50268257db9a33c79a75e51e871ec)
+++ uspace/srv/net/tl/udp/udp_module.h	(revision 774e6d1abebc631f873d85e623bf7aa61b0aecea)
@@ -44,5 +44,5 @@
 extern int udp_initialize(async_client_conn_t);
 extern int udp_message_standalone(ipc_callid_t, ipc_call_t *, ipc_call_t *,
-    int *);
+    size_t *);
 
 #endif
