#include <ll_address.h>
Public Member Functions | |
Address (unsigned short protocol=ETH_P_IP) | |
virtual | ~Address () |
unsigned short | family () const |
unsigned short | protocol () const |
void | set_protocol (unsigned short) |
int | interface_index () const |
unsigned short | hardware_type () const |
unsigned char | packet_type () const |
unsigned char | hardware_address_length () const |
const unsigned char * | hardware_address () const |
virtual socklen_t | sockaddr_size () const |
virtual bool | is_broadcast () const |
void | set_interface (int) |
void | set_interface (const std::string) |
Friends | |
class | Packet |
This object wraps the Linux device level packet interface structure sockaddr_ll and provides accessor methods for the members. Many of the related functions for manipulating the sockaddr_ll structure are presented in the class interface as methods.
Several extensions to the API functionality are also provided, such as a method to retrieve the kernel's numeric index for a give interface or the MAC address.
ll_client.cpp, and ll_server.cpp.
Conexus::LL::Address::Address | ( | unsigned short | protocol = ETH_P_IP |
) |
References Conexus::Address::m_sockaddr.
Conexus::LL::Address::~Address | ( | ) | [virtual] |
Reimplemented from Conexus::Address.
unsigned short Conexus::LL::Address::family | ( | ) | const |
References Conexus::Address::m_sockaddr.
const unsigned char * Conexus::LL::Address::hardware_address | ( | ) | const |
References Conexus::Address::m_sockaddr.
unsigned char Conexus::LL::Address::hardware_address_length | ( | ) | const |
References Conexus::Address::m_sockaddr.
unsigned short Conexus::LL::Address::hardware_type | ( | ) | const |
References Conexus::Address::m_sockaddr.
int Conexus::LL::Address::interface_index | ( | ) | const |
References Conexus::Address::m_sockaddr.
bool Conexus::LL::Address::is_broadcast | ( | ) | const [virtual] |
unsigned char Conexus::LL::Address::packet_type | ( | ) | const |
References Conexus::Address::m_sockaddr.
unsigned short Conexus::LL::Address::protocol | ( | ) | const |
References Conexus::Address::m_sockaddr.
void Conexus::LL::Address::set_interface | ( | const std::string | ifname | ) |
References Conexus::Address::m_sockaddr.
void Conexus::LL::Address::set_interface | ( | int | ifindex | ) |
References Conexus::Network::interface_name().
Referenced by Conexus::LL::Packet::bind().
void Conexus::LL::Address::set_protocol | ( | unsigned short | p | ) |
socklen_t Conexus::LL::Address::sockaddr_size | ( | ) | const [virtual] |
Reimplemented from Conexus::Address.
friend class Packet [friend] |