network-types-icmp-1.0.1: Types for representing ICMP and ICMPv6 messages.
Copyright(c) 2021 Adam Flott
LicenseBSD-3-Clause
Maintaineradam@adamflott.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Types.ICMP

Description

Data types and conversions for ICMP automatically built from the specification at https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml

Specification date: 2020-09-25

Synopsis

Types

data ICMPType Source #

ICMP type.

Since: 1.0.0

Constructors

ICMPTypeUnknown 
ICMPType0EchoReply

Echo Reply

ICMPType3DestinationUnreachable

Destination Unreachable

ICMPType4SourceQuenchDeprecated

Source Quench (Deprecated)

ICMPType5Redirect

Redirect

ICMPType6AlternateHostAddressDeprecated

Alternate Host Address (Deprecated)

ICMPType8Echo

Echo

ICMPType9RouterAdvertisement

Router Advertisement

ICMPType10RouterSolicitation

Router Solicitation

ICMPType11TimeExceeded

Time Exceeded

ICMPType12ParameterProblem

Parameter Problem

ICMPType13Timestamp

Timestamp

ICMPType14TimestampReply

Timestamp Reply

ICMPType15InformationRequestDeprecated

Information Request (Deprecated)

ICMPType16InformationReplyDeprecated

Information Reply (Deprecated)

ICMPType17AddressMaskRequestDeprecated

Address Mask Request (Deprecated)

ICMPType18AddressMaskReplyDeprecated

Address Mask Reply (Deprecated)

ICMPType19ReservedForSecurity

Reserved (for Security)

ICMPType20ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType21ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType22ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType23ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType24ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType25ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType26ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType27ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType28ReservedForRobustnessExperiment

Reserved (for Robustness Experiment)

ICMPType30TracerouteDeprecated

Traceroute (Deprecated)

ICMPType31DatagramConversionErrorDeprecated

Datagram Conversion Error (Deprecated)

ICMPType32MobileHostRedirectDeprecated

Mobile Host Redirect (Deprecated)

ICMPType33Ipv6WhereareyouDeprecated

IPv6 Where-Are-You (Deprecated)

ICMPType34Ipv6IamhereDeprecated

IPv6 I-Am-Here (Deprecated)

ICMPType35MobileRegistrationRequestDeprecated

Mobile Registration Request (Deprecated)

ICMPType36MobileRegistrationReplyDeprecated

Mobile Registration Reply (Deprecated)

ICMPType37DomainNameRequestDeprecated

Domain Name Request (Deprecated)

ICMPType38DomainNameReplyDeprecated

Domain Name Reply (Deprecated)

ICMPType39SkipDeprecated

SKIP (Deprecated)

ICMPType40Photuris

Photuris

ICMPType41IcmpMessagesUtilizedByExperimentalMobilityProtocolsSuchAsSeamoby

ICMP messages utilized by experimental mobility protocols such as Seamoby

ICMPType42ExtendedEchoRequest

Extended Echo Request

ICMPType43ExtendedEchoReply

Extended Echo Reply

ICMPType253Rfc3692styleExperiment1

RFC3692-style Experiment 1

ICMPType254Rfc3692styleExperiment2

RFC3692-style Experiment 2

ICMPType255Reserved

Reserved

Instances

Instances details
Bounded ICMPType Source # 
Instance details

Defined in Network.Types.ICMP

Enum ICMPType Source # 
Instance details

Defined in Network.Types.ICMP

Eq ICMPType Source # 
Instance details

Defined in Network.Types.ICMP

Ord ICMPType Source # 
Instance details

Defined in Network.Types.ICMP

Show ICMPType Source # 
Instance details

Defined in Network.Types.ICMP

Generic ICMPType Source # 
Instance details

Defined in Network.Types.ICMP

Associated Types

type Rep ICMPType :: Type -> Type #

Methods

from :: ICMPType -> Rep ICMPType x #

to :: Rep ICMPType x -> ICMPType #

type Rep ICMPType Source # 
Instance details

Defined in Network.Types.ICMP

