X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FSocket%2FProtocols%2FRaw%2FLLAddressing.cc;h=2975e7769954c7bd86bc6fc9eb06d872ddde5ede;hb=9ab6056a616342015eb35d6730d61c45412eec46;hp=1ee604600e61383b75a086ec6d51729057cfbd4e;hpb=b6acba899f44ba9422476022c775cef823fc9337;p=senf.git diff --git a/senf/Socket/Protocols/Raw/LLAddressing.cc b/senf/Socket/Protocols/Raw/LLAddressing.cc index 1ee6046..2975e77 100644 --- a/senf/Socket/Protocols/Raw/LLAddressing.cc +++ b/senf/Socket/Protocols/Raw/LLAddressing.cc @@ -38,7 +38,7 @@ //#include "LLAddressing.mpp" #define prefix_ -///////////////////////////////cc.p//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// prefix_ std::string senf::LLSocketAddress::interface() const @@ -48,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" : @@ -79,7 +79,7 @@ prefix_ std::ostream & senf::operator<<(std::ostream & os, LLSocketAddress const return os; } -///////////////////////////////cc.e//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// #undef prefix_ //#include "LLAddressing.mpp"