xtd 0.2.0
Loading...
Searching...
No Matches
protocol_type.h
Go to the documentation of this file.
1
4#pragma once
5#include "../../enum.h"
6
8#undef unix
10
12namespace 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
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};
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
protocol_type
Specifies the protocols that the xtd::net::sockets::socket class supports.
Definition protocol_type.h:28
@ 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.
@ 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 xtd_about_box.h:10
Provides the registration struct for enumerations.
Definition enum_register.h:36