diff options
author | Anders Broman <anders.broman@ericsson.com> | 2011-09-26 11:33:10 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2011-09-26 11:33:10 +0000 |
commit | ab901be153637f37698e9501dac9d38b10bf46ec (patch) | |
tree | 66930c9969eccd09aa135bc6b8c3dde0967ec5ae | |
parent | fc447d3377db6a9a8e2cc519087f8054e85c143c (diff) |
Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39148
-rw-r--r-- | epan/dissectors/packet-daytime.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-dccp.c | 37 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom-dispatch.c | 50 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom-oxid.c | 26 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom-remact.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom-remunkn.c | 50 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom.c | 39 |
7 files changed, 87 insertions, 139 deletions
diff --git a/epan/dissectors/packet-daytime.c b/epan/dissectors/packet-daytime.c index 31c2960039..6bd8e78650 100644 --- a/epan/dissectors/packet-daytime.c +++ b/epan/dissectors/packet-daytime.c @@ -47,20 +47,18 @@ dissect_daytime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "DAYTIME"); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "DAYTIME %s", - pinfo->srcport == pinfo->match_uint ? "Response":"Request"); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "DAYTIME %s", + pinfo->srcport == pinfo->match_uint ? "Response":"Request"); if (tree) { - ti = proto_tree_add_item(tree, proto_daytime, tvb, 0, -1, FALSE); + ti = proto_tree_add_item(tree, proto_daytime, tvb, 0, -1, ENC_BIG_ENDIAN); daytime_tree = proto_item_add_subtree(ti, ett_daytime); proto_tree_add_text(daytime_tree, tvb, 0, 0, pinfo->srcport==DAYTIME_PORT ? "Type: Response":"Type: Request"); if (pinfo->srcport == DAYTIME_PORT) { - proto_tree_add_item(daytime_tree, hf_daytime_string, tvb, 0, -1, FALSE); + proto_tree_add_item(daytime_tree, hf_daytime_string, tvb, 0, -1, ENC_BIG_ENDIAN); } } } diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c index 15ce87809b..791283c519 100644 --- a/epan/dissectors/packet-dccp.c +++ b/epan/dissectors/packet-dccp.c @@ -644,12 +644,11 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* DBG("dccph->seq[24bits]: %" G_GINT64_MODIFIER "u\n", dccph->seq); */ } - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "%s > %s [%s] Seq=%" G_GINT64_MODIFIER "u", - get_dccp_port(dccph->sport), - get_dccp_port(dccph->dport), - val_to_str(dccph->type, dccp_packet_type_vals, "Unknown Type"), - dccph->seq); + col_add_fstr(pinfo->cinfo, COL_INFO, "%s > %s [%s] Seq=%" G_GINT64_MODIFIER "u", + get_dccp_port(dccph->sport), + get_dccp_port(dccph->dport), + val_to_str(dccph->type, dccp_packet_type_vals, "Unknown Type"), + dccph->seq); if (tree) { @@ -663,7 +662,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) val_to_str(dccph->type, dccp_packet_type_vals, "Unknown Type"), dccph->seq); } else { - dccp_item = proto_tree_add_item(tree, proto_dccp, tvb, offset, 8, FALSE); + dccp_item = proto_tree_add_item(tree, proto_dccp, tvb, offset, 8, ENC_BIG_ENDIAN); } dccp_tree = proto_item_add_subtree(dccp_item, ett_dccp); @@ -772,8 +771,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dccph->service_code=tvb_get_ntohl(tvb, offset); if(tree) proto_tree_add_uint(dccp_tree, hf_dccp_service_code, tvb, offset, 4, dccph->service_code); - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " (service=%u)", dccph->service_code); + col_append_fstr(pinfo->cinfo, COL_INFO, " (service=%u)", dccph->service_code); offset+=4; /* Skip over service code */ break; @@ -795,8 +793,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(tree) proto_tree_add_uint64(dccp_tree, hf_dccp_ack, tvb, offset + 2, 6, dccph->ack); - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); + col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); offset+=8; /* Skip over Acknowledgement Number Subheader */ @@ -808,8 +805,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dccph->service_code=tvb_get_ntohl(tvb, offset); if(tree) proto_tree_add_uint(dccp_tree, hf_dccp_service_code, tvb, offset, 4, dccph->service_code); - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " (service=%u)", dccph->service_code); + col_append_fstr(pinfo->cinfo, COL_INFO, " (service=%u)", dccph->service_code); offset+=4; /* Skip over service code */ break; @@ -836,8 +832,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dccph->ack+=tvb_get_ntohl(tvb, offset+4); if(tree) proto_tree_add_uint64(dccp_tree, hf_dccp_ack, tvb, offset + 2, 6, dccph->ack); - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); + col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); offset+=8; /* Skip over Acknowledgement Number Subheader */ } else { @@ -856,8 +851,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dccph->ack+=tvb_get_ntohs(tvb, offset+2); if(tree) proto_tree_add_uint64(dccp_tree, hf_dccp_ack, tvb, offset + 1, 3, dccph->ack); - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); + col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); offset+=4; /* Skip over Acknowledgement Number Subheader */ } @@ -879,8 +873,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dccph->ack+=tvb_get_ntohl(tvb, offset+4); if(tree) proto_tree_add_uint64(dccp_tree, hf_dccp_ack, tvb, offset + 2, 6, dccph->ack); - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); + col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); offset+=8; /* Skip over Acknowledgement Number Subheader */ @@ -894,8 +887,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(dccp_tree, hf_dccp_data2, tvb, offset + 2, 1, dccph->data2); proto_tree_add_uint(dccp_tree, hf_dccp_data3, tvb, offset + 3, 1, dccph->data3); } - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " (code=%s)", val_to_str(dccph->reset_code, dccp_reset_code_vals, "Unknown")); + col_append_fstr(pinfo->cinfo, COL_INFO, " (code=%s)", val_to_str(dccph->reset_code, dccp_reset_code_vals, "Unknown")); offset+=4; /* Skip over Reset Code and data123 */ break; @@ -919,8 +911,7 @@ static void dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dccph->ack+=tvb_get_ntohl(tvb, offset+4); if(tree) proto_tree_add_uint64(dccp_tree, hf_dccp_ack, tvb, offset + 2, 6, dccph->ack); - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); + col_append_fstr(pinfo->cinfo, COL_INFO, " (Ack=%" G_GINT64_MODIFIER "u)", dccph->ack); offset+=8; /* Skip over Acknowledgement Number Subheader */ break; diff --git a/epan/dissectors/packet-dcom-dispatch.c b/epan/dissectors/packet-dcom-dispatch.c index 07b76ad024..8d5302ec19 100644 --- a/epan/dissectors/packet-dcom-dispatch.c +++ b/epan/dissectors/packet-dcom-dispatch.c @@ -121,10 +121,8 @@ dissect_IDispatch_GetTypeInfoCount_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); return offset; } @@ -167,10 +165,8 @@ dissect_IDispatch_GetTypeInfo_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); return offset; } @@ -207,9 +203,7 @@ dissect_IDispatch_GetIDsOfNames_rqst(tvbuff_t *tvb, int offset, if (u32Pointer) { u32VariableOffset = dissect_dcom_LPWSTR(tvb, u32VariableOffset, pinfo, tree, drep, hf_dispatch_name, szName, sizeof(szName)); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", szName); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " \"%s\"", szName); } } @@ -245,19 +239,15 @@ dissect_IDispatch_GetIDsOfNames_resp(tvbuff_t *tvb, int offset, while (u32Tmp--) { offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, hf_dispatch_id, &u32DispId); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispId); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispId); } /* HRESULT of call */ offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); return offset; } @@ -293,9 +283,7 @@ dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset, offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep, hf_dispatch_id, &u32DispIdMember); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispIdMember); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " ID=0x%x", u32DispIdMember); offset = dissect_dcom_UUID(tvb, offset, pinfo, tree, drep, hf_dispatch_riid, &riid); @@ -333,7 +321,7 @@ dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset, offset = u32TmpOffset; - dispparams_item = proto_tree_add_item(tree, hf_dispatch_dispparams, tvb, offset, 0, FALSE); + dispparams_item = proto_tree_add_item(tree, hf_dispatch_dispparams, tvb, offset, 0, ENC_BIG_ENDIAN); dispparams_tree = proto_item_add_subtree (dispparams_item, ett_dispatch_params); u32SubStart = offset; @@ -404,10 +392,8 @@ dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset, } } - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, - " Args=%u NamedArgs=%u VarRef=%u", u32Args, u32NamedArgs, u32VarRef); - } + col_append_fstr(pinfo->cinfo, COL_INFO, + " Args=%u NamedArgs=%u VarRef=%u", u32Args, u32NamedArgs, u32VarRef); return u32VariableOffset; } @@ -445,7 +431,7 @@ dissect_IDispatch_Invoke_resp(tvbuff_t *tvb, int offset, } /* ExcepInfo */ - excepinfo_item = proto_tree_add_item(tree, hf_dispatch_excepinfo, tvb, offset, 0, FALSE); + excepinfo_item = proto_tree_add_item(tree, hf_dispatch_excepinfo, tvb, offset, 0, ENC_BIG_ENDIAN); excepinfo_tree = proto_item_add_subtree (excepinfo_item, ett_dispatch_excepinfo); u32SubStart = offset; @@ -507,12 +493,10 @@ dissect_IDispatch_Invoke_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " SCode=%s VarRef=%u -> %s", - val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"), - u32VarRef, - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " SCode=%s VarRef=%u -> %s", + val_to_str(u32SCode, dcom_hresult_vals, "Unknown (0x%08x)"), + u32VarRef, + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); return offset; } diff --git a/epan/dissectors/packet-dcom-oxid.c b/epan/dissectors/packet-dcom-oxid.c index 4503b5948a..74758f8f82 100644 --- a/epan/dissectors/packet-dcom-oxid.c +++ b/epan/dissectors/packet-dcom-oxid.c @@ -82,10 +82,8 @@ dissect_oxid_simple_ping_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); return offset; } @@ -101,10 +99,8 @@ dissect_oxid_server_alive_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); return offset; } @@ -130,10 +126,8 @@ dissect_oxid_complex_ping_rqst(tvbuff_t *tvb, int offset, offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep, hf_oxid_delfromset, &u16DelFromSet); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " AddToSet=%u DelFromSet=%u", + col_append_fstr(pinfo->cinfo, COL_INFO, " AddToSet=%u DelFromSet=%u", u16AddToSet, u16DelFromSet); - } offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, &u32Pointer); @@ -179,10 +173,8 @@ dissect_oxid_complex_ping_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); return offset; } @@ -252,10 +244,8 @@ dissect_oxid_resolve_oxid2_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } return offset; } diff --git a/epan/dissectors/packet-dcom-remact.c b/epan/dissectors/packet-dcom-remact.c index 0eb7552bd1..1953862fc5 100644 --- a/epan/dissectors/packet-dcom-remact.c +++ b/epan/dissectors/packet-dcom-remact.c @@ -183,11 +183,9 @@ dissect_remact_remote_activation_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_indexed_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult, u32Idx); /* update column info now */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"), - u32Idx); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"), + u32Idx); u32Idx++; } @@ -195,10 +193,8 @@ dissect_remact_remote_activation_resp(tvbuff_t *tvb, int offset, &u32HResult); /* update column info now */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)")); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)")); return offset; } diff --git a/epan/dissectors/packet-dcom-remunkn.c b/epan/dissectors/packet-dcom-remunkn.c index bfd3d10207..1cbab9180b 100644 --- a/epan/dissectors/packet-dcom-remunkn.c +++ b/epan/dissectors/packet-dcom-remunkn.c @@ -161,7 +161,7 @@ dissect_remunk_remqueryinterface_resp(tvbuff_t *tvb, int offset, u32ItemIdx = 1; while (u32ArraySize--) { /* add subtree */ - sub_item = proto_tree_add_item(tree, hf_remunk_qiresult, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hf_remunk_qiresult, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_remunk_rqi_result); /* REMQIRESULT */ @@ -198,12 +198,9 @@ dissect_remunk_remqueryinterface_resp(tvbuff_t *tvb, int offset, proto_item_set_len(sub_item, offset - u32SubStart); /* update column info now */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"), - u32ItemIdx); - } - + col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)"), + u32ItemIdx); u32ItemIdx++; } @@ -212,10 +209,8 @@ dissect_remunk_remqueryinterface_resp(tvbuff_t *tvb, int offset, &u32HResult); /* update column info now */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)")); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)")); return offset; } @@ -246,18 +241,17 @@ dissect_remunk_remrelease_rqst(tvbuff_t *tvb, int offset, hf_remunk_interface_refs, &u32IntRefs); /* update column info now */ - if (check_col(pinfo->cinfo, COL_INFO)) { - if (u32IntRefs) { - col_append_fstr(pinfo->cinfo, COL_INFO, " Cnt=%u Refs=", u32IntRefs); - } else { - col_append_str(pinfo->cinfo, COL_INFO, " Cnt=0"); - } + if (u32IntRefs) { + col_append_fstr(pinfo->cinfo, COL_INFO, " Cnt=%u Refs=", u32IntRefs); + } else { + col_append_str(pinfo->cinfo, COL_INFO, " Cnt=0"); } + u32ItemIdx = 1; while (u32IntRefs--) { /* add subtree */ - sub_item = proto_tree_add_item(tree, hf_remunk_reminterfaceref, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hf_remunk_reminterfaceref, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_remunk_reminterfaceref); u32SubStart = offset; @@ -278,18 +272,16 @@ dissect_remunk_remrelease_rqst(tvbuff_t *tvb, int offset, proto_item_set_len(sub_item, offset - u32SubStart); /* update column info now */ - if (check_col(pinfo->cinfo, COL_INFO)) { - pszFormat = ""; - if (u32ItemIdx == 1) { - pszFormat = "%u-%u"; - } else if (u32ItemIdx < 10) { - pszFormat = ",%u-%u"; - } else if (u32ItemIdx == 10) { - pszFormat = ",..."; - } - col_append_fstr(pinfo->cinfo, COL_INFO, pszFormat, u32PublicRefs, u32PrivateRefs); + pszFormat = ""; + if (u32ItemIdx == 1) { + pszFormat = "%u-%u"; + } else if (u32ItemIdx < 10) { + pszFormat = ",%u-%u"; + } else if (u32ItemIdx == 10) { + pszFormat = ",..."; } - + col_append_fstr(pinfo->cinfo, COL_INFO, pszFormat, u32PublicRefs, u32PrivateRefs); + u32ItemIdx++; } diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index f0ee9b5e87..3a8b3689ba 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -717,7 +717,7 @@ dissect_dcom_extent(tvbuff_t *tvb, int offset, u32Idx = 1; while (u32ArraySize--) { - sub_item = proto_tree_add_item(tree, hf_dcom_extent, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hf_dcom_extent, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_dcom_extent); u32SubStart = offset; @@ -886,10 +886,9 @@ dissect_dcom_simple_resp(tvbuff_t *tvb, int offset, offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep, &u32HResult); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", - val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", + val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") ); + return offset; } @@ -1169,7 +1168,7 @@ dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo, /* XXX: which alignment do we need here? */ - sub_item = proto_tree_add_item(tree, hf_dcom_safearray, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hf_dcom_safearray, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_dcom_safearray); u32SubStart = offset; @@ -1326,7 +1325,7 @@ dissect_dcom_VARIANT(tvbuff_t *tvb, int offset, packet_info *pinfo, offset += 8 - (offset % 8); } - sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_dcom_variant); u32SubStart = offset; @@ -1539,14 +1538,12 @@ dissect_dcom_append_UUID(tvbuff_t *tvb, int offset, } /* update column info now */ - if (check_col(pinfo->cinfo, COL_INFO)) { - if (field_index != -1) { - col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]=%s", - hfi->name, field_index, (uuid_name) ? uuid_name : "???"); - } else { - col_append_fstr(pinfo->cinfo, COL_INFO, " %s=%s", - hfi->name, (uuid_name) ? uuid_name : "???"); - } + if (field_index != -1) { + col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]=%s", + hfi->name, field_index, (uuid_name) ? uuid_name : "???"); + } else { + col_append_fstr(pinfo->cinfo, COL_INFO, " %s=%s", + hfi->name, (uuid_name) ? uuid_name : "???"); } return offset; @@ -1770,7 +1767,7 @@ dissect_dcom_DUALSTRINGARRAY(tvbuff_t *tvb, gint offset, packet_info *pinfo, /* add subtree header */ - sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_dcom_dualstringarray); offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep, @@ -1784,7 +1781,7 @@ dissect_dcom_DUALSTRINGARRAY(tvbuff_t *tvb, gint offset, packet_info *pinfo, while ( tvb_get_ntohs(tvb, offset) ) { u32StringBindings++; - subsub_item = proto_tree_add_item(sub_tree, hf_dcom_dualstringarray_string, tvb, offset, 0, FALSE); + subsub_item = proto_tree_add_item(sub_tree, hf_dcom_dualstringarray_string, tvb, offset, 0, ENC_BIG_ENDIAN); subsub_tree = proto_item_add_subtree(subsub_item, ett_dcom_dualstringarray_binding); u32SubSubStart = offset; @@ -1831,7 +1828,7 @@ dissect_dcom_DUALSTRINGARRAY(tvbuff_t *tvb, gint offset, packet_info *pinfo, while ( tvb_get_ntohs(tvb, offset) ) { u32SecurityBindings++; - subsub_item = proto_tree_add_item(sub_tree, hf_dcom_dualstringarray_security, tvb, offset, 0, FALSE); + subsub_item = proto_tree_add_item(sub_tree, hf_dcom_dualstringarray_security, tvb, offset, 0, ENC_BIG_ENDIAN); subsub_tree = proto_item_add_subtree(subsub_item, ett_dcom_dualstringarray_binding); u32SubSubStart = offset; @@ -1877,7 +1874,7 @@ dissect_dcom_STDOBJREF(tvbuff_t *tvb, gint offset, packet_info *pinfo, /* add subtree header */ - sub_item = proto_tree_add_item(tree, hf_dcom_stdobjref, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hf_dcom_stdobjref, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_dcom_stdobjref); offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep, @@ -1924,7 +1921,7 @@ dissect_dcom_OBJREF(tvbuff_t *tvb, gint offset, packet_info *pinfo, /* add subtree header */ - sub_item = proto_tree_add_item(tree, hf_dcom_objref, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hf_dcom_objref, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_dcom_objref); offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep, @@ -2001,7 +1998,7 @@ dissect_dcom_MInterfacePointer(tvbuff_t *tvb, gint offset, packet_info *pinfo, } /* add subtree header */ - sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, FALSE); + sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(sub_item, ett_dcom_interface_pointer); offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep, |