#NEWLINE# def _build_echo( self , _type , echo ) : #NEWLINE# #INDENT# e = self . _build_ether ( ether . ETH_TYPE_IP ) #NEWLINE# ip = ipv4 . ipv4 ( version = 4 , header_length = 5 , tos = 0 , total_length = 84 , identification = 0 , flags = 0 , offset = 0 , ttl = 64 , proto = inet . IPPROTO_ICMP , csum = 0 , src = self . RYU_IP , dst = self . HOST_IP ) #NEWLINE# ping = icmp . icmp ( echo , code = 0 , csum = 0 , data = echo ) #NEWLINE# p = packet . Packet ( ) #NEWLINE# p . add_protocol ( e ) #NEWLINE# p . add_protocol ( ip ) #NEWLINE# p . add_protocol ( ping ) #NEWLINE# p . serialize ( ) #NEWLINE# return p