Index: uspace/app/netecho/comm.c
===================================================================
--- uspace/app/netecho/comm.c	(revision 5147ff124d29e1b9d3e60be5848187fd214f2924)
+++ uspace/app/netecho/comm.c	(revision b6bbc74b63bc4fbd88824dc1c87c59ea24fcff28)
@@ -37,6 +37,6 @@
 #include <errno.h>
 #include <fibril.h>
-#include <inet/dnsr.h>
 #include <inet/endpoint.h>
+#include <inet/hostport.h>
 #include <inet/udp.h>
 #include <macros.h>
@@ -109,28 +109,8 @@
 }
 
-int comm_open(const char *host, const char *port_s)
+int comm_open_listen(const char *port_s)
 {
 	inet_ep2_t epp;
-	inet_addr_t iaddr;
 	int rc;
-
-	if (host != NULL) {
-		/* Interpret as address */
-		inet_addr_t iaddr;
-		int rc = inet_addr_parse(host, &iaddr);
-
-		if (rc != EOK) {
-			/* Interpret as a host name */
-			dnsr_hostinfo_t *hinfo = NULL;
-			rc = dnsr_name2host(host, &hinfo, ip_any);
-
-			if (rc != EOK) {
-				printf("Error resolving host '%s'.\n", host);
-				goto error;
-			}
-
-			iaddr = hinfo->addr;
-		}
-	}
 
 	char *endptr;
@@ -142,16 +122,39 @@
 
 	inet_ep2_init(&epp);
-	if (host != NULL) {
-		/* Talk to remote host */
-		remote.addr = iaddr;
-		remote.port = port;
+	epp.local.port = port;
 
-		printf("Talking to host %s port %u\n", host, port);
-	} else {
-		/* Listen on local port */
-		epp.local.port = port;
+	printf("Listening on port %u\n", port);
 
-		printf("Listening on port %u\n", port);
+	rc = udp_create(&udp);
+	if (rc != EOK)
+		goto error;
+
+	rc = udp_assoc_create(udp, &epp, &comm_udp_cb, NULL, &assoc);
+	if (rc != EOK)
+		goto error;
+
+	return EOK;
+error:
+	udp_assoc_destroy(assoc);
+	udp_destroy(udp);
+
+	return EIO;
+}
+
+int comm_open_talkto(const char *hostport)
+{
+	inet_ep2_t epp;
+	const char *errmsg;
+	int rc;
+
+	inet_ep2_init(&epp);
+	rc = inet_hostport_plookup_one(hostport, ip_any, &epp.remote, NULL,
+	    &errmsg);
+	if (rc != EOK) {
+		printf("Error: %s (host:port %s).\n", errmsg, hostport);
+		goto error;
 	}
+
+	printf("Talking to %s\n", hostport);
 
 	rc = udp_create(&udp);
Index: uspace/app/netecho/comm.h
===================================================================
--- uspace/app/netecho/comm.h	(revision 5147ff124d29e1b9d3e60be5848187fd214f2924)
+++ uspace/app/netecho/comm.h	(revision b6bbc74b63bc4fbd88824dc1c87c59ea24fcff28)
@@ -39,5 +39,6 @@
 #include <sys/types.h>
 
-extern int comm_open(const char *, const char *);
+extern int comm_open_listen(const char *);
+extern int comm_open_talkto(const char *);
 extern void comm_close(void);
 extern int comm_send(void *, size_t);
Index: uspace/app/netecho/netecho.c
===================================================================
--- uspace/app/netecho/netecho.c	(revision 5147ff124d29e1b9d3e60be5848187fd214f2924)
+++ uspace/app/netecho/netecho.c	(revision b6bbc74b63bc4fbd88824dc1c87c59ea24fcff28)
@@ -115,5 +115,5 @@
 	printf("syntax:\n");
 	printf("\t%s -l <port>\n", NAME);
-	printf("\t%s -d <host> <port> [<message> [<message...>]]\n", NAME);
+	printf("\t%s -d <host>:<port> [<message> [<message...>]]\n", NAME);
 }
 
@@ -151,5 +151,5 @@
 int main(int argc, char *argv[])
 {
-	char *host;
+	char *hostport;
 	char *port;
 	char **msgs;
@@ -167,24 +167,29 @@
 		}
 
-		host = NULL;
 		port = argv[2];
 		msgs = NULL;
+
+		rc = comm_open_listen(port);
+		if (rc != EOK) {
+			printf("Error setting up communication.\n");
+			return 1;
+		}
 	} else if (str_cmp(argv[1], "-d") == 0) {
-		if (argc < 4) {
+		if (argc < 3) {
 			print_syntax();
 			return 1;
 		}
 
-		host = argv[2];
-		port = argv[3];
-		msgs = argv + 4;
+		hostport = argv[2];
+		port = NULL;
+		msgs = argv + 3;
+
+		rc = comm_open_talkto(hostport);
+		if (rc != EOK) {
+			printf("Error setting up communication.\n");
+			return 1;
+		}
 	} else {
 		print_syntax();
-		return 1;
-	}
-
-	rc = comm_open(host, port);
-	if (rc != EOK) {
-		printf("Error setting up communication.\n");
 		return 1;
 	}
