diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-05-24 06:06:17 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-05-24 06:06:17 +0000 |
commit | 1b444c55fdca784c7fea44b48c99db62cfd4069d (patch) | |
tree | badbce952d73c0fca99d071d0db5526ebe93b29b /epan/dissectors/packet-m2pa.c | |
parent | 19f350b9f4c2afd403a3c292d2d6b0421ae27555 (diff) |
Refer to the endianness arguments as "encoding" rather than
"representation" - we already use "representation" to refer to the text
representation of fields.
Change some routines with an endianness argument to make it a
representation argument instead;
svn path=/trunk/; revision=32929
Diffstat (limited to 'epan/dissectors/packet-m2pa.c')
-rw-r--r-- | epan/dissectors/packet-m2pa.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/epan/dissectors/packet-m2pa.c b/epan/dissectors/packet-m2pa.c index 6a557e882e..db4117a787 100644 --- a/epan/dissectors/packet-m2pa.c +++ b/epan/dissectors/packet-m2pa.c @@ -164,10 +164,10 @@ dissect_v2_header(tvbuff_t *header_tvb, packet_info *pinfo, proto_tree *m2pa_tre col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, v2_message_type_values, "reserved")); if (m2pa_tree) { - proto_tree_add_item(m2pa_tree, hf_version, header_tvb, VERSION_OFFSET, VERSION_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_spare, header_tvb, SPARE_OFFSET, SPARE_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_v2_type, header_tvb, V2_TYPE_OFFSET, V2_TYPE_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_length, header_tvb, V2_LENGTH_OFFSET, LENGTH_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_version, header_tvb, VERSION_OFFSET, VERSION_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_spare, header_tvb, SPARE_OFFSET, SPARE_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_v2_type, header_tvb, V2_TYPE_OFFSET, V2_TYPE_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_length, header_tvb, V2_LENGTH_OFFSET, LENGTH_LENGTH, ENC_BIG_ENDIAN); } } @@ -182,15 +182,15 @@ dissect_v8_header(tvbuff_t *header_tvb, packet_info *pinfo, proto_tree *m2pa_tre col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, v8_message_type_values, "Unknown")); if (m2pa_tree) { - proto_tree_add_item(m2pa_tree, hf_version, header_tvb, VERSION_OFFSET, VERSION_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_spare, header_tvb, SPARE_OFFSET, SPARE_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_class, header_tvb, CLASS_OFFSET, CLASS_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_v8_type, header_tvb, V8_TYPE_OFFSET, V8_TYPE_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_length, header_tvb, V8_LENGTH_OFFSET, LENGTH_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_unused, header_tvb, FIRST_UNUSED_OFFSET, UNUSED_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_bsn, header_tvb, BSN_OFFSET, BSN_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_unused, header_tvb, SECOND_UNUSED_OFFSET, UNUSED_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_fsn, header_tvb, FSN_OFFSET, FSN_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_version, header_tvb, VERSION_OFFSET, VERSION_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_spare, header_tvb, SPARE_OFFSET, SPARE_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_class, header_tvb, CLASS_OFFSET, CLASS_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_v8_type, header_tvb, V8_TYPE_OFFSET, V8_TYPE_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_length, header_tvb, V8_LENGTH_OFFSET, LENGTH_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_unused, header_tvb, FIRST_UNUSED_OFFSET, UNUSED_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_bsn, header_tvb, BSN_OFFSET, BSN_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_unused, header_tvb, SECOND_UNUSED_OFFSET, UNUSED_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_fsn, header_tvb, FSN_OFFSET, FSN_LENGTH, ENC_BIG_ENDIAN); } } @@ -205,15 +205,15 @@ dissect_v12_header(tvbuff_t *header_tvb, packet_info *pinfo, proto_tree *m2pa_tr col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, v8_message_type_values, "Unknown")); if (m2pa_tree) { - proto_tree_add_item(m2pa_tree, hf_version, header_tvb, VERSION_OFFSET, VERSION_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_spare, header_tvb, SPARE_OFFSET, SPARE_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_class, header_tvb, CLASS_OFFSET, CLASS_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_v12_type, header_tvb, V12_TYPE_OFFSET, V12_TYPE_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_length, header_tvb, V12_LENGTH_OFFSET, LENGTH_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_unused, header_tvb, FIRST_UNUSED_OFFSET, UNUSED_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_bsn, header_tvb, BSN_OFFSET, BSN_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_unused, header_tvb, SECOND_UNUSED_OFFSET, UNUSED_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_tree, hf_fsn, header_tvb, FSN_OFFSET, FSN_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_version, header_tvb, VERSION_OFFSET, VERSION_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_spare, header_tvb, SPARE_OFFSET, SPARE_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_class, header_tvb, CLASS_OFFSET, CLASS_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_v12_type, header_tvb, V12_TYPE_OFFSET, V12_TYPE_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_length, header_tvb, V12_LENGTH_OFFSET, LENGTH_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_unused, header_tvb, FIRST_UNUSED_OFFSET, UNUSED_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_bsn, header_tvb, BSN_OFFSET, BSN_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_unused, header_tvb, SECOND_UNUSED_OFFSET, UNUSED_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_fsn, header_tvb, FSN_OFFSET, FSN_LENGTH, ENC_BIG_ENDIAN); } } @@ -236,8 +236,8 @@ dissect_v2_user_data_message(tvbuff_t *message_data_tvb, packet_info *pinfo, pro m2pa_li_item = proto_tree_add_text(m2pa_tree, message_data_tvb, LI_OFFSET, LI_LENGTH, "Length Indicator"); m2pa_li_tree = proto_item_add_subtree(m2pa_li_item, ett_m2pa_li); - proto_tree_add_item(m2pa_li_tree, hf_v2_li_spare, message_data_tvb, LI_OFFSET, LI_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_li_tree, hf_v2_li_prio, message_data_tvb, LI_OFFSET, LI_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_li_tree, hf_v2_li_spare, message_data_tvb, LI_OFFSET, LI_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_li_tree, hf_v2_li_prio, message_data_tvb, LI_OFFSET, LI_LENGTH, ENC_BIG_ENDIAN); /* Re-adjust length of M2PA item since it will be dissected as MTP3 */ proto_item_set_len(m2pa_item, V2_HEADER_LENGTH + LI_LENGTH); @@ -262,8 +262,8 @@ dissect_v8_user_data_message(tvbuff_t *message_data_tvb, packet_info *pinfo, pro if (m2pa_tree) { m2pa_li_item = proto_tree_add_text(m2pa_tree, message_data_tvb, LI_OFFSET, LI_LENGTH, "Length Indicator"); m2pa_li_tree = proto_item_add_subtree(m2pa_li_item, ett_m2pa_li); - proto_tree_add_item(m2pa_li_tree, hf_v8_li_prio, message_data_tvb, LI_OFFSET, LI_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_li_tree, hf_v8_li_spare, message_data_tvb, LI_OFFSET, LI_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_li_tree, hf_v8_li_prio, message_data_tvb, LI_OFFSET, LI_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_li_tree, hf_v8_li_spare, message_data_tvb, LI_OFFSET, LI_LENGTH, ENC_BIG_ENDIAN); /* Re-adjust length of M2PA item since it will be dissected as MTP3 */ proto_item_set_len(m2pa_item, V8_HEADER_LENGTH + LI_LENGTH); @@ -291,8 +291,8 @@ dissect_v12_user_data_message(tvbuff_t *message_data_tvb, packet_info *pinfo, pr if (m2pa_tree) { m2pa_li_item = proto_tree_add_text(m2pa_tree, message_data_tvb, PRI_OFFSET, PRI_LENGTH, "Priority"); m2pa_li_tree = proto_item_add_subtree(m2pa_li_item, ett_m2pa_li); - proto_tree_add_item(m2pa_li_tree, hf_pri_prio, message_data_tvb, PRI_OFFSET, PRI_LENGTH, REP_BIG_ENDIAN); - proto_tree_add_item(m2pa_li_tree, hf_pri_spare, message_data_tvb, PRI_OFFSET, PRI_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_li_tree, hf_pri_prio, message_data_tvb, PRI_OFFSET, PRI_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_item(m2pa_li_tree, hf_pri_spare, message_data_tvb, PRI_OFFSET, PRI_LENGTH, ENC_BIG_ENDIAN); /* Re-adjust length of M2PA item since it will be dissected as MTP3 */ proto_item_set_len(m2pa_item, V12_HEADER_LENGTH + PRI_LENGTH); @@ -321,7 +321,7 @@ dissect_v2_link_status_message(tvbuff_t *message_data_tvb, packet_info *pinfo, p if (check_col(pinfo->cinfo, COL_INFO)) col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ", val_to_str(tvb_get_ntohl(message_data_tvb, STATUS_OFFSET), v2_link_status_values, "Unknown")); if (m2pa_tree) - proto_tree_add_item(m2pa_tree, hf_v2_status, message_data_tvb, STATUS_OFFSET, STATUS_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_v2_status, message_data_tvb, STATUS_OFFSET, STATUS_LENGTH, ENC_BIG_ENDIAN); } static const value_string v8_link_status_values[] = { @@ -346,9 +346,9 @@ dissect_v8_link_status_message(tvbuff_t *message_data_tvb, packet_info *pinfo, p filler_length = tvb_length(message_data_tvb) - STATUS_LENGTH; - proto_tree_add_item(m2pa_tree, hf_v8_status, message_data_tvb, STATUS_OFFSET, STATUS_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_v8_status, message_data_tvb, STATUS_OFFSET, STATUS_LENGTH, ENC_BIG_ENDIAN); if (filler_length > 0) - proto_tree_add_item(m2pa_tree, hf_filler, message_data_tvb, FILLER_OFFSET, filler_length, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_filler, message_data_tvb, FILLER_OFFSET, filler_length, ENC_BIG_ENDIAN); } static const value_string v12_link_status_values[] = { @@ -373,9 +373,9 @@ dissect_v12_link_status_message(tvbuff_t *message_data_tvb, packet_info *pinfo, filler_length = tvb_length(message_data_tvb) - STATUS_LENGTH; - proto_tree_add_item(m2pa_tree, hf_v12_status, message_data_tvb, STATUS_OFFSET, STATUS_LENGTH, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_v12_status, message_data_tvb, STATUS_OFFSET, STATUS_LENGTH, ENC_BIG_ENDIAN); if (filler_length > 0) - proto_tree_add_item(m2pa_tree, hf_filler, message_data_tvb, FILLER_OFFSET, filler_length, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_filler, message_data_tvb, FILLER_OFFSET, filler_length, ENC_BIG_ENDIAN); } static void @@ -385,7 +385,7 @@ dissect_unknown_message(tvbuff_t *message_data_tvb, proto_tree *m2pa_tree) length = tvb_length(message_data_tvb); if ((m2pa_tree) && (length > 0)) - proto_tree_add_item(m2pa_tree, hf_unknown_data, message_data_tvb, 0, length, REP_BIG_ENDIAN); + proto_tree_add_item(m2pa_tree, hf_unknown_data, message_data_tvb, 0, length, ENC_BIG_ENDIAN); } #define V2_MESSAGE_DATA_OFFSET (HEADER_OFFSET + V2_HEADER_LENGTH) @@ -484,7 +484,7 @@ dissect_v12_message_data(tvbuff_t *message_tvb, packet_info *pinfo, proto_item * { proto_item *pi; - pi = proto_tree_add_item(m2pa_tree, hf_undecode_data, message_tvb, length, (actual_length - length), REP_BIG_ENDIAN); + pi = proto_tree_add_item(m2pa_tree, hf_undecode_data, message_tvb, length, (actual_length - length), ENC_BIG_ENDIAN); expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_WARN, "There are %d bytes of data which is greater than M2PA's length parameter (%d)", actual_length, length); @@ -532,7 +532,7 @@ dissect_m2pa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) }; if (tree) { - m2pa_item = proto_tree_add_item(tree, proto_m2pa, tvb, 0, -1, REP_NA); + m2pa_item = proto_tree_add_item(tree, proto_m2pa, tvb, 0, -1, ENC_NA); m2pa_tree = proto_item_add_subtree(m2pa_item, ett_m2pa); } else { m2pa_item = NULL; |