+
    4i               
          R t ^ RIt^ RIt^ RIHt ]P                  R9   d
   ^ RI	H
tHt M^ RIH
tHt ^ RIHtHtHtHt ^ RIHtHtHtHtHtHtHt  ^ t!^t"Rt#Rt$]t%Rt&^t'^
t(^]!,          ^,
          t)]!]",          t*^]",          ^,
          t+],! ]-! ^ ]!^,           4       U u. uF"  q ])^]!V ,
          ,          ^,
          ,          3NK$  	  up 4      t.],! ]-! ^ ]!^,           4       U u. uF#  p ])^]!V ,
          ,          ^,
          ,          V 3NK%  	  up 4      t/],! ]-! ^ ]!^,           4       U u. uF  q ^]!V ,
          ,          ^,
          3NK  	  up 4      t0],! ]-! ^ ]!^,           4       U u. uF  p ^]!V ,
          ,          ^,
          V 3NK  	  up 4      t1RR	 lt2RR
 lt3RR lt4R t5R t6R t7R tR t8R t9R tR tRR ltR tR tR tR t:R# u up i u up i u up i u up i )zIPv4 address logic.N)	inet_aton)	inet_ptonAF_INET)AddrFormatErrorZEROFILL	INET_ATON	INET_PTON)valid_words
valid_bitsbits_to_intint_to_bits	valid_bin
int_to_bin
bin_to_int%d.IPv4c                    \        V \        4      '       g   \        R\        V 4      ,          4      h \	        W4       R#   \
         d     R# i ; i)a<  
:param addr: An IPv4 address in presentation (string) format.

:param flags: decides which rules are applied to the interpretation of the
    addr value. Supported constants are INET_PTON and ZEROFILL. See the
    :class:`IPAddress` documentation for details.

.. versionchanged:: 0.10.1
    ``flags`` is scheduled to default to :data:`INET_PTON` instead of :data:`INET_ATON`
    in the future.

:return: ``True`` if IPv4 address is valid, ``False`` otherwise.

.. versionchanged:: 1.0.0
    Returns ``False`` instead of raising :exc:`AddrFormatError` for empty strings.
zInvalid type: %sFT)
isinstancestr	TypeErrortype
str_to_intr   )addrflagss   &&7/usr/lib/python3/dist-packages/netaddr/strategy/ipv4.py	valid_strr   Q   sL    " dC  *T$Z7884   s   A   AAc           	        \        V : R24      pRV 9   d   VhV\        ,          ;'       g    V\        ,          '       * pV\        ,          '       dB   RP	                  V P                  R4       Uu. uF  pR\        V4      ,          NK  	  up4      p MbV'       d[   \        ;QJ d+    R V P                  R4       4       F  '       g   K   RM 	  RM! R V P                  R4       4       4      '       d   Vh V'       d   \        \        V 4      pM\        V 4      p \        P                  ! RV4      ^ ,          # u upi   \         d    Thi ; i)	aG  
:param addr: An IPv4 dotted decimal address in string form.

:param flags: decides which rules are applied to the interpretation of the
    addr value. Supported constants are INET_PTON and ZEROFILL. See the
    :class:`IPAddress` documentation for details.

:return: The equivalent unsigned integer for a given IPv4 address.
z$ is not a valid IPv4 address string!:r   r   c              3   p   "   T F,  p\        V4      ^8  ;'       d    VP                  R4      x  K.  	  R# 5i)   0N)len
startswith).0ps   & r   	<genexpr>str_to_int.<locals>.<genexpr>{   s,     U_3q6A:;;!,,s*;;_s   66TF>I)r   r   r   r   joinsplitintany
_inet_ptonr   
_inet_atonOSError_structunpack)r   r   error	pton_modeipackeds   &&    r   r   r   k   s     NOE
d{	!::):%:Ixxx

3@1A@A	ssUTZZPS_UsssUTZZPS_UUU.F%F >>$'** A  s   1D:7D? ?D? D? ?Ec                    ^ T u;8:  d   \         8:  d;   M M7RV ^,	          V ^,	          ^,          V ^,	          ^,          V ^,          3,          # \        V : R24      h)z
:param int_val: An unsigned integer.

:param dialect: (unused) Any value passed in is ignored.

:return: The IPv4 presentation (string) format address equivalent to the
    unsigned integer provided.
z%d.%d.%d.%dz( is not a valid 32-bit unsigned integer!max_int
ValueError)int_valdialects   &&r   
int_to_strr<      sY     	GwrM]d"\T!dN	 
 
 	
 RSS    c                    \        V 4       Uu. uF  pRV,          NK  	  ppVP                  4        VP                  . RO4       RP                  V4      # u upi )z
:param int_val: An unsigned integer.

:return: The reverse DNS lookup for an IPv4 address in network byte
    order integer form.
