aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-12-26 18:26:24 -0800
committerGuy Harris <guy@alum.mit.edu>2018-12-27 04:34:29 +0000
commit7eb3e47fa49806ea2cf59f0fa009240fae049a2b (patch)
treed668ff9ceae57934fe33582457fc5169f6e764ba /plugins
parentc3a7986b86f5355e6bd1791f70b78c91bcdac247 (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 'plugins')
-rw-r--r--plugins/epan/ethercat/packet-esl.c4
-rw-r--r--plugins/epan/profinet/packet-dcerpc-pn-io.c18
-rw-r--r--plugins/epan/profinet/packet-pn-dcp.c6
3 files changed, 14 insertions, 14 deletions
diff --git a/plugins/epan/ethercat/packet-esl.c b/plugins/epan/ethercat/packet-esl.c
index b552ff0287..94a4dff0e1 100644
--- a/plugins/epan/ethercat/packet-esl.c
+++ b/plugins/epan/ethercat/packet-esl.c
@@ -220,7 +220,7 @@ static void modify_times(tvbuff_t *tvb, gint offset, packet_info *pinfo)
ref_time_frame.num = pinfo->num;
ref_time_frame.abs_ts = pinfo->abs_ts;
}
- else if ( !pinfo->fd->flags.visited )
+ else if ( !pinfo->fd->visited )
{
guint64 nsecs = tvb_get_letoh64(tvb, offset+8) - ref_time_frame.esl_ts;
guint64 secs = nsecs/1000000000;
@@ -256,7 +256,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
in_heur = TRUE;
/*TRY */
{
- if ( ref_time_frame.fd != NULL && !pinfo->fd->flags.visited && pinfo->num <= ref_time_frame.num )
+ if ( ref_time_frame.fd != NULL && !pinfo->fd->visited && pinfo->num <= ref_time_frame.num )
ref_time_frame.fd = NULL;
/* Check that there's enough data */
diff --git a/plugins/epan/profinet/packet-dcerpc-pn-io.c b/plugins/epan/profinet/packet-dcerpc-pn-io.c
index 7e65393e14..fe7bcc581b 100644
--- a/plugins/epan/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/epan/profinet/packet-dcerpc-pn-io.c
@@ -7683,7 +7683,7 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, sub_tree_selector, drep, hf_pn_io_ar_arreserved, &u16ArReserved);
/* When ARType==IOCARSR, then find or create conversation for this frame */
- if (!pinfo->fd->flags.visited) {
+ if (!pinfo->fd->visited) {
/* Get current conversation endpoints using MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_UDP, 0, 0, 0);
if (conversation == NULL) {
@@ -7921,7 +7921,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
/* Set global Variant for Number of IO Data Objects */
/* Notice: Handle Input & Output seperate!!! */
- if (!pinfo->fd->flags.visited) {
+ if (!pinfo->fd->visited) {
/* Get current conversation endpoints using MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -7963,7 +7963,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
proto_item_set_len(sub_item, offset - u32SubStart);
- if (!pinfo->fd->flags.visited && station_info != NULL) {
+ if (!pinfo->fd->visited && station_info != NULL) {
io_data_object = wmem_new0(wmem_file_scope(), ioDataObject);
io_data_object->slotNr = u16SlotNr;
io_data_object->subSlotNr = u16SubslotNr;
@@ -8005,7 +8005,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
hf_pn_io_number_of_iocs, &u16NumberOfIOCS);
/* Set global Vairant for NumberOfIOCS */
- if (!pinfo->fd->flags.visited) {
+ if (!pinfo->fd->visited) {
if (station_info != NULL) {
station_info->iocsNr = u16NumberOfIOCS;
}
@@ -8032,7 +8032,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
proto_item_set_len(sub_item, offset - u32SubStart);
- if (!pinfo->fd->flags.visited) {
+ if (!pinfo->fd->visited) {
if (station_info != NULL) {
if (u16IOCRType == PN_INPUT_CR) {
iocs_list = station_info->iocs_data_in;
@@ -8702,7 +8702,7 @@ dissect_DataDescription(tvbuff_t *tvb, int offset,
proto_item_set_len(sub_item, offset - u32SubStart);
/* Save new data for IO Data Objects */
- if (!pinfo->fd->flags.visited) {
+ if (!pinfo->fd->visited) {
/* Get current conversation endpoints using MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -9229,7 +9229,7 @@ dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset,
u16NumberOfSubmodules);
- if (!pinfo->fd->flags.visited) {
+ if (!pinfo->fd->visited) {
/* Get current conversation endpoints using MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -10692,7 +10692,7 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset,
prm_flag1, prm_flag2, src_addr, dst_addr, wd_time, par_crc);
}
- if (!pinfo->fd->flags.visited) {
+ if (!pinfo->fd->visited) {
/* Get current conversation endpoints using MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -10772,7 +10772,7 @@ dissect_RecordDataWrite(tvbuff_t *tvb, int offset,
station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp);
if (station_info != NULL) {
- if (!pinfo->fd->flags.visited) {
+ if (!pinfo->fd->visited) {
/* Search within the entire existing list for current input object data */
for (frame = wmem_list_head(station_info->ioobject_data_in); frame != NULL; frame = wmem_list_frame_next(frame)) {
io_data_object = (ioDataObject*)wmem_list_frame_data(frame);
diff --git a/plugins/epan/profinet/packet-pn-dcp.c b/plugins/epan/profinet/packet-pn-dcp.c
index 4a4145734c..fb9dc3377b 100644
--- a/plugins/epan/profinet/packet-pn-dcp.c
+++ b/plugins/epan/profinet/packet-pn-dcp.c
@@ -540,7 +540,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(block_item, ", DeviceVendorValue: \"%s\"", typeofstation);
- if (pinfo->fd->flags.visited == FALSE) {
+ if (pinfo->fd->visited == FALSE) {
/* Create a conversation between the MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -585,7 +585,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(block_item, ", \"%s\"", nameofstation);
- if (pinfo->fd->flags.visited == FALSE) {
+ if (pinfo->fd->visited == FALSE) {
/* Create a conversation between the MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -616,7 +616,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_vendor_id, &vendor_id);
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_device_id, &device_id);
- if (pinfo->fd->flags.visited == FALSE) {
+ if (pinfo->fd->visited == FALSE) {
/* Create a conversation between the MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0);
if (conversation == NULL) {