#NEWLINE# @ set_ev_handler ( ofp_event . EventOFPEchoRequest , [ HANDSHAKE_DISPATCHER , CONFIG_DISPATCHER , MAIN_DISPATCHER ] ) #NEWLINE# def echo_request_handler( self , ev ) : #NEWLINE# #INDENT# msg = ev . msg #NEWLINE# datapath = msg . datapath #NEWLINE# echo_reply = datapath . ofproto_parser . OFPEchoReply ( datapath ) #NEWLINE# echo_reply . xid = msg . xid #NEWLINE# echo_reply . data = msg . data #NEWLINE# datapath . send_msg ( echo_reply )