diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-12-26 18:26:24 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-12-27 04:34:29 +0000 |
commit | 7eb3e47fa49806ea2cf59f0fa009240fae049a2b (patch) | |
tree | d668ff9ceae57934fe33582457fc5169f6e764ba /epan/dissectors/packet-usb.c | |
parent | c3a7986b86f5355e6bd1791f70b78c91bcdac247 (diff) |
Try to squeeze some bytes out of the frame_data structure.
Make the time stamp precision a 4-bit bitfield, so, when combined with
the other bitfields, we have 32 bits. That means we put the flags at
the same structure level as the time stamp precision, so they can be
combined; that gets rid of an extra "flags." for references to the flags.
Put the two pointers next to each other, and after a multiple of 8 bytes
worth of other fields, so that there's no padding before or between them.
It's still not down to 64 bytes, which is the next lower power of 2, so
there's more work to do.
Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe
Reviewed-on: https://code.wireshark.org/review/31213
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-usb.c')
-rw-r--r-- | epan/dissectors/packet-usb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index 2538a22c30..4a8cb4a5e0 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -1968,7 +1968,7 @@ dissect_usb_device_qualifier_descriptor(packet_info *pinfo _U_, proto_tree *pare proto_item_append_text(nitem, " (%s)", description); offset += 1; - if (!pinfo->fd->flags.visited) { + if (!pinfo->fd->visited) { guint k_bus_id; guint k_device_address; guint k_frame_number; @@ -2079,7 +2079,7 @@ dissect_usb_device_descriptor(packet_info *pinfo, proto_tree *parent_tree, product_id); offset += 2; - if (!pinfo->fd->flags.visited) { + if (!pinfo->fd->visited) { guint k_bus_id; guint k_device_address; guint k_frame_number; @@ -2246,7 +2246,7 @@ dissect_usb_interface_descriptor(packet_info *pinfo, proto_tree *parent_tree, class_str = val_to_str_ext(usb_conv_info->interfaceClass, &usb_class_vals_ext, "unknown (0x%X)"); proto_item_append_text(item, " (%u.%u): class %s", interface_num, alt_setting, class_str); - if (!pinfo->fd->flags.visited) { + if (!pinfo->fd->visited) { usb_alt_setting_t alternate_setting; /* Register conversation for this interface in case CONTROL messages are sent to it */ @@ -2409,7 +2409,7 @@ dissect_usb_endpoint_descriptor(packet_info *pinfo, proto_tree *parent_tree, * All endpoints for the same interface descriptor share the same * usb_conv_info structure. */ - if ((!pinfo->fd->flags.visited) && usb_trans_info && usb_trans_info->interface_info) { + if ((!pinfo->fd->visited) && usb_trans_info && usb_trans_info->interface_info) { if (pinfo->destport == NO_ENDPOINT) { address tmp_addr; usb_address_t *usb_addr = wmem_new0(wmem_packet_scope(), usb_address_t); @@ -4007,7 +4007,7 @@ static usb_trans_info_t } else { /* this is a response */ - if (pinfo->fd->flags.visited) { + if (pinfo->fd->visited) { usb_trans_info = (usb_trans_info_t *)wmem_tree_lookup32_array(usb_conv_info->transactions, key); } else { |