+
    4i^                      @    R t ^ RIHtHt ^t^
tR tR t	R t
R tR tR# )z=Fallback routines for Python's standard library socket module)unpackpackc                    \        V \        4      '       g   \        R\        V 4      ,          4      h\	        V 4      ^8w  d   \        R4      hR\        RV 4      ,          # )zJ
Convert an IP address from 32-bit packed binary format to string format.
zstring type expected, not %s*invalid length of packed IP address stringz%d.%d.%d.%d4B)
isinstancestr	TypeErrortypelen
ValueError_unpack)	packed_ips   &2/usr/lib/python3/dist-packages/netaddr/fbsocket.py	inet_ntoar      sP     i%%6iHII
9~EFF74333    c                 V   . p. pR p^ p\        V 4       FJ  w  rVVR8X  d   Vf   TpV^,          pMV^8  d   VP                  WC34       R p^ pVP                  V4       KL  	  V^8  d   VP                  WC34       \        V4      ^ 8w  d   VP                  R R7       V^ ,          pV F  pV^ ,          V^ ,          8  g   K  TpK  	  Vw  rV^ V
 R.,           WV	,           R  ,           pV^ ,          R8X  d   VP	                  ^ R4       VR,          R8X  d   VP                  R4       V# )N0c                     V ^,          # )    )xs   &r   <lambda>&_compact_ipv6_tokens.<locals>.<lambda>8   s    QqTr   )key )	enumerateappendr   sortinsert)tokens
new_tokens	positionsstart_index
num_tokensidxtokenbest_positionpositionlength	start_idxs   &          r   _compact_ipv6_tokensr,      s>   JIKJ  '
C<"!!OJA~  *!:;KJ%  ( A~*23 9~>*!!!H{]1-- ( " ,),t3jVASAU6VV
 a=Ba$b>Rb!r   c           
        V \         8X  d   \        V4      # V \        8X  Ed   \        V4      ^8w  g   \	        V\
        4      '       g   \        R4      h\        RV4       Uu. uF  pRV,          NK  	  pp\        \        RV4      4      p^ p\        \        V4      4       F  w  r&TpV^V,          ,          pWW,          pK!  	  RTu;8  d   R8:  g   M V^ ,	          R8X  dC   \        R.VR
R  Uu. uF  p\        V^4      NK  	  upO5!  p\        V4      p	V^ R
 V	.,           pRP                  \        V4      4      # \        R	V ,          4      hu upi u upi )zBConvert an packed IP address of the given family to string format.r   z>8H%x  l    z>2HN:zunknown address family %d)AF_INETr   AF_INET6r   r   bytesr   r   listr   reversed_packintjoinr,   )
afr   ir!   wordsint_valnumwordpacked_ipv4ipv4_strs
   &&        r   	inet_ntoprB   K   s9   	W}##	xy>Rz)U'C'CIJJ$+E9$=>$=q$(($=> WUI./0FAD26>DnG 1
 G)z)W]f-DJVBC[(I[Q[(IJK -HAb\XJ.Fxx,V4554r9::% ? )Js   "E1E
c                   \        V \        4      '       d   \        RV ,          4      pV P                  R4      p\	        V4      ^8X  d   . pV Fz  pVP                  R4      '       g(   VP                  R4      '       d   \	        V4      ^8  d   Vh \        V4      pT^,	          ^ 8w  d   ThTP                  \        RT4      4       K|  	  RP                  V4      # Vh\        R\        V 4       24      h  \         d    Thi ; i)z
Convert an IP address in string format (123.45.67.89) to the 32-bit packed
binary format used in low-level network functions. Differs from inet_aton
by only support decimal octets. Using octal or hexadecimal values will
raise a ValueError exception.
illegal IP address string %r.0xr   Br   (inet_pton() argument 2 must be str, not )r   r   OSErrorsplitr   
startswithr8   r   r   r7   r9   r	   r
   )	ip_stringinvalid_addrr!   r<   r'   octets   &     r   _inet_pton_af_inetrO   j   s     )S!!=	IJ% v;!E##D))e.>.>s.C.CE
UV&&'JE QJ1$&&U3./   88E?"
>tI>OP
QQ " '&&'s   C66Dc                   V \         8X  d   \        V4      # V \        8X  Ed   \        RV,          4      p. p\	        V\
        4      '       g   \        R\        V4       24      hRV9   d   VhRV9   Ed   VR8X  d   RP                  4       ^,          #  VP                  R4      w  rE. p. pTR8w  d   TP                  R4      pTR8w  d   TP                  R4      p\        T4      '       d   RTR,          9   dz   \        TP                  4       4      pTP                  R	\        R
TR,          4      ^ ,          ,          4       TP                  R	\        R
TR,          4      ^ ,          ,          4       \        T4      \        T4      ,           p	^ T	u;8:  d
   ^8:  g    Th Th^\        T4      \        T4      ,           ,
          p
T Uu. uF  p\        R
\!        T^4      4      NK  	  up\#        T
4       Uu. uF  pRP                  4       NK  	  up,           T Uu. uF  p\        R
\!        T^4      4      NK  	  up,           p Yg,            F$  p\!        T^4      p^ Tu;8:  d   R8:  d   K    Th Th	  EMlRV9   Edc   VP                  R4      pRV9   d   VRR pVRR . RO8w  d   VhVR,          P%                  4       R9  d   Vh\        V4      ^8w  d   Vh\        VP                  4       4      pVP                  R	\        R
VR,          4      ^ ,          ,          4       VP                  R	\        R
VR,          4      ^ ,          ,          4       V Uu. uF  p\        R
\!        V^4      4      NK  	  ppM\        V4      ^8w  d   Vh V Uu. uF  p\!        V^4      NK  	  ppV F  p^ Tu;8:  d   R8:  d   K   Vh Vh	  T Uu. uF  p\        R
T4      NK  	  ppMVhRP'                  T4      # \        RV ,          4      h  \         d    Thi ; iu upi u upi u upi   \         d    Thi ; iu upi u upi   \         d    Thi ; iu upi )zp
Convert an IP address from string format to a packed string suitable for
use with low-level network functions.
rD   rH   r   z:: r   r0   rE   r.   z>H:       N:rS      Nz  r/   Nr   zUnknown address family %dr   )r   r   r   r   r   )r   ffff)r2   rO   r3   rI   r   r   r	   r
   encoderJ   r   r   popr   r   r7   r8   rangelowerr9   )r:   rL   rM   valuesprefixsuffixl_prefixl_suffixrA   token_countgap_sizer;   r'   r?   r!   ipv6_prefixs   &&              r   	inet_ptonrb      s   
 
W}!),,	x=	IJ)S))FtIFWXYY)9D }}++#!*!6 HH|!<<,|!<<, 8}}!4-hlln=wtXc]'CA'F FGwtXc]'CA'F FGh-#h-7K,u,"" -""CMCM9:H 3;;(QtSBZ((;05h@1:$$&@A4<=Hq5s1bz*H=> 
#%00Eub>D..** /** 1 i"-)#"("+K"3B'+DD**"2,,.mC** 6{a'**1&**,?HMM$x})Ea)H"HIMM$x})Ea)H"HI?EFv!eD#a*5vFFF 6{a'**':@A&c%n&FA!' E3V3"..  4".. "( 399&Q%a.&9""xx4r9::]  #""#4 <@=  #""#. G B
 " '&&' :s`   P 	P7PP!#P& -P& P7Q P<%Q =Q 	QP&P4<Q QN)__doc__structr   r   r   r7   r2   r3   r   r,   rB   rO   rb   r   r   r   <module>re      s7    D 3 
4,^;>RDi;r   