4#include "Stroika/Foundation/StroikaPreComp.h"
7#include "Stroika/Foundation/IO/Network/HTTP/Headers.h"
14using namespace Stroika::Foundation::IO::Network::InternetProtocol;
17 String mkMessage_ (
unsigned short code)
22 return "ICMP Destination Unreachable: Network unreachable error."sv;
24 return "ICMP Destination Unreachable: Host unreachable error."sv;
26 return "ICMP Destination Unreachable: Protocol unreachable error (the designated transport protocol is not supported)."sv;
28 return "ICMP Destination Unreachable: Destination port unreachable."sv;
30 return "ICMP Destination Unreachable: Fragmentation required, and DF flag set."sv;
32 return "ICMP Destination Unreachable: Source route failed."sv;
34 return "ICMP Destination Unreachable: Destination network unknown."sv;
36 return "ICMP Destination Unreachable: Destination host unknown."sv;
38 return "ICMP Destination Unreachable: Source host isolated."sv;
40 return "ICMP Destination Unreachable: Network administratively prohibited."sv;
42 return "ICMP Destination Unreachable: Host administratively prohibited."sv;
44 return "ICMP Destination Unreachable: Network unreachable for ToS."sv;
46 return "ICMP Destination Unreachable: Host unreachable for ToS."sv;
48 return "ICMP Destination Unreachable: Communication administratively prohibited."sv;
50 return "ICMP Destination Unreachable: Host Precedence Violation."sv;
52 return "ICMP Destination Unreachable: Precedence cutoff in effect."sv;
54 return "ICMP Destination Unreachable: code {}."_f(code);
64InternetProtocol::ICMP::V4::DestinationUnreachableException::DestinationUnreachableException (uint8_t code,
const InternetAddress& unreachedIP)
65 : inherited{mkMessage_ (code)}
67 , fUnreachedIP_{unreachedIP}
76InternetProtocol::ICMP::V4::UnknownICMPPacket::UnknownICMPPacket (ICMP_PacketTypes type)
77 : inherited{
"ICMP Unknown packet type: {}."_f(type)}
87InternetProtocol::ICMP::V4::TTLExpiredException::TTLExpiredException (
const InternetAddress& unreachedIP)
88 : inherited{
"ICMP TTL Expired."sv}
89 , fUnreachedIP_{unreachedIP}
String is like std::u32string, except it is much easier to use, often much more space efficient,...