diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-02-08 16:19:12 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-02-09 00:29:51 +0000 |
commit | 1f5f63f8ef98bfe9c4d734674cee0df64855555d (patch) | |
tree | 133dd3563cc8d2d29dd85d4d43cd9a4636283192 /epan/dissectors/packet-adb_cs.c | |
parent | e4c5efafb7da2d25b7d47fe2dac3b1556c0b67b0 (diff) |
Generalize wtap_pkthdr into a structure for packet and non-packet records.
Separate the stuff that any record could have from the stuff that only
particular record types have; put the latter into a union, and put all
that into a wtap_rec structure.
Add some record-type checks as necessary.
Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2
Reviewed-on: https://code.wireshark.org/review/25696
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-adb_cs.c')
-rw-r--r-- | epan/dissectors/packet-adb_cs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-adb_cs.c b/epan/dissectors/packet-adb_cs.c index b2f3426574..25cecd5b12 100644 --- a/epan/dissectors/packet-adb_cs.c +++ b/epan/dissectors/packet-adb_cs.c @@ -101,8 +101,8 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ main_item = proto_tree_add_item(tree, proto_adb_cs, tvb, offset, -1, ENC_NA); main_tree = proto_item_add_subtree(main_item, ett_adb_cs); - if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) - wireshark_interface_id = pinfo->phdr->interface_id; + if (pinfo->rec->presence_flags & WTAP_HAS_INTERFACE_ID) + wireshark_interface_id = pinfo->rec->rec_header.packet_header.interface_id; if (pinfo->destport == server_port) { /* Client sent to Server */ client_request_t *client_request; @@ -117,8 +117,8 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ col_add_fstr(pinfo->cinfo, COL_INFO, "Client"); - if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) - wireshark_interface_id = pinfo->phdr->interface_id; + if (pinfo->rec->presence_flags & WTAP_HAS_INTERFACE_ID) + wireshark_interface_id = pinfo->rec->rec_header.packet_header.interface_id; key[0].length = 1; key[0].key = &wireshark_interface_id; @@ -182,8 +182,8 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ } if (!pinfo->fd->flags.visited && length > 0) { /* save Length to client_requests */ - if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) - wireshark_interface_id = pinfo->phdr->interface_id; + if (pinfo->rec->presence_flags & WTAP_HAS_INTERFACE_ID) + wireshark_interface_id = pinfo->rec->rec_header.packet_header.interface_id; key[0].length = 1; key[0].key = &wireshark_interface_id; @@ -209,8 +209,8 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ if (!pinfo->fd->flags.visited && (length == -1 || (client_request && client_request->service_in == -1 && tvb_reported_length_remaining(tvb, offset) > 0))) { /* save Service to client_requests */ if (!client_request) { - if (pinfo->phdr->presence_flags & WTAP_HAS_INTERFACE_ID) - wireshark_interface_id = pinfo->phdr->interface_id; + if (pinfo->rec->presence_flags & WTAP_HAS_INTERFACE_ID) + wireshark_interface_id = pinfo->rec->rec_header.packet_header.interface_id; key[0].length = 1; key[0].key = &wireshark_interface_id; |