Index: source/ariba/communication/networkinfo/AddressDiscovery.cpp
===================================================================
--- source/ariba/communication/networkinfo/AddressDiscovery.cpp	(revision 12775)
+++ 	(revision )
@@ -1,244 +1,0 @@
-// [License]
-// The Ariba-Underlay Copyright
-//
-// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
-//
-// Institute of Telematics
-// UniversitÃ€t Karlsruhe (TH)
-// Zirkel 2, 76128 Karlsruhe
-// Germany
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. 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.
-//
-// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``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 ARIBA PROJECT OR
-// CONTRIBUTORS 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.
-//
-// The views and conclusions contained in the software and documentation
-// are those of the authors and should not be interpreted as representing
-// official policies, either expressed or implied, of the Institute of
-// Telematics.
-// [License]
-
-#include "AddressDiscovery.h"
-#include "ariba/config.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-#include <net/if.h>
-#include <ifaddrs.h>
-
-#include <string>
-#include <boost/asio/ip/address.hpp>
-#include <boost/foreach.hpp>
-
-#include "ariba/utility/addressing2/tcpip_endpoint.hpp"
-#include "ariba/utility/addressing/mac_address.hpp"
-
-#ifdef HAVE_LIBBLUETOOTH
-  #include <bluetooth/bluetooth.h>
-  #include <bluetooth/hci.h>
-  #include <bluetooth/hci_lib.h>
-#endif
-
-namespace ariba {
-namespace communication {
-
-
-using namespace std;
-using namespace addressing2;
-using namespace boost::asio::ip;
-
-using ariba::addressing::mac_address;
-
-mac_address getMacFromIF( const char* name )
-{
-	mac_address addr;
-#ifdef HAVE_LIBBLUETOOTH
-	int s;
-	struct ifreq buffer;
-	s = socket(PF_INET, SOCK_DGRAM, 0);
-	memset(&buffer, 0x00, sizeof(buffer));
-	strcpy(buffer.ifr_name, name);
-	ioctl(s, SIOCGIFHWADDR, &buffer);
-	close(s);
-	addr.assign( (uint8_t*)buffer.ifr_hwaddr.sa_data, 6 );
-#endif
-	return addr;
-}
-
-int dev_info(int s, int dev_id, long arg)
-{
-#ifdef HAVE_LIBBLUETOOTH
-//	endpoint_set* set = (endpoint_set*)arg;
-//	struct hci_dev_info di;
-//	memset(&di, 0, sizeof(struct hci_dev_info));
-//	di.dev_id = dev_id;
-//	if (ioctl(s, HCIGETDEVINFO, (void *) &di)) return 0;
-//	mac_address mac;
-//	mac.bluetooth( di.bdaddr );
-//	address_vf vf = mac;
-//	set->add(vf);
-#endif
-	return 0;
-}
-
-void discover_bluetooth(
-        EndpointSetPtr listenOn_endpoints,
-        EndpointSetPtr discovered_endpoints )
-{
-#ifdef HAVE_LIBBLUETOOTH
-    // FIXME aktuell bluetooth
-//	hci_for_each_dev(HCI_UP, &AddressDiscovery::dev_info, (long)&endpoints );
-#endif
-}
-
-void discover_ip_addresses(
-        EndpointSetPtr listenOn_endpoints,
-        EndpointSetPtr discovered_endpoints )
-{
-    bool discover_ipv4 = false;
-    bool discover_ipv6 = false;
-    vector<uint16_t> ipv4_ports;
-    vector<uint16_t> ipv6_ports;
-    
-    /* analyze listenOn_endpoints */
-    BOOST_FOREACH( TcpIP_EndpointPtr endp, listenOn_endpoints->get_tcpip_endpoints() )
-    {
-        // BRANCH: IPv4 any [0.0.0.0]
-        if ( endp->to_asio().address() == address_v4::any() )
-        {
-            // add port
-            ipv4_ports.push_back(endp->to_asio().port());
-            
-            discover_ipv4 = true;
-        }
-
-        // BRANCH: IPv6 any [::]
-        else if ( endp->to_asio().address() == address_v6::any() )
-        {
-            // add port
-            ipv6_ports.push_back(endp->to_asio().port());
-            
-            discover_ipv6 = true;
-
-            
-            // NOTE: on linux the ipv6-any address [::] catches ipv4 as well
-            ipv4_ports.push_back(endp->to_asio().port());
-            discover_ipv4 = true;
-        }
-        
-        // BRANCH: explicit ip address
-        else
-        {
-            // ---> don't discover anything, just add it directly
-            discovered_endpoints->add_endpoint(endp);
-        }
-    }
-    
-    
-    /* discover addresses */
-    if ( discover_ipv4 || discover_ipv6 )
-    {
-        struct ifaddrs* ifaceBuffer = NULL;
-        void*           tmpAddrPtr  = NULL;
-    
-        int ret = getifaddrs( &ifaceBuffer );
-        if( ret != 0 ) return;
-    
-        for( struct ifaddrs* i=ifaceBuffer; i != NULL; i=i->ifa_next )
-        {
-            // ignore devices that are disabled or have no ip
-            if(i == NULL) continue;
-            struct sockaddr* addr = i->ifa_addr;
-            if (addr==NULL) continue;
-    
-    //		// ignore tun devices  // XXX why?
-    //		string device = string(i->ifa_name);
-    //		if(device.find_first_of("tun") == 0) continue;
-
-            // IPv4
-            if ( discover_ipv4 && addr->sa_family == AF_INET )
-            {
-                char straddr[INET_ADDRSTRLEN];
-                tmpAddrPtr= &((struct sockaddr_in*)addr)->sin_addr;
-                inet_ntop( i->ifa_addr->sa_family, tmpAddrPtr, straddr, sizeof(straddr) );
-                
-                address ip_addr = address::from_string(straddr);
-    
-                // skip loopback address
-                if ( ip_addr.to_v4() == address_v4::loopback() )
-                    continue;
-
-                // add endpoint for this address and every given ipv4 port
-                BOOST_FOREACH( uint16_t port, ipv4_ports )
-                {
-                    tcp::endpoint tcpip_endp(ip_addr, port);
-                    TcpIP_EndpointPtr endp(new tcpip_endpoint(tcpip_endp));
-                    
-                    discovered_endpoints->add_endpoint(endp);
-                }
-            }
-            
-            // IPv6
-            else if ( discover_ipv6 && addr->sa_family == AF_INET6 )
-            {
-                // look for ipv6
-                char straddr[INET6_ADDRSTRLEN];
-                tmpAddrPtr= &((struct sockaddr_in6*)addr)->sin6_addr;
-                inet_ntop( i->ifa_addr->sa_family, tmpAddrPtr, straddr, sizeof(straddr) );
-                
-                address ip_addr = address::from_string(straddr);
-                
-                // skip loopback address
-                if ( ip_addr.to_v6() == address_v6::loopback() )
-                    continue;
-
-                // add endpoint for this address and every given ipv4 port
-                BOOST_FOREACH( uint16_t port, ipv6_ports )
-                {
-                    tcp::endpoint tcpip_endp(ip_addr, port);
-                    TcpIP_EndpointPtr endp(new tcpip_endpoint(tcpip_endp));
-                    
-                    discovered_endpoints->add_endpoint(endp);
-                }
-            }
-        }
-    
-        freeifaddrs(ifaceBuffer);
-    }
-}
-
-
-
-EndpointSetPtr AddressDiscovery::discover_endpoints(EndpointSetPtr listenOn_endpoints)
-{
-    EndpointSetPtr discovered_endpoints(new addressing2::endpoint_set());
-    
-	discover_ip_addresses( listenOn_endpoints, discovered_endpoints );
-	discover_bluetooth( listenOn_endpoints, discovered_endpoints );
-	
-	return discovered_endpoints;
-}
-
-}} // namespace ariba, communication
Index: source/ariba/communication/networkinfo/AddressDiscovery.h
===================================================================
--- source/ariba/communication/networkinfo/AddressDiscovery.h	(revision 12775)
+++ 	(revision )
@@ -1,63 +1,0 @@
-// [License]
-// The Ariba-Underlay Copyright
-//
-// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
-//
-// Institute of Telematics
-// UniversitÃ€t Karlsruhe (TH)
-// Zirkel 2, 76128 Karlsruhe
-// Germany
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. 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.
-//
-// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``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 ARIBA PROJECT OR
-// CONTRIBUTORS 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.
-//
-// The views and conclusions contained in the software and documentation
-// are those of the authors and should not be interpreted as representing
-// official policies, either expressed or implied, of the Institute of
-// Telematics.
-// [License]
-
-#ifndef __ADDRESS_DISCOVERY_H
-#define __ADDRESS_DISCOVERY_H
-
-#include "ariba/utility/addressing2/endpoint_set.hpp"
-
-namespace ariba {
-namespace communication {
-
-using addressing2::EndpointSetPtr;
-
-class AddressDiscovery {
-public:
-	static EndpointSetPtr discover_endpoints(EndpointSetPtr listenOn_endpoints);
-
-private:
-	// TODO aktuell weg damit..
-//	static mac_address getMacFromIF( const char* name );
-//	static int dev_info(int s, int dev_id, long arg);
-//	static void discover_bluetooth( EndpointSetPtr listenOn_endpoints, EndpointSetPtr discovered_endpoints );
-//	static void discover_ip_addresses( EndpointSetPtr listenOn_endpoints, EndpointSetPtr discovered_endpoints );
-};
-
-}} // namespace ariba, communication
-
-#endif // __ADDRESS_DISCOVERY_H
Index: source/ariba/communication/networkinfo/AddressInformation.cpp
===================================================================
--- source/ariba/communication/networkinfo/AddressInformation.cpp	(revision 2378)
+++ source/ariba/communication/networkinfo/AddressInformation.cpp	(revision 2378)
@@ -0,0 +1,86 @@
+// [Licence]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. 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.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``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 ARIBA PROJECT OR
+// CONTRIBUTORS 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.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [Licence]
+
+#include "AddressInformation.h"
+
+namespace ariba {
+namespace communication {
+
+AddressInformation::AddressInformation(){
+}
+
+AddressInformation::~AddressInformation(){
+}
+
+AddressList AddressInformation::getAddresses(const NetworkInterface& interface){
+
+	AddressList retlist;
+
+	//
+	// gather transport addresses
+	//
+
+	struct ifaddrs* ifap;
+	getifaddrs( &ifap );
+
+	for( struct ifaddrs* p = ifap; p != NULL; p=p->ifa_next ){
+		if( interface.name.compare(string(p->ifa_name)) != 0 ) continue;
+
+		// TODO: currently only handle IPv4
+		struct sockaddr* addr = p->ifa_addr;
+		if( addr->sa_family != AF_INET ) continue;
+
+		const struct sockaddr_in& ipv4 = (const struct sockaddr_in&)*addr;
+		boost::asio::ip::address_v4::bytes_type bytes;
+		for( int i=0; i<4; i++ )
+			bytes[i] = (ipv4.sin_addr.s_addr >> (24-i*8)) & 0xff;
+
+		boost::asio::ip::address boost_addr = boost::asio::ip::address_v4( bytes );
+		retlist.push_back( IPv4Locator::fromString(boost_addr.to_string()) );
+	}
+
+	freeifaddrs( ifap );
+
+	//
+	// TODO: gather further addresses like MAC etc.
+	//
+
+	return retlist;
+}
+
+}} // namespace ariba, communication
Index: source/ariba/communication/networkinfo/AddressInformation.h
===================================================================
--- source/ariba/communication/networkinfo/AddressInformation.h	(revision 2378)
+++ source/ariba/communication/networkinfo/AddressInformation.h	(revision 2378)
@@ -0,0 +1,69 @@
+// [Licence]
+// The Ariba-Underlay Copyright
+//
+// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
+//
+// Institute of Telematics
+// UniversitÃ€t Karlsruhe (TH)
+// Zirkel 2, 76128 Karlsruhe
+// Germany
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. 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.
+//
+// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``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 ARIBA PROJECT OR
+// CONTRIBUTORS 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.
+//
+// The views and conclusions contained in the software and documentation
+// are those of the authors and should not be interpreted as representing
+// official policies, either expressed or implied, of the Institute of
+// Telematics.
+// [Licence]
+
+#ifndef __ADDRESS_INFORMATION_H
+#define __ADDRESS_INFORMATION_H
+
+#include <ifaddrs.h>
+#include <vector>
+#include <boost/asio/ip/address.hpp>
+#include <boost/asio/ip/address_v4.hpp>
+#include "ariba/communication/networkinfo/NetworkInterface.h"
+#include "ariba/communication/modules/network/ip/IPv4Locator.h"
+
+using std::vector;
+using ariba::communication::NetworkInterface;
+using ariba::communication::IPv4Locator;
+
+namespace ariba {
+namespace communication {
+
+typedef vector<IPv4Locator> AddressList; // TODO: make more general, not only ipv4
+
+class AddressInformation {
+public:
+	AddressInformation();
+	~AddressInformation();
+
+	AddressList getAddresses(const NetworkInterface& interface);
+
+};
+
+}} // namespace ariba, communication
+
+#endif // __ADDRESS_INFORMATION_H
Index: source/ariba/communication/networkinfo/CMakeLists.txt
===================================================================
--- source/ariba/communication/networkinfo/CMakeLists.txt	(revision 12775)
+++ 	(revision )
@@ -1,52 +1,0 @@
-# [License]
-# The Ariba-Underlay Copyright
-#
-# Copyright (c) 2008-2012, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
-#
-# Institute of Telematics
-# UniversitÃ€t Karlsruhe (TH)
-# Zirkel 2, 76128 Karlsruhe
-# Germany
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. 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.
-#
-# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``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 INSTITUTE OF TELEMATICS OR
-# CONTRIBUTORS 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.
-#
-# The views and conclusions contained in the software and documentation
-# are those of the authors and should not be interpreted as representing
-# official policies, either expressed or implied, of the Institute of
-# Telematics.
-# [License]
-
-add_headers(
-    AddressDiscovery.h
-    NetworkChangeDetection.h
-    NetworkChangeInterface.h
-    NetworkInformation.h
-    NetworkInterface.h
-    )
-
-add_sources(
-    AddressDiscovery.cpp
-    NetworkChangeDetection.cpp
-    NetworkInformation.cpp
-    NetworkInterface.cpp
-    )
Index: source/ariba/communication/networkinfo/NetworkChangeDetection.cpp
===================================================================
--- source/ariba/communication/networkinfo/NetworkChangeDetection.cpp	(revision 12775)
+++ source/ariba/communication/networkinfo/NetworkChangeDetection.cpp	(revision 2378)
@@ -1,3 +1,3 @@
-// [License]
+// [Licence]
 // The Ariba-Underlay Copyright
 //
