#NEWLINE# def _packetin_invalid_ttl( self , msg , header_list ) : #NEWLINE# #INDENT# srcip = ip_addr_ntoa ( header_list [ IPV4 ] . src ) #NEWLINE# self . logger . info ( 'Receive invalid ttl packet from [%s].' , srcip , extra = self . sw_id ) #NEWLINE# in_port = self . ofctl . get_packetin_inport ( msg ) #NEWLINE# src_ip = self . _get_send_port_ip ( header_list ) #NEWLINE# if ( src_ip is not None ) : #NEWLINE# #INDENT# self . ofctl . send_icmp ( in_port , header_list , self . vlan_id , icmp . ICMP_TIME_EXCEEDED , icmp . ICMP_TTL_EXPIRED_CODE , msg_data = msg . data , src_ip = src_ip ) #NEWLINE# self . logger . info ( 'Send ICMP time exceeded to [%s].' , srcip , extra = self . sw_id )