aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-09-26 14:50:59 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-09-26 14:50:59 +0000
commitb87f9143e42552cb6c3181ef35a79c3df526ef4a (patch)
treef58b6818e6345fd1968b675729055443c1386ef5
parentab901be153637f37698e9501dac9d38b10bf46ec (diff)
Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39149
-rw-r--r--epan/dissectors/packet-daap.c28
-rw-r--r--epan/dissectors/packet-dcp-etsi.c74
-rw-r--r--epan/dissectors/packet-dec-bpdu.c34
-rw-r--r--epan/dissectors/packet-dec-dnart.c95
-rw-r--r--epan/dissectors/packet-dhcp-failover.c35
-rw-r--r--epan/dissectors/packet-dis.c73
-rw-r--r--epan/dissectors/packet-distcc.c40
-rw-r--r--epan/dissectors/packet-dlm3.c123
-rw-r--r--epan/dissectors/packet-dlsw.c8
-rw-r--r--epan/dissectors/packet-dmp.c72
10 files changed, 271 insertions, 311 deletions
diff --git a/epan/dissectors/packet-daap.c b/epan/dissectors/packet-daap.c
index 1380eebf46..5005a5cb4f 100644
--- a/epan/dissectors/packet-daap.c
+++ b/epan/dissectors/packet-daap.c
@@ -408,22 +408,20 @@ dissect_daap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* XXX - what if the body is gzipped? This isn't the only protocol
* running atop HTTP that might have a problem with that....
*/
- if (check_col(pinfo->cinfo, COL_INFO)) {
- if (is_request) {
- col_set_str(pinfo->cinfo, COL_INFO, "DAAP Request");
- } else {
- /* This is done in two functions on purpose. If the tvb_get_xxx()
- * functions fail, at least something will be in the info column
- */
- col_set_str(pinfo->cinfo, COL_INFO, "DAAP Response");
- col_append_fstr(pinfo->cinfo, COL_INFO, " [first tag: %s, size: %d]",
- tvb_format_text(tvb, 0, 4),
- tvb_get_ntohl(tvb, 4));
- }
+ if (is_request) {
+ col_set_str(pinfo->cinfo, COL_INFO, "DAAP Request");
+ } else {
+ /* This is done in two functions on purpose. If the tvb_get_xxx()
+ * functions fail, at least something will be in the info column
+ */
+ col_set_str(pinfo->cinfo, COL_INFO, "DAAP Response");
+ col_append_fstr(pinfo->cinfo, COL_INFO, " [first tag: %s, size: %d]",
+ tvb_format_text(tvb, 0, 4),
+ tvb_get_ntohl(tvb, 4));
}
if (tree) {
- ti = proto_tree_add_item(tree, proto_daap, tvb, 0, -1, FALSE);
+ ti = proto_tree_add_item(tree, proto_daap, tvb, 0, -1, ENC_BIG_ENDIAN);
daap_tree = proto_item_add_subtree(ti, ett_daap);
dissect_daap_one_tag(daap_tree, tvb);
}
@@ -453,9 +451,9 @@ dissect_daap_one_tag(proto_tree *tree, tvbuff_t *tvb)
tagsize,
plurality(tagsize, ' ', 's'));
- ti2 = proto_tree_add_item(tree, hf_daap_name, tvb, offset, 4, FALSE);
+ ti2 = proto_tree_add_item(tree, hf_daap_name, tvb, offset, 4, ENC_BIG_ENDIAN);
PROTO_ITEM_SET_HIDDEN(ti2);
- ti2 = proto_tree_add_item(tree, hf_daap_size, tvb, offset+4, 4, FALSE);
+ ti2 = proto_tree_add_item(tree, hf_daap_size, tvb, offset+4, 4, ENC_BIG_ENDIAN);
PROTO_ITEM_SET_HIDDEN(ti2);
offset += 8;
diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c
index d60836182b..473ebaec6b 100644
--- a/epan/dissectors/packet-dcp-etsi.c
+++ b/epan/dissectors/packet-dcp-etsi.c
@@ -193,7 +193,7 @@ dissect_dcp_etsi (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if(tree) {
proto_item *ti = NULL;
- ti = proto_tree_add_item (tree, proto_dcp_etsi, tvb, 0, -1, FALSE);
+ ti = proto_tree_add_item (tree, proto_dcp_etsi, tvb, 0, -1, ENC_BIG_ENDIAN);
dcp_tree = proto_item_add_subtree (ti, ett_edcp);
}
@@ -409,23 +409,21 @@ dissect_pft_fragmented(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
frag_edcp, &dcp_frag_items,
NULL, tree);
}
- if (check_col (pinfo->cinfo, COL_INFO)) {
- if(new_tvb) {
- col_append_str (pinfo->cinfo, COL_INFO, " (Message Reassembled)");
+ if(new_tvb) {
+ col_append_str (pinfo->cinfo, COL_INFO, " (Message Reassembled)");
+ } else {
+ if(last) {
+ col_append_str (pinfo->cinfo, COL_INFO, " (Message Reassembly failure)");
} else {
- if(last) {
- col_append_str (pinfo->cinfo, COL_INFO, " (Message Reassembly failure)");
- } else {
- col_append_fstr (pinfo->cinfo, COL_INFO, " (Message fragment %u)", findex);
- }
+ col_append_fstr (pinfo->cinfo, COL_INFO, " (Message fragment %u)", findex);
}
- if(first)
- col_append_str (pinfo->cinfo, COL_INFO, " (first)");
- if(last)
- col_append_str (pinfo->cinfo, COL_INFO, " (last)");
}
+ if(first)
+ col_append_str (pinfo->cinfo, COL_INFO, " (first)");
+ if(last)
+ col_append_str (pinfo->cinfo, COL_INFO, " (last)");
return new_tvb;
-}
+ }
/** Dissect a PFT packet. Details follow
* here.
@@ -450,51 +448,51 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DCP-PFT");
if (tree) { /* we are being asked for details */
- ti = proto_tree_add_item (tree, proto_pft, tvb, 0, -1, FALSE);
+ ti = proto_tree_add_item (tree, proto_pft, tvb, 0, -1, ENC_BIG_ENDIAN);
pft_tree = proto_item_add_subtree (ti, ett_pft);
- proto_tree_add_item (pft_tree, hf_edcp_sync, tvb, offset, 2, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_sync, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 2;
seq = tvb_get_ntohs (tvb, offset);
if (tree) {
- proto_tree_add_item (pft_tree, hf_edcp_pseq, tvb, offset, 2, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_pseq, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 2;
findex = tvb_get_ntoh24 (tvb, offset);
if (tree) {
- proto_tree_add_item (pft_tree, hf_edcp_findex, tvb, offset, 3, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_findex, tvb, offset, 3, ENC_BIG_ENDIAN);
}
offset += 3;
fcount = tvb_get_ntoh24 (tvb, offset);
if (tree) {
- proto_tree_add_item (pft_tree, hf_edcp_fcount, tvb, offset, 3, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_fcount, tvb, offset, 3, ENC_BIG_ENDIAN);
}
offset += 3;
plen = tvb_get_ntohs (tvb, offset);
payload_len = plen & 0x3fff;
if (tree) {
- proto_tree_add_item (pft_tree, hf_edcp_fecflag, tvb, offset, 2, FALSE);
- proto_tree_add_item (pft_tree, hf_edcp_addrflag, tvb, offset, 2, FALSE);
- li = proto_tree_add_item (pft_tree, hf_edcp_plen, tvb, offset, 2, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_fecflag, tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (pft_tree, hf_edcp_addrflag, tvb, offset, 2, ENC_BIG_ENDIAN);
+ li = proto_tree_add_item (pft_tree, hf_edcp_plen, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 2;
if (plen & 0x8000) {
fec = TRUE;
rsk = tvb_get_guint8 (tvb, offset);
if (tree)
- proto_tree_add_item (pft_tree, hf_edcp_rsk, tvb, offset, 1, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_rsk, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
rsz = tvb_get_guint8 (tvb, offset);
if (tree)
- proto_tree_add_item (pft_tree, hf_edcp_rsz, tvb, offset, 1, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_rsz, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
}
if (plen & 0x4000) {
if (tree)
- proto_tree_add_item (pft_tree, hf_edcp_source, tvb, offset, 2, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_source, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (tree)
- proto_tree_add_item (pft_tree, hf_edcp_dest, tvb, offset, 2, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_dest, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
}
if (tree) {
@@ -502,7 +500,7 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
guint header_len = offset+2;
const char *crc_buf = (const char *) tvb_get_ptr(tvb, 0, header_len);
unsigned long c = crc_drm(crc_buf, header_len, 16, 0x11021, 1);
- ci = proto_tree_add_item (pft_tree, hf_edcp_hcrc, tvb, offset, 2, FALSE);
+ ci = proto_tree_add_item (pft_tree, hf_edcp_hcrc, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_item_append_text(ci, " (%s)", (c==0xe2f0)?"Ok":"bad");
proto_tree_add_boolean(pft_tree, hf_edcp_hcrc_ok, tvb, offset, 2, c==0xe2f0);
}
@@ -510,7 +508,7 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if (fcount > 1) { /* fragmented*/
gboolean save_fragmented = pinfo->fragmented;
guint16 real_len = tvb_length(tvb)-offset;
- proto_tree_add_item (pft_tree, hf_edcp_pft_payload, tvb, offset, real_len, FALSE);
+ proto_tree_add_item (pft_tree, hf_edcp_pft_payload, tvb, offset, real_len, ENC_BIG_ENDIAN);
if(real_len != payload_len) {
if(li)
proto_item_append_text(li, " (length error (%d))", real_len);
@@ -552,15 +550,15 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DCP-AF");
if (tree) { /* we are being asked for details */
- ti = proto_tree_add_item (tree, proto_af, tvb, 0, -1, FALSE);
+ ti = proto_tree_add_item (tree, proto_af, tvb, 0, -1, ENC_BIG_ENDIAN);
af_tree = proto_item_add_subtree (ti, ett_af);
- proto_tree_add_item (af_tree, hf_edcp_sync, tvb, offset, 2, FALSE);
+ proto_tree_add_item (af_tree, hf_edcp_sync, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 2;
payload_len = tvb_get_ntohl(tvb, offset);
if (tree) {
guint32 real_payload_len = tvb_length(tvb)-12;
- li = proto_tree_add_item (af_tree, hf_edcp_len, tvb, offset, 4, FALSE);
+ li = proto_tree_add_item (af_tree, hf_edcp_len, tvb, offset, 4, ENC_BIG_ENDIAN);
if(real_payload_len < payload_len) {
proto_item_append_text (li, " (wrong len claims %d is %d)",
payload_len, real_payload_len
@@ -573,23 +571,23 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
offset += 4;
if (tree)
- proto_tree_add_item (af_tree, hf_edcp_seq, tvb, offset, 2, FALSE);
+ proto_tree_add_item (af_tree, hf_edcp_seq, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
ver = tvb_get_guint8 (tvb, offset);
if (tree) {
- proto_tree_add_item (af_tree, hf_edcp_crcflag, tvb, offset, 1, FALSE);
- proto_tree_add_item (af_tree, hf_edcp_maj, tvb, offset, 1, FALSE);
- proto_tree_add_item (af_tree, hf_edcp_min, tvb, offset, 1, FALSE);
+ proto_tree_add_item (af_tree, hf_edcp_crcflag, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (af_tree, hf_edcp_maj, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (af_tree, hf_edcp_min, tvb, offset, 1, ENC_BIG_ENDIAN);
}
offset += 1;
pt = tvb_get_guint8 (tvb, offset);
if (tree)
- proto_tree_add_item (af_tree, hf_edcp_pt, tvb, offset, 1, FALSE);
+ proto_tree_add_item (af_tree, hf_edcp_pt, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
next_tvb = tvb_new_subset (tvb, offset, payload_len, -1);
offset += payload_len;
if (tree)
- ci = proto_tree_add_item (af_tree, hf_edcp_crc, tvb, offset, 2, FALSE);
+ ci = proto_tree_add_item (af_tree, hf_edcp_crc, tvb, offset, 2, ENC_BIG_ENDIAN);
if (ver & 0x80) { /* crc valid */
guint len = offset+2;
const char *crc_buf = (const char *) tvb_get_ptr(tvb, 0, len);
@@ -626,7 +624,7 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if(tree) {
proto_item *ti = NULL;
- ti = proto_tree_add_item (tree, proto_tpl, tvb, 0, -1, FALSE);
+ ti = proto_tree_add_item (tree, proto_tpl, tvb, 0, -1, ENC_BIG_ENDIAN);
tpl_tree = proto_item_add_subtree (ti, ett_tpl);
}
while(offset<tvb_length(tvb)) {
diff --git a/epan/dissectors/packet-dec-bpdu.c b/epan/dissectors/packet-dec-bpdu.c
index b54b341033..c73f6830c9 100644
--- a/epan/dissectors/packet-dec-bpdu.c
+++ b/epan/dissectors/packet-dec-bpdu.c
@@ -120,27 +120,25 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
bpdu_type = tvb_get_guint8(tvb, BPDU_TYPE);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_add_str(pinfo->cinfo, COL_INFO,
- val_to_str(bpdu_type, bpdu_type_vals,
- "Unknown BPDU type (%u)"));
- }
+ col_add_str(pinfo->cinfo, COL_INFO,
+ val_to_str(bpdu_type, bpdu_type_vals,
+ "Unknown BPDU type (%u)"));
set_actual_length(tvb, DEC_BPDU_SIZE);
if (tree) {
ti = proto_tree_add_item(tree, proto_dec_bpdu, tvb, 0, DEC_BPDU_SIZE,
- FALSE);
+ ENC_BIG_ENDIAN);
bpdu_tree = proto_item_add_subtree(ti, ett_dec_bpdu);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_proto_id, tvb,
- BPDU_DEC_CODE, 1, FALSE);
+ BPDU_DEC_CODE, 1, ENC_BIG_ENDIAN);
proto_tree_add_uint(bpdu_tree, hf_dec_bpdu_type, tvb,
BPDU_TYPE, 1, bpdu_type);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_version_id, tvb,
- BPDU_VERSION, 1, FALSE);
+ BPDU_VERSION, 1, ENC_BIG_ENDIAN);
flags = tvb_get_guint8(tvb, BPDU_FLAGS);
ti = proto_tree_add_uint(bpdu_tree, hf_dec_bpdu_flags, tvb,
@@ -165,25 +163,25 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_root_pri, tvb,
- BPDU_ROOT_PRI, 2, FALSE);
+ BPDU_ROOT_PRI, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_root_mac, tvb,
- BPDU_ROOT_MAC, 6, FALSE);
+ BPDU_ROOT_MAC, 6, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_root_cost, tvb,
- BPDU_ROOT_PATH_COST, 2, FALSE);
+ BPDU_ROOT_PATH_COST, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_bridge_pri, tvb,
- BPDU_BRIDGE_PRI, 2, FALSE);
+ BPDU_BRIDGE_PRI, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_bridge_mac, tvb,
- BPDU_BRIDGE_MAC, 6, FALSE);
+ BPDU_BRIDGE_MAC, 6, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_port_id, tvb,
- BPDU_PORT_IDENTIFIER, 1, FALSE);
+ BPDU_PORT_IDENTIFIER, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_msg_age, tvb,
- BPDU_MESSAGE_AGE, 1, FALSE);
+ BPDU_MESSAGE_AGE, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_hello_time, tvb,
- BPDU_HELLO_TIME, 1, FALSE);
+ BPDU_HELLO_TIME, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_max_age, tvb,
- BPDU_MAX_AGE, 1, FALSE);
+ BPDU_MAX_AGE, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_forward_delay, tvb,
- BPDU_FORWARD_DELAY, 1, FALSE);
+ BPDU_FORWARD_DELAY, 1, ENC_BIG_ENDIAN);
}
}
diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c
index c2a33023cc..a6d3feb61b 100644
--- a/epan/dissectors/packet-dec-dnart.c
+++ b/epan/dissectors/packet-dec-dnart.c
@@ -472,7 +472,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
offset += 3;
ti = proto_tree_add_item(rt_tree, hf_dec_rt_dst_addr, tvb,
- offset, 6, FALSE);
+ offset, 6, ENC_BIG_ENDIAN);
addr = dnet_ntoa(ep_tvb_memdup(tvb, offset, 6));
if (addr != NULL) {
proto_item_append_text(ti, " (%s)", addr);
@@ -483,7 +483,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
offset += 8;
ti = proto_tree_add_item(rt_tree, hf_dec_rt_src_addr, tvb,
- offset, 6, FALSE);
+ offset, 6, ENC_BIG_ENDIAN);
addr = dnet_ntoa(ep_tvb_memdup(tvb, offset, 6));
if (addr != NULL) {
proto_item_append_text(ti, " (%s)", addr);
@@ -907,26 +907,24 @@ handle_nsp_msg(
* There is still the segnum field
*/
seg_num = tvb_get_letohs(tvb, my_offset);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- if (nsp_msg_type == BOM_MSG) {
- dec_dna_total_bytes_this_segment = 0;
- col_append_fstr(pinfo->cinfo, COL_INFO,
- "msg nr. %d: start of segment",
- seg_num & 0xfff);
- } else if (nsp_msg_type == DATA_SEGMENT_MSG) {
- col_append_fstr(pinfo->cinfo, COL_INFO,
- "msg nr. %d: continuation segment ",
- seg_num & 0xfff);
- } else if (nsp_msg_type == EOM_MSG) {
- col_append_fstr(pinfo->cinfo, COL_INFO,
- "msg nr. %d: end of segment",
- seg_num & 0xfff);
- } else if (nsp_msg_type == BOM_EOM_MSG) {
- dec_dna_total_bytes_this_segment = 0;
- col_append_fstr(pinfo->cinfo, COL_INFO,
- "msg nr. %d single segment",
- seg_num & 0xfff);
- }
+ if (nsp_msg_type == BOM_MSG) {
+ dec_dna_total_bytes_this_segment = 0;
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "msg nr. %d: start of segment",
+ seg_num & 0xfff);
+ } else if (nsp_msg_type == DATA_SEGMENT_MSG) {
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "msg nr. %d: continuation segment ",
+ seg_num & 0xfff);
+ } else if (nsp_msg_type == EOM_MSG) {
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "msg nr. %d: end of segment",
+ seg_num & 0xfff);
+ } else if (nsp_msg_type == BOM_EOM_MSG) {
+ dec_dna_total_bytes_this_segment = 0;
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "msg nr. %d single segment",
+ seg_num & 0xfff);
}
/* This is the last field, the rest are data */
proto_tree_add_item(tree, hf_dec_rt_segnum,
@@ -939,11 +937,9 @@ handle_nsp_msg(
tvb_reported_length_remaining(tvb, my_offset);
dec_dna_previous_total = dec_dna_total_bytes_this_segment;
dec_dna_total_bytes_this_segment += data_length;
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO,
- ", bytes this segment: %d, total so far:%d",
- data_length, dec_dna_total_bytes_this_segment);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ ", bytes this segment: %d, total so far:%d",
+ data_length, dec_dna_total_bytes_this_segment);
/* We are done, return my_offset */
break;
case INTERRUPT_MSG: /* "Interrupt message" */
@@ -1025,23 +1021,21 @@ handle_nsp_msg(
my_offset += 2;
/* Now follows the ls_flags field */
ls_flags = tvb_get_guint8(tvb, my_offset);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- switch(ls_flags) {
- case 0: /* no change */
- col_append_str(pinfo->cinfo, COL_INFO,
- "(no change)");
- break;
- case 1: /* stop sending data */
- col_append_str(pinfo->cinfo, COL_INFO,
- "(stop)");
- break;
- case 2: /* send data */
- col_append_str(pinfo->cinfo, COL_INFO,
- "(go)");
- break;
- default:
- break;
- }
+ switch(ls_flags) {
+ case 0: /* no change */
+ col_append_str(pinfo->cinfo, COL_INFO,
+ "(no change)");
+ break;
+ case 1: /* stop sending data */
+ col_append_str(pinfo->cinfo, COL_INFO,
+ "(stop)");
+ break;
+ case 2: /* send data */
+ col_append_str(pinfo->cinfo, COL_INFO,
+ "(go)");
+ break;
+ default:
+ break;
}
fc_val = tvb_get_guint8(tvb, my_offset + 1);
ti = proto_tree_add_uint(tree, hf_dec_flow_control, tvb,
@@ -1063,13 +1057,12 @@ handle_nsp_msg(
ack_num & 0xfff);
my_offset += 2;
/* There may be an optional ack_oth field */
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO,
- "NSP data %s message(%d)",
- (ack_num & 0x1000) ? "NAK" : "ACK",
- ack_num & 0xfff);
- }
- if (tvb_length_remaining(tvb, my_offset) > 0) {
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "NSP data %s message(%d)",
+ (ack_num & 0x1000) ? "NAK" : "ACK",
+ ack_num & 0xfff);
+
+ if (tvb_length_remaining(tvb, my_offset) > 0) {
ack_oth = tvb_get_letohs(tvb, my_offset);
if (ack_oth & 0x8000) {
/* There is an ack_oth field */
diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c
index c5ff494f1d..fe77e8e25a 100644
--- a/epan/dissectors/packet-dhcp-failover.c
+++ b/epan/dissectors/packet-dhcp-failover.c
@@ -380,7 +380,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
length = tvb_get_ntohs(tvb, offset);
if (tree) {
/* create display subtree for the protocol */
- ti = proto_tree_add_item(tree, proto_dhcpfo, tvb, 0, -1, FALSE);
+ ti = proto_tree_add_item(tree, proto_dhcpfo, tvb, 0, -1, ENC_BIG_ENDIAN);
dhcpfo_tree = proto_item_add_subtree(ti, ett_dhcpfo);
@@ -401,10 +401,8 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(dhcpfo_tree,
hf_dhcpfo_type, tvb, offset, 1, type);
}
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_add_str(pinfo->cinfo, COL_INFO,
- val_to_str(type, failover_vals, "Unknown Packet"));
- }
+ col_add_str(pinfo->cinfo, COL_INFO,
+ val_to_str(type, failover_vals, "Unknown Packet"));
offset += 1;
poffset = tvb_get_guint8(tvb, offset);
@@ -450,10 +448,9 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
xid = tvb_get_ntohl(tvb, offset);
if (tree) {
proto_tree_add_item(dhcpfo_tree,
- hf_dhcpfo_xid, tvb, offset, 4, FALSE);
+ hf_dhcpfo_xid, tvb, offset, 4, ENC_BIG_ENDIAN);
}
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO," xid: %x", xid);
+ col_append_fstr(pinfo->cinfo, COL_INFO," xid: %x", xid);
offset += 4;
if (bogus_poffset)
@@ -465,7 +462,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* if there are any additional header bytes */
if (poffset != offset) {
proto_tree_add_item(dhcpfo_tree, hf_dhcpfo_additional_HB, tvb,
- offset, poffset-offset, FALSE);
+ offset, poffset-offset, ENC_BIG_ENDIAN);
offset = poffset;
}
@@ -474,7 +471,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return; /* no payload */
/* create display subtree for the payload */
pi = proto_tree_add_item(dhcpfo_tree, hf_dhcpfo_payload_data,
- tvb, poffset, length-poffset, FALSE);
+ tvb, poffset, length-poffset, ENC_BIG_ENDIAN);
payload_tree = proto_item_add_subtree(pi, ett_fo_payload);
while (offset < length) {
opcode = tvb_get_ntohs(tvb, offset);
@@ -482,7 +479,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
oi = proto_tree_add_item(payload_tree,
hf_dhcpfo_dhcp_style_option, tvb, offset,
- option_length+4, FALSE);
+ option_length+4, ENC_BIG_ENDIAN);
option_tree = proto_item_add_subtree(oi, ett_fo_option);
/*** DHCP-Style-Options ****/
@@ -513,7 +510,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(option_tree,
hf_dhcpfo_binding_status, tvb,
- offset, 1, FALSE);
+ offset, 1, ENC_BIG_ENDIAN);
break;
case DHCP_FO_PD_ASSIGNED_IP_ADDRESS:
@@ -530,7 +527,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(option_tree,
hf_dhcpfo_assigned_ip_address, tvb, offset,
- option_length, FALSE);
+ option_length, ENC_BIG_ENDIAN);
break;
case DHCP_FO_PD_SENDING_SERVER_IP_ADDRESS:
@@ -546,7 +543,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sending_server_ip_address_str);
proto_tree_add_item(option_tree,
hf_dhcpfo_sending_server_ip_address, tvb,
- offset, option_length, FALSE);
+ offset, option_length, ENC_BIG_ENDIAN);
break;
case DHCP_FO_PD_ADDRESSES_TRANSFERED:
@@ -603,7 +600,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case DHCP_FO_PD_FTDDNS:
proto_tree_add_item(option_tree, hf_dhcpfo_ftddns, tvb,
- offset, option_length, FALSE);
+ offset, option_length, ENC_BIG_ENDIAN);
break;
case DHCP_FO_PD_REJECT_REASON:
@@ -627,7 +624,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case DHCP_FO_PD_MESSAGE:
proto_tree_add_item(option_tree, hf_dhcpfo_message, tvb,
- offset, option_length, FALSE);
+ offset, option_length, ENC_BIG_ENDIAN);
break;
case DHCP_FO_PD_MCLT:
@@ -821,7 +818,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case DHCP_FO_PD_VENDOR_OPTION:
proto_tree_add_item(option_tree,
hf_dhcpfo_vendor_option, tvb, offset,
- option_length, FALSE);
+ option_length, ENC_BIG_ENDIAN);
break;
case DHCP_FO_PD_MAX_UNACKED_BNDUPD:
@@ -860,7 +857,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case DHCP_FO_PD_HASH_BUCKET_ASSIGNMENT:
proto_tree_add_item(option_tree,
hf_dhcpfo_hash_bucket_assignment, tvb,
- offset, option_length, FALSE);
+ offset, option_length, ENC_BIG_ENDIAN);
break;
case DHCP_FO_PD_MESSAGE_DIGEST:
@@ -886,7 +883,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(option_tree,
hf_dhcpfo_message_digest, tvb, offset+1,
- option_length-1, FALSE);
+ option_length-1, ENC_BIG_ENDIAN);
break;
case DHCP_FO_PD_PROTOCOL_VERSION:
diff --git a/epan/dissectors/packet-dis.c b/epan/dissectors/packet-dis.c
index eadcbae181..e93dd37ba3 100644
--- a/epan/dissectors/packet-dis.c
+++ b/epan/dissectors/packet-dis.c
@@ -405,45 +405,42 @@ static gint dissect_dis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_set_end(dis_payload_node, tvb, offset);
}
- /* add detail to the INFO column if avalaible */
- if ( check_col( pinfo->cinfo, COL_INFO) ) {
-
- switch (pduType)
- {
- /* DIS Entity Information / Interaction PDUs */
- case DIS_PDUTYPE_ENTITY_STATE:
- col_add_fstr( pinfo->cinfo, COL_INFO,
- "PDUType: %s, %s, %s",
- pduString,
- val_to_str(entityKind, DIS_PDU_EntityKind_Strings, "Unknown Entity Kind"),
- val_to_str(entityDomain, DIS_PDU_Domain_Strings, "Unknown Entity Domain")
- );
- break;
+ /* Add detail to the INFO column */
+ switch (pduType)
+ {
+ /* DIS Entity Information / Interaction PDUs */
+ case DIS_PDUTYPE_ENTITY_STATE:
+ col_add_fstr( pinfo->cinfo, COL_INFO,
+ "PDUType: %s, %s, %s",
+ pduString,
+ val_to_str(entityKind, DIS_PDU_EntityKind_Strings, "Unknown Entity Kind"),
+ val_to_str(entityDomain, DIS_PDU_Domain_Strings, "Unknown Entity Domain")
+ );
+ break;
- case DIS_PDUTYPE_SIGNAL:
- col_add_fstr( pinfo->cinfo, COL_INFO,
- "PDUType: %s, RadioID=%u, Encoding Type=%s, Number of Samples=%u",
- pduString,
- radioID,
- val_to_str(DIS_ENCODING_TYPE(encodingScheme), DIS_PDU_Encoding_Type_Strings, "Unknown Encoding Type"),
- numSamples
- );
- break;
- case DIS_PDUTYPE_TRANSMITTER:
- col_add_fstr( pinfo->cinfo, COL_INFO,
- "PDUType: %s, RadioID=%u, Transmit State=%s",
- pduString,
- radioID,
- val_to_str(disRadioTransmitState, DIS_PDU_RadioTransmitState_Strings, "Unknown Transmit State")
- );
- break;
- default:
- /* set the basic info column (pdu type) */
- col_add_fstr( pinfo->cinfo, COL_INFO,
- "PDUType: %s",
- pduString);
- break;
- }
+ case DIS_PDUTYPE_SIGNAL:
+ col_add_fstr( pinfo->cinfo, COL_INFO,
+ "PDUType: %s, RadioID=%u, Encoding Type=%s, Number of Samples=%u",
+ pduString,
+ radioID,
+ val_to_str(DIS_ENCODING_TYPE(encodingScheme), DIS_PDU_Encoding_Type_Strings, "Unknown Encoding Type"),
+ numSamples
+ );
+ break;
+ case DIS_PDUTYPE_TRANSMITTER:
+ col_add_fstr( pinfo->cinfo, COL_INFO,
+ "PDUType: %s, RadioID=%u, Transmit State=%s",
+ pduString,
+ radioID,
+ val_to_str(disRadioTransmitState, DIS_PDU_RadioTransmitState_Strings, "Unknown Transmit State")
+ );
+ break;
+ default:
+ /* set the basic info column (pdu type) */
+ col_add_fstr( pinfo->cinfo, COL_INFO,
+ "PDUType: %s",
+ pduString);
+ break;
}
return tvb_length(tvb);
diff --git a/epan/dissectors/packet-distcc.c b/epan/dissectors/packet-distcc.c
index 3479c06fac..88a6554875 100644
--- a/epan/dissectors/packet-distcc.c
+++ b/epan/dissectors/packet-distcc.c
@@ -97,9 +97,7 @@ dissect_distcc_dist(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
{
proto_tree_add_uint_format(tree, hf_distcc_version, tvb, offset-12, 12, parameter, "DIST: %d", parameter);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "DIST:%d ", parameter);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, "DIST:%d ", parameter);
return offset;
}
@@ -109,9 +107,7 @@ dissect_distcc_done(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
{
proto_tree_add_uint_format(tree, hf_distcc_version, tvb, offset-12, 12, parameter, "DONE: %d", parameter);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "DONE:%d ", parameter);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, "DONE:%d ", parameter);
return offset;
}
@@ -121,9 +117,7 @@ dissect_distcc_stat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
{
proto_tree_add_uint_format(tree, hf_distcc_stat, tvb, offset-12, 12, parameter, "STAT: %d", parameter);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "STAT:%d ", parameter);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, "STAT:%d ", parameter);
return offset;
}
@@ -133,9 +127,7 @@ dissect_distcc_argc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
{
proto_tree_add_uint_format(tree, hf_distcc_argc, tvb, offset-12, 12, parameter, "ARGC: %d", parameter);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "ARGC:%d ", parameter);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, "ARGC:%d ", parameter);
return offset;
}
@@ -159,11 +151,9 @@ dissect_distcc_argv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
tvb_memcpy(tvb, argv, offset, argv_len);
argv[argv_len]=0;
- proto_tree_add_item(tree, hf_distcc_argv, tvb, offset, len, FALSE);
+ proto_tree_add_item(tree, hf_distcc_argv, tvb, offset, len, ENC_BIG_ENDIAN);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", argv);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", argv);
if(len!=parameter){
proto_tree_add_text(tree, tvb, 0, 0, "[Short ARGV PDU]");
@@ -190,11 +180,9 @@ dissect_distcc_serr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
tvb_memcpy(tvb, argv, offset, argv_len);
argv[argv_len]=0;
- proto_tree_add_item(tree, hf_distcc_serr, tvb, offset, len, FALSE);
+ proto_tree_add_item(tree, hf_distcc_serr, tvb, offset, len, ENC_BIG_ENDIAN);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "SERR:%s ", argv);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, "SERR:%s ", argv);
if(len!=parameter){
proto_tree_add_text(tree, tvb, 0, 0, "[Short SERR PDU]");
@@ -221,11 +209,9 @@ dissect_distcc_sout(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
tvb_memcpy(tvb, argv, offset, argv_len);
argv[argv_len]=0;
- proto_tree_add_item(tree, hf_distcc_sout, tvb, offset, len, FALSE);
+ proto_tree_add_item(tree, hf_distcc_sout, tvb, offset, len, ENC_BIG_ENDIAN);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "SOUT:%s ", argv);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, "SOUT:%s ", argv);
if(len!=parameter){
proto_tree_add_text(tree, tvb, 0, 0, "[Short SOUT PDU]");
@@ -247,7 +233,7 @@ dissect_distcc_doti(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
col_append_str(pinfo->cinfo, COL_INFO, "DOTI source ");
- proto_tree_add_item(tree, hf_distcc_doti_source, tvb, offset, len, FALSE);
+ proto_tree_add_item(tree, hf_distcc_doti_source, tvb, offset, len, ENC_BIG_ENDIAN);
if(len!=parameter){
proto_tree_add_text(tree, tvb, 0, 0, "[Short DOTI PDU]");
}
@@ -267,7 +253,7 @@ dissect_distcc_doto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
col_append_str(pinfo->cinfo, COL_INFO, "DOTO object ");
- proto_tree_add_item(tree, hf_distcc_doto_object, tvb, offset, len, FALSE);
+ proto_tree_add_item(tree, hf_distcc_doto_object, tvb, offset, len, ENC_BIG_ENDIAN);
if(len!=parameter){
proto_tree_add_text(tree, tvb, 0, 0, "[Short DOTO PDU]");
}
@@ -293,7 +279,7 @@ dissect_distcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
if (parent_tree) {
item = proto_tree_add_item(parent_tree, proto_distcc, tvb, offset,
- -1, FALSE);
+ -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_distcc);
}
diff --git a/epan/dissectors/packet-dlm3.c b/epan/dissectors/packet-dlm3.c
index bdd07b751c..3ea6e09d69 100644
--- a/epan/dissectors/packet-dlm3.c
+++ b/epan/dissectors/packet-dlm3.c
@@ -463,86 +463,85 @@ dissect_dlm3_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
m_type = tvb_get_letohl(tvb, offset);
proto_tree_add_uint(tree,
hf_dlm3_m_type, tvb, offset, 4, m_type);
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO,
- ": %s",
- val_to_str(m_type,
- dlm3_msg,
- "Unknown"));
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ ": %s",
+ val_to_str(m_type,
+ dlm3_msg,
+ "Unknown"));
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_nodeid, tvb, offset, 4, TRUE);
+ hf_dlm3_m_nodeid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_pid, tvb, offset, 4, TRUE);
+ hf_dlm3_m_pid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_lkid, tvb, offset, 4, TRUE);
+ hf_dlm3_m_lkid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
/* TODO: See `create_lkb'
lkid has some structure. We dissect more. */
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_remid, tvb, offset, 4, TRUE);
+ hf_dlm3_m_remid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_parent_lkid, tvb, offset, 4, TRUE);
+ hf_dlm3_m_parent_lkid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_parent_remid, tvb, offset, 4, TRUE);
+ hf_dlm3_m_parent_remid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_m_exflags, ett_dlm3_m_exflags,
- m_exflags_fields, TRUE);
+ m_exflags_fields, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_m_sbflags, ett_dlm3_sbflags,
- m_sbflags_fields, TRUE);
+ m_sbflags_fields, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_m_flags, ett_dlm3_m_flags,
- m_flags_fields, TRUE);
+ m_flags_fields, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_lvbseq, tvb, offset, 4, TRUE);
+ hf_dlm3_m_lvbseq, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_hash, tvb, offset, 4, TRUE);
+ hf_dlm3_m_hash, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_status, tvb, offset, 4, TRUE);
+ hf_dlm3_m_status, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_grmode, tvb, offset, 4, TRUE);
+ hf_dlm3_m_grmode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_rqmode, tvb, offset, 4, TRUE);
+ hf_dlm3_m_rqmode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_bastmode, tvb, offset, 4, TRUE);
+ hf_dlm3_m_bastmode, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_m_asts, ett_dlm3_m_asts,
- m_asts_fields, TRUE);
+ m_asts_fields, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_m_result, tvb, offset, 4, TRUE);
+ hf_dlm3_m_result, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
if ((length - offset) > 0) {
@@ -551,7 +550,7 @@ dissect_dlm3_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tvb,
offset,
-1,
- TRUE);
+ ENC_LITTLE_ENDIAN);
}
}
@@ -574,64 +573,64 @@ dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
proto_tree_add_item(tree,
- hf_dlm3_rl_ownpid, tvb, offset, 4, TRUE);
+ hf_dlm3_rl_ownpid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rl_lkid, tvb, offset, 4, TRUE);
+ hf_dlm3_rl_lkid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rl_remid, tvb, offset, 4, TRUE);
+ hf_dlm3_rl_remid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rl_parent_lkid, tvb, offset, 4, TRUE);
+ hf_dlm3_rl_parent_lkid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rl_parent_remid, tvb, offset, 4, TRUE);
+ hf_dlm3_rl_parent_remid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_rl_exflags, ett_dlm3_rl_exflags,
- rl_exflags_fields, TRUE);
+ rl_exflags_fields, ENC_LITTLE_ENDIAN);
exflags = tvb_get_letohl(tvb, offset);
offset += 4;
proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_rl_flags, ett_dlm3_rl_flags,
- rl_flags_fields, TRUE);
+ rl_flags_fields, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rl_lvbseq, tvb, offset, 4, TRUE);
+ hf_dlm3_rl_lvbseq, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rl_result, tvb, offset, 4, TRUE);
+ hf_dlm3_rl_result, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rl_rqmode, tvb, offset, 1, TRUE);
+ hf_dlm3_rl_rqmode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item(tree,
- hf_dlm3_rl_grmode, tvb, offset, 1, TRUE);
+ hf_dlm3_rl_grmode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item(tree,
- hf_dlm3_rl_status, tvb, offset, 1, TRUE);
+ hf_dlm3_rl_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_rl_asts, ett_dlm3_rl_asts,
- rl_asts_fields, TRUE);
+ rl_asts_fields, ENC_LITTLE_ENDIAN);
offset += 1;
proto_tree_add_item(tree,
- hf_dlm3_rl_wait_type, tvb, offset, 2, TRUE);
+ hf_dlm3_rl_wait_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
namelen = tvb_get_letohs(tvb, offset);
@@ -642,26 +641,26 @@ dissect_dlm3_rcom_lock(tvbuff_t *tvb, proto_tree *tree,
offset += 2;
sub_item = proto_tree_add_item(tree,
hf_dlm3_rl_name, tvb, offset,
- DLM3_RESNAME_MAXLEN, TRUE);
+ DLM3_RESNAME_MAXLEN, ENC_LITTLE_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item,
ett_dlm3_rl_name);
sub_offset = offset;
proto_tree_add_item(sub_tree,
hf_dlm3_rl_name_contents, tvb, sub_offset,
- namelen, TRUE);
+ namelen, ENC_LITTLE_ENDIAN);
sub_offset += namelen;
proto_tree_add_item(sub_tree,
hf_dlm3_rl_name_padding, tvb, sub_offset,
- DLM3_RESNAME_MAXLEN - namelen, TRUE);
+ DLM3_RESNAME_MAXLEN - namelen, ENC_LITTLE_ENDIAN);
offset += DLM3_RESNAME_MAXLEN;
if (((length - offset) > 0) && (exflags & DLM3_LKF_VALBLK))
proto_tree_add_item(tree,
hf_dlm3_rl_lvb, tvb, offset,
-1,
- TRUE);
+ ENC_LITTLE_ENDIAN);
}
@@ -673,16 +672,16 @@ dissect_dlm3_rcom_config(tvbuff_t *tvb, proto_tree *tree,
return;
proto_tree_add_item(tree,
- hf_dlm3_rf_lvblen, tvb, offset, 4, TRUE);
+ hf_dlm3_rf_lvblen, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_bitmask(tree, tvb, offset,
hf_dlm3_rf_lsflags, ett_dlm3_rf_lsflags,
- rf_lsflags_fields, TRUE);
+ rf_lsflags_fields, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rf_unused, tvb, offset, 8, TRUE);
+ hf_dlm3_rf_unused, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
@@ -702,28 +701,27 @@ dissect_dlm3_rcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
rc_type = tvb_get_letohl(tvb, offset);
proto_tree_add_uint(tree,
hf_dlm3_rc_type, tvb, offset, 4, rc_type);
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO,
- ": %s",
- val_to_str(rc_type,
- dlm3_rcom,
- "Unknown"));
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ ": %s",
+ val_to_str(rc_type,
+ dlm3_rcom,
+ "Unknown"));
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rc_result, tvb, offset, 4, TRUE);
+ hf_dlm3_rc_result, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_rc_id, tvb, offset, 8, TRUE);
+ hf_dlm3_rc_id, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
proto_tree_add_item(tree,
- hf_dlm3_rc_seq, tvb, offset, 8, TRUE);
+ hf_dlm3_rc_seq, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
proto_tree_add_item(tree,
- hf_dlm3_rc_seq_reply, tvb, offset, 8, TRUE);
+ hf_dlm3_rc_seq_reply, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
if ((length - offset) == 0) {
@@ -737,7 +735,7 @@ dissect_dlm3_rcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tvb,
offset,
-1,
- TRUE);
+ ENC_LITTLE_ENDIAN);
offset += 0;
if (rc_type == DLM3_RCOM_LOCK) {
@@ -791,8 +789,7 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
col_set_str(pinfo->cinfo, COL_INFO, "DLM3");
- if (check_col(pinfo->cinfo, COL_INFO))
- col_set_str(pinfo->cinfo, COL_INFO,
+ col_set_str(pinfo->cinfo, COL_INFO,
val_to_str_const(h_cmd,
dlm3_cmd,
"packet-dlm3.c internal bug"));
@@ -801,7 +798,7 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
offset = 0;
item = proto_tree_add_item(parent_tree, proto_dlm3, tvb, offset,
- -1, TRUE);
+ -1, ENC_LITTLE_ENDIAN);
tree = proto_item_add_subtree(item, ett_dlm3);
sub_item = proto_tree_add_uint(tree,
@@ -818,14 +815,14 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_h_lockspace, tvb, offset, 4, TRUE);
+ hf_dlm3_h_lockspace, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_h_nodeid, tvb, offset, 4, TRUE);
+ hf_dlm3_h_nodeid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(tree,
- hf_dlm3_h_length, tvb, offset, 2, TRUE);
+ hf_dlm3_h_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
sub_item = proto_tree_add_uint(tree,
@@ -833,7 +830,7 @@ dissect_dlm3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
offset += 1;
proto_tree_add_item(tree,
- hf_dlm3_h_pad, tvb, offset, 1, TRUE);
+ hf_dlm3_h_pad, tvb, offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
diff --git a/epan/dissectors/packet-dlsw.c b/epan/dissectors/packet-dlsw.c
index fc53d34493..69b9c9e303 100644
--- a/epan/dissectors/packet-dlsw.c
+++ b/epan/dissectors/packet-dlsw.c
@@ -225,12 +225,11 @@ dissect_dlsw_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
version=tvb_get_guint8(tvb,0);
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO, "DLSw %s",val_to_str(version , dlsw_version_vals, "Unknown Version"));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "DLSw %s",val_to_str(version , dlsw_version_vals, "Unknown Version"));
if (tree)
{
- ti = proto_tree_add_item(tree, proto_dlsw, tvb, 0, -1, FALSE);
+ ti = proto_tree_add_item(tree, proto_dlsw, tvb, 0, -1, ENC_BIG_ENDIAN);
dlsw_tree = proto_item_add_subtree(ti, ett_dlsw);
hlen=tvb_get_guint8(tvb,1);
@@ -250,8 +249,7 @@ dissect_dlsw_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} ;
mtype=tvb_get_guint8(tvb,14);
- if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",val_to_str(mtype , dlsw_type_vals, "Unknown message Type"));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",val_to_str(mtype , dlsw_type_vals, "Unknown message Type"));
if (tree)
{
proto_tree_add_text (dlsw_header_tree,tvb,14,1,"Message Type = %s (0x%02x)",
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c
index d6f64aaea8..5dba9b69fa 100644
--- a/epan/dissectors/packet-dmp.c
+++ b/epan/dissectors/packet-dmp.c
@@ -4034,7 +4034,6 @@ static void dissect_dmp (tvbuff_t *tvb, packet_info *pinfo,
dmp_add_seq_ack_analysis (tvb, pinfo, dmp_tree, offset);
}
- if (check_col (pinfo->cinfo, COL_INFO)) {
if (((dmp.msg_type == STANAG) || (dmp.msg_type == IPM) ||
(dmp.msg_type == REPORT) || (dmp.msg_type == NOTIF)) &&
dmp.id_val && dmp.id_val->msg_resend_count)
@@ -4054,49 +4053,48 @@ static void dissect_dmp (tvbuff_t *tvb, packet_info *pinfo,
col_append_fstr (pinfo->cinfo, COL_INFO, "[Dup ACK %d#%d] ",
dmp.id_val->ack_id, dmp.id_val->ack_resend_count);
retrans_or_dup_ack = TRUE;
+ }
+ if (dmp_align && !retrans_or_dup_ack) {
+ if (dmp.msg_type == ACK) {
+ /* ACK does not have "Msg Id" */
+ col_append_fstr (pinfo->cinfo, COL_INFO, "%-45.45s", msg_type_to_str ());
+ } else {
+ col_append_fstr (pinfo->cinfo, COL_INFO, "%-31.31s", msg_type_to_str ());
}
+ } else {
+ col_append_str (pinfo->cinfo, COL_INFO, msg_type_to_str ());
+ }
+ if ((dmp.msg_type == STANAG) || (dmp.msg_type == IPM) ||
+ (dmp.msg_type == REPORT) || (dmp.msg_type == NOTIF))
+ {
if (dmp_align && !retrans_or_dup_ack) {
- if (dmp.msg_type == ACK) {
- /* ACK does not have "Msg Id" */
- col_append_fstr (pinfo->cinfo, COL_INFO, "%-45.45s", msg_type_to_str ());
- } else {
- col_append_fstr (pinfo->cinfo, COL_INFO, "%-31.31s", msg_type_to_str ());
- }
+ col_append_fstr (pinfo->cinfo, COL_INFO, " Msg Id: %5d", dmp.msg_id);
} else {
- col_append_str (pinfo->cinfo, COL_INFO, msg_type_to_str ());
- }
- if ((dmp.msg_type == STANAG) || (dmp.msg_type == IPM) ||
- (dmp.msg_type == REPORT) || (dmp.msg_type == NOTIF))
- {
- if (dmp_align && !retrans_or_dup_ack) {
- col_append_fstr (pinfo->cinfo, COL_INFO, " Msg Id: %5d", dmp.msg_id);
- } else {
- col_append_fstr (pinfo->cinfo, COL_INFO, ", Msg Id: %d", dmp.msg_id);
- }
+ col_append_fstr (pinfo->cinfo, COL_INFO, ", Msg Id: %d", dmp.msg_id);
}
- if ((dmp.msg_type == REPORT) || (dmp.msg_type == NOTIF) ||
- (dmp.msg_type == ACK))
- {
- if (dmp_align && !retrans_or_dup_ack) {
- col_append_fstr (pinfo->cinfo, COL_INFO, " Subj Id: %5d",
- dmp.subj_id);
- } else {
- col_append_fstr (pinfo->cinfo, COL_INFO, ", Subj Id: %d",
- dmp.subj_id);
- }
- } else if (dmp.struct_id) {
- if (dmp_align && !retrans_or_dup_ack) {
- col_append_fstr (pinfo->cinfo, COL_INFO, " Body Id: %s",
- format_text (dmp.struct_id, strlen (dmp.struct_id)));
- } else {
- col_append_fstr (pinfo->cinfo, COL_INFO, ", Body Id: %s",
- format_text (dmp.struct_id, strlen (dmp.struct_id)));
- }
+ }
+ if ((dmp.msg_type == REPORT) || (dmp.msg_type == NOTIF) ||
+ (dmp.msg_type == ACK))
+ {
+ if (dmp_align && !retrans_or_dup_ack) {
+ col_append_fstr (pinfo->cinfo, COL_INFO, " Subj Id: %5d",
+ dmp.subj_id);
+ } else {
+ col_append_fstr (pinfo->cinfo, COL_INFO, ", Subj Id: %d",
+ dmp.subj_id);
}
- if (dmp.checksum && (checksum1 != checksum2)) {
- col_append_str (pinfo->cinfo, COL_INFO, ", Checksum incorrect");
+ } else if (dmp.struct_id) {
+ if (dmp_align && !retrans_or_dup_ack) {
+ col_append_fstr (pinfo->cinfo, COL_INFO, " Body Id: %s",
+ format_text (dmp.struct_id, strlen (dmp.struct_id)));
+ } else {
+ col_append_fstr (pinfo->cinfo, COL_INFO, ", Body Id: %s",
+ format_text (dmp.struct_id, strlen (dmp.struct_id)));
}
}
+ if (dmp.checksum && (checksum1 != checksum2)) {
+ col_append_str (pinfo->cinfo, COL_INFO, ", Checksum incorrect");
+ }
proto_item_append_text (ti, ", Version: %d%s, %s", dmp.version,
(dmp.prot_id == PROT_NAT ? " (national)" : ""),