#NEWLINE# def _io_worker_receive_handler( self , io_worker ) : #NEWLINE# #INDENT# '\n    Read a packet from the Namespace and inject it into the network.\n    ' #NEWLINE# message = io_worker . peek_receive_buf ( ) #NEWLINE# packet = ethernet ( raw = message ) #NEWLINE# if ( not packet . parsed ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# io_worker . consume_receive_buf ( ( packet . hdr_len + packet . payload_len ) ) #NEWLINE# self . log . info ( ( 'received packet from netns %s: ' % str ( message ) ) ) #NEWLINE# super ( NamespaceHost , self ) . send ( self . interfaces [ 0 ] , packet )