#NEWLINE# @ classmethod #NEWLINE# def parser( cls , buf ) : #NEWLINE# #INDENT# ( hwtype , proto , hlen , plen , opcode , src_mac , src_ip , dst_mac , dst_ip ) = struct . unpack_from ( cls . _PACK_STR , buf ) #NEWLINE# return ( cls ( hwtype , proto , hlen , plen , opcode , addrconv . mac . bin_to_text ( src_mac ) , addrconv . ipv4 . bin_to_text ( src_ip ) , addrconv . mac . bin_to_text ( dst_mac ) , addrconv . ipv4 . bin_to_text ( dst_ip ) ) , None , buf [ arp . _MIN_LEN : ] )