U •v«`Ôã@sndZddlmZddlmZddlmZddlmZddlmZGdd „d ejƒZ d d „Z d d „Z dd„Z dS)z#Platform-dependent loopback header.é)Úabsolute_importé)Údpkt)Úethernet)Úip)Úip6c@s eZdZdZdZdZdd„ZdS)ÚLoopbackz›Platform-dependent loopback header. TODO: Longer class information.... Attributes: __hdr__: Header fields of Loopback. TODO. ))ÚfamilyÚIrú@cCs~tj ||¡|jdkr(t |j¡|_nR|jdkrHd|_t |j¡|_n2|jdkrbt |j¡|_n|jdkrzt   |j¡|_dS)Néi©éééiÜ) rÚPacketÚunpackr rÚIPÚdatarÚIP6rÚEthernet)ÚselfÚbuf©rúe/private/var/folders/0j/yyfkg7712236ncpm167bvylc27vst9/T/pip-unpacked-wheel-y9gppv54/dpkt/loopback.pyrs    zLoopback.unpackN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Z__hdr__Z__byte_order__rrrrrr s rcCsXd}d}t||ƒ}|jdks"t‚t|jtjƒs4t‚|jjdksDt‚|jjdksTt‚dS)Ns sis s) rr ÚAssertionErrorÚ isinstancerrrÚsrcÚdst©rÚhdrÚlorrrÚtest_ethernet_unpack)s r&cCs^d}dD]P}t||ƒ}|jdks&t‚t|jtjƒs8t‚|jjdksHt‚|jjdkst‚qdS)NsE4½@@½)ssr ss) rr rr rrrr!r"r#rrrÚtest_ip_unpack4s r'cCszddl}d}d}dD]`}| d|¡|}t||ƒ}|j|ksBt‚t|jtjƒsTt‚|jj dksdt‚|jj dkst‚qdS)Nrs(`8&ø°@  på¿Þ­IW!tè,H‡sr ÚBs&ø°@ s på¿Þ­IW!tè,H‡) ÚstructÚpackrr rr rrrr!r")r)rZ hdr_suffixr r$r%rrrÚtest_ip6_unpack?s r+N) rÚ __future__rÚrrrrrrr&r'r+rrrrÚs