网络接口
更多...
#include <rmvl/io/socket.hpp>
|
| const std::array< uint8_t, 6 > & | address () const noexcept |
| | 获取网络接口的 MAC 地址
|
| std::string | name () const noexcept |
| | 获取接口名称
|
| NetworkInterfaceType | type () const noexcept |
| | 获取接口类型
|
| uint8_t | flag () const noexcept |
| | 获取接口功能与状态标志
|
| bool | up () const noexcept |
| | 接口是否启用
|
| bool | loopback () const noexcept |
| | 是否为回环接口
|
| bool | broadcast () const noexcept |
| | 是否支持广播
|
| bool | p2p () const noexcept |
| | 是否为点对点接口
|
| bool | multicast () const noexcept |
| | 是否支持多播
|
| bool | running () const noexcept |
| | 接口是否正在运行
|
| std::string | to_string () const |
| | 获取 MAC 地址的字符串表示形式
|
| std::vector< ip::Networkv4 > | ipv4 () const noexcept |
| | 获取 IPv4 地址列表
|
| std::vector< ip::Networkv6 > | ipv6 () const noexcept |
| | 获取 IPv6 地址列表
|
◆ address()
| const std::array< uint8_t, 6 > & rm::NetworkInterface::address |
( |
| ) |
const |
|
inlinenoexcept |
◆ broadcast()
| bool rm::NetworkInterface::broadcast |
( |
| ) |
const |
|
inlinenoexcept |
◆ findByAddress()
| NetworkInterface rm::NetworkInterface::findByAddress |
( |
const std::array< uint8_t, 6 > & | addr | ) |
|
|
staticnoexcept |
根据 MAC 地址查找网络接口
- 参数
-
- 返回
- 找到的网络接口,未找到时返回一个无效的接口
◆ findByName()
根据名称查找网络接口
- 参数
-
- 返回
- 找到的网络接口,未找到时返回一个无效的接口
◆ flag()
| uint8_t rm::NetworkInterface::flag |
( |
| ) |
const |
|
inlinenoexcept |
◆ ipv4()
| std::vector< ip::Networkv4 > rm::NetworkInterface::ipv4 |
( |
| ) |
const |
|
noexcept |
◆ ipv6()
| std::vector< ip::Networkv6 > rm::NetworkInterface::ipv6 |
( |
| ) |
const |
|
noexcept |
◆ list()
◆ loopback()
| bool rm::NetworkInterface::loopback |
( |
| ) |
const |
|
inlinenoexcept |
◆ multicast()
| bool rm::NetworkInterface::multicast |
( |
| ) |
const |
|
inlinenoexcept |
◆ name()
| std::string rm::NetworkInterface::name |
( |
| ) |
const |
|
inlinenoexcept |
◆ p2p()
| bool rm::NetworkInterface::p2p |
( |
| ) |
const |
|
inlinenoexcept |
◆ running()
| bool rm::NetworkInterface::running |
( |
| ) |
const |
|
inlinenoexcept |
◆ to_string()
| std::string rm::NetworkInterface::to_string |
( |
| ) |
const |
◆ type()
◆ up()
| bool rm::NetworkInterface::up |
( |
| ) |
const |
|
inlinenoexcept |
该类的文档由以下文件生成: