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.
|
Public Member Functions |
|
| Address (unsigned short protocol=ETH_P_IP) |
|
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) |
|
| Address (unsigned short protocol=ETH_P_IP) |
|
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) |
|
virtual const std::string & | object_type () |
|
| Address (unsigned short protocol=ETH_P_IP) |
|
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) |
|
virtual const std::string & | object_type () |
Protected Attributes |
|
sockaddr_ll * | m_sockaddr_ll |
|
sockaddr_ll * | m_sockaddr_ll |
Friends |
|
class | Packet |