aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2011-12-28 23:39:14 +0000
committerGerald Combs <gerald@wireshark.org>2011-12-28 23:39:14 +0000
commitcb9725ce2beefe34c08dc954ff2a9c51c6a7e3bd (patch)
tree0fa7ae9fc06a62e7fb6793b1ea1693b2f89ada25 /epan/dissectors
parent10dfe948422a48963b611a07b1193ddb5b655d95 (diff)
Prepend the sita_phdr fields with "sita_" to make them less
collision-prone. svn path=/trunk/; revision=40320
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-sita.c19
-rw-r--r--epan/dissectors/packet-uts.c28
2 files changed, 23 insertions, 24 deletions
diff --git a/epan/dissectors/packet-sita.c b/epan/dissectors/packet-sita.c
index f15dd5cfad..f5964e988c 100644
--- a/epan/dissectors/packet-sita.c
+++ b/epan/dissectors/packet-sita.c
@@ -77,7 +77,7 @@ static int hf_dcd = -1;
#define REMOTE "Remote"
static gchar *
-format_flags_string(guchar value, const gchar *array[])
+format_flags_string(guchar value, const gchar *array[])
{
int i;
guint bpos;
@@ -120,11 +120,11 @@ dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_PROTOCOL); /* erase the protocol */
col_clear(pinfo->cinfo, COL_INFO); /* and info columns so that the next decoder can fill them in */
- flags = pinfo->pseudo_header->sita.flags;
- signals = pinfo->pseudo_header->sita.signals;
- errors1 = pinfo->pseudo_header->sita.errors1;
- errors2 = pinfo->pseudo_header->sita.errors2;
- proto = pinfo->pseudo_header->sita.proto;
+ flags = pinfo->pseudo_header->sita.sita_flags;
+ signals = pinfo->pseudo_header->sita.sita_signals;
+ errors1 = pinfo->pseudo_header->sita.sita_errors1;
+ errors2 = pinfo->pseudo_header->sita.sita_errors2;
+ proto = pinfo->pseudo_header->sita.sita_proto;
if (check_col(pinfo->cinfo, COL_DEF_SRC)) {
if ((flags & SITA_FRAME_DIR) == SITA_FRAME_DIR_TXED) {
@@ -194,16 +194,16 @@ dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
- if (!dissector_try_uint(sita_dissector_table, pinfo->pseudo_header->sita.proto, tvb, pinfo, tree)) { /* try to find and run an applicable dissector */
+ if (!dissector_try_uint(sita_dissector_table, pinfo->pseudo_header->sita.sita_proto, tvb, pinfo, tree)) { /* try to find and run an applicable dissector */
if (check_col(pinfo->cinfo, COL_PROTOCOL)) /* if one can't be found... tell them we don't */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN"); /* know how to decode this protocol */
if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO, "IOP protocol number: %u", pinfo->pseudo_header->sita.proto); /* and give them the details then */
+ col_add_fstr(pinfo->cinfo, COL_INFO, "IOP protocol number: %u", pinfo->pseudo_header->sita.sita_proto); /* and give them the details then */
call_dissector(data_handle, tvb, pinfo, tree); /* call the generic (hex display) decoder instead */
}
}
-static const true_false_string tfs_sita_flags = { "From Remote", "From Local" };
+static const true_false_string tfs_sita_flags = { "From Remote", "From Local" };
static const true_false_string tfs_sita_error = { "Error", "" };
static const true_false_string tfs_sita_violation = { "Violation", "" };
static const true_false_string tfs_sita_received = { "Received", "" };
@@ -301,4 +301,3 @@ proto_reg_handoff_sita(void)
dissector_add_uint("sita.proto", SITA_PROTO_ALC, ipars_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_SITA, sita_handle);
}
-
diff --git a/epan/dissectors/packet-uts.c b/epan/dissectors/packet-uts.c
index b3aefeda62..a9027aae67 100644
--- a/epan/dissectors/packet-uts.c
+++ b/epan/dissectors/packet-uts.c
@@ -87,18 +87,18 @@ static int testchar(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, int op, g
}
} else {
col_set_str(pinfo->cinfo, COL_INFO, "Unknown Message Format");
- return 0;
+ return 0;
}
}
static void
-set_addr(packet_info *pinfo _U_ , int field, gchar rid, gchar sid, gchar did)
+set_addr(packet_info *pinfo _U_ , int field, gchar rid, gchar sid, gchar did)
{
if (field == SRC) {
- if (check_col(pinfo->cinfo, COL_DEF_SRC))
+ if (check_col(pinfo->cinfo, COL_DEF_SRC))
col_append_fstr(pinfo->cinfo, COL_DEF_SRC, " %2.2X:%2.2X:%2.2X", rid, sid, did);
} else {
- if (check_col(pinfo->cinfo, COL_DEF_DST))
+ if (check_col(pinfo->cinfo, COL_DEF_DST))
col_append_fstr(pinfo->cinfo, COL_DEF_DST, " %2.2X:%2.2X:%2.2X", rid, sid, did);
}
}
@@ -160,7 +160,7 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
set_addr(pinfo, SRC, rid, sid, did);
} else {
col_add_str(pinfo->cinfo, COL_INFO, "Unknown Message Format");
- if ((pinfo->pseudo_header->sita.flags & SITA_FRAME_DIR) == SITA_FRAME_DIR_TXED) {
+ if ((pinfo->pseudo_header->sita.sita_flags & SITA_FRAME_DIR) == SITA_FRAME_DIR_TXED) {
set_addr(pinfo, DST, rid, sid, did); /* if the ACN sent it, the address is of the destination... the terminal */
} else {
set_addr(pinfo, SRC, rid, sid, did); /* if the ACN received it, the address if of the source... the terminal */
@@ -184,7 +184,7 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
testchar(tvb, pinfo, offset+1, MATCH, '1', NULL) &&
testchar(tvb, pinfo, offset+2, MATCH, STX, NULL)) {
ack_start = offset;
- header_length = offset+3;
+ header_length = offset+3;
stx_start = offset+2;
col_add_str(pinfo->cinfo, COL_INFO, "Text + ACK");
set_addr(pinfo, SRC, rid, sid, did);
@@ -192,7 +192,7 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
header_length = offset+1;
stx_start = offset;
col_add_str(pinfo->cinfo, COL_INFO, "Text");
- if ((pinfo->pseudo_header->sita.flags & SITA_FRAME_DIR) == SITA_FRAME_DIR_TXED) {
+ if ((pinfo->pseudo_header->sita.sita_flags & SITA_FRAME_DIR) == SITA_FRAME_DIR_TXED) {
set_addr(pinfo, DST, rid, sid, did); /* if the ACN sent it, the address is of the destination... the terminal */
} else {
set_addr(pinfo, SRC, rid, sid, did); /* if the ACN received it, the address if of the source... the terminal */
@@ -308,7 +308,7 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
length = (etx_start - stx_start - 1); /* and the data part is the rest... */
/* whatever preceeds the ETX if it exists */
data_ptr = tvb_get_ephemeral_string(tvb, stx_start+1, length); /* copy the string for dissecting */
- proto_tree_add_string_format(uts_tree, hf_data, tvb, stx_start + 1, length, data_ptr,
+ proto_tree_add_string_format(uts_tree, hf_data, tvb, stx_start + 1, length, data_ptr,
"Text (%d byte%s)", length, plurality(length, "", "s"));
}
@@ -329,21 +329,21 @@ void
proto_register_uts(void)
{
static hf_register_info hf[] = {
- { &hf_rid,
+ { &hf_rid,
{ "RID", "uts.rid",
- FT_UINT8, BASE_HEX, NULL, 0, "Remote Identifier address", HFILL }},
+ FT_UINT8, BASE_HEX, NULL, 0, "Remote Identifier address", HFILL }},
{ &hf_sid,
{ "SID", "uts.sid",
- FT_UINT8, BASE_HEX, NULL, 0, "Site Identifier address", HFILL }},
+ FT_UINT8, BASE_HEX, NULL, 0, "Site Identifier address", HFILL }},
{ &hf_did,
{ "DID", "uts.did",
- FT_UINT8, BASE_HEX, NULL, 0, "Device Identifier address", HFILL }},
+ FT_UINT8, BASE_HEX, NULL, 0, "Device Identifier address", HFILL }},
{ &hf_retxrequest,
{ "ReTxRequst", "uts.retxrequst",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Re-transmit Request", HFILL }},
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Re-transmit Request", HFILL }},
{ &hf_ack,
{ "Ack", "uts.ack",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Ack", HFILL }},
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Ack", HFILL }},
{ &hf_replyrequest,
{ "ReplyRequst", "uts.replyrequest",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Reply Request", HFILL }},