Index: uspace/srv/net/inetsrv/inet_link.c
===================================================================
--- uspace/srv/net/inetsrv/inet_link.c	(revision 947e2ef52b4d89628cb7e4dc1fec8ca166910b10)
+++ uspace/srv/net/inetsrv/inet_link.c	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -55,5 +55,4 @@
 static uint16_t ip_ident = 0;
 
-static int inet_link_open(service_id_t);
 static int inet_iplink_recv(iplink_t *, iplink_recv_sdu_t *, uint16_t);
 
@@ -62,6 +61,6 @@
 };
 
-static LIST_INITIALIZE(inet_link_list);
-static FIBRIL_MUTEX_INITIALIZE(inet_discovery_lock);
+static LIST_INITIALIZE(inet_links);
+static FIBRIL_MUTEX_INITIALIZE(inet_links_lock);
 
 static addr128_t link_local_node_ip =
@@ -113,51 +112,4 @@
 }
 
-static int inet_link_check_new(void)
-{
-	bool already_known;
-	category_id_t iplink_cat;
-	service_id_t *svcs;
-	size_t count, i;
-	int rc;
-
-	fibril_mutex_lock(&inet_discovery_lock);
-
-	rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING);
-	if (rc != EOK) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed resolving category 'iplink'.");
-		fibril_mutex_unlock(&inet_discovery_lock);
-		return ENOENT;
-	}
-
-	rc = loc_category_get_svcs(iplink_cat, &svcs, &count);
-	if (rc != EOK) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting list of IP links.");
-		fibril_mutex_unlock(&inet_discovery_lock);
-		return EIO;
-	}
-
-	for (i = 0; i < count; i++) {
-		already_known = false;
-
-		list_foreach(inet_link_list, link_list, inet_link_t, ilink) {
-			if (ilink->svc_id == svcs[i]) {
-				already_known = true;
-				break;
-			}
-		}
-
-		if (!already_known) {
-			log_msg(LOG_DEFAULT, LVL_DEBUG, "Found IP link '%lu'",
-			    (unsigned long) svcs[i]);
-			rc = inet_link_open(svcs[i]);
-			if (rc != EOK)
-				log_msg(LOG_DEFAULT, LVL_ERROR, "Could not open IP link.");
-		}
-	}
-
-	fibril_mutex_unlock(&inet_discovery_lock);
-	return EOK;
-}
-
 static inet_link_t *inet_link_new(void)
 {
@@ -183,5 +135,5 @@
 }
 
-static int inet_link_open(service_id_t sid)
+int inet_link_open(service_id_t sid)
 {
 	inet_link_t *ilink;
@@ -231,5 +183,5 @@
 
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "Opened IP link '%s'", ilink->svc_name);
-	list_append(&ilink->link_list, &inet_link_list);
+	list_append(&ilink->link_list, &inet_links);
 
 	inet_addrobj_t *addr = NULL;
@@ -309,23 +261,4 @@
 }
 
