xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
protocol_type.h
Go to the documentation of this file.
1
4#pragma once
5
6#include "../../ustring.h"
7
9#undef unix
11
13namespace xtd {
15 namespace net {
17 namespace sockets {
24 enum class protocol_type {
26 unknown = -1,
30 unspecified = 0,
32 ip = 0,
34 icmp = 1,
36 igmp = 2,
38 ggp = 3,
40 ip_v4 = 4,
42 tcp = 6,
44 pup = 12,
46 udp = 17,
48 idp = 22,
50 ip_v6 = 41,
60 icmp_v6 = 58,
66 nd = 77,
68 raw = 255,
70 ipx = 1000,
72 spx = 1256,
74 spx_2 = 1257,
75 };
76
78 inline std::ostream& operator<<(std::ostream& os, protocol_type value) {return os << to_string(value, {{protocol_type::unknown, "unknown"}, {protocol_type::ip_v6_hop_by_hop_options, "ip_v6_hop_by_hop_options"}, {protocol_type::unspecified, "unspecified"}, {protocol_type::ip, "ip"}, {protocol_type::icmp, "icmp"}, {protocol_type::igmp, "igmp"}, {protocol_type::ggp, "ggp"}, {protocol_type::ip_v4, "ip_v4"}, {protocol_type::tcp, "tcp"}, {protocol_type::pup, "pup"}, {protocol_type::udp, "udp"}, {protocol_type::idp, "idp"}, {protocol_type::ip_v6, "ip_v6"}, {protocol_type::ip_v6_routing_header, "ip_v6_routing_header"}, {protocol_type::ip_v6_fragment_header, "ip_v6_fragment_header"}, {protocol_type::ip_sec_encapsulating_security_payload, "ip_sec_encapsulating_security_payload"}, {protocol_type::ip_sec_authentication_header, "ip_sec_authentication_header"}, {protocol_type::icmp_v6, "icmp_v6"}, {protocol_type::ip_v6_no_next_header, "ip_v6_no_next_header"}, {protocol_type::ip_v6_destination_options, "ip_v6_destination_options"}, {protocol_type::nd, "nd"}, {protocol_type::raw, "raw"}, {protocol_type::ipx, "ipx"}, {protocol_type::spx, "spx"}, {protocol_type::spx_2, "spx_2"}});}
79 inline std::wostream& operator<<(std::wostream& os, protocol_type value) {return os << to_string(value, {{protocol_type::unknown, L"unknown"}, {protocol_type::ip_v6_hop_by_hop_options, L"ip_v6_hop_by_hop_options"}, {protocol_type::unspecified, L"unspecified"}, {protocol_type::ip, L"ip"}, {protocol_type::icmp, L"icmp"}, {protocol_type::igmp, L"igmp"}, {protocol_type::ggp, L"ggp"}, {protocol_type::ip_v4, L"ip_v4"}, {protocol_type::tcp, L"tcp"}, {protocol_type::pup, L"pup"}, {protocol_type::udp, L"udp"}, {protocol_type::idp, L"idp"}, {protocol_type::ip_v6, L"ip_v6"}, {protocol_type::ip_v6_routing_header, L"ip_v6_routing_header"}, {protocol_type::ip_v6_fragment_header, L"ip_v6_fragment_header"}, {protocol_type::ip_sec_encapsulating_security_payload, L"ip_sec_encapsulating_security_payload"}, {protocol_type::ip_sec_authentication_header, L"ip_sec_authentication_header"}, {protocol_type::icmp_v6, L"icmp_v6"}, {protocol_type::ip_v6_no_next_header, L"ip_v6_no_next_header"}, {protocol_type::ip_v6_destination_options, L"ip_v6_destination_options"}, {protocol_type::nd, L"nd"}, {protocol_type::raw, L"raw"}, {protocol_type::ipx, L"ipx"}, {protocol_type::spx, L"spx"}, {protocol_type::spx_2, L"spx_2"}});}
81 }
82 }
83}
protocol_type
Specifies the protocols that the xtd::net::sockets::socket class supports.
Definition: protocol_type.h:24
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
@ pup
Address for PUP protocols.
@ unknown
Unknown address family.
@ unspecified
Unspecified address family.
@ icmp
Internet Control Message Protocol.
@ ip_sec_encapsulating_security_payload
IPv6 Encapsulating Security Payload header.
@ ip_v6
Internet Protocol version 6 (IPv6).
@ ip_v6_routing_header
IPv6 Routing header.
@ ipx
Internet Packet Exchange Protocol.
@ ip_v6_fragment_header
IPv6 Fragment header.
@ icmp_v6
Internet Control Message Protocol for IPv6.
@ pup
PARC Universal Packet Protocol.
@ idp
Internet Datagram Protocol.
@ spx
Sequenced Packet Exchange protocol.
@ ip_v4
Internet Protocol version 4.
@ udp
User Datagram Protocol.
@ ip_v6_hop_by_hop_options
IPv6 Hop by Hop Options header.
@ ggp
Gateway To Gateway Protocol.
@ spx_2
Sequenced Packet Exchange version 2 protocol.
@ nd
Net Disk Protocol (unofficial).
@ unknown
Specifies an unknown protocol.
@ ip_v6_destination_options
IPv6 Destination Options header.
@ igmp
Internet Group Management Protocol.
@ raw
Raw IP packet protocol.
@ unspecified
Unspecified Protocol.
@ tcp
Transmission Control Protocol.
@ ip_sec_authentication_header
IPv6 Authentication header. For details, see RFC 2292 section 2.2.1, available at http://www....
@ ip_v6_no_next_header
IPv6 No next header.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17