ú΀cty      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ÀÁNone ôI think that this function can be improved. Right now, it always allocates enough space for a fifteen-character text rendering of an IP address. I think that it should be possible to do more of the math upfront and allocate less space.^This does not do an endOfInput check because it is reused in the range parser implementation.„This is sort of a misnomer. It takes Word32 to make dotDecimalParser probably perform better. This is mostly for internal use.CAt some point, it would be worth revisiting the decision to use  here. Using ÃA would probably give better performance on a 64-bit processor.dAll the words given as argument should be range restricted from 0 to 255. This is not checked.¯Given the size of the mask, return the total number of ips in the subnet. This only works for IPv4 addresses because an IPv6 subnet can have up to 2^128 addresses.6  !"#$%&'()*+,-./0123456  !"#$%&'()*+,-./0123456  !"$#&)+(%*,'-./0123456  !"#$%&'()*+,-./012345None -5<=DIRT;ASCII value of the separator=A 48-bit MAC address.AéThe length should be between 0 and 32. These bounds are inclusive. This expectation is not in any way enforced by this library because it does not cause errors. A mask length greater than 32 will be treated as if it were 32.E A 32-bit L address or a 128-bit H8 address. Internally, this is just represented as an H' address. The functions provided in Net.IP& help simulate pattern matching on it.H.A 128-bit Internet Protocol version 6 address.L-A 32-bit Internet Protocol version 4 address.86789:;<=>?@ABCDEFGHIJKLMNÄÅÆÇÈÉÊËOPQÌÍRSTÎÏUVWÐÑXYZ[\]^_6789:;<=>?@ABCDEFGHIJKLMNLMNHIJKEFGABCD=>?@9:;<678 6789:;<=>?@ABCDEFGHIJKLMNÊËOPQÌÄÍÅRSTÎÆÏÇUVWÐÈÑÉXYZ[\]^_None5I‚ƒ‚ƒ‚ƒ‚ƒNone „…†‡ˆ‰Š‹ŒÒÓ „…†‡ˆ‰Š‹Œ „Œ‡ˆ†…‰Š‹ „…†‡ˆ‰Š‹ŒÒÓNone>This is a mediocre implementation that should be rewritten.Ž>This is a mediocre implementation that should be rewritten.!Make a bytestring builder from a =+ address using a colon as the separator. Parser for a =6 address using with a colon as the separator (i.e. FA:43:B2:C0:0F:99).‘ Parser for a =+ address using to the provided settings.Ž‘ÔÕÖŽ‘ޑޑÔÕÖNone×ÿThis is an internal data type used as the result after parsing an ipv6 address. The first field indicates the index at which a double colon occurs. The second is the length of the third. The third is a reversed list of the 16s that comprise the ipv6 address.ØÙÚÛ×ÜÝÞß’àáâã’’ØÙÚÛ×ÜÝÞß’àáâãNone•–—•–—•–—•–—None(This exists mostly for testing purposes.˜™š›œä˜™š›œ˜š™›œ˜™š›œä Nonež Create an L~ address from four octets. The first argument is the most significant octet. The last argument is the least significant. Since the å and æ instances for LN are not generally usefully, this function is the recommened way to create L addresses. For example:fromOctets 192 168 1 1IPv4 {getIPv4 = 3232235777}Ÿ Convert an L address into a quadruple of octets. The first element in the quadruple is the most significant octet. The last element is the least significant octet. &The IP address representing any host: 0.0.0.0¡The loopback IP address:  127.0.0.1¢The broadcast IP address: 255.255.255.255£Checks to see if the LY address belongs to a private network. The three private networks that are checked are  10.0.0.0/8,  172.16.0.0/12, and 192.168.0.0/16.¤Checks to see if the LW address belongs to a reserved network. This includes the three private networks that £S checks along with several other ranges that are not used on the public Internet.¥Checks to see if the L address is publicly routable.public x == not (reserved x)žŸ ¡¢£¤¥žŸ ¡¢£¤¥žŸ ¡¢£¤¥žŸ ¡¢£¤¥ None ¦Checks to see if an L address belongs in the A.let ip = fromOctets 10 10 1 92/contains (IPv4Range (fromOctets 10 0 0 0) 8) ipTrue1contains (IPv4Range (fromOctets 10 11 0 0) 16) ipFalseÿ/Typically, element-testing functions are written to take the element as the first argument and the set as the second argument. This is intentionally written the other way for better performance when iterating over a collection. For example, you might test elements in a list for membership like this:,let r = IPv4Range (fromOctets 10 10 10 6) 31JmapM_ (print . contains r) (take 5 $ iterate succ $ fromOctets 10 10 10 5)FalseTrueTrueFalseFalseThe implementation of ¦— ensures that (with GHC), the bitmask creation and range normalization only occur once in the above example. They are reused as the list is iterated.§5This is provided to mirror the interface provided by Data.Set. It behaves just like ¦ but with flipped arguments.member ip r == contains r ip¨ The inclusive lower bound of an A\. This is conventionally understood to be the broadcast address of a subnet. For example:@I.print $ lowerInclusive $ IPv4Range (fromOctets 10 10 1 160) 25 10.10.1.128*Note that the lower bound of a normalized A( is simply the ip address of the range:/lowerInclusive r == ipv4RangeBase (normalize r)ª Convert an A into a list of the L¤ addresses that are in it. >>> let r = IPv4Range (fromOctets 192 168 1 8) 30 >>> mapM_ I.print (toList r) 192.168.1.8 192.168.1.9 192.168.1.10 192.168.1.11¬'The RFC1918 24-bit block. Subnet mask:  10.0.0.0/8­'The RFC1918 20-bit block. Subnet mask:  172.16.0.0/12®'The RFC1918 16-bit block. Subnet mask: 192.168.0.0/16¯ Normalize an A(. The first result of this is that the L inside the AH is changed so that the insignificant bits are zeroed out. For example:<prRange $ normalize $ IPv4Range (fromOctets 192 168 1 19) 24192.168.1.0/24=prRange $ normalize $ IPv4Range (fromOctets 192 168 1 163) 28192.168.1.160/28`The second effect of this is that the mask length is lowered to be 32 or smaller. Working with A±s that have not been normalized does not cause any issues for this library, although other applications may reject such ranges (especially those with a mask length above 32). Note that ¯ is idempotent, that is:(normalize r == (normalize . normalize) r°-This only exists for doctests. Do not use it. ¦§¨©ª«¬­®¯° ¦§¨©ª«¬­®¯° ¯¦§¨©ª«¬­®° ¦§¨©ª«¬­®¯° None·(This exists mostly for testing purposes.±²³´µ¶·±²³´µ¶·±³²´µ¶·±²³´µ¶· None¸'This should be rewritten to not create Text as an intermediate step.¹This should also be rewritten¸çè鹺»¸¹º»¸¹º»¸çè鹺» None¼½¾¼½¾¼½¾¼½¾NoneÀIf the address is an L address, return the address.ÁIf the address is an HN address, and if it is not an IPv4-mapped IPv6 address, return the address.¿ÀÁ¿ÀÁ¿ÀÁ¿ÀÁê !"#$%&'()*+,-./0123456789:;<=>?@ABCDEEFGGHIJJKLMMNOPPQRRSTUUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”Œ‘’“’•–Š—˜ŒŽ‘’™ Š š › œ ž Ÿ   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « Œ Ž ‘ ¬ ’ ™ Œ ‘ ’ Œ Ž­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÄÈÉÊËÌÈÍÎÏÐÑÒÓ½°ÔÕ°Ö× Ø A BÙip-0.8.7-IDh23YgdxRFETnt46k1vfS Net.Internal Net.TypesNet.Mac Net.Mac.TextNet.Mac.ByteString.Char8 Net.IPv6.TextNet.IPv6Net.IPv4.Range.TextNet.IPv4Net.IPv4.Range Net.IPv4.TextNet.IPv4.ByteString.Char8Net.IPv4.StringNet.IPeitherToAesonParserattoparsecParseJSON stripDecimaldecodeIPv4TextReaderdecodeIPv4TextEitheripOctetSizeErrorMsg rightToMaybetoDotDecimalTexttoDotDecimalBuilderrangeToDotDecimalTextrangeToDotDecimalBuildertoTextPreAllocated putAndCountputMacmacToTextPreAllocatedzeroi2wfromDotDecimalText'fromDotDecimalTextrangeFromDotDecimalText'rangeFromDotDecimalTextdotDecimalRangeParserdotDecimalParser fromOctets' fromOctetsV6 fromWord16sV6fromWord16Word64fromOctetsWord64 countAddrswordSuccessorswordSuccessorsMmaskp24p20p16mask4mask8mask10mask12mask15mask16mask20mask24mask28mask32 macTextParser macToTextmacToTextBuilder macFromText macFromText' twoDigits threeDigits twoHexDigitstwoHexDigitsLower MacDecodingmacDecodingSeparator MacEncodingmacEncodingSeparatormacEncodingUpperCaseMacmacAmacB IPv4Range ipv4RangeBaseipv4RangeLengthIPgetIPIPv6ipv6Aipv6BIPv4getIPv4$fVectorVectorMac$fMVectorMVectorMac $fUnboxMac$fVectorVectorIPv4Range$fMVectorMVectorIPv4Range$fUnboxIPv4Range$fVectorVectorIPv4$fMVectorMVectorIPv4 $fUnboxIPv4$fFromJSONIPv4Range$fToJSONIPv4Range$fFromJSONIPv4 $fToJSONIPv4$fHashableIPv4Range $fFromJSONMac $fToJSONMac $fHashableMac$fEqIPv4 $fOrdIPv4 $fShowIPv4 $fReadIPv4 $fEnumIPv4 $fBoundedIPv4$fHashableIPv4 $fGenericIPv4 $fPrimIPv4 $fBitsIPv4$fFiniteBitsIPv4$fEqIPv6 $fOrdIPv6 $fShowIPv6 $fReadIPv6$fEqIP$fOrdIP$fShowIP$fReadIP $fEqIPv4Range$fOrdIPv4Range$fShowIPv4Range$fReadIPv4Range$fGenericIPv4Range$fEqMac$fOrdMac $fShowMac $fReadMac $fGenericMac$fEqMacEncoding$fOrdMacEncoding$fShowMacEncoding$fReadMacEncoding$fGenericMacEncoding fromOctetsfromOctetsNoCastencodedecodeEitherWith decodeEitherdecode decodeWithbuilderparser parserWith encodeWith$fShowS$fReadS fromWord16s toWord16sprinttoOctetsanyloopback broadcastprivatereservedpubliccontainsmemberlowerInclusiveupperInclusivetoList toGenerator private24 private20 private16 normalizeprRangereadercase_ipv4ipv6baseGHC.WordWord32ghc-prim GHC.TypesWordV_MacMV_Mac V_IPv4Range MV_IPv4RangeV_IPv4MV_IPv4macFromOctets' mkIPv4RangeD:R:VectorMac0D:R:MVectorsMac0D:R:VectorIPv4Range0D:R:MVectorsIPv4Range0D:R:VectorIPv40D:R:MVectorsIPv40 defDecodingw8ToChar parseTwoHex parseWord8HexSResResWordResColonResDone sDoubleColonsTotal sRevWordstoIPv6times16 alreadySet restrictTo16GHC.ShowShowGHC.ReadReadtoBSPreAllocated