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 {
30 enum class protocol_type {
32 unknown = -1,
36 unspecified = 0,
38 ip = 0,
40 icmp = 1,
42 igmp = 2,
44 ggp = 3,
46 ip_v4 = 4,
48 tcp = 6,
50 pup = 12,
52 udp = 17,
54 idp = 22,
56 ip_v6 = 41,
66 icmp_v6 = 58,
72 nd = 77,
74 raw = 255,
76 ipx = 1000,
78 spx = 1256,
80 spx_2 = 1257,
81 };
82 }
83 }
84}
85
88 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"}};}
89};
protocol_type
Specifies the protocols that the xtd::net::sockets::socket class supports.
Definition protocol_type.h:30
std::vector< xtd::collections::generic::key_value_pair< enum_t, xtd::string > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition enum_collection.h:22
@ 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:38