/// handle a gap in the TOSERVER direction
/// returns: 0 ok, 1 unrecoverable error
handle a gap in the TOSERVER direction
returns: 0 ok, 1 unrecoverable error
handle a gap in the TOSERVER direction returns : 0 ok 1 unrecoverable error
pub fn parse_tcp_data_ts_gap(&mut self, gap_size: u32) -> u32 {
        if self.tcp_buffer_ts.len() > 0 {
            self.tcp_buffer_ts.clear();
        }
        let consumed = self.handle_skip(STREAM_TOSERVER, gap_size);
        if consumed < gap_size {
            let new_gap_size = gap_size - consumed;
            let gap = vec![0; new_gap_size as usize];
            let consumed2 = self.filetracker_update(STREAM_TOSERVER, &gap, new_gap_size);
            if consumed2 > new_gap_size {
                debug!("consumed more than GAP size: {} > {}", consumed2, new_gap_size);
                self.set_event(SMBEvent::InternalError);
                return 1;
            }
        }
        debug!("GAP of size {} in toserver direction", gap_size);
        self.ts_ssn_gap = true;
        self.ts_gap = true;
        return 0
    }
pub fn parse_tcp_data_ts_gap ( & mut self , gap_size : u32 ) -> u32 { if self . tcp_buffer_ts . len ( ) > 0 { self . tcp_buffer_ts . clear ( ) ; } let consumed = self . handle_skip ( STREAM_TOSERVER , gap_size ) ; if consumed < gap_size { let new_gap_size = gap_size - consumed ; let gap = vec ! [ 0 new_gap_size as usize ] ; let consumed2 = self . filetracker_update ( STREAM_TOSERVER , & gap , new_gap_size ) ; if consumed2 > new_gap_size { debug ! ( " " consumed2 new_gap_size ) ; self . set_event ( SMBEvent :: InternalError ) ; return 1 ; } } debug ! ( " " gap_size ) ; self . ts_ssn_gap = true ; self . ts_gap = true ; return 0 }
handle a gap in the TOSERVER direction
returns: 0 ok, 1 unrecoverable error
handle a gap in the TOSERVER direction returns : 0 ok 1 unrecoverable error
&mut self
gap_size
u32