diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-01-23 19:40:51 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-01-24 03:41:28 +0000 |
commit | bc5a0374bfd162d08834f5f7503bebd33d8ec943 (patch) | |
tree | 6d5be93a3e35c6eb144ce6d2b1d95650b5cbbd86 /ui/cli | |
parent | baea677290f84d4e30e86194c79bafef0fdc1ad2 (diff) | |
download | wireshark-bc5a0374bfd162d08834f5f7503bebd33d8ec943.tar.gz wireshark-bc5a0374bfd162d08834f5f7503bebd33d8ec943.tar.bz2 wireshark-bc5a0374bfd162d08834f5f7503bebd33d8ec943.zip |
Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.
Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/cli')
-rw-r--r-- | ui/cli/tap-comparestat.c | 6 | ||||
-rw-r--r-- | ui/cli/tap-diameter-avp.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c index 15fe950498..c76f4ece50 100644 --- a/ui/cli/tap-comparestat.c +++ b/ui/cli/tap-comparestat.c @@ -140,7 +140,7 @@ comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const fInfo->fp->partner = NULL; fInfo->fp->count = 1; fInfo->fp->cksum = computed_cksum; - fInfo->num = pinfo->fd->num; + fInfo->num = pinfo->num; fInfo->id = ci->ip_id; fInfo->ip_ttl = ci->ip_ttl; fInfo->dl_dst = pinfo->dl_dst; @@ -148,7 +148,7 @@ comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const /* clean memory */ nstime_set_zero(&fInfo->zebra_time); nstime_set_zero(&fInfo->fp->predecessor_time); - g_hash_table_insert(cs->packet_set, GINT_TO_POINTER(pinfo->fd->num), fInfo); + g_hash_table_insert(cs->packet_set, GINT_TO_POINTER(pinfo->num), fInfo); return 1; } @@ -175,7 +175,7 @@ call_foreach_count_ip_id(gpointer key _U_, gpointer value, gpointer arg) /* we only need one value out of pinfo we use a temp one */ packet_info *pinfo = (packet_info*)g_malloc(sizeof(packet_info)); pinfo->fd = (frame_data*)g_malloc(sizeof(frame_data)); - pinfo->fd->num = fInfo->num; + pinfo->num = fInfo->num; fInfoTemp = (frame_info *)g_hash_table_lookup(cs->ip_id_set, GINT_TO_POINTER((gint)fInfo->id)); if (fInfoTemp == NULL) { diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c index 99c42813ff..efa9d3e478 100644 --- a/ui/cli/tap-diameter-avp.c +++ b/ui/cli/tap-diameter-avp.c @@ -143,8 +143,8 @@ diameteravp_packet(void *pds, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Several diameter messages within one frame are possible. * * Check if we processing the message in same frame like befor or in new frame.*/ ds = (diameteravp_t *)pds; - if (pinfo->fd->num > ds->frame) { - ds->frame = pinfo->fd->num; + if (pinfo->num > ds->frame) { + ds->frame = pinfo->num; ds->diammsg_toprocess = 0; } else { ds->diammsg_toprocess += 1; @@ -187,7 +187,7 @@ diameteravp_packet(void *pds, packet_info *pinfo, epan_dissect_t *edt _U_, const } /* Output frame data.*/ printf("frame='%u' time='%f' src='%s' srcport='%u' dst='%s' dstport='%u' proto='diameter' msgnr='%u' is_request='%d' cmd='%u' req_frame='%u' ans_frame='%u' resp_time='%f' ", - pinfo->fd->num, nstime_to_sec(&pinfo->abs_ts), address_to_str(pinfo->pool, &pinfo->src), pinfo->srcport, address_to_str(pinfo->pool, &pinfo->dst), pinfo->destport, ds->diammsg_toprocess, is_request, cmd_code, req_frame, ans_frame, resp_time); + pinfo->num, nstime_to_sec(&pinfo->abs_ts), address_to_str(pinfo->pool, &pinfo->src), pinfo->srcport, address_to_str(pinfo->pool, &pinfo->dst), pinfo->destport, ds->diammsg_toprocess, is_request, cmd_code, req_frame, ans_frame, resp_time); /* Visit selected nodes of one diameter message.*/ tree_traverse_pre_order(current, diam_tree_to_csv, &ds); /* End of message.*/ |