r   r   )zin-addrarpa )int_to_wordsreverseextendr)   )r:   r4   wordss   &  r   int_to_arparE      sN      ,G454!TAXX4E5	MMO	LL()88E? 6s   Ac                0    \         P                  ! RV 4      # )z
:param int_val: the integer to be packed.

:return: a packed string that is equivalent to value represented by an
unsigned integer.
r(   )r0   packr:   s   &r   int_to_packedrI      s     <<g&&r=   c                >    \         P                  ! RV 4      ^ ,          # )z
:param packed_int: a packed string containing an unsigned integer.
    It is assumed that string is packed in network byte order.

:return: An unsigned integer equivalent to value of network address
    represented by packed binary string.
r(   )r0   r1   )
packed_ints   &r   packed_to_intrL      s     >>$
+A..r=   c                 ,    \        V \        \        4      # N)_valid_words	word_size	num_wordsrD   s   &r   r	   r	      s    y)44r=   c                    ^ T u;8:  d   \         8:  g   M \        V : R24      hV ^,	          V ^,	          ^,          V ^,	          ^,          V ^,          3# )z
:param int_val: An unsigned integer.

:return: An integer word (octet) sequence that is equivalent to value
    represented by an unsigned integer.
z< is not a valid integer value supported bythis address type!r7   rH   s   &r   rA   rA      sP     "7"SZ\
 	
 rMGrMT1GqLD3H'TX.YYr=   c                    \        V 4      '       g   \        V : R24      h\        P                  ! R\        P                  ! R.V O5!  4      ^ ,          # )z
:param words: A list or tuple containing integer octets.

:return: An unsigned integer that is equivalent to value represented
    by word (octet) sequence.
z/ is not a valid octet list for an IPv4 address!r(   4B)r	   r9   r0   r1   rG   rR   s   &r   words_to_intrV      sB     uPUWXX>>$T :E :;A>>r=   c                 ,    \        V \        \        4      # rN   )_valid_bitswidthword_sepbitss   &r   r
   r
      s    tUH--r=   c                 ,    \        V \        \        4      # rN   )_bits_to_intrY   rZ   r[   s   &r   r   r      s    eX..r=   c                 X    Vf   \        4       R,          p\        V \        \        V4      # )NrZ   )globals_int_to_bitsrP   rQ   )r:   rZ   s   &&r   r   r      s%    9Z(Ix@@r=   c                 "    \        V \        4      # rN   )
_valid_binrY   bin_vals   &r   r   r      s    gu%%r=   c                 "    \        V \        4      # rN   )_int_to_binrY   rH   s   &r   r   r          w&&r=   c                 "    \        V \        4      # rN   )_bin_to_intrY   rd   s   &r   r   r      rh   r=   c                
   . p\        RV ,          4      p\        V \        4      '       d   RV 9   d   Vh RV 9   d2   V P                  R4       Uu. uF  pR\	        V4      ,          NK  	  ppMR\	        V 4      ,          .p ^\        V4      u;8:  d   ^8:  d9   M Vh\        ^\        V4      ,
          4       F  pVP                  R4       K  	  MVhV'       g   VhR\        V4      ,          # u upi   \
         d    Thi ; i)z
Expands a partial IPv4 address into a full 4-octet version.

:param addr: an partial or abbreviated IPv4 address

:return: an expanded IP address in presentation format (x.x.x.x)

>>> expand_partial_address('1.2')
'1.2.0.0'

.. versionadded:: 1.1.0
z!invalid partial IPv4 address: %r!r   r   r   r!   z%s.%s.%s.%s)
r   r   r   r*   r+   r9   r"   rangeappendtuple)r   tokensr2   or4   s   &    r   expand_partial_addressrq      s     F?$FGE$$;K	d{15CAA$Q--AT*+ F q  K 1s6{?+c" , K5=(( B  	K	s#   C4 C/*C4 -C4 /C4 4D)win32cygwin)    rN   );__doc__sys_sysstructr0   socketr   r.   platformnetaddr.fbsocketr   r-   r   netaddr.corer   r   r   r   netaddr.strategyr	   rO   r
   rX   r   r^   r   ra   r   rc   r   rg   r   rj   rY   rP   word_fmtrZ   familyfamily_nameversion	word_baser8   rQ   max_worddictrl   prefix_to_netmasknetmask_to_prefixprefix_to_hostmaskhostmask_to_prefixr   r   r<   rE   rI   rL   rA   rV   rq   )r4   s   0r   <module>r      s      * =='' BA 8 H H   	 	   
   	 U(Q, Y	 i<! qRWZ[R[I\]I\Aguqy)9A)=>?I\]^  qRWZ[R[I\]I\A7aEAI&6&:;Q?I\]^  aQR@ST@S1eai 01 46@STU  aQR@ST@S1Q519-1A6@STU 4+:T(
'/5Z	?./A&''')c ^ ^ U Us   (G!)G	%!G!"G