Index: uspace/srv/net/inetsrv/inetcfg.c
===================================================================
--- uspace/srv/net/inetsrv/inetcfg.c	(revision a1a101df39387ef358e61b7a23da833e01376074)
+++ uspace/srv/net/inetsrv/inetcfg.c	(revision a8196c90457a5217af091168fccd2409d482c81d)
@@ -56,5 +56,5 @@
 	inet_link_t *ilink;
 	inet_addrobj_t *addr;
-	iplink_addr_t iaddr;
+	inet_addr_t iaddr;
 	int rc;
 
@@ -82,5 +82,5 @@
 	}
 
-	iaddr.ipv4 = addr->naddr.ipv4;
+	inet_naddr_addr(&addr->naddr, &iaddr);
 	rc = iplink_addr_add(ilink->iplink, &iaddr);
 	if (rc != EOK) {
@@ -254,7 +254,6 @@
 	}
 
-	naddr.ipv4 = IPC_GET_ARG1(*call);
-	naddr.bits = IPC_GET_ARG2(*call);
-	link_id    = IPC_GET_ARG3(*call);
+	inet_naddr_unpack(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call), &naddr);
+	link_id = IPC_GET_ARG3(*call);
 
 	addr_id = 0;
@@ -279,19 +278,17 @@
 static void inetcfg_addr_get_srv(ipc_callid_t callid, ipc_call_t *call)
 {
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_addr_get_srv()");
+	
+	sysarg_t addr_id = IPC_GET_ARG1(*call);
+	
+	inet_addr_info_t ainfo;
+	
+	inet_naddr_any(&ainfo.naddr);
+	ainfo.ilink = 0;
+	ainfo.name = NULL;
+	
 	ipc_callid_t rcallid;
 	size_t max_size;
-
-	sysarg_t addr_id;
-	inet_addr_info_t ainfo;
-	int rc;
-
-	addr_id = IPC_GET_ARG1(*call);
-	log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_addr_get_srv()");
-
-	ainfo.naddr.ipv4 = 0;
-	ainfo.naddr.bits = 0;
-	ainfo.ilink = 0;
-	ainfo.name = NULL;
-
+	
 	if (!async_data_read_receive(&rcallid, &max_size)) {
 		async_answer_0(rcallid, EREFUSED);
@@ -299,17 +296,25 @@
 		return;
 	}
-
-	rc = inetcfg_addr_get(addr_id, &ainfo);
-	if (rc != EOK) {
-		async_answer_0(callid, rc);
-		return;
-	}
-
+	
+	int rc = inetcfg_addr_get(addr_id, &ainfo);
+	if (rc != EOK) {
+		async_answer_0(callid, rc);
+		return;
+	}
+	
+	uint32_t naddr_addr;
+	uint8_t naddr_bits;
+	rc = inet_naddr_pack(&ainfo.naddr, &naddr_addr, &naddr_bits);
+	if (rc != EOK) {
+		async_answer_0(callid, rc);
+		return;
+	}
+	
 	sysarg_t retval = async_data_read_finalize(rcallid, ainfo.name,
 	    min(max_size, str_size(ainfo.name)));
 	free(ainfo.name);
-
-	async_answer_3(callid, retval, ainfo.naddr.ipv4, ainfo.naddr.bits,
-	    ainfo.ilink);
+	
+	async_answer_3(callid, retval, (sysarg_t) naddr_addr,
+	    (sysarg_t) naddr_bits, ainfo.ilink);
 }
 
@@ -476,24 +481,21 @@
     ipc_call_t *call)
 {
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_create_srv()");
+	
 	char *name;
+	int rc = async_data_write_accept((void **) &name, true, 0, LOC_NAME_MAXLEN,
+	    0, NULL);
+	if (rc != EOK) {
+		async_answer_0(callid, rc);
+		return;
+	}
+	
 	inet_naddr_t dest;
 	inet_addr_t router;
-	sysarg_t sroute_id;
-	int rc;
-
-	log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_create_srv()");
-
-	rc = async_data_write_accept((void **) &name, true, 0, LOC_NAME_MAXLEN,
-	    0, NULL);
-	if (rc != EOK) {
-		async_answer_0(callid, rc);
-		return;
-	}
-
-	dest.ipv4   = IPC_GET_ARG1(*call);
-	dest.bits   = IPC_GET_ARG2(*call);
-	router.ipv4 = IPC_GET_ARG3(*call);
-
-	sroute_id = 0;
+	
+	inet_naddr_unpack(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call), &dest);
+	inet_addr_unpack(IPC_GET_ARG3(*call), &router);
+	
+	sysarg_t sroute_id = 0;
 	rc = inetcfg_sroute_create(name, &dest, &router, &sroute_id);
 	free(name);
@@ -516,19 +518,16 @@
 static void inetcfg_sroute_get_srv(ipc_callid_t callid, ipc_call_t *call)
 {
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_get_srv()");
+	
+	sysarg_t sroute_id = IPC_GET_ARG1(*call);
+	
+	inet_sroute_info_t srinfo;
+	
+	inet_naddr_any(&srinfo.dest);
+	inet_addr_any(&srinfo.router);
+	srinfo.name = NULL;
+	
 	ipc_callid_t rcallid;
 	size_t max_size;
-
-	sysarg_t sroute_id;
-	inet_sroute_info_t srinfo;
-	int rc;
-
-	sroute_id = IPC_GET_ARG1(*call);
-	log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_sroute_get_srv()");
-
-	srinfo.dest.ipv4 = 0;
-	srinfo.dest.bits = 0;
-	srinfo.router.ipv4 = 0;
-	srinfo.name = NULL;
-
 	if (!async_data_read_receive(&rcallid, &max_size)) {
 		async_answer_0(rcallid, EREFUSED);
@@ -536,17 +535,32 @@
 		return;
 	}
-
-	rc = inetcfg_sroute_get(sroute_id, &srinfo);
-	if (rc != EOK) {
-		async_answer_0(callid, rc);
-		return;
-	}
-
+	
+	int rc = inetcfg_sroute_get(sroute_id, &srinfo);
+	if (rc != EOK) {
+		async_answer_0(callid, rc);
+		return;
+	}
+	
+	uint32_t dest_addr;
+	uint8_t dest_bits;
+	rc = inet_naddr_pack(&srinfo.dest, &dest_addr, &dest_bits);
+	if (rc != EOK) {
+		async_answer_0(callid, rc);
+		return;
+	}
+	
+	uint32_t router_addr;
+	rc = inet_addr_pack(&srinfo.router, &router_addr);
+	if (rc != EOK) {
+		async_answer_0(callid, rc);
+		return;
+	}
+	
 	sysarg_t retval = async_data_read_finalize(rcallid, srinfo.name,
 	    min(max_size, str_size(srinfo.name)));
 	free(srinfo.name);
-
-	async_answer_3(callid, retval, srinfo.dest.ipv4, srinfo.dest.bits,
-	    srinfo.router.ipv4);
+	
+	async_answer_3(callid, retval, (sysarg_t) dest_addr,
+	    (sysarg_t) dest_bits, (sysarg_t) router_addr);
 }
 
