+
    Dfj^<                        ^ RI Ht ^ RIHt ^ RIHtHt ^ RIHt ^ RI	H
t
 ]P                  ! ]P                  4       ! R R4      4       t ! R R	]
P                  4      tR
# )    )annotations)	interface)ipraw)
components)unittestc                  :    ] tR t^tR R ltR R ltR R ltRtR# )	
MyProtocolc                    V ^8  d   QhRRRR/# )   	expectingz(list[tuple[bytes, dict[str, str | int]]]returnNone )formats   ";/usr/lib/python3/dist-packages/twisted/pair/test/test_ip.py__annotate__MyProtocol.__annotate__   s     ) )"J )t )    c                	&    \        V4      V n        R # N)listr   )selfr   s   &&r   __init__MyProtocol.__init__   s    ir   c               T    V ^8  d   QhRRRRRRRRRRR	RR
RRRRRRRRRRRRRRRRR/# )r   databytespartialintsourcestrdestprotocolversionihltostot_lenfragment_idfragment_offsetdont_fragmentmore_fragmentsttlr   r   r   )r   s   "r   r   r      s     L LL L 	L
 L L L L L L L L L L L  
!Lr   c           	     	r   V P                   '       g   Q R 4       hV P                   P                  ^ 4      w  pp\        \        VP	                  4       4      4      p\        4       pV F8  pVV,          VV,          8X  d   K  Q RV RVV,          : RVV,          : 24       h	  W8X  g   Q RV: RV: 24       hR# )z(Got a packet when not expecting anymore.z	Expected =z, got N)r   popr   sortedkeyslocals)r   r   r   r!   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   
expectDataexpectKwexpectKwKeyslocalVariablesks   &&&&&&&&&&&&&&&     r   datagramReceivedMyProtocol.datagramReceived   s    " ~~~III~#~~11!4
HF8==?34A~a00J1#Qx{oVN14E3HIJ0  !KYznF4(#KK!r   c               $    V ^8  d   QhRRRRRR/# )r   numobjectprotor   r   r   )r   s   "r   r   r   .   s!      F 6 d r   c                	    R # r   r   )r   r<   r>   s   &&&r   addProtoMyProtocol.addProto.   s    r   )r   N)__name__
__module____qualname____firstlineno__r   r9   r@   __static_attributes__r   r   r   r
   r
      s    )L: r   r
   c                      ] tR t^3tR R ltR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltR R ltRtR# )IPTestsc                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   IPTests.__annotate__4   s     .
 .
4 .
r   c                	$   \         P                  ! 4       p\        R R^ RRRRR^R^R^R	^R
^RRRRR^ R^R^/3.4      pVP                  ^V4       VP	                  R^ RRRR7       VP
                  '       d   Q RVP
                  ,          4       hR#    foobarr   r#   1.2.3.4r!   5.6.7.8r$   r%   r&   r'   r(   r)     r*     r+   r,   r-   dummyr   r#   r!   r$   5Should not expect any more packets, but still want %rN   T ޭFEfoobarr   
IPProtocolr
   r@   r9   r   r   r>   p1s   &  r   testPacketParsingIPTests.testPacketParsing4   s     !1	 )"D!1rq!6%v)6'(!t
, 	tR 
  	 	
$ <<< 	
CbllR	
<r   c                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   rK   d   s     P
 P
T P
r   c                	   \         P                  ! 4       p\        R R^ RRRRR^R^R^R	^R
^RRRRR^ R^R^/3RR^RRRRR^R^R^R	^R
^RRRRR^ R^R^/3.4      pVP                  ^V4       VP	                  R^ RRRR7       VP	                  R^RRRR7       VP
                  '       d   Q RVP
                  ,          4       hR# )rN   r   r#   rO   r!   rP   r$   r%   r&   r'   r(   r)   rQ   r*   rR   r+   r,   r-      quux5.4.3.26.7.8.9rS   rT   rU   NrV      T ޭFE	quuxrW   rY   s   &  r   testMultiplePacketsIPTests.testMultiplePacketsd   sA    !1	 )"D!1rq!6%v)6'(!t& !1	 )"D!1rq!6%v)6'(!t'%'
P 	tR 
  	 	
" 	
  	 	
$ <<< 	
CbllR	
<r   c                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   rK      s     J
 J
 J
r   c                	   \         P                  ! 4       p\        R R^ RRRRR^R^R^R	^R
^RRRRR^ R^R^/3.4      p\        R R^ RRRRR^R^R^R	^R
^RRRRR^ R^R^/3.4      pVP                  ^V4       VP                  ^V4       VP	                  R^ RRRR7       VP
                  '       d   Q RVP
                  ,          4       hVP
                  '       d   Q RVP
                  ,          4       hR# rM   rW   r   r>   rZ   p2s   &   r   testMultipleSameProtosIPTests.testMultipleSameProtos   s[    !1	 )"D!1rq!6%v)6'(!t
