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 /epan/dissectors/packet-rsh.c | |
parent | baea677290f84d4e30e86194c79bafef0fdc1ad2 (diff) |
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 'epan/dissectors/packet-rsh.c')
-rw-r--r-- | epan/dissectors/packet-rsh.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/epan/dissectors/packet-rsh.c b/epan/dissectors/packet-rsh.c index 8e1fa37f3d..34ed9460f5 100644 --- a/epan/dissectors/packet-rsh.c +++ b/epan/dissectors/packet-rsh.c @@ -123,7 +123,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) if(!hash_info){ hash_info = wmem_new(wmem_file_scope(), rsh_hash_entry_t); - hash_info->first_packet_number = pinfo->fd->num; + hash_info->first_packet_number = pinfo->num; hash_info->second_packet_number = 0; hash_info->third_packet_number = 0; hash_info->fourth_packet_number = 0; @@ -150,25 +150,25 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) * as we reach them the first time */ if(!hash_info->second_packet_number - && pinfo->fd->num > hash_info->first_packet_number){ + && pinfo->num > hash_info->first_packet_number){ /* We're on the second packet of the conversation */ - hash_info->second_packet_number = pinfo->fd->num; + hash_info->second_packet_number = pinfo->num; } else if(hash_info->second_packet_number && !hash_info->third_packet_number - && pinfo->fd->num > hash_info->second_packet_number) { + && pinfo->num > hash_info->second_packet_number) { /* We're on the third packet of the conversation */ - hash_info->third_packet_number = pinfo->fd->num; + hash_info->third_packet_number = pinfo->num; } else if(hash_info->third_packet_number && !hash_info->fourth_packet_number - && pinfo->fd->num > hash_info->third_packet_number) { + && pinfo->num > hash_info->third_packet_number) { /* We're on the fourth packet of the conversation */ - hash_info->fourth_packet_number = pinfo->fd->num; + hash_info->fourth_packet_number = pinfo->num; } /* Save this packet's state so we can retrieve it if this packet * is selected again later. If the packet's state was already stored, * then retrieve it */ - if(pinfo->fd->num == hash_info->first_packet_number){ + if(pinfo->num == hash_info->first_packet_number){ if(hash_info->first_packet_state == NONE){ hash_info->first_packet_state = hash_info->state; } else { @@ -176,7 +176,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) } } - if(pinfo->fd->num == hash_info->second_packet_number){ + if(pinfo->num == hash_info->second_packet_number){ if(hash_info->second_packet_state == NONE){ hash_info->second_packet_state = hash_info->state; } else { @@ -184,7 +184,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) } } - if(pinfo->fd->num == hash_info->third_packet_number){ + if(pinfo->num == hash_info->third_packet_number){ if(hash_info->third_packet_state == NONE){ hash_info->third_packet_state = hash_info->state; } else { @@ -192,7 +192,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) } } - if(pinfo->fd->num == hash_info->fourth_packet_number){ + if(pinfo->num == hash_info->fourth_packet_number){ if(hash_info->fourth_packet_state == NONE){ hash_info->fourth_packet_state = hash_info->state; } else { |