Network interface information.
More...
#include <ptp.h>
Network interface information.
◆ ifIndex()
int IfInfo::ifIndex |
( |
| ) |
const |
|
inline |
Get interface index
- Returns
- interface index or NO_SUCH_IF if object is not initialized
◆ ifName()
const std::string& IfInfo::ifName |
( |
| ) |
const |
|
inline |
Get interface name
- Returns
- interface name or empty string if object is not initialized
◆ ifName_c()
const char* IfInfo::ifName_c |
( |
| ) |
const |
|
inline |
Get interface name
- Returns
- interface name or empty string if object is not initialized
◆ initUsingIndex()
bool IfInfo::initUsingIndex |
( |
int |
ifIndex | ) |
|
Find network interface information based on its index
- Parameters
-
[in] | ifIndex | network interface index |
- Returns
- true if network interface exists
◆ initUsingName()
bool IfInfo::initUsingName |
( |
const std::string & |
ifName | ) |
|
Find network interface information based on its name
- Parameters
-
[in] | ifName | network interface name |
- Returns
- true if network interface exists
◆ isInit()
bool IfInfo::isInit |
( |
| ) |
const |
|
inline |
Is object initialized
- Returns
- true if network interface was successfully initialized
◆ mac()
const Binary& IfInfo::mac |
( |
| ) |
const |
|
inline |
Get interface MAC address
- Returns
- binary from address or empty string if object is not initialized
◆ mac_c()
const uint8_t* IfInfo::mac_c |
( |
| ) |
const |
|
inline |
Get interface MAC address
- Returns
- binary from address or empty string if object is not initialized
◆ mac_size()
size_t IfInfo::mac_size |
( |
| ) |
const |
|
inline |
Get interface MAC address length
- Returns
- binary from address length or 0 if object is not initialized
◆ ptpIndex()
int IfInfo::ptpIndex |
( |
| ) |
const |
|
inline |
Get interface PTP index
- Returns
- ptp index or NO_SUCH_PTP if object is not initialized or interface does not support PTP
- Note
- An interface may have multiple PHCs, this function return the index report by the get_ts_info
The documentation for this class was generated from the following file: