@@ -174,6 +174,18 @@ pub fn extract_flows_with_config(
174174 format_duration( elapsed) ,
175175 format_count( rate as usize )
176176 ) ;
177+
178+ let ( total_drops, flows_with_drops) = count_dropped_segments ( & conversations) ;
179+ if total_drops > 0 {
180+ eprintln ! (
181+ "[!] Warning: {} TCP segments dropped across {} flows (buffer/fragment limits exceeded)" ,
182+ format_count( total_drops as usize ) ,
183+ format_count( flows_with_drops) ,
184+ ) ;
185+ eprintln ! (
186+ "[!] Tip: increase max_reassembly_buffer or max_ooo_fragments to capture more data"
187+ ) ;
188+ }
177189 eprintln ! ( ) ;
178190 }
179191 Ok ( conversations)
@@ -265,11 +277,40 @@ where
265277 format_count( conversations. len( ) )
266278 ) ;
267279 eprintln ! ( "[+] Wall time: {}" , format_duration( elapsed) ) ;
280+
281+ // Report reassembly drops
282+ let ( total_drops, flows_with_drops) = count_dropped_segments ( & conversations) ;
283+ if total_drops > 0 {
284+ eprintln ! (
285+ "[!] Warning: {} TCP segments dropped across {} flows (buffer/fragment limits exceeded)" ,
286+ format_count( total_drops as usize ) ,
287+ format_count( flows_with_drops) ,
288+ ) ;
289+ eprintln ! (
290+ "[!] Tip: increase max_reassembly_buffer or max_ooo_fragments to capture more data"
291+ ) ;
292+ }
268293 eprintln ! ( ) ;
269294 }
270295 Ok ( conversations)
271296}
272297
298+ /// Count total dropped TCP segments across all conversations.
299+ fn count_dropped_segments ( conversations : & [ ConversationState ] ) -> ( u64 , usize ) {
300+ let mut total_drops: u64 = 0 ;
301+ let mut flows_with_drops: usize = 0 ;
302+ for conv in conversations {
303+ if let ProtocolState :: Tcp ( ref tcp) = conv. protocol_state {
304+ let drops = tcp. total_dropped_segments ( ) ;
305+ if drops > 0 {
306+ total_drops += drops;
307+ flows_with_drops += 1 ;
308+ }
309+ }
310+ }
311+ ( total_drops, flows_with_drops)
312+ }
313+
273314/// Extract flows directly from a capture file (PCAP or PcapNG).
274315///
275316/// Streams packets from disk — never loads the entire file into memory.
0 commit comments