Socket: added UnknownInterfaceException
[senf.git] / senf / Socket / Protocols / Raw / LLAddressing.cc
index a15c2de..8950b6e 100644 (file)
@@ -34,7 +34,6 @@
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/finder.hpp>
 
-#include <senf/Utils/Exception.hh>
 #include <senf/Socket/Protocols/AddressExceptions.hh>
 
 //#include "LLAddressing.mpp"
@@ -49,25 +48,25 @@ prefix_ std::string senf::LLSocketAddress::interface()
     char name[IFNAMSIZ];
     ::bzero(name, IFNAMSIZ);
     if (! ::if_indextoname(addr_.sll_ifindex, name))
-        throw AddressSyntaxException();
+        throw UnknownInterfaceException();
     return std::string(name);
 }
 
 prefix_ void senf::LLSocketAddress::interface(std::string const & iface)
 {
-    if (iface.empty()) 
+    if (iface.empty())
         addr_.sll_ifindex = 0;
     else {
         addr_.sll_ifindex = if_nametoindex(iface.c_str());
         if (addr_.sll_ifindex == 0)
-            throw AddressSyntaxException();
+            throw UnknownInterfaceException(iface);
     }
 }
 
 prefix_ std::ostream & senf::operator<<(std::ostream & os, LLSocketAddress const & llAddr)
 {
     os << "[" << llAddr.address()
-       << '%' << llAddr.interface() 
+       << '%' << llAddr.interface()
        << ' ' << llAddr.protocol()
        << ' ' << llAddr.arptype()
        << ( llAddr.pkttype() == senf::LLSocketAddress::Host ? " Host" :