if (addr_.sll_ifindex == 0)
return std::string();
char name[IFNAMSIZ];
+ ::bzero(name, IFNAMSIZ);
if (! ::if_indextoname(addr_.sll_ifindex, name))
throw AddressSyntaxException();
return std::string(name);
}
}
+prefix_ std::ostream & senf::operator<<(std::ostream & os, LLSocketAddress const & llAddr)
+{
+ os << "[" << llAddr.address()
+ << '%' << llAddr.interface()
+ << ' ' << llAddr.protocol()
+ << ' ' << llAddr.arptype()
+ << ( llAddr.pkttype() == senf::LLSocketAddress::Host ? " Host" :
+ llAddr.pkttype() == senf::LLSocketAddress::Broadcast ? " Broadcast" :
+ llAddr.pkttype() == senf::LLSocketAddress::Multicast ? " Multicast" :
+ llAddr.pkttype() == senf::LLSocketAddress::OtherHost ? " OtherHost" :
+ llAddr.pkttype() == senf::LLSocketAddress::Outgoing ? " Outgoing" :
+ llAddr.pkttype() == senf::LLSocketAddress::Broadcast ? "Broadcast" : "" )
+ << "]";
+ return os;
+}
+
///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
//#include "LLAddressing.mpp"