xtd 0.2.0
protocol_type.h
Go to the documentation of this file.
1 #pragma once
5 #include "../../enum.h"
6 
8 #undef unix
9 
12 namespace xtd {
14  namespace net {
16  namespace sockets {
28  enum class protocol_type {
30  unknown = -1,
34  unspecified = 0,
36  ip = 0,
38  icmp = 1,
40  igmp = 2,
42  ggp = 3,
44  ip_v4 = 4,
46  tcp = 6,
48  pup = 12,
50  udp = 17,
52  idp = 22,
54  ip_v6 = 41,
64  icmp_v6 = 58,
70  nd = 77,
72  raw = 255,
74  ipx = 1000,
76  spx = 1256,
78  spx_2 = 1257,
79  };
80  }
81  }
82 }
83 
85 template<> struct xtd::enum_register<xtd::net::sockets::protocol_type> {
86  explicit operator auto() const noexcept {return xtd::enum_collection<xtd::net::sockets::protocol_type> {{xtd::net::sockets::protocol_type::unknown, "unknown"}, {xtd::net::sockets::protocol_type::ip, "ip"}, {xtd::net::sockets::protocol_type::icmp, "icmp"}, {xtd::net::sockets::protocol_type::igmp, "igmp"}, {xtd::net::sockets::protocol_type::ggp, "ggp"}, {xtd::net::sockets::protocol_type::ip_v4, "ip_v4"}, {xtd::net::sockets::protocol_type::tcp, "tcp"}, {xtd::net::sockets::protocol_type::pup, "pup"}, {xtd::net::sockets::protocol_type::udp, "udp"}, {xtd::net::sockets::protocol_type::idp, "idp"}, {xtd::net::sockets::protocol_type::ip_v6, "ip_v6"}, {xtd::net::sockets::protocol_type::ip_v6_routing_header, "ip_v6_routing_header"}, {xtd::net::sockets::protocol_type::ip_v6_fragment_header, "ip_v6_fragment_header"}, {xtd::net::sockets::protocol_type::ip_sec_encapsulating_security_payload, "ip_sec_encapsulating_security_payload"}, {xtd::net::sockets::protocol_type::ip_sec_authentication_header, "ip_sec_authentication_header"}, {xtd::net::sockets::protocol_type::icmp_v6, "icmp_v6"}, {xtd::net::sockets::protocol_type::ip_v6_no_next_header, "ip_v6_no_next_header"}, {xtd::net::sockets::protocol_type::ip_v6_destination_options, "ip_v6_destination_options"}, {xtd::net::sockets::protocol_type::nd, "nd"}, {xtd::net::sockets::protocol_type::raw, "raw"}, {xtd::net::sockets::protocol_type::ipx, "ipx"}, {xtd::net::sockets::protocol_type::spx, "spx"}, {xtd::net::sockets::protocol_type::spx_2, "spx_2"}};}
87 };
protocol_type
Specifies the protocols that the xtd::net::sockets::socket class supports.
Definition: protocol_type.h:28
Internet Datagram Protocol.
Internet Group Management Protocol.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Internet Control Message Protocol for IPv6.
Internet Protocol version 6 (IPv6).
std::vector< std::pair< enum_t, xtd::ustring > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition: enum_collection.h:19
Internet Protocol version 4.
Transmission Control Protocol.
Address for PUP protocols.
Internet Control Message Protocol.
IPv6 Authentication header. For details, see RFC 2292 section 2.2.1, available at http://www...
Sequenced Packet Exchange version 2 protocol.
Gateway To Gateway Protocol.
Net Disk Protocol (unofficial).
Sequenced Packet Exchange protocol.
Provides the registration struct for enumerations.
Definition: enum_register.h:36