type Rep ICMPType = D1 ('MetaData "ICMPType" "Network.Types.ICMP" "network-types-icmp-1.0.1-6vKiKZ2SpT1FI4xZU1rOlJ" 'False) (((((C1 ('MetaCons "ICMPTypeUnknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType0EchoReply" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ICMPType3DestinationUnreachable" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType4SourceQuenchDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType5Redirect" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ICMPType6AlternateHostAddressDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType8Echo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType9RouterAdvertisement" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType10RouterSolicitation" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType11TimeExceeded" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType12ParameterProblem" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ICMPType13Timestamp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType14TimestampReply" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ICMPType15InformationRequestDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType16InformationReplyDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType17AddressMaskRequestDeprecated" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ICMPType18AddressMaskReplyDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType19ReservedForSecurity" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType20ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType21ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType22ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType23ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "ICMPType24ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType25ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ICMPType26ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType27ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType28ReservedForRobustnessExperiment" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ICMPType30TracerouteDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType31DatagramConversionErrorDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType32MobileHostRedirectDeprecated" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType33Ipv6WhereareyouDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType34Ipv6IamhereDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType35MobileRegistrationRequestDeprecated" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ICMPType36MobileRegistrationReplyDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType37DomainNameRequestDeprecated" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ICMPType38DomainNameReplyDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType39SkipDeprecated" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType40Photuris" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ICMPType41IcmpMessagesUtilizedByExperimentalMobilityProtocolsSuchAsSeamoby" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType42ExtendedEchoRequest" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType43ExtendedEchoReply" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType253Rfc3692styleExperiment1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType254Rfc3692styleExperiment2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType255Reserved" 'PrefixI 'False) (U1 :: Type -> Type)))))))

Codes

newtype ICMPCodeNum Source #

Wrap a numeric ICMP code.

Since: 1.0.0

Constructors

ICMPCodeNum Word8 

data ICMPCode Source #

ICMP code.

Since: 1.0.0

Constructors

ICMPCodeUnknown

Unknown code

ICMPType0Code0

Type 0 code 0 - No Code

ICMPType3Code0

Type 3 code 0 - Net Unreachable

ICMPType3Code1

Type 3 code 1 - Host Unreachable

ICMPType3Code2

Type 3 code 2 - Protocol Unreachable

ICMPType3Code3

Type 3 code 3 - Port Unreachable

ICMPType3Code4

Type 3 code 4 - Fragmentation Needed and Don't Fragment was Set

ICMPType3Code5

Type 3 code 5 - Source Route Failed

ICMPType3Code6

Type 3 code 6 - Destination Network Unknown

ICMPType3Code7

Type 3 code 7 - Destination Host Unknown

ICMPType3Code8

Type 3 code 8 - Source Host Isolated

ICMPType3Code9

Type 3 code 9 - Communication with Destination Network is Administratively Prohibited

ICMPType3Code10

Type 3 code 10 - Communication with Destination Host is Administratively Prohibited

ICMPType3Code11

Type 3 code 11 - Destination Network Unreachable for Type of Service

ICMPType3Code12

Type 3 code 12 - Destination Host Unreachable for Type of Service

ICMPType3Code13

Type 3 code 13 - Communication Administratively Prohibited

ICMPType3Code14

Type 3 code 14 - Host Precedence Violation

ICMPType3Code15

Type 3 code 15 - Precedence cutoff in effect

ICMPType4Code0

Type 4 code 0 - No Code

ICMPType5Code0

Type 5 code 0 - Redirect Datagram for the Network (or subnet)

ICMPType5Code1

Type 5 code 1 - Redirect Datagram for the Host

ICMPType5Code2

Type 5 code 2 - Redirect Datagram for the Type of Service and Network

ICMPType5Code3

Type 5 code 3 - Redirect Datagram for the Type of Service and Host

ICMPType6Code0

Type 6 code 0 - Alternate Address for Host

ICMPType8Code0

Type 8 code 0 - No Code

ICMPType9Code0

Type 9 code 0 - Normal router advertisement

ICMPType9Code16

Type 9 code 16 - Does not route common traffic

ICMPType10Code0

Type 10 code 0 - No Code

ICMPType11Code0

Type 11 code 0 - Time to Live exceeded in Transit

ICMPType11Code1

Type 11 code 1 - Fragment Reassembly Time Exceeded

ICMPType12Code0

Type 12 code 0 - Pointer indicates the error

ICMPType12Code1

Type 12 code 1 - Missing a Required Option

ICMPType12Code2

Type 12 code 2 - Bad Length

ICMPType13Code0

Type 13 code 0 - No Code

ICMPType14Code0

Type 14 code 0 - No Code

ICMPType15Code0

Type 15 code 0 - No Code

ICMPType16Code0

Type 16 code 0 - No Code

ICMPType17Code0

Type 17 code 0 - No Code

ICMPType18Code0

Type 18 code 0 - No Code

ICMPType40Code0

Type 40 code 0 - Bad SPI

ICMPType40Code1

Type 40 code 1 - Authentication Failed

ICMPType40Code2

Type 40 code 2 - Decompression Failed

ICMPType40Code3

Type 40 code 3 - Decryption Failed

ICMPType40Code4

Type 40 code 4 - Need Authentication

ICMPType40Code5

Type 40 code 5 - Need Authorization

ICMPType42Code0

Type 42 code 0 - No Error

ICMPType43Code0

Type 43 code 0 - No Error

ICMPType43Code1

Type 43 code 1 - Malformed Query

ICMPType43Code2

Type 43 code 2 - No Such Interface

ICMPType43Code3

Type 43 code 3 - No Such Table Entry

ICMPType43Code4

Type 43 code 4 - Multiple Interfaces Satisfy Query

Instances

Instances details
Bounded ICMPCode Source # 
Instance details

Defined in Network.Types.ICMP

Enum ICMPCode Source # 
Instance details

Defined in Network.Types.ICMP

Eq ICMPCode Source # 
Instance details

Defined in Network.Types.ICMP

Ord ICMPCode Source # 
Instance details

Defined in Network.Types.ICMP

Show ICMPCode Source # 
Instance details

Defined in Network.Types.ICMP

Generic ICMPCode Source # 
Instance details

Defined in Network.Types.ICMP

Associated Types

type Rep ICMPCode :: Type -> Type #

Methods

from :: ICMPCode -> Rep ICMPCode x #

to :: Rep ICMPCode x -> ICMPCode #

type Rep ICMPCode Source # 
Instance details

Defined in Network.Types.ICMP

type Rep ICMPCode = D1 ('MetaData "ICMPCode" "Network.Types.ICMP" "network-types-icmp-1.0.1-6vKiKZ2SpT1FI4xZU1rOlJ" 'False) (((((C1 ('MetaCons "ICMPCodeUnknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType0Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType3Code0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType3Code1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType3Code2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType3Code3" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ICMPType3Code4" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType3Code5" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType3Code6" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType3Code7" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType3Code8" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType3Code9" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ICMPType3Code10" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType3Code11" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType3Code12" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType3Code13" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType3Code14" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType3Code15" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ICMPType4Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType5Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType5Code1" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ICMPType5Code2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType5Code3" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ICMPType6Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType8Code0" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "ICMPType9Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType9Code16" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType10Code0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType11Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType11Code1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType12Code0" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ICMPType12Code1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType12Code2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType13Code0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ICMPType14Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType15Code0" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ICMPType16Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType17Code0" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "ICMPType18Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType40Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType40Code1" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "ICMPType40Code2" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType40Code3" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType40Code4" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "ICMPType40Code5" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ICMPType42Code0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType43Code0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ICMPType43Code1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType43Code2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ICMPType43Code3" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ICMPType43Code4" 'PrefixI 'False) (U1 :: Type -> Type)))))))

Codes from Type

icmpCodesForType :: ICMPType -> [ICMPCode] Source #

Get a list of ICMPCode for a given ICMPType.

Since: 1.0.0

Conversions

icmpTypeToStringNum :: IsString a => ICMPType -> a Source #

Convert a ICMPType into a string.

Since: 1.0.0

icmpTypeFromStringNum :: (Eq a, IsString a) => a -> ICMPType Source #

Convert a string into a ICMPType.

Since: 1.0.0

icmpTypeToNum :: ICMPType -> ICMPTypeNum Source #

Turn an ICMPType into a ICMPTypeNum.

Since: 1.0.0

icmpCodeToStringNum :: IsString a => ICMPCode -> a Source #

Convert a ICMPCode into a string.

Since: 1.0.1

Deprecated testing

isICMPTypeDeprecated :: ICMPType -> Bool Source #

Test if an ICMPType has been deprecated.

Since: 1.0.0