Socket/Protocols: (hopefully) fix sockaddr alignment issues on 64bit
[senf.git] / Socket / Protocols / Raw / LLAddressing.cc
index 63b671c..97316c9 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -35,6 +35,7 @@
 #include <boost/algorithm/string/finder.hpp>
 
 #include "../../../Utils/Exception.hh"
+#include "../AddressExceptions.hh"
 
 //#include "LLAddressing.mpp"
 #define prefix_
@@ -47,7 +48,7 @@ prefix_ std::string senf::LLSocketAddress::interface()
         return std::string();
     char name[IFNAMSIZ];
     if (! ::if_indextoname(addr_.sll_ifindex, name))
-        throw InvalidLLSocketAddressException();
+        throw AddressSyntaxException();
     return std::string(name);
 }
 
@@ -58,7 +59,7 @@ prefix_ void senf::LLSocketAddress::interface(std::string const & iface)
     else {
         addr_.sll_ifindex = if_nametoindex(iface.c_str());
         if (addr_.sll_ifindex == 0)
-            throw InvalidLLSocketAddressException();
+            throw AddressSyntaxException();
     }
 }