aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-sita.c19
-rw-r--r--epan/dissectors/packet-uts.c28
-rw-r--r--wiretap/pcap-common.c20
-rw-r--r--wiretap/wtap.h10
4 files changed, 38 insertions, 39 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 }},
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c
index 25a2be444c..e0575c06a5 100644
--- a/wiretap/pcap-common.c
+++ b/wiretap/pcap-common.c
@@ -934,11 +934,11 @@ pcap_read_sita_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header,
return FALSE;
}
- pseudo_header->sita.flags = sita_phdr[SITA_FLAGS_OFFSET];
- pseudo_header->sita.signals = sita_phdr[SITA_SIGNALS_OFFSET];
- pseudo_header->sita.errors1 = sita_phdr[SITA_ERRORS1_OFFSET];
- pseudo_header->sita.errors2 = sita_phdr[SITA_ERRORS2_OFFSET];
- pseudo_header->sita.proto = sita_phdr[SITA_PROTO_OFFSET];
+ pseudo_header->sita.sita_flags = sita_phdr[SITA_FLAGS_OFFSET];
+ pseudo_header->sita.sita_signals = sita_phdr[SITA_SIGNALS_OFFSET];
+ pseudo_header->sita.sita_errors1 = sita_phdr[SITA_ERRORS1_OFFSET];
+ pseudo_header->sita.sita_errors2 = sita_phdr[SITA_ERRORS2_OFFSET];
+ pseudo_header->sita.sita_proto = sita_phdr[SITA_PROTO_OFFSET];
return TRUE;
}
@@ -1878,11 +1878,11 @@ pcap_write_phdr(wtap_dumper *wdh, int encap, const union wtap_pseudo_header *pse
* Write the SITA header.
*/
memset(&sita_hdr, 0, sizeof(sita_hdr));
- sita_hdr[SITA_FLAGS_OFFSET] = pseudo_header->sita.flags;
- sita_hdr[SITA_SIGNALS_OFFSET] = pseudo_header->sita.signals;
- sita_hdr[SITA_ERRORS1_OFFSET] = pseudo_header->sita.errors1;
- sita_hdr[SITA_ERRORS2_OFFSET] = pseudo_header->sita.errors2;
- sita_hdr[SITA_PROTO_OFFSET] = pseudo_header->sita.proto;
+ sita_hdr[SITA_FLAGS_OFFSET] = pseudo_header->sita.sita_flags;
+ sita_hdr[SITA_SIGNALS_OFFSET] = pseudo_header->sita.sita_signals;
+ sita_hdr[SITA_ERRORS1_OFFSET] = pseudo_header->sita.sita_errors1;
+ sita_hdr[SITA_ERRORS2_OFFSET] = pseudo_header->sita.sita_errors2;
+ sita_hdr[SITA_PROTO_OFFSET] = pseudo_header->sita.sita_proto;
if (!wtap_dump_file_write(wdh, sita_hdr, sizeof(sita_hdr), err))
return FALSE;
wdh->bytes_dumped += sizeof(sita_hdr);
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 8355c76f2b..972cee4b39 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -739,11 +739,11 @@ struct erf_mc_phdr {
#define SITA_PROTO_BOP_FRL (0x12)
struct sita_phdr {
- guint8 flags;
- guint8 signals;
- guint8 errors1;
- guint8 errors2;
- guint8 proto;
+ guint8 sita_flags;
+ guint8 sita_signals;
+ guint8 sita_errors1;
+ guint8 sita_errors2;
+ guint8 sita_proto;
};
/*pseudo header for Bluetooth HCI*/