diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-09-11 22:25:33 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-09-11 22:25:33 +0000 |
commit | d0c5e2c547cea72b6c9dbb9100ae9f6967dd0e2d (patch) | |
tree | 921a697c78e514c52d1a5ff85ed6f3e0b880dca0 /epan | |
parent | 0cf90c83a65ebc927011d54241f9d751693bb584 (diff) |
Frame numbers are unsigned, and they start at 1; 0 is what's used for
"unknown" for frame numbers. Note that in epan/frame_data.h, and make
the frame number in experts unsigned, and use 0 for "unknown", and
display it as an unsigned number - and, if it's 0, don't display it at
all.
Fix the signature of "expert_dlg_draw()" to match what a tap's draw
routine's signature is expected to be.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15760 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r-- | epan/expert.c | 4 | ||||
-rw-r--r-- | epan/expert.h | 2 | ||||
-rw-r--r-- | epan/frame_data.h | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/epan/expert.c b/epan/expert.c index dfa585f7e2..8691d7e15f 100644 --- a/epan/expert.c +++ b/epan/expert.c @@ -77,7 +77,7 @@ packet_info *pinfo, proto_item *pi, int group, int severity, const char *format, /* if this packet isn't loaded because of a read filter, don't output anything */ - if(pinfo->fd->num == -1) { + if(pinfo->fd->num == 0) { return; } @@ -87,7 +87,7 @@ packet_info *pinfo, proto_item *pi, int group, int severity, const char *format, formatted[sizeof(formatted) - 1] = '\0'; ei = se_alloc(sizeof(expert_info_t)); - ei->packet_num = pinfo ? pinfo->fd->num : -1; + ei->packet_num = pinfo ? pinfo->fd->num : 0; ei->group = group; ei->severity = severity; ei->protocol = se_strdup(pinfo->current_proto); diff --git a/epan/expert.h b/epan/expert.h index 5860121fba..c44a80fab4 100644 --- a/epan/expert.h +++ b/epan/expert.h @@ -30,7 +30,7 @@ /** only for internal and display use */ typedef struct expert_info_s { - int packet_num; + guint32 packet_num; int group; int severity; gchar * protocol; diff --git a/epan/frame_data.h b/epan/frame_data.h index db6d5034a4..3b61c06e3e 100644 --- a/epan/frame_data.h +++ b/epan/frame_data.h @@ -44,6 +44,9 @@ typedef struct _color_t /* { /* XXX - some of this stuff is used only while a packet is being dissected; should we keep that stuff in the "packet_info" structure, instead, to save memory? */ +/* The frame number is the ordinal number of the frame in the capture, so + it's 1-origin. In various contexts, 0 as a frame number means "frame + number unknown". */ typedef struct _frame_data { struct _frame_data *next; /* Next element in list */ struct _frame_data *prev; /* Previous element in list */ |