#NEWLINE# def pad_missing_data( self ) : #NEWLINE# #INDENT# 'Pad missing data in the flow with zero bytes.' #NEWLINE# if ( not self . chunks ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# prev_chunk = self . chunks [ 0 ] #NEWLINE# for chunk in self . chunks [ 1 : ] : #NEWLINE# #INDENT# gap = ( chunk . seq_start - prev_chunk . seq_end ) #NEWLINE# if ( gap > 0 ) : #NEWLINE# #INDENT# logging . info ( 'Padding %d missing bytes at %d' , gap , prev_chunk . seq_end ) #NEWLINE# first_chunk_pkt = self . seq_arrival ( chunk . seq_start ) #NEWLINE# chunk_ts = first_chunk_pkt . ts #NEWLINE# pad_pkt = packet . PadPacket ( prev_chunk . seq_end , gap , chunk_ts ) #NEWLINE# self . add ( pad_pkt ) #NEWLINE# #UNINDENT# prev_chunk = chunk