X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FSocket%2FProtocols%2FRaw%2FLLAddressing.cc;h=8950b6e7ef8b9be10c61a2b9ed73f2ae0c1ea211;hb=874b9d37b59223d9b0dce3bddafa130045419750;hp=71addad08a07eba5e41b91c346743fe5f4e33ea5;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Socket/Protocols/Raw/LLAddressing.cc b/senf/Socket/Protocols/Raw/LLAddressing.cc index 71addad..8950b6e 100644 --- a/senf/Socket/Protocols/Raw/LLAddressing.cc +++ b/senf/Socket/Protocols/Raw/LLAddressing.cc @@ -34,8 +34,7 @@ #include #include -#include "../../../Utils/Exception.hh" -#include "../AddressExceptions.hh" +#include //#include "LLAddressing.mpp" #define prefix_ @@ -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" :