1#ifndef NEFORCE_NETWORK_MAC_ADDRESS_HPP__
2#define NEFORCE_NETWORK_MAC_ADDRESS_HPP__
14NEFORCE_BEGIN_NAMESPACE__
125NEFORCE_END_NAMESPACE__
array< byte_t, MAC_LEN > bytes_type
MAC地址字节数组类型
mac_address(const bytes_type &bytes) noexcept
从字节数组容器构造
static constexpr size_t MAC_LEN
MAC地址字节长度
static optional< mac_address > parse(string_view str)
从字符串解析MAC地址
bool operator==(const mac_address &other) const noexcept
相等比较运算符
static optional< mac_address > parse(const ip_address &ip, const char *iface=nullptr)
从IP地址获取MAC地址
const bytes_type & bytes() const noexcept
获取MAC地址字节数组
bool operator!=(const mac_address &other) const noexcept
不等比较运算符
mac_address() noexcept=default
默认构造函数
string to_string() const
转换为字符串表示
unsigned char byte_t
字节类型,定义为无符号字符
constexpr Iterator2 copy(Iterator1 first, Iterator1 last, Iterator2 result) noexcept(noexcept(inner::__copy_aux(first, last, result)))
复制范围元素
basic_string_view< char > string_view
字符字符串视图