.  !1	 )"D!1rq!6%v)6'(!t
. 	tR tR 
  	 	
$ <<< 	
CbllR	
 <<< 	
CbllR	
<r   c                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   rK     s     
 
t 
r   c                	    \         P                  ! 4       p\        . 4      pVP                  ^V4       VP	                  R^ RRRR7       R# )   rS   rT   NrV   )r   rX   r
   r@   r9   rY   s   &  r   testWrongProtoNotSeenIPTests.testWrongProtoNotSeen  sJ    ^q"
  	 	
r   c                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   rK     s     `
 `
d `
r   c                	   \         P                  ! 4       p\        R R^ RRRRR^R^R^R	^R
^RRRRR^ R^R^/3RR^RRRRR^R^R^R	^R
^RRRRR^ R^R^/3.4      pVP                  ^V4       \        RR^RRRRR^
R^R^R	^R
^RRRRR^ R^R^/3R R^ RRRRR^
R^R^R	^R
^RRRRR^ R^R^/3.4      pVP                  ^
V4       VP	                  R^RRRR7       VP	                  R^ RRRR7       VP	                  R^RRRR7       VP	                  R^ RRRR7       VP
                  '       d   Q RVP
                  ,          4       hVP
                  '       d   Q RVP
                  ,          4       hR# )rN   r   r#   rO   r!   rP   r$   r%   r&   r'   r(   r)   rQ   r*   rR   r+   r,   r-   r_   r`   ra   rS   rT   rU   Ns   T ޭ
FE	quuxrV   rb   s   T ޭ
FEfoobarrW   rg   s   &   r   testDemuxingIPTests.testDemuxing  su    !1	 )"D!1rq!6%v)6'(!t& !1	 )"D!1rq!6%v)6'(!t'%'
P 	tR  !1	 )"D!1rq!6%v)6'(!t& !1	 )"D!1rq!6%v)6'(!t'%'
P 	tR 
  	 	
" 	
  	 	
" 	
  	 	
" 	
  	 	
$ <<< 	
CbllR	
 <<< 	
CbllR	
<r   c                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   rK     s     W W Wr   c                    \         P                  ! 4       p VP                  ^*R4       \        R4      h  \        P
                   d     R# i ; i)z2Adding a wrong level protocol raises an exception.	silliness2addProto must raise an exception for bad protocolsN)r   rX   r@   AssertionErrorr   CannotAdaptr   es   & r   testAddingBadProtos_WrongLevel&IPTests.testAddingBadProtos_WrongLevel  sI    MMO	WJJr;' !!UVV %% 		s   4 AAc                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   rK     s     W Wd Wr   c                    \         P                  ! 4       p VP                  R\        . 4      4       \	        R4      h  \
         d   pTP                  R8X  d    Rp?R# h Rp?ii ; i)z=Adding a protocol with a negative number raises an exception.rw   N)z'Added protocol must be positive or zeror   rX   r@   r
   rx   	TypeErrorargsrz   s   & r   testAddingBadProtos_TooSmall$IPTests.testAddingBadProtos_TooSmall  sX    MMO	WJJr:b>* !!UVV  	vvEE		   = A%A A  A%c                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   rK     s     W WD Wr   c                    \         P                  ! 4       p VP                  R\        . 4      4       \	        R4      h  \
         d   pTP                  R8X  d    Rp?R# h Rp?ii ; i)<Adding a protocol with a number >=2**32 raises an exception.rw   Nl        z"Added protocol must fit in 32 bitsr   rz   s   & r   testAddingBadProtos_TooBig"IPTests.testAddingBadProtos_TooBig  sX    MMO	WJJujn- !!UVV  	vv@@		r   c                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   rK     s     W WT Wr   c                    \         P                  ! 4       p VP                  R\        . 4      4       \	        R4      h  \
         d   pTP                  R8X  d    Rp?R# h Rp?ii ; i)r   rw   Nl       r   r   rz   s   & r   testAddingBadProtos_TooBig2#IPTests.testAddingBadProtos_TooBig2  sX    MMO	WJJy*R.1 !!UVV  	vv@@		r   r   N)rB   rC   rD   rE   r[   rc   ri   rn   rr   r|   r   r   r   rF   r   r   r   rH   rH   3   s@    .
`P
dJ
X
.`
DWWWW Wr   rH   N)
__future__r   zoper   twisted.pairr   r   twisted.pythonr   twisted.trialr   implementerIRawDatagramProtocolr
   TestCaserH   r   r   r   <module>r      sW    #    % " s//0# # 1#LwWh wWr   