diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-10-16 23:32:24 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-10-16 23:32:24 +0000 |
commit | 727ad67453a879a58ab46adeee058d2acbbe5c13 (patch) | |
tree | 9fe0f60bac0ddcee9a3c48d3ff0ca8003b3ca707 /packet-range.h | |
parent | de1bcd5d88f4ecd85df770ef5a7a0357b539ee4f (diff) | |
download | wireshark-727ad67453a879a58ab46adeee058d2acbbe5c13.tar.gz wireshark-727ad67453a879a58ab46adeee058d2acbbe5c13.tar.bz2 wireshark-727ad67453a879a58ab46adeee058d2acbbe5c13.zip |
Remove the fixed maximum number of subranges in a range_t; dynamically
allocate them to be large enough.
Add checks that the numbers in the range fit in a guint32.
Check the validity of a range before saving or printing, and report
errors in an alert box.
Clean up white space.
svn path=/trunk/; revision=12320
Diffstat (limited to 'packet-range.h')
-rw-r--r-- | packet-range.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packet-range.h b/packet-range.h index 3007d215c8..b4e9f66bc9 100644 --- a/packet-range.h +++ b/packet-range.h @@ -49,8 +49,9 @@ typedef struct packet_range_tag { packet_range_e process; /* which range to process */ gboolean process_filtered; /* captured or filtered packets */ - /* user specified range(s) */ - range_t user_range; + /* user specified range(s) and, if null, error status */ + range_t *user_range; + convert_ret_t user_range_status; /* calculated values */ guint32 selected_packet; /* the currently selected packet */ @@ -82,8 +83,11 @@ typedef enum { /* init the range structure */ extern void packet_range_init(packet_range_t *range); +/* check whether the packet range is OK */ +extern convert_ret_t packet_range_check(packet_range_t *range); + /* init the processing run */ -void packet_range_process_init(packet_range_t *range); +extern void packet_range_process_init(packet_range_t *range); /* do we have to process all packets? */ extern gboolean packet_range_process_all(packet_range_t *range); |