@@ -35,27 +35,7 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [License]
+// [Licence]
 
 #include "NetworkChangeDetection.h"
-
-#include <string>
-#include <algorithm>
-#include <cerrno>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <boost/bind.hpp>
-#include <sys/socket.h>
-
-extern "C" {
-	#include <linux/netlink.h>
-	#include <linux/rtnetlink.h>
-}
-
-#include "ariba/utility/system/SystemQueue.h"
-
-using std::find;
-using ariba::utility::SystemQueue;
-using ariba::utility::SystemEventType;
 
 namespace ariba {
@@ -143,5 +123,5 @@
 	if( obj->routingSocket < 0 ){
 		logging_error("could not connect to routing socket: " +
-					std::string(strerror(errno)));
+					string(strerror(errno)));
 		return;
 	}
@@ -175,5 +155,5 @@
 	if( ret < 0 ){
 		close( obj->routingSocket );
-		logging_error( "could not bind routing socket: " + std::string(strerror(errno)) );
+		logging_error( "could not bind routing socket: " + string(strerror(errno)) );
 		return;
 	}
@@ -205,23 +185,23 @@
 			// all others are some kind of error
 			logging_error( "could not read from routing socket: " +
-							std::string(strerror(errno)) );
+							string(strerror(errno)) );
 			break;
 		}
 
 		for( ; bytesRead > 0; header = NLMSG_NEXT(header, bytesRead)) {
-			if (!NLMSG_OK(header, (size_t)bytesRead) ||
+			if (	!NLMSG_OK(header, bytesRead) ||
 				(size_t) bytesRead < sizeof(struct nlmsghdr) ||
-				(size_t) bytesRead < (size_t)header->nlmsg_len) {
+				(size_t) bytesRead < header->nlmsg_len) {
 				continue;
 			}
-
-			// somehow all notifications with pid=0 are
-			// invalid and occur much too often
-			if(header->nlmsg_pid == 0) continue;
 
 			//
 			// here we evaluate the routing netlink message. for, the following
 			// messages are of interest:
+			// 	RTM_NEWLINK, RTM_DELLINK -> interface up/down
 			//	RTM_NEWADDR, RTM_DELADDR -> new address on iface, address deleted from iface
+			// not interesting are:
+			//	RTM_GETLINK, RTM_GETADDR
+			//	RTM_NEWROUTE, RTM_DELROUTE, RTM_GETROUTE
 			//
 
@@ -229,4 +209,15 @@
 
 			switch( header->nlmsg_type ){
+
+				//
+				// handle network interface up/down notifications
+				// --> link layer notifications
+				//
+
+				case RTM_NEWLINK:
+				case RTM_DELLINK:
+
+					changeInfo = obj->extractInterfaceEvent( header );
+					break;
 
 				//
@@ -266,4 +257,45 @@
 }
 
+NetworkChangeInterface::NetworkChangeInfo NetworkChangeDetection::extractInterfaceEvent(struct nlmsghdr* header){
+	NetworkChangeInterface::NetworkChangeInfo changeInfo;
+
+	//
+	// handle network interface up/down notifications
+	// the differentiation between up/down is _not_
+	// made using new/del-link in the message!
+	//
+
+	if( header->nlmsg_type == RTM_NEWLINK ){
+		logging_debug("network change message RTM_NEWLINK");
+	}else if( header->nlmsg_type == RTM_DELLINK ){
+		logging_debug("network change message RTM_DELLINK");
+	}
+
+	if( header->nlmsg_len < NLMSG_LENGTH(sizeof(struct ifinfomsg)) ){
+		logging_error( "netlink packet soo small for ifinfomsg" );
+		return changeInfo;
+	}
+
+	//
+	// get the interface index and through this
+	// further information about the interface
+	//
+
+	struct ifinfomsg* detailIface = (struct ifinfomsg*)NLMSG_DATA(header);
+	changeInfo.interface = networkInformation.getInterface( detailIface->ifi_index );
+
+	//
+	// check whether device is now up or down
+	//
+
+	if( changeInfo.interface.isUp && changeInfo.interface.isRunning )
+		changeInfo.type = NetworkChangeInterface::EventTypeInterfaceUp;
+	else
+		changeInfo.type = NetworkChangeInterface::EventTypeInterfaceDown;
+
+
+	return changeInfo;
+}
+
 NetworkChangeInterface::NetworkChangeInfo NetworkChangeDetection::extractAddressEvent(struct nlmsghdr* header){
 	NetworkChangeInterface::NetworkChangeInfo changeInfo;
@@ -276,8 +308,8 @@
 	if( header->nlmsg_type == RTM_NEWADDR ){
 		logging_debug("network change message RTM_NEWADDR");
-		changeInfo.type = NetworkChangeInterface::EventTypeInterfaceUp;
+		changeInfo.type = NetworkChangeInterface::EventTypeAddressNew;
 	}else if( header->nlmsg_type == RTM_DELADDR ){
 		logging_debug("network change message RTM_DELADDR");
-		changeInfo.type = NetworkChangeInterface::EventTypeInterfaceDown;
+		changeInfo.type = NetworkChangeInterface::EventTypeAddressDelete;
 	}
 
Index: source/ariba/communication/networkinfo/NetworkChangeDetection.h
===================================================================
--- source/ariba/communication/networkinfo/NetworkChangeDetection.h	(revision 12775)
+++ source/ariba/communication/networkinfo/NetworkChangeDetection.h	(revision 2378)
@@ -1,3 +1,3 @@
-// [License]
+// [Licence]
 // The Ariba-Underlay Copyright
 //
@@ -35,25 +35,42 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [License]
+// [Licence]
 
 #ifndef __NETWORK_CHANGE_DETECTION_H
 #define __NETWORK_CHANGE_DETECTION_H
 
-// Forward declarations
-struct nlmsghdr;
+#include <cerrno>
+#include <csignal>
+#include <vector>
+#include <algorithm>
+#include <string>
+#include <net/if.h>
+#include <arpa/inet.h>
+#include <linux/types.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/utility.hpp>
+#include <boost/bind.hpp>
+#include "ariba/communication/networkinfo/NetworkChangeInterface.h"
+#include "ariba/communication/networkinfo/NetworkInformation.h"
+#include "ariba/utility/system/SystemQueue.h"
+#include "ariba/utility/logging/Logging.h"
 
-#include <vector>
-#include <boost/thread/thread.hpp>
-
-#include "NetworkInformation.h"
-#include "NetworkChangeInterface.h"
-#include "ariba/utility/logging/Logging.h"
-#include "ariba/utility/system/SystemEventListener.h"
+using std::string;
+using std::vector;
+using std::find;
+using ariba::utility::SystemQueue;
+using ariba::utility::SystemEvent;
+using ariba::utility::SystemEventType;
+using ariba::utility::SystemEventListener;
+using ariba::communication::NetworkInformation;
 
 namespace ariba {
 namespace communication {
-
-using ariba::utility::SystemEvent;
-using ariba::utility::SystemEventListener;
 
 class NetworkChangeDetection : public SystemEventListener {
@@ -70,5 +87,5 @@
 
 private:
-	typedef std::vector<NetworkChangeInterface*> RegistrationList;
+	typedef vector<NetworkChangeInterface*> RegistrationList;
 	RegistrationList registrations;
 
@@ -76,6 +93,6 @@
 	void stopMonitoring();
 
+	boost::thread* monitoringThread;
 	volatile bool running;
-	boost::thread* monitoringThread;
 	static void monitoringThreadFunc( NetworkChangeDetection* obj );
 
@@ -83,4 +100,5 @@
 	NetworkInformation networkInformation;
 
+	NetworkChangeInterface::NetworkChangeInfo extractInterfaceEvent( struct nlmsghdr* header );
 	NetworkChangeInterface::NetworkChangeInfo extractAddressEvent( struct nlmsghdr* header );
 };
Index: source/ariba/communication/networkinfo/NetworkChangeInterface.h
===================================================================
--- source/ariba/communication/networkinfo/NetworkChangeInterface.h	(revision 12775)
+++ source/ariba/communication/networkinfo/NetworkChangeInterface.h	(revision 2378)
@@ -1,3 +1,3 @@
-// [License]
+// [Licence]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [License]
+// [Licence]
 
 #ifndef __NETWORK_CHANGE_INTERFACE_H
@@ -55,15 +55,19 @@
 
 	typedef enum _EventType {
-		EventTypeInvalid,			// INVALID
+		EventTypeInvalid,		// INVALID
 		EventTypeInterfaceUp,		// network interface came up
 		EventTypeInterfaceDown,		// network interface went down
+		EventTypeAddressNew,		// new network address configured
+		EventTypeAddressDelete,		// network address deleted
 	} EventType;
 
 	static string eventString(EventType ev){
 		switch( ev ){
-			case EventTypeInvalid: 			return "invalid type";
-			case EventTypeInterfaceUp: 		return "interface up";
+			case EventTypeInvalid: 		return "invalid type";
+			case EventTypeInterfaceUp: 	return "interface up";
 			case EventTypeInterfaceDown: 	return "interface down";
-			default:						return "unknown event";
+			case EventTypeAddressNew: 	return "new address";
+			case EventTypeAddressDelete: 	return "deleted address";
+			default:			return "unknown event";
 		}
 	}
Index: source/ariba/communication/networkinfo/NetworkInformation.cpp
===================================================================
--- source/ariba/communication/networkinfo/NetworkInformation.cpp	(revision 12775)
+++ source/ariba/communication/networkinfo/NetworkInformation.cpp	(revision 2378)
@@ -1,3 +1,3 @@
-// [License]
+// [Licence]
 // The Ariba-Underlay Copyright
 //
@@ -35,14 +35,7 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [License]
+// [Licence]
 
 #include "NetworkInformation.h"
-#include "ariba/config.h"
-
-#ifdef HAVE_LIBBLUETOOTH
-  #include <bluetooth/bluetooth.h>
-  #include <bluetooth/hci.h>
-  #include <bluetooth/hci_lib.h>
-#endif
 
 namespace ariba {
@@ -91,12 +84,4 @@
 			logging_error( "getting interface list failed with: " <<
 						strerror(errno));
-
-			// if the socket is bogus, try to get
-			// a new one for the next call
-			if(errno == EBADF){
-				close( infoSocket );
-				infoSocket = socket( AF_INET, SOCK_DGRAM, 0 );
-			}
-
 			return retlist;
 		}
@@ -147,5 +132,4 @@
 	// hold several values, depending on the request
 	// see /usr/include/net/if.h
-	//
 
 	NetworkInterfaceList::iterator i = retlist.begin();
@@ -207,57 +191,4 @@
 	} // for( ; i != iend; i++ )*/
 
-	//
-	// not we try to get bluetooth interfaces
-	//
-
-#ifdef HAVE_LIBBLUETOOTH
-
-	int btsock = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
-	if(btsock <  0){
-		logging_error("failed getting bluetooth raw socket");
-		return retlist;
-	}
-
-	struct hci_dev_list_req* btlist = NULL;
-	struct hci_dev_req* btdev = NULL;
-
-	btlist = (hci_dev_list_req*)malloc(HCI_MAX_DEV *
-			sizeof(struct hci_dev_list_req) + sizeof(struct hci_dev_req));
-
-	btlist->dev_num = HCI_MAX_DEV;
-	btdev = btlist->dev_req;
-
-	if(ioctl(btsock, HCIGETDEVLIST, btlist) < 0){
-		logging_error("failed getting requesting bluetooth devices");
-		free(btlist);
-		close(btsock);
-		return retlist;
-	}
-
-	btdev = btlist->dev_req;
-
-	for(int i=0; i<btlist->dev_num; i++, btdev++){
-		struct hci_dev_info di;
-		NetworkInterface interface;
-
-		if(hci_devinfo(btdev->dev_id, &di) < 0) continue;
-		if(hci_test_bit(HCI_RAW, &di.flags)) continue;
-
-		interface.name = string(di.name);
-		interface.index = di.dev_id;
-		interface.mtu = di.sco_mtu;
-		interface.isBroadcast = false;
-		interface.isLoopback = false;
-		interface.isMulticast = false;
-		interface.isUp = hci_test_bit(HCI_UP, &di.flags);
-		interface.isRunning = hci_test_bit(HCI_RUNNING, &di.flags);
-
-		retlist.push_back( interface );
-	}
-
-	free(btlist);
-	close(btsock);
-#endif
-
 	return retlist;
 }
Index: source/ariba/communication/networkinfo/NetworkInformation.h
===================================================================
--- source/ariba/communication/networkinfo/NetworkInformation.h	(revision 12775)
+++ source/ariba/communication/networkinfo/NetworkInformation.h	(revision 2378)
@@ -1,3 +1,3 @@
-// [License]
+// [Licence]
 // The Ariba-Underlay Copyright
 //
@@ -35,15 +35,13 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [License]
+// [Licence]
 
 #ifndef __NETWORK_INFORMATION_H
 #define __NETWORK_INFORMATION_H
 
-#include <unistd.h>
 #include <vector>
 #include <string>
 #include <algorithm>
 #include <cerrno>
-#include <cstring>
 #include <net/if.h>
 #include <sys/socket.h>
Index: source/ariba/communication/networkinfo/NetworkInterface.cpp
===================================================================
--- source/ariba/communication/networkinfo/NetworkInterface.cpp	(revision 12775)
+++ source/ariba/communication/networkinfo/NetworkInterface.cpp	(revision 2378)
@@ -1,3 +1,3 @@
-// [License]
+// [Licence]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [License]
+// [Licence]
 
 #include "NetworkInterface.h"
@@ -47,5 +47,5 @@
 	name( "" ), index( -1 ), isRunning( false ),
 	isUp( false ), isLoopback(false ), isBroadcast( false ),
-	isMulticast( false ), mtu( -1 ), txQueueLen( -1 )
+	mtu( -1 ), isMulticast( false ), txQueueLen( -1 )
 {
 }
Index: source/ariba/communication/networkinfo/NetworkInterface.h
===================================================================
--- source/ariba/communication/networkinfo/NetworkInterface.h	(revision 12775)
+++ source/ariba/communication/networkinfo/NetworkInterface.h	(revision 2378)
@@ -1,3 +1,3 @@
-// [License]
+// [Licence]
 // The Ariba-Underlay Copyright
 //
@@ -35,5 +35,5 @@
 // official policies, either expressed or implied, of the Institute of
 // Telematics.
-// [License]
+// [Licence]
 
 #ifndef __NETWORK_INTERFACE_H
@@ -63,23 +63,10 @@
 	bool 	isBroadcast;
 	bool	isMulticast;
-	int		mtu;
-	int		txQueueLen;
+	int	mtu;
+	int	txQueueLen;
 
 	static NetworkInterface UNDEFINED;
 
-	NetworkInterface& operator=(const NetworkInterface& rh){
-		name 		= rh.name;
-		index 		= rh.index;
-		isRunning 	= rh.isRunning;
-		isUp 		= rh.isUp;
-		isLoopback 	= rh.isLoopback;
-		isBroadcast	= rh.isBroadcast;
-		isMulticast	= rh.isMulticast;
-		mtu 		= rh.mtu;
-		txQueueLen	= rh.txQueueLen;
-		return *this;
-	}
-
-	bool operator==(const NetworkInterface& rh ){
+	inline bool operator==(const NetworkInterface& rh ){
 		// equality means same name
 		return ( name.compare(rh.name) == 0 );
