<s> """<STR_LIT>""" <EOL> import dpkt <EOL> import ethernet <EOL> import ip <EOL> import ip6 <EOL> class Loopback ( dpkt . Packet ) : <EOL> __hdr__ = ( ( '<STR_LIT>' , '<STR_LIT:I>' , <NUM_LIT:0> ) , ) <EOL> __byte_order__ = '<STR_LIT:@>' <EOL> def unpack ( self , buf ) : <EOL> dpkt . Packet . unpack ( self , buf ) <EOL> if self . family == <NUM_LIT:2> : <EOL> self . data = ip . IP ( self . data ) <EOL> elif self . family == <NUM_LIT> : <EOL> self . family = <NUM_LIT:2> <EOL> self . data = ip . IP ( self . data ) <EOL> elif self . family in ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT:30> ) : <EOL> self . data = ip6 . IP6 ( self . data ) <EOL> elif self . family > <NUM_LIT> : <EOL> self . data = ethernet . Ethernet ( self . data ) </s>
