23 #include <sys/socket.h> 25 #include <boost/algorithm/string/classification.hpp> 26 #include <boost/algorithm/string/finder.hpp> 37 if (addr_.sll_ifindex == 0)
40 ::bzero(name, IFNAMSIZ);
41 if (! ::if_indextoname(addr_.sll_ifindex, name))
43 return std::string(name);
49 addr_.sll_ifindex = 0;
51 addr_.sll_ifindex = if_nametoindex(iface.c_str());
52 if (addr_.sll_ifindex == 0)
std::ostream & operator<<(std::ostream &os, Packet const &packet)
std::string interface() const
Return interface name.
LLSocketAddress and LLAddressingPolicy public header.
AddressExceptions public header.
MACAddress address() const
Return address.
PktType pkttype() const
Return type of packet.
unspecified_keyword_type name
unsigned protocol() const
Return address protocol (ethertype)
unsigned arptype() const
Return the arptype field (ARP hardware type)