Closed icyfox168168 closed 8 months ago
get IPPROTO_IGMP|IPPROTO_IPV4 why IPPROTO_TCP ?
IPPROTO_IGMP|IPPROTO_IPV4 = 6
IPPROTO_TCP value: 6
auto f3 = magic_enum::enum_cast(Protocol); if (f3.has_value()) { std::cout << magic_enum::enum_flags_name(f3.value()) << " = " << magic_enum::enum_integer(f3.value()) << std::endl; }
auto result = magic_enum::enum_cast<IPPROTO>("IPPROTO_TCP"); if (result.has_value()) { std::cout << "IPPROTO_TCP value: " << result.value() << std::endl; }
typedef enum {
IPPROTO_HOPOPTS = 0, // IPv6 Hop-by-Hop options
IPPROTO_ICMP = 1, IPPROTO_IGMP = 2, IPPROTO_GGP = 3,
IPPROTO_IPV4 = 4,
IPPROTO_ST = 5,
IPPROTO_TCP = 6,
IPPROTO_CBT = 7, IPPROTO_EGP = 8, IPPROTO_IGP = 9,
IPPROTO_PUP = 12, IPPROTO_UDP = 17, IPPROTO_IDP = 22,
IPPROTO_RDP = 27,
IPPROTO_IPV6 = 41, // IPv6 header IPPROTO_ROUTING = 43, // IPv6 Routing header IPPROTO_FRAGMENT = 44, // IPv6 fragmentation header IPPROTO_ESP = 50, // encapsulating security payload IPPROTO_AH = 51, // authentication header IPPROTO_ICMPV6 = 58, // ICMPv6 IPPROTO_NONE = 59, // IPv6 no next header IPPROTO_DSTOPTS = 60, // IPv6 Destination options
IPPROTO_ND = 77,
IPPROTO_ICLFXBM = 78,
IPPROTO_PIM = 103, IPPROTO_PGM = 113, IPPROTO_L2TP = 115, IPPROTO_SCTP = 132,
IPPROTO_RAW = 255, IPPROTO_MAX = 256,
// // These are reserved for internal use by Windows. // IPPROTO_RESERVED_RAW = 257, IPPROTO_RESERVED_IPSEC = 258, IPPROTO_RESERVED_IPSECOFFLOAD = 259, IPPROTO_RESERVED_WNV = 260, IPPROTO_RESERVED_MAX = 261 } IPPROTO, *PIPROTO;
The version of vcpkg I use
try magic_enum::enum_name(f3.value())
magic_enum::enum_name(f3.value())
get IPPROTO_IGMP|IPPROTO_IPV4 why IPPROTO_TCP ?
IPPROTO_IGMP|IPPROTO_IPV4 = 6
IPPROTO_TCP value: 6
auto f3 = magic_enum::enum_cast(Protocol);
if (f3.has_value()) {
std::cout << magic_enum::enum_flags_name(f3.value()) << " = " << magic_enum::enum_integer(f3.value()) << std::endl;
}
typedef enum {
if(_WIN32_WINNT >= 0x0501)
endif//(_WIN32_WINNT >= 0x0501)
if(_WIN32_WINNT >= 0x0501)
endif//(_WIN32_WINNT >= 0x0501)
if(_WIN32_WINNT >= 0x0600)
endif//(_WIN32_WINNT >= 0x0600)
if(_WIN32_WINNT >= 0x0600)
endif//(_WIN32_WINNT >= 0x0600)
if(_WIN32_WINNT >= 0x0600)
endif//(_WIN32_WINNT >= 0x0600)
if(_WIN32_WINNT >= 0x0501)
endif//(_WIN32_WINNT >= 0x0501)
if(_WIN32_WINNT >= 0x0501)
endif//(_WIN32_WINNT >= 0x0501)
if(_WIN32_WINNT >= 0x0600)
endif//(_WIN32_WINNT >= 0x0600)
// // These are reserved for internal use by Windows. // IPPROTO_RESERVED_RAW = 257, IPPROTO_RESERVED_IPSEC = 258, IPPROTO_RESERVED_IPSECOFFLOAD = 259, IPPROTO_RESERVED_WNV = 260, IPPROTO_RESERVED_MAX = 261 } IPPROTO, *PIPROTO;