Ignore:
Timestamp:
12/03/07 23:09:42 (6 years ago)
Author:
perry
Message:

Explicitly document that we don't know how many packets flew past before
filtering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/format_linux.c

    r1307 r1308  
    493493} 
    494494 
     495/* Linux doesn't keep track how many packets were seen before filtering 
     496 * so we can't tell how many packets were filtered.  Bugger.  So annoying. 
     497 */ 
     498static uint64_t linuxnative_get_filtered_packets(libtrace_t *trace) { 
     499        return UINT64_MAX; 
     500} 
     501 
     502/* Number of packets that past filtering */ 
    495503static uint64_t linuxnative_get_captured_packets(libtrace_t *trace) { 
    496504        if (FORMAT(trace->format_data)->stats_valid != 2) { 
     
    507515} 
    508516 
     517/* Number of packets that got past filtering and were then dropped because 
     518 * of lack of space 
     519 */ 
    509520static uint64_t linuxnative_get_dropped_packets(libtrace_t *trace) { 
    510521        if (FORMAT(trace->format_data)->stats_valid != 1) { 
     
    561572        NULL,                           /* set_capture_length */ 
    562573        NULL,                           /* get_received_packets */ 
    563         NULL,                           /* get_filtered_packets */ 
     574        linuxnative_get_filtered_packets,/* get_filtered_packets */ 
    564575        linuxnative_get_dropped_packets,/* get_dropped_packets */ 
    565576        linuxnative_get_captured_packets,/* get_captured_packets */ 
Note: See TracChangeset for help on using the changeset viewer.