Index: uspace/srv/net/il/arp/arp_messages.h
===================================================================
--- uspace/srv/net/il/arp/arp_messages.h	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/il/arp/arp_messages.h	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -75,5 +75,6 @@
  *  @param[in] call The message call structure.
  */
-#define ARP_GET_NETIF(call)		(services_t) IPC_GET_ARG2(*call)
+#define ARP_GET_NETIF(call) \
+	({services_t service = (services_t) IPC_GET_ARG2(*call); service;})
 
 /*@}*/
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/il/ip/ip.c	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -893,4 +893,7 @@
 	struct sockaddr * addr;
 	size_t addrlen;
+	size_t prefix;
+	size_t suffix;
+	size_t content;
 	ip_pseudo_header_ref header;
 	size_t headerlen;
@@ -924,6 +927,6 @@
 			ERROR_PROPAGATE(ip_get_route_req(0, IP_GET_PROTOCOL(call), addr, (socklen_t) addrlen,
 			    &device_id, &header, &headerlen));
-			*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;
 			if(! ERROR_OCCURRED(data_reply(&headerlen, sizeof(headerlen)))){
@@ -933,6 +936,10 @@
 			return ERROR_CODE;
 		case NET_IL_PACKET_SPACE:
-			ERROR_PROPAGATE(ip_packet_size_message(IPC_GET_DEVICE(call), IPC_SET_ADDR(answer), IPC_SET_PREFIX(answer), IPC_SET_CONTENT(answer), IPC_SET_SUFFIX(answer)));
-			*answer_count = 3;
+			ERROR_PROPAGATE(ip_packet_size_message(IPC_GET_DEVICE(call), &addrlen, &prefix, &content, &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:
Index: uspace/srv/net/il/ip/ip_messages.h
===================================================================
--- uspace/srv/net/il/ip/ip_messages.h	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/il/ip/ip_messages.h	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -72,25 +72,30 @@
  *  @param[in] call The message call structure.
  */
-#define IP_GET_ADDRESS(call)		({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;})
+#define IP_GET_ADDRESS(call) \
+	({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;})
 
 /** Returns the gateway message parameter.
  *  @param[in] call The message call structure.
  */
-#define IP_GET_GATEWAY(call)		({in_addr_t addr; addr.s_addr = IPC_GET_ARG2(*call); addr;})
+#define IP_GET_GATEWAY(call) \
+	({in_addr_t addr; addr.s_addr = IPC_GET_ARG2(*call); addr;})
 
 /** Sets the header length in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define IP_SET_HEADERLEN(answer)	(&IPC_GET_ARG2(*answer))
+#define IP_SET_HEADERLEN(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG2(*answer, argument);}
 
 /** Returns the network mask message parameter.
  *  @param[in] call The message call structure.
  */
-#define IP_GET_NETMASK(call)		({in_addr_t addr; addr.s_addr = IPC_GET_ARG4(*call); addr;})
+#define IP_GET_NETMASK(call) \
+	({in_addr_t addr; addr.s_addr = IPC_GET_ARG4(*call); addr;})
 
 /** Returns the protocol message parameter.
  *  @param[in] call The message call structure.
  */
-#define IP_GET_PROTOCOL(call)		((ip_protocol_t) IPC_GET_ARG1(*call))
+#define IP_GET_PROTOCOL(call) \
+	({ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); protocol;})
 
 /*@}*/
Index: uspace/srv/net/messages.h
===================================================================
--- uspace/srv/net/messages.h	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/messages.h	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -236,65 +236,78 @@
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_MESSAGE(call)			IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_FIRST, NET_LAST)
+#define IS_NET_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_FIRST, NET_LAST)
 
 /** Returns a value indicating whether the IPC call is an ARP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_ARP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ARP_FIRST, NET_ARP_LAST)
+#define IS_NET_ARP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ARP_FIRST, NET_ARP_LAST)
 
 /** Returns a value indicating whether the IPC call is an Ethernet message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_ETH_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ETH_FIRST, NET_ETH_LAST)
+#define IS_NET_ETH_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ETH_FIRST, NET_ETH_LAST)
 
 /** Returns a value indicating whether the IPC call is an ICMP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_ICMP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ICMP_FIRST, NET_ICMP_LAST)
+#define IS_NET_ICMP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ICMP_FIRST, NET_ICMP_LAST)
 
 /** Returns a value indicating whether the IPC call is an inter-network layer message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_IL_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IL_FIRST, NET_IL_LAST)
+#define IS_NET_IL_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IL_FIRST, NET_IL_LAST)
 
 /** Returns a value indicating whether the IPC call is an IP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_IP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IP_FIRST, NET_IP_LAST)
+#define IS_NET_IP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IP_FIRST, NET_IP_LAST)
 
 /** Returns a value indicating whether the IPC call is a generic networking message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_NET_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NET_FIRST, NET_NET_LAST)
+#define IS_NET_NET_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NET_FIRST, NET_NET_LAST)
 
 /** Returns a value indicating whether the IPC call is a network interface layer message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_NIL_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NIL_FIRST, NET_NIL_LAST)
+#define IS_NET_NIL_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NIL_FIRST, NET_NIL_LAST)
 
 /** Returns a value indicating whether the IPC call is a packet manaagement system message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_PACKET_MESSAGE(call)	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_PACKET_FIRST, NET_PACKET_LAST)
+#define IS_NET_PACKET_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_PACKET_FIRST, NET_PACKET_LAST)
 
 /** Returns a value indicating whether the IPC call is a socket message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_SOCKET_MESSAGE(call)	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_SOCKET_FIRST, NET_SOCKET_LAST)
+#define IS_NET_SOCKET_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_SOCKET_FIRST, NET_SOCKET_LAST)
 
 /** Returns a value indicating whether the IPC call is a TCP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_TCP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TCP_FIRST, NET_TCP_LAST)
+#define IS_NET_TCP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TCP_FIRST, NET_TCP_LAST)
 
 /** Returns a value indicating whether the IPC call is a transport layer message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_TL_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TL_FIRST, NET_TL_LAST)
+#define IS_NET_TL_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TL_FIRST, NET_TL_LAST)
 
 /** Returns a value indicating whether the IPC call is a UDP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_UDP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_UDP_FIRST, NET_UDP_LAST)
+#define IS_NET_UDP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_UDP_FIRST, NET_UDP_LAST)
 
 /*@}*/
@@ -311,74 +324,84 @@
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_DEVICE(call)		(device_id_t) IPC_GET_ARG1(*call)
-
-/*@}*/
+#define IPC_GET_DEVICE(call) \
+	({device_id_t device_id = (device_id_t) IPC_GET_ARG1(*call); device_id;})
+
+/*@;})*/
 
 /** @name Second arguments
  */
-/*@{*/
+/*@({*/
 
 /** Returns the packet identifier message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_PACKET(call)		(packet_id_t) IPC_GET_ARG2(*call)
+#define IPC_GET_PACKET(call) \
+	({packet_id_t packet_id = (packet_id_t) IPC_GET_ARG2(*call); packet_id;})
 
 /** Returns the count message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_COUNT(call)		(size_t) IPC_GET_ARG2(*call)
+#define IPC_GET_COUNT(call) \
+	({size_t size = (size_t) IPC_GET_ARG2(*call); size;})
 
 /** Returns the device state message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_STATE(call)		(device_state_t) IPC_GET_ARG2(*call)
+#define IPC_GET_STATE(call) \
+	({device_state_t device_state = (device_state_t) IPC_GET_ARG2(*call); device_state;})
 
 /** Returns the maximum transmission unit message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_MTU(call)			(size_t) IPC_GET_ARG2(*call)
-
-/*@}*/
+#define IPC_GET_MTU(call) \
+	({size_t size = (size_t) IPC_GET_ARG2(*call); size;})
+
+/*@;})*/
 
 /** @name Third arguments
  */
-/*@{*/
+/*@({*/
 
 /** Returns the device driver service message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_SERVICE(call)		(services_t) IPC_GET_ARG3(*call)
+ #define IPC_GET_SERVICE(call) \
+	({services_t service = (services_t) IPC_GET_ARG3(*call); service;})
 
 /** Returns the target service message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_TARGET(call)		(services_t) IPC_GET_ARG3(*call)
+#define IPC_GET_TARGET(call) \
+	({services_t service = (services_t) IPC_GET_ARG3(*call); service;})
 
 /** Returns the sender service message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_SENDER(call)		(services_t) IPC_GET_ARG3(*call)
-
-/*@}*/
+#define IPC_GET_SENDER(call) \
+	({services_t service = (services_t) IPC_GET_ARG3(*call); service;})
+
+/*@;})*/
 
 /** @name Fourth arguments
  */
-/*@{*/
+/*@({*/
 
 /** Returns the error service message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_ERROR(call)		(services_t) IPC_GET_ARG4(*call)
-
-/*@}*/
+#define IPC_GET_ERROR(call) \
+	({services_t service = (services_t) IPC_GET_ARG4(*call); service;})
+
+/*@;})*/
 
 /** @name Fifth arguments
  */
-/*@{*/
+/*@({*/
 
 /** Returns the phone message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_PHONE(call)		(int) IPC_GET_ARG5(*call)
+#define IPC_GET_PHONE(call) \
+	({int phone = (int) IPC_GET_ARG5(*call); phone;})
 
 /*@}*/
@@ -391,10 +414,12 @@
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_DEVICE(answer)	(&IPC_GET_ARG1(*answer))
+#define IPC_SET_DEVICE(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG1(*answer, argument);}
 
 /** Sets the minimum address length in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_ADDR(answer)		(&IPC_GET_ARG1(*answer))
+#define IPC_SET_ADDR(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG1(*answer, argument);}
 
 /*@}*/
@@ -407,5 +432,6 @@
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_PREFIX(answer)	(&IPC_GET_ARG2(*answer))
+#define IPC_SET_PREFIX(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG2(*answer, argument);}
 
 /*@}*/
@@ -418,5 +444,6 @@
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_CONTENT(answer)	(&IPC_GET_ARG3(*answer))
+#define IPC_SET_CONTENT(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG3(*answer, argument);}
 
 /*@}*/
@@ -429,5 +456,6 @@
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_SUFFIX(answer)	(&IPC_GET_ARG4(*answer))
+#define IPC_SET_SUFFIX(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG4(*answer, argument);}
 
 /*@}*/
Index: uspace/srv/net/netif/netif_messages.h
===================================================================
--- uspace/srv/net/netif/netif_messages.h	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/netif/netif_messages.h	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -79,10 +79,12 @@
  *  @param[in] call The message call structure.
  */
-#define NETIF_GET_IRQ(call)		(int)	IPC_GET_ARG2(*call)
+#define NETIF_GET_IRQ(call) \
+	({int irq = (int) IPC_GET_ARG2(*call); irq;})
 
 /** Returns the input/output address message parameter.
  *  @param[in] call The message call structure.
  */
-#define NETIF_GET_IO(call)		(int)	IPC_GET_ARG3(*call)
+#define NETIF_GET_IO(call) \
+	({int io = (int) IPC_GET_ARG3(*call); io;})
 
 /*@}*/
Index: uspace/srv/net/nil/eth/eth.c
===================================================================
--- uspace/srv/net/nil/eth/eth.c	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/nil/eth/eth.c	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -709,4 +709,8 @@
 	measured_string_ref address;
 	packet_t packet;
+	size_t addrlen;
+	size_t prefix;
+	size_t suffix;
+	size_t content;
 
 //	printf("message %d - %d\n", IPC_GET_METHOD(*call), NET_NIL_FIRST);
@@ -721,5 +725,9 @@
 			return eth_send_message(IPC_GET_DEVICE(call), packet, IPC_GET_SERVICE(call));
 		case NET_NIL_PACKET_SPACE:
-			ERROR_PROPAGATE(eth_packet_space_message(IPC_GET_DEVICE(call), IPC_SET_ADDR(answer), IPC_SET_PREFIX(answer), IPC_SET_CONTENT(answer), IPC_SET_SUFFIX(answer)));
+			ERROR_PROPAGATE(eth_packet_space_message(IPC_GET_DEVICE(call), &addrlen, &prefix, &content, &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;
Index: uspace/srv/net/nil/nil_messages.h
===================================================================
--- uspace/srv/net/nil/nil_messages.h	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/nil/nil_messages.h	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -82,5 +82,6 @@
 /** Returns the protocol service message parameter.
  */
-#define NIL_GET_PROTO(call)		(services_t) IPC_GET_ARG2(*call)
+#define NIL_GET_PROTO(call) \
+	({services_t service = (services_t) IPC_GET_ARG2(*call); service;})
 
 /*@}*/
Index: uspace/srv/net/nil/nildummy/nildummy.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.c	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/nil/nildummy/nildummy.c	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -316,4 +316,8 @@
 	measured_string_ref address;
 	packet_t packet;
+	size_t addrlen;
+	size_t prefix;
+	size_t suffix;
+	size_t content;
 
 //	printf("message %d - %d\n", IPC_GET_METHOD(*call), NET_NIL_FIRST);
@@ -328,5 +332,9 @@
 			return nildummy_send_message(IPC_GET_DEVICE(call), packet, IPC_GET_SERVICE(call));
 		case NET_NIL_PACKET_SPACE:
-			ERROR_PROPAGATE(nildummy_packet_space_message(IPC_GET_DEVICE(call), IPC_SET_ADDR(answer), IPC_SET_PREFIX(answer), IPC_SET_CONTENT(answer), IPC_SET_SUFFIX(answer)));
+			ERROR_PROPAGATE(nildummy_packet_space_message(IPC_GET_DEVICE(call), &addrlen, &prefix, &content, &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;
Index: uspace/srv/net/socket/socket_messages.h
===================================================================
--- uspace/srv/net/socket/socket_messages.h	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/socket/socket_messages.h	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -115,80 +115,97 @@
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_SOCKET_ID(answer)		&IPC_GET_ARG1(answer)
+#define SOCKET_SET_SOCKET_ID(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG1(answer, argument);}
 
 /** Returns the socket identifier message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_SOCKET_ID(call)		(int) IPC_GET_ARG1(call)
+#define SOCKET_GET_SOCKET_ID(call) \
+	({int socket_id = (int) IPC_GET_ARG1(call); socket_id;})
 
 /** Sets the read data length in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_READ_DATA_LENGTH(answer)	&IPC_GET_ARG1(answer)
+#define SOCKET_SET_READ_DATA_LENGTH(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG1(answer, argument);}
 
 /** Returns the read data length message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_READ_DATA_LENGTH(call)	(int) IPC_GET_ARG1(call)
+#define SOCKET_GET_READ_DATA_LENGTH(call) \
+	({int data_length = (int) IPC_GET_ARG1(call); data_length;})
 
 /** Returns the backlog message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_BACKLOG(call)		(int) IPC_GET_ARG2(call)
+#define SOCKET_GET_BACKLOG(call) \
+	({int backlog = (int) IPC_GET_ARG2(call); backlog;})
 
 /** Returns the option level message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_OPT_LEVEL(call)		(int) IPC_GET_ARG2(call)
+#define SOCKET_GET_OPT_LEVEL(call) \
+	({int opt_level = (int) IPC_GET_ARG2(call); opt_level;})
 
 /** Returns the data fragment size message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_DATA_FRAGMENT_SIZE(call)	(size_t) IPC_GET_ARG2(call)
+#define SOCKET_GET_DATA_FRAGMENT_SIZE(call) \
+	({size_t size = (size_t) IPC_GET_ARG2(call); size;})
 
 /** Sets the data fragment size in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_DATA_FRAGMENT_SIZE(answer)	&IPC_GET_ARG2(answer)
+#define SOCKET_SET_DATA_FRAGMENT_SIZE(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG2(answer, argument);}
 
 /** Sets the address length in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_ADDRESS_LENGTH(answer)	&IPC_GET_ARG3(answer)
+#define SOCKET_SET_ADDRESS_LENGTH(answer, value) \
+	{ipcarg_t argument = (value); IPC_SET_ARG3(answer, argument);}
 
 /** Returns the address length message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_ADDRESS_LENGTH(call)		(socklen_t) IPC_GET_ARG3(call)
+#define SOCKET_GET_ADDRESS_LENGTH(call) \
+	({socklen_t address_length = (socklen_t) IPC_GET_ARG3(call); address_length;})
 
 /** Sets the header size in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_HEADER_SIZE(answer)		&IPC_GET_ARG3(answer)
+#define SOCKET_SET_HEADER_SIZE(answer, value) \
+	\
+	{ipcarg_t argument = (value); IPC_SET_ARG3(answer, argument);}
 
 /** Returns the header size message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_HEADER_SIZE(call)		(size_t) IPC_GET_ARG3(call)
+#define SOCKET_GET_HEADER_SIZE(call) \
+	({size_t size = (size_t) IPC_GET_ARG3(call); size;})
 
 /** Returns the flags message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_FLAGS(call)			(int) IPC_GET_ARG4(call)
+#define SOCKET_GET_FLAGS(call) \
+	({int flags = (int) IPC_GET_ARG4(call); flags;})
 
 /** Returns the option name message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_OPT_NAME(call)		(int) IPC_GET_ARG4(call)
+#define SOCKET_GET_OPT_NAME(call) \
+	({int opt_name = (int) IPC_GET_ARG4(call); opt_name;})
 
 /** Returns the data fragments message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_DATA_FRAGMENTS(call)		(int) IPC_GET_ARG5(call)
+#define SOCKET_GET_DATA_FRAGMENTS(call) \
+	({int fragments = (int) IPC_GET_ARG5(call); fragments;})
 
 /** Returns the new socket identifier message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_NEW_SOCKET_ID(call)		(int) IPC_GET_ARG5(call)
+#define SOCKET_GET_NEW_SOCKET_ID(call) \
+	({int socket_id = (int) IPC_GET_ARG5(call); socket_id;})
 
 /*@}*/
Index: uspace/srv/net/tl/icmp/icmp_messages.h
===================================================================
--- uspace/srv/net/tl/icmp/icmp_messages.h	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/tl/icmp/icmp_messages.h	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -82,40 +82,48 @@
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_CODE(call)		(icmp_code_t) IPC_GET_ARG1(*call)
+#define ICMP_GET_CODE(call) \
+	({icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); code;})
 
 /** Returns the ICMP link MTU message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_MTU(call)		(icmp_param_t) IPC_GET_ARG3(*call)
+#define ICMP_GET_MTU(call) \
+	({icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); mtu;})
 
 /** Returns the pointer message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_POINTER(call)		(icmp_param_t) IPC_GET_ARG3(*call)
+#define ICMP_GET_POINTER(call) \
+	({icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); pointer;})
 
 /** Returns the size message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_SIZE(call)	(size_t) IPC_GET_ARG1(call)
+#define ICMP_GET_SIZE(call) \
+	({size_t size = (size_t) IPC_GET_ARG1(call); size;})
 
 /** Returns the timeout message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_TIMEOUT(call)	((suseconds_t) IPC_GET_ARG2(call))
+#define ICMP_GET_TIMEOUT(call) \
+	(({suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); timeout;}))
 
 /** Returns the time to live message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_TTL(call)	(ip_ttl_t) IPC_GET_ARG3(call)
+#define ICMP_GET_TTL(call) \
+	({ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); ttl;})
 
 /** Returns the type of service message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_TOS(call)	(ip_tos_t) IPC_GET_ARG4(call)
+#define ICMP_GET_TOS(call) \
+	({ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); tos;})
 
 /** Returns the dont fragment message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_DONT_FRAGMENT(call)		(int) IPC_GET_ARG5(call)
+#define ICMP_GET_DONT_FRAGMENT(call) \
+	({int dont_fragment = (int) IPC_GET_ARG5(call); dont_fragment;})
 
 /*@}*/
Index: uspace/srv/net/tl/tcp/tcp.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp.c	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/tl/tcp/tcp.c	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -1062,4 +1062,5 @@
 	int socket_id;
 	size_t addrlen;
+	size_t size;
 	fibril_rwlock_t lock;
 	ipc_call_t answer;
@@ -1107,12 +1108,12 @@
 					socket_id = SOCKET_GET_SOCKET_ID(call);
 					res = socket_create(&local_sockets, app_phone, socket_data, &socket_id);
-					*SOCKET_SET_SOCKET_ID(answer) = socket_id;
+					SOCKET_SET_SOCKET_ID(answer, socket_id);
 					fibril_rwlock_write_unlock(&lock);
 					if(res == EOK){
 						if(tl_get_ip_packet_dimension(tcp_globals.ip_phone, &tcp_globals.dimensions, DEVICE_INVALID_ID, &packet_dimension) == EOK){
-							*SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = ((packet_dimension->content < socket_data->data_fragment_size) ? packet_dimension->content : socket_data->data_fragment_size);
+							SOCKET_SET_DATA_FRAGMENT_SIZE(answer, ((packet_dimension->content < socket_data->data_fragment_size) ? packet_dimension->content : socket_data->data_fragment_size));
 						}
-//						*SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = MAX_TCP_FRAGMENT_SIZE;
-						*SOCKET_SET_HEADER_SIZE(answer) = TCP_HEADER_SIZE;
+//						SOCKET_SET_DATA_FRAGMENT_SIZE(answer, MAX_TCP_FRAGMENT_SIZE);
+						SOCKET_SET_HEADER_SIZE(answer, TCP_HEADER_SIZE);
 						answer_count = 3;
 					}else{
@@ -1166,10 +1167,11 @@
 				fibril_rwlock_read_lock(&tcp_globals.lock);
 				fibril_rwlock_write_lock(&lock);
-				res = tcp_accept_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_NEW_SOCKET_ID(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), &addrlen);
+				res = tcp_accept_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_NEW_SOCKET_ID(call), &size, &addrlen);
+				SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size);
 				fibril_rwlock_write_unlock(&lock);
 				fibril_rwlock_read_unlock(&tcp_globals.lock);
 				if(res > 0){
-					*SOCKET_SET_SOCKET_ID(answer) = res;
-					*SOCKET_SET_ADDRESS_LENGTH(answer) = addrlen;
+					SOCKET_SET_SOCKET_ID(answer, res);
+					SOCKET_SET_ADDRESS_LENGTH(answer, addrlen);
 					answer_count = 3;
 				}
@@ -1178,5 +1180,6 @@
 				fibril_rwlock_read_lock(&tcp_globals.lock);
 				fibril_rwlock_write_lock(&lock);
-				res = tcp_send_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_DATA_FRAGMENTS(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), SOCKET_GET_FLAGS(call));
+				res = tcp_send_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_DATA_FRAGMENTS(call), &size, SOCKET_GET_FLAGS(call));
+				SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size);
 				if(res != EOK){
 					fibril_rwlock_write_unlock(&lock);
@@ -1191,5 +1194,6 @@
 					fibril_rwlock_read_lock(&tcp_globals.lock);
 					fibril_rwlock_write_lock(&lock);
-					res = tcp_send_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_DATA_FRAGMENTS(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), SOCKET_GET_FLAGS(call));
+					res = tcp_send_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_DATA_FRAGMENTS(call), &size, SOCKET_GET_FLAGS(call));
+					SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size);
 					if(res != EOK){
 						fibril_rwlock_write_unlock(&lock);
@@ -1208,5 +1212,5 @@
 				fibril_rwlock_read_unlock(&tcp_globals.lock);
 				if(res > 0){
-					*SOCKET_SET_READ_DATA_LENGTH(answer) = res;
+					SOCKET_SET_READ_DATA_LENGTH(answer, res);
 					answer_count = 1;
 					res = EOK;
@@ -1220,6 +1224,6 @@
 				fibril_rwlock_read_unlock(&tcp_globals.lock);
 				if(res > 0){
-					*SOCKET_SET_READ_DATA_LENGTH(answer) = res;
-					*SOCKET_SET_ADDRESS_LENGTH(answer) = addrlen;
+					SOCKET_SET_READ_DATA_LENGTH(answer, res);
+					SOCKET_SET_ADDRESS_LENGTH(answer, addrlen);
 					answer_count = 3;
 					res = EOK;
Index: uspace/srv/net/tl/udp/udp.c
===================================================================
--- uspace/srv/net/tl/udp/udp.c	(revision 76ca3f71d74c1d5be0fae6bcc28f1f663a624ea2)
+++ uspace/srv/net/tl/udp/udp.c	(revision e417b961e64a18ae1b50d3898c8108c524af1400)
@@ -419,4 +419,5 @@
 	int socket_id;
 	size_t addrlen;
+	size_t size;
 	ipc_call_t answer;
 	int answer_count;
@@ -454,12 +455,12 @@
 				socket_id = SOCKET_GET_SOCKET_ID(call);
 				res = socket_create(&local_sockets, app_phone, NULL, &socket_id);
-				*SOCKET_SET_SOCKET_ID(answer) = socket_id;
-				
+				SOCKET_SET_SOCKET_ID(answer, socket_id);
+
 				if(res == EOK){
 					if(tl_get_ip_packet_dimension(udp_globals.ip_phone, &udp_globals.dimensions, DEVICE_INVALID_ID, &packet_dimension) == EOK){
-						*SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = packet_dimension->content;
+						SOCKET_SET_DATA_FRAGMENT_SIZE(answer, packet_dimension->content);
 					}
-//					*SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = MAX_UDP_FRAGMENT_SIZE;
-					*SOCKET_SET_HEADER_SIZE(answer) = UDP_HEADER_SIZE;
+//					SOCKET_SET_DATA_FRAGMENT_SIZE(answer, MAX_UDP_FRAGMENT_SIZE);
+					SOCKET_SET_HEADER_SIZE(answer, UDP_HEADER_SIZE);
 					answer_count = 3;
 				}
@@ -478,5 +479,6 @@
 				if(res == EOK){
 					fibril_rwlock_write_lock(&udp_globals.lock);
-					res = udp_sendto_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), addr, addrlen, SOCKET_GET_DATA_FRAGMENTS(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), SOCKET_GET_FLAGS(call));
+					res = udp_sendto_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), addr, addrlen, SOCKET_GET_DATA_FRAGMENTS(call), &size, SOCKET_GET_FLAGS(call));
+					SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size);
 					if(res != EOK){
 						fibril_rwlock_write_unlock(&udp_globals.lock);
@@ -492,6 +494,6 @@
 				fibril_rwlock_write_unlock(&udp_globals.lock);
 				if(res > 0){
-					*SOCKET_SET_READ_DATA_LENGTH(answer) = res;
-					*SOCKET_SET_ADDRESS_LENGTH(answer) = addrlen;
+					SOCKET_SET_READ_DATA_LENGTH(answer, res);
+					SOCKET_SET_ADDRESS_LENGTH(answer, addrlen);
 					answer_count = 3;
 					res = EOK;
