<s> """<STR_LIT>""" <EOL> import dpkt , ip6 <EOL> ICMP6_DST_UNREACH = <NUM_LIT:1> <EOL> ICMP6_PACKET_TOO_BIG = <NUM_LIT:2> <EOL> ICMP6_TIME_EXCEEDED = <NUM_LIT:3> <EOL> ICMP6_PARAM_PROB = <NUM_LIT:4> <EOL> ICMP6_ECHO_REQUEST = <NUM_LIT> <EOL> ICMP6_ECHO_REPLY = <NUM_LIT> <EOL> MLD_LISTENER_QUERY = <NUM_LIT> <EOL> MLD_LISTENER_REPORT = <NUM_LIT> <EOL> MLD_LISTENER_DONE = <NUM_LIT> <EOL> ICMP6_MEMBERSHIP_QUERY = <NUM_LIT> <EOL> ICMP6_MEMBERSHIP_REPORT = <NUM_LIT> <EOL> ICMP6_MEMBERSHIP_REDUCTION = <NUM_LIT> <EOL> ND_ROUTER_SOLICIT = <NUM_LIT> <EOL> ND_ROUTER_ADVERT = <NUM_LIT> <EOL> ND_NEIGHBOR_SOLICIT = <NUM_LIT> <EOL> ND_NEIGHBOR_ADVERT = <NUM_LIT> <EOL> ND_REDIRECT = <NUM_LIT> <EOL> ICMP6_ROUTER_RENUMBERING = <NUM_LIT> <EOL> ICMP6_WRUREQUEST = <NUM_LIT> <EOL> ICMP6_WRUREPLY = <NUM_LIT> <EOL> ICMP6_FQDN_QUERY = <NUM_LIT> <EOL> ICMP6_FQDN_REPLY = <NUM_LIT> <EOL> ICMP6_NI_QUERY = <NUM_LIT> <EOL> ICMP6_NI_REPLY = <NUM_LIT> <EOL> ICMP6_MAXTYPE = <NUM_LIT> <EOL> class ICMP6 ( dpkt . Packet ) : <EOL> __hdr__ = ( <EOL> ( '<STR_LIT:type>' , '<STR_LIT:B>' , <NUM_LIT:0> ) , <EOL> ( '<STR_LIT:code>' , '<STR_LIT:B>' , <NUM_LIT:0> ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:H>' , <NUM_LIT:0> ) <EOL> ) <EOL> class Error ( dpkt . Packet ) : <EOL> __hdr__ = ( ( '<STR_LIT>' , '<STR_LIT:I>' , <NUM_LIT:0> ) , ) <EOL> def unpack ( self , buf ) : <EOL> dpkt . Packet . unpack ( self , buf ) <EOL> self . data = self . ip6 = ip6 . IP6 ( self . data ) <EOL> class Unreach ( Error ) : <EOL> pass <EOL> class TooBig ( Error ) : <EOL> __hdr__ = ( ( '<STR_LIT>' , '<STR_LIT:I>' , <NUM_LIT> ) , ) <EOL> class TimeExceed ( Error ) : <EOL> pass <EOL> class ParamProb ( Error ) : <EOL> __hdr__ = ( ( '<STR_LIT>' , '<STR_LIT:I>' , <NUM_LIT:0> ) , ) <EOL> class Echo ( dpkt . Packet ) : <EOL> __hdr__ = ( ( '<STR_LIT:id>' , '<STR_LIT:H>' , <NUM_LIT:0> ) , ( '<STR_LIT>' , '<STR_LIT:H>' , <NUM_LIT:0> ) ) <EOL> _typesw = { <NUM_LIT:1> : Unreach , <NUM_LIT:2> : TooBig , <NUM_LIT:3> : TimeExceed , <NUM_LIT:4> : ParamProb , <EOL> <NUM_LIT> : Echo , <NUM_LIT> : Echo } <EOL> def unpack ( self , buf ) : <EOL> dpkt . Packet . unpack ( self , buf ) <EOL> try : <EOL> self . data = self . _typesw [ self . type ] ( self . data ) <EOL> setattr ( self , self . data . __class__ . __name__ . lower ( ) , self . data ) <EOL> except ( KeyError , dpkt . UnpackError ) : <EOL> self . data = buf </s>