-static void inet_link_cat_change_cb(void)
-{
-	(void) inet_link_check_new();
-}
-
-int inet_link_discovery_start(void)
-{
-	int rc;
-
-	rc = loc_register_cat_change_cb(inet_link_cat_change_cb);
-	if (rc != EOK) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for IP link "
-		    "discovery (%d).", rc);
-		return rc;
-	}
-
-	return inet_link_check_new();
-}
-
 /** Send IPv4 datagram over Internet link
  *
@@ -480,14 +413,14 @@
 inet_link_t *inet_link_get_by_id(sysarg_t link_id)
 {
-	fibril_mutex_lock(&inet_discovery_lock);
-
-	list_foreach(inet_link_list, link_list, inet_link_t, ilink) {
+	fibril_mutex_lock(&inet_links_lock);
+
+	list_foreach(inet_links, link_list, inet_link_t, ilink) {
 		if (ilink->svc_id == link_id) {
-			fibril_mutex_unlock(&inet_discovery_lock);
+			fibril_mutex_unlock(&inet_links_lock);
 			return ilink;
 		}
 	}
 
-	fibril_mutex_unlock(&inet_discovery_lock);
+	fibril_mutex_unlock(&inet_links_lock);
 	return NULL;
 }
@@ -499,20 +432,20 @@
 	size_t count, i;
 
-	fibril_mutex_lock(&inet_discovery_lock);
-	count = list_count(&inet_link_list);
+	fibril_mutex_lock(&inet_links_lock);
+	count = list_count(&inet_links);
 
 	id_list = calloc(count, sizeof(sysarg_t));
 	if (id_list == NULL) {
-		fibril_mutex_unlock(&inet_discovery_lock);
+		fibril_mutex_unlock(&inet_links_lock);
 		return ENOMEM;
 	}
 
 	i = 0;
-	list_foreach(inet_link_list, link_list, inet_link_t, ilink) {
+	list_foreach(inet_links, link_list, inet_link_t, ilink) {
 		id_list[i++] = ilink->svc_id;
 		log_msg(LOG_DEFAULT, LVL_NOTE, "add link to list");
 	}
 
-	fibril_mutex_unlock(&inet_discovery_lock);
+	fibril_mutex_unlock(&inet_links_lock);
 
 	log_msg(LOG_DEFAULT, LVL_NOTE, "return %zu links", count);
Index: uspace/srv/net/inetsrv/inet_link.h
===================================================================
--- uspace/srv/net/inetsrv/inet_link.h	(revision 947e2ef52b4d89628cb7e4dc1fec8ca166910b10)
+++ uspace/srv/net/inetsrv/inet_link.h	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -41,5 +41,5 @@
 #include "inetsrv.h"
 
-extern int inet_link_discovery_start(void);
+extern int inet_link_open(service_id_t);
 extern int inet_link_send_dgram(inet_link_t *, addr32_t,
     addr32_t, inet_dgram_t *, uint8_t, uint8_t, int);
Index: uspace/srv/net/inetsrv/inetcfg.c
===================================================================
--- uspace/srv/net/inetsrv/inetcfg.c	(revision 947e2ef52b4d89628cb7e4dc1fec8ca166910b10)
+++ uspace/srv/net/inetsrv/inetcfg.c	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012 Jiri Svoboda
+ * Copyright (c) 2013 Jiri Svoboda
  * All rights reserved.
  *
@@ -160,4 +160,9 @@
 }
 
+static int inetcfg_link_add(sysarg_t link_id)
+{
+	return inet_link_open(link_id);
+}
+
 static int inetcfg_link_get(sysarg_t link_id, inet_link_info_t *linfo)
 {
@@ -180,4 +185,9 @@
 }
 
+static int inetcfg_link_remove(sysarg_t link_id)
+{
+	return ENOTSUP;
+}
+
 static int inetcfg_sroute_create(char *name, inet_naddr_t *dest,
     inet_addr_t *router, sysarg_t *sroute_id)
@@ -483,4 +493,17 @@
 }
 
+static void inetcfg_link_add_srv(ipc_callid_t callid, ipc_call_t *call)
+{
+	sysarg_t link_id;
+	int rc;
+
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_link_add_srv()");
+
+	link_id = IPC_GET_ARG1(*call);
+
+	rc = inetcfg_link_add(link_id);
+	async_answer_0(callid, rc);
+}
+
 static void inetcfg_link_get_srv(ipc_callid_t callid, ipc_call_t *call)
 {
@@ -536,4 +559,17 @@
 }
 
+static void inetcfg_link_remove_srv(ipc_callid_t callid, ipc_call_t *call)
+{
+	sysarg_t link_id;
+	int rc;
+
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "inetcfg_link_remove_srv()");
+
+	link_id = IPC_GET_ARG1(*call);
+
+	rc = inetcfg_link_remove(link_id);
+	async_answer_0(callid, rc);
+}
+
 static void inetcfg_sroute_create_srv(ipc_callid_t iid,
     ipc_call_t *icall)
@@ -742,6 +778,12 @@
 			inetcfg_get_sroute_list_srv(callid, &call);
 			break;
+		case INETCFG_LINK_ADD:
+			inetcfg_link_add_srv(callid, &call);
+			break;
 		case INETCFG_LINK_GET:
 			inetcfg_link_get_srv(callid, &call);
+			break;
+		case INETCFG_LINK_REMOVE:
+			inetcfg_link_remove_srv(callid, &call);
 			break;
 		case INETCFG_SROUTE_CREATE:
Index: uspace/srv/net/inetsrv/inetsrv.c
===================================================================
--- uspace/srv/net/inetsrv/inetsrv.c	(revision 947e2ef52b4d89628cb7e4dc1fec8ca166910b10)
+++ uspace/srv/net/inetsrv/inetsrv.c	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -124,8 +124,4 @@
 	}
 	
-	rc = inet_link_discovery_start();
-	if (rc != EOK)
-		return EEXIST;
-	
 	return EOK;
 }
Index: uspace/srv/net/nconfsrv/Makefile
===================================================================
--- uspace/srv/net/nconfsrv/Makefile	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
+++ uspace/srv/net/nconfsrv/Makefile	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2013 Jiri Svoboda
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+USPACE_PREFIX = ../../..
+BINARY = nconfsrv
+
+SOURCES = \
+	iplink.c \
+	nconfsrv.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/nconfsrv/iplink.c
===================================================================
--- uspace/srv/net/nconfsrv/iplink.c	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
+++ uspace/srv/net/nconfsrv/iplink.c	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2013 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup nconfsrv
+ * @{
+ */
+/**
+ * @file
+ * @brief
+ */
+
+#include <stdbool.h>
+#include <errno.h>
+#include <fibril_synch.h>
+#include <inet/inetcfg.h>
+#include <io/log.h>
+#include <loc.h>
+#include <stdlib.h>
+
+#include "iplink.h"
+#include "nconfsrv.h"
+
+static int ncs_link_add(service_id_t);
+
+static LIST_INITIALIZE(ncs_links);
+static FIBRIL_MUTEX_INITIALIZE(ncs_links_lock);
+
+static int ncs_link_check_new(void)
+{
+	bool already_known;
+	category_id_t iplink_cat;
+	service_id_t *svcs;
+	size_t count, i;
+	int rc;
+
+	fibril_mutex_lock(&ncs_links_lock);
+
+	rc = loc_category_get_id("iplink", &iplink_cat, IPC_FLAG_BLOCKING);
+	if (rc != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed resolving category 'iplink'.");
+		fibril_mutex_unlock(&ncs_links_lock);
+		return ENOENT;
+	}
+
+	rc = loc_category_get_svcs(iplink_cat, &svcs, &count);
+	if (rc != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting list of IP links.");
+		fibril_mutex_unlock(&ncs_links_lock);
+		return EIO;
+	}
+
+	for (i = 0; i < count; i++) {
+		already_known = false;
+
+		list_foreach(ncs_links, link_list, ncs_link_t, ilink) {
+			if (ilink->svc_id == svcs[i]) {
+				already_known = true;
+				break;
+			}
+		}
+
+		if (!already_known) {
+			log_msg(LOG_DEFAULT, LVL_NOTE, "Found IP link '%lu'",
+			    (unsigned long) svcs[i]);
+			rc = ncs_link_add(svcs[i]);
+			if (rc != EOK)
+				log_msg(LOG_DEFAULT, LVL_ERROR, "Could not add IP link.");
+		}
+	}
+
+	fibril_mutex_unlock(&ncs_links_lock);
+	return EOK;
+}
+
+static ncs_link_t *ncs_link_new(void)
+{
+	ncs_link_t *nlink = calloc(1, sizeof(ncs_link_t));
+
+	if (nlink == NULL) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed allocating link structure. "
+		    "Out of memory.");
+		return NULL;
+	}
+
+	link_initialize(&nlink->link_list);
+
+	return nlink;
+}
+
+static void ncs_link_delete(ncs_link_t *nlink)
+{
+	if (nlink->svc_name != NULL)
+		free(nlink->svc_name);
+
+	free(nlink);
+}
+
+static int ncs_link_add(service_id_t sid)
+{
+	ncs_link_t *nlink;
+	int rc;
+
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "ncs_link_add()");
+	nlink = ncs_link_new();
+	if (nlink == NULL)
+		return ENOMEM;
+
+	nlink->svc_id = sid;
+
+	rc = loc_service_get_name(sid, &nlink->svc_name);
+	if (rc != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed getting service name.");
+		goto error;
+	}
+
+	rc = inetcfg_link_add(sid);
+	if (rc != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed configuring link "
+		    "'%s'.\n", nlink->svc_name);
+		goto error;
+	}
+
+	return EOK;
+
+error:
+	ncs_link_delete(nlink);
+	return rc;
+}
+
+static void ncs_link_cat_change_cb(void)
+{
+	(void) ncs_link_check_new();
+}
+
+int ncs_link_discovery_start(void)
+{
+	int rc;
+
+	rc = loc_register_cat_change_cb(ncs_link_cat_change_cb);
+	if (rc != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering callback for IP link "
+		    "discovery (%d).", rc);
+		return rc;
+	}
+
+	return ncs_link_check_new();
+}
+
+ncs_link_t *ncs_link_get_by_id(sysarg_t link_id)
+{
+	fibril_mutex_lock(&ncs_links_lock);
+
+	list_foreach(ncs_links, link_list, ncs_link_t, nlink) {
+		if (nlink->svc_id == link_id) {
+			fibril_mutex_unlock(&ncs_links_lock);
+			return nlink;
+		}
+	}
+
+	fibril_mutex_unlock(&ncs_links_lock);
+	return NULL;
+}
+
+/** Get IDs of all links. */
+int ncs_link_get_id_list(sysarg_t **rid_list, size_t *rcount)
+{
+	sysarg_t *id_list;
+	size_t count, i;
+
+	fibril_mutex_lock(&ncs_links_lock);
+	count = list_count(&ncs_links);
+
+	id_list = calloc(count, sizeof(sysarg_t));
+	if (id_list == NULL) {
+		fibril_mutex_unlock(&ncs_links_lock);
+		return ENOMEM;
+	}
+
+	i = 0;
+	list_foreach(ncs_links, link_list, ncs_link_t, nlink) {
+		id_list[i++] = nlink->svc_id;
+		log_msg(LOG_DEFAULT, LVL_NOTE, "add link to list");
+	}
+
+	fibril_mutex_unlock(&ncs_links_lock);
+
+	log_msg(LOG_DEFAULT, LVL_NOTE, "return %zu links", count);
+	*rid_list = id_list;
+	*rcount = count;
+
+	return EOK;
+}
+
+/** @}
+ */
Index: uspace/srv/net/nconfsrv/iplink.h
===================================================================
--- uspace/srv/net/nconfsrv/iplink.h	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
+++ uspace/srv/net/nconfsrv/iplink.h	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2013 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup nconfsrv
+ * @{
+ */
+/**
+ * @file
+ * @brief
+ */
+
+#ifndef NCONFSRV_IPLINK_H_
+#define NCONFSRV_IPLINK_H_
+
+#include <sys/types.h>
+#include "nconfsrv.h"
+
+extern int ncs_link_discovery_start(void);
+extern ncs_link_t *ncs_link_get_by_id(sysarg_t);
+extern int ncs_link_get_id_list(sysarg_t **, size_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/srv/net/nconfsrv/nconfsrv.c
===================================================================
--- uspace/srv/net/nconfsrv/nconfsrv.c	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
+++ uspace/srv/net/nconfsrv/nconfsrv.c	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2013 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup nconfsrv
+ * @{
+ */
+/**
+ * @file
+ * @brief Network configuration Service
+ */
+
+#include <adt/list.h>
+#include <async.h>
+#include <errno.h>
+#include <fibril_synch.h>
+#include <inet/inetcfg.h>
+#include <io/log.h>
+#include <ipc/inet.h>
+#include <ipc/services.h>
+#include <loc.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <net/socket_codes.h>
+#include "iplink.h"
+#include "nconfsrv.h"
+
+#define NAME "nconfsrv"
+
+static void ncs_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg);
+
+static int ncs_init(void)
+{
+	service_id_t sid;
+	int rc;
+
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "ncs_init()");
+
+	rc = inetcfg_init();
+	if (rc != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Error contacting inet "
+		    "configuration service.");
+		return EIO;
+	}
+
+	async_set_client_connection(ncs_client_conn);
+
+	rc = loc_server_register(NAME);
+	if (rc != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering server (%d).", rc);
+		return EEXIST;
+	}
+
+	rc = loc_service_register(SERVICE_NAME_NETCONF, &sid);
+	if (rc != EOK) {
+		log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service (%d).", rc);
+		return EEXIST;
+	}
+
+	rc = ncs_link_discovery_start();
+	if (rc != EOK)
+		return EEXIST;
+
+	return EOK;
+}
+
+static void ncs_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)
+{
+	async_answer_0(iid, ENOTSUP);
+}
+
+int main(int argc, char *argv[])
+{
+	int rc;
+
+	printf(NAME ": HelenOS Network configuration service\n");
+
+	if (log_init(NAME) != EOK) {
+		printf(NAME ": Failed to initialize logging.\n");
+		return 1;
+	}
+
+	rc = ncs_init();
+	if (rc != EOK)
+		return 1;
+
+	printf(NAME ": Accepting connections.\n");
+	task_retval(0);
+	async_manager();
+
+	/* Not reached */
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/srv/net/nconfsrv/nconfsrv.h
===================================================================
--- uspace/srv/net/nconfsrv/nconfsrv.h	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
+++ uspace/srv/net/nconfsrv/nconfsrv.h	(revision 7af0cc5a018d0110bf2c694b3d163d45aa8b2725)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup inetsrv
+ * @{
+ */
+/**
+ * @file
+ * @brief
+ */
+
+#ifndef INETSRV_H_
+#define INETSRV_H_
+
+#include <adt/list.h>
+#include <ipc/loc.h>
+
+typedef struct {
+	link_t link_list;
+	service_id_t svc_id;
+	char *svc_name;
+} ncs_link_t;
+
+#endif
+
+/** @}
+ */
