aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-10-04 11:28:35 -0400
committerBill Meier <wmeier@newsguy.com>2014-10-04 15:34:02 +0000
commitebfe8f6d289e3d2649dcfd5a3902ba038b0ee2bd (patch)
treed7cfeb5eb4592086744dbfaa71f1163932bc43a8
parent20795925ffb2f9687e960de8d6798e53482cb175 (diff)
Add editor modelines; Reformat as appropriate.
Change-Id: I8e9c58b75eea85877d22024201e5d8d0e9a3dbfd Reviewed-on: https://code.wireshark.org/review/4459 Reviewed-by: Bill Meier <wmeier@newsguy.com>
-rw-r--r--epan/dissectors/packet-aim-icq.c121
-rw-r--r--epan/dissectors/packet-aim-ssi.c65
-rw-r--r--epan/dissectors/packet-aol.c13
-rw-r--r--epan/dissectors/packet-armagetronad.c93
-rw-r--r--epan/dissectors/packet-asf.c13
-rw-r--r--epan/dissectors/packet-ax25-nol3.c13
-rw-r--r--epan/dissectors/packet-bpdu.c499
-rw-r--r--epan/dissectors/packet-bvlc.c13
-rw-r--r--epan/dissectors/packet-dcerpc-fldb.c1128
-rw-r--r--epan/dissectors/packet-dcerpc-pnp.c27
-rw-r--r--epan/dissectors/packet-dcom-remact.c13
-rw-r--r--epan/dissectors/packet-dsi.c13
-rw-r--r--epan/dissectors/packet-ehdlc.c13
-rw-r--r--epan/dissectors/packet-ethertype.c29
-rw-r--r--epan/dissectors/packet-exec.c13
-rw-r--r--epan/dissectors/packet-fmp_notify.c413
-rw-r--r--epan/dissectors/packet-gmr1_common.c15
-rw-r--r--epan/dissectors/packet-gsm_a_rp.c126
-rw-r--r--epan/dissectors/packet-gsm_ipa.c13
-rw-r--r--epan/dissectors/packet-h261.c13
-rw-r--r--epan/dissectors/packet-h263p.c652
-rw-r--r--epan/dissectors/packet-i2c.c21
-rw-r--r--epan/dissectors/packet-icap.c489
-rw-r--r--epan/dissectors/packet-ieee8021ah.c454
-rw-r--r--epan/dissectors/packet-ifcp.c707
-rw-r--r--epan/dissectors/packet-ipvs-syncd.c27
-rw-r--r--epan/dissectors/packet-ipxwan.c15
-rw-r--r--epan/dissectors/packet-isdn.c39
-rw-r--r--epan/dissectors/packet-itdm.c401
-rw-r--r--epan/dissectors/packet-jpeg.c13
-rw-r--r--epan/dissectors/packet-kerberos4.c225
-rw-r--r--epan/dissectors/packet-manolito.c127
-rw-r--r--epan/dissectors/packet-mndp.c98
-rw-r--r--epan/dissectors/packet-mpeg1.c13
-rw-r--r--epan/dissectors/packet-mrdisc.c13
-rw-r--r--epan/dissectors/packet-mstp.c41
-rw-r--r--epan/dissectors/packet-mtp3.c863
-rw-r--r--epan/dissectors/packet-nbd.c95
-rw-r--r--epan/dissectors/packet-nbns.c301
-rw-r--r--epan/dissectors/packet-ndp.c239
-rw-r--r--epan/dissectors/packet-netlink.c65
-rw-r--r--epan/dissectors/packet-nfsacl.c33
-rw-r--r--epan/dissectors/packet-nstrace.c13
-rw-r--r--epan/dissectors/packet-pagp.c791
-rw-r--r--epan/dissectors/packet-pcnfsd.c535
-rw-r--r--epan/dissectors/packet-pw-cesopsn.c13
-rw-r--r--epan/dissectors/packet-rip.c381
-rw-r--r--epan/dissectors/packet-rmi.c387
-rw-r--r--epan/dissectors/packet-rpl.c15
-rw-r--r--epan/dissectors/packet-rudp.c13
-rw-r--r--epan/dissectors/packet-sebek.c29
-rw-r--r--epan/dissectors/packet-smb-common.c45
-rw-r--r--epan/dissectors/packet-smb-mailslot.c33
-rw-r--r--epan/dissectors/packet-smb-sidsnooping.c19
-rw-r--r--epan/dissectors/packet-socketcan.c19
-rw-r--r--epan/dissectors/packet-spp.c33
-rw-r--r--epan/dissectors/packet-stat.c71
-rw-r--r--epan/dissectors/packet-tnef.c567
-rw-r--r--epan/dissectors/packet-tpkt.c686
-rw-r--r--epan/dissectors/packet-udld.c369
-rw-r--r--epan/dissectors/packet-uts.c105
-rw-r--r--epan/dissectors/packet-v120.c265
-rw-r--r--epan/dissectors/packet-x224.c47
-rw-r--r--epan/dissectors/packet-x29.c27
-rw-r--r--epan/dissectors/packet-yhoo.c15
-rw-r--r--epan/dissectors/packet-ypserv.c79
66 files changed, 6468 insertions, 5666 deletions
diff --git a/epan/dissectors/packet-aim-icq.c b/epan/dissectors/packet-aim-icq.c
index 014dcbb917..30062f3981 100644
--- a/epan/dissectors/packet-aim-icq.c
+++ b/epan/dissectors/packet-aim-icq.c
@@ -84,57 +84,57 @@ static struct
const char *name;
int (*dissector) (tvbuff_t *, packet_info *, proto_tree *);
} icq_calls [] = {
- { 0x0001, "Server Error Reply", NULL },
- { 0x0064, "Set User Home Info Reply", NULL },
- { 0x006e, "Set User Work Info Reply", NULL },
- { 0x0078, "Set User More Info Reply", NULL },
- { 0x0082, "Set User Notes Info Reply", NULL },
- { 0x0087, "Set User Email Info Reply", NULL },
- { 0x008c, "Set User Interests Info Reply", NULL },
- { 0x0096, "Set User Affiliations Info Reply", NULL },
- { 0x00a0, "Set User Permissions Reply", NULL },
- { 0x00aa, "Set User Password Reply", NULL },
- { 0x00b4, "Unregister Account Reply", NULL },
- { 0x00be, "Set User Homepage Category Reply", NULL },
- { 0x00c8, "User Basic Info Reply", NULL },
- { 0x00d2, "User Work Info Reply", NULL },
- { 0x00dc, "User More Info Reply", NULL },
- { 0x00e6, "User Notes Info Reply", NULL },
- { 0x00eb, "User Extended Email Reply", NULL },
- { 0x00f0, "User Interests Info Reply", NULL },
- { 0x00fa, "User Affiliations Info Reply", NULL },
- { 0x0104, "Short User Info Reply", NULL },
- { 0x010e, "User Homepage Category Reply", NULL },
- { 0x01a4, "Search: User found", NULL },
- { 0x0302, "Registration Stats Reply", NULL },
- { 0x0366, "Random Search Server Reply", NULL },
- { 0x03ea, "Set User Home Info Request", NULL },
- { 0x03f3, "Set User Work Info Request", NULL },
- { 0x03fd, "Set User More Info Request", NULL },
- { 0x0406, "Set User Notes Request", NULL },
+ { 0x0001, "Server Error Reply", NULL },
+ { 0x0064, "Set User Home Info Reply", NULL },
+ { 0x006e, "Set User Work Info Reply", NULL },
+ { 0x0078, "Set User More Info Reply", NULL },
+ { 0x0082, "Set User Notes Info Reply", NULL },
+ { 0x0087, "Set User Email Info Reply", NULL },
+ { 0x008c, "Set User Interests Info Reply", NULL },
+ { 0x0096, "Set User Affiliations Info Reply", NULL },
+ { 0x00a0, "Set User Permissions Reply", NULL },
+ { 0x00aa, "Set User Password Reply", NULL },
+ { 0x00b4, "Unregister Account Reply", NULL },
+ { 0x00be, "Set User Homepage Category Reply", NULL },
+ { 0x00c8, "User Basic Info Reply", NULL },
+ { 0x00d2, "User Work Info Reply", NULL },
+ { 0x00dc, "User More Info Reply", NULL },
+ { 0x00e6, "User Notes Info Reply", NULL },
+ { 0x00eb, "User Extended Email Reply", NULL },
+ { 0x00f0, "User Interests Info Reply", NULL },
+ { 0x00fa, "User Affiliations Info Reply", NULL },
+ { 0x0104, "Short User Info Reply", NULL },
+ { 0x010e, "User Homepage Category Reply", NULL },
+ { 0x01a4, "Search: User found", NULL },
+ { 0x0302, "Registration Stats Reply", NULL },
+ { 0x0366, "Random Search Server Reply", NULL },
+ { 0x03ea, "Set User Home Info Request", NULL },
+ { 0x03f3, "Set User Work Info Request", NULL },
+ { 0x03fd, "Set User More Info Request", NULL },
+ { 0x0406, "Set User Notes Request", NULL },
{ 0x040b, "Set User Extended Email Info Request", NULL },
- { 0x0410, "Set User Interests Info Request", NULL },
- { 0x041a, "Set User Affiliations Info Request", NULL },
- { 0x0424, "Set User Permissions Info Request", NULL },
- { 0x042e, "Change User Password Request", NULL },
- { 0x0442, "Set User Homepage Category Request", NULL },
- { 0x04b2, "Fullinfo Request", NULL },
- { 0x04ba, "Short User Info Request", NULL },
- { 0x04c4, "Unregister User Request", NULL },
- { 0x0515, "Search By Details Request", NULL },
- { 0x0569, "Search By UIN Request", NULL },
- { 0x055f, "Whitepages Search Request", NULL },
- { 0x0573, "Search By Email Request", NULL },
- { 0x074e, "Random Chat User Search Request", NULL },
- { 0x0898, "Server Variable Request (XML)", NULL },
- { 0x0aa5, "Registration Report Request", NULL },
- { 0x0aaf, "Shortcut Bar Stats Report Request", NULL },
- { 0x0c3a, "Save Info Request", NULL },
- { 0x1482, "Send SMS Request", NULL },
- { 0x2008, "Spam Report Request", NULL },
- { 0x08a2, "Server Variable Reply (XML)", NULL },
- { 0x0c3f, "Set Fullinfo Reply", NULL },
- { 0x2012, "User Spam Report Reply", NULL },
+ { 0x0410, "Set User Interests Info Request", NULL },
+ { 0x041a, "Set User Affiliations Info Request", NULL },
+ { 0x0424, "Set User Permissions Info Request", NULL },
+ { 0x042e, "Change User Password Request", NULL },
+ { 0x0442, "Set User Homepage Category Request", NULL },
+ { 0x04b2, "Fullinfo Request", NULL },
+ { 0x04ba, "Short User Info Request", NULL },
+ { 0x04c4, "Unregister User Request", NULL },
+ { 0x0515, "Search By Details Request", NULL },
+ { 0x0569, "Search By UIN Request", NULL },
+ { 0x055f, "Whitepages Search Request", NULL },
+ { 0x0573, "Search By Email Request", NULL },
+ { 0x074e, "Random Chat User Search Request", NULL },
+ { 0x0898, "Server Variable Request (XML)", NULL },
+ { 0x0aa5, "Registration Report Request", NULL },
+ { 0x0aaf, "Shortcut Bar Stats Report Request", NULL },
+ { 0x0c3a, "Save Info Request", NULL },
+ { 0x1482, "Send SMS Request", NULL },
+ { 0x2008, "Spam Report Request", NULL },
+ { 0x08a2, "Server Variable Reply (XML)", NULL },
+ { 0x0c3f, "Set Fullinfo Reply", NULL },
+ { 0x2012, "User Spam Report Reply", NULL },
{ 0, NULL, NULL },
};
@@ -198,10 +198,10 @@ static int dissect_aim_icq_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
}
static const aim_subtype aim_fnac_family_icq[] = {
- { 0x0001, "Error", dissect_aim_snac_error },
- { 0x0002, "ICQ Request", dissect_aim_icq_tlv },
- { 0x0003, "ICQ Response", dissect_aim_icq_tlv },
- { 0x0006, "Auth Request", NULL },
+ { 0x0001, "Error", dissect_aim_snac_error },
+ { 0x0002, "ICQ Request", dissect_aim_icq_tlv },
+ { 0x0003, "ICQ Response", dissect_aim_icq_tlv },
+ { 0x0006, "Auth Request", NULL },
{ 0x0007, "Auth Response", NULL },
{ 0, NULL, NULL }
};
@@ -253,3 +253,16 @@ proto_reg_handoff_aim_icq(void)
{
aim_init_family(proto_aim_icq, ett_aim_icq, FAMILY_ICQ, aim_fnac_family_icq);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-aim-ssi.c b/epan/dissectors/packet-aim-ssi.c
index dfde3b1ca7..df03b6f7ca 100644
--- a/epan/dissectors/packet-aim-ssi.c
+++ b/epan/dissectors/packet-aim-ssi.c
@@ -45,13 +45,13 @@ void proto_reg_handoff_aim_ssi(void);
#define FAMILY_SSI_TYPE_ICONINFO 0x0014
static const value_string aim_fnac_family_ssi_types[] = {
- { FAMILY_SSI_TYPE_BUDDY, "Buddy" },
- { FAMILY_SSI_TYPE_GROUP, "Group" },
- { FAMILY_SSI_TYPE_PERMIT, "Permit" },
- { FAMILY_SSI_TYPE_DENY, "Deny" },
- { FAMILY_SSI_TYPE_PDINFO, "PDINFO" },
+ { FAMILY_SSI_TYPE_BUDDY, "Buddy" },
+ { FAMILY_SSI_TYPE_GROUP, "Group" },
+ { FAMILY_SSI_TYPE_PERMIT, "Permit" },
+ { FAMILY_SSI_TYPE_DENY, "Deny" },
+ { FAMILY_SSI_TYPE_PDINFO, "PDINFO" },
{ FAMILY_SSI_TYPE_PRESENCEPREFS, "Presence Preferences" },
- { FAMILY_SSI_TYPE_ICONINFO, "Icon Info" },
+ { FAMILY_SSI_TYPE_ICONINFO, "Icon Info" },
{ 0, NULL }
};
@@ -295,27 +295,27 @@ static int dissect_aim_snac_ssi_auth_reply(tvbuff_t *tvb, packet_info *pinfo _U_
static const aim_subtype aim_fnac_family_ssi[] = {
- { 0x0001, "Error", dissect_aim_snac_error },
- { 0x0002, "Request Rights", NULL },
- { 0x0003, "Rights Info", dissect_aim_ssi_rightsinfo },
- { 0x0004, "Request List (first time)", NULL },
- { 0x0005, "Request List", dissect_aim_snac_ssi_time_and_items_num },
- { 0x0006, "List", dissect_aim_snac_ssi_list },
- { 0x0007, "Activate", NULL },
- { 0x0008, "Add Buddy", dissect_ssi_ssi_item },
- { 0x0009, "Modify Buddy", dissect_ssi_ssi_items },
- { 0x000a, "Delete Buddy", dissect_ssi_ssi_item },
- { 0x000e, "Server Ack", dissect_aim_ssi_result },
- { 0x000f, "No List", dissect_aim_snac_ssi_time_and_items_num },
- { 0x0011, "Edit Start", NULL },
- { 0x0012, "Edit Stop", NULL },
+ { 0x0001, "Error", dissect_aim_snac_error },
+ { 0x0002, "Request Rights", NULL },
+ { 0x0003, "Rights Info", dissect_aim_ssi_rightsinfo },
+ { 0x0004, "Request List (first time)", NULL },
+ { 0x0005, "Request List", dissect_aim_snac_ssi_time_and_items_num },
+ { 0x0006, "List", dissect_aim_snac_ssi_list },
+ { 0x0007, "Activate", NULL },
+ { 0x0008, "Add Buddy", dissect_ssi_ssi_item },
+ { 0x0009, "Modify Buddy", dissect_ssi_ssi_items },
+ { 0x000a, "Delete Buddy", dissect_ssi_ssi_item },
+ { 0x000e, "Server Ack", dissect_aim_ssi_result },
+ { 0x000f, "No List", dissect_aim_snac_ssi_time_and_items_num },
+ { 0x0011, "Edit Start", NULL },
+ { 0x0012, "Edit Stop", NULL },
{ 0x0014, "Grant Future Authorization to Buddy", dissect_aim_snac_ssi_auth_request },
- { 0x0015, "Future Authorization Granted", dissect_aim_snac_ssi_auth_request },
- { 0x0018, "Send Authentication Request", dissect_aim_snac_ssi_auth_request },
- { 0x0019, "Authentication Request", dissect_aim_snac_ssi_auth_request },
- { 0x001a, "Send Authentication Reply", dissect_aim_snac_ssi_auth_reply },
- { 0x001b, "Authentication Reply", dissect_aim_snac_ssi_auth_reply },
- { 0x001c, "Remote User Added Client To List", dissect_aim_ssi_was_added },
+ { 0x0015, "Future Authorization Granted", dissect_aim_snac_ssi_auth_request },
+ { 0x0018, "Send Authentication Request", dissect_aim_snac_ssi_auth_request },
+ { 0x0019, "Authentication Request", dissect_aim_snac_ssi_auth_request },
+ { 0x001a, "Send Authentication Reply", dissect_aim_snac_ssi_auth_reply },
+ { 0x001b, "Authentication Reply", dissect_aim_snac_ssi_auth_reply },
+ { 0x001c, "Remote User Added Client To List", dissect_aim_ssi_was_added },
{ 0, NULL, NULL }
};
@@ -393,3 +393,16 @@ void proto_reg_handoff_aim_ssi(void)
{
aim_init_family(proto_aim_ssi, ett_aim_ssi, FAMILY_SSI, aim_fnac_family_ssi);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-aol.c b/epan/dissectors/packet-aol.c
index cb8870e838..71983fef75 100644
--- a/epan/dissectors/packet-aol.c
+++ b/epan/dissectors/packet-aol.c
@@ -405,3 +405,16 @@ void proto_reg_handoff_aol(void) {
}
/* vi:set ts=4: */
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-armagetronad.c b/epan/dissectors/packet-armagetronad.c
index 3c93bec2b4..8a57fa7ee5 100644
--- a/epan/dissectors/packet-armagetronad.c
+++ b/epan/dissectors/packet-armagetronad.c
@@ -59,35 +59,35 @@ static gint ett_message = -1;
* 'nDescriptor* descriptors[MAXDESCRIPTORS]' array
*/
static const value_string descriptors[] = {
- {1, "ack"},
- {2, "req_info"},
- {3, "login_deny"},
- {4, "login_ignore"},
- {5, "login_accept"},
- {6, "login1"},
- {7, "logout"},
- {8, "sn_ConsoleOut"},
- {9, "client_cen"},
- {10, "version"},
- {11, "login2"},
- {20, "req_id"},
- {21, "id_req_handler"},
- {22, "net_destroy"},
- {23, "net_control"},
- {24, "net_sync"},
- {25, "ready to get objects"},
- {26, "net_clear"},
- {27, "sync_ack"},
- {28, "sync_msg"},
- {40, "password_request"},
- {41, "password_answer"},
- {50, "small_server"},
- {51, "big_server"},
- {52, "small_request"},
- {53, "big_request"},
- {54, "big_server_master"},
- {55, "big_request_master"},
- {60, "transfer config"},
+ { 1, "ack"},
+ { 2, "req_info"},
+ { 3, "login_deny"},
+ { 4, "login_ignore"},
+ { 5, "login_accept"},
+ { 6, "login1"},
+ { 7, "logout"},
+ { 8, "sn_ConsoleOut"},
+ { 9, "client_cen"},
+ { 10, "version"},
+ { 11, "login2"},
+ { 20, "req_id"},
+ { 21, "id_req_handler"},
+ { 22, "net_destroy"},
+ { 23, "net_control"},
+ { 24, "net_sync"},
+ { 25, "ready to get objects"},
+ { 26, "net_clear"},
+ { 27, "sync_ack"},
+ { 28, "sync_msg"},
+ { 40, "password_request"},
+ { 41, "password_answer"},
+ { 50, "small_server"},
+ { 51, "big_server"},
+ { 52, "small_request"},
+ { 53, "big_request"},
+ { 54, "big_server_master"},
+ { 55, "big_request_master"},
+ { 60, "transfer config"},
{200, "Chat"},
{201, "ePlayerNetID"},
{202, "player_removed_from_game"},
@@ -145,8 +145,8 @@ static void
add_message_data(tvbuff_t * tvb, gint offset, gint data_len, proto_tree * tree)
{
gchar *data = NULL;
- gchar tmp;
- int i;
+ gchar tmp;
+ int i;
if (!tree)
return;
@@ -179,10 +179,10 @@ add_message_data(tvbuff_t * tvb, gint offset, gint data_len, proto_tree * tree)
static gint
add_message(tvbuff_t * tvb, gint offset, proto_tree * tree, wmem_strbuf_t * info)
{
- guint16 descriptor_id, message_id;
- gint data_len;
- proto_item *msg;
- proto_tree *msg_tree;
+ guint16 descriptor_id, message_id;
+ gint data_len;
+ proto_item *msg;
+ proto_tree *msg_tree;
const gchar *descriptor;
descriptor_id = tvb_get_ntohs(tvb, offset);
@@ -230,12 +230,12 @@ add_message(tvbuff_t * tvb, gint offset, proto_tree * tree, wmem_strbuf_t * info
static gint
dissect_armagetronad(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * data _U_)
{
- proto_item *ti;
- proto_tree *armagetronad_tree;
- guint16 sender;
- gint offset = 0;
+ proto_item *ti;
+ proto_tree *armagetronad_tree;
+ guint16 sender;
+ gint offset = 0;
wmem_strbuf_t *info;
- gsize new_len;
+ gsize new_len;
if (!is_armagetronad_packet(tvb))
return 0;
@@ -329,3 +329,16 @@ void proto_reg_handoff_armagetronad(void)
dissector_add_uint("udp.port", UDP_PORT_ARMAGETRONAD, armagetronad_handle);
dissector_add_uint("udp.port", UDP_PORT_MASTER, armagetronad_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-asf.c b/epan/dissectors/packet-asf.c
index 69a14c6659..7d317b9c02 100644
--- a/epan/dissectors/packet-asf.c
+++ b/epan/dissectors/packet-asf.c
@@ -394,3 +394,16 @@ proto_reg_handoff_asf(void)
asf_handle = new_create_dissector_handle(dissect_asf, proto_asf);
dissector_add_uint("rmcp.class", RMCP_CLASS_ASF, asf_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-ax25-nol3.c b/epan/dissectors/packet-ax25-nol3.c
index e39656ca6b..f237125db1 100644
--- a/epan/dissectors/packet-ax25-nol3.c
+++ b/epan/dissectors/packet-ax25-nol3.c
@@ -295,3 +295,16 @@ proto_reg_handoff_ax25_nol3(void)
default_handle = find_dissector( "data" );
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-bpdu.c b/epan/dissectors/packet-bpdu.c
index 895998b3ae..0a4b9203d2 100644
--- a/epan/dissectors/packet-bpdu.c
+++ b/epan/dissectors/packet-bpdu.c
@@ -36,70 +36,70 @@
/* Offsets of fields within a BPDU */
-#define BPDU_IDENTIFIER 0
-#define BPDU_VERSION_IDENTIFIER 2
-#define BPDU_TYPE 3
-#define BPDU_FLAGS 4
-#define BPDU_ROOT_IDENTIFIER 5
-#define BPDU_ROOT_PATH_COST 13
-#define BPDU_BRIDGE_IDENTIFIER 17
-#define BPDU_PORT_IDENTIFIER 25
-#define BPDU_MESSAGE_AGE 27
-#define BPDU_MAX_AGE 29
-#define BPDU_HELLO_TIME 31
-#define BPDU_FORWARD_DELAY 33
-#define BPDU_VERSION_1_LENGTH 35
-#define BPDU_VERSION_3_LENGTH 36
-#define BPDU_MST_CONFIG_FORMAT_SELECTOR 38
-#define BPDU_MST_CONFIG_NAME 39
-#define BPDU_MST_CONFIG_REVISION_LEVEL 71
-#define BPDU_MST_CONFIG_DIGEST 73
-#define BPDU_CIST_INTERNAL_ROOT_PATH_COST 89
-#define BPDU_CIST_BRIDGE_IDENTIFIER 93
-#define BPDU_CIST_REMAINING_HOPS 101
-#define BPDU_MSTI 102
-
-#define BPDU_PVST_TLV 36
-
-#define MSTI_FLAGS 0
-#define MSTI_REGIONAL_ROOT 1
-#define MSTI_INTERNAL_ROOT_PATH_COST 9
-#define MSTI_BRIDGE_IDENTIFIER_PRIORITY 13
-#define MSTI_PORT_IDENTIFIER_PRIORITY 14
-#define MSTI_REMAINING_HOPS 15
-
-
-#define CONF_BPDU_SIZE 35
-#define TC_BPDU_SIZE 4
-#define MST_BPDU_SIZE 38
-#define VERSION_3_STATIC_LENGTH 64
-#define MSTI_MESSAGE_SIZE 16
+#define BPDU_IDENTIFIER 0
+#define BPDU_VERSION_IDENTIFIER 2
+#define BPDU_TYPE 3
+#define BPDU_FLAGS 4
+#define BPDU_ROOT_IDENTIFIER 5
+#define BPDU_ROOT_PATH_COST 13
+#define BPDU_BRIDGE_IDENTIFIER 17
+#define BPDU_PORT_IDENTIFIER 25
+#define BPDU_MESSAGE_AGE 27
+#define BPDU_MAX_AGE 29
+#define BPDU_HELLO_TIME 31
+#define BPDU_FORWARD_DELAY 33
+#define BPDU_VERSION_1_LENGTH 35
+#define BPDU_VERSION_3_LENGTH 36
+#define BPDU_MST_CONFIG_FORMAT_SELECTOR 38
+#define BPDU_MST_CONFIG_NAME 39
+#define BPDU_MST_CONFIG_REVISION_LEVEL 71
+#define BPDU_MST_CONFIG_DIGEST 73
+#define BPDU_CIST_INTERNAL_ROOT_PATH_COST 89
+#define BPDU_CIST_BRIDGE_IDENTIFIER 93
+#define BPDU_CIST_REMAINING_HOPS 101
+#define BPDU_MSTI 102
+
+#define BPDU_PVST_TLV 36
+
+#define MSTI_FLAGS 0
+#define MSTI_REGIONAL_ROOT 1
+#define MSTI_INTERNAL_ROOT_PATH_COST 9
+#define MSTI_BRIDGE_IDENTIFIER_PRIORITY 13
+#define MSTI_PORT_IDENTIFIER_PRIORITY 14
+#define MSTI_REMAINING_HOPS 15
+
+
+#define CONF_BPDU_SIZE 35
+#define TC_BPDU_SIZE 4
+#define MST_BPDU_SIZE 38
+#define VERSION_3_STATIC_LENGTH 64
+#define MSTI_MESSAGE_SIZE 16
/* Values for the Alternative MSTI format */
-#define ALT_BPDU_CIST_BRIDGE_IDENTIFIER 89
-#define ALT_BPDU_CIST_INTERNAL_ROOT_PATH_COST 97
+#define ALT_BPDU_CIST_BRIDGE_IDENTIFIER 89
+#define ALT_BPDU_CIST_INTERNAL_ROOT_PATH_COST 97
-#define ALT_MSTI_MSTID 0
-#define ALT_MSTI_FLAGS 2
-#define ALT_MSTI_REGIONAL_ROOT 3
-#define ALT_MSTI_INTERNAL_ROOT_PATH_COST 11
-#define ALT_MSTI_BRIDGE_IDENTIFIER 15
-#define ALT_MSTI_PORT_IDENTIFIER 23
-#define ALT_MSTI_REMAINING_HOPS 25
+#define ALT_MSTI_MSTID 0
+#define ALT_MSTI_FLAGS 2
+#define ALT_MSTI_REGIONAL_ROOT 3
+#define ALT_MSTI_INTERNAL_ROOT_PATH_COST 11
+#define ALT_MSTI_BRIDGE_IDENTIFIER 15
+#define ALT_MSTI_PORT_IDENTIFIER 23
+#define ALT_MSTI_REMAINING_HOPS 25
-#define ALT_MSTI_MESSAGE_SIZE 26
+#define ALT_MSTI_MESSAGE_SIZE 26
/* Flag bits */
-#define BPDU_FLAGS_TCACK 0x80
-#define BPDU_FLAGS_AGREEMENT 0x40
-#define BPDU_FLAGS_FORWARDING 0x20
-#define BPDU_FLAGS_LEARNING 0x10
-#define BPDU_FLAGS_PORT_ROLE_MASK 0x0C
-#define BPDU_FLAGS_PORT_ROLE_SHIFT 2
-#define BPDU_FLAGS_PROPOSAL 0x02
-#define BPDU_FLAGS_TC 0x01
+#define BPDU_FLAGS_TCACK 0x80
+#define BPDU_FLAGS_AGREEMENT 0x40
+#define BPDU_FLAGS_FORWARDING 0x20
+#define BPDU_FLAGS_LEARNING 0x10
+#define BPDU_FLAGS_PORT_ROLE_MASK 0x0C
+#define BPDU_FLAGS_PORT_ROLE_SHIFT 2
+#define BPDU_FLAGS_PROPOSAL 0x02
+#define BPDU_FLAGS_TC 0x01
void proto_register_bpdu(void);
void proto_reg_handoff_bpdu(void);
@@ -189,17 +189,17 @@ static const value_string protocol_id_vals[] = {
{ 0, NULL }
};
-#define BPDU_PVST_TLV_ORIGVLAN 0 /* Originating VLAN TLV in Cisco (R)PVST+ BPDUs */
+#define BPDU_PVST_TLV_ORIGVLAN 0 /* Originating VLAN TLV in Cisco (R)PVST+ BPDUs */
static const value_string bpdu_pvst_tlv_vals[] = {
- { BPDU_PVST_TLV_ORIGVLAN, "Originating VLAN" },
- { 0, NULL }
+ { BPDU_PVST_TLV_ORIGVLAN, "Originating VLAN" },
+ { 0, NULL }
};
-#define BPDU_TYPE_CONF 0x00 /* STP Configuration BPDU */
-#define BPDU_TYPE_RST 0x02 /* RST BPDU (or MST) */
-#define BPDU_TYPE_TOPOLOGY_CHANGE 0x80 /* STP TCN (Topology change notify) BPDU */
+#define BPDU_TYPE_CONF 0x00 /* STP Configuration BPDU */
+#define BPDU_TYPE_RST 0x02 /* RST BPDU (or MST) */
+#define BPDU_TYPE_TOPOLOGY_CHANGE 0x80 /* STP TCN (Topology change notify) BPDU */
static const value_string bpdu_type_vals[] = {
{ BPDU_TYPE_CONF, "Configuration" },
@@ -208,21 +208,21 @@ static const value_string bpdu_type_vals[] = {
{ 0, NULL }
};
-#define PROTO_VERSION_STP 0
-#define PROTO_VERSION_RSTP 2
-#define PROTO_VERSION_MSTP 3
-#define PROTO_VERSION_SPB 4
+#define PROTO_VERSION_STP 0
+#define PROTO_VERSION_RSTP 2
+#define PROTO_VERSION_MSTP 3
+#define PROTO_VERSION_SPB 4
-#define MSTI_FORMAT_UNKNOWN 0
-#define MSTI_FORMAT_IEEE_8021S 1
-#define MSTI_FORMAT_ALTERNATIVE 2
+#define MSTI_FORMAT_UNKNOWN 0
+#define MSTI_FORMAT_IEEE_8021S 1
+#define MSTI_FORMAT_ALTERNATIVE 2
static const value_string version_id_vals[] = {
- { PROTO_VERSION_STP, "Spanning Tree" },
- { PROTO_VERSION_RSTP, "Rapid Spanning Tree" },
- { PROTO_VERSION_MSTP, "Multiple Spanning Tree" },
- { PROTO_VERSION_SPB, "Shortest Path Tree" },
- { 0, NULL}
+ { PROTO_VERSION_STP, "Spanning Tree" },
+ { PROTO_VERSION_RSTP, "Rapid Spanning Tree" },
+ { PROTO_VERSION_MSTP, "Multiple Spanning Tree" },
+ { PROTO_VERSION_SPB, "Shortest Path Tree" },
+ { 0, NULL}
};
static const value_string role_vals[] = {
{ 1, "Alternate or Backup" },
@@ -236,8 +236,8 @@ static const char cont_sep[] = ", ";
#define APPEND_BOOLEAN_FLAG(flag, item, string) \
if(flag){ \
- if(item) \
- proto_item_append_text(item, string, sep); \
+ if(item) \
+ proto_item_append_text(item, string, sep); \
sep = cont_sep; \
}
@@ -1172,219 +1172,219 @@ proto_register_bpdu(void)
static hf_register_info hf[] = {
{ &hf_bpdu_proto_id,
- { "Protocol Identifier", "stp.protocol",
- FT_UINT16, BASE_HEX, VALS(protocol_id_vals), 0x0,
- NULL, HFILL }},
+ { "Protocol Identifier", "stp.protocol",
+ FT_UINT16, BASE_HEX, VALS(protocol_id_vals), 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_version_id,
- { "Protocol Version Identifier", "stp.version",
- FT_UINT8, BASE_DEC, VALS(version_id_vals), 0x0,
- NULL, HFILL }},
+ { "Protocol Version Identifier", "stp.version",
+ FT_UINT8, BASE_DEC, VALS(version_id_vals), 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_type,
- { "BPDU Type", "stp.type",
- FT_UINT8, BASE_HEX, VALS(bpdu_type_vals), 0x0,
- NULL, HFILL }},
+ { "BPDU Type", "stp.type",
+ FT_UINT8, BASE_HEX, VALS(bpdu_type_vals), 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_flags,
- { "BPDU flags", "stp.flags",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
+ { "BPDU flags", "stp.flags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_flags_tcack,
{ "Topology Change Acknowledgment", "stp.flags.tcack",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_TCACK,
- NULL, HFILL }},
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_TCACK,
+ NULL, HFILL }},
{ &hf_bpdu_flags_agreement,
- { "Agreement", "stp.flags.agreement",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_AGREEMENT,
- NULL, HFILL }},
+ { "Agreement", "stp.flags.agreement",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_AGREEMENT,
+ NULL, HFILL }},
{ &hf_bpdu_flags_forwarding,
- { "Forwarding", "stp.flags.forwarding",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_FORWARDING,
- NULL, HFILL }},
+ { "Forwarding", "stp.flags.forwarding",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_FORWARDING,
+ NULL, HFILL }},
{ &hf_bpdu_flags_learning,
- { "Learning", "stp.flags.learning",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_LEARNING,
- NULL, HFILL }},
+ { "Learning", "stp.flags.learning",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_LEARNING,
+ NULL, HFILL }},
{ &hf_bpdu_flags_port_role,
- { "Port Role", "stp.flags.port_role",
- FT_UINT8, BASE_DEC, VALS(role_vals), BPDU_FLAGS_PORT_ROLE_MASK,
- NULL, HFILL }},
+ { "Port Role", "stp.flags.port_role",
+ FT_UINT8, BASE_DEC, VALS(role_vals), BPDU_FLAGS_PORT_ROLE_MASK,
+ NULL, HFILL }},
{ &hf_bpdu_flags_proposal,
- { "Proposal", "stp.flags.proposal",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_PROPOSAL,
- NULL, HFILL }},
+ { "Proposal", "stp.flags.proposal",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_PROPOSAL,
+ NULL, HFILL }},
{ &hf_bpdu_flags_tc,
- { "Topology Change", "stp.flags.tc",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_TC,
- NULL, HFILL }},
+ { "Topology Change", "stp.flags.tc",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no), BPDU_FLAGS_TC,
+ NULL, HFILL }},
{ &hf_bpdu_root_prio,
- { "Root Bridge Priority", "stp.root.prio",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Root Bridge Priority", "stp.root.prio",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_root_sys_id_ext,
- { "Root Bridge System ID Extension", "stp.root.ext",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Root Bridge System ID Extension", "stp.root.ext",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_root_mac,
- { "Root Bridge System ID", "stp.root.hw",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Root Bridge System ID", "stp.root.hw",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_root_cost,
- { "Root Path Cost", "stp.root.cost",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Root Path Cost", "stp.root.cost",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_bridge_prio,
- { "Bridge Priority", "stp.bridge.prio",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Bridge Priority", "stp.bridge.prio",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_bridge_sys_id_ext,
- { "Bridge System ID Extension", "stp.bridge.ext",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Bridge System ID Extension", "stp.bridge.ext",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_bridge_mac,
- { "Bridge System ID", "stp.bridge.hw",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Bridge System ID", "stp.bridge.hw",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_port_id,
- { "Port identifier", "stp.port",
- FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
+ { "Port identifier", "stp.port",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_msg_age,
- { "Message Age", "stp.msg_age",
- FT_DOUBLE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Message Age", "stp.msg_age",
+ FT_DOUBLE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_max_age,
- { "Max Age", "stp.max_age",
- FT_DOUBLE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Max Age", "stp.max_age",
+ FT_DOUBLE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_hello_time,
- { "Hello Time", "stp.hello",
- FT_DOUBLE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Hello Time", "stp.hello",
+ FT_DOUBLE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_forward_delay,
- { "Forward Delay", "stp.forward",
- FT_DOUBLE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Forward Delay", "stp.forward",
+ FT_DOUBLE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_version_1_length,
- { "Version 1 Length", "stp.version_1_length",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Version 1 Length", "stp.version_1_length",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_pvst_tlvtype,
- { "Type", "stp.pvst.tlvtype",
- FT_UINT16, BASE_HEX, VALS(bpdu_pvst_tlv_vals), 0x0,
- NULL, HFILL }},
+ { "Type", "stp.pvst.tlvtype",
+ FT_UINT16, BASE_HEX, VALS(bpdu_pvst_tlv_vals), 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_pvst_tlvlength,
- { "Length", "stp.pvst.tlvlen",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Length", "stp.pvst.tlvlen",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_pvst_tlv_origvlan,
- { "Originating VLAN", "stp.pvst.origvlan",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Originating VLAN", "stp.pvst.origvlan",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_pvst_tlvvalue,
- { "Value", "stp.pvst.tlvval",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Value", "stp.pvst.tlvval",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_version_3_length,
- { "Version 3 Length", "mstp.version_3_length",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Version 3 Length", "mstp.version_3_length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_mst_config_format_selector,
- { "MST Config ID format selector", "mstp.config_format_selector",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "MST Config ID format selector", "mstp.config_format_selector",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_mst_config_name,
- { "MST Config name", "mstp.config_name",
- FT_STRINGZ, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "MST Config name", "mstp.config_name",
+ FT_STRINGZ, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_mst_config_revision_level,
- { "MST Config revision", "mstp.config_revision_level",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "MST Config revision", "mstp.config_revision_level",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_mst_config_digest,
- { "MST Config digest", "mstp.config_digest",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "MST Config digest", "mstp.config_digest",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_cist_internal_root_path_cost,
- { "CIST Internal Root Path Cost", "mstp.cist_internal_root_path_cost",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "CIST Internal Root Path Cost", "mstp.cist_internal_root_path_cost",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_cist_bridge_prio,
- { "CIST Bridge Priority", "mstp.cist_bridge.prio",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "CIST Bridge Priority", "mstp.cist_bridge.prio",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_cist_bridge_sys_id_ext,
- { "CIST Bridge Identifier System ID Extension", "mstp.cist_bridge.ext",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "CIST Bridge Identifier System ID Extension", "mstp.cist_bridge.ext",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_cist_bridge_mac,
- { "CIST Bridge Identifier System ID", "mstp.cist_bridge.hw",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "CIST Bridge Identifier System ID", "mstp.cist_bridge.hw",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_cist_remaining_hops,
- { "CIST Remaining hops", "mstp.cist_remaining_hops",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "CIST Remaining hops", "mstp.cist_remaining_hops",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_msti_flags,
- { "MSTI flags", "mstp.msti.flags",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
+ { "MSTI flags", "mstp.msti.flags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_msti_regional_root_mac,
- { "Regional Root", "mstp.msti.root.hw",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { "Regional Root", "mstp.msti.root.hw",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_msti_internal_root_path_cost,
- { "Internal root path cost", "mstp.msti.root_cost",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Internal root path cost", "mstp.msti.root_cost",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_msti_bridge_identifier_priority,
- { "Bridge Identifier Priority", "mstp.msti.bridge_priority",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Bridge Identifier Priority", "mstp.msti.bridge_priority",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_msti_port_identifier_priority,
- { "Port identifier priority", "mstp.msti.port_priority",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Port identifier priority", "mstp.msti.port_priority",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_msti_port_id,
- { "Port identifier", "mstp.msti.port",
- FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
+ { "Port identifier", "mstp.msti.port",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_msti_remaining_hops,
- { "Remaining hops", "mstp.msti.remaining_hops",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
- { &hf_bpdu_version_4_length,
- { "Version 4 Length", "mstp.version_4_length",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { "Remaining hops", "mstp.msti.remaining_hops",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_bpdu_version_4_length,
+ { "Version 4 Length", "mstp.version_4_length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
{ &hf_bpdu_spt_config_format_selector,
- { "SPT Config ID format selector", "mstp.config_format_selector",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
- { &hf_bpdu_spt_config_name,
- {"SPT Config name", "mstp.config_name",
- FT_STRINGZ, BASE_NONE, NULL, 0x0,
- NULL, HFILL } },
- { &hf_bpdu_spt_config_revision_level,
- { "SPT Config revision", "mstp.config_revision_level",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL } },
- { &hf_bpdu_spt_config_digest,
- { "SPT Config digest", "mstp.config_digest",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL } },
- { &hf_bpdu_flags_agree_num,
- { "Agreement Number", "mstp.agree_flags.agreement_num",
- FT_UINT8, BASE_DEC, NULL, 0x03,
- NULL, HFILL } },
- { &hf_bpdu_flags_dagree_num,
- { "Disagreement Number", "mstp.agree_flags.dagreement_num",
- FT_UINT8, BASE_DEC, NULL, 0x0C,
- NULL, HFILL } },
- { &hf_bpdu_flags_agree_valid,
- { "Agreement Valid Flag", "mstp.agree_flags.agreement_valid",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
- NULL, HFILL } },
- { &hf_bpdu_flags_restricted_role,
- { "Restricted Role", "mstp.agree_flags.rest_role",
+ { "SPT Config ID format selector", "mstp.config_format_selector",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_bpdu_spt_config_name,
+ {"SPT Config name", "mstp.config_name",
+ FT_STRINGZ, BASE_NONE, NULL, 0x0,
+ NULL, HFILL } },
+ { &hf_bpdu_spt_config_revision_level,
+ { "SPT Config revision", "mstp.config_revision_level",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL } },
+ { &hf_bpdu_spt_config_digest,
+ { "SPT Config digest", "mstp.config_digest",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL } },
+ { &hf_bpdu_flags_agree_num,
+ { "Agreement Number", "mstp.agree_flags.agreement_num",
+ FT_UINT8, BASE_DEC, NULL, 0x03,
+ NULL, HFILL } },
+ { &hf_bpdu_flags_dagree_num,
+ { "Disagreement Number", "mstp.agree_flags.dagreement_num",
+ FT_UINT8, BASE_DEC, NULL, 0x0C,
+ NULL, HFILL } },
+ { &hf_bpdu_flags_agree_valid,
+ { "Agreement Valid Flag", "mstp.agree_flags.agreement_valid",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
+ NULL, HFILL } },
+ { &hf_bpdu_flags_restricted_role,
+ { "Restricted Role", "mstp.agree_flags.rest_role",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20,
NULL, HFILL } },
{ &hf_bpdu_spt_agreement_digest,
@@ -1468,3 +1468,16 @@ proto_reg_handoff_bpdu(void)
bpdu_handle = find_dissector("bpdu_cisco");
dissector_add_uint("llc.cisco_pid", 0x010b, bpdu_handle); /* Handle Cisco's (R)PVST+ TLV extensions */
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-bvlc.c b/epan/dissectors/packet-bvlc.c
index a8e6fbc046..fe6c431dab 100644
--- a/epan/dissectors/packet-bvlc.c
+++ b/epan/dissectors/packet-bvlc.c
@@ -441,3 +441,16 @@ proto_reg_handoff_bvlc(void)
}
additional_bvlc_udp_port = global_additional_bvlc_udp_port;
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-dcerpc-fldb.c b/epan/dissectors/packet-dcerpc-fldb.c
index ae40cfd103..d4c1244f54 100644
--- a/epan/dissectors/packet-dcerpc-fldb.c
+++ b/epan/dissectors/packet-dcerpc-fldb.c
@@ -47,10 +47,8 @@ static gint ett_fldb_vlconf_cell = -1;
static gint ett_fldb_afsNameString_t = -1;
-
static e_uuid_t uuid_fldb =
- { 0x4d37f2dd, 0xed43, 0x0000, {0x02, 0xc0, 0x37, 0xcf, 0x2e, 0x00, 0x00,
- 0x01}
+ { 0x4d37f2dd, 0xed43, 0x0000, {0x02, 0xc0, 0x37, 0xcf, 0x2e, 0x00, 0x00, 0x01}
};
static guint16 ver_fldb = 4;
@@ -193,65 +191,66 @@ static int hf_fldb_voltype = -1;
static guint32 st;
static const guint8 *st_str;
-#define AFS_FLAG_RETURNTOKEN 1
-#define AFS_FLAG_TOKENJUMPQUEUE 2
-#define AFS_FLAG_SKIPTOKEN 4
-#define AFS_FLAG_NOOPTIMISM 0x8
-#define AFS_FLAG_TOKENID 0x10
-#define AFS_FLAG_RETURNBLOCKER 0x20
-#define AFS_FLAG_ASYNCGRANT 0x40
-#define AFS_FLAG_NOREVOKE 0x80
-#define AFS_FLAG_MOVE_REESTABLISH 0x100
-#define AFS_FLAG_SERVER_REESTABLISH 0x200
-#define AFS_FLAG_NO_NEW_EPOCH 0x400
-#define AFS_FLAG_MOVE_SOURCE_OK 0x800
-#define AFS_FLAG_SYNC 0x1000
-#define AFS_FLAG_ZERO 0x2000
-#define AFS_FLAG_SKIPSTATUS 0x4000
-#define AFS_FLAG_FORCEREVOCATIONS 0x8000
-#define AFS_FLAG_FORCEVOLQUIESCE 0x10000
-#define AFS_FLAG_FORCEREVOCATIONDOWN 0x20000
-
-#define AFS_FLAG_SEC_SERVICE 0x1
-#define AFS_FLAG_CONTEXT_NEW_IF 0x2
-#define AFS_FLAG_CONTEXT_DO_RESET 0x4
-#define AFS_FLAG_CONTEXT_NEW_ACL_IF 0x8
-#define AFS_FLAG_CONTEXT_NEW_TKN_TYPES 0x10
-
-#define VLSF_NEWREPSITE 0x01
-#define VLSF_SPARE1 0x02
-#define VLSF_SPARE2 0x04 /* used for VLSF_RWVOL in flprocs.c */
-#define VLSF_SPARE3 0x08 /* used for VLSF_BACKVOL in flprocs.c */
-#define VLSF_SAMEASPREV 0x10
-#define VLSF_DEFINED 0x20
-#define VLSF_PARTIALADDRS 0x40
+#define AFS_FLAG_RETURNTOKEN 0x00001
+#define AFS_FLAG_TOKENJUMPQUEUE 0x00002
+#define AFS_FLAG_SKIPTOKEN 0x00004
+#define AFS_FLAG_NOOPTIMISM 0x00008
+#define AFS_FLAG_TOKENID 0x00010
+#define AFS_FLAG_RETURNBLOCKER 0x00020
+#define AFS_FLAG_ASYNCGRANT 0x00040
+#define AFS_FLAG_NOREVOKE 0x00080
+#define AFS_FLAG_MOVE_REESTABLISH 0x00100
+#define AFS_FLAG_SERVER_REESTABLISH 0x00200
+#define AFS_FLAG_NO_NEW_EPOCH 0x00400
+#define AFS_FLAG_MOVE_SOURCE_OK 0x00800
+#define AFS_FLAG_SYNC 0x01000
+#define AFS_FLAG_ZERO 0x02000
+#define AFS_FLAG_SKIPSTATUS 0x04000
+#define AFS_FLAG_FORCEREVOCATIONS 0x08000
+#define AFS_FLAG_FORCEVOLQUIESCE 0x10000
+#define AFS_FLAG_FORCEREVOCATIONDOWN 0x20000
+
+#define AFS_FLAG_SEC_SERVICE 0x01
+#define AFS_FLAG_CONTEXT_NEW_IF 0x02
+#define AFS_FLAG_CONTEXT_DO_RESET 0x04
+#define AFS_FLAG_CONTEXT_NEW_ACL_IF 0x08
+#define AFS_FLAG_CONTEXT_NEW_TKN_TYPES 0x10
+
+#define VLSF_NEWREPSITE 0x01
+#define VLSF_SPARE1 0x02
+#define VLSF_SPARE2 0x04 /* used for VLSF_RWVOL in flprocs.c */
+#define VLSF_SPARE3 0x08 /* used for VLSF_BACKVOL in flprocs.c */
+#define VLSF_SAMEASPREV 0x10
+#define VLSF_DEFINED 0x20
+#define VLSF_PARTIALADDRS 0x40
#define VLSF_ZEROIXHERE 0x80000000
#define MACRO_ST_CLEAR(name) \
offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_error_st, &st); \
st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u"); \
- if (st){ \
+ if (st) { \
col_add_fstr (pinfo->cinfo, COL_INFO, "%s st:%s ", name, st_str); \
- } else{ \
+ } else { \
col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str); \
}
+
static int
-dissect_afsnetaddr (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * parent_tree,
- dcerpc_info *di, guint8 * drep)
+dissect_afsnetaddr (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ dcerpc_info *di, guint8 *drep)
{
- proto_item *item = NULL;
- proto_tree *tree = NULL;
- int old_offset = offset;
- guint16 type;
- guint8 data;
- int i;
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+ int old_offset = offset;
+ guint16 type;
+ guint8 data;
+ int i;
if (parent_tree)
{
- tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1,
- ett_fldb_afsnetaddr, &item, "afsNetAddr:");
+ tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1,
+ ett_fldb_afsnetaddr, &item, "afsNetAddr:");
}
/* unsigned16 type;
@@ -260,55 +259,47 @@ dissect_afsnetaddr (tvbuff_t * tvb, int offset,
offset =
dissect_ndr_uint16 (tvb, offset, pinfo, tree, di, drep,
- hf_fldb_afsnetaddr_type, &type);
+ hf_fldb_afsnetaddr_type, &type);
if (type)
{
- col_append_fstr (pinfo->cinfo, COL_INFO, " Type:%u ", type);
-
+ col_append_fstr (pinfo->cinfo, COL_INFO, " Type:%u ", type);
for (i = 0; i < 14; i++)
- {
-
- offset =
- dissect_ndr_uint8 (tvb, offset, pinfo, tree, di, drep,
- hf_fldb_afsnetaddr_data, &data);
-
-
- switch (i)
- {
- case 1:
- if (data)
- {
- col_append_fstr (pinfo->cinfo, COL_INFO, " Port:%u",
- data);
- }
- break;
- case 2:
- col_append_fstr (pinfo->cinfo, COL_INFO, " IP:%u.", data);
- break;
- case 3:
- col_append_fstr (pinfo->cinfo, COL_INFO, "%u.", data);
- break;
- case 4:
- col_append_fstr (pinfo->cinfo, COL_INFO, "%u.", data);
- break;
- case 5:
- col_append_fstr (pinfo->cinfo, COL_INFO, "%u", data);
- break;
- }
-
- }
-
+ {
+ offset =
+ dissect_ndr_uint8 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_afsnetaddr_data, &data);
+
+ switch (i)
+ {
+ case 1:
+ if (data)
+ {
+ col_append_fstr (pinfo->cinfo, COL_INFO, " Port:%u", data);
+ }
+ break;
+ case 2:
+ col_append_fstr (pinfo->cinfo, COL_INFO, " IP:%u.", data);
+ break;
+ case 3:
+ col_append_fstr (pinfo->cinfo, COL_INFO, "%u.", data);
+ break;
+ case 4:
+ col_append_fstr (pinfo->cinfo, COL_INFO, "%u.", data);
+ break;
+ case 5:
+ col_append_fstr (pinfo->cinfo, COL_INFO, "%u", data);
+ break;
+ }
+
+ }
}
else
{
-
- offset += 14; /* space left after reading in type for the array. */
+ offset += 14; /* space left after reading in type for the array. */
}
-
-
proto_item_set_len (item, offset - old_offset);
return offset;
@@ -316,50 +307,47 @@ dissect_afsnetaddr (tvbuff_t * tvb, int offset,
static int
-dissect_vlconf_cell (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * parent_tree,
- dcerpc_info *di, guint8 * drep)
+dissect_vlconf_cell (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ dcerpc_info *di, guint8 *drep)
{
-
- proto_item *item = NULL;
- proto_tree *tree = NULL;
- int old_offset = offset;
-#define MAXVLCELLCHARS 128
-#define MAXVLHOSTSPERCELL 64
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+ int old_offset = offset;
+#define MAXVLCELLCHARS 128
+#define MAXVLHOSTSPERCELL 64
const guint8 *name, *hostname;
- int i;
- guint32 cellid_high, cellid_low, numservers, spare1, spare2, spare3, spare4,
+ int i;
+ guint32 cellid_high, cellid_low, numservers, spare1, spare2, spare3, spare4,
spare5;
if (parent_tree)
{
- tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1,
- ett_fldb_vlconf_cell, &item, "vlconf_cell:");
+ tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1,
+ ett_fldb_vlconf_cell, &item, "vlconf_cell:");
}
/* byte name[MAXVLCELLCHARS]; Cell name */
proto_tree_add_item (tree, hf_fldb_vlconf_cell_name, tvb, offset, 114, ENC_ASCII|ENC_NA);
name = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, MAXVLCELLCHARS, ENC_ASCII); /* XXX why 114 above and 128 here?? */
- offset += MAXVLCELLCHARS; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
+ offset += MAXVLCELLCHARS; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", name);
-
/* afsHyper CellID; identifier for that cell */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vlconf_cell_cellid_high, &cellid_high);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vlconf_cell_cellid_high, &cellid_high);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vlconf_cell_cellid_low, &cellid_low);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vlconf_cell_cellid_low, &cellid_low);
col_append_fstr (pinfo->cinfo, COL_INFO, " CellID:%u-%u", cellid_high,
- cellid_low);
-
+ cellid_low);
/* unsigned32 numServers; *Num active servers for the cell */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vlconf_cell_numservers, &numservers);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vlconf_cell_numservers, &numservers);
col_append_fstr (pinfo->cinfo, COL_INFO, " numServers:%u", numservers);
/* afsNetAddr hostAddr[MAXVLHOSTSPERCELL]; *addresses for cell's servers */
@@ -368,71 +356,67 @@ dissect_vlconf_cell (tvbuff_t * tvb, int offset,
offset = dissect_afsnetaddr (tvb, offset, pinfo, tree, di, drep);
}
-
/* hostnam hostName[MAXVLHOSTSPERCELL]; *Names for cell's servers* */
for (i = 0; i < MAXVLHOSTSPERCELL; i++)
{
proto_tree_add_item (tree, hf_fldb_vlconf_cell_hostname, tvb, offset,
- 64, ENC_ASCII|ENC_NA);
+ 64, ENC_ASCII|ENC_NA);
hostname = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 64, ENC_ASCII);
- offset += 64; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
+ offset += 64; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
col_append_fstr (pinfo->cinfo, COL_INFO, " hostName: %s", hostname);
}
/* unsigned32 spare1; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vlconf_cell_spare1, &spare1);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vlconf_cell_spare1, &spare1);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare1:%u", spare1);
-
/* unsigned32 spare2; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vlconf_cell_spare2, &spare2);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vlconf_cell_spare2, &spare2);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare2:%u", spare2);
/* unsigned32 spare3; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vlconf_cell_spare3, &spare3);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vlconf_cell_spare3, &spare3);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare3:%u", spare3);
-
/* unsigned32 spare4; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vlconf_cell_spare4, &spare4);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vlconf_cell_spare4, &spare4);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare4:%u", spare4);
/* unsigned32 spare5; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vlconf_cell_spare5, &spare5);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vlconf_cell_spare5, &spare5);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare5:%u", spare5);
-
proto_item_set_len (item, offset - old_offset);
return offset;
}
+
static int
-dissect_afsNameString_t (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * parent_tree,
- dcerpc_info *di, guint8 * drep)
+dissect_afsNameString_t (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ dcerpc_info *di, guint8 *drep)
{
-
/*
typedef [string] byte NameString_t[AFS_NAMEMAX];
*/
- proto_item *item = NULL;
- proto_tree *tree = NULL;
- int old_offset = offset;
-#define AFS_NAMEMAX 256
- guint32 string_size;
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+ int old_offset = offset;
+#define AFS_NAMEMAX 256
+ guint32 string_size;
const guint8 *namestring;
if (di->conformant_run)
@@ -440,205 +424,202 @@ typedef [string] byte NameString_t[AFS_NAMEMAX];
return offset;
}
-
if (parent_tree)
{
- tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1,
- ett_fldb_afsNameString_t, &item, "afsNameString_t:"); }
+ tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1,
+ ett_fldb_afsNameString_t, &item, "afsNameString_t:"); }
- offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_afsNameString_t_principalName_size,
- &string_size);
+ offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_afsNameString_t_principalName_size,
+ &string_size);
col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
if (string_size < AFS_NAMEMAX)
{
/* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
proto_tree_add_item (tree,
- hf_fldb_afsNameString_t_principalName_string,
- tvb, offset, string_size, ENC_ASCII|ENC_NA);
+ hf_fldb_afsNameString_t_principalName_string,
+ tvb, offset, string_size, ENC_ASCII|ENC_NA);
namestring = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, string_size, ENC_ASCII);
offset += string_size;
- col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
+ col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
}
else
{
- col_append_fstr (pinfo->cinfo, COL_INFO,
- " :FIXME!: Invalid string length of %u",
- string_size);
+ col_append_fstr (pinfo->cinfo, COL_INFO,
+ " :FIXME!: Invalid string length of %u",
+ string_size);
}
proto_item_set_len (item, offset - old_offset);
return offset;
}
-
static int
-dissect_afsflags (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * parent_tree,
- dcerpc_info *di, guint8 * drep)
+dissect_afsflags (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ dcerpc_info *di, guint8 *drep)
{
- proto_item *item = NULL;
- proto_tree *tree = NULL;
- int old_offset = offset;
- guint32 afsflags;
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+ int old_offset = offset;
+ guint32 afsflags;
if (parent_tree)
{
- tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_fldb_afsflags, &item, "afsFlags:");
+ tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1, ett_fldb_afsflags, &item, "afsFlags:");
}
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_afsflags_flags, &afsflags);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_afsflags_flags, &afsflags);
if (afsflags)
{
col_append_str (pinfo->cinfo, COL_INFO, " afsFlags=");
if ((afsflags & AFS_FLAG_RETURNTOKEN) == AFS_FLAG_RETURNTOKEN)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":RETURNTOKEN");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":RETURNTOKEN");
+ }
if ((afsflags & AFS_FLAG_TOKENJUMPQUEUE) == AFS_FLAG_TOKENJUMPQUEUE)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":TOKENJUMPQUEUE");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":TOKENJUMPQUEUE");
+ }
if ((afsflags & AFS_FLAG_SKIPTOKEN) == AFS_FLAG_SKIPTOKEN)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SKIPTOKEN");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SKIPTOKEN");
+ }
if ((afsflags & AFS_FLAG_NOOPTIMISM) == AFS_FLAG_NOOPTIMISM)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":NOOPTIMISM");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":NOOPTIMISM");
+ }
if ((afsflags & AFS_FLAG_TOKENID) == AFS_FLAG_TOKENID)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":TOKENID");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":TOKENID");
+ }
if ((afsflags & AFS_FLAG_RETURNBLOCKER) == AFS_FLAG_RETURNBLOCKER)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":RETURNBLOCKER");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":RETURNBLOCKER");
+ }
if ((afsflags & AFS_FLAG_ASYNCGRANT) == AFS_FLAG_ASYNCGRANT)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":ASYNCGRANT");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":ASYNCGRANT");
+ }
if ((afsflags & AFS_FLAG_NOREVOKE) == AFS_FLAG_NOREVOKE)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":NOREVOKE");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":NOREVOKE");
+ }
if ((afsflags & AFS_FLAG_MOVE_REESTABLISH) == AFS_FLAG_MOVE_REESTABLISH)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":MOVE_REESTABLISH");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":MOVE_REESTABLISH");
+ }
if ((afsflags & AFS_FLAG_SERVER_REESTABLISH) ==
- AFS_FLAG_SERVER_REESTABLISH)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SERVER_REESTABLISH");
- if ((afsflags & AFS_FLAG_NO_NEW_EPOCH) == AFS_FLAG_NO_NEW_EPOCH)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":NO_NEW_EPOCH");
- }
- if ((afsflags & AFS_FLAG_MOVE_SOURCE_OK) == AFS_FLAG_MOVE_SOURCE_OK)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":MOVE_SOURCE_OK");
- }
- if ((afsflags & AFS_FLAG_SYNC) == AFS_FLAG_SYNC)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SYNC");
- }
- if ((afsflags & AFS_FLAG_ZERO) == AFS_FLAG_ZERO)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":ZERO");
- }
- if ((afsflags & AFS_FLAG_SKIPSTATUS) == AFS_FLAG_SKIPSTATUS)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SKIPSTATUS");
- }
- if ((afsflags & AFS_FLAG_FORCEREVOCATIONS) ==
- AFS_FLAG_FORCEREVOCATIONS)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":FORCEREVOCATIONS");
- }
- if ((afsflags & AFS_FLAG_FORCEVOLQUIESCE) ==
- AFS_FLAG_FORCEVOLQUIESCE)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":FORCEVOLQUIESCE");
- }
- if ((afsflags & AFS_FLAG_SEC_SERVICE) == AFS_FLAG_SEC_SERVICE)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SEC_SERVICE");
- }
- if ((afsflags & AFS_FLAG_CONTEXT_NEW_ACL_IF) ==
- AFS_FLAG_CONTEXT_NEW_ACL_IF)
- {
- col_append_str (pinfo->cinfo, COL_INFO,
- ":CONTEXT_NEW_ACL_IF");
- }
-
- }
+ AFS_FLAG_SERVER_REESTABLISH)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SERVER_REESTABLISH");
+ if ((afsflags & AFS_FLAG_NO_NEW_EPOCH) == AFS_FLAG_NO_NEW_EPOCH)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":NO_NEW_EPOCH");
+ }
+ if ((afsflags & AFS_FLAG_MOVE_SOURCE_OK) == AFS_FLAG_MOVE_SOURCE_OK)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":MOVE_SOURCE_OK");
+ }
+ if ((afsflags & AFS_FLAG_SYNC) == AFS_FLAG_SYNC)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SYNC");
+ }
+ if ((afsflags & AFS_FLAG_ZERO) == AFS_FLAG_ZERO)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":ZERO");
+ }
+ if ((afsflags & AFS_FLAG_SKIPSTATUS) == AFS_FLAG_SKIPSTATUS)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SKIPSTATUS");
+ }
+ if ((afsflags & AFS_FLAG_FORCEREVOCATIONS) ==
+ AFS_FLAG_FORCEREVOCATIONS)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":FORCEREVOCATIONS");
+ }
+ if ((afsflags & AFS_FLAG_FORCEVOLQUIESCE) ==
+ AFS_FLAG_FORCEVOLQUIESCE)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":FORCEVOLQUIESCE");
+ }
+ if ((afsflags & AFS_FLAG_SEC_SERVICE) == AFS_FLAG_SEC_SERVICE)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SEC_SERVICE");
+ }
+ if ((afsflags & AFS_FLAG_CONTEXT_NEW_ACL_IF) ==
+ AFS_FLAG_CONTEXT_NEW_ACL_IF)
+ {
+ col_append_str (pinfo->cinfo, COL_INFO,
+ ":CONTEXT_NEW_ACL_IF");
+ }
+
+ }
}
proto_item_set_len (item, offset - old_offset);
return offset;
-
}
static int
-dissect_siteflags (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * parent_tree,
- dcerpc_info *di, guint8 * drep)
+dissect_siteflags (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ dcerpc_info *di, guint8 *drep)
{
- proto_item *item = NULL;
- proto_tree *tree = NULL;
- int old_offset = offset;
- guint32 siteflags;
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+ int old_offset = offset;
+ guint32 siteflags;
if (parent_tree)
{
- tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_fldb_siteflags, &item, "SiteFlags:");
+ tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1, ett_fldb_siteflags, &item, "SiteFlags:");
}
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_siteflags,
- &siteflags);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_siteflags,
+ &siteflags);
if (siteflags)
{
col_append_str (pinfo->cinfo, COL_INFO, " SiteFlags");
if ((siteflags & VLSF_NEWREPSITE) == VLSF_NEWREPSITE)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":NEWREPSITE");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":NEWREPSITE");
+ }
if ((siteflags & VLSF_SPARE1) == VLSF_SPARE1)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SPARE1");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SPARE1");
+ }
if ((siteflags & VLSF_SPARE2) == VLSF_SPARE2)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SPARE2");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SPARE2");
+ }
if ((siteflags & VLSF_SPARE3) == VLSF_SPARE3)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SPARE3");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SPARE3");
+ }
if ((siteflags & VLSF_SAMEASPREV) == VLSF_SAMEASPREV)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":SAMEASPREV");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":SAMEASPREV");
+ }
if ((siteflags & VLSF_DEFINED) == VLSF_DEFINED)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":DEFINED");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":DEFINED");
+ }
if ((siteflags & VLSF_PARTIALADDRS) == VLSF_PARTIALADDRS)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":PARTIALADDRS ");
- }
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":PARTIALADDRS ");
+ }
if ((siteflags & VLSF_ZEROIXHERE) == VLSF_ZEROIXHERE)
- {
- col_append_str (pinfo->cinfo, COL_INFO, ":ZEROIXHERE");
+ {
+ col_append_str (pinfo->cinfo, COL_INFO, ":ZEROIXHERE");
- }
+ }
}
proto_item_set_len (item, offset - old_offset);
@@ -647,50 +628,49 @@ dissect_siteflags (tvbuff_t * tvb, int offset,
}
-
static int
-dissect_vldbentry (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * parent_tree,
- dcerpc_info *di, guint8 * drep)
+dissect_vldbentry (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *parent_tree,
+ dcerpc_info *di, guint8 *drep)
{
- proto_item *item = NULL;
- proto_tree *tree = NULL;
- int old_offset = offset;
+ proto_item *item = NULL;
+ proto_tree *tree = NULL;
+ int old_offset = offset;
const guint8 *volumename, *siteprincipal, *charspares, *lockername;
- guint32 volumetype, nservers, sitepartition, sitemaxreplicalatency,
- volids_high, volids_low, voltypes, cloneid_high, cloneid_low,
- maxtotallatency, hardmaxtotallatency, minimumpouncedally,
- defaultmaxreplicalatency, reclaimdally, whenlocked, spare1, spare2,
- spare3, spare4;
- e_uuid_t siteowner, siteobjid;
- gint i;
+ guint32 volumetype, nservers, sitepartition, sitemaxreplicalatency;
+ guint32 volids_high, volids_low, voltypes, cloneid_high, cloneid_low;
+ guint32 maxtotallatency, hardmaxtotallatency, minimumpouncedally;
+ guint32 defaultmaxreplicalatency, reclaimdally, whenlocked;
+ guint32 spare1, spare2, spare3, spare4;
+ e_uuid_t siteowner, siteobjid;
+ gint i;
#define MAXNSERVERS 16
#define MAXVOLTYPES 8
#define MAXLOCKNAMELEN 64
if (parent_tree)
{
- tree = proto_tree_add_subtree(parent_tree, tvb, offset, -1, ett_fldb_vldbentry, &item, "vldbentry:");
+ tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1, ett_fldb_vldbentry, &item, "vldbentry:");
}
/* byte name[114]; Volume name */
proto_tree_add_item (tree, hf_fldb_vldbentry_volumename, tvb, offset, 114,
- ENC_ASCII|ENC_NA);
+ ENC_ASCII|ENC_NA);
volumename = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 114, ENC_ASCII);
- offset += 110; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
- col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", volumename);
+ offset += 110; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
+ col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", volumename);
/* unsigned32 volumeType; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_volumetype, &volumetype);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_volumetype, &volumetype);
col_append_fstr (pinfo->cinfo, COL_INFO, " Type:%u", volumetype);
/*unsigned32 nServers; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_nservers, &nservers);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_nservers, &nservers);
col_append_fstr (pinfo->cinfo, COL_INFO, " nServers:%u", nservers);
/* afsNetAddr siteAddr[MAXNSERVERS]; 16 */
@@ -705,16 +685,15 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
for (i = 0; i < MAXNSERVERS; i++)
{
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_sitepartition, &sitepartition);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_sitepartition, &sitepartition);
if (sitepartition)
- {
- col_append_fstr (pinfo->cinfo, COL_INFO, " LFS:%u",
- sitepartition);
- }
+ {
+ col_append_fstr (pinfo->cinfo, COL_INFO, " LFS:%u",
+ sitepartition);
+ }
}
-
/* unsigned32 siteFlags[MAXNSERVERS]; */
for (i = 0; i < MAXNSERVERS; i++)
{
@@ -725,23 +704,23 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
for (i = 0; i < MAXNSERVERS; i++)
{
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_sitemaxreplicalatency,
- &sitemaxreplicalatency);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_sitemaxreplicalatency,
+ &sitemaxreplicalatency);
if (sitemaxreplicalatency)
- {
- col_append_fstr (pinfo->cinfo, COL_INFO, " MaxRepLat%d:%u", i,
- sitemaxreplicalatency);
- }
+ {
+ col_append_fstr (pinfo->cinfo, COL_INFO, " MaxRepLat%d:%u", i,
+ sitemaxreplicalatency);
+ }
}
/* kerb_princ_name sitePrincipal[MAXNSERVERS]; principal */
for (i = 0; i < MAXNSERVERS; i++)
{
proto_tree_add_item (tree, hf_fldb_vldbentry_siteprincipal, tvb,
- offset, 64, ENC_ASCII|ENC_NA);
+ offset, 64, ENC_ASCII|ENC_NA);
siteprincipal = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 64, ENC_ASCII);
offset += 64;
- col_append_fstr (pinfo->cinfo, COL_INFO, " Princ: %s", siteprincipal);
+ col_append_fstr (pinfo->cinfo, COL_INFO, " Princ: %s", siteprincipal);
}
/* afsUUID siteOwner[MAXNSERVERS]; */
@@ -749,209 +728,191 @@ dissect_vldbentry (tvbuff_t * tvb, int offset,
for (i = 0; i < MAXNSERVERS; i++)
{
offset =
- dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_siteowner, &siteowner);
- col_append_fstr (pinfo->cinfo, COL_INFO,
- " SiteOwner - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- siteowner.Data1, siteowner.Data2, siteowner.Data3,
- siteowner.Data4[0], siteowner.Data4[1],
- siteowner.Data4[2], siteowner.Data4[3],
- siteowner.Data4[4], siteowner.Data4[5],
- siteowner.Data4[6], siteowner.Data4[7]);
+ dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_siteowner, &siteowner);
+ col_append_fstr (pinfo->cinfo, COL_INFO,
+ " SiteOwner - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ siteowner.Data1, siteowner.Data2, siteowner.Data3,
+ siteowner.Data4[0], siteowner.Data4[1],
+ siteowner.Data4[2], siteowner.Data4[3],
+ siteowner.Data4[4], siteowner.Data4[5],
+ siteowner.Data4[6], siteowner.Data4[7]);
}
-
/* afsUUID siteObjID[MAXNSERVERS]; */
for (i = 0; i < MAXNSERVERS; i++)
{
offset =
- dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_siteobjid, &siteobjid);
- col_append_fstr (pinfo->cinfo, COL_INFO,
- " SiteObjID - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- siteobjid.Data1, siteobjid.Data2, siteobjid.Data3,
- siteobjid.Data4[0], siteobjid.Data4[1],
- siteobjid.Data4[2], siteobjid.Data4[3],
- siteobjid.Data4[4], siteobjid.Data4[5],
- siteobjid.Data4[6], siteobjid.Data4[7]);
+ dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_siteobjid, &siteobjid);
+ col_append_fstr (pinfo->cinfo, COL_INFO,
+ " SiteObjID - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ siteobjid.Data1, siteobjid.Data2, siteobjid.Data3,
+ siteobjid.Data4[0], siteobjid.Data4[1],
+ siteobjid.Data4[2], siteobjid.Data4[3],
+ siteobjid.Data4[4], siteobjid.Data4[5],
+ siteobjid.Data4[6], siteobjid.Data4[7]);
}
-
/* afsHyper VolIDs[MAXVOLTYPES]; */
/* XXX for these hypers, I will skip trying to use non portable guint64, and just read both, and use only low.
never seen a case of a volid going anywhere the overflow of the 32 low; */
for (i = 0; i < MAXVOLTYPES; i++)
{
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_volids_high, &volids_high);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_volids_high, &volids_high);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_volids_low, &volids_low);
- col_append_fstr (pinfo->cinfo, COL_INFO, " VolIDs%d:%u", i,
- volids_low);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_volids_low, &volids_low);
+ col_append_fstr (pinfo->cinfo, COL_INFO, " VolIDs%d:%u", i,
+ volids_low);
}
-
/* unsigned32 VolTypes[MAXVOLTYPES]; */
for (i = 0; i < MAXVOLTYPES; i++)
{
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_voltypes, &voltypes);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_voltypes, &voltypes);
if (voltypes)
- {
- col_append_fstr (pinfo->cinfo, COL_INFO, " VolTypes:%d:%u", i,
- voltypes);
- }
+ {
+ col_append_fstr (pinfo->cinfo, COL_INFO, " VolTypes:%d:%u", i,
+ voltypes);
+ }
}
/* afsHyper cloneId; Used during cloning */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_cloneid_high, &cloneid_high);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_cloneid_high, &cloneid_high);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_cloneid_low, &cloneid_low);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_cloneid_low, &cloneid_low);
if (cloneid_low)
{
- col_append_fstr (pinfo->cinfo, COL_INFO, " CloneId:%u", cloneid_low);
+ col_append_fstr (pinfo->cinfo, COL_INFO, " CloneId:%u", cloneid_low);
}
/* unsigned32 flags; General flags */
offset = dissect_afsflags (tvb, offset, pinfo, tree, di, drep);
-
-
/* unsigned32 maxTotalLatency; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_maxtotallatency, &maxtotallatency);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_maxtotallatency, &maxtotallatency);
col_append_fstr (pinfo->cinfo, COL_INFO, " MaxTotLat:%u",
- maxtotallatency);
-
+ maxtotallatency);
/* unsigned32 hardMaxTotalLatency; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_hardmaxtotallatency,
- &hardmaxtotallatency);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_hardmaxtotallatency,
+ &hardmaxtotallatency);
col_append_fstr (pinfo->cinfo, COL_INFO, " HardMaxTotLat:%u",
- hardmaxtotallatency);
-
+ hardmaxtotallatency);
/* unsigned32 minimumPounceDally; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_minimumpouncedally,
- &minimumpouncedally);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_minimumpouncedally,
+ &minimumpouncedally);
col_append_fstr (pinfo->cinfo, COL_INFO, " minPounceDally:%u",
- minimumpouncedally);
-
+ minimumpouncedally);
/* unsigned32 defaultMaxReplicaLatency; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_defaultmaxreplicalatency,
- &defaultmaxreplicalatency);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_defaultmaxreplicalatency,
+ &defaultmaxreplicalatency);
col_append_fstr (pinfo->cinfo, COL_INFO, " defaultMaxReplicaLatency:%u",
- defaultmaxreplicalatency);
+ defaultmaxreplicalatency);
/* unsigned32 reclaimDally; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_reclaimdally, &reclaimdally);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_reclaimdally, &reclaimdally);
col_append_fstr (pinfo->cinfo, COL_INFO, " reclaimDally:%u",
- reclaimdally);
-
+ reclaimdally);
/* unsigned32 WhenLocked; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_whenlocked, &whenlocked);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_whenlocked, &whenlocked);
col_append_fstr (pinfo->cinfo, COL_INFO, " WhenLocked:%u", whenlocked);
-
/* unsigned32 spare1; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_spare1, &spare1);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_spare1, &spare1);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare1:%u", spare1);
/* unsigned32 spare2; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_spare2, &spare2);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_spare2, &spare2);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare2:%u", spare2);
-
/* unsigned32 spare3; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_spare3, &spare3);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_spare3, &spare3);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare3:%u", spare3);
/* unsigned32 spare4; */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_vldbentry_spare4, &spare4);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_vldbentry_spare4, &spare4);
col_append_fstr (pinfo->cinfo, COL_INFO, " spare4:%u", spare4);
/* byte LockerName[MAXLOCKNAMELEN]; */
proto_tree_add_item (tree, hf_fldb_vldbentry_lockername, tvb, offset,
- MAXLOCKNAMELEN, ENC_ASCII|ENC_NA);
+ MAXLOCKNAMELEN, ENC_ASCII|ENC_NA);
lockername = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, MAXLOCKNAMELEN, ENC_ASCII);
- offset += MAXLOCKNAMELEN; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
+ offset += MAXLOCKNAMELEN; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
col_append_fstr (pinfo->cinfo, COL_INFO, " LockerName: %s", lockername);
/* byte charSpares[50]; */
proto_tree_add_item (tree, hf_fldb_vldbentry_charspares, tvb, offset, 50,
- ENC_ASCII|ENC_NA);
+ ENC_ASCII|ENC_NA);
charspares = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 50, ENC_ASCII);
- offset += 50; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
+ offset += 50; /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
col_append_fstr (pinfo->cinfo, COL_INFO, " charSpares:%s", charspares);
-
-
proto_item_set_len (item, offset - old_offset);
return offset;
-
-
}
+
static int
-fldb_dissect_getcellinfo_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getcellinfo_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
return offset;
}
-
/* [out] vlconf_cell *MyCell */
offset = dissect_vlconf_cell (tvb, offset, pinfo, tree, di, drep);
-
return offset;
}
-
static int
-fldb_dissect_getentrybyname_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getentrybyname_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
return offset;
}
-
/*
* [in] volumeName volName,
*/
@@ -959,15 +920,14 @@ fldb_dissect_getentrybyname_rqst (tvbuff_t * tvb, int offset,
offset += 4;
offset = dissect_afsNameString_t (tvb, offset, pinfo, tree, di, drep);
-
return offset;
-
}
+
static int
-fldb_dissect_getentrybyname_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getentrybyname_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
/*
[out] vldbentry *entry
@@ -983,18 +943,17 @@ fldb_dissect_getentrybyname_resp (tvbuff_t * tvb, int offset,
return offset;
}
+
static int
-fldb_dissect_getsiteinfo_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getsiteinfo_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
return offset;
}
-
-
/*
* [in] afsNetAddr *OldAddr,
*
@@ -1002,7 +961,6 @@ fldb_dissect_getsiteinfo_rqst (tvbuff_t * tvb, int offset,
offset = dissect_afsnetaddr (tvb, offset, pinfo, tree, di, drep);
-
/*
*
* [in] afsNetAddr *OldAddr,
@@ -1010,18 +968,19 @@ fldb_dissect_getsiteinfo_rqst (tvbuff_t * tvb, int offset,
unsigned8 data[14];
*/
-
return offset;
}
+
+
static int
-fldb_dissect_getsiteinfo_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getsiteinfo_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
const guint8 *namestring;
- e_uuid_t owner, objid;
- guint32 creationquota, creationuses, deletedflag, spare2, spare3, spare4,
- spare5;
+ e_uuid_t owner, objid;
+ guint32 creationquota, creationuses, deletedflag;
+ guint32 spare2, spare3, spare4, spare5;
if (di->conformant_run)
{
@@ -1047,7 +1006,7 @@ fldb_dissect_getsiteinfo_resp (tvbuff_t * tvb, int offset,
/* handle byte KerbPrin[64]. */
- offset += 48; /* part of kerbprin before name... */
+ offset += 48; /* part of kerbprin before name... */
proto_tree_add_item (tree, hf_fldb_namestring, tvb, offset, 64, ENC_ASCII|ENC_NA);
namestring = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 64, ENC_ASCII);
@@ -1056,59 +1015,59 @@ fldb_dissect_getsiteinfo_resp (tvbuff_t * tvb, int offset,
offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep, hf_fldb_uuid_owner, &owner);
col_append_fstr (pinfo->cinfo, COL_INFO,
- " Owner - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- owner.Data1, owner.Data2, owner.Data3, owner.Data4[0],
- owner.Data4[1], owner.Data4[2], owner.Data4[3],
- owner.Data4[4], owner.Data4[5], owner.Data4[6],
- owner.Data4[7]);
+ " Owner - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ owner.Data1, owner.Data2, owner.Data3, owner.Data4[0],
+ owner.Data4[1], owner.Data4[2], owner.Data4[3],
+ owner.Data4[4], owner.Data4[5], owner.Data4[6],
+ owner.Data4[7]);
offset =
dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep, hf_fldb_uuid_objid,
- &objid);
+ &objid);
col_append_fstr (pinfo->cinfo, COL_INFO,
- " ObjID - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- objid.Data1, objid.Data2, objid.Data3, objid.Data4[0],
- objid.Data4[1], objid.Data4[2], objid.Data4[3],
- objid.Data4[4], objid.Data4[5], objid.Data4[6],
- objid.Data4[7]);
+ " ObjID - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ objid.Data1, objid.Data2, objid.Data3, objid.Data4[0],
+ objid.Data4[1], objid.Data4[2], objid.Data4[3],
+ objid.Data4[4], objid.Data4[5], objid.Data4[6],
+ objid.Data4[7]);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_creationquota,
- &creationquota);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_creationquota,
+ &creationquota);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_creationuses,
- &creationuses);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_creationuses,
+ &creationuses);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_deletedflag,
- &deletedflag);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_deletedflag,
+ &deletedflag);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_spare2,
- &spare2);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_spare2,
+ &spare2);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_spare3,
- &spare3);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_spare3,
+ &spare3);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_spare4,
- &spare4);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_spare4,
+ &spare4);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_spare5,
- &spare5);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_spare5,
+ &spare5);
col_append_fstr (pinfo->cinfo, COL_INFO,
- " CreationQuota:%u CreationUses:%u DeletedFlag:%u Spare2:%u Spare3:%u Spare4:%u Spare5:%u",
- creationquota, creationuses, deletedflag, spare2, spare3,
- spare4, spare5);
+ " CreationQuota:%u CreationUses:%u DeletedFlag:%u Spare2:%u Spare3:%u Spare4:%u Spare5:%u",
+ creationquota, creationuses, deletedflag, spare2, spare3,
+ spare4, spare5);
MACRO_ST_CLEAR ("GetSiteInfo reply");
return offset;
-
}
+
static int
-fldb_dissect_listentry_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_listentry_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
guint32 var1, previous_index;
@@ -1117,7 +1076,6 @@ fldb_dissect_listentry_rqst (tvbuff_t * tvb, int offset,
return offset;
}
-
/*
* [in] unsigned32 previous_index,
* [out] unsigned32 *count,
@@ -1126,26 +1084,25 @@ fldb_dissect_listentry_rqst (tvbuff_t * tvb, int offset,
*/
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_listentry_rqst_previous_index,
- &previous_index);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_listentry_rqst_previous_index,
+ &previous_index);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_listentry_rqst_var1, &var1);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_listentry_rqst_var1, &var1);
col_append_fstr (pinfo->cinfo, COL_INFO, " :PrevIndex: %u",
- previous_index);
-
+ previous_index);
return offset;
-
}
+
static int
-fldb_dissect_listentry_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_listentry_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
guint32 count, next_index;
@@ -1154,7 +1111,6 @@ fldb_dissect_listentry_resp (tvbuff_t * tvb, int offset,
return offset;
}
-
/*
* [out] unsigned32 *count,
* [out] unsigned32 *next_index,
@@ -1162,20 +1118,20 @@ fldb_dissect_listentry_resp (tvbuff_t * tvb, int offset,
*/
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_listentry_resp_count, &count);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_listentry_resp_count, &count);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_listentry_resp_next_index, &next_index);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_listentry_resp_next_index, &next_index);
offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);
return offset;
-
}
+
static int
-fldb_dissect_setlock_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_setlock_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
guint32 fsid_high, fsid_low, voltype, voloper;
@@ -1184,31 +1140,31 @@ fldb_dissect_setlock_rqst (tvbuff_t * tvb, int offset,
return offset;
}
-
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_setlock_rqst_fsid_high, &fsid_high);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_setlock_rqst_fsid_high, &fsid_high);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_setlock_rqst_fsid_low, &fsid_low);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_setlock_rqst_fsid_low, &fsid_low);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_setlock_rqst_voltype, &voltype);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_setlock_rqst_voltype, &voltype);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_setlock_rqst_voloper, &voloper);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_setlock_rqst_voloper, &voloper);
col_append_fstr (pinfo->cinfo, COL_INFO,
- " :FSID:%u/%u VolType:0x%x VolOper:%u", fsid_high,
- fsid_low, voltype, voloper);
+ " :FSID:%u/%u VolType:0x%x VolOper:%u", fsid_high,
+ fsid_low, voltype, voloper);
return offset;
-
}
+
+
static int
-fldb_dissect_setlock_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_setlock_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
@@ -1217,36 +1173,36 @@ fldb_dissect_setlock_resp (tvbuff_t * tvb, int offset,
MACRO_ST_CLEAR ("SetLock reply");
-
-
return offset;
}
+
+
static int
-fldb_dissect_deleteentry_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_deleteentry_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
return offset;
}
-
MACRO_ST_CLEAR ("DeleteEntry reply");
return offset;
}
+
static int
-fldb_dissect_deleteentry_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_deleteentry_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
-
/*
[in] afsHyper *Volid,
- [in] unsigned32 voltype
+ [in] unsigned32 voltype
*/
+
guint32 fsid_high, fsid_low, voltype, voloper;
if (di->conformant_run)
@@ -1254,33 +1210,31 @@ fldb_dissect_deleteentry_rqst (tvbuff_t * tvb, int offset,
return offset;
}
-
-
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_deleteentry_rqst_fsid_high, &fsid_high);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_deleteentry_rqst_fsid_high, &fsid_high);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_deleteentry_rqst_fsid_low, &fsid_low);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_deleteentry_rqst_fsid_low, &fsid_low);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_deleteentry_rqst_voltype, &voltype);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_deleteentry_rqst_voltype, &voltype);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_deleteentry_rqst_voloper, &voloper);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_deleteentry_rqst_voloper, &voloper);
col_append_fstr (pinfo->cinfo, COL_INFO, " :FSID:%u/%u", fsid_high,
- fsid_low);
+ fsid_low);
return offset;
-
}
+
static int
-fldb_dissect_createentry_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_createentry_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
@@ -1292,26 +1246,26 @@ fldb_dissect_createentry_resp (tvbuff_t * tvb, int offset,
return offset;
}
+
static int
-fldb_dissect_createentry_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_createentry_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
return offset;
}
-
offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);
return offset;
-
}
+
static int
-fldb_dissect_getentrybyid_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getentrybyid_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
guint32 volid_high, volid_low, voltype;
@@ -1320,35 +1274,33 @@ fldb_dissect_getentrybyid_rqst (tvbuff_t * tvb, int offset,
return offset;
}
-
-
/*
- [in] afsHyper *Volid,
- [in] unsigned32 voltype,
+ [in] afsHyper *Volid,
+ [in] unsigned32 voltype,
*/
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_volid_high,
- &volid_high);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_volid_high,
+ &volid_high);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_volid_low,
- &volid_low);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_volid_low,
+ &volid_low);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_voltype,
- &voltype);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_voltype,
+ &voltype);
col_append_fstr (pinfo->cinfo, COL_INFO, " VolID:%u/%u VolType:0x%x",
- volid_high, volid_low, voltype);
+ volid_high, volid_low, voltype);
return offset;
-
}
+
static int
-fldb_dissect_getnewvolumeids_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getnewvolumeids_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
/* [in] unsigned32 numWanted,
[in] afsNetAddr *ServerAddr,
@@ -1361,35 +1313,35 @@ fldb_dissect_getnewvolumeids_rqst (tvbuff_t * tvb, int offset,
}
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_numwanted,
- &numwanted);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_numwanted,
+ &numwanted);
col_append_fstr (pinfo->cinfo, COL_INFO, " numWanted:%u", numwanted);
-
offset = dissect_afsnetaddr (tvb, offset, pinfo, tree, di, drep);
return offset;
}
+
static int
-fldb_dissect_getentrybyid_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getentrybyid_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
return offset;
}
-
offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);
return offset;
}
+
static int
-fldb_dissect_releaselock_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_releaselock_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
@@ -1404,9 +1356,9 @@ fldb_dissect_releaselock_resp (tvbuff_t * tvb, int offset,
static int
-fldb_dissect_releaselock_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_releaselock_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
guint32 fsid_high, fsid_low, voltype, voloper;
@@ -1415,46 +1367,47 @@ fldb_dissect_releaselock_rqst (tvbuff_t * tvb, int offset,
return offset;
}
-
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_releaselock_rqst_fsid_high, &fsid_high);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_releaselock_rqst_fsid_high, &fsid_high);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_releaselock_rqst_fsid_low, &fsid_low);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_releaselock_rqst_fsid_low, &fsid_low);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_releaselock_rqst_voltype, &voltype);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_releaselock_rqst_voltype, &voltype);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_releaselock_rqst_voloper, &voloper);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_releaselock_rqst_voloper, &voloper);
col_append_fstr (pinfo->cinfo, COL_INFO, " :FSID:%u/%u", fsid_high,
- fsid_low);
+ fsid_low);
return offset;
}
+
+
static int
-fldb_dissect_replaceentry_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_replaceentry_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
if (di->conformant_run)
{
return offset;
}
-
MACRO_ST_CLEAR ("ReplaceEntry reply");
-
return offset;
}
+
+
static int
-fldb_dissect_getnextserversbyid_resp (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_getnextserversbyid_resp (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
guint32 nextstartp, flagsp;
@@ -1463,18 +1416,13 @@ fldb_dissect_getnextserversbyid_resp (tvbuff_t * tvb, int offset,
return offset;
}
-
-
-
-
/* [out] unsigned32 *nextStartP, */
/* XXX */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_nextstartp,
- &nextstartp);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_nextstartp,
+ &nextstartp);
col_append_fstr (pinfo->cinfo, COL_INFO, " nextStartP:%u", nextstartp);
-
/* [out] vldbentry *entry, */
offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);
@@ -1482,18 +1430,19 @@ fldb_dissect_getnextserversbyid_resp (tvbuff_t * tvb, int offset,
/* [out] unsigned32 *flagsP */
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_fldb_flagsp,
- &flagsp);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_flagsp,
+ &flagsp);
col_append_fstr (pinfo->cinfo, COL_INFO, " flagsp:%u", flagsp);
return offset;
}
+
static int
-fldb_dissect_replaceentry_rqst (tvbuff_t * tvb, int offset,
- packet_info * pinfo, proto_tree * tree,
- dcerpc_info *di, guint8 * drep)
+fldb_dissect_replaceentry_rqst (tvbuff_t *tvb, int offset,
+ packet_info *pinfo, proto_tree *tree,
+ dcerpc_info *di, guint8 *drep)
{
guint32 fsid_high, fsid_low, voltype;
@@ -1510,18 +1459,17 @@ fldb_dissect_replaceentry_rqst (tvbuff_t * tvb, int offset,
*/
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_replaceentry_rqst_fsid_high, &fsid_high);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_replaceentry_rqst_fsid_high, &fsid_high);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_replaceentry_rqst_fsid_low, &fsid_low);
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_replaceentry_rqst_fsid_low, &fsid_low);
offset =
- dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
- hf_fldb_replaceentry_rqst_voltype, &voltype);
-
+ dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
+ hf_fldb_replaceentry_rqst_voltype, &voltype);
col_append_fstr (pinfo->cinfo, COL_INFO, " FSID:%u/%u Name:", fsid_high,
- fsid_low);
+ fsid_low);
offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);
@@ -1992,10 +1940,24 @@ proto_register_fldb (void)
proto_register_subtree_array (ett, array_length (ett));
}
+
void
proto_reg_handoff_fldb (void)
{
/* Register the protocol as dcerpc */
dcerpc_init_uuid (proto_fldb, ett_fldb, &uuid_fldb, ver_fldb,
- fldb_dissectors, hf_fldb_opnum);
+ fldb_dissectors, hf_fldb_opnum);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-dcerpc-pnp.c b/epan/dissectors/packet-dcerpc-pnp.c
index e9b2067706..37d73622e8 100644
--- a/epan/dissectors/packet-dcerpc-pnp.c
+++ b/epan/dissectors/packet-dcerpc-pnp.c
@@ -186,7 +186,7 @@ static dcerpc_sub_dissector dcerpc_pnp_dissectors[] = {
"PNP_SetActiveService", NULL, NULL },
{ PNP_DELETE_SERVICE_DEVICES,
"PNP_DeleteServiceDevices", NULL, NULL },
- { 0, NULL, NULL, NULL }
+ { 0, NULL, NULL, NULL }
};
@@ -194,17 +194,17 @@ void
proto_register_dcerpc_pnp(void)
{
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
{ &hf_pnp_opnum,
{ "Operation", "pnp.opnum", FT_UINT16, BASE_DEC,
- NULL, 0x0, NULL, HFILL }},
+ NULL, 0x0, NULL, HFILL }},
};
- static gint *ett[] = {
- &ett_dcerpc_pnp,
- };
+ static gint *ett[] = {
+ &ett_dcerpc_pnp,
+ };
proto_dcerpc_pnp = proto_register_protocol(
@@ -212,7 +212,7 @@ proto_register_dcerpc_pnp(void)
proto_register_field_array(proto_dcerpc_pnp, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_subtree_array(ett, array_length(ett));
}
@@ -226,3 +226,16 @@ proto_reg_handoff_dcerpc_pnp(void)
proto_dcerpc_pnp, ett_dcerpc_pnp, &uuid_dcerpc_pnp,
ver_dcerpc_pnp, dcerpc_pnp_dissectors, hf_pnp_opnum);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-dcom-remact.c b/epan/dissectors/packet-dcom-remact.c
index f1a23ba2e1..12e7bb2262 100644
--- a/epan/dissectors/packet-dcom-remact.c
+++ b/epan/dissectors/packet-dcom-remact.c
@@ -251,3 +251,16 @@ proto_reg_handoff_remact (void)
/* Register the protocol as dcerpc */
dcerpc_init_uuid (proto_remact, ett_remact, &uuid_remact, ver_remact, remact_dissectors, hf_remact_opnum);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-dsi.c b/epan/dissectors/packet-dsi.c
index 2ed4c808f9..6ea133452b 100644
--- a/epan/dissectors/packet-dsi.c
+++ b/epan/dissectors/packet-dsi.c
@@ -488,3 +488,16 @@ proto_reg_handoff_dsi(void)
afp_handle = find_dissector("afp");
afp_server_status_handle = find_dissector("afp_server_status");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-ehdlc.c b/epan/dissectors/packet-ehdlc.c
index d4b711bcb8..34a4ac7f04 100644
--- a/epan/dissectors/packet-ehdlc.c
+++ b/epan/dissectors/packet-ehdlc.c
@@ -324,3 +324,16 @@ proto_reg_handoff_ehdlc(void)
sub_handles[SUB_OML] = find_dissector("gsm_abis_oml");
sub_handles[SUB_DATA] = find_dissector("data");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-ethertype.c b/epan/dissectors/packet-ethertype.c
index 839a9dd5a5..5bb19cc779 100644
--- a/epan/dissectors/packet-ethertype.c
+++ b/epan/dissectors/packet-ethertype.c
@@ -247,14 +247,14 @@ ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_etype,
static int
dissect_ethertype(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- const char *description;
- tvbuff_t *volatile next_tvb;
- guint length_before;
- gint captured_length, reported_length;
- volatile gboolean dissector_found = FALSE;
- const char *volatile saved_proto;
- void *pd_save;
- ethertype_data_t* ethertype_data;
+ const char *description;
+ tvbuff_t *volatile next_tvb;
+ guint length_before;
+ gint captured_length, reported_length;
+ volatile gboolean dissector_found = FALSE;
+ const char *volatile saved_proto;
+ void *pd_save;
+ ethertype_data_t *ethertype_data;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -408,3 +408,16 @@ proto_reg_handoff_ethertype(void)
{
data_handle = find_dissector("data");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-exec.c b/epan/dissectors/packet-exec.c
index 1ecd3c9dca..f28190101a 100644
--- a/epan/dissectors/packet-exec.c
+++ b/epan/dissectors/packet-exec.c
@@ -412,3 +412,16 @@ proto_reg_handoff_exec(void)
exec_handle = create_dissector_handle(dissect_exec, proto_exec);
dissector_add_uint("tcp.port", EXEC_PORT, exec_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-fmp_notify.c b/epan/dissectors/packet-fmp_notify.c
index 28909fe52d..777a583408 100644
--- a/epan/dissectors/packet-fmp_notify.c
+++ b/epan/dissectors/packet-fmp_notify.c
@@ -12,7 +12,7 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
@@ -33,18 +33,18 @@
void proto_register_fmp_notify(void);
void proto_reg_handoff_fmp_notify(void);
-#define FMP_NOTIFY_PROG 1001912
-#define FMP_NOTIFY_VERSION_2 2
+#define FMP_NOTIFY_PROG 1001912
+#define FMP_NOTIFY_VERSION_2 2
/*
* FMP/NOTIFY Procedures
*/
#define FMP_NOTIFY_DownGrade 1
#define FMP_NOTIFY_RevokeList 2
-#define FMP_NOTIFY_RevokeAll 3
-#define FMP_NOTIFY_FileSetEof 4
-#define FMP_NOTIFY_RequestDone 5
-#define FMP_NOTIFY_volFreeze 6
+#define FMP_NOTIFY_RevokeAll 3
+#define FMP_NOTIFY_FileSetEof 4
+#define FMP_NOTIFY_RequestDone 5
+#define FMP_NOTIFY_volFreeze 6
#define FMP_NOTIFY_revokeHandleList 7
typedef enum {
@@ -84,102 +84,102 @@ static int dissect_fmp_notify_extentList(tvbuff_t *, int, packet_info *, proto_t
static int
dissect_fmp_notify_status(tvbuff_t *tvb, int offset, proto_tree *tree, int *rval)
{
- fmpStat status;
-
- status = (fmpStat)tvb_get_ntohl(tvb, offset);
-
- switch (status) {
- case FMP_OK:
- *rval = 0;
- break;
- case FMP_IOERROR:
- *rval = 1;
- break;
- case FMP_NOMEM:
- *rval = 1;
- break;
- case FMP_NOACCESS:
- *rval = 1;
- break;
+ fmpStat status;
+
+ status = (fmpStat)tvb_get_ntohl(tvb, offset);
+
+ switch (status) {
+ case FMP_OK:
+ *rval = 0;
+ break;
+ case FMP_IOERROR:
+ *rval = 1;
+ break;
+ case FMP_NOMEM:
+ *rval = 1;
+ break;
+ case FMP_NOACCESS:
+ *rval = 1;
+ break;
case FMP_INVALIDARG:
- *rval = 1;
- break;
- case FMP_FSFULL:
- *rval = 0;
- break;
- case FMP_QUEUE_FULL:
- *rval = 1;
- break;
- case FMP_WRONG_MSG_NUM:
- *rval = 1;
- break;
- case FMP_SESSION_LOST:
- *rval = 1;
- break;
- case FMP_HOT_SESSION:
- *rval = 0;
- break;
+ *rval = 1;
+ break;
+ case FMP_FSFULL:
+ *rval = 0;
+ break;
+ case FMP_QUEUE_FULL:
+ *rval = 1;
+ break;
+ case FMP_WRONG_MSG_NUM:
+ *rval = 1;
+ break;
+ case FMP_SESSION_LOST:
+ *rval = 1;
+ break;
+ case FMP_HOT_SESSION:
+ *rval = 0;
+ break;
case FMP_COLD_SESSION:
- *rval = 0;
- break;
- case FMP_CLIENT_TERMINATED:
- *rval = 0;
- break;
- case FMP_WRITER_LOST_BLK:
- *rval = 1;
- break;
- case FMP_REQUEST_QUEUED:
- *rval = 0;
- break;
- case FMP_FALL_BACK:
- *rval = 0;
- break;
- case FMP_REQUEST_CANCELLED:
- *rval = 1;
- break;
+ *rval = 0;
+ break;
+ case FMP_CLIENT_TERMINATED:
+ *rval = 0;
+ break;
+ case FMP_WRITER_LOST_BLK:
+ *rval = 1;
+ break;
+ case FMP_REQUEST_QUEUED:
+ *rval = 0;
+ break;
+ case FMP_FALL_BACK:
+ *rval = 0;
+ break;
+ case FMP_REQUEST_CANCELLED:
+ *rval = 1;
+ break;
case FMP_WRITER_ZEROED_BLK:
- *rval = 0;
- break;
- case FMP_NOTIFY_ERROR:
- *rval = 1;
- break;
- case FMP_WRONG_HANDLE:
- *rval = 0;
- break;
- case FMP_DUPLICATE_OPEN:
- *rval = 1;
- break;
- case FMP_PLUGIN_NOFUNC:
- *rval = 1;
- break;
- default:
- *rval = 1;
- break;
- }
-
- offset = dissect_rpc_uint32(tvb, tree, hf_fmp_status , offset);
- return offset;
+ *rval = 0;
+ break;
+ case FMP_NOTIFY_ERROR:
+ *rval = 1;
+ break;
+ case FMP_WRONG_HANDLE:
+ *rval = 0;
+ break;
+ case FMP_DUPLICATE_OPEN:
+ *rval = 1;
+ break;
+ case FMP_PLUGIN_NOFUNC:
+ *rval = 1;
+ break;
+ default:
+ *rval = 1;
+ break;
+ }
+
+ offset = dissect_rpc_uint32(tvb, tree, hf_fmp_status , offset);
+ return offset;
}
static int
dissect_revokeHandleListReason(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_tree_add_item(tree, hf_fmp_revokeHandleListReason, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_fmp_revokeHandleListReason, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
return offset;
}
static int
dissect_handleList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree)
+ proto_tree *tree)
{
- int numHandles;
- int listLength;
- int i;
+ int numHandles;
+ int listLength;
+ int i;
proto_tree *handleListTree;
numHandles = tvb_get_ntohl(tvb, offset);
@@ -190,14 +190,14 @@ dissect_handleList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
handleListTree = proto_tree_add_subtree(tree, tvb, offset, listLength,
- ett_fmp_notify_hlist, NULL, "Handle List");
+ ett_fmp_notify_hlist, NULL, "Handle List");
offset = dissect_rpc_uint32(tvb, handleListTree,
- hf_fmp_handleListLen, offset);
+ hf_fmp_handleListLen, offset);
for (i = 0; i < numHandles; i++) {
offset = dissect_rpc_data(tvb, handleListTree,
- hf_fmp_fmpFHandle, offset);/* changed */
+ hf_fmp_fmpFHandle, offset);/* changed */
}
return offset;
@@ -205,23 +205,23 @@ dissect_handleList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
static int
dissect_FMP_NOTIFY_DownGrade_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
- offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
- offset);
+ offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq, offset);
return offset;
}
static int
dissect_FMP_NOTIFY_DownGrade_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
@@ -231,22 +231,22 @@ dissect_FMP_NOTIFY_DownGrade_reply(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_RevokeList_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
+ offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
+ offset);
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_firstLogBlk,
- offset);
+ offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_numBlksReq, offset);
return offset;
}
static int
dissect_FMP_NOTIFY_RevokeList_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
@@ -256,10 +256,10 @@ dissect_FMP_NOTIFY_RevokeList_reply(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_RevokeAll_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
+ offset);
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
return offset;
@@ -267,7 +267,7 @@ dissect_FMP_NOTIFY_RevokeAll_request(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_RevokeAll_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
@@ -277,10 +277,10 @@ dissect_FMP_NOTIFY_RevokeAll_reply(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_FileSetEof_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
+ offset);
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle, offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum, offset);
offset = dissect_rpc_uint64(tvb, tree, hf_fmp_fileSize, offset);
@@ -289,7 +289,7 @@ dissect_FMP_NOTIFY_FileSetEof_request(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_FileSetEof_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
@@ -299,20 +299,20 @@ dissect_FMP_NOTIFY_FileSetEof_reply(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_RequestDone_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, void* data _U_)
+ packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int rval;
offset = dissect_fmp_notify_status(tvb, offset,tree, &rval);
if (rval == 0) {
- offset = dissect_rpc_data(tvb, tree,
- hf_fmp_sessionHandle, offset);
+ offset = dissect_rpc_data(tvb, tree,
+ hf_fmp_sessionHandle, offset);
offset = dissect_rpc_data(tvb, tree, hf_fmp_fmpFHandle,
- offset);
+ offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_msgNum,
- offset);
+ offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_cookie,
- offset);
+ offset);
offset = dissect_fmp_notify_extentList(tvb, offset, pinfo, tree);
}
return offset;
@@ -320,7 +320,7 @@ dissect_FMP_NOTIFY_RequestDone_request(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_RequestDone_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
@@ -330,17 +330,17 @@ dissect_FMP_NOTIFY_RequestDone_reply(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_volFreeze_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
+ offset);
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_fsID, offset);
return offset;
}
static int
dissect_FMP_NOTIFY_volFreeze_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
@@ -350,11 +350,11 @@ dissect_FMP_NOTIFY_volFreeze_reply(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_revokeHandleList_request(tvbuff_t *tvb, int offset,
- packet_info *pinfo,
- proto_tree *tree, void* data _U_)
+ packet_info *pinfo,
+ proto_tree *tree, void* data _U_)
{
offset = dissect_rpc_data(tvb, tree, hf_fmp_sessionHandle,
- offset);
+ offset);
offset = dissect_revokeHandleListReason(tvb, offset, tree);
offset = dissect_handleList(tvb, offset, pinfo, tree);
return offset;
@@ -362,7 +362,7 @@ dissect_FMP_NOTIFY_revokeHandleList_request(tvbuff_t *tvb, int offset,
static int
dissect_FMP_NOTIFY_revokeHandleList_reply(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
int rval;
@@ -408,75 +408,75 @@ static const vsff fmp_notify2_proc[] = {
};
static const value_string fmp_notify_proc_vals[] = {
- { 1, "DownGrade" },
- { 2, "RevokeList" },
- { 3, "RevokeAll" },
- { 4, "FileSetEof" },
- { 5, "RequestDone" },
- { 6, "VolFreeze" },
- { 7, "RevokeHandleList" },
- { 0, "NULL" },
- { 0,NULL}
+ { 1, "DownGrade" },
+ { 2, "RevokeList" },
+ { 3, "RevokeAll" },
+ { 4, "FileSetEof" },
+ { 5, "RequestDone" },
+ { 6, "VolFreeze" },
+ { 7, "RevokeHandleList" },
+ { 0, "NULL" },
+ { 0,NULL}
};
static const value_string fmp_status_vals[] = {
- { 0, "OK"},
- { 5, "IOERROR"},
- { 12, "NOMEM"},
- { 13, "NOACCESS"},
- { 22, "INVALIDARG"},
- { 28, "FSFULL"},
- { 79, "QUEUE_FULL"},
- {500, "WRONG_MSG_NUM"},
- {501, "SESSION_LOST"},
- {502, "HOT_SESSION"},
- {503, "COLD_SESSION"},
- {504, "CLIENT_TERMINATED"},
- {505, "WRITER_LOST_BLK"},
- {506, "FMP_REQUEST_QUEUED"},
- {507, "FMP_FALL_BACK"},
- {508, "REQUEST_CANCELLED"},
- {509, "WRITER_ZEROED_BLK"},
- {510, "NOTIFY_ERROR"},
- {511, "FMP_WRONG_HANDLE"},
- {512, "DUPLICATE_OPEN"},
- {600, "PLUGIN_NOFUNC"},
+ { 0, "OK"},
+ { 5, "IOERROR"},
+ { 12, "NOMEM"},
+ { 13, "NOACCESS"},
+ { 22, "INVALIDARG"},
+ { 28, "FSFULL"},
+ { 79, "QUEUE_FULL"},
+ {500, "WRONG_MSG_NUM"},
+ {501, "SESSION_LOST"},
+ {502, "HOT_SESSION"},
+ {503, "COLD_SESSION"},
+ {504, "CLIENT_TERMINATED"},
+ {505, "WRITER_LOST_BLK"},
+ {506, "FMP_REQUEST_QUEUED"},
+ {507, "FMP_FALL_BACK"},
+ {508, "REQUEST_CANCELLED"},
+ {509, "WRITER_ZEROED_BLK"},
+ {510, "NOTIFY_ERROR"},
+ {511, "FMP_WRONG_HANDLE"},
+ {512, "DUPLICATE_OPEN"},
+ {600, "PLUGIN_NOFUNC"},
{0,NULL}
};
static const value_string fmp_revokeHandleListReason_vals[] = {
- {FMP_LIST_USER_QUOTA_EXCEEDED, "LIST_USER_QUOTA_EXCEEDED"},
- {FMP_LIST_GROUP_QUOTA_EXCEEDED, "LIST_GROUP_QUOTA_EXCEEDED"},
- {FMP_LIST_SERVER_RESOURCE_LOW, "LIST_SERVER_RESOURCE_LOW"},
- {0,NULL}
+ {FMP_LIST_USER_QUOTA_EXCEEDED, "LIST_USER_QUOTA_EXCEEDED"},
+ {FMP_LIST_GROUP_QUOTA_EXCEEDED, "LIST_GROUP_QUOTA_EXCEEDED"},
+ {FMP_LIST_SERVER_RESOURCE_LOW, "LIST_SERVER_RESOURCE_LOW"},
+ {0,NULL}
};
static int
dissect_fmp_notify_extentState(tvbuff_t *tvb, int offset, proto_tree *tree)
{
offset = dissect_rpc_uint32(tvb, tree, hf_fmp_extent_state,
- offset);
+ offset);
return offset;
}
static int
dissect_fmp_notify_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 ext_num)
+ proto_tree *tree, guint32 ext_num)
{
proto_tree *extTree;
extTree = proto_tree_add_subtree_format(tree, tvb, offset, 20 ,
- ett_fmp_ext, NULL, "Extent (%u)", (guint32) ext_num);
+ ett_fmp_ext, NULL, "Extent (%u)", (guint32) ext_num);
offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_firstLogBlk,
- offset);
+ offset);
offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_numBlks,
- offset);
+ offset);
offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_volID, offset);
offset = dissect_rpc_uint32(tvb, extTree, hf_fmp_startOffset,
- offset);
+ offset);
offset = dissect_fmp_notify_extentState(tvb, offset, extTree);
return offset;
@@ -485,21 +485,21 @@ dissect_fmp_notify_extent(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
static int
dissect_fmp_notify_extentList(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree)
+ proto_tree *tree)
{
- guint32 numExtents;
- guint32 totalLength;
+ guint32 numExtents;
+ guint32 totalLength;
proto_tree *extListTree;
- guint32 i;
+ guint32 i;
numExtents = tvb_get_ntohl(tvb, offset);
totalLength = 4 + (20 * numExtents);
extListTree = proto_tree_add_subtree(tree, tvb, offset, totalLength,
- ett_fmp_extList, NULL, "Extent List");
+ ett_fmp_extList, NULL, "Extent List");
offset = dissect_rpc_uint32(tvb, extListTree,
- hf_fmp_extentList_len, offset);
+ hf_fmp_extentList_len, offset);
for (i = 0; i < numExtents; i++) {
offset = dissect_fmp_notify_extent(tvb, offset, pinfo, extListTree, i+1);
@@ -513,12 +513,12 @@ proto_register_fmp_notify(void)
{
static hf_register_info hf[] = {
{ &hf_fmp_notify_procedure, {
- "Procedure", "fmp_notify.notify_procedure", FT_UINT32, BASE_DEC,
- VALS(fmp_notify_proc_vals) , 0, NULL, HFILL }}, /* New addition */
+ "Procedure", "fmp_notify.notify_procedure", FT_UINT32, BASE_DEC,
+ VALS(fmp_notify_proc_vals) , 0, NULL, HFILL }}, /* New addition */
{ &hf_fmp_status, {
- "Status", "fmp_notify.status", FT_UINT32, BASE_DEC,
- VALS(fmp_status_vals), 0, "Reply Status", HFILL }},
+ "Status", "fmp_notify.status", FT_UINT32, BASE_DEC,
+ VALS(fmp_status_vals), 0, "Reply Status", HFILL }},
{ &hf_fmp_extentList_len, {
"Extent List length", "fmp_notify.extentListLength",
@@ -546,52 +546,52 @@ proto_register_fmp_notify(void)
NULL, HFILL }},
{ &hf_fmp_sessionHandle, {
- "Session Handle", "fmp_notify.sessHandle", FT_BYTES, BASE_NONE,
- NULL, 0, NULL, HFILL }},
+ "Session Handle", "fmp_notify.sessHandle", FT_BYTES, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
- { &hf_fmp_fsID, {
- "File System ID", "fmp_notify.fsID", FT_UINT32, BASE_HEX,
- NULL, 0, NULL, HFILL }},
+ { &hf_fmp_fsID, {
+ "File System ID", "fmp_notify.fsID", FT_UINT32, BASE_HEX,
+ NULL, 0, NULL, HFILL }},
#if 0
- { &hf_fmp_fsBlkSz, {
- "FS Block Size", "fmp_notify.fsBlkSz", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
+ { &hf_fmp_fsBlkSz, {
+ "FS Block Size", "fmp_notify.fsBlkSz", FT_UINT32, BASE_DEC,
+ NULL, 0, NULL, HFILL }},
#endif
- { &hf_fmp_numBlksReq, {
- "Number Blocks Requested", "fmp_notify.numBlksReq", FT_UINT32,
- BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_fmp_numBlksReq, {
+ "Number Blocks Requested", "fmp_notify.numBlksReq", FT_UINT32,
+ BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_fmp_msgNum, {
- "Message Number", "fmp_notify.msgNum", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
+ { &hf_fmp_msgNum, {
+ "Message Number", "fmp_notify.msgNum", FT_UINT32, BASE_DEC,
+ NULL, 0, NULL, HFILL }},
- { &hf_fmp_cookie, {
- "Cookie", "fmp_notify.cookie", FT_UINT32, BASE_HEX,
- NULL, 0, "Cookie for FMP_REQUEST_QUEUED Resp", HFILL }},
+ { &hf_fmp_cookie, {
+ "Cookie", "fmp_notify.cookie", FT_UINT32, BASE_HEX,
+ NULL, 0, "Cookie for FMP_REQUEST_QUEUED Resp", HFILL }},
- { &hf_fmp_firstLogBlk, {
- "First Logical Block", "fmp_notify.firstLogBlk", FT_UINT32,
- BASE_DEC, NULL, 0, "First Logical File Block", HFILL }},
+ { &hf_fmp_firstLogBlk, {
+ "First Logical Block", "fmp_notify.firstLogBlk", FT_UINT32,
+ BASE_DEC, NULL, 0, "First Logical File Block", HFILL }},
- { &hf_fmp_fileSize, {
- "File Size", "fmp_notify.fileSize", FT_UINT64, BASE_DEC,
- NULL, 0, NULL, HFILL }},
+ { &hf_fmp_fileSize, {
+ "File Size", "fmp_notify.fileSize", FT_UINT64, BASE_DEC,
+ NULL, 0, NULL, HFILL }},
{ &hf_fmp_fmpFHandle, {
- "FMP File Handle", "fmp_notify.fmpFHandle",
- FT_BYTES, BASE_NONE, NULL, 0, NULL,
- HFILL }},
+ "FMP File Handle", "fmp_notify.fmpFHandle",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL,
+ HFILL }},
- { &hf_fmp_revokeHandleListReason,
- { "Reason", "fmp.revokeHandleListReason",
- FT_UINT32, BASE_DEC, VALS(fmp_revokeHandleListReason_vals), 0,
- NULL, HFILL }},
+ { &hf_fmp_revokeHandleListReason,
+ { "Reason", "fmp.revokeHandleListReason",
+ FT_UINT32, BASE_DEC, VALS(fmp_revokeHandleListReason_vals), 0,
+ NULL, HFILL }},
};
@@ -605,7 +605,7 @@ proto_register_fmp_notify(void)
proto_fmp_notify =
proto_register_protocol("File Mapping Protocol Nofity",
- "FMP/NOTIFY", "fmp_notify");
+ "FMP/NOTIFY", "fmp_notify");
proto_register_field_array(proto_fmp_notify, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -619,5 +619,18 @@ proto_reg_handoff_fmp_notify(void)
/* Register the procedure tables */
rpc_init_proc_table(FMP_NOTIFY_PROG, FMP_NOTIFY_VERSION_2,
- fmp_notify2_proc,hf_fmp_notify_procedure);
+ fmp_notify2_proc,hf_fmp_notify_procedure);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-gmr1_common.c b/epan/dissectors/packet-gmr1_common.c
index 4952a2872f..767866cfd6 100644
--- a/epan/dissectors/packet-gmr1_common.c
+++ b/epan/dissectors/packet-gmr1_common.c
@@ -247,7 +247,7 @@ elem_fcn gmr1_ie_common_func[NUM_GMR1_IE_COMMON] = {
void
gmr1_get_msg_params(gmr1_pd_e pd, guint8 oct, const gchar **msg_str,
- int *ett_tree, int *hf_idx, gmr1_msg_func_t *msg_func_p)
+ int *ett_tree, int *hf_idx, gmr1_msg_func_t *msg_func_p)
{
switch (pd) {
case GMR1_PD_RR:
@@ -373,3 +373,16 @@ proto_register_gmr1_common(void)
proto_register_field_array(proto_gmr1_common, hf, array_length(hf));
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-gsm_a_rp.c b/epan/dissectors/packet-gsm_a_rp.c
index 2dcf3ae2c6..32f93b52ed 100644
--- a/epan/dissectors/packet-gsm_a_rp.c
+++ b/epan/dissectors/packet-gsm_a_rp.c
@@ -71,11 +71,11 @@ rp_elem_idx_t;
static const value_string gsm_rp_elem_strings[] = {
/* Short Message Service RP Information Elements [5] 8.2 */
- { DE_RP_MESSAGE_REF, "RP-Message Reference" },
- { DE_RP_ORIG_ADDR, "RP-Originator Address" },
- { DE_RP_DEST_ADDR, "RP-Destination Address" },
- { DE_RP_USER_DATA, "RP-User Data" },
- { DE_RP_CAUSE, "RP-Cause" },
+ { DE_RP_MESSAGE_REF, "RP-Message Reference" },
+ { DE_RP_ORIG_ADDR, "RP-Originator Address" },
+ { DE_RP_DEST_ADDR, "RP-Destination Address" },
+ { DE_RP_USER_DATA, "RP-User Data" },
+ { DE_RP_CAUSE, "RP-Cause" },
{ 0, NULL }
};
value_string_ext gsm_rp_elem_strings_ext = VALUE_STRING_EXT_INIT(gsm_rp_elem_strings);
@@ -148,8 +148,8 @@ de_rp_dest_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32
static guint16
de_rp_user_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
- tvbuff_t *tpdu_tvb;
+ guint32 curr_offset;
+ tvbuff_t *tpdu_tvb;
curr_offset = offset;
@@ -193,30 +193,30 @@ de_rp_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
switch (oct & 0x7f)
{
- case 1: str = "Unassigned (unallocated) number"; break;
- case 8: str = "Operator determined barring"; break;
- case 10: str = "Call barred"; break;
- case 11: str = "Reserved"; break;
- case 21: str = "Short message transfer rejected"; break;
- case 22: str = "Memory capacity exceeded"; break;
- case 27: str = "Destination out of order"; break;
- case 28: str = "Unidentified subscriber"; break;
- case 29: str = "Facility rejected"; break;
- case 30: str = "Unknown subscriber"; break;
- case 38: str = "Network out of order"; break;
- case 41: str = "Temporary failure"; break;
- case 42: str = "Congestion"; break;
- case 47: str = "Resources unavailable, unspecified"; break;
- case 50: str = "Requested facility not subscribed"; break;
- case 69: str = "Requested facility not implemented"; break;
- case 81: str = "Invalid short message transfer reference value"; break;
- case 95: str = "Semantically incorrect message"; break;
- case 96: str = "Invalid mandatory information"; break;
- case 97: str = "Message type non-existent or not implemented"; break;
+ case 1: str = "Unassigned (unallocated) number"; break;
+ case 8: str = "Operator determined barring"; break;
+ case 10: str = "Call barred"; break;
+ case 11: str = "Reserved"; break;
+ case 21: str = "Short message transfer rejected"; break;
+ case 22: str = "Memory capacity exceeded"; break;
+ case 27: str = "Destination out of order"; break;
+ case 28: str = "Unidentified subscriber"; break;
+ case 29: str = "Facility rejected"; break;
+ case 30: str = "Unknown subscriber"; break;
+ case 38: str = "Network out of order"; break;
+ case 41: str = "Temporary failure"; break;
+ case 42: str = "Congestion"; break;
+ case 47: str = "Resources unavailable, unspecified"; break;
+ case 50: str = "Requested facility not subscribed"; break;
+ case 69: str = "Requested facility not implemented"; break;
+ case 81: str = "Invalid short message transfer reference value"; break;
+ case 95: str = "Semantically incorrect message"; break;
+ case 96: str = "Invalid mandatory information"; break;
+ case 97: str = "Message type non-existent or not implemented"; break;
case 98: str = "Message not compatible with short message protocol state"; break;
- case 99: str = "Information element non-existent or not implemented"; break;
- case 111: str = "Protocol error, unspecified"; break;
- case 127: str = "Interworking, unspecified"; break;
+ case 99: str = "Information element non-existent or not implemented"; break;
+ case 111: str = "Protocol error, unspecified"; break;
+ case 127: str = "Interworking, unspecified"; break;
default:
str = "Reserved";
break;
@@ -250,11 +250,11 @@ de_rp_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off
guint16 (*rp_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string, int string_len) = {
/* Short Message Service Information Elements [5] 8.2 */
- de_rp_message_ref, /* RP-Message Reference */
- de_rp_orig_addr, /* RP-Originator Address */
- de_rp_dest_addr, /* RP-Destination Address */
- de_rp_user_data, /* RP-User Data */
- de_rp_cause, /* RP-Cause */
+ de_rp_message_ref, /* RP-Message Reference */
+ de_rp_orig_addr, /* RP-Originator Address */
+ de_rp_dest_addr, /* RP-Destination Address */
+ de_rp_user_data, /* RP-User Data */
+ de_rp_cause, /* RP-Cause */
NULL, /* NONE */
};
@@ -440,13 +440,13 @@ static void (*rp_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
static void
dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint8 oct;
- guint32 offset, saved_offset;
- guint32 len;
- gint idx;
- proto_item *rp_item = NULL;
- proto_tree *rp_tree = NULL;
- const gchar *str;
+ guint8 oct;
+ guint32 offset, saved_offset;
+ guint32 len;
+ gint idx;
+ proto_item *rp_item = NULL;
+ proto_tree *rp_tree = NULL;
+ const gchar *str;
col_append_str(pinfo->cinfo, COL_INFO, "(RP) ");
@@ -517,23 +517,22 @@ dissect_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_gsm_a_rp(void)
{
- guint i;
- guint last_offset;
+ guint i;
+ guint last_offset;
/* Setup list of header fields */
- static hf_register_info hf[] =
- {
- { &hf_gsm_a_rp_msg_type,
- { "RP Message Type", "gsm_a.rp.msg_type",
- FT_UINT8, BASE_HEX, VALS(gsm_rp_msg_strings), 0x0,
- NULL, HFILL }
- },
- { &hf_gsm_a_rp_elem_id,
- { "Element ID", "gsm_a.rp.elem_id",
- FT_UINT8, BASE_HEX, NULL, 0,
- NULL, HFILL }
- },
+ static hf_register_info hf[] = {
+ { &hf_gsm_a_rp_msg_type,
+ { "RP Message Type", "gsm_a.rp.msg_type",
+ FT_UINT8, BASE_HEX, VALS(gsm_rp_msg_strings), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gsm_a_rp_elem_id,
+ { "Element ID", "gsm_a.rp.elem_id",
+ FT_UINT8, BASE_HEX, NULL, 0,
+ NULL, HFILL }
+ },
};
/* Setup protocol subtree array */
@@ -573,10 +572,23 @@ proto_register_gsm_a_rp(void)
void
proto_reg_handoff_gsm_a_rp(void)
{
- dissector_handle_t gsm_a_rp_handle;
+ dissector_handle_t gsm_a_rp_handle;
gsm_a_rp_handle = create_dissector_handle(dissect_rp, proto_a_rp);
/* Dissect messages embedded in SIP */
dissector_add_string("media_type","application/vnd.3gpp.sms", gsm_a_rp_handle);
gsm_sms_handle = find_dissector("gsm_sms");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-gsm_ipa.c b/epan/dissectors/packet-gsm_ipa.c
index 50fd2e81b6..2a1c4681d4 100644
--- a/epan/dissectors/packet-gsm_ipa.c
+++ b/epan/dissectors/packet-gsm_ipa.c
@@ -503,3 +503,16 @@ void proto_reg_handoff_gsm_ipa(void)
dissector_add_uint_range("udp.port", ipa_udp_ports, ipa_handle);
dissector_add_uint_range("tcp.port", ipa_tcp_ports, ipa_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-h261.c b/epan/dissectors/packet-h261.c
index f42ac57395..2fc05347d8 100644
--- a/epan/dissectors/packet-h261.c
+++ b/epan/dissectors/packet-h261.c
@@ -255,3 +255,16 @@ proto_reg_handoff_h261(void)
dissector_add_uint("rtp.pt", PT_H261, h261_handle);
dissector_add_uint("iax2.codec", AST_FORMAT_H261, h261_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-h263p.c b/epan/dissectors/packet-h263p.c
index e4222e4d8f..e3f669aafc 100644
--- a/epan/dissectors/packet-h263p.c
+++ b/epan/dissectors/packet-h263p.c
@@ -39,7 +39,7 @@
void proto_reg_handoff_h263P(void);
void proto_register_h263P(void);
-static int proto_h263P = -1;
+static int proto_h263P = -1;
/* H.263 RFC 4629 fields */
static int hf_h263P_payload = -1;
@@ -57,9 +57,9 @@ static int hf_h263P_extra_hdr = -1;
/* H.263-1998 fields defining a sub tree */
-static gint ett_h263P = -1;
+static gint ett_h263P = -1;
static gint ett_h263P_extra_hdr = -1;
-static gint ett_h263P_payload = -1;
+static gint ett_h263P_payload = -1;
static gint ett_h263P_data = -1;
/* The dynamic payload type which will be dissected as H.263-1998/H263-2000 */
@@ -70,344 +70,358 @@ static guint temp_dynamic_payload_type = 0;
static void
dissect_h263P( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
- proto_item *ti = NULL;
- proto_item *data_item = NULL;
- proto_item *extra_hdr_item = NULL;
- proto_tree *h263P_tree = NULL;
- proto_tree *h263P_extr_hdr_tree = NULL;
- proto_tree *h263P_data_tree = NULL;
- unsigned int offset = 0;
- guint16 data16, plen;
- guint8 startcode;
-
- /*
- tvbuff_t *next_tvb;
- */
-
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "H.263 RFC4629 ");
-
- if ( tree ) {
- ti = proto_tree_add_item( tree, proto_h263P, tvb, offset, -1, ENC_NA );
- h263P_tree = proto_item_add_subtree( ti, ett_h263P );
-
- data16 = tvb_get_ntohs(tvb,offset);
- proto_tree_add_item( h263P_tree, hf_h263P_rr, tvb, offset, 2, ENC_BIG_ENDIAN );
- proto_tree_add_item( h263P_tree, hf_h263P_pbit, tvb, offset, 2, ENC_BIG_ENDIAN );
- proto_tree_add_item( h263P_tree, hf_h263P_vbit, tvb, offset, 2, ENC_BIG_ENDIAN );
- proto_tree_add_item( h263P_tree, hf_h263P_plen, tvb, offset, 2, ENC_BIG_ENDIAN );
- proto_tree_add_item( h263P_tree, hf_h263P_pebit, tvb, offset, 2, ENC_BIG_ENDIAN );
- offset = offset +2;
- /*
- * V: 1 bit
- *
- * Indicates the presence of an 8-bit field containing information
- * for Video Redundancy Coding (VRC), which follows immediately after
- * the initial 16 bits of the payload header, if present. For syntax
- * and semantics of that 8-bit VRC field, see Section 5.2.
- */
-
- if ((data16&0x0200)==0x0200){
- /* V bit = 1
- * The format of the VRC header extension is as follows:
- *
- * 0 1 2 3 4 5 6 7
- * +-+-+-+-+-+-+-+-+
- * | TID | Trun |S|
- * +-+-+-+-+-+-+-+-+
- *
- * TID: 3 bits
- *
- * Thread ID. Up to 7 threads are allowed. Each frame of H.263+ VRC
- * data will use as reference information only sync frames or frames
- * within the same thread. By convention, thread 0 is expected to be
- * the "canonical" thread, which is the thread from which the sync frame
- * should ideally be used. In the case of corruption or loss of the
- * thread 0 representation, a representation of the sync frame with a
- * higher thread number can be used by the decoder. Lower thread
- * numbers are expected to contain representations of the sync frames
- * equal to or better than higher thread numbers in the absence of data
- * corruption or loss. See [Vredun] for a detailed discussion of VRC.
- *
- * Trun: 4 bits
- *
- * Monotonically increasing (modulo 16) 4-bit number counting the packet
- * number within each thread.
- *
- * S: 1 bit
- *
- * A bit that indicates that the packet content is for a sync frame.
- * :
- */
- proto_tree_add_item( h263P_tree, hf_h263P_tid, tvb, offset, 1, ENC_BIG_ENDIAN );
- proto_tree_add_item( h263P_tree, hf_h263P_trun, tvb, offset, 1, ENC_BIG_ENDIAN );
- proto_tree_add_item( h263P_tree, hf_h263P_s, tvb, offset, 1, ENC_BIG_ENDIAN );
- offset++;
- }
-
- /* Length, in bytes, of the extra picture header. */
- plen = (data16 & 0x01f8) >> 3;
- if (plen != 0){
- extra_hdr_item = proto_tree_add_item( h263P_tree, hf_h263P_extra_hdr, tvb, offset, plen, ENC_NA );
- h263P_extr_hdr_tree = proto_item_add_subtree( extra_hdr_item, ett_h263P_extra_hdr );
- dissect_h263_picture_layer( tvb, pinfo, h263P_extr_hdr_tree, offset, plen, TRUE);
- offset += plen;
- }
- if ((data16&0x0400)!=0){
- /* P bit = 1 */
- data_item = proto_tree_add_item( h263P_tree, hf_h263P_payload, tvb, offset, -1, ENC_NA );
- h263P_data_tree = proto_item_add_subtree( data_item, ett_h263P_data );
- /* Startc code holds bit 17 -23 of the codeword */
- startcode = tvb_get_guint8(tvb,offset)&0xfe;
- if (startcode & 0x80){
- /* All picture, slice, and EOSBS start codes
- * shall be byte aligned, and GOB and EOS start codes may be byte aligned.
- */
- switch(startcode){
- case 0xf8:
- /* End Of Sub-Bitstream code (EOSBS)
- * EOSBS codes shall be byte aligned
- * ( 1111 100. )
- */
- break;
- case 0x80:
- case 0x82:
- /* Picture Start Code (PSC)
- * ( 1000 00x.)
- */
- col_append_str( pinfo->cinfo, COL_INFO, "(PSC) ");
- dissect_h263_picture_layer( tvb, pinfo, h263P_data_tree, offset, -1, TRUE);
- break;
- case 0xfc:
- case 0xfe:
- /* End Of Sequence (EOS)
- * ( 1111 11x. )
- */
- default:
- /* Group of Block Start Code (GBSC) or
- * Slice Start Code (SSC)
- */
- col_append_str( pinfo->cinfo, COL_INFO, "(GBSC) ");
- dissect_h263_group_of_blocks_layer( tvb, h263P_data_tree, offset,TRUE);
- break;
- }
- }else{
- /* Error */
- }
- return;
- }
- proto_tree_add_item( h263P_tree, hf_h263P_payload, tvb, offset, -1, ENC_NA );
- }
+ proto_item *ti = NULL;
+ proto_item *data_item = NULL;
+ proto_item *extra_hdr_item = NULL;
+ proto_tree *h263P_tree = NULL;
+ proto_tree *h263P_extr_hdr_tree = NULL;
+ proto_tree *h263P_data_tree = NULL;
+ unsigned int offset = 0;
+ guint16 data16, plen;
+ guint8 startcode;
+
+ /*
+ tvbuff_t *next_tvb;
+ */
+
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "H.263 RFC4629 ");
+
+ if ( tree ) {
+ ti = proto_tree_add_item( tree, proto_h263P, tvb, offset, -1, ENC_NA );
+ h263P_tree = proto_item_add_subtree( ti, ett_h263P );
+
+ data16 = tvb_get_ntohs(tvb,offset);
+ proto_tree_add_item( h263P_tree, hf_h263P_rr, tvb, offset, 2, ENC_BIG_ENDIAN );
+ proto_tree_add_item( h263P_tree, hf_h263P_pbit, tvb, offset, 2, ENC_BIG_ENDIAN );
+ proto_tree_add_item( h263P_tree, hf_h263P_vbit, tvb, offset, 2, ENC_BIG_ENDIAN );
+ proto_tree_add_item( h263P_tree, hf_h263P_plen, tvb, offset, 2, ENC_BIG_ENDIAN );
+ proto_tree_add_item( h263P_tree, hf_h263P_pebit, tvb, offset, 2, ENC_BIG_ENDIAN );
+ offset = offset +2;
+ /*
+ * V: 1 bit
+ *
+ * Indicates the presence of an 8-bit field containing information
+ * for Video Redundancy Coding (VRC), which follows immediately after
+ * the initial 16 bits of the payload header, if present. For syntax
+ * and semantics of that 8-bit VRC field, see Section 5.2.
+ */
+
+ if ((data16&0x0200)==0x0200){
+ /* V bit = 1
+ * The format of the VRC header extension is as follows:
+ *
+ * 0 1 2 3 4 5 6 7
+ * +-+-+-+-+-+-+-+-+
+ * | TID | Trun |S|
+ * +-+-+-+-+-+-+-+-+
+ *
+ * TID: 3 bits
+ *
+ * Thread ID. Up to 7 threads are allowed. Each frame of H.263+ VRC
+ * data will use as reference information only sync frames or frames
+ * within the same thread. By convention, thread 0 is expected to be
+ * the "canonical" thread, which is the thread from which the sync frame
+ * should ideally be used. In the case of corruption or loss of the
+ * thread 0 representation, a representation of the sync frame with a
+ * higher thread number can be used by the decoder. Lower thread
+ * numbers are expected to contain representations of the sync frames
+ * equal to or better than higher thread numbers in the absence of data
+ * corruption or loss. See [Vredun] for a detailed discussion of VRC.
+ *
+ * Trun: 4 bits
+ *
+ * Monotonically increasing (modulo 16) 4-bit number counting the packet
+ * number within each thread.
+ *
+ * S: 1 bit
+ *
+ * A bit that indicates that the packet content is for a sync frame.
+ * :
+ */
+ proto_tree_add_item( h263P_tree, hf_h263P_tid, tvb, offset, 1, ENC_BIG_ENDIAN );
+ proto_tree_add_item( h263P_tree, hf_h263P_trun, tvb, offset, 1, ENC_BIG_ENDIAN );
+ proto_tree_add_item( h263P_tree, hf_h263P_s, tvb, offset, 1, ENC_BIG_ENDIAN );
+ offset++;
+ }
+
+ /* Length, in bytes, of the extra picture header. */
+ plen = (data16 & 0x01f8) >> 3;
+ if (plen != 0){
+ extra_hdr_item = proto_tree_add_item( h263P_tree, hf_h263P_extra_hdr, tvb, offset, plen, ENC_NA );
+ h263P_extr_hdr_tree = proto_item_add_subtree( extra_hdr_item, ett_h263P_extra_hdr );
+ dissect_h263_picture_layer( tvb, pinfo, h263P_extr_hdr_tree, offset, plen, TRUE);
+ offset += plen;
+ }
+ if ((data16&0x0400)!=0){
+ /* P bit = 1 */
+ data_item = proto_tree_add_item( h263P_tree, hf_h263P_payload, tvb, offset, -1, ENC_NA );
+ h263P_data_tree = proto_item_add_subtree( data_item, ett_h263P_data );
+ /* Startc code holds bit 17 -23 of the codeword */
+ startcode = tvb_get_guint8(tvb,offset)&0xfe;
+ if (startcode & 0x80){
+ /* All picture, slice, and EOSBS start codes
+ * shall be byte aligned, and GOB and EOS start codes may be byte aligned.
+ */
+ switch(startcode){
+ case 0xf8:
+ /* End Of Sub-Bitstream code (EOSBS)
+ * EOSBS codes shall be byte aligned
+ * ( 1111 100. )
+ */
+ break;
+ case 0x80:
+ case 0x82:
+ /* Picture Start Code (PSC)
+ * ( 1000 00x.)
+ */
+ col_append_str( pinfo->cinfo, COL_INFO, "(PSC) ");
+ dissect_h263_picture_layer( tvb, pinfo, h263P_data_tree, offset, -1, TRUE);
+ break;
+ case 0xfc:
+ case 0xfe:
+ /* End Of Sequence (EOS)
+ * ( 1111 11x. )
+ */
+ default:
+ /* Group of Block Start Code (GBSC) or
+ * Slice Start Code (SSC)
+ */
+ col_append_str( pinfo->cinfo, COL_INFO, "(GBSC) ");
+ dissect_h263_group_of_blocks_layer( tvb, h263P_data_tree, offset,TRUE);
+ break;
+ }
+ }else{
+ /* Error */
+ }
+ return;
+ }
+ proto_tree_add_item( h263P_tree, hf_h263P_payload, tvb, offset, -1, ENC_NA );
+ }
}
void
proto_reg_handoff_h263P(void)
{
- static dissector_handle_t h263P_handle;
- static guint dynamic_payload_type;
- static gboolean h263P_prefs_initialized = FALSE;
-
- if (!h263P_prefs_initialized) {
- h263P_handle = find_dissector("h263P");
- dissector_add_string("rtp_dyn_payload_type","H263-1998", h263P_handle);
- dissector_add_string("rtp_dyn_payload_type","H263-2000", h263P_handle);
- h263P_prefs_initialized = TRUE;
- }
- else {
- if ( dynamic_payload_type > 95 )
- dissector_delete_uint("rtp.pt", dynamic_payload_type, h263P_handle);
- }
- dynamic_payload_type = temp_dynamic_payload_type;
-
- if ( dynamic_payload_type > 95 ){
- dissector_add_uint("rtp.pt", dynamic_payload_type, h263P_handle);
- }
+ static dissector_handle_t h263P_handle;
+ static guint dynamic_payload_type;
+ static gboolean h263P_prefs_initialized = FALSE;
+
+ if (!h263P_prefs_initialized) {
+ h263P_handle = find_dissector("h263P");
+ dissector_add_string("rtp_dyn_payload_type","H263-1998", h263P_handle);
+ dissector_add_string("rtp_dyn_payload_type","H263-2000", h263P_handle);
+ h263P_prefs_initialized = TRUE;
+ }
+ else {
+ if ( dynamic_payload_type > 95 )
+ dissector_delete_uint("rtp.pt", dynamic_payload_type, h263P_handle);
+ }
+ dynamic_payload_type = temp_dynamic_payload_type;
+
+ if ( dynamic_payload_type > 95 ){
+ dissector_add_uint("rtp.pt", dynamic_payload_type, h263P_handle);
+ }
}
void
proto_register_h263P(void)
{
- module_t *h263P_module;
-
- static hf_register_info hf[] =
- {
- {
- &hf_h263P_payload,
- {
- "H.263 RFC4629 payload",
- "h263p.payload",
- FT_NONE,
- BASE_NONE,
- NULL,
- 0x0,
- "The actual H.263 RFC4629 data", HFILL
- }
- },
- {
- &hf_h263P_rr,
- {
- "Reserved",
- "h263p.rr",
- FT_UINT16,
- BASE_DEC,
- NULL,
- 0xf800,
- "Reserved SHALL be zero", HFILL
- }
- },
- {
- &hf_h263P_pbit,
- {
- "P",
- "h263p.p",
- FT_BOOLEAN,
- 16,
- NULL,
- 0x0400,
- "Indicates (GOB/Slice) start or (EOS or EOSBS)", HFILL
- }
- },
- {
- &hf_h263P_vbit,
- {
- "V",
- "h263p.v",
- FT_BOOLEAN,
- 16,
- NULL,
- 0x0200,
- "presence of Video Redundancy Coding (VRC) field", HFILL
- }
- },
- {
- &hf_h263P_plen,
- {
- "PLEN",
- "h263p.plen",
- FT_UINT16,
- BASE_DEC,
- NULL,
- 0x01f8,
- "Length, in bytes, of the extra picture header", HFILL
- }
- },
- {
- &hf_h263P_pebit,
- {
- "PEBIT",
- "h263p.pebit",
- FT_UINT16,
- BASE_DEC,
- NULL,
- 0x0003,
- "number of bits that shall be ignored in the last byte of the picture header", HFILL
- }
- },
-
-
- {
- &hf_h263P_tid,
- {
- "Thread ID",
- "h263p.tid",
- FT_UINT8,
- BASE_DEC,
- NULL,
- 0xe0,
- NULL, HFILL
- }
- },
- {
- &hf_h263P_trun,
- {
- "Trun",
- "h263p.trun",
- FT_UINT8,
- BASE_DEC,
- NULL,
- 0x1e,
- "Monotonically increasing (modulo 16) 4-bit number counting the packet number within each thread", HFILL
- }
- },
- {
- &hf_h263P_s,
- {
- "S",
- "h263p.s",
- FT_UINT8,
- BASE_DEC,
- NULL,
- 0x01,
- "Indicates that the packet content is for a sync frame", HFILL
- }
- },
- {
- &hf_h263P_extra_hdr,
- {
- "Extra picture header",
- "h263p.extra_hdr",
- FT_BYTES,
- BASE_NONE,
- NULL,
- 0x0,
- NULL, HFILL
- }
- },
+ module_t *h263P_module;
+
+ static hf_register_info hf[] =
+ {
+ {
+ &hf_h263P_payload,
+ {
+ "H.263 RFC4629 payload",
+ "h263p.payload",
+ FT_NONE,
+ BASE_NONE,
+ NULL,
+ 0x0,
+ "The actual H.263 RFC4629 data", HFILL
+ }
+ },
+ {
+ &hf_h263P_rr,
+ {
+ "Reserved",
+ "h263p.rr",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0xf800,
+ "Reserved SHALL be zero", HFILL
+ }
+ },
+ {
+ &hf_h263P_pbit,
+ {
+ "P",
+ "h263p.p",
+ FT_BOOLEAN,
+ 16,
+ NULL,
+ 0x0400,
+ "Indicates (GOB/Slice) start or (EOS or EOSBS)", HFILL
+ }
+ },
+ {
+ &hf_h263P_vbit,
+ {
+ "V",
+ "h263p.v",
+ FT_BOOLEAN,
+ 16,
+ NULL,
+ 0x0200,
+ "presence of Video Redundancy Coding (VRC) field", HFILL
+ }
+ },
+ {
+ &hf_h263P_plen,
+ {
+ "PLEN",
+ "h263p.plen",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x01f8,
+ "Length, in bytes, of the extra picture header", HFILL
+ }
+ },
+ {
+ &hf_h263P_pebit,
+ {
+ "PEBIT",
+ "h263p.pebit",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x0003,
+ "number of bits that shall be ignored in the last byte of the picture header", HFILL
+ }
+ },
+
+
+ {
+ &hf_h263P_tid,
+ {
+ "Thread ID",
+ "h263p.tid",
+ FT_UINT8,
+ BASE_DEC,
+ NULL,
+ 0xe0,
+ NULL, HFILL
+ }
+ },
+ {
+ &hf_h263P_trun,
+ {
+ "Trun",
+ "h263p.trun",
+ FT_UINT8,
+ BASE_DEC,
+ NULL,
+ 0x1e,
+ "Monotonically increasing (modulo 16) 4-bit number counting the packet number within each thread", HFILL
+ }
+ },
+ {
+ &hf_h263P_s,
+ {
+ "S",
+ "h263p.s",
+ FT_UINT8,
+ BASE_DEC,
+ NULL,
+ 0x01,
+ "Indicates that the packet content is for a sync frame", HFILL
+ }
+ },
+ {
+ &hf_h263P_extra_hdr,
+ {
+ "Extra picture header",
+ "h263p.extra_hdr",
+ FT_BYTES,
+ BASE_NONE,
+ NULL,
+ 0x0,
+ NULL, HFILL
+ }
+ },
#if 0
- {
- &hf_h263P_PSC,
- {
- "H.263 PSC",
- "h263p.PSC",
- FT_UINT16,
- BASE_HEX,
- NULL,
- 0xfc00,
- "Picture Start Code(PSC)", HFILL
- }
- },
+ {
+ &hf_h263P_PSC,
+ {
+ "H.263 PSC",
+ "h263p.PSC",
+ FT_UINT16,
+ BASE_HEX,
+ NULL,
+ 0xfc00,
+ "Picture Start Code(PSC)", HFILL
+ }
+ },
#endif
#if 0
- {
- &hf_h263P_TR,
- {
- "H.263 Temporal Reference",
- "h263p.tr",
- FT_UINT16,
- BASE_HEX,
- NULL,
- 0x03fc,
- "Temporal Reference, TR", HFILL
- }
- },
+ {
+ &hf_h263P_TR,
+ {
+ "H.263 Temporal Reference",
+ "h263p.tr",
+ FT_UINT16,
+ BASE_HEX,
+ NULL,
+ 0x03fc,
+ "Temporal Reference, TR", HFILL
+ }
+ },
#endif
- };
+ };
- static gint *ett[] =
- {
- &ett_h263P,
- &ett_h263P_extra_hdr,
- &ett_h263P_payload,
- &ett_h263P_data,
- };
+ static gint *ett[] =
+ {
+ &ett_h263P,
+ &ett_h263P_extra_hdr,
+ &ett_h263P_payload,
+ &ett_h263P_data,
+ };
- proto_h263P = proto_register_protocol("ITU-T Recommendation H.263 RTP Payload header (RFC4629)",
- "H263P", "h263p");
+ proto_h263P = proto_register_protocol("ITU-T Recommendation H.263 RTP Payload header (RFC4629)",
+ "H263P", "h263p");
- proto_register_field_array(proto_h263P, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_field_array(proto_h263P, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
- h263P_module = prefs_register_protocol(proto_h263P, proto_reg_handoff_h263P);
+ h263P_module = prefs_register_protocol(proto_h263P, proto_reg_handoff_h263P);
- prefs_register_uint_preference(h263P_module, "dynamic.payload.type",
- "H263-1998 and H263-2000 dynamic payload type",
- "The dynamic payload type which will be interpreted as H264"
- "; The value must be greater than 95",
- 10,
- &temp_dynamic_payload_type);
+ prefs_register_uint_preference(h263P_module,
+ "dynamic.payload.type",
+ "H263-1998 and H263-2000 dynamic payload type",
+ "The dynamic payload type which will be interpreted as H264"
+ "; The value must be greater than 95",
+ 10,
+ &temp_dynamic_payload_type);
- register_dissector("h263P", dissect_h263P, proto_h263P);
+ register_dissector("h263P", dissect_h263P, proto_h263P);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-i2c.c b/epan/dissectors/packet-i2c.c
index 133718722d..1f483a2a52 100644
--- a/epan/dissectors/packet-i2c.c
+++ b/epan/dissectors/packet-i2c.c
@@ -189,7 +189,7 @@ dissect_i2c(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
proto_tree *i2c_tree = NULL;
- int is_event, bus, flags, addr, len;
+ int is_event, bus, flags, addr, len;
is_event = pinfo->pseudo_header->i2c.is_event;
flags = pinfo->pseudo_header->i2c.flags;
@@ -261,8 +261,8 @@ void
proto_register_i2c(void)
{
static hf_register_info hf[] = {
- { &hf_i2c_bus, { "Bus ID", "i2c.bus", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
- { &hf_i2c_addr, { "Target address", "i2c.addr", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
+ { &hf_i2c_bus, { "Bus ID", "i2c.bus", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
+ { &hf_i2c_addr, { "Target address", "i2c.addr", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
{ &hf_i2c_event, { "Event", "i2c.event", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
{ &hf_i2c_flags, { "Flags", "i2c.flags", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
};
@@ -283,7 +283,7 @@ proto_register_i2c(void)
m = prefs_register_protocol(proto_i2c, NULL);
prefs_register_enum_preference(m, "type", "Bus/Data type",
- "How the I2C messages are interpreted",
+ "How the I2C messages are interpreted",
&sub_selected, sub_enum_vals, FALSE);
}
@@ -298,3 +298,16 @@ proto_reg_handoff_i2c(void)
i2c_handle = create_dissector_handle(dissect_i2c, proto_i2c);
dissector_add_uint("wtap_encap", WTAP_ENCAP_I2C, i2c_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-icap.c b/epan/dissectors/packet-icap.c
index ed8d9f8226..a0f1d238cf 100644
--- a/epan/dissectors/packet-icap.c
+++ b/epan/dissectors/packet-icap.c
@@ -36,11 +36,11 @@ void proto_register_icap(void);
void proto_reg_handoff_icap(void);
typedef enum _icap_type {
- ICAP_OPTIONS,
- ICAP_REQMOD,
- ICAP_RESPMOD,
- ICAP_RESPONSE,
- ICAP_OTHER
+ ICAP_OPTIONS,
+ ICAP_REQMOD,
+ ICAP_RESPMOD,
+ ICAP_RESPONSE,
+ ICAP_OTHER
} icap_type_t;
static int proto_icap = -1;
@@ -55,284 +55,297 @@ static gint ett_icap = -1;
static dissector_handle_t data_handle;
static dissector_handle_t http_handle;
-#define TCP_PORT_ICAP 1344
+#define TCP_PORT_ICAP 1344
static int is_icap_message(const guchar *data, int linelen, icap_type_t *type);
static void
dissect_icap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *icap_tree = NULL;
- proto_item *ti = NULL;
- proto_item *hidden_item;
- tvbuff_t *new_tvb;
- gint offset = 0;
- const guchar *line;
- gint next_offset;
- const guchar *linep, *lineend;
- int linelen;
- guchar c;
- icap_type_t icap_type;
- int datalen;
-
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICAP");
-
- /*
- * Put the first line from the buffer into the summary
- * if it's an ICAP header (but leave out the
- * line terminator).
- * Otherwise, just call it a continuation.
- *
- * Note that "tvb_find_line_end()" will return a value that
- * is not longer than what's in the buffer, so the
- * "tvb_get_ptr()" call won't throw an exception.
- */
- linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
- line = tvb_get_ptr(tvb, offset, linelen);
- icap_type = ICAP_OTHER; /* type not known yet */
- if (is_icap_message(line, linelen, &icap_type))
- col_add_str(pinfo->cinfo, COL_INFO,
- format_text(line, linelen));
- else
- col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
-
- if (tree) {
- ti = proto_tree_add_item(tree, proto_icap, tvb, offset, -1,
- ENC_NA);
- icap_tree = proto_item_add_subtree(ti, ett_icap);
- }
-
- /*
- * Process the packet data, a line at a time.
- */
- icap_type = ICAP_OTHER; /* type not known yet */
- while (tvb_offset_exists(tvb, offset)) {
- gboolean is_icap = FALSE;
- gboolean loop_done = FALSE;
- /*
- * Find the end of the line.
- */
- linelen = tvb_find_line_end(tvb, offset, -1, &next_offset,
- FALSE);
-
- /*
- * Get a buffer that refers to the line.
- */
- line = tvb_get_ptr(tvb, offset, linelen);
- lineend = line + linelen;
-
- /*
- * find header format
- */
- if (is_icap_message(line, linelen, &icap_type)) {
- goto is_icap_header;
- }
-
- /*
- * if it looks like a blank line, end of header perhaps?
- */
- if (linelen == 0) {
- goto is_icap_header;
- }
-
- /*
- * No. Does it look like a header?
- */
- linep = line;
- loop_done = FALSE;
- while (linep < lineend && (!loop_done)) {
- c = *linep++;
-
- /*
- * This must be a CHAR to be part of a token; that
- * means it must be ASCII.
- */
- if (!isascii(c)) {
- is_icap = FALSE;
- break; /* not ASCII, thus not a CHAR */
- }
-
- /*
- * This mustn't be a CTL to be part of a token.
- *
- * XXX - what about leading LWS on continuation
- * lines of a header?
- */
- if (iscntrl(c)) {
- is_icap = FALSE;
- break; /* CTL, not part of a header */
- }
-
- switch (c) {
-
- case '(':
- case ')':
- case '<':
- case '>':
- case '@':
- case ',':
- case ';':
- case '\\':
- case '"':
- case '/':
- case '[':
- case ']':
- case '?':
- case '=':
- case '{':
- case '}':
- /*
- * It's a separator, so it's not part of a
- * token, so it's not a field name for the
- * beginning of a header.
- *
- * (We don't have to check for HT; that's
- * already been ruled out by "iscntrl()".)
- *
- * XXX - what about ' '? HTTP's checks
- * check for that.
- */
- is_icap = FALSE;
- loop_done = TRUE;
- break;
-
- case ':':
- /*
- * This ends the token; we consider this
- * to be a header.
- */
- goto is_icap_header;
- }
- }
-
- /*
- * We don't consider this part of an ICAP message,
- * so we don't display it.
- * (Yeah, that means we don't display, say, a text/icap
- * page, but you can get that from the data pane.)
- */
- if (!is_icap)
- break;
+ proto_tree *icap_tree = NULL;
+ proto_item *ti = NULL;
+ proto_item *hidden_item;
+ tvbuff_t *new_tvb;
+ gint offset = 0;
+ const guchar *line;
+ gint next_offset;
+ const guchar *linep, *lineend;
+ int linelen;
+ guchar c;
+ icap_type_t icap_type;
+ int datalen;
+
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICAP");
+
+ /*
+ * Put the first line from the buffer into the summary
+ * if it's an ICAP header (but leave out the
+ * line terminator).
+ * Otherwise, just call it a continuation.
+ *
+ * Note that "tvb_find_line_end()" will return a value that
+ * is not longer than what's in the buffer, so the
+ * "tvb_get_ptr()" call won't throw an exception.
+ */
+ linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
+ line = tvb_get_ptr(tvb, offset, linelen);
+ icap_type = ICAP_OTHER; /* type not known yet */
+ if (is_icap_message(line, linelen, &icap_type))
+ col_add_str(pinfo->cinfo, COL_INFO,
+ format_text(line, linelen));
+ else
+ col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
+
+ if (tree) {
+ ti = proto_tree_add_item(tree, proto_icap, tvb, offset, -1,
+ ENC_NA);
+ icap_tree = proto_item_add_subtree(ti, ett_icap);
+ }
+
+ /*
+ * Process the packet data, a line at a time.
+ */
+ icap_type = ICAP_OTHER; /* type not known yet */
+ while (tvb_offset_exists(tvb, offset)) {
+ gboolean is_icap = FALSE;
+ gboolean loop_done = FALSE;
+ /*
+ * Find the end of the line.
+ */
+ linelen = tvb_find_line_end(tvb, offset, -1, &next_offset,
+ FALSE);
+
+ /*
+ * Get a buffer that refers to the line.
+ */
+ line = tvb_get_ptr(tvb, offset, linelen);
+ lineend = line + linelen;
+
+ /*
+ * find header format
+ */
+ if (is_icap_message(line, linelen, &icap_type)) {
+ goto is_icap_header;
+ }
+
+ /*
+ * if it looks like a blank line, end of header perhaps?
+ */
+ if (linelen == 0) {
+ goto is_icap_header;
+ }
+
+ /*
+ * No. Does it look like a header?
+ */
+ linep = line;
+ loop_done = FALSE;
+ while (linep < lineend && (!loop_done)) {
+ c = *linep++;
+
+ /*
+ * This must be a CHAR to be part of a token; that
+ * means it must be ASCII.
+ */
+ if (!isascii(c)) {
+ is_icap = FALSE;
+ break; /* not ASCII, thus not a CHAR */
+ }
+
+ /*
+ * This mustn't be a CTL to be part of a token.
+ *
+ * XXX - what about leading LWS on continuation
+ * lines of a header?
+ */
+ if (iscntrl(c)) {
+ is_icap = FALSE;
+ break; /* CTL, not part of a header */
+ }
+
+ switch (c) {
+
+ case '(':
+ case ')':
+ case '<':
+ case '>':
+ case '@':
+ case ',':
+ case ';':
+ case '\\':
+ case '"':
+ case '/':
+ case '[':
+ case ']':
+ case '?':
+ case '=':
+ case '{':
+ case '}':
+ /*
+ * It's a separator, so it's not part of a
+ * token, so it's not a field name for the
+ * beginning of a header.
+ *
+ * (We don't have to check for HT; that's
+ * already been ruled out by "iscntrl()".)
+ *
+ * XXX - what about ' '? HTTP's checks
+ * check for that.
+ */
+ is_icap = FALSE;
+ loop_done = TRUE;
+ break;
+
+ case ':':
+ /*
+ * This ends the token; we consider this
+ * to be a header.
+ */
+ goto is_icap_header;
+ }
+ }
+
+ /*
+ * We don't consider this part of an ICAP message,
+ * so we don't display it.
+ * (Yeah, that means we don't display, say, a text/icap
+ * page, but you can get that from the data pane.)
+ */
+ if (!is_icap)
+ break;
is_icap_header:
- proto_tree_add_format_text(icap_tree, tvb, offset, next_offset - offset);
- offset = next_offset;
- }
+ proto_tree_add_format_text(icap_tree, tvb, offset, next_offset - offset);
+ offset = next_offset;
+ }
- if (tree) {
- switch (icap_type) {
+ if (tree) {
+ switch (icap_type) {
- case ICAP_OPTIONS:
- hidden_item = proto_tree_add_boolean(icap_tree,
- hf_icap_options, tvb, 0, 0, 1);
+ case ICAP_OPTIONS:
+ hidden_item = proto_tree_add_boolean(icap_tree,
+ hf_icap_options, tvb, 0, 0, 1);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- break;
+ break;
- case ICAP_REQMOD:
- hidden_item = proto_tree_add_boolean(icap_tree,
- hf_icap_reqmod, tvb, 0, 0, 1);
+ case ICAP_REQMOD:
+ hidden_item = proto_tree_add_boolean(icap_tree,
+ hf_icap_reqmod, tvb, 0, 0, 1);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- break;
+ break;
- case ICAP_RESPMOD:
- hidden_item = proto_tree_add_boolean(icap_tree,
- hf_icap_respmod, tvb, 0, 0, 1);
+ case ICAP_RESPMOD:
+ hidden_item = proto_tree_add_boolean(icap_tree,
+ hf_icap_respmod, tvb, 0, 0, 1);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- break;
+ break;
- case ICAP_RESPONSE:
- hidden_item = proto_tree_add_boolean(icap_tree,
- hf_icap_response, tvb, 0, 0, 1);
+ case ICAP_RESPONSE:
+ hidden_item = proto_tree_add_boolean(icap_tree,
+ hf_icap_response, tvb, 0, 0, 1);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- break;
+ break;
- case ICAP_OTHER:
- default:
- break;
- }
- }
+ case ICAP_OTHER:
+ default:
+ break;
+ }
+ }
- datalen = tvb_length_remaining(tvb, offset);
+ datalen = tvb_length_remaining(tvb, offset);
if (datalen > 0) {
if(http_handle){
new_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(http_handle, new_tvb, pinfo, icap_tree);
}
- }
+ }
}
static int
is_icap_message(const guchar *data, int linelen, icap_type_t *type)
{
-#define ICAP_COMPARE(string, length, msgtype) { \
- if (strncmp(data, string, length) == 0) { \
- if (*type == ICAP_OTHER) \
- *type = msgtype; \
- return TRUE; \
- } \
+#define ICAP_COMPARE(string, length, msgtype) { \
+ if (strncmp(data, string, length) == 0) { \
+ if (*type == ICAP_OTHER) \
+ *type = msgtype; \
+ return TRUE; \
+ } \
}
- /*
- * From draft-elson-opes-icap-01(72).txt
- */
- if (linelen >= 5) {
- ICAP_COMPARE("ICAP/", 5, ICAP_RESPONSE); /* response */
- }
- if (linelen >= 7) {
- ICAP_COMPARE("REQMOD ", 7, ICAP_REQMOD); /* request mod */
- }
- if (linelen >= 8) {
- ICAP_COMPARE("OPTIONS ", 8, ICAP_OPTIONS); /* options */
- ICAP_COMPARE("RESPMOD ", 8, ICAP_RESPMOD); /* response mod */
- }
- return FALSE;
+ /*
+ * From draft-elson-opes-icap-01(72).txt
+ */
+ if (linelen >= 5) {
+ ICAP_COMPARE("ICAP/", 5, ICAP_RESPONSE); /* response */
+ }
+ if (linelen >= 7) {
+ ICAP_COMPARE("REQMOD ", 7, ICAP_REQMOD); /* request mod */
+ }
+ if (linelen >= 8) {
+ ICAP_COMPARE("OPTIONS ", 8, ICAP_OPTIONS); /* options */
+ ICAP_COMPARE("RESPMOD ", 8, ICAP_RESPMOD); /* response mod */
+ }
+ return FALSE;
#undef ICAP_COMPARE
}
void
proto_register_icap(void)
{
- static hf_register_info hf[] = {
- { &hf_icap_response,
- { "Response", "icap.response",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0,
- "TRUE if ICAP response", HFILL }},
- { &hf_icap_reqmod,
- { "Reqmod", "icap.reqmod",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0,
- "TRUE if ICAP reqmod", HFILL }},
- { &hf_icap_respmod,
- { "Respmod", "icap.respmod",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0,
- "TRUE if ICAP respmod", HFILL }},
- { &hf_icap_options,
- { "Options", "icap.options",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0,
- "TRUE if ICAP options", HFILL }},
+ static hf_register_info hf[] = {
+ { &hf_icap_response,
+ { "Response", "icap.response",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "TRUE if ICAP response", HFILL }},
+ { &hf_icap_reqmod,
+ { "Reqmod", "icap.reqmod",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "TRUE if ICAP reqmod", HFILL }},
+ { &hf_icap_respmod,
+ { "Respmod", "icap.respmod",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "TRUE if ICAP respmod", HFILL }},
+ { &hf_icap_options,
+ { "Options", "icap.options",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "TRUE if ICAP options", HFILL }},
#if 0
- { &hf_icap_other,
- { "Other", "icap.other",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0,
- "TRUE if ICAP other", HFILL }},
+ { &hf_icap_other,
+ { "Other", "icap.other",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+ "TRUE if ICAP other", HFILL }},
#endif
- };
- static gint *ett[] = {
- &ett_icap,
- };
+ };
+ static gint *ett[] = {
+ &ett_icap,
+ };
- proto_icap = proto_register_protocol(
- "Internet Content Adaptation Protocol",
- "ICAP", "icap");
- proto_register_field_array(proto_icap, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_icap = proto_register_protocol(
+ "Internet Content Adaptation Protocol",
+ "ICAP", "icap");
+ proto_register_field_array(proto_icap, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_icap(void)
{
- dissector_handle_t icap_handle;
+ dissector_handle_t icap_handle;
data_handle = find_dissector("data");
http_handle = find_dissector("http");
- icap_handle = create_dissector_handle(dissect_icap, proto_icap);
- dissector_add_uint("tcp.port", TCP_PORT_ICAP, icap_handle);
+ icap_handle = create_dissector_handle(dissect_icap, proto_icap);
+ dissector_add_uint("tcp.port", TCP_PORT_ICAP, icap_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-ieee8021ah.c b/epan/dissectors/packet-ieee8021ah.c
index 91fc430b68..69830aff28 100644
--- a/epan/dissectors/packet-ieee8021ah.c
+++ b/epan/dissectors/packet-ieee8021ah.c
@@ -40,7 +40,7 @@ void proto_reg_handoff_ieee8021ah(void);
static dissector_handle_t ethertype_handle;
void dissect_ieee8021ah_common(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, proto_tree *parent, int tree_index);
+ proto_tree *tree, proto_tree *parent, int tree_index);
/* GLOBALS ************************************************************/
@@ -59,13 +59,13 @@ static int hf_ieee8021ad_cvid = -1;
/* dot1ah C-tag fields */
static int hf_ieee8021ah_priority = -1;
-static int hf_ieee8021ah_drop = -1; /* drop eligibility */
-static int hf_ieee8021ah_nca = -1; /* no customer addresses (c_daddr & c_saddr are 0) */
-static int hf_ieee8021ah_res1 = -1; /* 2 bits reserved; ignored on receive */
-static int hf_ieee8021ah_res2 = -1; /* 2 bits reserved; delete frame if non-zero */
-static int hf_ieee8021ah_isid = -1; /* I-SID */
-static int hf_ieee8021ah_c_daddr = -1; /* encapsulated customer dest addr */
-static int hf_ieee8021ah_c_saddr = -1; /* encapsulated customer src addr */
+static int hf_ieee8021ah_drop = -1; /* drop eligibility */
+static int hf_ieee8021ah_nca = -1; /* no customer addresses (c_daddr & c_saddr are 0) */
+static int hf_ieee8021ah_res1 = -1; /* 2 bits reserved; ignored on receive */
+static int hf_ieee8021ah_res2 = -1; /* 2 bits reserved; delete frame if non-zero */
+static int hf_ieee8021ah_isid = -1; /* I-SID */
+static int hf_ieee8021ah_c_daddr = -1; /* encapsulated customer dest addr */
+static int hf_ieee8021ah_c_saddr = -1; /* encapsulated customer src addr */
static int hf_ieee8021ah_etype = -1;
/* static int hf_ieee8021ah_len = -1; */
@@ -83,21 +83,21 @@ capture_ieee8021ah(const guchar *pd, int offset, int len, packet_counts *ld)
guint16 encap_proto;
if (!BYTES_ARE_IN_FRAME(offset, len, IEEE8021AH_LEN + 1)) {
- ld->other++;
- return;
+ ld->other++;
+ return;
}
encap_proto = pntoh16( &pd[offset + IEEE8021AH_LEN - 2] );
if (encap_proto <= IEEE_802_3_MAX_LEN) {
- if ( pd[offset + IEEE8021AH_LEN] == 0xff
- && pd[offset + IEEE8021AH_LEN + 1] == 0xff ) {
- capture_ipx(ld);
- }
- else {
- capture_llc(pd, offset + IEEE8021AH_LEN,len,ld);
- }
+ if ( pd[offset + IEEE8021AH_LEN] == 0xff
+ && pd[offset + IEEE8021AH_LEN + 1] == 0xff ) {
+ capture_ipx(ld);
+ }
+ else {
+ capture_llc(pd, offset + IEEE8021AH_LEN,len,ld);
+ }
}
else {
- capture_ethertype(encap_proto, pd, offset + IEEE8021AH_LEN, len, ld);
+ capture_ethertype(encap_proto, pd, offset + IEEE8021AH_LEN, len, ld);
}
}
@@ -105,17 +105,18 @@ capture_ieee8021ah(const guchar *pd, int offset, int len, packet_counts *ld)
static
void
dissect_ieee8021ad(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree)
+ proto_tree *tree)
{
- proto_tree *ptree = NULL;
- proto_tree *tagtree = NULL;
- guint32 tci, ctci;
- guint16 encap_proto;
+ proto_tree *ptree = NULL;
+ proto_tree *tagtree = NULL;
+ guint32 tci, ctci;
+ guint16 encap_proto;
+ int proto_tree_index;
+ ethertype_data_t ethertype_data;
+
+ tvbuff_t *volatile next_tvb = NULL;
proto_tree *volatile ieee8021ad_tree;
proto_tree *volatile ieee8021ad_tag_tree;
- int proto_tree_index;
- tvbuff_t *volatile next_tvb = NULL;
- ethertype_data_t ethertype_data;
/* set tree index */
proto_tree_index = proto_ieee8021ad;
@@ -126,16 +127,16 @@ dissect_ieee8021ad(tvbuff_t *tvb, packet_info *pinfo,
tci = tvb_get_ntohs( tvb, 0 );
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "PRI: %d DROP: %d ID: %d",
- (tci >> 13), ((tci >> 12) & 1), (tci & 0xFFF));
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "PRI: %d DROP: %d ID: %d",
+ (tci >> 13), ((tci >> 12) & 1), (tci & 0xFFF));
/* create the protocol tree */
ieee8021ad_tree = NULL;
if (tree) {
- ptree = proto_tree_add_item(tree, proto_tree_index, tvb, 0, IEEE8021AD_LEN, ENC_NA);
- ieee8021ad_tree = proto_item_add_subtree(ptree, ett_ieee8021ad);
+ ptree = proto_tree_add_item(tree, proto_tree_index, tvb, 0, IEEE8021AD_LEN, ENC_NA);
+ ieee8021ad_tree = proto_item_add_subtree(ptree, ett_ieee8021ad);
}
encap_proto = tvb_get_ntohs(tvb, IEEE8021AD_LEN - 2);
@@ -147,142 +148,143 @@ dissect_ieee8021ad(tvbuff_t *tvb, packet_info *pinfo,
/* If it's a 1ah frame, create subtree for B-Tag, rename overall
tree to 802.1ah, pass to 1ah dissector */
if (encap_proto == ETHERTYPE_IEEE_802_1AH) {
- if (tree) {
- tagtree = proto_tree_add_item(ptree, proto_tree_index, tvb, 0, 2, ENC_NA);
- ieee8021ad_tag_tree = proto_item_add_subtree(tagtree, ett_ieee8021ad);
+ if (tree) {
+ tagtree = proto_tree_add_item(ptree, proto_tree_index, tvb, 0, 2, ENC_NA);
+ ieee8021ad_tag_tree = proto_item_add_subtree(tagtree, ett_ieee8021ad);
- /* add fields */
- proto_tree_add_uint(ieee8021ad_tag_tree, hf_ieee8021ad_priority, tvb,
- 0, 1, tci);
- proto_tree_add_uint(ieee8021ad_tag_tree, hf_ieee8021ad_cfi, tvb, 0, 1, tci);
- proto_tree_add_uint(ieee8021ad_tag_tree, hf_ieee8021ad_id, tvb, 0, 2, tci);
+ /* add fields */
+ proto_tree_add_uint(ieee8021ad_tag_tree, hf_ieee8021ad_priority, tvb,
+ 0, 1, tci);
+ proto_tree_add_uint(ieee8021ad_tag_tree, hf_ieee8021ad_cfi, tvb, 0, 1, tci);
+ proto_tree_add_uint(ieee8021ad_tag_tree, hf_ieee8021ad_id, tvb, 0, 2, tci);
- /* set label of B-tag subtree */
- proto_item_set_text(ieee8021ad_tag_tree, "B-Tag, B-VID: %d", tci & 0x0FFF);
- }
+ /* set label of B-tag subtree */
+ proto_item_set_text(ieee8021ad_tag_tree, "B-Tag, B-VID: %d", tci & 0x0FFF);
+ }
- next_tvb = tvb_new_subset_remaining(tvb, IEEE8021AD_LEN);
+ next_tvb = tvb_new_subset_remaining(tvb, IEEE8021AD_LEN);
- if (ptree) {
- /* add bvid to label */
- proto_item_set_text(ptree, "IEEE 802.1ah, B-VID: %d", tci & 0x0FFF);
+ if (ptree) {
+ /* add bvid to label */
+ proto_item_set_text(ptree, "IEEE 802.1ah, B-VID: %d", tci & 0x0FFF);
- dissect_ieee8021ah_common(next_tvb, pinfo, ptree, tree, proto_tree_index);
- }
- else {
- dissect_ieee8021ah_common(next_tvb, pinfo, tree, NULL, proto_tree_index);
- }
+ dissect_ieee8021ah_common(next_tvb, pinfo, ptree, tree, proto_tree_index);
+ }
+ else {
+ dissect_ieee8021ah_common(next_tvb, pinfo, tree, NULL, proto_tree_index);
+ }
- return;
+ return;
} else if (encap_proto == ETHERTYPE_IEEE_802_1AD) {
- /* two VLAN tags (i.e. Q-in-Q) */
- ctci = tvb_get_ntohs(tvb, IEEE8021AD_LEN);
-
- if (tree) {
- /* add fields */
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_priority, tvb,
- 0, 1, tci);
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_cfi, tvb, 0, 1, tci);
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_svid, tvb, 0, 2, tci);
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_priority, tvb,
- IEEE8021AD_LEN, 1, ctci);
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_cfi, tvb,
- IEEE8021AD_LEN, 1, ctci);
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_cvid, tvb, IEEE8021AD_LEN,
- 2, ctci);
- }
-
- proto_item_set_text(ptree, "IEEE 802.1ad, S-VID: %d, C-VID: %d", tci & 0x0FFF,
- ctci & 0x0FFF);
-
- ethertype_data.etype = tvb_get_ntohs(tvb, IEEE8021AD_LEN * 2 - 2);
- ethertype_data.offset_after_ethertype = IEEE8021AD_LEN * 2;
-
- /* 802.1ad tags are always followed by an ethertype; call next
- dissector based on ethertype */
- call_dissector_with_data(ethertype_handle, tvb, pinfo, tree, &ethertype_data);
+ /* two VLAN tags (i.e. Q-in-Q) */
+ ctci = tvb_get_ntohs(tvb, IEEE8021AD_LEN);
+
+ if (tree) {
+ /* add fields */
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_priority, tvb,
+ 0, 1, tci);
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_cfi, tvb, 0, 1, tci);
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_svid, tvb, 0, 2, tci);
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_priority, tvb,
+ IEEE8021AD_LEN, 1, ctci);
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_cfi, tvb,
+ IEEE8021AD_LEN, 1, ctci);
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_cvid, tvb, IEEE8021AD_LEN,
+ 2, ctci);
+ }
+
+ proto_item_set_text(ptree, "IEEE 802.1ad, S-VID: %d, C-VID: %d", tci & 0x0FFF,
+ ctci & 0x0FFF);
+
+ ethertype_data.etype = tvb_get_ntohs(tvb, IEEE8021AD_LEN * 2 - 2);
+ ethertype_data.offset_after_ethertype = IEEE8021AD_LEN * 2;
+
+ /* 802.1ad tags are always followed by an ethertype; call next
+ dissector based on ethertype */
+ call_dissector_with_data(ethertype_handle, tvb, pinfo, tree, &ethertype_data);
} else {
- /* Something else (shouldn't really happen, but we'll support it anyways) */
- if (tree) {
- /* add fields */
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_priority, tvb,
- 0, 1, tci);
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_cfi, tvb, 0, 1, tci);
- proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_id, tvb, 0, 2, tci);
- }
-
- /* label should be 802.1ad not .1ah */
- proto_item_set_text(ptree, "IEEE 802.1ad, ID: %d", tci & 0x0FFF);
-
- ethertype_data.etype = encap_proto;
- ethertype_data.offset_after_ethertype = IEEE8021AD_LEN;
-
- /* 802.1ad tags are always followed by an ethertype; call next
- dissector based on ethertype */
- call_dissector_with_data(ethertype_handle, tvb, pinfo, tree, &ethertype_data);
+ /* Something else (shouldn't really happen, but we'll support it anyways) */
+ if (tree) {
+ /* add fields */
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_priority, tvb,
+ 0, 1, tci);
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_cfi, tvb, 0, 1, tci);
+ proto_tree_add_uint(ieee8021ad_tree, hf_ieee8021ad_id, tvb, 0, 2, tci);
+ }
+
+ /* label should be 802.1ad not .1ah */
+ proto_item_set_text(ptree, "IEEE 802.1ad, ID: %d", tci & 0x0FFF);
+
+ ethertype_data.etype = encap_proto;
+ ethertype_data.offset_after_ethertype = IEEE8021AD_LEN;
+
+ /* 802.1ad tags are always followed by an ethertype; call next
+ dissector based on ethertype */
+ call_dissector_with_data(ethertype_handle, tvb, pinfo, tree, &ethertype_data);
}
}
void
dissect_ieee8021ah_common(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree, proto_tree *parent, int tree_index) {
- guint32 tci;
- guint16 encap_proto;
- proto_tree *ptree;
+ proto_tree *tree, proto_tree *parent, int tree_index) {
+ guint32 tci;
+ guint16 encap_proto;
+ proto_tree *ptree;
+ ethertype_data_t ethertype_data;
+
proto_tree *volatile ieee8021ah_tag_tree;
- ethertype_data_t ethertype_data;
/* for parsing out ethernet addrs */
const guint8 *src_addr, *dst_addr;
tci = tvb_get_ntohl( tvb, 0 );
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "PRI: %d Drop: %d NCA: %d Res1: %d Res2: %d I-SID: %d",
- (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1),
- ((tci >> 26) & 1), ((tci >> 24) & 3), tci & IEEE8021AH_ISIDMASK);
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "PRI: %d Drop: %d NCA: %d Res1: %d Res2: %d I-SID: %d",
+ (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1),
+ ((tci >> 26) & 1), ((tci >> 24) & 3), tci & IEEE8021AH_ISIDMASK);
/* create the protocol tree */
ptree = NULL;
ieee8021ah_tag_tree = NULL;
if (tree) {
- /* 802.1ah I-Tag */
- ptree = proto_tree_add_item(tree, tree_index, tvb, 0, 4, ENC_NA);
- ieee8021ah_tag_tree = proto_item_add_subtree(ptree, ett_ieee8021ah);
-
- /* add fields */
- proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_priority, tvb,
- 0, 1, tci);
- proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_drop, tvb, 0, 1, tci);
- proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_nca, tvb, 0, 1, tci);
- proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_res1, tvb, 0, 1, tci);
- proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_res2, tvb, 0, 1, tci);
- proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_isid, tvb, 1, 3, tci);
-
- proto_item_set_text(ieee8021ah_tag_tree, "I-Tag, I-SID: %d",
- tci & IEEE8021AH_ISIDMASK);
-
- /* ensure size of tag */
- tvb_ensure_bytes_exist(tvb, 4, 12);
-
- /* parse out IP addrs */
- dst_addr = tvb_get_ptr(tvb, 4, 6); /* safe to use this function? */
- src_addr = tvb_get_ptr(tvb, 10, 6);
-
- proto_tree_add_ether(tree, hf_ieee8021ah_c_daddr,
- tvb, 4, 6, dst_addr);
-
- proto_tree_add_ether(tree, hf_ieee8021ah_c_saddr,
- tvb, 10, 6, src_addr);
-
- /* add text to 802.1ad label */
- if (parent) {
- proto_item_append_text(tree, ", I-SID: %d, C-Src: %s (%s), C-Dst: %s (%s)",
- tci & IEEE8021AH_ISIDMASK, get_ether_name(src_addr),
- ether_to_str(src_addr), get_ether_name(dst_addr),
- ether_to_str(dst_addr));
- }
+ /* 802.1ah I-Tag */
+ ptree = proto_tree_add_item(tree, tree_index, tvb, 0, 4, ENC_NA);
+ ieee8021ah_tag_tree = proto_item_add_subtree(ptree, ett_ieee8021ah);
+
+ /* add fields */
+ proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_priority, tvb,
+ 0, 1, tci);
+ proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_drop, tvb, 0, 1, tci);
+ proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_nca, tvb, 0, 1, tci);
+ proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_res1, tvb, 0, 1, tci);
+ proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_res2, tvb, 0, 1, tci);
+ proto_tree_add_uint(ieee8021ah_tag_tree, hf_ieee8021ah_isid, tvb, 1, 3, tci);
+
+ proto_item_set_text(ieee8021ah_tag_tree, "I-Tag, I-SID: %d",
+ tci & IEEE8021AH_ISIDMASK);
+
+ /* ensure size of tag */
+ tvb_ensure_bytes_exist(tvb, 4, 12);
+
+ /* parse out IP addrs */
+ dst_addr = tvb_get_ptr(tvb, 4, 6); /* safe to use this function? */
+ src_addr = tvb_get_ptr(tvb, 10, 6);
+
+ proto_tree_add_ether(tree, hf_ieee8021ah_c_daddr,
+ tvb, 4, 6, dst_addr);
+
+ proto_tree_add_ether(tree, hf_ieee8021ah_c_saddr,
+ tvb, 10, 6, src_addr);
+
+ /* add text to 802.1ad label */
+ if (parent) {
+ proto_item_append_text(tree, ", I-SID: %d, C-Src: %s (%s), C-Dst: %s (%s)",
+ tci & IEEE8021AH_ISIDMASK, get_ether_name(src_addr),
+ ether_to_str(src_addr), get_ether_name(dst_addr),
+ ether_to_str(dst_addr));
+ }
}
encap_proto = tvb_get_ntohs(tvb, IEEE8021AH_LEN - 2);
@@ -310,12 +312,13 @@ dissect_ieee8021ah_common(tvbuff_t *tvb, packet_info *pinfo,
static
void
dissect_ieee8021ah(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *tree)
+ proto_tree *tree)
{
proto_tree *ptree;
- guint32 tci;
+ guint32 tci;
+ int proto_tree_index;
+
proto_tree *volatile ieee8021ah_tree;
- int proto_tree_index;
/* set tree index */
proto_tree_index = proto_ieee8021ah;
@@ -326,19 +329,19 @@ dissect_ieee8021ah(tvbuff_t *tvb, packet_info *pinfo,
tci = tvb_get_ntohl( tvb, 0 );
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "PRI: %d Drop: %d NCA: %d Res1: %d Res2: %d I-SID: %d",
- (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1),
- ((tci >> 26) & 1), ((tci >> 24) & 3), (tci & 0x00FFFFFF));
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "PRI: %d Drop: %d NCA: %d Res1: %d Res2: %d I-SID: %d",
+ (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1),
+ ((tci >> 26) & 1), ((tci >> 24) & 3), (tci & 0x00FFFFFF));
/* create the protocol tree */
ieee8021ah_tree = NULL;
if (tree) {
- ptree = proto_tree_add_item(tree, proto_tree_index, tvb, 0, IEEE8021AH_LEN, ENC_NA);
- ieee8021ah_tree = proto_item_add_subtree(ptree, ett_ieee8021ah);
+ ptree = proto_tree_add_item(tree, proto_tree_index, tvb, 0, IEEE8021AH_LEN, ENC_NA);
+ ieee8021ah_tree = proto_item_add_subtree(ptree, ett_ieee8021ah);
- dissect_ieee8021ah_common(tvb, pinfo, ieee8021ah_tree, tree, proto_tree_index);
+ dissect_ieee8021ah_common(tvb, pinfo, ieee8021ah_tree, tree, proto_tree_index);
}
}
@@ -348,64 +351,64 @@ void
proto_register_ieee8021ah(void)
{
static hf_register_info hf[] = {
- { &hf_ieee8021ah_priority, {
- "Priority", "ieee8021ah.priority", FT_UINT32, BASE_DEC,
- 0, 0xE0000000, NULL, HFILL }},
- { &hf_ieee8021ah_drop, {
- "DROP", "ieee8021ah.drop", FT_UINT32, BASE_DEC,
- 0, 0x10000000, NULL, HFILL }},
- { &hf_ieee8021ah_nca, {
- "NCA", "ieee8021ah.nca", FT_UINT32, BASE_DEC,
- 0, 0x08000000, "No Customer Addresses", HFILL }},
- { &hf_ieee8021ah_res1, {
- "RES1", "ieee8021ah.res1", FT_UINT32, BASE_DEC,
- 0, 0x04000000, "Reserved1", HFILL }},
- { &hf_ieee8021ah_res2, {
- "RES2", "ieee8021ah.res2", FT_UINT32, BASE_DEC,
- 0, 0x03000000, "Reserved2", HFILL }},
- { &hf_ieee8021ah_isid, {
- "I-SID", "ieee8021ah.isid", FT_UINT32, BASE_DEC,
- 0, 0x00FFFFFF, NULL, HFILL }},
- { &hf_ieee8021ah_c_daddr, {
- "C-Destination", "ieee8021ah.cdst", FT_ETHER, BASE_NONE,
- NULL, 0x0, "Customer Destination Address", HFILL }},
- { &hf_ieee8021ah_c_saddr, {
- "C-Source", "ieee8021ah.csrc", FT_ETHER, BASE_NONE,
- NULL, 0x0, "Customer Source Address", HFILL }},
- { &hf_ieee8021ah_etype, {
- "Type", "ieee8021ah.etype", FT_UINT16, BASE_HEX,
- VALS(etype_vals), 0x0, NULL, HFILL }},
+ { &hf_ieee8021ah_priority, {
+ "Priority", "ieee8021ah.priority", FT_UINT32, BASE_DEC,
+ 0, 0xE0000000, NULL, HFILL }},
+ { &hf_ieee8021ah_drop, {
+ "DROP", "ieee8021ah.drop", FT_UINT32, BASE_DEC,
+ 0, 0x10000000, NULL, HFILL }},
+ { &hf_ieee8021ah_nca, {
+ "NCA", "ieee8021ah.nca", FT_UINT32, BASE_DEC,
+ 0, 0x08000000, "No Customer Addresses", HFILL }},
+ { &hf_ieee8021ah_res1, {
+ "RES1", "ieee8021ah.res1", FT_UINT32, BASE_DEC,
+ 0, 0x04000000, "Reserved1", HFILL }},
+ { &hf_ieee8021ah_res2, {
+ "RES2", "ieee8021ah.res2", FT_UINT32, BASE_DEC,
+ 0, 0x03000000, "Reserved2", HFILL }},
+ { &hf_ieee8021ah_isid, {
+ "I-SID", "ieee8021ah.isid", FT_UINT32, BASE_DEC,
+ 0, 0x00FFFFFF, NULL, HFILL }},
+ { &hf_ieee8021ah_c_daddr, {
+ "C-Destination", "ieee8021ah.cdst", FT_ETHER, BASE_NONE,
+ NULL, 0x0, "Customer Destination Address", HFILL }},
+ { &hf_ieee8021ah_c_saddr, {
+ "C-Source", "ieee8021ah.csrc", FT_ETHER, BASE_NONE,
+ NULL, 0x0, "Customer Source Address", HFILL }},
+ { &hf_ieee8021ah_etype, {
+ "Type", "ieee8021ah.etype", FT_UINT16, BASE_HEX,
+ VALS(etype_vals), 0x0, NULL, HFILL }},
#if 0
- { &hf_ieee8021ah_len, {
- "Length", "ieee8021ah.len", FT_UINT16, BASE_DEC,
- NULL, 0x0, NULL, HFILL }},
+ { &hf_ieee8021ah_len, {
+ "Length", "ieee8021ah.len", FT_UINT16, BASE_DEC,
+ NULL, 0x0, NULL, HFILL }},
#endif
- { &hf_ieee8021ah_trailer, {
- "Trailer", "ieee8021ah.trailer", FT_BYTES, BASE_NONE,
- NULL, 0x0, "802.1ah Trailer", HFILL }}
+ { &hf_ieee8021ah_trailer, {
+ "Trailer", "ieee8021ah.trailer", FT_BYTES, BASE_NONE,
+ NULL, 0x0, "802.1ah Trailer", HFILL }}
};
static hf_register_info hf_1ad[] = {
- { &hf_ieee8021ad_priority, {
- "Priority", "ieee8021ad.priority", FT_UINT16, BASE_DEC,
- 0, 0xE000, NULL, HFILL }},
- { &hf_ieee8021ad_cfi, {
- "DEI", "ieee8021ad.dei", FT_UINT16, BASE_DEC,
- 0, 0x1000, "Drop Eligibility", HFILL }},
- { &hf_ieee8021ad_id, {
- "ID", "ieee8021ad.id", FT_UINT16, BASE_DEC,
- 0, 0x0FFF, "Vlan ID", HFILL }},
- { &hf_ieee8021ad_svid, {
- "ID", "ieee8021ad.svid", FT_UINT16, BASE_DEC,
- 0, 0x0FFF, "S-Vlan ID", HFILL }},
- { &hf_ieee8021ad_cvid, {
- "ID", "ieee8021ad.cvid", FT_UINT16, BASE_DEC,
- 0, 0x0FFF, "C-Vlan ID", HFILL }},
+ { &hf_ieee8021ad_priority, {
+ "Priority", "ieee8021ad.priority", FT_UINT16, BASE_DEC,
+ 0, 0xE000, NULL, HFILL }},
+ { &hf_ieee8021ad_cfi, {
+ "DEI", "ieee8021ad.dei", FT_UINT16, BASE_DEC,
+ 0, 0x1000, "Drop Eligibility", HFILL }},
+ { &hf_ieee8021ad_id, {
+ "ID", "ieee8021ad.id", FT_UINT16, BASE_DEC,
+ 0, 0x0FFF, "Vlan ID", HFILL }},
+ { &hf_ieee8021ad_svid, {
+ "ID", "ieee8021ad.svid", FT_UINT16, BASE_DEC,
+ 0, 0x0FFF, "S-Vlan ID", HFILL }},
+ { &hf_ieee8021ad_cvid, {
+ "ID", "ieee8021ad.cvid", FT_UINT16, BASE_DEC,
+ 0, 0x0FFF, "C-Vlan ID", HFILL }},
};
static gint *ett[] = {
- &ett_ieee8021ah,
- &ett_ieee8021ad
+ &ett_ieee8021ah,
+ &ett_ieee8021ad
};
@@ -414,11 +417,11 @@ proto_register_ieee8021ah(void)
/* registration */
/* dot1ah */
proto_ieee8021ah = proto_register_protocol("IEEE 802.1ah", "IEEE 802.1AH",
- "ieee8021ah");
+ "ieee8021ah");
proto_register_field_array(proto_ieee8021ah, hf, array_length(hf));
proto_ieee8021ad = proto_register_protocol("IEEE 802.1ad", "IEEE 802.1AD",
- "ieee8021ad");
+ "ieee8021ad");
proto_register_field_array(proto_ieee8021ad, hf_1ad, array_length(hf_1ad));
/* register subtree array for both */
@@ -426,36 +429,49 @@ proto_register_ieee8021ah(void)
/* add a user preference to set the 802.1ah ethertype */
ieee8021ah_module = prefs_register_protocol(proto_ieee8021ah,
- proto_reg_handoff_ieee8021ah);
+ proto_reg_handoff_ieee8021ah);
prefs_register_uint_preference(ieee8021ah_module, "8021ah_ethertype",
- "802.1ah Ethertype (in hex)",
- "(Hexadecimal) Ethertype used to indicate IEEE 802.1ah tag.",
- 16, &ieee8021ah_ethertype);
+ "802.1ah Ethertype (in hex)",
+ "(Hexadecimal) Ethertype used to indicate IEEE 802.1ah tag.",
+ 16, &ieee8021ah_ethertype);
}
void
proto_reg_handoff_ieee8021ah(void)
{
- static gboolean prefs_initialized = FALSE;
+ static gboolean prefs_initialized = FALSE;
static dissector_handle_t ieee8021ah_handle;
- static unsigned int old_ieee8021ah_ethertype;
+ static unsigned int old_ieee8021ah_ethertype;
if (!prefs_initialized){
- dissector_handle_t ieee8021ad_handle;
- ieee8021ah_handle = create_dissector_handle(dissect_ieee8021ah,
- proto_ieee8021ah);
- ieee8021ad_handle = create_dissector_handle(dissect_ieee8021ad,
- proto_ieee8021ad);
- dissector_add_uint("ethertype", ETHERTYPE_IEEE_802_1AD, ieee8021ad_handle);
- ethertype_handle = find_dissector("ethertype");
-
- prefs_initialized = TRUE;
+ dissector_handle_t ieee8021ad_handle;
+ ieee8021ah_handle = create_dissector_handle(dissect_ieee8021ah,
+ proto_ieee8021ah);
+ ieee8021ad_handle = create_dissector_handle(dissect_ieee8021ad,
+ proto_ieee8021ad);
+ dissector_add_uint("ethertype", ETHERTYPE_IEEE_802_1AD, ieee8021ad_handle);
+ ethertype_handle = find_dissector("ethertype");
+
+ prefs_initialized = TRUE;
}
else {
- dissector_delete_uint("ethertype", old_ieee8021ah_ethertype, ieee8021ah_handle);
+ dissector_delete_uint("ethertype", old_ieee8021ah_ethertype, ieee8021ah_handle);
}
old_ieee8021ah_ethertype = ieee8021ah_ethertype;
dissector_add_uint("ethertype", ieee8021ah_ethertype, ieee8021ah_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-ifcp.c b/epan/dissectors/packet-ifcp.c
index 68f2b86529..31248a2c10 100644
--- a/epan/dissectors/packet-ifcp.c
+++ b/epan/dissectors/packet-ifcp.c
@@ -41,8 +41,8 @@
void proto_register_ifcp(void);
void proto_reg_handoff_ifcp(void);
-#define iFCP_ENCAP_HEADER_LEN 28
-#define iFCP_MIN_HEADER_LEN 16 /* upto frame len field */
+#define iFCP_ENCAP_HEADER_LEN 28
+#define iFCP_MIN_HEADER_LEN 16 /* upto frame len field */
typedef enum {
iFCP_EOFn = 0x41,
@@ -72,19 +72,19 @@ typedef enum {
} fcencap_proto_t;
static const value_string ifcp_eof_vals[] = {
- {iFCP_EOFn, "EOFn" },
- {iFCP_EOFt, "EOFt" },
- {iFCP_EOFrt, "EOFrt" },
- {iFCP_EOFdt, "EOFdt" },
- {iFCP_EOFni, "EOFni" },
+ {iFCP_EOFn, "EOFn" },
+ {iFCP_EOFt, "EOFt" },
+ {iFCP_EOFrt, "EOFrt" },
+ {iFCP_EOFdt, "EOFdt" },
+ {iFCP_EOFni, "EOFni" },
{iFCP_EOFdti, "EOFdti" },
{iFCP_EOFrti, "EOFrti" },
- {iFCP_EOFa, "EOFa" },
+ {iFCP_EOFa, "EOFa" },
{0, NULL},
};
static const value_string ifcp_sof_vals[] = {
- {iFCP_SOFf, "SOFf" },
+ {iFCP_SOFf, "SOFf" },
{iFCP_SOFi4, "SOFi4" },
{iFCP_SOFi2, "SOFi2" },
{iFCP_SOFi3, "SOFi3" },
@@ -109,28 +109,28 @@ static const guint8 ifcp_header_4_bytes[4] = {
0x02, 0x01, 0xFD, 0xFE
};
-static int proto_ifcp = -1;
-
-static int hf_ifcp_protocol = -1;
-static int hf_ifcp_protocol_c = -1;
-static int hf_ifcp_version = -1;
-static int hf_ifcp_version_c = -1;
-static int hf_ifcp_encap_flags_c=-1;
-static int hf_ifcp_framelen = -1;
-static int hf_ifcp_framelen_c = -1;
-static int hf_ifcp_tsec = -1;
-static int hf_ifcp_tusec = -1;
-static int hf_ifcp_encap_crc = -1;
-static int hf_ifcp_sof = -1;
-static int hf_ifcp_sof_c = -1;
-static int hf_ifcp_eof = -1;
-static int hf_ifcp_eof_c = -1;
-static int hf_ifcp_ls_command_acc = -1;
-static int hf_ifcp_flags = -1;
-static int hf_ifcp_flags_ses = -1;
-static int hf_ifcp_flags_trp = -1;
-static int hf_ifcp_flags_spc = -1;
-static int hf_ifcp_common_flags = -1;
+static int proto_ifcp = -1;
+
+static int hf_ifcp_protocol = -1;
+static int hf_ifcp_protocol_c = -1;
+static int hf_ifcp_version = -1;
+static int hf_ifcp_version_c = -1;
+static int hf_ifcp_encap_flags_c = -1;
+static int hf_ifcp_framelen = -1;
+static int hf_ifcp_framelen_c = -1;
+static int hf_ifcp_tsec = -1;
+static int hf_ifcp_tusec = -1;
+static int hf_ifcp_encap_crc = -1;
+static int hf_ifcp_sof = -1;
+static int hf_ifcp_sof_c = -1;
+static int hf_ifcp_eof = -1;
+static int hf_ifcp_eof_c = -1;
+static int hf_ifcp_ls_command_acc = -1;
+static int hf_ifcp_flags = -1;
+static int hf_ifcp_flags_ses = -1;
+static int hf_ifcp_flags_trp = -1;
+static int hf_ifcp_flags_spc = -1;
+static int hf_ifcp_common_flags = -1;
static int hf_ifcp_common_flags_crcv = -1;
static int ett_ifcp = -1;
@@ -144,9 +144,9 @@ static int ett_ifcp_frame_len = -1;
static gboolean ifcp_desegment = TRUE;
-static dissector_handle_t ifcp_handle=NULL;
-static dissector_handle_t data_handle=NULL;
-static dissector_handle_t fc_handle=NULL;
+static dissector_handle_t ifcp_handle = NULL;
+static dissector_handle_t data_handle = NULL;
+static dissector_handle_t fc_handle = NULL;
/* This function checks the first 16 bytes of the "header" that it looks sane
@@ -155,180 +155,180 @@ static dissector_handle_t fc_handle=NULL;
static gboolean
ifcp_header_test(tvbuff_t *tvb, int offset)
{
- guint16 flen, flen1;
-
- /* we can only do this test if we have 16 bytes or more */
- if(tvb_length_remaining(tvb, offset)<iFCP_MIN_HEADER_LEN){
- return FALSE;
- }
-
- /*
- * As per the iFCP standard, the following tests must PASS:
- * 1) Frame Length field validation -- 15 < Frame Length < 545;
- * 2) Comparison of Frame Length field to its ones complement; and
- * 3) A valid EOF is found in the word preceding the start of the next
- * iFCP header as indicated by the Frame Length field, to be tested
- * as follows:
- * 1) Bits 24-31 and 16-23 contain identical legal EOF values (the
- * list of legal EOF values is in the FC Frame Encapsulation
- * [21]); and
- * 2) Bits 8-15 and 0-7 contain the ones complement of the EOF
- * value found in bits 24-31.
- *
- * As per the iFCP standard, in addition, at least 3 of the following
- * set of tests must be performed to identify that we've located the
- * start of an iFCP frame.
- * a) Protocol# ones complement field (1 test);
- * b) Version ones complement field (1 test);
- * c) Replication of encapsulation word 0 in word 1 (1 test);
- * d) Reserved field and its ones complement (2 tests);
- * e) Flags field and its ones complement (2 tests);
- * f) CRC field is equal to zero (1 test); (DON'T DO THIS TEST!)
- * g) SOF fields and ones complement fields (4 tests);
- * h) Format and values of FC header (1 test);
- * i) CRC of FC Frame (2 tests);
- * j) FC Frame Encapsulation header information in the next iFCP Frame
- * (1 test).
- *
- * At least 3 of the 16 tests listed above SHALL be performed. Failure
- * of any of the above tests actually performed SHALL indicate an
- * encapsulation error and the FC Frame SHALL NOT be forwarded on to
- * the FC Entity.
- */
-
-
- /*
- * Tests a, b and c
- */
- if(tvb_memeql(tvb, offset, ifcp_header_4_bytes, 4) != 0){
- return FALSE;
+ guint16 flen, flen1;
+
+ /* we can only do this test if we have 16 bytes or more */
+ if(tvb_length_remaining(tvb, offset)<iFCP_MIN_HEADER_LEN){
+ return FALSE;
+ }
+
+ /*
+ * As per the iFCP standard, the following tests must PASS:
+ * 1) Frame Length field validation -- 15 < Frame Length < 545;
+ * 2) Comparison of Frame Length field to its ones complement; and
+ * 3) A valid EOF is found in the word preceding the start of the next
+ * iFCP header as indicated by the Frame Length field, to be tested
+ * as follows:
+ * 1) Bits 24-31 and 16-23 contain identical legal EOF values (the
+ * list of legal EOF values is in the FC Frame Encapsulation
+ * [21]); and
+ * 2) Bits 8-15 and 0-7 contain the ones complement of the EOF
+ * value found in bits 24-31.
+ *
+ * As per the iFCP standard, in addition, at least 3 of the following
+ * set of tests must be performed to identify that we've located the
+ * start of an iFCP frame.
+ * a) Protocol# ones complement field (1 test);
+ * b) Version ones complement field (1 test);
+ * c) Replication of encapsulation word 0 in word 1 (1 test);
+ * d) Reserved field and its ones complement (2 tests);
+ * e) Flags field and its ones complement (2 tests);
+ * f) CRC field is equal to zero (1 test); (DON'T DO THIS TEST!)
+ * g) SOF fields and ones complement fields (4 tests);
+ * h) Format and values of FC header (1 test);
+ * i) CRC of FC Frame (2 tests);
+ * j) FC Frame Encapsulation header information in the next iFCP Frame
+ * (1 test).
+ *
+ * At least 3 of the 16 tests listed above SHALL be performed. Failure
+ * of any of the above tests actually performed SHALL indicate an
+ * encapsulation error and the FC Frame SHALL NOT be forwarded on to
+ * the FC Entity.
+ */
+
+
+ /*
+ * Tests a, b and c
+ */
+ if(tvb_memeql(tvb, offset, ifcp_header_4_bytes, 4) != 0){
+ return FALSE;
}
- /* check the frame length */
- flen=tvb_get_ntohs(tvb, offset+12)&0x03FF;
- if((flen < 15) || (flen > 545)){
- return FALSE;
- }
+ /* check the frame length */
+ flen=tvb_get_ntohs(tvb, offset+12)&0x03FF;
+ if((flen < 15) || (flen > 545)){
+ return FALSE;
+ }
- /* check the complement of the frame length */
- flen1=tvb_get_ntohs(tvb, offset+14)&0x03FF;
- if(flen!=((~flen1)&0x03FF)){
- return FALSE;
- }
+ /* check the complement of the frame length */
+ flen1=tvb_get_ntohs(tvb, offset+14)&0x03FF;
+ if(flen!=((~flen1)&0x03FF)){
+ return FALSE;
+ }
- /* this should be good enough for our heuristics */
- return TRUE;
+ /* this should be good enough for our heuristics */
+ return TRUE;
}
-#define IFCP_FLAGS_SES 0x04
-#define IFCP_FLAGS_TRP 0x02
-#define IFCP_FLAGS_SPC 0x01
+#define IFCP_FLAGS_SES 0x04
+#define IFCP_FLAGS_TRP 0x02
+#define IFCP_FLAGS_SPC 0x01
static const true_false_string ifcp_flags_ses_tfs = {
- "This is a SESSION CONTROL FRAME",
- "This is a normal frame"
+ "This is a SESSION CONTROL FRAME",
+ "This is a normal frame"
};
static const true_false_string ifcp_flags_trp_tfs = {
- "Address TRANSPARENT Mode Enabled",
- "Address TRANSLATION Mode Enabled"
+ "Address TRANSPARENT Mode Enabled",
+ "Address TRANSLATION Mode Enabled"
};
static const true_false_string ifcp_flags_spc_tfs = {
- "This frame requires SPECIAL PROCESSING",
- "This is a normal frame"
+ "This frame requires SPECIAL PROCESSING",
+ "This is a normal frame"
};
static int
dissect_ifcpflags(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
{
- proto_item *item;
- proto_tree *tree;
- guint8 flags;
-
- item=proto_tree_add_item(parent_tree, hf_ifcp_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
- tree=proto_item_add_subtree (item, ett_ifcp_flags);
-
- flags=tvb_get_guint8(tvb, offset);
-
- /* SES */
- proto_tree_add_boolean(tree, hf_ifcp_flags_ses, tvb, offset, 1, flags);
- if(flags&IFCP_FLAGS_SES){
- proto_item_append_text(item, " SES");
- }
- flags&=(~IFCP_FLAGS_SES);
-
- /* TRP */
- proto_tree_add_boolean(tree, hf_ifcp_flags_trp, tvb, offset, 1, flags);
- if(flags&IFCP_FLAGS_TRP){
- proto_item_append_text(item, " TRP");
- }
- flags&=(~IFCP_FLAGS_TRP);
-
- /* SPC */
- proto_tree_add_boolean(tree, hf_ifcp_flags_spc, tvb, offset, 1, flags);
- if(flags&IFCP_FLAGS_SPC){
- proto_item_append_text(item, " SPC");
- }
-
-
- offset++;
- return offset;
+ proto_item *item;
+ proto_tree *tree;
+ guint8 flags;
+
+ item=proto_tree_add_item(parent_tree, hf_ifcp_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
+ tree=proto_item_add_subtree (item, ett_ifcp_flags);
+
+ flags=tvb_get_guint8(tvb, offset);
+
+ /* SES */
+ proto_tree_add_boolean(tree, hf_ifcp_flags_ses, tvb, offset, 1, flags);
+ if(flags&IFCP_FLAGS_SES){
+ proto_item_append_text(item, " SES");
+ }
+ flags&=(~IFCP_FLAGS_SES);
+
+ /* TRP */
+ proto_tree_add_boolean(tree, hf_ifcp_flags_trp, tvb, offset, 1, flags);
+ if(flags&IFCP_FLAGS_TRP){
+ proto_item_append_text(item, " TRP");
+ }
+ flags&=(~IFCP_FLAGS_TRP);
+
+ /* SPC */
+ proto_tree_add_boolean(tree, hf_ifcp_flags_spc, tvb, offset, 1, flags);
+ if(flags&IFCP_FLAGS_SPC){
+ proto_item_append_text(item, " SPC");
+ }
+
+
+ offset++;
+ return offset;
}
-#define IFCP_COMMON_FLAGS_CRCV 0x04
+#define IFCP_COMMON_FLAGS_CRCV 0x04
static const true_false_string ifcp_common_flags_crcv_tfs = {
- "CRC is VALID",
- "Crc is NOT valid"
+ "CRC is VALID",
+ "Crc is NOT valid"
};
static void
dissect_commonflags(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
{
- proto_item *item;
- proto_tree *tree;
- guint8 flags;
+ proto_item *item;
+ proto_tree *tree;
+ guint8 flags;
- item=proto_tree_add_item(parent_tree, hf_ifcp_common_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
- tree=proto_item_add_subtree (item, ett_ifcp_common_flags);
+ item=proto_tree_add_item(parent_tree, hf_ifcp_common_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
+ tree=proto_item_add_subtree (item, ett_ifcp_common_flags);
- flags=tvb_get_guint8(tvb, offset);
+ flags=tvb_get_guint8(tvb, offset);
- /* CRCV */
- proto_tree_add_boolean(tree, hf_ifcp_common_flags_crcv, tvb, offset, 1, flags);
- if(flags&IFCP_COMMON_FLAGS_CRCV){
- proto_item_append_text(item, " CRCV");
- }
+ /* CRCV */
+ proto_tree_add_boolean(tree, hf_ifcp_common_flags_crcv, tvb, offset, 1, flags);
+ if(flags&IFCP_COMMON_FLAGS_CRCV){
+ proto_item_append_text(item, " CRCV");
+ }
}
static int
dissect_ifcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
{
- gint offset = 0, frame_len = 0;
- guint8 sof = 0, eof = 0;
- proto_item *ti;
- proto_tree *tree = NULL;
- tvbuff_t *next_tvb;
- guint8 protocol;
- proto_tree *protocol_tree=NULL;
- proto_tree *version_tree=NULL;
- proto_tree *frame_len_tree=NULL;
- proto_tree *sof_tree=NULL;
- proto_tree *eof_tree=NULL;
- fc_data_t fc_data;
+ gint offset = 0, frame_len = 0;
+ guint8 sof = 0, eof = 0;
+ proto_item *ti;
+ proto_tree *tree = NULL;
+ tvbuff_t *next_tvb;
+ guint8 protocol;
+ proto_tree *protocol_tree = NULL;
+ proto_tree *version_tree = NULL;
+ proto_tree *frame_len_tree = NULL;
+ proto_tree *sof_tree = NULL;
+ proto_tree *eof_tree = NULL;
+ fc_data_t fc_data;
- /* verify we have a full header (do we need to do this? */
- if(tvb_length(tvb)<iFCP_ENCAP_HEADER_LEN){
- return 0;
- }
+ /* verify we have a full header (do we need to do this? */
+ if(tvb_length(tvb)<iFCP_ENCAP_HEADER_LEN){
+ return 0;
+ }
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "iFCP");
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "iFCP");
- frame_len = (tvb_get_ntohs (tvb, offset+12) & 0x03FF)*4;
+ frame_len = (tvb_get_ntohs (tvb, offset+12) & 0x03FF)*4;
if (parent_tree) {
@@ -358,152 +358,152 @@ dissect_ifcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi
- /* The Common FC Encap header */
- /* protocol */
- protocol = tvb_get_guint8 (tvb, offset);
- ti=proto_tree_add_item(tree, hf_ifcp_protocol, tvb, offset, 1, ENC_BIG_ENDIAN);
- protocol_tree=proto_item_add_subtree(ti, ett_ifcp_protocol);
-
- offset++;
-
- /* version */
- ti=proto_tree_add_item(tree, hf_ifcp_version, tvb, offset, 1, ENC_BIG_ENDIAN);
- version_tree=proto_item_add_subtree(ti, ett_ifcp_version);
- offset++;
-
- /* protocol complement */
- proto_tree_add_item(protocol_tree, hf_ifcp_protocol_c, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- /* version complement */
- proto_tree_add_item(version_tree, hf_ifcp_version_c, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- /* 4 reserved bytes */
- offset+=4;
-
- /* iFCP specific fields */
- if(protocol==FCENCAP_PROTO_iFCP){
- /* LS_COMMAND_ACC */
- proto_tree_add_item(tree, hf_ifcp_ls_command_acc, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- /* iFCP Flags */
- offset=dissect_ifcpflags(tvb, offset, tree);
-
- /* SOF */
- ti=proto_tree_add_item(tree, hf_ifcp_sof, tvb, offset, 1, ENC_BIG_ENDIAN);
- sof_tree=proto_item_add_subtree(ti, ett_ifcp_sof);
- offset++;
-
- /* EOF */
- ti=proto_tree_add_item(tree, hf_ifcp_eof, tvb, offset, 1, ENC_BIG_ENDIAN);
- eof_tree=proto_item_add_subtree(ti, ett_ifcp_eof);
- offset++;
- } else {
- offset+=4;
- sof_tree=tree; /* better than nothing */
- eof_tree=tree;
- }
-
- /* Common Flags */
- dissect_commonflags(tvb, offset, tree);
-
- /* frame len */
- ti=proto_tree_add_item(tree, hf_ifcp_framelen, tvb, offset, 2, ENC_BIG_ENDIAN);
- frame_len_tree=proto_item_add_subtree(ti, ett_ifcp_frame_len);
- offset+=2;
-
- /* complement of flags and frame len */
- proto_tree_add_item(frame_len_tree, hf_ifcp_encap_flags_c, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(frame_len_tree, hf_ifcp_framelen_c, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset+=2;
-
- /* timestamp seconds */
- proto_tree_add_item(tree, hf_ifcp_tsec, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset+=4;
-
- /* timestamp fractions */
- proto_tree_add_item(tree, hf_ifcp_tusec, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset+=4;
-
- /* crc */
- proto_tree_add_item(tree, hf_ifcp_encap_crc, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset+=4;
-
-
- /* FC SOF/-SOF */
- proto_tree_add_item(sof_tree, hf_ifcp_sof, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(sof_tree, hf_ifcp_sof, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(sof_tree, hf_ifcp_sof_c, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
- proto_tree_add_item(sof_tree, hf_ifcp_sof_c, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset++;
-
- /* FC EOF/-EOF */
- if(tvb_bytes_exist(tvb, frame_len-4, 4)) {
- proto_tree_add_item(eof_tree, hf_ifcp_eof, tvb, frame_len-4, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(eof_tree, hf_ifcp_eof, tvb, frame_len-3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(eof_tree, hf_ifcp_eof_c, tvb, frame_len-2, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(eof_tree, hf_ifcp_eof_c, tvb, frame_len-1, 1, ENC_BIG_ENDIAN);
+ /* The Common FC Encap header */
+ /* protocol */
+ protocol = tvb_get_guint8 (tvb, offset);
+ ti=proto_tree_add_item(tree, hf_ifcp_protocol, tvb, offset, 1, ENC_BIG_ENDIAN);
+ protocol_tree=proto_item_add_subtree(ti, ett_ifcp_protocol);
+
+ offset++;
+
+ /* version */
+ ti=proto_tree_add_item(tree, hf_ifcp_version, tvb, offset, 1, ENC_BIG_ENDIAN);
+ version_tree=proto_item_add_subtree(ti, ett_ifcp_version);
+ offset++;
+
+ /* protocol complement */
+ proto_tree_add_item(protocol_tree, hf_ifcp_protocol_c, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ /* version complement */
+ proto_tree_add_item(version_tree, hf_ifcp_version_c, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ /* 4 reserved bytes */
+ offset+=4;
+
+ /* iFCP specific fields */
+ if(protocol==FCENCAP_PROTO_iFCP){
+ /* LS_COMMAND_ACC */
+ proto_tree_add_item(tree, hf_ifcp_ls_command_acc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ /* iFCP Flags */
+ offset=dissect_ifcpflags(tvb, offset, tree);
+
+ /* SOF */
+ ti=proto_tree_add_item(tree, hf_ifcp_sof, tvb, offset, 1, ENC_BIG_ENDIAN);
+ sof_tree=proto_item_add_subtree(ti, ett_ifcp_sof);
+ offset++;
+
+ /* EOF */
+ ti=proto_tree_add_item(tree, hf_ifcp_eof, tvb, offset, 1, ENC_BIG_ENDIAN);
+ eof_tree=proto_item_add_subtree(ti, ett_ifcp_eof);
+ offset++;
+ } else {
+ offset+=4;
+ sof_tree=tree; /* better than nothing */
+ eof_tree=tree;
+ }
+
+ /* Common Flags */
+ dissect_commonflags(tvb, offset, tree);
+
+ /* frame len */
+ ti=proto_tree_add_item(tree, hf_ifcp_framelen, tvb, offset, 2, ENC_BIG_ENDIAN);
+ frame_len_tree=proto_item_add_subtree(ti, ett_ifcp_frame_len);
+ offset+=2;
+
+ /* complement of flags and frame len */
+ proto_tree_add_item(frame_len_tree, hf_ifcp_encap_flags_c, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(frame_len_tree, hf_ifcp_framelen_c, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset+=2;
+
+ /* timestamp seconds */
+ proto_tree_add_item(tree, hf_ifcp_tsec, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset+=4;
+
+ /* timestamp fractions */
+ proto_tree_add_item(tree, hf_ifcp_tusec, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset+=4;
+
+ /* crc */
+ proto_tree_add_item(tree, hf_ifcp_encap_crc, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset+=4;
+
+
+ /* FC SOF/-SOF */
+ proto_tree_add_item(sof_tree, hf_ifcp_sof, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ proto_tree_add_item(sof_tree, hf_ifcp_sof, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ proto_tree_add_item(sof_tree, hf_ifcp_sof_c, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+ proto_tree_add_item(sof_tree, hf_ifcp_sof_c, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset++;
+
+ /* FC EOF/-EOF */
+ if(tvb_bytes_exist(tvb, frame_len-4, 4)) {
+ proto_tree_add_item(eof_tree, hf_ifcp_eof, tvb, frame_len-4, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(eof_tree, hf_ifcp_eof, tvb, frame_len-3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(eof_tree, hf_ifcp_eof_c, tvb, frame_len-2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(eof_tree, hf_ifcp_eof_c, tvb, frame_len-1, 1, ENC_BIG_ENDIAN);
}
- /* Call the FC Dissector if this is carrying an FC frame */
- /* Set the SOF/EOF flags in the packet_info header */
- fc_data.sof_eof = 0;
-
- switch(sof){
- case iFCP_SOFi3:
- case iFCP_SOFi2:
- case iFCP_SOFi4:
- fc_data.sof_eof = FC_DATA_SOF_FIRST_FRAME;
- break;
- case iFCP_SOFf:
- fc_data.sof_eof = FC_DATA_SOF_SOFF;
- break;
- default:
- if(sof){
- if (eof != iFCP_EOFn) {
- fc_data.sof_eof |= FC_DATA_EOF_LAST_FRAME;
- } else if (eof != iFCP_EOFt) {
- fc_data.sof_eof |= FC_DATA_EOF_INVALID;
- }
- }
- }
-
- next_tvb=tvb_new_subset_length(tvb, offset, frame_len-offset-4);
- fc_data.ethertype = 0;
-
- if(fc_handle){
- call_dissector_with_data(fc_handle, next_tvb, pinfo, parent_tree, &fc_data);
- } else if(data_handle){
- call_dissector(data_handle, next_tvb, pinfo, parent_tree);
- }
-
- return tvb_length(tvb);
+ /* Call the FC Dissector if this is carrying an FC frame */
+ /* Set the SOF/EOF flags in the packet_info header */
+ fc_data.sof_eof = 0;
+
+ switch(sof){
+ case iFCP_SOFi3:
+ case iFCP_SOFi2:
+ case iFCP_SOFi4:
+ fc_data.sof_eof = FC_DATA_SOF_FIRST_FRAME;
+ break;
+ case iFCP_SOFf:
+ fc_data.sof_eof = FC_DATA_SOF_SOFF;
+ break;
+ default:
+ if(sof){
+ if (eof != iFCP_EOFn) {
+ fc_data.sof_eof |= FC_DATA_EOF_LAST_FRAME;
+ } else if (eof != iFCP_EOFt) {
+ fc_data.sof_eof |= FC_DATA_EOF_INVALID;
+ }
+ }
+ }
+
+ next_tvb=tvb_new_subset_length(tvb, offset, frame_len-offset-4);
+ fc_data.ethertype = 0;
+
+ if(fc_handle){
+ call_dissector_with_data(fc_handle, next_tvb, pinfo, parent_tree, &fc_data);
+ } else if(data_handle){
+ call_dissector(data_handle, next_tvb, pinfo, parent_tree);
+ }
+
+ return tvb_length(tvb);
}
static guint
get_ifcp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
{
- guint pdu_len;
+ guint pdu_len;
- if(!ifcp_header_test(tvb, offset)){
- return 0;
- }
+ if(!ifcp_header_test(tvb, offset)){
+ return 0;
+ }
- pdu_len=(tvb_get_ntohs(tvb, offset+12)&0x03FF)*4;
- return pdu_len;
+ pdu_len=(tvb_get_ntohs(tvb, offset+12)&0x03FF)*4;
+ return pdu_len;
}
static int
dissect_ifcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data)
{
- tcp_dissect_pdus(tvb, pinfo, parent_tree, ifcp_desegment, iFCP_MIN_HEADER_LEN, get_ifcp_pdu_len, dissect_ifcp_pdu, data);
- return tvb_length(tvb);
+ tcp_dissect_pdus(tvb, pinfo, parent_tree, ifcp_desegment, iFCP_MIN_HEADER_LEN, get_ifcp_pdu_len, dissect_ifcp_pdu, data);
+ return tvb_length(tvb);
}
@@ -515,68 +515,68 @@ dissect_ifcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
static int
dissect_ifcp_handle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
- return dissect_ifcp(tvb, pinfo, tree, data);
+ return dissect_ifcp(tvb, pinfo, tree, data);
}
static gboolean
dissect_ifcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- if(!ifcp_header_test(tvb, 0)){
- return FALSE;
- }
+ if(!ifcp_header_test(tvb, 0)){
+ return FALSE;
+ }
- dissect_ifcp(tvb, pinfo, tree, data);
+ dissect_ifcp(tvb, pinfo, tree, data);
- /* our heuristics are so strong that if the heuristics above passed
- * and the dissection of the pdu did not cause any exceptions
- * then we can set this as our conversation dissector
- */
- if(ifcp_handle){
- conversation_t* ifcp_conv;
+ /* our heuristics are so strong that if the heuristics above passed
+ * and the dissection of the pdu did not cause any exceptions
+ * then we can set this as our conversation dissector
+ */
+ if(ifcp_handle){
+ conversation_t* ifcp_conv;
- ifcp_conv=find_or_create_conversation(pinfo);
- /* XXX why does this not work? it doesn't result in dissect_ifcp_handle being called look into later*/
- conversation_set_dissector(ifcp_conv, ifcp_handle);
- }
+ ifcp_conv=find_or_create_conversation(pinfo);
+ /* XXX why does this not work? it doesn't result in dissect_ifcp_handle being called look into later*/
+ conversation_set_dissector(ifcp_conv, ifcp_handle);
+ }
- return TRUE;
+ return TRUE;
}
void
proto_register_ifcp (void)
{
-
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_ifcp_protocol,
- { "Protocol", "ifcp.encap.proto", FT_UINT8, BASE_DEC,
- VALS(fcencap_proto_vals), 0, NULL, HFILL }},
+ {"Protocol", "ifcp.encap.proto", FT_UINT8, BASE_DEC, VALS(fcencap_proto_vals), 0,
+ NULL, HFILL }},
{ &hf_ifcp_protocol_c,
- {"Protocol (1's Complement)", "ifcp.encap.protoc", FT_UINT8, BASE_DEC, NULL,
- 0, NULL, HFILL}},
+ {"Protocol (1's Complement)", "ifcp.encap.protoc", FT_UINT8, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
{ &hf_ifcp_version,
- {"Version", "ifcp.encap.version", FT_UINT8, BASE_DEC, NULL, 0, NULL,
- HFILL}},
+ {"Version", "ifcp.encap.version", FT_UINT8, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
{ &hf_ifcp_version_c,
- {"Version (1's Complement)", "ifcp.encap.versionc", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL}},
+ {"Version (1's Complement)", "ifcp.encap.versionc", FT_UINT8, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
{ &hf_ifcp_encap_flags_c,
- {"iFCP Encapsulation Flags (1's Complement)", "ifcp.encap_flagsc", FT_UINT8, BASE_HEX,
- NULL, 0xFC, NULL, HFILL}},
+ {"iFCP Encapsulation Flags (1's Complement)", "ifcp.encap_flagsc", FT_UINT8, BASE_HEX, NULL, 0xFC,
+ NULL, HFILL}},
{ &hf_ifcp_framelen,
- {"Frame Length (in Words)", "ifcp.encap.framelen", FT_UINT16, BASE_DEC,
- NULL, 0x03FF, NULL, HFILL}},
+ {"Frame Length (in Words)", "ifcp.encap.framelen", FT_UINT16, BASE_DEC, NULL, 0x03FF,
+ NULL, HFILL}},
{ &hf_ifcp_framelen_c,
- {"Frame Length (1's Complement)", "ifcp.encap.framelenc", FT_UINT16,
- BASE_DEC, NULL, 0x03FF, NULL, HFILL}},
+ {"Frame Length (1's Complement)", "ifcp.encap.framelenc", FT_UINT16, BASE_DEC, NULL, 0x03FF,
+ NULL, HFILL}},
{ &hf_ifcp_tsec,
- {"Time (secs)", "ifcp.encap.tsec", FT_UINT32, BASE_DEC, NULL, 0, NULL,
- HFILL}},
+ {"Time (secs)", "ifcp.encap.tsec", FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL}},
{ &hf_ifcp_tusec,
{"Time (fraction)", "ifcp.encap.tusec", FT_UINT32, BASE_DEC, NULL, 0,
NULL, HFILL}},
{ &hf_ifcp_encap_crc,
- {"CRC", "ifcp.encap.crc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL}},
+ {"CRC", "ifcp.encap.crc", FT_UINT32, BASE_HEX, NULL, 0,
+ NULL, HFILL}},
{ &hf_ifcp_sof,
{"SOF", "ifcp.sof", FT_UINT8, BASE_HEX, VALS (ifcp_sof_vals), 0,
NULL, HFILL}},
@@ -593,17 +593,23 @@ proto_register_ifcp (void)
{"Ls Command Acc", "ifcp.ls_command_acc", FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL}},
{ &hf_ifcp_common_flags,
- {"Flags", "ifcp.common_flags", FT_UINT8, BASE_HEX , NULL, 0xfc, NULL, HFILL }},
+ {"Flags", "ifcp.common_flags", FT_UINT8, BASE_HEX , NULL, 0xfc,
+ NULL, HFILL }},
{ &hf_ifcp_common_flags_crcv,
- {"CRCV", "ifcp.common_flags.crcv", FT_BOOLEAN, 8, TFS(&ifcp_common_flags_crcv_tfs), IFCP_COMMON_FLAGS_CRCV, "Is the CRC field valid?", HFILL }},
+ {"CRCV", "ifcp.common_flags.crcv", FT_BOOLEAN, 8, TFS(&ifcp_common_flags_crcv_tfs), IFCP_COMMON_FLAGS_CRCV,
+ "Is the CRC field valid?", HFILL }},
{ &hf_ifcp_flags,
- {"iFCP Flags", "ifcp.flags", FT_UINT8, BASE_HEX , NULL, 0, NULL, HFILL }},
+ {"iFCP Flags", "ifcp.flags", FT_UINT8, BASE_HEX , NULL, 0,
+ NULL, HFILL }},
{ &hf_ifcp_flags_ses,
- {"SES", "ifcp.flags.ses", FT_BOOLEAN, 8, TFS(&ifcp_flags_ses_tfs), IFCP_FLAGS_SES, "Is this a Session control frame", HFILL }},
+ {"SES", "ifcp.flags.ses", FT_BOOLEAN, 8, TFS(&ifcp_flags_ses_tfs), IFCP_FLAGS_SES,
+ "Is this a Session control frame", HFILL }},
{ &hf_ifcp_flags_trp,
- {"TRP", "ifcp.flags.trp", FT_BOOLEAN, 8, TFS(&ifcp_flags_trp_tfs), IFCP_FLAGS_TRP, "Is address transparent mode enabled", HFILL }},
+ {"TRP", "ifcp.flags.trp", FT_BOOLEAN, 8, TFS(&ifcp_flags_trp_tfs), IFCP_FLAGS_TRP,
+ "Is address transparent mode enabled", HFILL }},
{ &hf_ifcp_flags_spc,
- {"SPC", "ifcp.flags.spc", FT_BOOLEAN, 8, TFS(&ifcp_flags_spc_tfs), IFCP_FLAGS_SPC, "Is frame part of link service", HFILL }},
+ {"SPC", "ifcp.flags.spc", FT_BOOLEAN, 8, TFS(&ifcp_flags_spc_tfs), IFCP_FLAGS_SPC,
+ "Is frame part of link service", HFILL }},
};
static gint *ett[] = {
@@ -612,7 +618,7 @@ proto_register_ifcp (void)
&ett_ifcp_eof,
&ett_ifcp_protocol,
&ett_ifcp_version,
- &ett_ifcp_frame_len,
+ &ett_ifcp_frame_len,
&ett_ifcp_flags,
&ett_ifcp_common_flags,
};
@@ -622,8 +628,6 @@ proto_register_ifcp (void)
/* Register the protocol name and description */
proto_ifcp = proto_register_protocol("iFCP", "iFCP", "ifcp");
- /* Required function calls to register the header fields and
- * subtrees used */
proto_register_field_array(proto_ifcp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -637,16 +641,6 @@ proto_register_ifcp (void)
prefs_register_obsolete_preference(ifcp_module, "target_port");
}
-
-/*
- * If this dissector uses sub-dissector registration add a
- * registration routine.
- */
-
-/*
- * This format is required because a script is used to find these
- * routines and create the code that calls these routines.
- */
void
proto_reg_handoff_ifcp (void)
{
@@ -658,3 +652,16 @@ proto_reg_handoff_ifcp (void)
data_handle = find_dissector("data");
fc_handle = find_dissector("fc_ifcp");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-ipvs-syncd.c b/epan/dissectors/packet-ipvs-syncd.c
index 7b389a149f..c61988becd 100644
--- a/epan/dissectors/packet-ipvs-syncd.c
+++ b/epan/dissectors/packet-ipvs-syncd.c
@@ -97,10 +97,10 @@ static const value_string state_strings[] = {
#define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */
static const value_string connection_type_strings[] = {
- {IP_VS_CONN_F_MASQ, "Masquerade"},
+ {IP_VS_CONN_F_MASQ, "Masquerade"},
{IP_VS_CONN_F_LOCALNODE, "Local Node"},
- {IP_VS_CONN_F_TUNNEL, "Tunnel"},
- {IP_VS_CONN_F_DROUTE, "Direct Routing"},
+ {IP_VS_CONN_F_TUNNEL, "Tunnel"},
+ {IP_VS_CONN_F_DROUTE, "Direct Routing"},
{0x00, NULL},
};
@@ -110,9 +110,9 @@ dissect_ipvs_syncd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
proto_tree *tree;
proto_item *item;
- int offset = 0;
- guint8 cnt = 0;
- int conn = 0;
+ int offset = 0;
+ guint8 cnt = 0;
+ int conn = 0;
item = proto_tree_add_item(parent_tree, proto_ipvs_syncd, tvb, offset, -1, ENC_NA);
tree = proto_item_add_subtree(item, ett_ipvs_syncd);
@@ -138,7 +138,7 @@ dissect_ipvs_syncd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
guint16 flags;
ctree = proto_tree_add_subtree_format(tree, tvb, offset, 24, ett_conn, NULL,
- "Connection #%d", conn+1);
+ "Connection #%d", conn+1);
proto_tree_add_item(ctree, hf_resv8, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -337,3 +337,16 @@ proto_reg_handoff_ipvs_syncd(void)
ipvs_syncd_handle = create_dissector_handle(dissect_ipvs_syncd, proto_ipvs_syncd);
dissector_add_uint("udp.port", IPVS_SYNCD_PORT, ipvs_syncd_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-ipxwan.c b/epan/dissectors/packet-ipxwan.c
index 34e9daa4d7..64cddce0de 100644
--- a/epan/dissectors/packet-ipxwan.c
+++ b/epan/dissectors/packet-ipxwan.c
@@ -159,7 +159,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
val_to_str(packet_type, ipxwan_packet_type_vals,
"Unknown packet type %u"));
- if (tree) {
+ if (tree) {
proto_tree_add_uint(ipxwan_tree, hf_ipxwan_packet_type, tvb,
offset, 1, packet_type);
offset += 1;
@@ -463,3 +463,16 @@ proto_reg_handoff_ipxwan(void)
proto_ipxwan);
dissector_add_uint("ipx.socket", IPX_SOCKET_IPXWAN, ipxwan_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-isdn.c b/epan/dissectors/packet-isdn.c
index 504365728f..26d6af8fb5 100644
--- a/epan/dissectors/packet-isdn.c
+++ b/epan/dissectors/packet-isdn.c
@@ -44,9 +44,9 @@ static gint ett_isdn = -1;
#define DCHANNEL_DPNSS 1 /* DPNSS link layer */
static const enum_val_t dchannel_protocol_options[] = {
- { "lapd", "LAPD", DCHANNEL_LAPD },
- { "DPNSS", "DPNSS", DCHANNEL_DPNSS },
- { NULL, NULL, 0 }
+ { "lapd", "LAPD", DCHANNEL_LAPD },
+ { "DPNSS", "DPNSS", DCHANNEL_DPNSS },
+ { NULL, NULL, 0 }
};
static int dchannel_protocol = DCHANNEL_LAPD;
@@ -58,16 +58,16 @@ static dissector_handle_t v120_handle;
static dissector_handle_t data_handle;
static const value_string channel_vals[] = {
- { 0, "D" },
- { 1, "B1" },
- { 2, "B2" },
- { 3, "B3" },
- { 4, "B4" },
- { 5, "B5" },
- { 6, "B6" },
- { 7, "B7" },
- { 8, "B8" },
- { 9, "B9" },
+ { 0, "D" },
+ { 1, "B1" },
+ { 2, "B2" },
+ { 3, "B3" },
+ { 4, "B4" },
+ { 5, "B5" },
+ { 6, "B6" },
+ { 7, "B7" },
+ { 8, "B8" },
+ { 9, "B9" },
{ 10, "B10" },
{ 11, "B11" },
{ 12, "B12" },
@@ -248,3 +248,16 @@ proto_reg_handoff_isdn(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_ISDN, isdn_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-itdm.c b/epan/dissectors/packet-itdm.c
index 679adbc2e7..afb2224041 100644
--- a/epan/dissectors/packet-itdm.c
+++ b/epan/dissectors/packet-itdm.c
@@ -97,82 +97,82 @@ static dissector_handle_t data_handle;
#define ITDM_CTL_CMD_AFI_REQ 1
static const value_string sop_eop_vals[] = {
- { 0x0, "Middle of Packet" },
- { 0x1, "End of Packet" },
- { 0x2, "Start of Packet" },
- { 0x3, "Complete Packet" },
- { 0, NULL }
+ { 0x0, "Middle of Packet" },
+ { 0x1, "End of Packet" },
+ { 0x2, "Start of Packet" },
+ { 0x3, "Complete Packet" },
+ { 0, NULL }
};
static const true_false_string ack_tfs = {
- "Acknowledging a command from remote node",
- "Normal Command"
+ "Acknowledging a command from remote node",
+ "Normal Command"
};
static const value_string chcmd_vals[] = {
- { 0x0, "Reserved" },
- { 0x1, "New Channel ID" },
- { 0x2, "Close Channel ID" },
- { 0x3, "Relocate Channel ID" },
- { 0x4, "Cyclic Reaffirmation" },
- { 0x5, "Packet Rate Integrity Check" },
- { 0x6, "Reserved" },
- { 0x7, "Reserved" },
- { 0x8, "Reserved" },
- { 0x9, "Reserved" },
- { 0xa, "Reserved" },
- { 0xb, "Reserved" },
- { 0xc, "Reserved" },
- { 0xd, "Reserved" },
- { 0xe, "Reserved" },
- { 0xf, "Reserved" },
- { 0, NULL }
+ { 0x0, "Reserved" },
+ { 0x1, "New Channel ID" },
+ { 0x2, "Close Channel ID" },
+ { 0x3, "Relocate Channel ID" },
+ { 0x4, "Cyclic Reaffirmation" },
+ { 0x5, "Packet Rate Integrity Check" },
+ { 0x6, "Reserved" },
+ { 0x7, "Reserved" },
+ { 0x8, "Reserved" },
+ { 0x9, "Reserved" },
+ { 0xa, "Reserved" },
+ { 0xb, "Reserved" },
+ { 0xc, "Reserved" },
+ { 0xd, "Reserved" },
+ { 0xe, "Reserved" },
+ { 0xf, "Reserved" },
+ { 0, NULL }
};
static const value_string itdm_ctl_command_vals[] = {
- { 0x0, "Not Used" },
- { 0x1, "AFI_REQ: Alloc Flow ID Req" },
- { 0x2, "AFI_RSP: Alloc Flow ID Rsp - Req Accepted." },
- { 0x3, "DFI_REQ: Dealloc Flow ID Req" },
- { 0x4, "DFI_RSP: Dealloc Flow ID Rsp - Req Accepted." },
-
- { 0x10, "AFI_RSP: Reject: Data Mode Field value Not Supported." },
- { 0x11, "AFI_RSP: Reject: Explicit Multi-timeslot value Not Supported." },
- { 0x12, "AFI_RSP: Reject: Packet Rate value Not Supported." },
- { 0x13, "AFI_RSP: Reject: Checksum Invalid." },
- { 0x14, "AFI_RSP: Reject: No more flows available." },
-
- { 0x20, "DFI_RSP: Reject: Data Mode Field value does not match Flow ID." },
- { 0x21, "DFI_RSP: Reject: Explicit Multi-timeslots value does not match." },
- { 0x22, "DFI_RSP: Reject: Packet Rate value does not match." },
- { 0x23, "DFI_RSP: Reject: Checksum Invalid." },
- { 0x24, "DFI_RSP: Reject: Flow ID invalid (out of range)." },
- { 0x25, "DFI_RSP: Reject: Flow ID not currently allocated." },
- { 0x26, "DFI_RSP: Reject: Other Flow ID in pair has active connections." },
- { 0, NULL }
+ { 0x0, "Not Used" },
+ { 0x1, "AFI_REQ: Alloc Flow ID Req" },
+ { 0x2, "AFI_RSP: Alloc Flow ID Rsp - Req Accepted." },
+ { 0x3, "DFI_REQ: Dealloc Flow ID Req" },
+ { 0x4, "DFI_RSP: Dealloc Flow ID Rsp - Req Accepted." },
+
+ { 0x10, "AFI_RSP: Reject: Data Mode Field value Not Supported." },
+ { 0x11, "AFI_RSP: Reject: Explicit Multi-timeslot value Not Supported." },
+ { 0x12, "AFI_RSP: Reject: Packet Rate value Not Supported." },
+ { 0x13, "AFI_RSP: Reject: Checksum Invalid." },
+ { 0x14, "AFI_RSP: Reject: No more flows available." },
+
+ { 0x20, "DFI_RSP: Reject: Data Mode Field value does not match Flow ID." },
+ { 0x21, "DFI_RSP: Reject: Explicit Multi-timeslots value does not match." },
+ { 0x22, "DFI_RSP: Reject: Packet Rate value does not match." },
+ { 0x23, "DFI_RSP: Reject: Checksum Invalid." },
+ { 0x24, "DFI_RSP: Reject: Flow ID invalid (out of range)." },
+ { 0x25, "DFI_RSP: Reject: Flow ID not currently allocated." },
+ { 0x26, "DFI_RSP: Reject: Other Flow ID in pair has active connections." },
+ { 0, NULL }
};
static const value_string itdm_ctl_data_mode_vals[] = {
- { 0, "Not Used." },
- { 1, "I-TDM 1ms Data Mode." },
- { 2, "I-TDM 125usec Data Mode." },
- { 3, "I-TDM Explicit Multi-timeslot Data Mode." },
- { 4, "I-TDM CAS Signaling Data Mode." },
- { 0, NULL }
+ { 0, "Not Used." },
+ { 1, "I-TDM 1ms Data Mode." },
+ { 2, "I-TDM 125usec Data Mode." },
+ { 3, "I-TDM Explicit Multi-timeslot Data Mode." },
+ { 4, "I-TDM CAS Signaling Data Mode." },
+ { 0, NULL }
};
static const value_string itdm_ctl_pktrate_vals[] = {
- { 0x447A0000, "I-TDM 1ms Data Mode." },
- { 0x45FA0000, "I-TDM 125usec/EMTS Data Mode." },
- { 0x43A6AAAB, "I-TDM T1 CAS Mode." },
- { 0x43FA0000, "I-TDM E1 CAS Mode." },
- { 0, NULL }
+ { 0x447A0000, "I-TDM 1ms Data Mode." },
+ { 0x45FA0000, "I-TDM 125usec/EMTS Data Mode." },
+ { 0x43A6AAAB, "I-TDM T1 CAS Mode." },
+ { 0x43FA0000, "I-TDM E1 CAS Mode." },
+ { 0, NULL }
};
static void
dissect_itdm_125usec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- tvbuff_t *next_tvb;
+ tvbuff_t *next_tvb;
proto_item *itdm_item = NULL;
proto_tree *itdm_tree = NULL;
int offset;
@@ -217,49 +217,49 @@ dissect_itdm_125usec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree)
{
- itdm_item = proto_tree_add_item(tree, proto_itdm, tvb, 0, -1, ENC_NA);
- itdm_tree = proto_item_add_subtree(itdm_item, ett_itdm);
-
- proto_tree_add_item(itdm_tree, hf_itdm_timestamp, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(itdm_tree, hf_itdm_seqnum, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
- proto_tree_add_item(itdm_tree, hf_itdm_sop_eop, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(itdm_tree, hf_itdm_last_pack, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(itdm_tree, hf_itdm_pktlen, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(itdm_tree, hf_itdm_chksum, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(itdm_tree, hf_itdm_uid, tvb, offset, 3, ENC_BIG_ENDIAN);
- offset += 3;
- proto_tree_add_item(itdm_tree, hf_itdm_ack, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(itdm_tree, hf_itdm_act, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(itdm_tree, hf_itdm_chcmd, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
- proto_tree_add_item(itdm_tree, hf_itdm_chid, tvb, offset, 3, ENC_BIG_ENDIAN);
- offset += 3;
- if (chcmd == ITDM_CMD_PACKET_RATE)
- {
- proto_tree_add_item(itdm_tree, hf_itdm_pktrate, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
- }
- else
- {
- proto_tree_add_item(itdm_tree, hf_itdm_chloc1, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- if (chcmd == ITDM_CMD_CYCLIC_REAF ||
- chcmd == ITDM_CMD_NEW_CHAN ||
- chcmd == ITDM_CMD_CLOSE_CHAN)
- {
- proto_tree_add_item(itdm_tree, hf_itdm_cxnsize, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- }
- else
- {
- proto_tree_add_item(itdm_tree, hf_itdm_chloc2, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- }
- }
+ itdm_item = proto_tree_add_item(tree, proto_itdm, tvb, 0, -1, ENC_NA);
+ itdm_tree = proto_item_add_subtree(itdm_item, ett_itdm);
+
+ proto_tree_add_item(itdm_tree, hf_itdm_timestamp, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(itdm_tree, hf_itdm_seqnum, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ proto_tree_add_item(itdm_tree, hf_itdm_sop_eop, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(itdm_tree, hf_itdm_last_pack, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(itdm_tree, hf_itdm_pktlen, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(itdm_tree, hf_itdm_chksum, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(itdm_tree, hf_itdm_uid, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+ proto_tree_add_item(itdm_tree, hf_itdm_ack, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(itdm_tree, hf_itdm_act, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(itdm_tree, hf_itdm_chcmd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ proto_tree_add_item(itdm_tree, hf_itdm_chid, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+ if (chcmd == ITDM_CMD_PACKET_RATE)
+ {
+ proto_tree_add_item(itdm_tree, hf_itdm_pktrate, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ }
+ else
+ {
+ proto_tree_add_item(itdm_tree, hf_itdm_chloc1, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ if (chcmd == ITDM_CMD_CYCLIC_REAF ||
+ chcmd == ITDM_CMD_NEW_CHAN ||
+ chcmd == ITDM_CMD_CLOSE_CHAN)
+ {
+ proto_tree_add_item(itdm_tree, hf_itdm_cxnsize, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
+ else
+ {
+ proto_tree_add_item(itdm_tree, hf_itdm_chloc2, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ }
+ }
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
@@ -269,7 +269,7 @@ dissect_itdm_125usec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_itdm_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- tvbuff_t *next_tvb;
+ tvbuff_t *next_tvb;
proto_item *itdm_ctl_item = NULL;
proto_tree *itdm_ctl_tree = NULL;
int offset;
@@ -309,48 +309,48 @@ dissect_itdm_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree)
{
- itdm_ctl_item = proto_tree_add_item(tree, proto_itdm, tvb, 0, -1, ENC_NA);
- itdm_ctl_tree = proto_item_add_subtree(itdm_ctl_item, ett_itdm_ctl);
-
- /* These eventually should go into a SFP.0 dissector... */
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_timestamp, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_seqnum, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_sop_eop, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_last_pack, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_pktlen, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_chksum, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_uid, tvb, offset, 3, ENC_BIG_ENDIAN);
- offset += 3;
-
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_transid, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
-
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_command, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
- if (command != ITDM_CTL_CMD_AFI_REQ) {
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_flowid, tvb, offset, 3, ENC_BIG_ENDIAN);
- }
- offset += 3;
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_dm, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
- /* rsvd.. */
- offset += 1;
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_emts, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_pktrate, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
- if (command != ITDM_CTL_CMD_AFI_REQ) {
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_ptid, tvb, offset, 4, ENC_BIG_ENDIAN);
- }
- offset += 4;
- /* rsvd.. */
- offset += 2;
- proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_cksum, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ itdm_ctl_item = proto_tree_add_item(tree, proto_itdm, tvb, 0, -1, ENC_NA);
+ itdm_ctl_tree = proto_item_add_subtree(itdm_ctl_item, ett_itdm_ctl);
+
+ /* These eventually should go into a SFP.0 dissector... */
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_timestamp, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_seqnum, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_sop_eop, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_last_pack, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_pktlen, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_chksum, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_uid, tvb, offset, 3, ENC_BIG_ENDIAN);
+ offset += 3;
+
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_transid, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_command, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ if (command != ITDM_CTL_CMD_AFI_REQ) {
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_flowid, tvb, offset, 3, ENC_BIG_ENDIAN);
+ }
+ offset += 3;
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_dm, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ /* rsvd.. */
+ offset += 1;
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_emts, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_pktrate, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
+ if (command != ITDM_CTL_CMD_AFI_REQ) {
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_ptid, tvb, offset, 4, ENC_BIG_ENDIAN);
+ }
+ offset += 4;
+ /* rsvd.. */
+ offset += 2;
+ proto_tree_add_item(itdm_ctl_tree, hf_itdm_ctl_cksum, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
@@ -362,21 +362,21 @@ dissect_itdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint32 flowid;
- /* ZZZ for now, 125 usec mode and I-TDM control protocol
- * need to add 1ms mode */
- if (tvb_length(tvb) < 18)
- return;
-
- /* See if this packet is a data flow or the I-TDM control flow. */
- flowid = tvb_get_ntoh24(tvb, ITDM_FLOWID_OFFSET);
-
- /* gbl_ItdmCTLFlowNo is the configurable flow number where
- * the control protocol resides... Usually 0.
- */
- if (flowid == gbl_ItdmCTLFlowNo)
- dissect_itdm_control(tvb, pinfo, tree);
- else
- dissect_itdm_125usec(tvb, pinfo, tree);
+ /* ZZZ for now, 125 usec mode and I-TDM control protocol
+ * need to add 1ms mode */
+ if (tvb_length(tvb) < 18)
+ return;
+
+ /* See if this packet is a data flow or the I-TDM control flow. */
+ flowid = tvb_get_ntoh24(tvb, ITDM_FLOWID_OFFSET);
+
+ /* gbl_ItdmCTLFlowNo is the configurable flow number where
+ * the control protocol resides... Usually 0.
+ */
+ if (flowid == gbl_ItdmCTLFlowNo)
+ dissect_itdm_control(tvb, pinfo, tree);
+ else
+ dissect_itdm_125usec(tvb, pinfo, tree);
}
void
@@ -385,52 +385,52 @@ proto_register_itdm(void)
static hf_register_info hf[] = {
{ &hf_itdm_timestamp,{ "Timestamp", "itdm.timestamp",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_seqnum,{ "Sequence Number", "itdm.seqnum",
- FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_sop_eop,{ "Start/End of Packet", "itdm.sop_eop",
- FT_UINT8, BASE_DEC, VALS(sop_eop_vals), 0xc0, NULL, HFILL } },
+ FT_UINT8, BASE_DEC, VALS(sop_eop_vals), 0xc0, NULL, HFILL } },
{ &hf_itdm_last_pack,{ "Last Packet", "itdm.last_pack",
- FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x20, NULL, HFILL } },
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x20, NULL, HFILL } },
{ &hf_itdm_pktlen,{ "Packet Length", "itdm.pktlen",
- FT_UINT16, BASE_DEC, NULL, 0x07ff, NULL, HFILL } },
+ FT_UINT16, BASE_DEC, NULL, 0x07ff, NULL, HFILL } },
{ &hf_itdm_chksum,{ "Checksum", "itdm.chksum",
- FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_uid,{ "Flow ID", "itdm.uid",
- FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_ack,{ "ACK", "itdm.ack",
- FT_BOOLEAN, 8, TFS(&ack_tfs), 0x20, NULL, HFILL } },
+ FT_BOOLEAN, 8, TFS(&ack_tfs), 0x20, NULL, HFILL } },
{ &hf_itdm_act,{ "Activate", "itdm.act",
- FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x10, NULL, HFILL } },
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x10, NULL, HFILL } },
{ &hf_itdm_chcmd,{ "Channel Command", "itdm.chcmd",
- FT_UINT8, BASE_DEC, VALS(chcmd_vals), 0x0f, NULL, HFILL } },
+ FT_UINT8, BASE_DEC, VALS(chcmd_vals), 0x0f, NULL, HFILL } },
{ &hf_itdm_chid,{ "Channel ID", "itdm.chid",
- FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_chloc1,{ "Channel Location 1", "itdm.chloc1",
- FT_UINT16, BASE_DEC, NULL, 0x1ff, NULL, HFILL } },
+ FT_UINT16, BASE_DEC, NULL, 0x1ff, NULL, HFILL } },
{ &hf_itdm_chloc2,{ "Channel Location 2", "itdm.chloc2",
- FT_UINT16, BASE_DEC, NULL, 0x1ff, NULL, HFILL } },
+ FT_UINT16, BASE_DEC, NULL, 0x1ff, NULL, HFILL } },
{ &hf_itdm_pktrate,{ "IEEE 754 Packet Rate", "itdm.pktrate",
- FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_cxnsize, { "Connection Size", "itdm.cxnsize",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_ctl_transid, { "Transaction ID", "itdm.ctl_transid",
- FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_ctl_command, { "Control Command", "itdm.ctl_cmd",
- FT_UINT8, BASE_DEC, VALS(itdm_ctl_command_vals), 0x0, NULL, HFILL } },
+ FT_UINT8, BASE_DEC, VALS(itdm_ctl_command_vals), 0x0, NULL, HFILL } },
{ &hf_itdm_ctl_flowid, { "Allocated Flow ID", "itdm.ctl_flowid",
- FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_ctl_dm, { "I-TDM Data Mode", "itdm.ctl_dm",
- FT_UINT8, BASE_DEC, VALS(itdm_ctl_data_mode_vals), 0x0, NULL, HFILL } },
+ FT_UINT8, BASE_DEC, VALS(itdm_ctl_data_mode_vals), 0x0, NULL, HFILL } },
{ &hf_itdm_ctl_emts, { "I-TDM Explicit Multi-timeslot Size", "itdm.ctlemts",
- FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_ctl_pktrate, { "I-TDM Packet Rate", "itdm.ctl_pktrate",
- FT_UINT32, BASE_HEX, VALS(itdm_ctl_pktrate_vals), 0x0, NULL, HFILL } },
+ FT_UINT32, BASE_HEX, VALS(itdm_ctl_pktrate_vals), 0x0, NULL, HFILL } },
{ &hf_itdm_ctl_ptid, { "Paired Transaction ID", "itdm.ctl_ptid",
- FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
+ FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_itdm_ctl_cksum, { "ITDM Control Message Checksum", "itdm.ctl_cksum",
- FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }
+ FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }
};
static gint *ett[] = {
@@ -462,18 +462,31 @@ proto_register_itdm(void)
void
proto_reg_handoff_itdm(void)
{
- static gboolean Initialized=FALSE;
- static dissector_handle_t itdm_handle;
- static guint ItdmMPLSLabel;
-
- if (!Initialized) {
- itdm_handle = find_dissector("itdm");
- data_handle = find_dissector("data");
- Initialized=TRUE;
- } else {
- dissector_delete_uint("mpls.label", ItdmMPLSLabel, itdm_handle);
- }
-
- ItdmMPLSLabel = gbl_ItdmMPLSLabel;
- dissector_add_uint("mpls.label", gbl_ItdmMPLSLabel, itdm_handle);
+ static gboolean Initialized=FALSE;
+ static dissector_handle_t itdm_handle;
+ static guint ItdmMPLSLabel;
+
+ if (!Initialized) {
+ itdm_handle = find_dissector("itdm");
+ data_handle = find_dissector("data");
+ Initialized=TRUE;
+ } else {
+ dissector_delete_uint("mpls.label", ItdmMPLSLabel, itdm_handle);
+ }
+
+ ItdmMPLSLabel = gbl_ItdmMPLSLabel;
+ dissector_add_uint("mpls.label", gbl_ItdmMPLSLabel, itdm_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-jpeg.c b/epan/dissectors/packet-jpeg.c
index 34dd0483a2..3612d42349 100644
--- a/epan/dissectors/packet-jpeg.c
+++ b/epan/dissectors/packet-jpeg.c
@@ -308,3 +308,16 @@ proto_reg_handoff_jpeg(void)
{
dissector_add_uint("rtp.pt", PT_JPEG, jpeg_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-kerberos4.c b/epan/dissectors/packet-kerberos4.c
index ed2a424de4..c62c9d0cf9 100644
--- a/epan/dissectors/packet-kerberos4.c
+++ b/epan/dissectors/packet-kerberos4.c
@@ -113,7 +113,7 @@ static int
dissect_krb4_kdc_request(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, gboolean little_endian, int version)
{
nstime_t time_sec;
- guint8 lifetime;
+ guint8 lifetime;
if(version==TRANSARC_SPECIAL_VERSION){
proto_tree_add_item(tree, hf_krb4_unknown_transarc_blob, tvb, offset, 8, ENC_NA);
@@ -154,7 +154,7 @@ static int
dissect_krb4_kdc_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, gboolean little_endian)
{
nstime_t time_sec;
- guint32 length;
+ guint32 length;
/* Name */
offset=dissect_krb4_string(pinfo, hf_krb4_name, tree, tvb, offset);
@@ -200,9 +200,9 @@ dissect_krb4_kdc_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int
static int
dissect_krb4_appl_request(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, gboolean little_endian)
{
- guint8 tlen, rlen;
+ guint8 tlen, rlen;
nstime_t time_sec;
- guint8 lifetime;
+ guint8 lifetime;
/* kvno */
proto_tree_add_item(tree, hf_krb4_kvno, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -256,7 +256,7 @@ dissect_krb4_auth_msg_type(packet_info *pinfo, proto_tree *parent_tree, tvbuff_t
{
proto_tree *tree;
proto_item *item;
- guint8 auth_msg_type;
+ guint8 auth_msg_type;
auth_msg_type=tvb_get_guint8(tvb, offset);
item = proto_tree_add_item(parent_tree, hf_krb4_auth_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -284,8 +284,8 @@ dissect_krb4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
{
proto_tree *tree;
proto_item *item;
- guint8 version, opcode;
- int offset=0;
+ guint8 version, opcode;
+ int offset = 0;
/* this should better have the value 4 or it might be a weirdo
* Transarc AFS special unknown thing.
@@ -349,109 +349,122 @@ dissect_krb4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
void
proto_register_krb4(void)
{
- static hf_register_info hf[] = {
- { &hf_krb4_version,
- { "Version", "krb4.version",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Kerberos(v4) version number", HFILL }},
- { &hf_krb4_auth_msg_type,
- { "Msg Type", "krb4.auth_msg_type",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- "Message Type/Byte Order", HFILL }},
- { &hf_krb4_m_type,
- { "M Type", "krb4.m_type",
- FT_UINT8, BASE_HEX, VALS(m_type_vals), 0xfe,
- "Message Type", HFILL }},
- { &hf_krb4_byte_order,
- { "Byte Order", "krb4.byte_order",
- FT_UINT8, BASE_HEX, VALS(byte_order_vals), 0x01,
- NULL, HFILL }},
- { &hf_krb4_name,
- { "Name", "krb4.name",
- FT_STRINGZ, BASE_NONE, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_instance,
- { "Instance", "krb4.instance",
- FT_STRINGZ, BASE_NONE, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_realm,
- { "Realm", "krb4.realm",
- FT_STRINGZ, BASE_NONE, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_time_sec,
- { "Time Sec", "krb4.time_sec",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_exp_date,
- { "Exp Date", "krb4.exp_date",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_req_date,
- { "Req Date", "krb4.req_date",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_lifetime,
- { "Lifetime", "krb4.lifetime",
- FT_UINT8, BASE_DEC, NULL, 0x00,
- "Lifetime (in 5 min units)", HFILL }},
- { &hf_krb4_s_name,
- { "Service Name", "krb4.s_name",
- FT_STRINGZ, BASE_NONE, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_s_instance,
- { "Service Instance", "krb4.s_instance",
- FT_STRINGZ, BASE_NONE, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_kvno,
- { "Kvno", "krb4.kvno",
- FT_UINT8, BASE_DEC, NULL, 0x00,
- "Key Version No", HFILL }},
- { &hf_krb4_length,
- { "Length", "krb4.length",
- FT_UINT32, BASE_DEC, NULL, 0x00,
- "Length of encrypted blob", HFILL }},
- { &hf_krb4_ticket_length,
- { "Ticket Length", "krb4.ticket.length",
- FT_UINT8, BASE_DEC, NULL, 0x00,
- "Length of ticket", HFILL }},
- { &hf_krb4_request_length,
- { "Request Length", "krb4.request.length",
- FT_UINT8, BASE_DEC, NULL, 0x00,
- "Length of request", HFILL }},
- { &hf_krb4_ticket_blob,
- { "Ticket Blob", "krb4.ticket.blob",
- FT_BYTES, BASE_NONE, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_request_blob,
- { "Request Blob", "krb4.request.blob",
- FT_BYTES, BASE_NONE, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_encrypted_blob,
- { "Encrypted Blob", "krb4.encrypted_blob",
- FT_BYTES, BASE_NONE, NULL, 0x00,
- NULL, HFILL }},
- { &hf_krb4_unknown_transarc_blob,
- { "Unknown Transarc Blob", "krb4.unknown_transarc_blob",
- FT_BYTES, BASE_NONE, NULL, 0x00,
- "Unknown blob only present in Transarc packets", HFILL }},
- };
- static gint *ett[] = {
- &ett_krb4,
- &ett_krb4_auth_msg_type,
- };
-
- proto_krb4 = proto_register_protocol("Kerberos v4",
- "KRB4", "krb4");
- new_register_dissector("krb4", dissect_krb4, proto_krb4);
- proto_register_field_array(proto_krb4, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ static hf_register_info hf[] = {
+ { &hf_krb4_version,
+ { "Version", "krb4.version",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Kerberos(v4) version number", HFILL }},
+ { &hf_krb4_auth_msg_type,
+ { "Msg Type", "krb4.auth_msg_type",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ "Message Type/Byte Order", HFILL }},
+ { &hf_krb4_m_type,
+ { "M Type", "krb4.m_type",
+ FT_UINT8, BASE_HEX, VALS(m_type_vals), 0xfe,
+ "Message Type", HFILL }},
+ { &hf_krb4_byte_order,
+ { "Byte Order", "krb4.byte_order",
+ FT_UINT8, BASE_HEX, VALS(byte_order_vals), 0x01,
+ NULL, HFILL }},
+ { &hf_krb4_name,
+ { "Name", "krb4.name",
+ FT_STRINGZ, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_instance,
+ { "Instance", "krb4.instance",
+ FT_STRINGZ, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_realm,
+ { "Realm", "krb4.realm",
+ FT_STRINGZ, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_time_sec,
+ { "Time Sec", "krb4.time_sec",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_exp_date,
+ { "Exp Date", "krb4.exp_date",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_req_date,
+ { "Req Date", "krb4.req_date",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_lifetime,
+ { "Lifetime", "krb4.lifetime",
+ FT_UINT8, BASE_DEC, NULL, 0x00,
+ "Lifetime (in 5 min units)", HFILL }},
+ { &hf_krb4_s_name,
+ { "Service Name", "krb4.s_name",
+ FT_STRINGZ, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_s_instance,
+ { "Service Instance", "krb4.s_instance",
+ FT_STRINGZ, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_kvno,
+ { "Kvno", "krb4.kvno",
+ FT_UINT8, BASE_DEC, NULL, 0x00,
+ "Key Version No", HFILL }},
+ { &hf_krb4_length,
+ { "Length", "krb4.length",
+ FT_UINT32, BASE_DEC, NULL, 0x00,
+ "Length of encrypted blob", HFILL }},
+ { &hf_krb4_ticket_length,
+ { "Ticket Length", "krb4.ticket.length",
+ FT_UINT8, BASE_DEC, NULL, 0x00,
+ "Length of ticket", HFILL }},
+ { &hf_krb4_request_length,
+ { "Request Length", "krb4.request.length",
+ FT_UINT8, BASE_DEC, NULL, 0x00,
+ "Length of request", HFILL }},
+ { &hf_krb4_ticket_blob,
+ { "Ticket Blob", "krb4.ticket.blob",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_request_blob,
+ { "Request Blob", "krb4.request.blob",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_encrypted_blob,
+ { "Encrypted Blob", "krb4.encrypted_blob",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ NULL, HFILL }},
+ { &hf_krb4_unknown_transarc_blob,
+ { "Unknown Transarc Blob", "krb4.unknown_transarc_blob",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ "Unknown blob only present in Transarc packets", HFILL }},
+ };
+ static gint *ett[] = {
+ &ett_krb4,
+ &ett_krb4_auth_msg_type,
+ };
+
+ proto_krb4 = proto_register_protocol("Kerberos v4",
+ "KRB4", "krb4");
+ new_register_dissector("krb4", dissect_krb4, proto_krb4);
+ proto_register_field_array(proto_krb4, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_krb4(void)
{
- dissector_handle_t krb4_handle;
+ dissector_handle_t krb4_handle;
- krb4_handle = find_dissector("krb4");
- dissector_add_uint("udp.port", UDP_PORT_KRB4, krb4_handle);
+ krb4_handle = find_dissector("krb4");
+ dissector_add_uint("udp.port", UDP_PORT_KRB4, krb4_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-manolito.c b/epan/dissectors/packet-manolito.c
index 8c8cd67390..7227cdc215 100644
--- a/epan/dissectors/packet-manolito.c
+++ b/epan/dissectors/packet-manolito.c
@@ -95,13 +95,13 @@ dissect_manolito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* (that many bytes) data follows; else is raw data. */
do
{
- guint16 field_name; /* 16-bit field name */
- guint8 dtype; /* data-type */
- guint8 length; /* length */
- guint8* data; /* payload */
- int start; /* field starting location */
- char field_name_str[3]; /* printable name */
- const char* longname; /* human-friendly field name */
+ guint16 field_name; /* 16-bit field name */
+ guint8 dtype; /* data-type */
+ guint8 length; /* length */
+ guint8 *data; /* payload */
+ int start; /* field starting location */
+ char field_name_str[3]; /* printable name */
+ const char *longname; /* human-friendly field name */
start = offset;
@@ -130,27 +130,27 @@ dissect_manolito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Find the long name of the field */
switch(field_name)
{
- case 0x5346: longname = "Shared Files"; break; /* SF */
- case 0x534b: longname = "Shared Kilobytes";break; /* SK */
- case 0x4e49: longname = "Network ID"; break; /* NI */
- case 0x4e43: longname = "Num. Connections";break; /* NC */
- case 0x4356: longname = "Client Version"; break; /* CV */
- case 0x564c: longname = "Velocity"; break; /* VL */
- case 0x464e: longname = "Filename"; break; /* FN */
- case 0x464c: longname = "File Length"; break; /* FL */
- case 0x4252: longname = "Bit Rate"; break; /* BR */
- case 0x4643: longname = "Frequency"; break; /* FC */
- case 0x5354: longname = "???"; break; /* ST */
- case 0x534c: longname = "Song Length (s)"; break; /* SL */
- case 0x434b: longname = "Checksum"; break; /* CK */
- case 0x4e4e: longname = "Nickname"; break; /* NN */
- case 0x434e: longname = "Client Name"; break; /* CN */
- case 0x5054: longname = "Port"; break; /* PT */
- case 0x484e: longname = "???"; break; /* HN */
- case 0x4d45: longname = "Message"; break; /* ME */
- case 0x4944: longname = "Identification"; break; /* ID */
- case 0x4144: longname = "???"; break; /* AD */
- default: longname = "unknown"; break;
+ case 0x5346: longname = "Shared Files"; break; /* SF */
+ case 0x534b: longname = "Shared Kilobytes"; break; /* SK */
+ case 0x4e49: longname = "Network ID"; break; /* NI */
+ case 0x4e43: longname = "Num. Connections"; break; /* NC */
+ case 0x4356: longname = "Client Version"; break; /* CV */
+ case 0x564c: longname = "Velocity"; break; /* VL */
+ case 0x464e: longname = "Filename"; break; /* FN */
+ case 0x464c: longname = "File Length"; break; /* FL */
+ case 0x4252: longname = "Bit Rate"; break; /* BR */
+ case 0x4643: longname = "Frequency"; break; /* FC */
+ case 0x5354: longname = "???"; break; /* ST */
+ case 0x534c: longname = "Song Length (s)"; break; /* SL */
+ case 0x434b: longname = "Checksum"; break; /* CK */
+ case 0x4e4e: longname = "Nickname"; break; /* NN */
+ case 0x434e: longname = "Client Name"; break; /* CN */
+ case 0x5054: longname = "Port"; break; /* PT */
+ case 0x484e: longname = "???"; break; /* HN */
+ case 0x4d45: longname = "Message"; break; /* ME */
+ case 0x4944: longname = "Identification"; break; /* ID */
+ case 0x4144: longname = "???"; break; /* AD */
+ default: longname = "unknown"; break;
}
/* 1-byte data type */
@@ -172,7 +172,7 @@ dissect_manolito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += length;
/* convert the 16-bit integer field name to a string */
- /* XXX: changed this to use g_htons */
+ /* XXX: changed this to use g_htons */
field_name_str[0] = g_htons(field_name) & 0x00ff;
field_name_str[1] = (g_htons(field_name) & 0xff00) >> 8;
field_name_str[2] = 0;
@@ -223,35 +223,35 @@ proto_register_manolito(void)
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_manolito_checksum,
- { "Checksum", "manolito.checksum",
- FT_UINT32, BASE_HEX, NULL, 0,
- "Checksum used for verifying integrity", HFILL }
+ { "Checksum", "manolito.checksum",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ "Checksum used for verifying integrity", HFILL }
+ },
+ { &hf_manolito_seqno,
+ { "Sequence Number", "manolito.seqno",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ "Incremental sequence number", HFILL }
+ },
+ { &hf_manolito_src,
+ { "Forwarded IP Address", "manolito.src",
+ FT_IPv4, BASE_NONE, NULL, 0,
+ "Host packet was forwarded from (or 0)", HFILL }
+ },
+ { &hf_manolito_dest,
+ { "Destination IP Address","manolito.dest",
+ FT_IPv4, BASE_NONE, NULL, 0,
+ "Destination IPv4 address", HFILL }
+ },
+ { &hf_manolito_options_short,
+ { "Options", "manolito.options",
+ FT_UINT24, BASE_HEX, NULL, 0,
+ "Packet-dependent data", HFILL }
+ },
+ { &hf_manolito_options,
+ { "Options", "manolito.options",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ "Packet-dependent data", HFILL }
},
- { &hf_manolito_seqno,
- { "Sequence Number", "manolito.seqno",
- FT_UINT32, BASE_HEX, NULL, 0,
- "Incremental sequence number", HFILL }
- },
- { &hf_manolito_src,
- { "Forwarded IP Address", "manolito.src",
- FT_IPv4, BASE_NONE, NULL, 0,
- "Host packet was forwarded from (or 0)", HFILL }
- },
- { &hf_manolito_dest,
- { "Destination IP Address","manolito.dest",
- FT_IPv4, BASE_NONE, NULL, 0,
- "Destination IPv4 address", HFILL }
- },
- { &hf_manolito_options_short,
- { "Options", "manolito.options",
- FT_UINT24, BASE_HEX, NULL, 0,
- "Packet-dependent data", HFILL }
- },
- { &hf_manolito_options,
- { "Options", "manolito.options",
- FT_UINT32, BASE_HEX, NULL, 0,
- "Packet-dependent data", HFILL }
- },
};
static gint *ett[] = {
@@ -279,3 +279,16 @@ proto_reg_handoff_manolito(void)
proto_manolito);
dissector_add_uint("udp.port", 41170, manolito_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-mndp.c b/epan/dissectors/packet-mndp.c
index ce3109e908..96505bc5bd 100644
--- a/epan/dissectors/packet-mndp.c
+++ b/epan/dissectors/packet-mndp.c
@@ -73,47 +73,47 @@ static int hf_mndp_interfacename = -1;
/* ============= copy/paste/modify from value_string.[hc] ============== */
typedef struct _ext_value_string {
- guint32 value;
- const gchar *strptr;
- int* hf_element;
- int (*specialfunction)(tvbuff_t *, packet_info *, proto_tree *, guint32,
- guint32, const struct _ext_value_string *);
- const struct _ext_value_string *evs;
+ guint32 value;
+ const gchar *strptr;
+ int* hf_element;
+ int (*specialfunction)(tvbuff_t *, packet_info *, proto_tree *, guint32,
+ guint32, const struct _ext_value_string *);
+ const struct _ext_value_string *evs;
} ext_value_string;
static const gchar*
match_strextval_idx(guint32 val, const ext_value_string *vs, gint *idx) {
- gint i = 0;
+ gint i = 0;
+
+ if(vs) {
+ while (vs[i].strptr) {
+ if (vs[i].value == val) {
+ if (idx)
+ *idx = i;
+ return(vs[i].strptr);
+ }
+ i++;
+ }
+ }
- if(vs) {
- while (vs[i].strptr) {
- if (vs[i].value == val) {
if (idx)
- *idx = i;
- return(vs[i].strptr);
- }
- i++;
- }
- }
-
- if (idx)
- *idx = -1;
- return NULL;
+ *idx = -1;
+ return NULL;
}
static const gchar*
extval_to_str_idx(guint32 val, const ext_value_string *vs, gint *idx, const char *fmt) {
- const gchar *ret;
+ const gchar *ret;
- if (!fmt)
- fmt="Unknown";
+ if (!fmt)
+ fmt="Unknown";
- ret = match_strextval_idx(val, vs, idx);
- if (ret != NULL)
- return ret;
+ ret = match_strextval_idx(val, vs, idx);
+ if (ret != NULL)
+ return ret;
- return wmem_strdup_printf(wmem_packet_scope(), fmt, val);
+ return wmem_strdup_printf(wmem_packet_scope(), fmt, val);
}
/* ============= end copy/paste/modify ============== */
@@ -122,24 +122,23 @@ static int dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mndp_tree,
guint32 offset, guint32 length, const ext_value_string *value_array);
static const ext_value_string mndp_body_tlv_vals[] = {
- { 1, "MAC-Address", &hf_mndp_mac, NULL, NULL },
- { 5, "Identity", &hf_mndp_identity, NULL, NULL },
- { 7, "Version", &hf_mndp_version, NULL, NULL },
- { 8, "Platform", &hf_mndp_platform, NULL, NULL },
- { 10, "Uptime", &hf_mndp_uptime, NULL, (ext_value_string *)TRUE },
- { 11, "Software-ID", &hf_mndp_softwareid, NULL, NULL },
- { 12, "Board", &hf_mndp_board, NULL, NULL },
- { 14, "Unpack", &hf_mndp_unpack, NULL, NULL },
- { 15, "IPv6-Address", &hf_mndp_ipv6address, NULL, NULL },
+ { 1, "MAC-Address", &hf_mndp_mac, NULL, NULL },
+ { 5, "Identity", &hf_mndp_identity, NULL, NULL },
+ { 7, "Version", &hf_mndp_version, NULL, NULL },
+ { 8, "Platform", &hf_mndp_platform, NULL, NULL },
+ { 10, "Uptime", &hf_mndp_uptime, NULL, (ext_value_string *)TRUE },
+ { 11, "Software-ID", &hf_mndp_softwareid, NULL, NULL },
+ { 12, "Board", &hf_mndp_board, NULL, NULL },
+ { 14, "Unpack", &hf_mndp_unpack, NULL, NULL },
+ { 15, "IPv6-Address", &hf_mndp_ipv6address, NULL, NULL },
{ 16, "Interface name", &hf_mndp_interfacename, NULL, NULL },
- { 0, NULL, NULL, NULL, NULL }
+ { 0, NULL, NULL, NULL, NULL }
};
static const value_string mndp_unpack_vals[] = {
/* none|simple|uncompressed-headers|uncompressed-all */
{ 1, "None" },
-
{ 0, NULL }
};
@@ -147,13 +146,13 @@ static int
dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mndp_tree,
guint32 offset, guint32 length _U_, const ext_value_string *value_array)
{
- guint32 tlv_type;
- guint32 tlv_length;
+ guint32 tlv_type;
+ guint32 tlv_length;
proto_item *tlv_tree;
proto_item *type_item;
- int type_index;
- guint32 tlv_end;
- guint encoding_info;
+ int type_index;
+ guint32 tlv_end;
+ guint encoding_info;
tlv_type = tvb_get_ntohs(tvb, offset);
tlv_length = tvb_get_ntohs(tvb, offset + 2);
@@ -368,3 +367,16 @@ proto_reg_handoff_mndp(void)
dissector_add_uint("udp.port", PORT_MNDP, mndp_handle);
/* heur_dissector_add("udp", dissect_mndp_heur, proto_mndp); */
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-mpeg1.c b/epan/dissectors/packet-mpeg1.c
index 20e6c47f99..9540bda6dd 100644
--- a/epan/dissectors/packet-mpeg1.c
+++ b/epan/dissectors/packet-mpeg1.c
@@ -382,3 +382,16 @@ proto_reg_handoff_mpeg1(void)
mpeg1_handle = create_dissector_handle(dissect_mpeg1, proto_mpg);
dissector_add_uint("rtp.pt", PT_MPV, mpeg1_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-mrdisc.c b/epan/dissectors/packet-mrdisc.c
index 5935f87f5d..4b0fbf9c27 100644
--- a/epan/dissectors/packet-mrdisc.c
+++ b/epan/dissectors/packet-mrdisc.c
@@ -286,3 +286,16 @@ proto_register_mrdisc(void)
proto_register_field_array(proto_mrdisc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-mstp.c b/epan/dissectors/packet-mstp.c
index b309e15a77..69c6ed03a0 100644
--- a/epan/dissectors/packet-mstp.c
+++ b/epan/dissectors/packet-mstp.c
@@ -50,25 +50,25 @@ void proto_reg_handoff_mstp(void);
/* MS/TP Frame Type */
/* Frame Types 8 through 127 are reserved by ASHRAE. */
-#define MSTP_TOKEN 0
-#define MSTP_POLL_FOR_MASTER 1
-#define MSTP_REPLY_TO_POLL_FOR_MASTER 2
-#define MSTP_TEST_REQUEST 3
-#define MSTP_TEST_RESPONSE 4
-#define MSTP_BACNET_DATA_EXPECTING_REPLY 5
+#define MSTP_TOKEN 0
+#define MSTP_POLL_FOR_MASTER 1
+#define MSTP_REPLY_TO_POLL_FOR_MASTER 2
+#define MSTP_TEST_REQUEST 3
+#define MSTP_TEST_RESPONSE 4
+#define MSTP_BACNET_DATA_EXPECTING_REPLY 5
#define MSTP_BACNET_DATA_NOT_EXPECTING_REPLY 6
-#define MSTP_REPLY_POSTPONED 7
+#define MSTP_REPLY_POSTPONED 7
static const value_string
bacnet_mstp_frame_type_name[] = {
- {MSTP_TOKEN, "Token"},
- {MSTP_POLL_FOR_MASTER, "Poll For Master"},
- {MSTP_REPLY_TO_POLL_FOR_MASTER, "Reply To Poll For Master"},
- {MSTP_TEST_REQUEST, "Test_Request"},
- {MSTP_TEST_RESPONSE, "Test_Response"},
- {MSTP_BACNET_DATA_EXPECTING_REPLY, "BACnet Data Expecting Reply"},
+ {MSTP_TOKEN, "Token"},
+ {MSTP_POLL_FOR_MASTER, "Poll For Master"},
+ {MSTP_REPLY_TO_POLL_FOR_MASTER, "Reply To Poll For Master"},
+ {MSTP_TEST_REQUEST, "Test_Request"},
+ {MSTP_TEST_RESPONSE, "Test_Response"},
+ {MSTP_BACNET_DATA_EXPECTING_REPLY, "BACnet Data Expecting Reply"},
{MSTP_BACNET_DATA_NOT_EXPECTING_REPLY, "BACnet Data Not Expecting Reply"},
- {MSTP_REPLY_POSTPONED, "Reply Postponed"},
+ {MSTP_REPLY_POSTPONED, "Reply Postponed"},
/* Frame Types 128 through 255: Proprietary Frames */
{0, NULL }
};
@@ -457,3 +457,16 @@ proto_reg_handoff_mstp(void)
dissector_add_uint("mstp.vendor_frame_type", (0/*VendorID ASHRAE*/ << 16) + MSTP_BACNET_DATA_EXPECTING_REPLY, bacnet_handle);
dissector_add_uint("mstp.vendor_frame_type", (0/*VendorID ASHRAE*/ << 16) + MSTP_BACNET_DATA_NOT_EXPECTING_REPLY, bacnet_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c
index 7621b0ee34..b2966e560e 100644
--- a/epan/dissectors/packet-mtp3.c
+++ b/epan/dissectors/packet-mtp3.c
@@ -117,7 +117,7 @@ typedef enum {
JAPAN_PC_STRUCTURE_3_4_4_5 = 3
} JAPAN_PC_Structure_Type;
-static gint itu_pc_structure = ITU_PC_STRUCTURE_NONE;
+static gint itu_pc_structure = ITU_PC_STRUCTURE_NONE;
static gint japan_pc_structure = JAPAN_PC_STRUCTURE_NONE;
#include <packet-mtp3.h>
@@ -127,11 +127,11 @@ gboolean mtp3_heuristic_standard = FALSE;
static gint pref_mtp3_standard;
const value_string mtp3_standard_vals[] = {
- { ITU_STANDARD, "ITU_STANDARD" },
- { ANSI_STANDARD, "ANSI_STANDARD" },
- { CHINESE_ITU_STANDARD, "CHINESE_ITU_STANDARD" },
- { JAPAN_STANDARD, "JAPAN_STANDARD" },
- { 0, NULL }
+ { ITU_STANDARD, "ITU_STANDARD" },
+ { ANSI_STANDARD, "ANSI_STANDARD" },
+ { CHINESE_ITU_STANDARD, "CHINESE_ITU_STANDARD" },
+ { JAPAN_STANDARD, "JAPAN_STANDARD" },
+ { 0, NULL }
};
static gboolean mtp3_use_ansi_5_bit_sls = FALSE;
@@ -185,49 +185,49 @@ static gint mtp3_addr_fmt = MTP3_ADDR_FMT_DASHED;
/* the higher values are taken from the M3UA RFC */
static const value_string mtp3_service_indicator_code_vals[] = {
- { MTP_SI_SNM, "Signalling Network Management Message (SNM)" },
- { MTP_SI_MTN, "Maintenance Regular Message (MTN)" },
- { MTP_SI_MTNS, "Maintenance Special Message (MTNS)" },
- { MTP_SI_SCCP, "SCCP" },
- { MTP_SI_TUP, "TUP" },
- { MTP_SI_ISUP, "ISUP" },
- { MTP_SI_DUP_CC, "DUP (call and circuit related messages)" },
- { MTP_SI_DUP_FAC, "DUP (facility registration and cancellation message)" },
- { MTP_SI_MTP_TEST, "MTP testing user part" },
- { MTP_SI_ISUP_B, "Broadband ISUP" },
- { MTP_SI_ISUP_S, "Satellite ISUP" },
- { 0xb, "Spare" },
- { MTP_SI_AAL2, "AAL type2 Signaling" },
- { MTP_SI_BICC, "Bearer Independent Call Control (BICC)" },
- { MTP_SI_GCP, "Gateway Control Protocol" },
- { 0xf, "Spare" },
- { 0, NULL }
+ { MTP_SI_SNM, "Signalling Network Management Message (SNM)" },
+ { MTP_SI_MTN, "Maintenance Regular Message (MTN)" },
+ { MTP_SI_MTNS, "Maintenance Special Message (MTNS)" },
+ { MTP_SI_SCCP, "SCCP" },
+ { MTP_SI_TUP, "TUP" },
+ { MTP_SI_ISUP, "ISUP" },
+ { MTP_SI_DUP_CC, "DUP (call and circuit related messages)" },
+ { MTP_SI_DUP_FAC, "DUP (facility registration and cancellation message)" },
+ { MTP_SI_MTP_TEST, "MTP testing user part" },
+ { MTP_SI_ISUP_B, "Broadband ISUP" },
+ { MTP_SI_ISUP_S, "Satellite ISUP" },
+ { 0xb, "Spare" },
+ { MTP_SI_AAL2, "AAL type2 Signaling" },
+ { MTP_SI_BICC, "Bearer Independent Call Control (BICC)" },
+ { MTP_SI_GCP, "Gateway Control Protocol" },
+ { 0xf, "Spare" },
+ { 0, NULL }
};
const value_string mtp3_service_indicator_code_short_vals[] = {
- { MTP_SI_SNM, "SNM" },
- { MTP_SI_MTN, "MTN" },
- { MTP_SI_MTNS, "MTNS" },
- { MTP_SI_SCCP, "SCCP" },
- { MTP_SI_TUP, "TUP" },
- { MTP_SI_ISUP, "ISUP" },
- { MTP_SI_DUP_CC, "DUP (CC)" },
- { MTP_SI_DUP_FAC, "DUP (FAC/CANC)" },
- { MTP_SI_MTP_TEST, "MTP Test" },
- { MTP_SI_ISUP_B, "ISUP-b" },
- { MTP_SI_ISUP_S, "ISUP-s" },
- { MTP_SI_AAL2, "AAL type 2" },
- { MTP_SI_BICC, "BICC" },
- { MTP_SI_GCP, "GCP" },
- { 0, NULL }
+ { MTP_SI_SNM, "SNM" },
+ { MTP_SI_MTN, "MTN" },
+ { MTP_SI_MTNS, "MTNS" },
+ { MTP_SI_SCCP, "SCCP" },
+ { MTP_SI_TUP, "TUP" },
+ { MTP_SI_ISUP, "ISUP" },
+ { MTP_SI_DUP_CC, "DUP (CC)" },
+ { MTP_SI_DUP_FAC, "DUP (FAC/CANC)" },
+ { MTP_SI_MTP_TEST, "MTP Test" },
+ { MTP_SI_ISUP_B, "ISUP-b" },
+ { MTP_SI_ISUP_S, "ISUP-s" },
+ { MTP_SI_AAL2, "AAL type 2" },
+ { MTP_SI_BICC, "BICC" },
+ { MTP_SI_GCP, "GCP" },
+ { 0, NULL }
};
const value_string mtp3_network_indicator_vals[] = {
- { MTP3_NI_INT0, "International network" },
- { MTP3_NI_INT1, "Spare (for international use only)" },
- { MTP3_NI_NAT0, "National network" },
- { MTP3_NI_NAT1, "Reserved for national use" },
- { 0, NULL }
+ { MTP3_NI_INT0, "International network" },
+ { MTP3_NI_INT1, "Spare (for international use only)" },
+ { MTP3_NI_NAT0, "National network" },
+ { MTP3_NI_NAT1, "Reserved for national use" },
+ { 0, NULL }
};
static dissector_handle_t data_handle;
@@ -244,19 +244,19 @@ mtp3_pc_to_str_buf(const guint32 pc, gchar *buf, int buf_len)
{
case ITU_STANDARD:
switch (itu_pc_structure) {
- case ITU_PC_STRUCTURE_NONE:
- g_snprintf(buf, buf_len, "%u", pc);
- break;
- case ITU_PC_STRUCTURE_3_8_3:
- /* this format is used in international ITU networks */
- g_snprintf(buf, buf_len, "%u-%u-%u", (pc & 0x3800)>>11, (pc & 0x7f8) >> 3, (pc & 0x07) >> 0);
- break;
- case ITU_PC_STRUCTURE_4_3_4_3:
- /* this format is used in some national ITU networks, the German one for example. */
- g_snprintf(buf, buf_len, "%u-%u-%u-%u", (pc & 0x3c00) >>10, (pc & 0x0380) >> 7, (pc & 0x0078) >> 3, (pc & 0x0007) >> 0);
- break;
- default:
- DISSECTOR_ASSERT_NOT_REACHED();
+ case ITU_PC_STRUCTURE_NONE:
+ g_snprintf(buf, buf_len, "%u", pc);
+ break;
+ case ITU_PC_STRUCTURE_3_8_3:
+ /* this format is used in international ITU networks */
+ g_snprintf(buf, buf_len, "%u-%u-%u", (pc & 0x3800)>>11, (pc & 0x7f8) >> 3, (pc & 0x07) >> 0);
+ break;
+ case ITU_PC_STRUCTURE_4_3_4_3:
+ /* this format is used in some national ITU networks, the German one for example. */
+ g_snprintf(buf, buf_len, "%u-%u-%u-%u", (pc & 0x3c00) >>10, (pc & 0x0380) >> 7, (pc & 0x0078) >> 3, (pc & 0x0007) >> 0);
+ break;
+ default:
+ DISSECTOR_ASSERT_NOT_REACHED();
}
break;
case ANSI_STANDARD:
@@ -265,24 +265,24 @@ mtp3_pc_to_str_buf(const guint32 pc, gchar *buf, int buf_len)
break;
case JAPAN_STANDARD:
switch (japan_pc_structure) {
- case JAPAN_PC_STRUCTURE_NONE:
- g_snprintf(buf, buf_len, "%u", pc);
- break;
- case JAPAN_PC_STRUCTURE_7_4_5:
- /* This format is specified by NTT */
- g_snprintf(buf, buf_len, "%u-%u-%u", (pc & 0xfe00)>>9, (pc & 0x1e0)>>5, (pc & 0x1f));
- break;
- case JAPAN_PC_STRUCTURE_3_4_4_5:
- /* Where does this format come from? */
- g_snprintf(buf, buf_len, "%u-%u-%u-%u", (pc & 0xe000)>>13, (pc & 0x1e00)>>9, (pc & 0x1e0)>>5, (pc & 0x1f));
- break;
- default:
- DISSECTOR_ASSERT_NOT_REACHED();
+ case JAPAN_PC_STRUCTURE_NONE:
+ g_snprintf(buf, buf_len, "%u", pc);
+ break;
+ case JAPAN_PC_STRUCTURE_7_4_5:
+ /* This format is specified by NTT */
+ g_snprintf(buf, buf_len, "%u-%u-%u", (pc & 0xfe00)>>9, (pc & 0x1e0)>>5, (pc & 0x1f));
+ break;
+ case JAPAN_PC_STRUCTURE_3_4_4_5:
+ /* Where does this format come from? */
+ g_snprintf(buf, buf_len, "%u-%u-%u-%u", (pc & 0xe000)>>13, (pc & 0x1e00)>>9, (pc & 0x1e0)>>5, (pc & 0x1f));
+ break;
+ default:
+ DISSECTOR_ASSERT_NOT_REACHED();
}
break;
default:
DISSECTOR_ASSERT_NOT_REACHED();
- }
+ }
}
#define MAX_STRUCTURED_PC_LENGTH 20
@@ -314,149 +314,149 @@ mtp3_pc_structured(void)
void
mtp3_addr_to_str_buf(const mtp3_addr_pc_t *addr_pc_p,
- gchar *buf, int buf_len)
+ gchar *buf, int buf_len)
{
switch (mtp3_addr_fmt)
{
- case MTP3_ADDR_FMT_DEC:
- switch (addr_pc_p->type)
- {
- case ITU_STANDARD:
- g_snprintf(buf, buf_len, "%u", addr_pc_p->pc & ITU_PC_MASK);
- break;
- case JAPAN_STANDARD:
- g_snprintf(buf, buf_len, "%u", addr_pc_p->pc & JAPAN_PC_MASK);
- break;
- default:
- /* assuming 24-bit */
- g_snprintf(buf, buf_len, "%u", addr_pc_p->pc & ANSI_PC_MASK);
+ case MTP3_ADDR_FMT_DEC:
+ switch (addr_pc_p->type)
+ {
+ case ITU_STANDARD:
+ g_snprintf(buf, buf_len, "%u", addr_pc_p->pc & ITU_PC_MASK);
+ break;
+ case JAPAN_STANDARD:
+ g_snprintf(buf, buf_len, "%u", addr_pc_p->pc & JAPAN_PC_MASK);
+ break;
+ default:
+ /* assuming 24-bit */
+ g_snprintf(buf, buf_len, "%u", addr_pc_p->pc & ANSI_PC_MASK);
+ break;
+ }
break;
- }
- break;
- case MTP3_ADDR_FMT_HEX:
- switch (addr_pc_p->type)
- {
- case ITU_STANDARD:
- g_snprintf(buf, buf_len, "%x", addr_pc_p->pc & ITU_PC_MASK);
- break;
- case JAPAN_STANDARD:
- g_snprintf(buf, buf_len, "%x", addr_pc_p->pc & JAPAN_PC_MASK);
- break;
- default:
- /* assuming 24-bit */
- g_snprintf(buf, buf_len, "%x", addr_pc_p->pc & ANSI_PC_MASK);
+ case MTP3_ADDR_FMT_HEX:
+ switch (addr_pc_p->type)
+ {
+ case ITU_STANDARD:
+ g_snprintf(buf, buf_len, "%x", addr_pc_p->pc & ITU_PC_MASK);
+ break;
+ case JAPAN_STANDARD:
+ g_snprintf(buf, buf_len, "%x", addr_pc_p->pc & JAPAN_PC_MASK);
+ break;
+ default:
+ /* assuming 24-bit */
+ g_snprintf(buf, buf_len, "%x", addr_pc_p->pc & ANSI_PC_MASK);
+ break;
+ }
break;
- }
- break;
- case MTP3_ADDR_FMT_NI_DEC:
- switch (addr_pc_p->type)
- {
- case ITU_STANDARD:
- g_snprintf(buf, buf_len, "%u:%u", addr_pc_p->ni, addr_pc_p->pc & ITU_PC_MASK);
- break;
- case JAPAN_STANDARD:
- g_snprintf(buf, buf_len, "%u:%u", addr_pc_p->ni, addr_pc_p->pc & JAPAN_PC_MASK);
- break;
- default:
- /* assuming 24-bit */
- g_snprintf(buf, buf_len, "%u:%u", addr_pc_p->ni, addr_pc_p->pc & ANSI_PC_MASK);
+ case MTP3_ADDR_FMT_NI_DEC:
+ switch (addr_pc_p->type)
+ {
+ case ITU_STANDARD:
+ g_snprintf(buf, buf_len, "%u:%u", addr_pc_p->ni, addr_pc_p->pc & ITU_PC_MASK);
+ break;
+ case JAPAN_STANDARD:
+ g_snprintf(buf, buf_len, "%u:%u", addr_pc_p->ni, addr_pc_p->pc & JAPAN_PC_MASK);
+ break;
+ default:
+ /* assuming 24-bit */
+ g_snprintf(buf, buf_len, "%u:%u", addr_pc_p->ni, addr_pc_p->pc & ANSI_PC_MASK);
+ break;
+ }
break;
- }
- break;
- case MTP3_ADDR_FMT_NI_HEX:
- switch (addr_pc_p->type)
- {
- case ITU_STANDARD:
- g_snprintf(buf, buf_len, "%u:%x", addr_pc_p->ni, addr_pc_p->pc & ITU_PC_MASK);
- break;
- case JAPAN_STANDARD:
- g_snprintf(buf, buf_len, "%u:%x", addr_pc_p->ni, addr_pc_p->pc & JAPAN_PC_MASK);
- break;
- default:
- /* assuming 24-bit */
- g_snprintf(buf, buf_len, "%u:%x", addr_pc_p->ni, addr_pc_p->pc & ANSI_PC_MASK);
+ case MTP3_ADDR_FMT_NI_HEX:
+ switch (addr_pc_p->type)
+ {
+ case ITU_STANDARD:
+ g_snprintf(buf, buf_len, "%u:%x", addr_pc_p->ni, addr_pc_p->pc & ITU_PC_MASK);
+ break;
+ case JAPAN_STANDARD:
+ g_snprintf(buf, buf_len, "%u:%x", addr_pc_p->ni, addr_pc_p->pc & JAPAN_PC_MASK);
+ break;
+ default:
+ /* assuming 24-bit */
+ g_snprintf(buf, buf_len, "%u:%x", addr_pc_p->ni, addr_pc_p->pc & ANSI_PC_MASK);
+ break;
+ }
break;
- }
- break;
- default:
- /* FALLTHRU */
+ default:
+ /* FALLTHRU */
- case MTP3_ADDR_FMT_DASHED:
- mtp3_pc_to_str_buf(addr_pc_p->pc, buf, buf_len);
- break;
+ case MTP3_ADDR_FMT_DASHED:
+ mtp3_pc_to_str_buf(addr_pc_p->pc, buf, buf_len);
+ break;
}
}
guint32
mtp3_pc_hash(const mtp3_addr_pc_t *addr_pc_p) {
- guint32 pc;
+ guint32 pc;
- switch (addr_pc_p->type)
- {
- case ITU_STANDARD:
- pc = (addr_pc_p->pc & ITU_PC_MASK) | ((addr_pc_p->ni % 4) << 14) ;
- break;
- default:
- /* assuming 24-bit */
- pc = (addr_pc_p->pc & ANSI_PC_MASK) | ((addr_pc_p->ni) << 24) ;
- break;
- }
+ switch (addr_pc_p->type)
+ {
+ case ITU_STANDARD:
+ pc = (addr_pc_p->pc & ITU_PC_MASK) | ((addr_pc_p->ni % 4) << 14) ;
+ break;
+ default:
+ /* assuming 24-bit */
+ pc = (addr_pc_p->pc & ANSI_PC_MASK) | ((addr_pc_p->ni) << 24) ;
+ break;
+ }
- return pc;
+ return pc;
}
/* Common function for dissecting 3-byte (ANSI or China) PCs. */
void
dissect_mtp3_3byte_pc(tvbuff_t *tvb, guint offset, proto_tree *tree, gint ett_pc, int hf_pc_string, int hf_pc_network,
- int hf_pc_cluster, int hf_pc_member, int hf_dpc, int hf_pc)
+ int hf_pc_cluster, int hf_pc_member, int hf_dpc, int hf_pc)
{
- guint32 pc;
- proto_item *pc_item, *hidden_item;
- proto_tree *pc_tree;
- char pc_string[MAX_STRUCTURED_PC_LENGTH];
-
- pc = tvb_get_letoh24(tvb, offset);
- mtp3_pc_to_str_buf(pc, pc_string, sizeof(pc_string));
-
- pc_item = proto_tree_add_string(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
-
- /* Add alternate formats of the PC
- * NOTE: each of these formats is shown to the user,
- * so I think that using hidden fields in this case is OK.
- */
- g_snprintf(pc_string, sizeof(pc_string), "%u", pc);
- proto_item_append_text(pc_item, " (%s)", pc_string);
- hidden_item = proto_tree_add_string(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
+ guint32 pc;
+ proto_item *pc_item, *hidden_item;
+ proto_tree *pc_tree;
+ char pc_string[MAX_STRUCTURED_PC_LENGTH];
+
+ pc = tvb_get_letoh24(tvb, offset);
+ mtp3_pc_to_str_buf(pc, pc_string, sizeof(pc_string));
+
+ pc_item = proto_tree_add_string(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
+
+ /* Add alternate formats of the PC
+ * NOTE: each of these formats is shown to the user,
+ * so I think that using hidden fields in this case is OK.
+ */
+ g_snprintf(pc_string, sizeof(pc_string), "%u", pc);
+ proto_item_append_text(pc_item, " (%s)", pc_string);
+ hidden_item = proto_tree_add_string(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ g_snprintf(pc_string, sizeof(pc_string), "0x%x", pc);
+ proto_item_append_text(pc_item, " (%s)", pc_string);
+ hidden_item = proto_tree_add_string(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+
+ pc_tree = proto_item_add_subtree(pc_item, ett_pc);
+
+ proto_tree_add_uint(pc_tree, hf_pc_network, tvb, offset + ANSI_NETWORK_OFFSET, ANSI_NCM_LENGTH, pc);
+ proto_tree_add_uint(pc_tree, hf_pc_cluster, tvb, offset + ANSI_CLUSTER_OFFSET, ANSI_NCM_LENGTH, pc);
+ proto_tree_add_uint(pc_tree, hf_pc_member, tvb, offset + ANSI_MEMBER_OFFSET, ANSI_NCM_LENGTH, pc);
+
+ /* add full integer values of DPC as hidden for filtering purposes */
+ if (hf_dpc) {
+ hidden_item = proto_tree_add_uint(pc_tree, hf_dpc, tvb, offset, ANSI_PC_LENGTH, pc);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- g_snprintf(pc_string, sizeof(pc_string), "0x%x", pc);
- proto_item_append_text(pc_item, " (%s)", pc_string);
- hidden_item = proto_tree_add_string(tree, hf_pc_string, tvb, offset, ANSI_PC_LENGTH, pc_string);
+ }
+ if (hf_pc) {
+ hidden_item = proto_tree_add_uint(pc_tree, hf_pc, tvb, offset, ANSI_PC_LENGTH, pc);
PROTO_ITEM_SET_HIDDEN(hidden_item);
-
- pc_tree = proto_item_add_subtree(pc_item, ett_pc);
-
- proto_tree_add_uint(pc_tree, hf_pc_network, tvb, offset + ANSI_NETWORK_OFFSET, ANSI_NCM_LENGTH, pc);
- proto_tree_add_uint(pc_tree, hf_pc_cluster, tvb, offset + ANSI_CLUSTER_OFFSET, ANSI_NCM_LENGTH, pc);
- proto_tree_add_uint(pc_tree, hf_pc_member, tvb, offset + ANSI_MEMBER_OFFSET, ANSI_NCM_LENGTH, pc);
-
- /* add full integer values of DPC as hidden for filtering purposes */
- if (hf_dpc) {
- hidden_item = proto_tree_add_uint(pc_tree, hf_dpc, tvb, offset, ANSI_PC_LENGTH, pc);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
- }
- if (hf_pc) {
- hidden_item = proto_tree_add_uint(pc_tree, hf_pc, tvb, offset, ANSI_PC_LENGTH, pc);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
- }
+ }
}
static void
dissect_mtp3_sio(tvbuff_t *tvb, proto_tree *mtp3_tree,
- mtp3_addr_pc_t *mtp3_addr_opc, mtp3_addr_pc_t *mtp3_addr_dpc)
+ mtp3_addr_pc_t *mtp3_addr_opc, mtp3_addr_pc_t *mtp3_addr_dpc)
{
guint8 sio;
proto_tree *sio_tree;
@@ -470,22 +470,22 @@ dissect_mtp3_sio(tvbuff_t *tvb, proto_tree *mtp3_tree,
mtp3_addr_dpc->ni = (sio & NETWORK_INDICATOR_MASK) >> 6;
switch(mtp3_standard){
- case ANSI_STANDARD:
- proto_tree_add_uint(sio_tree, hf_mtp3_ansi_priority, tvb, SIO_OFFSET, SIO_LENGTH, sio);
- break;
- case ITU_STANDARD:
- case CHINESE_ITU_STANDARD:
- if (mtp3_show_itu_priority)
- proto_tree_add_uint(sio_tree, hf_mtp3_itu_priority, tvb, SIO_OFFSET, SIO_LENGTH, sio);
- else
+ case ANSI_STANDARD:
+ proto_tree_add_uint(sio_tree, hf_mtp3_ansi_priority, tvb, SIO_OFFSET, SIO_LENGTH, sio);
+ break;
+ case ITU_STANDARD:
+ case CHINESE_ITU_STANDARD:
+ if (mtp3_show_itu_priority)
+ proto_tree_add_uint(sio_tree, hf_mtp3_itu_priority, tvb, SIO_OFFSET, SIO_LENGTH, sio);
+ else
+ proto_tree_add_uint(sio_tree, hf_mtp3_itu_spare, tvb, SIO_OFFSET, SIO_LENGTH, sio);
+ break;
+ case JAPAN_STANDARD:
+ /* The Japan variant has priority but it's on the LI which belongs to
+ * layer 2. Not sure what we can do about that...
+ */
proto_tree_add_uint(sio_tree, hf_mtp3_itu_spare, tvb, SIO_OFFSET, SIO_LENGTH, sio);
- break;
- case JAPAN_STANDARD:
- /* The Japan variant has priority but it's on the LI which belongs to
- * layer 2. Not sure what we can do about that...
- */
- proto_tree_add_uint(sio_tree, hf_mtp3_itu_spare, tvb, SIO_OFFSET, SIO_LENGTH, sio);
- break;
+ break;
}
proto_tree_add_uint(sio_tree, hf_mtp3_service_indicator, tvb, SIO_OFFSET, SIO_LENGTH, sio);
@@ -493,7 +493,7 @@ dissect_mtp3_sio(tvbuff_t *tvb, proto_tree *mtp3_tree,
static void
dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_tree,
- mtp3_addr_pc_t *mtp3_addr_opc, mtp3_addr_pc_t *mtp3_addr_dpc)
+ mtp3_addr_pc_t *mtp3_addr_opc, mtp3_addr_pc_t *mtp3_addr_dpc)
{
guint32 label, dpc, opc;
proto_item *label_dpc_item, *label_opc_item;
@@ -505,109 +505,109 @@ dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_t
switch (mtp3_standard) {
- case ITU_STANDARD:
- label_tree = proto_tree_add_subtree(mtp3_tree, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, ett_mtp3_label, NULL, "Routing label");
-
- label = tvb_get_letohl(tvb, ROUTING_LABEL_OFFSET);
+ case ITU_STANDARD:
+ label_tree = proto_tree_add_subtree(mtp3_tree, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, ett_mtp3_label, NULL, "Routing label");
- opc = (label & ITU_OPC_MASK) >> 14;
- dpc = label & ITU_DPC_MASK;
+ label = tvb_get_letohl(tvb, ROUTING_LABEL_OFFSET);
- hidden_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_pc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, opc);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
- hidden_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_pc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, dpc);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
+ opc = (label & ITU_OPC_MASK) >> 14;
+ dpc = label & ITU_DPC_MASK;
- label_dpc_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_dpc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, label);
- if (mtp3_pc_structured())
- proto_item_append_text(label_dpc_item, " (%s)", mtp3_pc_to_str(dpc));
+ hidden_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_pc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, opc);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_pc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, dpc);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
- if(mtp3_addr_dpc->ni == MTP3_NI_INT0) {
- pc_subtree = proto_item_add_subtree(label_dpc_item, ett_mtp3_label_dpc);
- analyze_q708_ispc(tvb, pc_subtree, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, dpc);
- }
+ label_dpc_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_dpc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, label);
+ if (mtp3_pc_structured())
+ proto_item_append_text(label_dpc_item, " (%s)", mtp3_pc_to_str(dpc));
+ if(mtp3_addr_dpc->ni == MTP3_NI_INT0) {
+ pc_subtree = proto_item_add_subtree(label_dpc_item, ett_mtp3_label_dpc);
+ analyze_q708_ispc(tvb, pc_subtree, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, dpc);
+ }
- label_opc_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_opc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, label);
- if (mtp3_pc_structured())
- proto_item_append_text(label_opc_item, " (%s)", mtp3_pc_to_str(opc));
- if(mtp3_addr_opc->ni == MTP3_NI_INT0) {
- pc_subtree = proto_item_add_subtree(label_opc_item, ett_mtp3_label_opc);
- analyze_q708_ispc(tvb, pc_subtree, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, opc);
- }
+ label_opc_item = proto_tree_add_uint(label_tree, hf_mtp3_itu_opc, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, label);
+ if (mtp3_pc_structured())
+ proto_item_append_text(label_opc_item, " (%s)", mtp3_pc_to_str(opc));
- proto_tree_add_uint(label_tree, hf_mtp3_itu_sls, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, label);
- break;
+ if(mtp3_addr_opc->ni == MTP3_NI_INT0) {
+ pc_subtree = proto_item_add_subtree(label_opc_item, ett_mtp3_label_opc);
+ analyze_q708_ispc(tvb, pc_subtree, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, opc);
+ }
- case ANSI_STANDARD:
- case CHINESE_ITU_STANDARD:
- if (mtp3_standard == ANSI_STANDARD)
- {
- hf_dpc_string = hf_mtp3_ansi_dpc;
- hf_opc_string = hf_mtp3_ansi_opc;
- } else /* CHINESE_ITU_STANDARD */ {
- hf_dpc_string = hf_mtp3_chinese_dpc;
- hf_opc_string = hf_mtp3_chinese_opc;
- }
+ proto_tree_add_uint(label_tree, hf_mtp3_itu_sls, tvb, ROUTING_LABEL_OFFSET, ITU_ROUTING_LABEL_LENGTH, label);
+ break;
- /* Create the Routing Label Tree */
- label_tree = proto_tree_add_subtree(mtp3_tree, tvb, ROUTING_LABEL_OFFSET, ANSI_ROUTING_LABEL_LENGTH, ett_mtp3_label, NULL, "Routing label");
-
- /* create and fill the DPC tree */
- dissect_mtp3_3byte_pc(tvb, ANSI_DPC_OFFSET, label_tree, ett_mtp3_label_dpc, hf_dpc_string, hf_mtp3_dpc_network,
- hf_mtp3_dpc_cluster, hf_mtp3_dpc_member, hf_mtp3_24bit_dpc, hf_mtp3_24bit_pc);
- /* Store dpc for mtp3_addr below */
- dpc = tvb_get_letoh24(tvb, ANSI_DPC_OFFSET);
-
- /* create and fill the OPC tree */
- dissect_mtp3_3byte_pc(tvb, ANSI_OPC_OFFSET, label_tree, ett_mtp3_label_opc, hf_opc_string, hf_mtp3_opc_network,
- hf_mtp3_opc_cluster, hf_mtp3_opc_member, hf_mtp3_24bit_opc, hf_mtp3_24bit_pc);
- /* Store opc for mtp3_addr below */
- opc = tvb_get_letoh24(tvb, ANSI_OPC_OFFSET);
-
- /* SLS */
- if (mtp3_standard == ANSI_STANDARD) {
- if (mtp3_use_ansi_5_bit_sls)
- proto_tree_add_item(label_tree, hf_mtp3_ansi_5_bit_sls, tvb, ANSI_SLS_OFFSET, SLS_LENGTH, ENC_NA);
- else
- proto_tree_add_item(label_tree, hf_mtp3_ansi_8_bit_sls, tvb, ANSI_SLS_OFFSET, SLS_LENGTH, ENC_NA);
- } else /* CHINESE_ITU_STANDARD */ {
- proto_tree_add_item(label_tree, hf_mtp3_chinese_itu_sls, tvb, ANSI_SLS_OFFSET, SLS_LENGTH, ENC_NA);
- }
- break;
+ case ANSI_STANDARD:
+ case CHINESE_ITU_STANDARD:
+ if (mtp3_standard == ANSI_STANDARD)
+ {
+ hf_dpc_string = hf_mtp3_ansi_dpc;
+ hf_opc_string = hf_mtp3_ansi_opc;
+ } else /* CHINESE_ITU_STANDARD */ {
+ hf_dpc_string = hf_mtp3_chinese_dpc;
+ hf_opc_string = hf_mtp3_chinese_opc;
+ }
- case JAPAN_STANDARD:
- label_tree = proto_tree_add_subtree(mtp3_tree, tvb, ROUTING_LABEL_OFFSET, JAPAN_ROUTING_LABEL_LENGTH, ett_mtp3_label, NULL, "Routing label");
+ /* Create the Routing Label Tree */
+ label_tree = proto_tree_add_subtree(mtp3_tree, tvb, ROUTING_LABEL_OFFSET, ANSI_ROUTING_LABEL_LENGTH, ett_mtp3_label, NULL, "Routing label");
+
+ /* create and fill the DPC tree */
+ dissect_mtp3_3byte_pc(tvb, ANSI_DPC_OFFSET, label_tree, ett_mtp3_label_dpc, hf_dpc_string, hf_mtp3_dpc_network,
+ hf_mtp3_dpc_cluster, hf_mtp3_dpc_member, hf_mtp3_24bit_dpc, hf_mtp3_24bit_pc);
+ /* Store dpc for mtp3_addr below */
+ dpc = tvb_get_letoh24(tvb, ANSI_DPC_OFFSET);
+
+ /* create and fill the OPC tree */
+ dissect_mtp3_3byte_pc(tvb, ANSI_OPC_OFFSET, label_tree, ett_mtp3_label_opc, hf_opc_string, hf_mtp3_opc_network,
+ hf_mtp3_opc_cluster, hf_mtp3_opc_member, hf_mtp3_24bit_opc, hf_mtp3_24bit_pc);
+ /* Store opc for mtp3_addr below */
+ opc = tvb_get_letoh24(tvb, ANSI_OPC_OFFSET);
+
+ /* SLS */
+ if (mtp3_standard == ANSI_STANDARD) {
+ if (mtp3_use_ansi_5_bit_sls)
+ proto_tree_add_item(label_tree, hf_mtp3_ansi_5_bit_sls, tvb, ANSI_SLS_OFFSET, SLS_LENGTH, ENC_NA);
+ else
+ proto_tree_add_item(label_tree, hf_mtp3_ansi_8_bit_sls, tvb, ANSI_SLS_OFFSET, SLS_LENGTH, ENC_NA);
+ } else /* CHINESE_ITU_STANDARD */ {
+ proto_tree_add_item(label_tree, hf_mtp3_chinese_itu_sls, tvb, ANSI_SLS_OFFSET, SLS_LENGTH, ENC_NA);
+ }
+ break;
- label_dpc_item = proto_tree_add_item(label_tree, hf_mtp3_japan_dpc, tvb, ROUTING_LABEL_OFFSET, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN);
- dpc = tvb_get_letohs(tvb, ROUTING_LABEL_OFFSET);
- if (mtp3_pc_structured()) {
- proto_item_append_text(label_dpc_item, " (%s)", mtp3_pc_to_str(dpc));
- }
+ case JAPAN_STANDARD:
+ label_tree = proto_tree_add_subtree(mtp3_tree, tvb, ROUTING_LABEL_OFFSET, JAPAN_ROUTING_LABEL_LENGTH, ett_mtp3_label, NULL, "Routing label");
- label_opc_item = proto_tree_add_item(label_tree, hf_mtp3_japan_opc, tvb, JAPAN_OPC_OFFSET, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN);
- opc = tvb_get_letohs(tvb, JAPAN_OPC_OFFSET);
- if (mtp3_pc_structured()) {
- proto_item_append_text(label_opc_item, " (%s)", mtp3_pc_to_str(opc));
- }
+ label_dpc_item = proto_tree_add_item(label_tree, hf_mtp3_japan_dpc, tvb, ROUTING_LABEL_OFFSET, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN);
+ dpc = tvb_get_letohs(tvb, ROUTING_LABEL_OFFSET);
+ if (mtp3_pc_structured()) {
+ proto_item_append_text(label_dpc_item, " (%s)", mtp3_pc_to_str(dpc));
+ }
- hidden_item = proto_tree_add_item(label_tree, hf_mtp3_japan_pc, tvb, ROUTING_LABEL_OFFSET, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
- hidden_item = proto_tree_add_item(label_tree, hf_mtp3_japan_pc, tvb, JAPAN_OPC_OFFSET, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
+ label_opc_item = proto_tree_add_item(label_tree, hf_mtp3_japan_opc, tvb, JAPAN_OPC_OFFSET, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN);
+ opc = tvb_get_letohs(tvb, JAPAN_OPC_OFFSET);
+ if (mtp3_pc_structured()) {
+ proto_item_append_text(label_opc_item, " (%s)", mtp3_pc_to_str(opc));
+ }
- if (mtp3_use_japan_5_bit_sls) {
- proto_tree_add_item(label_tree, hf_mtp3_japan_5_bit_sls, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, ENC_NA);
- proto_tree_add_item(label_tree, hf_mtp3_japan_5_bit_sls_spare, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, ENC_NA);
- } else {
- proto_tree_add_item(label_tree, hf_mtp3_japan_4_bit_sls, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, ENC_NA);
- proto_tree_add_item(label_tree, hf_mtp3_japan_4_bit_sls_spare, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, ENC_NA);
- }
+ hidden_item = proto_tree_add_item(label_tree, hf_mtp3_japan_pc, tvb, ROUTING_LABEL_OFFSET, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+ hidden_item = proto_tree_add_item(label_tree, hf_mtp3_japan_pc, tvb, JAPAN_OPC_OFFSET, JAPAN_PC_LENGTH, ENC_LITTLE_ENDIAN);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
+
+ if (mtp3_use_japan_5_bit_sls) {
+ proto_tree_add_item(label_tree, hf_mtp3_japan_5_bit_sls, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, ENC_NA);
+ proto_tree_add_item(label_tree, hf_mtp3_japan_5_bit_sls_spare, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, ENC_NA);
+ } else {
+ proto_tree_add_item(label_tree, hf_mtp3_japan_4_bit_sls, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, ENC_NA);
+ proto_tree_add_item(label_tree, hf_mtp3_japan_4_bit_sls_spare, tvb, JAPAN_SLS_OFFSET, JAPAN_SLS_SPARE_LENGTH, ENC_NA);
+ }
- break;
- default:
- DISSECTOR_ASSERT_NOT_REACHED();
+ break;
+ default:
+ DISSECTOR_ASSERT_NOT_REACHED();
}
mtp3_addr_opc->type = (Standard_Type)mtp3_standard;
@@ -630,18 +630,18 @@ dissect_mtp3_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
service_indicator = sio & SERVICE_INDICATOR_MASK;
switch (mtp3_standard) {
- case ITU_STANDARD:
- payload_tvb = tvb_new_subset_remaining(tvb, ITU_MTP_PAYLOAD_OFFSET);
- break;
- case ANSI_STANDARD:
- case CHINESE_ITU_STANDARD:
- payload_tvb = tvb_new_subset_remaining(tvb, ANSI_MTP_PAYLOAD_OFFSET);
- break;
- case JAPAN_STANDARD:
- payload_tvb = tvb_new_subset_remaining(tvb, JAPAN_MTP_PAYLOAD_OFFSET);
- break;
- default:
- DISSECTOR_ASSERT_NOT_REACHED();
+ case ITU_STANDARD:
+ payload_tvb = tvb_new_subset_remaining(tvb, ITU_MTP_PAYLOAD_OFFSET);
+ break;
+ case ANSI_STANDARD:
+ case CHINESE_ITU_STANDARD:
+ payload_tvb = tvb_new_subset_remaining(tvb, ANSI_MTP_PAYLOAD_OFFSET);
+ break;
+ case JAPAN_STANDARD:
+ payload_tvb = tvb_new_subset_remaining(tvb, JAPAN_MTP_PAYLOAD_OFFSET);
+ break;
+ default:
+ DISSECTOR_ASSERT_NOT_REACHED();
}
col_set_str(pinfo->cinfo, COL_INFO, "DATA ");
@@ -653,34 +653,34 @@ dissect_mtp3_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static guint
heur_mtp3_standard(tvbuff_t *tvb, packet_info *pinfo, guint8 si)
{
- tvbuff_t *payload;
+ tvbuff_t *payload;
- switch (si) {
+ switch (si) {
case MTP_SI_SCCP:
- {
- payload = tvb_new_subset_remaining(tvb, ITU_HEADER_LENGTH);
- if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), payload, ITU_STANDARD)) {
- return ITU_STANDARD;
- }
- payload = tvb_new_subset_remaining(tvb, ANSI_HEADER_LENGTH);
- if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), payload, ANSI_STANDARD)) {
- return ANSI_STANDARD;
- }
- payload = tvb_new_subset_remaining(tvb, ANSI_HEADER_LENGTH);
- if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), payload, CHINESE_ITU_STANDARD)) {
- return CHINESE_ITU_STANDARD;
- }
- payload = tvb_new_subset_remaining(tvb, JAPAN_HEADER_LENGTH);
- if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), payload, JAPAN_STANDARD)) {
- return JAPAN_STANDARD;
- }
-
- return HEURISTIC_FAILED_STANDARD;
-
- }
- default:
- return HEURISTIC_FAILED_STANDARD;
+ {
+ payload = tvb_new_subset_remaining(tvb, ITU_HEADER_LENGTH);
+ if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), payload, ITU_STANDARD)) {
+ return ITU_STANDARD;
+ }
+ payload = tvb_new_subset_remaining(tvb, ANSI_HEADER_LENGTH);
+ if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), payload, ANSI_STANDARD)) {
+ return ANSI_STANDARD;
+ }
+ payload = tvb_new_subset_remaining(tvb, ANSI_HEADER_LENGTH);
+ if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), payload, CHINESE_ITU_STANDARD)) {
+ return CHINESE_ITU_STANDARD;
+ }
+ payload = tvb_new_subset_remaining(tvb, JAPAN_HEADER_LENGTH);
+ if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), payload, JAPAN_STANDARD)) {
+ return JAPAN_STANDARD;
+ }
+
+ return HEURISTIC_FAILED_STANDARD;
+
}
+ default:
+ return HEURISTIC_FAILED_STANDARD;
+ }
}
@@ -694,81 +694,81 @@ reset_mtp3_standard(void)
static void
dissect_mtp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- mtp3_tap_rec_t* tap_rec = wmem_new0(wmem_packet_scope(), mtp3_tap_rec_t);
- gint heuristic_standard;
- guint8 si;
- mtp3_addr_pc_t* mtp3_addr_dpc;
- mtp3_addr_pc_t* mtp3_addr_opc;
-
- /* Set up structures needed to add the protocol subtree and manage it */
- proto_item *mtp3_item = NULL, *gen_item;
- proto_tree *mtp3_tree;
-
- pref_mtp3_standard = mtp3_standard;
-
- mtp3_item = proto_tree_add_item(tree, proto_mtp3, tvb, 0, 0, ENC_NA);
-
- si = tvb_get_guint8(tvb, SIO_OFFSET) & SERVICE_INDICATOR_MASK;
- if (mtp3_heuristic_standard) {
- heuristic_standard = heur_mtp3_standard(tvb, pinfo, si);
- if (heuristic_standard == HEURISTIC_FAILED_STANDARD) {
- gen_item = proto_tree_add_uint_format(tree, hf_mtp3_heuristic_standard, tvb, 0, 0, mtp3_standard,
- "Could not determine Heuristic using %s", val_to_str_const(mtp3_standard, mtp3_standard_vals, "unknown"));
- } else {
- gen_item = proto_tree_add_uint_format(tree, hf_mtp3_heuristic_standard, tvb, 0, 0, heuristic_standard,
- "%s", val_to_str_const(heuristic_standard, mtp3_standard_vals, "unknown"));
- mtp3_standard = heuristic_standard;
-
- /* Register a frame-end routine to ensure mtp3_standard is set
- * back even if an exception is thrown.
- */
- register_frame_end_routine(pinfo, reset_mtp3_standard);
- }
- PROTO_ITEM_SET_GENERATED(gen_item);
+ mtp3_tap_rec_t* tap_rec = wmem_new0(wmem_packet_scope(), mtp3_tap_rec_t);
+ gint heuristic_standard;
+ guint8 si;
+ mtp3_addr_pc_t* mtp3_addr_dpc;
+ mtp3_addr_pc_t* mtp3_addr_opc;
+
+ /* Set up structures needed to add the protocol subtree and manage it */
+ proto_item *mtp3_item = NULL, *gen_item;
+ proto_tree *mtp3_tree;
+
+ pref_mtp3_standard = mtp3_standard;
+
+ mtp3_item = proto_tree_add_item(tree, proto_mtp3, tvb, 0, 0, ENC_NA);
+
+ si = tvb_get_guint8(tvb, SIO_OFFSET) & SERVICE_INDICATOR_MASK;
+ if (mtp3_heuristic_standard) {
+ heuristic_standard = heur_mtp3_standard(tvb, pinfo, si);
+ if (heuristic_standard == HEURISTIC_FAILED_STANDARD) {
+ gen_item = proto_tree_add_uint_format(tree, hf_mtp3_heuristic_standard, tvb, 0, 0, mtp3_standard,
+ "Could not determine Heuristic using %s", val_to_str_const(mtp3_standard, mtp3_standard_vals, "unknown"));
+ } else {
+ gen_item = proto_tree_add_uint_format(tree, hf_mtp3_heuristic_standard, tvb, 0, 0, heuristic_standard,
+ "%s", val_to_str_const(heuristic_standard, mtp3_standard_vals, "unknown"));
+ mtp3_standard = heuristic_standard;
+
+ /* Register a frame-end routine to ensure mtp3_standard is set
+ * back even if an exception is thrown.
+ */
+ register_frame_end_routine(pinfo, reset_mtp3_standard);
}
+ PROTO_ITEM_SET_GENERATED(gen_item);
+ }
- /* Make entries in Protocol column on summary display */
- switch(mtp3_standard) {
+ /* Make entries in Protocol column on summary display */
+ switch(mtp3_standard) {
case ITU_STANDARD:
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3 (Int. ITU)");
- proto_item_set_len(mtp3_item, ITU_HEADER_LENGTH);
- break;
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3 (Int. ITU)");
+ proto_item_set_len(mtp3_item, ITU_HEADER_LENGTH);
+ break;
case ANSI_STANDARD:
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3 (ANSI)");
- proto_item_set_len(mtp3_item, ANSI_HEADER_LENGTH);
- break;
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3 (ANSI)");
+ proto_item_set_len(mtp3_item, ANSI_HEADER_LENGTH);
+ break;
case CHINESE_ITU_STANDARD:
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3 (Chin. ITU)");
- proto_item_set_len(mtp3_item, ANSI_HEADER_LENGTH);
- break;
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3 (Chin. ITU)");
+ proto_item_set_len(mtp3_item, ANSI_HEADER_LENGTH);
+ break;
case JAPAN_STANDARD:
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3 (Japan)");
- proto_item_set_len(mtp3_item, JAPAN_HEADER_LENGTH);
- break;
- };
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MTP3 (Japan)");
+ proto_item_set_len(mtp3_item, JAPAN_HEADER_LENGTH);
+ break;
+ };
- /* create display subtree for the protocol */
- mtp3_tree = proto_item_add_subtree(mtp3_item, ett_mtp3);
+ /* create display subtree for the protocol */
+ mtp3_tree = proto_item_add_subtree(mtp3_item, ett_mtp3);
- mtp3_addr_opc = (mtp3_addr_pc_t *)wmem_alloc0(pinfo->pool, sizeof(mtp3_addr_pc_t));
- mtp3_addr_dpc = (mtp3_addr_pc_t *)wmem_alloc0(pinfo->pool, sizeof(mtp3_addr_pc_t));
+ mtp3_addr_opc = (mtp3_addr_pc_t *)wmem_alloc0(pinfo->pool, sizeof(mtp3_addr_pc_t));
+ mtp3_addr_dpc = (mtp3_addr_pc_t *)wmem_alloc0(pinfo->pool, sizeof(mtp3_addr_pc_t));
- /* Dissect the packet (even if !tree so can call sub-dissectors and update
- * the source and destination address columns) */
- dissect_mtp3_sio(tvb, mtp3_tree, mtp3_addr_opc, mtp3_addr_dpc);
- dissect_mtp3_routing_label(tvb, pinfo, mtp3_tree, mtp3_addr_opc, mtp3_addr_dpc);
+ /* Dissect the packet (even if !tree so can call sub-dissectors and update
+ * the source and destination address columns) */
+ dissect_mtp3_sio(tvb, mtp3_tree, mtp3_addr_opc, mtp3_addr_dpc);
+ dissect_mtp3_routing_label(tvb, pinfo, mtp3_tree, mtp3_addr_opc, mtp3_addr_dpc);
- memcpy(&(tap_rec->addr_opc), mtp3_addr_opc, sizeof(mtp3_addr_pc_t));
- memcpy(&(tap_rec->addr_dpc), mtp3_addr_dpc, sizeof(mtp3_addr_pc_t));
+ memcpy(&(tap_rec->addr_opc), mtp3_addr_opc, sizeof(mtp3_addr_pc_t));
+ memcpy(&(tap_rec->addr_dpc), mtp3_addr_dpc, sizeof(mtp3_addr_pc_t));
- tap_rec->si_code = (tvb_get_guint8(tvb, SIO_OFFSET) & SERVICE_INDICATOR_MASK);
- tap_rec->size = tvb_length(tvb);
+ tap_rec->si_code = (tvb_get_guint8(tvb, SIO_OFFSET) & SERVICE_INDICATOR_MASK);
+ tap_rec->size = tvb_length(tvb);
- tap_queue_packet(mtp3_tap, pinfo, tap_rec);
+ tap_queue_packet(mtp3_tap, pinfo, tap_rec);
- dissect_mtp3_payload(tvb, pinfo, tree);
+ dissect_mtp3_payload(tvb, pinfo, tree);
- mtp3_standard = pref_mtp3_standard;
+ mtp3_standard = pref_mtp3_standard;
}
void
@@ -822,39 +822,39 @@ proto_register_mtp3(void)
};
static const enum_val_t mtp3_options[] = {
- { "itu", "ITU", ITU_STANDARD },
- { "ansi", "ANSI", ANSI_STANDARD },
- { "chinese-itu", "Chinese ITU", CHINESE_ITU_STANDARD },
- { "japan", "Japan", JAPAN_STANDARD },
- { NULL, NULL, 0 }
+ { "itu", "ITU", ITU_STANDARD },
+ { "ansi", "ANSI", ANSI_STANDARD },
+ { "chinese-itu", "Chinese ITU", CHINESE_ITU_STANDARD },
+ { "japan", "Japan", JAPAN_STANDARD },
+ { NULL, NULL, 0 }
};
static const enum_val_t mtp3_addr_fmt_str_e[] = {
- { "decimal", "Decimal", MTP3_ADDR_FMT_DEC },
- { "hexadecimal", "Hexadecimal", MTP3_ADDR_FMT_HEX },
- { "ni-decimal", "NI-Decimal", MTP3_ADDR_FMT_NI_DEC },
- { "ni-hexadecimal", "NI-Hexadecimal", MTP3_ADDR_FMT_NI_HEX },
- { "dashed", "Dashed", MTP3_ADDR_FMT_DASHED },
- { NULL, NULL, 0 }
+ { "decimal", "Decimal", MTP3_ADDR_FMT_DEC },
+ { "hexadecimal", "Hexadecimal", MTP3_ADDR_FMT_HEX },
+ { "ni-decimal", "NI-Decimal", MTP3_ADDR_FMT_NI_DEC },
+ { "ni-hexadecimal", "NI-Hexadecimal", MTP3_ADDR_FMT_NI_HEX },
+ { "dashed", "Dashed", MTP3_ADDR_FMT_DASHED },
+ { NULL, NULL, 0 }
};
static const enum_val_t itu_pc_structures[] = {
- { "unstructured", "Unstructured", ITU_PC_STRUCTURE_NONE},
- { "3-8-3", "3-8-3", ITU_PC_STRUCTURE_3_8_3 },
- { "4-3-4-3", "4-3-4-3", ITU_PC_STRUCTURE_4_3_4_3 },
- { NULL, NULL, 0 }
+ { "unstructured", "Unstructured", ITU_PC_STRUCTURE_NONE},
+ { "3-8-3", "3-8-3", ITU_PC_STRUCTURE_3_8_3 },
+ { "4-3-4-3", "4-3-4-3", ITU_PC_STRUCTURE_4_3_4_3 },
+ { NULL, NULL, 0 }
};
static const enum_val_t japan_pc_structures[] = {
- { "unstructured", "Unstructured", JAPAN_PC_STRUCTURE_NONE},
- { "7-4-5", "7-4-5", JAPAN_PC_STRUCTURE_7_4_5 },
- { "3-4-4-5", "3-4-4-5", JAPAN_PC_STRUCTURE_3_4_4_5 },
- { NULL, NULL, 0 }
+ { "unstructured", "Unstructured", JAPAN_PC_STRUCTURE_NONE},
+ { "7-4-5", "7-4-5", JAPAN_PC_STRUCTURE_7_4_5 },
+ { "3-4-4-5", "3-4-4-5", JAPAN_PC_STRUCTURE_3_4_4_5 },
+ { NULL, NULL, 0 }
};
/* Register the protocol name and description */
proto_mtp3 = proto_register_protocol("Message Transfer Part Level 3",
- "MTP3", "mtp3");
+ "MTP3", "mtp3");
mtp3_handle = register_dissector("mtp3", dissect_mtp3, proto_mtp3);
/* Required function calls to register the header fields and subtrees used */
@@ -862,48 +862,48 @@ proto_register_mtp3(void)
proto_register_subtree_array(ett, array_length(ett));
mtp3_sio_dissector_table = register_dissector_table("mtp3.service_indicator",
- "MTP3 Service indicator",
- FT_UINT8, BASE_HEX);
+ "MTP3 Service indicator",
+ FT_UINT8, BASE_HEX);
mtp3_tap = register_tap("mtp3");
mtp3_module = prefs_register_protocol(proto_mtp3, NULL);
prefs_register_bool_preference(mtp3_module, "heuristic_standard",
- "Try to determine the MTP3 standard heuristically",
- "This only works for SCCP traffic for now",
- &mtp3_heuristic_standard);
+ "Try to determine the MTP3 standard heuristically",
+ "This only works for SCCP traffic for now",
+ &mtp3_heuristic_standard);
prefs_register_enum_preference(mtp3_module, "standard", "MTP3 standard",
- "The SS7 standard used in MTP3 packets",
- &mtp3_standard, mtp3_options, FALSE);
+ "The SS7 standard used in MTP3 packets",
+ &mtp3_standard, mtp3_options, FALSE);
prefs_register_enum_preference(mtp3_module, "itu_pc_structure", "ITU Pointcode structure",
- "The structure of the pointcodes in ITU networks",
- &itu_pc_structure, itu_pc_structures, FALSE);
+ "The structure of the pointcodes in ITU networks",
+ &itu_pc_structure, itu_pc_structures, FALSE);
prefs_register_enum_preference(mtp3_module, "japan_pc_structure", "Japan Pointcode structure",
- "The structure of the pointcodes in Japan networks",
- &japan_pc_structure, japan_pc_structures, FALSE);
+ "The structure of the pointcodes in Japan networks",
+ &japan_pc_structure, japan_pc_structures, FALSE);
prefs_register_bool_preference(mtp3_module, "ansi_5_bit_sls",
- "Use 5-bit SLS (ANSI only)",
- "Use 5-bit (instead of 8-bit) SLS in ANSI MTP3 packets",
- &mtp3_use_ansi_5_bit_sls);
+ "Use 5-bit SLS (ANSI only)",
+ "Use 5-bit (instead of 8-bit) SLS in ANSI MTP3 packets",
+ &mtp3_use_ansi_5_bit_sls);
prefs_register_bool_preference(mtp3_module, "japan_5_bit_sls",
- "Use 5-bit SLS (Japan only)",
- "Use 5-bit (instead of 4-bit) SLS in Japan MTP3 packets",
- &mtp3_use_japan_5_bit_sls);
+ "Use 5-bit SLS (Japan only)",
+ "Use 5-bit (instead of 4-bit) SLS in Japan MTP3 packets",
+ &mtp3_use_japan_5_bit_sls);
prefs_register_enum_preference(mtp3_module, "addr_format", "Address Format",
- "Format for point code in the address columns",
- &mtp3_addr_fmt, mtp3_addr_fmt_str_e, FALSE);
+ "Format for point code in the address columns",
+ &mtp3_addr_fmt, mtp3_addr_fmt_str_e, FALSE);
prefs_register_bool_preference(mtp3_module, "itu_priority",
- "Show MSU priority (national option, ITU and China ITU only)",
- "Decode the spare bits of the SIO as the MSU priority (a national option in ITU)",
- &mtp3_show_itu_priority);
+ "Show MSU priority (national option, ITU and China ITU only)",
+ "Decode the spare bits of the SIO as the MSU priority (a national option in ITU)",
+ &mtp3_show_itu_priority);
}
@@ -915,3 +915,16 @@ proto_reg_handoff_mtp3(void)
data_handle = find_dissector("data");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-nbd.c b/epan/dissectors/packet-nbd.c
index 5348527478..ba3acfd47b 100644
--- a/epan/dissectors/packet-nbd.c
+++ b/epan/dissectors/packet-nbd.c
@@ -53,15 +53,15 @@ static gint ett_nbd = -1;
static gboolean nbd_desegment = TRUE;
typedef struct _nbd_transaction_t {
- guint32 req_frame;
- guint32 rep_frame;
- nstime_t req_time;
+ guint32 req_frame;
+ guint32 rep_frame;
+ nstime_t req_time;
guint32 datalen;
guint8 type;
} nbd_transaction_t;
typedef struct _nbd_conv_info_t {
- wmem_tree_t *unacked_pdus; /* indexed by handle, whichs wraps quite frequently */
- wmem_tree_t *acked_pdus; /* indexed by packet# and handle */
+ wmem_tree_t *unacked_pdus; /* indexed by handle, whichs wraps quite frequently */
+ wmem_tree_t *acked_pdus; /* indexed by packet# and handle */
} nbd_conv_info_t;
@@ -418,38 +418,38 @@ dissect_nbd_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
void proto_register_nbd(void)
{
- static hf_register_info hf[] = {
- { &hf_nbd_magic,
- { "Magic", "nbd.magic", FT_UINT32, BASE_HEX,
- NULL, 0x0, NULL, HFILL }},
- { &hf_nbd_type,
- { "Type", "nbd.type", FT_UINT32, BASE_DEC,
- VALS(nbd_type_vals), 0x0, NULL, HFILL }},
- { &hf_nbd_error,
- { "Error", "nbd.error", FT_UINT32, BASE_DEC,
- NULL, 0x0, NULL, HFILL }},
- { &hf_nbd_len,
- { "Length", "nbd.len", FT_UINT32, BASE_DEC,
- NULL, 0x0, NULL, HFILL }},
- { &hf_nbd_handle,
- { "Handle", "nbd.handle", FT_UINT64, BASE_HEX,
- NULL, 0x0, NULL, HFILL }},
- { &hf_nbd_from,
- { "From", "nbd.from", FT_UINT64, BASE_HEX,
- NULL, 0x0, NULL, HFILL }},
- { &hf_nbd_response_in,
- { "Response In", "nbd.response_in", FT_FRAMENUM, BASE_NONE,
- NULL, 0x0, "The response to this NBD request is in this frame", HFILL }},
- { &hf_nbd_response_to,
- { "Request In", "nbd.response_to", FT_FRAMENUM, BASE_NONE,
- NULL, 0x0, "This is a response to the NBD request in this frame", HFILL }},
- { &hf_nbd_time,
- { "Time", "nbd.time", FT_RELATIVE_TIME, BASE_NONE,
- NULL, 0x0, "The time between the Call and the Reply", HFILL }},
-
- { &hf_nbd_data,
- { "Data", "nbd.data", FT_BYTES, BASE_NONE,
- NULL, 0x0, NULL, HFILL }},
+ static hf_register_info hf[] = {
+ { &hf_nbd_magic,
+ { "Magic", "nbd.magic", FT_UINT32, BASE_HEX,
+ NULL, 0x0, NULL, HFILL }},
+ { &hf_nbd_type,
+ { "Type", "nbd.type", FT_UINT32, BASE_DEC,
+ VALS(nbd_type_vals), 0x0, NULL, HFILL }},
+ { &hf_nbd_error,
+ { "Error", "nbd.error", FT_UINT32, BASE_DEC,
+ NULL, 0x0, NULL, HFILL }},
+ { &hf_nbd_len,
+ { "Length", "nbd.len", FT_UINT32, BASE_DEC,
+ NULL, 0x0, NULL, HFILL }},
+ { &hf_nbd_handle,
+ { "Handle", "nbd.handle", FT_UINT64, BASE_HEX,
+ NULL, 0x0, NULL, HFILL }},
+ { &hf_nbd_from,
+ { "From", "nbd.from", FT_UINT64, BASE_HEX,
+ NULL, 0x0, NULL, HFILL }},
+ { &hf_nbd_response_in,
+ { "Response In", "nbd.response_in", FT_FRAMENUM, BASE_NONE,
+ NULL, 0x0, "The response to this NBD request is in this frame", HFILL }},
+ { &hf_nbd_response_to,
+ { "Request In", "nbd.response_to", FT_FRAMENUM, BASE_NONE,
+ NULL, 0x0, "This is a response to the NBD request in this frame", HFILL }},
+ { &hf_nbd_time,
+ { "Time", "nbd.time", FT_RELATIVE_TIME, BASE_NONE,
+ NULL, 0x0, "The time between the Call and the Reply", HFILL }},
+
+ { &hf_nbd_data,
+ { "Data", "nbd.data", FT_BYTES, BASE_NONE,
+ NULL, 0x0, NULL, HFILL }},
};
@@ -467,10 +467,10 @@ void proto_register_nbd(void)
nbd_module = prefs_register_protocol(proto_nbd, NULL);
prefs_register_bool_preference(nbd_module, "desegment_nbd_messages",
- "Reassemble NBD messages spanning multiple TCP segments",
- "Whether the NBD dissector should reassemble messages spanning multiple TCP segments."
- " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings",
- &nbd_desegment);
+ "Reassemble NBD messages spanning multiple TCP segments",
+ "Whether the NBD dissector should reassemble messages spanning multiple TCP segments."
+ " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings",
+ &nbd_desegment);
}
@@ -479,3 +479,16 @@ proto_reg_handoff_nbd(void)
{
heur_dissector_add("tcp", dissect_nbd_tcp_heur, proto_nbd);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-nbns.c b/epan/dissectors/packet-nbns.c
index 1ddb4b2599..4888ba0fbc 100644
--- a/epan/dissectors/packet-nbns.c
+++ b/epan/dissectors/packet-nbns.c
@@ -119,25 +119,25 @@ static gboolean nbss_desegment = TRUE;
http://discuss.microsoft.com/SCRIPTS/WA-MSD.EXE?A2=ind9811A&L=cifs&P=R386
for information on the fourth. */
-#define UDP_PORT_NBNS 137
-#define UDP_PORT_NBDGM 138
-#define TCP_PORT_NBSS 139
-#define TCP_PORT_CIFS 445
+#define UDP_PORT_NBNS 137
+#define UDP_PORT_NBDGM 138
+#define TCP_PORT_NBSS 139
+#define TCP_PORT_CIFS 445
/* Packet structure taken from RFC 1002. See also RFC 1001.
* Opcode, flags, and rcode treated as "flags", similarly to DNS,
* to make it easier to lift the dissection code from "packet-dns.c". */
/* Offsets of fields in the NBNS header. */
-#define NBNS_ID 0
-#define NBNS_FLAGS 2
-#define NBNS_QUEST 4
-#define NBNS_ANS 6
-#define NBNS_AUTH 8
-#define NBNS_ADD 10
+#define NBNS_ID 0
+#define NBNS_FLAGS 2
+#define NBNS_QUEST 4
+#define NBNS_ANS 6
+#define NBNS_AUTH 8
+#define NBNS_ADD 10
/* Length of NBNS header. */
-#define NBNS_HDRLEN 12
+#define NBNS_HDRLEN 12
/* type values */
#define T_NB 32 /* NetBIOS name service RR */
@@ -146,7 +146,7 @@ static gboolean nbss_desegment = TRUE;
/* Bit fields in the flags */
#define F_RESPONSE (1<<15) /* packet is response */
#define F_OPCODE (0xF<<11) /* query opcode */
-#define OPCODE_SHIFT 11
+#define OPCODE_SHIFT 11
#define F_AUTHORITATIVE (1<<10) /* response is authoritative */
#define F_TRUNCATED (1<<9) /* response is truncated */
#define F_RECDESIRED (1<<8) /* recursion desired */
@@ -234,33 +234,33 @@ static const value_string rcode_vals[] = {
/* Values for the "NB_FLAGS" field of RR data. From RFC 1001 and 1002,
* except for NB_FLAGS_ONT_H_NODE, which was discovered by looking at
* packet traces. */
-#define NB_FLAGS_ONT (3<<(15-2)) /* bits for node type */
-#define NB_FLAGS_ONT_B_NODE (0<<(15-2)) /* B-mode node */
-#define NB_FLAGS_ONT_P_NODE (1<<(15-2)) /* P-mode node */
-#define NB_FLAGS_ONT_M_NODE (2<<(15-2)) /* M-mode node */
-#define NB_FLAGS_ONT_H_NODE (3<<(15-2)) /* H-mode node */
+#define NB_FLAGS_ONT (3<<(15-2)) /* bits for node type */
+#define NB_FLAGS_ONT_B_NODE (0<<(15-2)) /* B-mode node */
+#define NB_FLAGS_ONT_P_NODE (1<<(15-2)) /* P-mode node */
+#define NB_FLAGS_ONT_M_NODE (2<<(15-2)) /* M-mode node */
+#define NB_FLAGS_ONT_H_NODE (3<<(15-2)) /* H-mode node */
-#define NB_FLAGS_G (1<<(15-0)) /* group name */
+#define NB_FLAGS_G (1<<(15-0)) /* group name */
/* Values for the "NAME_FLAGS" field of a NODE_NAME entry in T_NBSTAT
* RR data. From RFC 1001 and 1002; as I remember, the "NAME_FLAGS"
* field doesn't include any special values for H-mode nodes, even
* though one can register them (if so, perhaps that was done to
* avoid surprising clients that don't know about H-mode nodes). */
-#define NAME_FLAGS_PRM (1<<(15-6)) /* name is permanent node name */
+#define NAME_FLAGS_PRM (1<<(15-6)) /* name is permanent node name */
-#define NAME_FLAGS_ACT (1<<(15-5)) /* name is active */
+#define NAME_FLAGS_ACT (1<<(15-5)) /* name is active */
-#define NAME_FLAGS_CNF (1<<(15-4)) /* name is in conflict */
+#define NAME_FLAGS_CNF (1<<(15-4)) /* name is in conflict */
-#define NAME_FLAGS_DRG (1<<(15-3)) /* name is being deregistered */
+#define NAME_FLAGS_DRG (1<<(15-3)) /* name is being deregistered */
-#define NAME_FLAGS_ONT (3<<(15-2)) /* bits for node type */
-#define NAME_FLAGS_ONT_B_NODE (0<<(15-2)) /* B-mode node */
-#define NAME_FLAGS_ONT_P_NODE (1<<(15-2)) /* P-mode node */
-#define NAME_FLAGS_ONT_M_NODE (2<<(15-2)) /* M-mode node */
+#define NAME_FLAGS_ONT (3<<(15-2)) /* bits for node type */
+#define NAME_FLAGS_ONT_B_NODE (0<<(15-2)) /* B-mode node */
+#define NAME_FLAGS_ONT_P_NODE (1<<(15-2)) /* P-mode node */
+#define NAME_FLAGS_ONT_M_NODE (2<<(15-2)) /* M-mode node */
-#define NAME_FLAGS_G (1<<(15-0)) /* group name */
+#define NAME_FLAGS_G (1<<(15-0)) /* group name */
static const value_string name_flags_ont_vals[] = {
{ NAME_FLAGS_ONT_B_NODE, "B-node" },
@@ -294,9 +294,9 @@ nbns_type_name (int type)
static proto_tree *
add_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
- const char *name, int namelen,
- const char *type_name, const char *class_description,
- guint ttl, gushort data_len)
+ const char *name, int namelen,
+ const char *type_name, const char *class_description,
+ guint ttl, gushort data_len)
{
proto_tree *rr_tree;
@@ -316,7 +316,7 @@ add_rr_to_tree(proto_item *trr, int rr_type, tvbuff_t *tvb, int offset,
static int
get_nbns_name(tvbuff_t *tvb, int offset, int nbns_data_offset,
- char *name_ret, int name_ret_len, int *name_type_ret)
+ char *name_ret, int name_ret_len, int *name_type_ret)
{
int name_len;
const guchar *name;
@@ -342,9 +342,9 @@ get_nbns_name(tvbuff_t *tvb, int offset, int nbns_data_offset,
* turn into one character in the decoded name. */
cname = *pname;
if (cname == '\0')
- break; /* no more characters */
+ break; /* no more characters */
if (cname == '.')
- break; /* scope ID follows */
+ break; /* scope ID follows */
if (cname < 'A' || cname > 'Z') {
/* Not legal. */
nbname = "Illegal NetBIOS name (1st character not between A and Z in first-level encoding)";
@@ -411,8 +411,8 @@ bad:
static int
get_nbns_name_type_class(tvbuff_t *tvb, int offset, int nbns_data_offset,
- char *name_ret, int *name_len_ret, int *name_type_ret,
- int *type_ret, int *class_ret)
+ char *name_ret, int *name_len_ret, int *name_type_ret,
+ int *type_ret, int *class_ret)
{
int name_len;
int type;
@@ -436,7 +436,7 @@ get_nbns_name_type_class(tvbuff_t *tvb, int offset, int nbns_data_offset,
static void
add_name_and_type(proto_tree *tree, tvbuff_t *tvb, int offset, int len,
- const char *tag, const char *name, int name_type)
+ const char *tag, const char *name, int name_type)
{
if (name_type != -1) {
proto_tree_add_text(tree, tvb, offset, len, "%s: %s (%s)",
@@ -451,7 +451,7 @@ add_name_and_type(proto_tree *tree, tvbuff_t *tvb, int offset, int len,
static int
dissect_nbns_query(tvbuff_t *tvb, int offset, int nbns_data_offset,
- column_info *cinfo, proto_tree *nbns_tree)
+ column_info *cinfo, proto_tree *nbns_tree)
{
int len;
char *name;
@@ -499,7 +499,7 @@ dissect_nbns_query(tvbuff_t *tvb, int offset, int nbns_data_offset,
static void
nbns_add_nbns_flags(column_info *cinfo, proto_tree *nbns_tree, tvbuff_t *tvb, int offset,
- gushort flags, int is_wack)
+ gushort flags, int is_wack)
{
char *buf;
guint16 opcode;
@@ -613,7 +613,7 @@ nbns_add_name_flags(proto_tree *rr_tree, tvbuff_t *tvb, int offset)
static int
dissect_nbns_answer(tvbuff_t *tvb, packet_info *pinfo, int offset, int nbns_data_offset,
- column_info *cinfo, proto_tree *nbns_tree, int opcode)
+ column_info *cinfo, proto_tree *nbns_tree, int opcode)
{
int len;
char *name;
@@ -655,7 +655,7 @@ dissect_nbns_answer(tvbuff_t *tvb, packet_info *pinfo, int offset, int nbns_data
/* XXX: This code should be simplified */
switch (type) {
- case T_NB: /* "NB" record */
+ case T_NB: /* "NB" record */
if (cinfo != NULL) {
if (opcode != OPCODE_WACK) {
col_append_fstr(cinfo, COL_INFO, " %s %s",
@@ -686,7 +686,7 @@ dissect_nbns_answer(tvbuff_t *tvb, packet_info *pinfo, int offset, int nbns_data
}
flags = tvb_get_ntohs(tvb, cur_offset);
nbns_add_nbns_flags(cinfo, rr_tree, tvb, cur_offset,
- flags, 1);
+ flags, 1);
cur_offset += 2;
data_len -= 2;
} else {
@@ -703,15 +703,15 @@ dissect_nbns_answer(tvbuff_t *tvb, packet_info *pinfo, int offset, int nbns_data
break;
}
proto_tree_add_text(rr_tree, tvb, cur_offset, 4,
- "Addr: %s",
- tvb_ip_to_str(tvb, cur_offset));
+ "Addr: %s",
+ tvb_ip_to_str(tvb, cur_offset));
cur_offset += 4;
data_len -= 4;
}
}
break;
- case T_NBSTAT: /* "NBSTAT" record */
+ case T_NBSTAT: /* "NBSTAT" record */
if (cinfo != NULL)
col_append_fstr(cinfo, COL_INFO, " %s", type_name);
@@ -999,7 +999,7 @@ dissect_nbns_answer(tvbuff_t *tvb, packet_info *pinfo, int offset, int nbns_data
static int
dissect_query_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
- int count, column_info *cinfo, proto_tree *nbns_tree)
+ int count, column_info *cinfo, proto_tree *nbns_tree)
{
int start_off, add_off;
proto_tree *qatree;
@@ -1021,8 +1021,8 @@ dissect_query_records(tvbuff_t *tvb, int cur_off, int nbns_data_offset,
static int
dissect_answer_records(tvbuff_t *tvb, packet_info *pinfo, int cur_off, int nbns_data_offset,
- int count, column_info *cinfo, proto_tree *nbns_tree,
- int opcode, const char *name)
+ int count, column_info *cinfo, proto_tree *nbns_tree,
+ int opcode, const char *name)
{
int start_off, add_off;
proto_tree *qatree;
@@ -1044,12 +1044,12 @@ dissect_answer_records(tvbuff_t *tvb, packet_info *pinfo, int cur_off, int nbns_
static void
dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- int offset = 0;
- int nbns_data_offset;
- proto_tree *nbns_tree = NULL;
- proto_item *ti;
- guint16 id, flags, opcode, quest, ans, auth, add;
- int cur_off;
+ int offset = 0;
+ int nbns_data_offset;
+ proto_tree *nbns_tree = NULL;
+ proto_item *ti;
+ guint16 id, flags, opcode, quest, ans, auth, add;
+ int cur_off;
nbns_data_offset = offset;
@@ -1136,34 +1136,34 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* NetBIOS datagram packet, from RFC 1002, page 32 */
struct nbdgm_header {
- guint8 msg_type;
+ guint8 msg_type;
struct {
- guint8 more;
- guint8 first;
- guint8 node_type;
+ guint8 more;
+ guint8 first;
+ guint8 node_type;
} flags;
- guint16 dgm_id;
- guint32 src_ip;
- guint16 src_port;
+ guint16 dgm_id;
+ guint32 src_ip;
+ guint16 src_port;
/* For packets with data */
- guint16 dgm_length;
- guint16 pkt_offset;
+ guint16 dgm_length;
+ guint16 pkt_offset;
/* For error packets */
- guint8 error_code;
+ guint8 error_code;
};
/*
* NBDS message types.
*/
-#define NBDS_DIRECT_UNIQUE 0x10
-#define NBDS_DIRECT_GROUP 0x11
-#define NBDS_BROADCAST 0x12
-#define NBDS_ERROR 0x13
-#define NBDS_QUERY_REQUEST 0x14
-#define NBDS_POS_QUERY_RESPONSE 0x15
-#define NBDS_NEG_QUERY_RESPONSE 0x16
+#define NBDS_DIRECT_UNIQUE 0x10
+#define NBDS_DIRECT_GROUP 0x11
+#define NBDS_BROADCAST 0x12
+#define NBDS_ERROR 0x13
+#define NBDS_QUERY_REQUEST 0x14
+#define NBDS_POS_QUERY_RESPONSE 0x15
+#define NBDS_NEG_QUERY_RESPONSE 0x16
static const value_string nbds_msgtype_vals[] = {
{ NBDS_DIRECT_UNIQUE, "Direct_unique datagram" },
@@ -1195,11 +1195,11 @@ static void
dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0;
- proto_tree *nbdgm_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *nbdgm_tree = NULL;
+ proto_item *ti = NULL;
struct nbdgm_header header;
int flags;
- tvbuff_t *next_tvb;
+ tvbuff_t *next_tvb;
char *name;
int name_type;
@@ -1348,12 +1348,12 @@ dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/*
* NetBIOS Session Service message types (RFC 1002).
*/
-#define SESSION_MESSAGE 0x00
-#define SESSION_REQUEST 0x81
-#define POSITIVE_SESSION_RESPONSE 0x82
-#define NEGATIVE_SESSION_RESPONSE 0x83
-#define RETARGET_SESSION_RESPONSE 0x84
-#define SESSION_KEEP_ALIVE 0x85
+#define SESSION_MESSAGE 0x00
+#define SESSION_REQUEST 0x81
+#define POSITIVE_SESSION_RESPONSE 0x82
+#define NEGATIVE_SESSION_RESPONSE 0x83
+#define RETARGET_SESSION_RESPONSE 0x84
+#define SESSION_KEEP_ALIVE 0x85
static const value_string message_types[] = {
{ SESSION_MESSAGE, "Session message" },
@@ -1368,7 +1368,7 @@ static const value_string message_types[] = {
/*
* NetBIOS Session Service flags.
*/
-#define NBSS_FLAGS_E 0x1
+#define NBSS_FLAGS_E 0x1
static const value_string nbss_error_codes[] = {
{ 0x80, "Not listening on called name" },
@@ -1402,16 +1402,16 @@ dissect_nbss_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *ti = NULL;
proto_tree *field_tree;
proto_item *tf;
- guint8 msg_type;
- guint8 flags;
+ guint8 msg_type;
+ guint8 flags;
guint32 length;
int len;
- char *name;
+ char *name;
int name_type;
guint8 error_code;
tvbuff_t *next_tvb;
const char *saved_proto;
- void *pd_save;
+ void *pd_save;
name = (char *)wmem_alloc(wmem_packet_scope(), MAX_NAME_LEN);
@@ -1448,7 +1448,7 @@ dissect_nbss_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case SESSION_REQUEST:
len = get_nbns_name(tvb, offset, offset, name, MAX_NAME_LEN, &name_type);
if (tree)
- add_name_and_type(nbss_tree, tvb, offset, len,
+ add_name_and_type(nbss_tree, tvb, offset, len,
"Called name", name, name_type);
offset += len;
@@ -1457,7 +1457,7 @@ dissect_nbss_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
len = get_nbns_name(tvb, offset, offset, name, MAX_NAME_LEN, &name_type);
if (tree)
- add_name_and_type(nbss_tree, tvb, offset, len,
+ add_name_and_type(nbss_tree, tvb, offset, len,
"Calling name", name, name_type);
col_append_fstr(pinfo->cinfo, COL_INFO, "from %s", name);
@@ -1467,8 +1467,8 @@ dissect_nbss_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case NEGATIVE_SESSION_RESPONSE:
error_code = tvb_get_guint8(tvb, offset);
if (tree)
- proto_tree_add_uint(nbss_tree, hf_nbss_error_code, tvb, offset, 1,
- error_code);
+ proto_tree_add_uint(nbss_tree, hf_nbss_error_code, tvb, offset, 1,
+ error_code);
col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
val_to_str(error_code, nbss_error_codes, "Unknown (%x)"));
@@ -1477,14 +1477,14 @@ dissect_nbss_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
case RETARGET_SESSION_RESPONSE:
if (tree)
- proto_tree_add_item(nbss_tree, hf_nbss_retarget_ip_address,
- tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(nbss_tree, hf_nbss_retarget_ip_address,
+ tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
if (tree)
- proto_tree_add_item(nbss_tree, hf_nbss_retarget_port,
- tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(nbss_tree, hf_nbss_retarget_port,
+ tvb, offset, 2, ENC_BIG_ENDIAN);
break;
@@ -1511,16 +1511,16 @@ dissect_nbss_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
saved_proto = pinfo->current_proto;
pd_save = pinfo->private_data;
TRY {
- dissect_netbios_payload(next_tvb, pinfo, tree);
+ dissect_netbios_payload(next_tvb, pinfo, tree);
}
CATCH_NONFATAL_ERRORS {
- /* Restore the private_data structure in case one of the
- * called dissectors modified it (and, due to the exception,
- * was unable to restore it).
- */
- pinfo->private_data = pd_save;
+ /* Restore the private_data structure in case one of the
+ * called dissectors modified it (and, due to the exception,
+ * was unable to restore it).
+ */
+ pinfo->private_data = pd_save;
show_exception(tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
- pinfo->current_proto = saved_proto;
+ pinfo->current_proto = saved_proto;
}
ENDTRY;
break;
@@ -1556,9 +1556,9 @@ dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
guint length_remaining;
guint plen;
int max_data;
- guint8 msg_type;
- guint8 flags;
- guint32 length;
+ guint8 msg_type;
+ guint8 flags;
+ guint32 length;
gboolean is_cifs;
tvbuff_t *next_tvb;
@@ -1845,177 +1845,177 @@ proto_register_nbt(void)
static hf_register_info hf_nbns[] = {
{ &hf_nbns_flags,
- { "Flags", "nbns.flags",
+ { "Flags", "nbns.flags",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_nbns_flags_response,
- { "Response", "nbns.flags.response",
+ { "Response", "nbns.flags.response",
FT_BOOLEAN, 16, TFS(&tfs_flags_response), F_RESPONSE,
"Is the message a response?", HFILL }},
{ &hf_nbns_flags_opcode,
- { "Opcode", "nbns.flags.opcode",
+ { "Opcode", "nbns.flags.opcode",
FT_UINT16, BASE_DEC, VALS(opcode_vals), F_OPCODE,
"Operation code", HFILL }},
{ &hf_nbns_flags_authoritative,
- { "Authoritative", "nbns.flags.authoritative",
+ { "Authoritative", "nbns.flags.authoritative",
FT_BOOLEAN, 16, TFS(&tfs_flags_authoritative), F_AUTHORITATIVE,
"Is the server is an authority for the domain?", HFILL }},
{ &hf_nbns_flags_truncated,
- { "Truncated", "nbns.flags.truncated",
+ { "Truncated", "nbns.flags.truncated",
FT_BOOLEAN, 16, TFS(&tfs_flags_truncated), F_TRUNCATED,
"Is the message truncated?", HFILL }},
{ &hf_nbns_flags_recdesired,
- { "Recursion desired", "nbns.flags.recdesired",
+ { "Recursion desired", "nbns.flags.recdesired",
FT_BOOLEAN, 16, TFS(&tfs_flags_recdesired), F_RECDESIRED,
"Do query recursively?", HFILL }},
{ &hf_nbns_flags_recavail,
- { "Recursion available", "nbns.flags.recavail",
+ { "Recursion available", "nbns.flags.recavail",
FT_BOOLEAN, 16, TFS(&tfs_flags_recavail), F_RECAVAIL,
"Can the server do recursive queries?", HFILL }},
{ &hf_nbns_flags_broadcast,
- { "Broadcast", "nbns.flags.broadcast",
+ { "Broadcast", "nbns.flags.broadcast",
FT_BOOLEAN, 16, TFS(&tfs_flags_broadcast), F_BROADCAST,
"Is this a broadcast packet?", HFILL }},
{ &hf_nbns_flags_rcode,
- { "Reply code", "nbns.flags.rcode",
+ { "Reply code", "nbns.flags.rcode",
FT_UINT16, BASE_DEC, VALS(rcode_vals), F_RCODE,
NULL, HFILL }},
{ &hf_nbns_transaction_id,
- { "Transaction ID", "nbns.id",
+ { "Transaction ID", "nbns.id",
FT_UINT16, BASE_HEX, NULL, 0x0,
"Identification of transaction", HFILL }},
{ &hf_nbns_count_questions,
- { "Questions", "nbns.count.queries",
+ { "Questions", "nbns.count.queries",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Number of queries in packet", HFILL }},
{ &hf_nbns_count_answers,
- { "Answer RRs", "nbns.count.answers",
+ { "Answer RRs", "nbns.count.answers",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Number of answers in packet", HFILL }},
{ &hf_nbns_count_auth_rr,
- { "Authority RRs", "nbns.count.auth_rr",
+ { "Authority RRs", "nbns.count.auth_rr",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Number of authoritative records in packet", HFILL }},
{ &hf_nbns_count_add_rr,
- { "Additional RRs", "nbns.count.add_rr",
+ { "Additional RRs", "nbns.count.add_rr",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Number of additional records in packet", HFILL }},
{ &hf_nbns_name_flags,
- { "Name flags", "nbns.name_flags",
+ { "Name flags", "nbns.name_flags",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_nbns_name_flags_group,
- { "Name type", "nbns.name_flags.group",
+ { "Name type", "nbns.name_flags.group",
FT_BOOLEAN, 16, TFS(&tfs_group_unique_name), NAME_FLAGS_G,
NULL, HFILL }},
{ &hf_nbns_name_flags_ont,
- { "ONT", "nbns.name_flags.ont",
+ { "ONT", "nbns.name_flags.ont",
FT_UINT16, BASE_DEC, VALS(name_flags_ont_vals), NAME_FLAGS_ONT,
NULL, HFILL }},
{ &hf_nbns_name_flags_drg,
- { "Name is being deregistered", "nbns.name_flags.drg",
+ { "Name is being deregistered", "nbns.name_flags.drg",
FT_BOOLEAN, 16, TFS(&tfs_yes_no), NAME_FLAGS_DRG,
NULL, HFILL }},
{ &hf_nbns_name_flags_cnf,
- { "Name is in conflict", "nbns.name_flags.cnf",
+ { "Name is in conflict", "nbns.name_flags.cnf",
FT_BOOLEAN, 16, TFS(&tfs_yes_no), NAME_FLAGS_CNF,
NULL, HFILL }},
{ &hf_nbns_name_flags_act,
- { "Name is active", "nbns.name_flags.act",
+ { "Name is active", "nbns.name_flags.act",
FT_BOOLEAN, 16, TFS(&tfs_yes_no), NAME_FLAGS_ACT,
NULL, HFILL }},
{ &hf_nbns_name_flags_prm,
- { "Permanent node name", "nbns.name_flags.prm",
+ { "Permanent node name", "nbns.name_flags.prm",
FT_BOOLEAN, 16, TFS(&tfs_yes_no), NAME_FLAGS_PRM,
NULL, HFILL }},
{ &hf_nbns_nb_flags,
- { "Name flags", "nbns.nb_flags",
+ { "Name flags", "nbns.nb_flags",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_nbns_nb_flags_group,
- { "Name type", "nbns.nb_flags.group",
+ { "Name type", "nbns.nb_flags.group",
FT_BOOLEAN, 16, TFS(&tfs_group_unique_name), NB_FLAGS_G,
NULL, HFILL }},
{ &hf_nbns_nb_flags_ont,
- { "ONT", "nbns.nb_flags.ont",
+ { "ONT", "nbns.nb_flags.ont",
FT_UINT16, BASE_DEC, VALS(nb_flags_ont_vals), NB_FLAGS_ONT,
NULL, HFILL }},
};
static hf_register_info hf_nbdgm[] = {
{ &hf_nbdgm_type,
- { "Message Type", "nbdgm.type",
+ { "Message Type", "nbdgm.type",
FT_UINT8, BASE_DEC, VALS(nbds_msgtype_vals), 0x0,
"NBDGM message type", HFILL }},
{ &hf_nbdgm_fragment,
- { "More fragments follow", "nbdgm.next",
+ { "More fragments follow", "nbdgm.next",
FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0,
"TRUE if more fragments follow", HFILL }},
{ &hf_nbdgm_first,
- { "This is first fragment", "nbdgm.first",
+ { "This is first fragment", "nbdgm.first",
FT_BOOLEAN, BASE_NONE, TFS(&tfs_yes_no), 0x0,
"TRUE if first fragment", HFILL }},
{ &hf_nbdgm_node_type,
- { "Node Type", "nbdgm.node_type",
+ { "Node Type", "nbdgm.node_type",
FT_UINT8, BASE_DEC, VALS(node_type_vals), 0x0,
NULL, HFILL }},
{ &hf_nbdgm_datagram_id,
- { "Datagram ID", "nbdgm.dgram_id",
+ { "Datagram ID", "nbdgm.dgram_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
"Datagram identifier", HFILL }},
{ &hf_nbdgm_src_ip,
- { "Source IP", "nbdgm.src.ip",
+ { "Source IP", "nbdgm.src.ip",
FT_IPv4, BASE_NONE, NULL, 0x0,
"Source IPv4 address", HFILL }},
{ &hf_nbdgm_src_port,
- { "Source Port", "nbdgm.src.port",
+ { "Source Port", "nbdgm.src.port",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_nbdgm_datagram_length,
- { "Datagram length", "nbdgm.dgram_len",
+ { "Datagram length", "nbdgm.dgram_len",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_nbdgm_packet_offset,
- { "Packet offset", "nbdgm.pkt_offset",
+ { "Packet offset", "nbdgm.pkt_offset",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_nbdgm_error_code,
- { "Error code", "nbdgm.error_code",
+ { "Error code", "nbdgm.error_code",
FT_UINT8, BASE_HEX, VALS(nbds_error_codes), 0x0,
NULL, HFILL }},
};
static hf_register_info hf_nbss[] = {
{ &hf_nbss_type,
- { "Message Type", "nbss.type",
+ { "Message Type", "nbss.type",
FT_UINT8, BASE_HEX, VALS(message_types), 0x0,
"NBSS message type", HFILL }},
{ &hf_nbss_flags,
- { "Flags", "nbss.flags",
+ { "Flags", "nbss.flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
"NBSS message flags", HFILL }},
{ &hf_nbss_flags_e,
- { "Extend", "nbss.flags.e",
+ { "Extend", "nbss.flags.e",
FT_BOOLEAN, 8, TFS(&tfs_nbss_flags_e), NBSS_FLAGS_E,
NULL, HFILL }},
{ &hf_nbss_length,
- { "Length", "nbss.length",
+ { "Length", "nbss.length",
FT_UINT24, BASE_DEC, NULL, 0x0,
"Length of trailer (payload) following this field in bytes", HFILL }},
{ &hf_nbss_cifs_length,
- { "Length", "nbss.length",
+ { "Length", "nbss.length",
FT_UINT24, BASE_DEC, NULL, 0x0,
"Length trailer (payload) following this field in bytes", HFILL }},
{ &hf_nbss_error_code,
- { "Error code", "nbss.error_code",
+ { "Error code", "nbss.error_code",
FT_UINT8, BASE_HEX, VALS(nbss_error_codes), 0x0,
NULL, HFILL }},
{ &hf_nbss_retarget_ip_address,
- { "Retarget IP address", "nbss.retarget_ip_address",
+ { "Retarget IP address", "nbss.retarget_ip_address",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_nbss_retarget_port,
- { "Retarget port", "nbss.retarget_port",
+ { "Retarget port", "nbss.retarget_port",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
};
@@ -2079,3 +2079,16 @@ proto_reg_handoff_nbt(void)
dissector_add_uint("tcp.port", TCP_PORT_NBSS, nbss_handle);
dissector_add_uint("tcp.port", TCP_PORT_CIFS, nbss_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-ndp.c b/epan/dissectors/packet-ndp.c
index 04183b7925..aba0a096ba 100644
--- a/epan/dissectors/packet-ndp.c
+++ b/epan/dissectors/packet-ndp.c
@@ -55,105 +55,105 @@ void proto_reg_handoff_ndp(void);
/* Last updated from version 229 ("200609010000Z") of SnpxChassisType in SYNOPTICS-ROOT-MIB.mib */
static const value_string ndp_chassis_val[] =
{
- {1, "other"},
- {2, "3000"},
- {3, "3030"},
- {4, "2310"},
- {5, "2810"},
- {6, "2912"},
- {7, "2914"},
- {8, "271x"},
- {9, "2813"},
- {10, "2814"},
- {11, "2915"},
- {12, "5000"},
- {13, "2813SA"},
- {14, "2814SA"},
- {15, "810M"},
- {16, "Ethercell"},
- {17, "5005"},
- {18, "Alcatel Ethernet workgroup conc."},
-
- {20, "2715SA"},
- {21, "2486"},
- {22, "28000 series"},
- {23, "23000 series"},
- {24, "5DN00x series"},
- {25, "BayStack Ethernet"},
- {26, "23100 series"},
- {27, "100Base-T Hub"},
- {28, "3000 Fast Ethernet"},
- {29, "Orion switch"},
+ { 1, "other"},
+ { 2, "3000"},
+ { 3, "3030"},
+ { 4, "2310"},
+ { 5, "2810"},
+ { 6, "2912"},
+ { 7, "2914"},
+ { 8, "271x"},
+ { 9, "2813"},
+ { 10, "2814"},
+ { 11, "2915"},
+ { 12, "5000"},
+ { 13, "2813SA"},
+ { 14, "2814SA"},
+ { 15, "810M"},
+ { 16, "Ethercell"},
+ { 17, "5005"},
+ { 18, "Alcatel Ethernet workgroup conc."},
+
+ { 20, "2715SA"},
+ { 21, "2486"},
+ { 22, "28000 series"},
+ { 23, "23000 series"},
+ { 24, "5DN00x series"},
+ { 25, "BayStack Ethernet"},
+ { 26, "23100 series"},
+ { 27, "100Base-T Hub"},
+ { 28, "3000 Fast Ethernet"},
+ { 29, "Orion switch"},
/* 30 is "not used" */
- {31, "DDS"},
- {32, "Centillion (6 slot)"},
- {33, "Centillion (12 slot)"},
- {34, "Centillion (1 slot)"},
- {35, "BayStack 301"},
- {36, "BayStack TokenRing Hub"},
- {37, "FVC Multimedia Switch"},
- {38, "Switch Node"},
- {39, "BayStack 302 Switch"},
- {40, "BayStack 350 Switch"},
- {41, "BayStack 150 Ethernet Hub"},
- {42, "Centillion 50N switch"},
- {43, "Centillion 50T switch"},
- {44, "BayStack 303 and 304 Switches"},
- {45, "BayStack 200 Ethernet Hub"},
- {46, "BayStack 250 10/100 Ethernet Hub"},
- /*{47, "StackProbe"}, XXX - No longer listed */
- {48, "BayStack 450 10/100/1000 Switches"},
- {49, "BayStack 410 10/100 Switches"},
- {50, "Passport 1200 L3 Switch"},
- {51, "Passport 1250 L3 Switch"},
- {52, "Passport 1100 L3 Switch"},
- {53, "Passport 1150 L3 Switch"},
- {54, "Passport 1050 L3 Switch"},
- {55, "Passport 1051 L3 Switch"},
- {56, "Passport 8610 L3 Switch"},
- {57, "Passport 8606 L3 Switch"},
- {58, "Passport 8010"},
- {59, "Passport 8006"},
- {60, "BayStack 670 wireless access point"},
- {61, "Passport 740"},
- {62, "Passport 750"},
- {63, "Passport 790"},
- {64, "Business Policy Switch 2000 10/100 Switches"},
- {65, "Passport 8110 L2 Switch"},
- {66, "Passport 8106 L2 Switch"},
- {67, "BayStack 3580 Gig Switch"},
- {68, "BayStack 10 Power Supply Unit"},
- {69, "BayStack 420 10/100 Switch"},
- {70, "OPTera Metro 1200 Ethernet Service Module"},
- {71, "OPTera 8010co"},
- {72, "OPTera 8610co L3 switch"},
- {73, "OPTera 8110co L2 switch"},
- {74, "OPTera 8003"},
- {75, "OPTera 8603 L3 switch"},
- {76, "OPTera 8103 L2 switch"},
- {77, "BayStack 380 10/100/1000 Switch"},
- {78, "Ethernet Switch 470-48T"},
- {79, "OPTera Metro 1450 Ethernet Service Module"},
- {80, "OPTera Metro 1400 Ethernet Service Module"},
- {81, "Alteon Switch Family"},
- {82, "Ethernet Switch 460-24T-PWR"},
- {83, "OPTera Metro 8010 OPM L2 Switch"},
- {84, "OPTera Metro 8010co OPM L2 Switch"},
- {85, "OPTera Metro 8006 OPM L2 Switch"},
- {86, "OPTera Metro 8003 OPM L2 Switch"},
- {87, "Alteon 180e"},
- {88, "Alteon AD3"},
- {89, "Alteon 184"},
- {90, "Alteon AD4"},
- {91, "Passport 1424 L3 switch"},
- {92, "Passport 1648 L3 switch"},
- {93, "Passport 1612 L3 switch"},
- {94, "Passport 1624 L3 switch"},
- {95, "BayStack 380-24F Fiber 1000 Switch"},
- {96, "Ethernet Routing Switch 5510-24T"},
- {97, "Ethernet Routing Switch 5510-48T"},
- {98, "Ethernet Switch 470-24T"},
- {99, "Nortel Networks Wireless LAN Access Point 2220"},
+ { 31, "DDS"},
+ { 32, "Centillion (6 slot)"},
+ { 33, "Centillion (12 slot)"},
+ { 34, "Centillion (1 slot)"},
+ { 35, "BayStack 301"},
+ { 36, "BayStack TokenRing Hub"},
+ { 37, "FVC Multimedia Switch"},
+ { 38, "Switch Node"},
+ { 39, "BayStack 302 Switch"},
+ { 40, "BayStack 350 Switch"},
+ { 41, "BayStack 150 Ethernet Hub"},
+ { 42, "Centillion 50N switch"},
+ { 43, "Centillion 50T switch"},
+ { 44, "BayStack 303 and 304 Switches"},
+ { 45, "BayStack 200 Ethernet Hub"},
+ { 46, "BayStack 250 10/100 Ethernet Hub"},
+ /*{ 47, "StackProbe"}, XXX - No longer listed */
+ { 48, "BayStack 450 10/100/1000 Switches"},
+ { 49, "BayStack 410 10/100 Switches"},
+ { 50, "Passport 1200 L3 Switch"},
+ { 51, "Passport 1250 L3 Switch"},
+ { 52, "Passport 1100 L3 Switch"},
+ { 53, "Passport 1150 L3 Switch"},
+ { 54, "Passport 1050 L3 Switch"},
+ { 55, "Passport 1051 L3 Switch"},
+ { 56, "Passport 8610 L3 Switch"},
+ { 57, "Passport 8606 L3 Switch"},
+ { 58, "Passport 8010"},
+ { 59, "Passport 8006"},
+ { 60, "BayStack 670 wireless access point"},
+ { 61, "Passport 740"},
+ { 62, "Passport 750"},
+ { 63, "Passport 790"},
+ { 64, "Business Policy Switch 2000 10/100 Switches"},
+ { 65, "Passport 8110 L2 Switch"},
+ { 66, "Passport 8106 L2 Switch"},
+ { 67, "BayStack 3580 Gig Switch"},
+ { 68, "BayStack 10 Power Supply Unit"},
+ { 69, "BayStack 420 10/100 Switch"},
+ { 70, "OPTera Metro 1200 Ethernet Service Module"},
+ { 71, "OPTera 8010co"},
+ { 72, "OPTera 8610co L3 switch"},
+ { 73, "OPTera 8110co L2 switch"},
+ { 74, "OPTera 8003"},
+ { 75, "OPTera 8603 L3 switch"},
+ { 76, "OPTera 8103 L2 switch"},
+ { 77, "BayStack 380 10/100/1000 Switch"},
+ { 78, "Ethernet Switch 470-48T"},
+ { 79, "OPTera Metro 1450 Ethernet Service Module"},
+ { 80, "OPTera Metro 1400 Ethernet Service Module"},
+ { 81, "Alteon Switch Family"},
+ { 82, "Ethernet Switch 460-24T-PWR"},
+ { 83, "OPTera Metro 8010 OPM L2 Switch"},
+ { 84, "OPTera Metro 8010co OPM L2 Switch"},
+ { 85, "OPTera Metro 8006 OPM L2 Switch"},
+ { 86, "OPTera Metro 8003 OPM L2 Switch"},
+ { 87, "Alteon 180e"},
+ { 88, "Alteon AD3"},
+ { 89, "Alteon 184"},
+ { 90, "Alteon AD4"},
+ { 91, "Passport 1424 L3 switch"},
+ { 92, "Passport 1648 L3 switch"},
+ { 93, "Passport 1612 L3 switch"},
+ { 94, "Passport 1624 L3 switch"},
+ { 95, "BayStack 380-24F Fiber 1000 Switch"},
+ { 96, "Ethernet Routing Switch 5510-24T"},
+ { 97, "Ethernet Routing Switch 5510-48T"},
+ { 98, "Ethernet Switch 470-24T"},
+ { 99, "Nortel Networks Wireless LAN Access Point 2220"},
{100, "Passport RBS 2402 L3 switch"},
{101, "Alteon Application Switch 2424"},
{102, "Alteon Application Switch 2224"},
@@ -224,15 +224,15 @@ static value_string_ext ndp_chassis_val_ext = VALUE_STRING_EXT_INIT(ndp_chassis_
/* from synro179.mib - SnpxBackplaneType */
static const value_string ndp_backplane_val[] =
{
- {1, "Other"},
- {2, "Ethernet"},
- {3, "Ethernet and Tokenring"},
- {4, "Ethernet and FDDI"},
- {5, "Ethernet, Tokenring and FDDI"},
- {6, "Ethernet and Tokenring with redundant power"},
- {7, "Ethernet, Tokenring, FDDI with redundant power"},
- {8, "Token Ring"},
- {9, "Ethernet, Tokenring and Fast Ethernet"},
+ { 1, "Other"},
+ { 2, "Ethernet"},
+ { 3, "Ethernet and Tokenring"},
+ { 4, "Ethernet and FDDI"},
+ { 5, "Ethernet, Tokenring and FDDI"},
+ { 6, "Ethernet and Tokenring with redundant power"},
+ { 7, "Ethernet, Tokenring, FDDI with redundant power"},
+ { 8, "Token Ring"},
+ { 9, "Ethernet, Tokenring and Fast Ethernet"},
{10, "Ethernet and Fast Ethernet"},
{11, "Ethernet, Tokenring, Fast Ethernet with redundant power"},
{12, "Ethernet, Fast Ethernet and Gigabit Ethernet"},
@@ -250,12 +250,12 @@ static const value_string ndp_state_val[] =
/* Offsets in NDP Hello structure. */
-#define NDP_IP_ADDRESS 0
-#define NDP_SEGMENT_IDENTIFIER 4
-#define NDP_CHASSIS_TYPE 7
-#define NDP_BACKPLANE_TYPE 8
-#define NDP_STATE 9
-#define NDP_NUMBER_OF_LINKS 10
+#define NDP_IP_ADDRESS 0
+#define NDP_SEGMENT_IDENTIFIER 4
+#define NDP_CHASSIS_TYPE 7
+#define NDP_BACKPLANE_TYPE 8
+#define NDP_STATE 9
+#define NDP_NUMBER_OF_LINKS 10
static int proto_ndp = -1;
static int hf_ndp_ip_address = -1;
@@ -382,3 +382,16 @@ proto_reg_handoff_ndp(void)
/* it uses a different packet format */
/* dissector_add_uint("llc.nortel_pid", 0x01a3, ndp_handle); */ /* Bridge hello */
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-netlink.c b/epan/dissectors/packet-netlink.c
index 08bb8b44d6..2b6f3f5aee 100644
--- a/epan/dissectors/packet-netlink.c
+++ b/epan/dissectors/packet-netlink.c
@@ -42,37 +42,37 @@ void proto_reg_handoff_netlink(void);
#define SLL_HEADER_SIZE 16 /* total header length */
static const value_string netlink_family_vals[] = {
- { WS_NETLINK_ROUTE, "Route" },
- { WS_NETLINK_UNUSED, "Unused" },
- { WS_NETLINK_USERSOCK, "user-mode" },
- { WS_NETLINK_FIREWALL, "Unused (formerly: ip_queue)" },
- { WS_NETLINK_SOCK_DIAG, "socket monitoring" },
- { WS_NETLINK_NFLOG, "Netfilter ULOG" },
- { WS_NETLINK_XFRM, "IPsec" },
- { WS_NETLINK_SELINUX, "SELinux events" },
- { WS_NETLINK_ISCSI, "Open-iSCSI" },
- { WS_NETLINK_AUDIT, "Auditing" },
- { WS_NETLINK_FIB_LOOKUP, "FIB lookup" },
- { WS_NETLINK_CONNECTOR, "Kernel connector" },
- { WS_NETLINK_NETFILTER, "Netfilter" },
- { WS_NETLINK_IP6_FW, "Unused (formerly: ip6_queue)" },
- { WS_NETLINK_DNRTMSG, "DECnet routing messages" },
+ { WS_NETLINK_ROUTE, "Route" },
+ { WS_NETLINK_UNUSED, "Unused" },
+ { WS_NETLINK_USERSOCK, "user-mode" },
+ { WS_NETLINK_FIREWALL, "Unused (formerly: ip_queue)" },
+ { WS_NETLINK_SOCK_DIAG, "socket monitoring" },
+ { WS_NETLINK_NFLOG, "Netfilter ULOG" },
+ { WS_NETLINK_XFRM, "IPsec" },
+ { WS_NETLINK_SELINUX, "SELinux events" },
+ { WS_NETLINK_ISCSI, "Open-iSCSI" },
+ { WS_NETLINK_AUDIT, "Auditing" },
+ { WS_NETLINK_FIB_LOOKUP, "FIB lookup" },
+ { WS_NETLINK_CONNECTOR, "Kernel connector" },
+ { WS_NETLINK_NETFILTER, "Netfilter" },
+ { WS_NETLINK_IP6_FW, "Unused (formerly: ip6_queue)" },
+ { WS_NETLINK_DNRTMSG, "DECnet routing messages" },
{ WS_NETLINK_KOBJECT_UEVENT, "Kernel messages" },
- { WS_NETLINK_GENERIC, "Generic" },
- { WS_NETLINK_SCSITRANSPORT, "SCSI Transports" },
- { WS_NETLINK_ECRYPTFS, "ecryptfs" },
- { WS_NETLINK_RDMA, "RDMA" },
- { WS_NETLINK_CRYPTO, "Crypto layer" },
+ { WS_NETLINK_GENERIC, "Generic" },
+ { WS_NETLINK_SCSITRANSPORT, "SCSI Transports" },
+ { WS_NETLINK_ECRYPTFS, "ecryptfs" },
+ { WS_NETLINK_RDMA, "RDMA" },
+ { WS_NETLINK_CRYPTO, "Crypto layer" },
{ 0, NULL }
};
value_string_ext netlink_family_vals_ext = VALUE_STRING_EXT_INIT(netlink_family_vals);
static const value_string type_vals[] = {
- { WS_NLMSG_NOOP, "nothing" },
- { WS_NLMSG_ERROR, "error" },
- { WS_NLMSG_DONE, "end of a dump" },
- { WS_NLMSG_OVERRUN, "data lost" },
+ { WS_NLMSG_NOOP, "nothing" },
+ { WS_NLMSG_ERROR, "error" },
+ { WS_NLMSG_DONE, "end of a dump" },
+ { WS_NLMSG_OVERRUN, "data lost" },
{ 0, NULL }
};
@@ -177,9 +177,9 @@ dissect_netlink_attributes(tvbuff_t *tvb, header_field_info *hfi_type, int ett,
static int
dissect_netlink(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *_data _U_)
{
- guint16 protocol, hatype;
+ guint16 protocol, hatype;
proto_item *ti;
- tvbuff_t *next_tvb;
+ tvbuff_t *next_tvb;
proto_tree *fh_tree = NULL;
int offset;
@@ -324,3 +324,16 @@ proto_reg_handoff_netlink(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_NETLINK, netlink_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-nfsacl.c b/epan/dissectors/packet-nfsacl.c
index ba28de697d..d15956c792 100644
--- a/epan/dissectors/packet-nfsacl.c
+++ b/epan/dissectors/packet-nfsacl.c
@@ -105,23 +105,23 @@ dissect_nfsacl_mask(tvbuff_t *tvb, int offset, proto_tree *tree)
static const value_string names_nfsacl_aclent_type[] = {
#define NA_USER_OBJ 0x1
- { NA_USER_OBJ, "NA_USER_OBJ" },
+ { NA_USER_OBJ, "NA_USER_OBJ" },
#define NA_USER 0x2
- { NA_USER, "NA_USER" },
+ { NA_USER, "NA_USER" },
#define NA_GROUP_OBJ 0x4
- { NA_GROUP_OBJ, "NA_GROUP_OBJ" },
+ { NA_GROUP_OBJ, "NA_GROUP_OBJ" },
#define NA_GROUP 0x8
- { NA_GROUP, "NA_GROUP" },
+ { NA_GROUP, "NA_GROUP" },
#define NA_CLASS_OBJ 0x10
- { NA_CLASS_OBJ, "NA_CLASS_OBJ" },
+ { NA_CLASS_OBJ, "NA_CLASS_OBJ" },
#define NA_OTHER_OBJ 0x20
- { NA_OTHER_OBJ, "NA_OTHER_OBJ" },
+ { NA_OTHER_OBJ, "NA_OTHER_OBJ" },
#define NA_ACL_DEFAULT 0x1000
- { NA_ACL_DEFAULT, "NA_ACL_DEFAULT" },
- { NA_ACL_DEFAULT | NA_USER_OBJ, "Default NA_USER_OBJ" },
- { NA_ACL_DEFAULT | NA_USER, "Default NA_USER" },
+ { NA_ACL_DEFAULT, "NA_ACL_DEFAULT" },
+ { NA_ACL_DEFAULT | NA_USER_OBJ, "Default NA_USER_OBJ" },
+ { NA_ACL_DEFAULT | NA_USER, "Default NA_USER" },
{ NA_ACL_DEFAULT | NA_GROUP_OBJ, "Default NA_GROUP_OBJ" },
- { NA_ACL_DEFAULT | NA_GROUP, "Default NA_GROUP" },
+ { NA_ACL_DEFAULT | NA_GROUP, "Default NA_GROUP" },
{ NA_ACL_DEFAULT | NA_CLASS_OBJ, "Default NA_CLASS_OBJ" },
{ NA_ACL_DEFAULT | NA_OTHER_OBJ, "Default NA_OTHER_OBJ" },
{ 0, NULL },
@@ -604,3 +604,16 @@ proto_reg_handoff_nfsacl(void)
rpc_init_proc_table(NFSACL_PROGRAM, 2, nfsacl2_proc, hf_nfsacl_procedure_v2);
rpc_init_proc_table(NFSACL_PROGRAM, 3, nfsacl3_proc, hf_nfsacl_procedure_v3);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-nstrace.c b/epan/dissectors/packet-nstrace.c
index ca0daa24b8..731a96fd5b 100644
--- a/epan/dissectors/packet-nstrace.c
+++ b/epan/dissectors/packet-nstrace.c
@@ -432,3 +432,16 @@ void proto_reg_handoff_ns(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_NSTRACE_2_0, nstrace_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_NSTRACE_3_0, nstrace_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-pagp.c b/epan/dissectors/packet-pagp.c
index 057d426d9e..7060a34b13 100644
--- a/epan/dissectors/packet-pagp.c
+++ b/epan/dissectors/packet-pagp.c
@@ -35,47 +35,47 @@ void proto_reg_handoff_pagp(void);
/* Offsets of fields within a PagP PDU */
-#define PAGP_VERSION_NUMBER 0
-
-#define PAGP_FLAGS 1
-#define PAGP_LOCAL_DEVICE_ID 2
-#define PAGP_LOCAL_LEARN_CAP 8
-#define PAGP_LOCAL_PORT_PRIORITY 9
-#define PAGP_LOCAL_SENT_PORT_IFINDEX 10
-#define PAGP_LOCAL_GROUP_CAPABILITY 14
-#define PAGP_LOCAL_GROUP_IFINDEX 18
-#define PAGP_PARTNER_DEVICE_ID 22
-#define PAGP_PARTNER_LEARN_CAP 28
-#define PAGP_PARTNER_PORT_PRIORITY 29
-#define PAGP_PARTNER_SENT_PORT_IFINDEX 30
-#define PAGP_PARTNER_GROUP_CAPABILITY 34
-#define PAGP_PARTNER_GROUP_IFINDEX 38
-#define PAGP_PARTNER_COUNT 42
-#define PAGP_NUM_TLVS 44
-#define PAGP_FIRST_TLV 46
-
-#define PAGP_FLUSH_LOCAL_DEVICE_ID 2
-#define PAGP_FLUSH_PARTNER_DEVICE_ID 8
-#define PAGP_FLUSH_TRANSACTION_ID 14
+#define PAGP_VERSION_NUMBER 0
+
+#define PAGP_FLAGS 1
+#define PAGP_LOCAL_DEVICE_ID 2
+#define PAGP_LOCAL_LEARN_CAP 8
+#define PAGP_LOCAL_PORT_PRIORITY 9
+#define PAGP_LOCAL_SENT_PORT_IFINDEX 10
+#define PAGP_LOCAL_GROUP_CAPABILITY 14
+#define PAGP_LOCAL_GROUP_IFINDEX 18
+#define PAGP_PARTNER_DEVICE_ID 22
+#define PAGP_PARTNER_LEARN_CAP 28
+#define PAGP_PARTNER_PORT_PRIORITY 29
+#define PAGP_PARTNER_SENT_PORT_IFINDEX 30
+#define PAGP_PARTNER_GROUP_CAPABILITY 34
+#define PAGP_PARTNER_GROUP_IFINDEX 38
+#define PAGP_PARTNER_COUNT 42
+#define PAGP_NUM_TLVS 44
+#define PAGP_FIRST_TLV 46
+
+#define PAGP_FLUSH_LOCAL_DEVICE_ID 2
+#define PAGP_FLUSH_PARTNER_DEVICE_ID 8
+#define PAGP_FLUSH_TRANSACTION_ID 14
/* PDU Versions */
-#define PAGP_INFO_PDU 1
-#define PAGP_FLUSH_PDU 2
+#define PAGP_INFO_PDU 1
+#define PAGP_FLUSH_PDU 2
/* Flag bits */
-#define PAGP_FLAGS_SLOW_HELLO 0x01
-#define PAGP_FLAGS_AUTO_MODE 0x02
-#define PAGP_FLAGS_CONSISTENT_STATE 0x04
+#define PAGP_FLAGS_SLOW_HELLO 0x01
+#define PAGP_FLAGS_AUTO_MODE 0x02
+#define PAGP_FLAGS_CONSISTENT_STATE 0x04
/* TLV Types */
-#define PAGP_TLV_DEVICE_NAME 1
-#define PAGP_TLV_PORT_NAME 2
-#define PAGP_TLV_AGPORT_MAC 3
-#define PAGP_TLV_RESERVED 4
+#define PAGP_TLV_DEVICE_NAME 1
+#define PAGP_TLV_PORT_NAME 2
+#define PAGP_TLV_AGPORT_MAC 3
+#define PAGP_TLV_RESERVED 4
/* Initialise the protocol and registered fields */
@@ -125,241 +125,241 @@ static const char initial_sep[] = " (";
static const char cont_sep[] = ", ";
static const value_string pdu_vers[] = {
- { 1, "Info PDU" },
- { 2, "Flush PDU" },
- { 0, NULL }
+ { 1, "Info PDU" },
+ { 2, "Flush PDU" },
+ { 0, NULL }
};
static const value_string learn_cap[] = {
- { 1, "Source-based Distribution" },
- { 2, "Arbitrary Distribution" },
- { 0, NULL }
+ { 1, "Source-based Distribution" },
+ { 2, "Arbitrary Distribution" },
+ { 0, NULL }
};
static const value_string tlv_types[] = {
- { 1, "Device Name TLV" },
- { 2, "Physical Port Name TLV" },
- { 3, "Agport MAC Address" },
- { 4, "Reserved" },
- { 0, NULL }
+ { 1, "Device Name TLV" },
+ { 2, "Physical Port Name TLV" },
+ { 3, "Agport MAC Address" },
+ { 4, "Reserved" },
+ { 0, NULL }
};
static const true_false_string automode = {
- "Yes",
- "Desirable Mode"
+ "Yes",
+ "Desirable Mode"
};
-#define APPEND_BOOLEAN_FLAG(flag, item, string) \
- if(flag) { \
- if(item) \
- proto_item_append_text(item, string, sep); \
- sep = cont_sep; \
- }
+#define APPEND_BOOLEAN_FLAG(flag, item, string) \
+ if(flag) { \
+ if(item) \
+ proto_item_append_text(item, string, sep); \
+ sep = cont_sep; \
+ }
/* Code to actually dissect the PAGP packets */
static void
dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint32 raw_word;
- guint16 raw_half_word;
- guint16 num_tlvs;
- guint16 tlv;
- guint16 len;
- guint16 ii;
- guint16 offset = PAGP_FIRST_TLV;
- guint8 raw_octet;
+ guint32 raw_word;
+ guint16 raw_half_word;
+ guint16 num_tlvs;
+ guint16 tlv;
+ guint16 len;
+ guint16 ii;
+ guint16 offset = PAGP_FIRST_TLV;
+ guint8 raw_octet;
- guint8 flags;
+ guint8 flags;
- guchar *ch;
+ guchar *ch;
- proto_tree *pagp_tree = NULL;
- proto_item *pagp_item, *len_item;
- proto_tree *flags_tree;
- proto_item *flags_item;
- proto_tree *tlv_tree;
+ proto_tree *pagp_tree = NULL;
+ proto_item *pagp_item, *len_item;
+ proto_tree *flags_tree;
+ proto_item *flags_item;
+ proto_tree *tlv_tree;
- const char *sep;
+ const char *sep;
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "PAGP"); /* PAGP Protocol */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "PAGP"); /* PAGP Protocol */
- col_clear(pinfo->cinfo, COL_INFO);
+ col_clear(pinfo->cinfo, COL_INFO);
- pinfo->current_proto = "PAGP";
+ pinfo->current_proto = "PAGP";
- raw_octet = tvb_get_guint8(tvb, PAGP_VERSION_NUMBER);
- if (tree) {
- pagp_item = proto_tree_add_protocol_format(tree, proto_pagp, tvb,
- 0, -1, "Port Aggregation Protocol");
- pagp_tree = proto_item_add_subtree(pagp_item, ett_pagp);
- proto_tree_add_uint(pagp_tree, hf_pagp_version_number, tvb,
- PAGP_VERSION_NUMBER, 1, raw_octet);
- }
- col_append_str(pinfo->cinfo, COL_INFO,
- val_to_str_const(raw_octet, pdu_vers, "Unknown PDU version"));
+ raw_octet = tvb_get_guint8(tvb, PAGP_VERSION_NUMBER);
+ if (tree) {
+ pagp_item = proto_tree_add_protocol_format(tree, proto_pagp, tvb,
+ 0, -1, "Port Aggregation Protocol");
+ pagp_tree = proto_item_add_subtree(pagp_item, ett_pagp);
+ proto_tree_add_uint(pagp_tree, hf_pagp_version_number, tvb,
+ PAGP_VERSION_NUMBER, 1, raw_octet);
+ }
+ col_append_str(pinfo->cinfo, COL_INFO,
+ val_to_str_const(raw_octet, pdu_vers, "Unknown PDU version"));
- if (raw_octet == PAGP_FLUSH_PDU) {
+ if (raw_octet == PAGP_FLUSH_PDU) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "; Local DevID: %s",
- tvb_ether_to_str(tvb, PAGP_FLUSH_LOCAL_DEVICE_ID));
+ col_append_fstr(pinfo->cinfo, COL_INFO, "; Local DevID: %s",
+ tvb_ether_to_str(tvb, PAGP_FLUSH_LOCAL_DEVICE_ID));
- proto_tree_add_item(pagp_tree, hf_pagp_flush_local_device_id, tvb,
- PAGP_FLUSH_LOCAL_DEVICE_ID, 6, ENC_NA);
+ proto_tree_add_item(pagp_tree, hf_pagp_flush_local_device_id, tvb,
+ PAGP_FLUSH_LOCAL_DEVICE_ID, 6, ENC_NA);
- col_append_fstr(pinfo->cinfo, COL_INFO, ", Partner DevID: %s",
- tvb_ether_to_str(tvb, PAGP_FLUSH_PARTNER_DEVICE_ID));
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Partner DevID: %s",
+ tvb_ether_to_str(tvb, PAGP_FLUSH_PARTNER_DEVICE_ID));
- proto_tree_add_item(pagp_tree, hf_pagp_flush_partner_device_id, tvb,
- PAGP_FLUSH_PARTNER_DEVICE_ID, 6, ENC_NA);
+ proto_tree_add_item(pagp_tree, hf_pagp_flush_partner_device_id, tvb,
+ PAGP_FLUSH_PARTNER_DEVICE_ID, 6, ENC_NA);
- raw_word = tvb_get_ntohl(tvb, PAGP_FLUSH_TRANSACTION_ID);
- col_append_fstr(pinfo->cinfo, COL_INFO, "; Transaction ID: 0x%x ", raw_word);
+ raw_word = tvb_get_ntohl(tvb, PAGP_FLUSH_TRANSACTION_ID);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "; Transaction ID: 0x%x ", raw_word);
- proto_tree_add_uint(pagp_tree, hf_pagp_flush_transaction_id, tvb,
- PAGP_FLUSH_TRANSACTION_ID, 4, raw_word);
- return;
- }
+ proto_tree_add_uint(pagp_tree, hf_pagp_flush_transaction_id, tvb,
+ PAGP_FLUSH_TRANSACTION_ID, 4, raw_word);
+ return;
+ }
- /* Info PDU */
+ /* Info PDU */
- flags = tvb_get_guint8(tvb, PAGP_FLAGS);
- col_append_fstr(pinfo->cinfo, COL_INFO, "; Flags 0x%x", flags);
+ flags = tvb_get_guint8(tvb, PAGP_FLAGS);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "; Flags 0x%x", flags);
- if (tree) {
- flags_item = proto_tree_add_uint(pagp_tree, hf_pagp_flags, tvb,
- PAGP_FLAGS, 1, flags);
- flags_tree = proto_item_add_subtree(flags_item, ett_pagp_flags);
+ if (tree) {
+ flags_item = proto_tree_add_uint(pagp_tree, hf_pagp_flags, tvb,
+ PAGP_FLAGS, 1, flags);
+ flags_tree = proto_item_add_subtree(flags_item, ett_pagp_flags);
- sep = initial_sep;
+ sep = initial_sep;
- APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_SLOW_HELLO, flags_item, "%sSlow Hello");
- proto_tree_add_boolean(flags_tree, hf_pagp_flags_slow_hello, tvb,
- PAGP_FLAGS, 1, flags);
+ APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_SLOW_HELLO, flags_item, "%sSlow Hello");
+ proto_tree_add_boolean(flags_tree, hf_pagp_flags_slow_hello, tvb,
+ PAGP_FLAGS, 1, flags);
- APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_AUTO_MODE, flags_item, "%sAuto Mode");
- proto_tree_add_boolean(flags_tree, hf_pagp_flags_auto_mode, tvb,
- PAGP_FLAGS, 1, flags);
+ APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_AUTO_MODE, flags_item, "%sAuto Mode");
+ proto_tree_add_boolean(flags_tree, hf_pagp_flags_auto_mode, tvb,
+ PAGP_FLAGS, 1, flags);
- APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_CONSISTENT_STATE, flags_item,
- "%sConsistent State");
- proto_tree_add_boolean(flags_tree, hf_pagp_flags_consistent_state, tvb,
- PAGP_FLAGS, 1, flags);
+ APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_CONSISTENT_STATE, flags_item,
+ "%sConsistent State");
+ proto_tree_add_boolean(flags_tree, hf_pagp_flags_consistent_state, tvb,
+ PAGP_FLAGS, 1, flags);
- sep = cont_sep;
- if (sep != initial_sep) {
+ sep = cont_sep;
+ if (sep != initial_sep) {
/* We put something in; put in the terminating ")" */
proto_item_append_text(flags_item, ")");
- }
- }
-
- col_append_fstr(pinfo->cinfo, COL_INFO, "; Local DevID: %s",
- tvb_ether_to_str(tvb, PAGP_LOCAL_DEVICE_ID));
-
- proto_tree_add_item(pagp_tree, hf_pagp_local_device_id, tvb,
- PAGP_LOCAL_DEVICE_ID, 6, ENC_NA);
-
- if (tree) {
- raw_octet = tvb_get_guint8(tvb, PAGP_LOCAL_LEARN_CAP);
- proto_tree_add_uint(pagp_tree, hf_pagp_local_learn_cap, tvb,
- PAGP_LOCAL_LEARN_CAP, 1, raw_octet);
-
- raw_octet = tvb_get_guint8(tvb, PAGP_LOCAL_PORT_PRIORITY);
- proto_tree_add_uint(pagp_tree, hf_pagp_local_port_priority, tvb,
- PAGP_LOCAL_PORT_PRIORITY, 1, raw_octet);
-
- raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_SENT_PORT_IFINDEX);
- proto_tree_add_uint(pagp_tree, hf_pagp_local_sent_port_ifindex, tvb,
- PAGP_LOCAL_SENT_PORT_IFINDEX, 4, raw_word);
-
- raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_GROUP_CAPABILITY);
- proto_tree_add_uint(pagp_tree, hf_pagp_local_group_capability, tvb,
- PAGP_LOCAL_GROUP_CAPABILITY, 4, raw_word);
-
- raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_GROUP_IFINDEX);
- proto_tree_add_uint(pagp_tree, hf_pagp_local_group_ifindex, tvb,
- PAGP_LOCAL_GROUP_IFINDEX, 4, raw_word);
- }
-
- col_append_fstr(pinfo->cinfo, COL_INFO, ", Partner DevID: %s",
- tvb_ether_to_str(tvb, PAGP_PARTNER_DEVICE_ID));
-
- proto_tree_add_item(pagp_tree, hf_pagp_partner_device_id, tvb,
- PAGP_PARTNER_DEVICE_ID, 6, ENC_NA);
-
- raw_octet = tvb_get_guint8(tvb, PAGP_PARTNER_LEARN_CAP);
- proto_tree_add_uint(pagp_tree, hf_pagp_partner_learn_cap, tvb,
- PAGP_PARTNER_LEARN_CAP, 1, raw_octet);
-
- raw_octet = tvb_get_guint8(tvb, PAGP_PARTNER_PORT_PRIORITY);
- proto_tree_add_uint(pagp_tree, hf_pagp_partner_port_priority, tvb,
- PAGP_PARTNER_PORT_PRIORITY, 1, raw_octet);
-
- raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_SENT_PORT_IFINDEX);
- proto_tree_add_uint(pagp_tree, hf_pagp_partner_sent_port_ifindex, tvb,
- PAGP_PARTNER_SENT_PORT_IFINDEX, 4, raw_word);
-
- raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_GROUP_CAPABILITY);
- proto_tree_add_uint(pagp_tree, hf_pagp_partner_group_capability, tvb,
- PAGP_PARTNER_GROUP_CAPABILITY, 4, raw_word);
-
- raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_GROUP_IFINDEX);
- proto_tree_add_uint(pagp_tree, hf_pagp_partner_group_ifindex, tvb,
- PAGP_PARTNER_GROUP_IFINDEX, 4, raw_word);
-
- raw_half_word = tvb_get_ntohs(tvb, PAGP_PARTNER_COUNT);
- proto_tree_add_uint(pagp_tree, hf_pagp_partner_count, tvb,
- PAGP_PARTNER_COUNT, 2, raw_half_word);
-
- num_tlvs = tvb_get_ntohs(tvb, PAGP_NUM_TLVS);
- proto_tree_add_uint(pagp_tree, hf_pagp_num_tlvs, tvb,
- PAGP_NUM_TLVS, 2, num_tlvs);
-
- /* dump TLV entries */
-
- for ( ii = 0; ii < num_tlvs; ii++ ) {
-
- tlv = tvb_get_ntohs(tvb, offset);
- len = tvb_get_ntohs(tvb, offset + 2);
-
- tlv_tree = proto_tree_add_subtree_format(pagp_tree, tvb, offset, len,
- ett_pagp_tlvs, NULL, "TLV Entry #%d", ii+1);
-
- proto_tree_add_uint(tlv_tree, hf_pagp_tlv, tvb, offset, 2, tlv);
- len_item = proto_tree_add_uint(tlv_tree, hf_pagp_tlv_length, tvb, offset+2, 2, len);
- if ( len == 0 ) {
- expert_add_info_format(pinfo, len_item, &ei_pagp_tlv_length,
- "Unknown data - TLV len=0");
- return;
- }
- if ( tvb_reported_length_remaining(tvb, offset) < len ) {
- expert_add_info_format(pinfo, len_item, &ei_pagp_tlv_length,
- "TLV length too large");
- return;
- }
-
- switch (tlv) {
- case PAGP_TLV_DEVICE_NAME:
- ch = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len-4, ENC_ASCII);
- proto_tree_add_string(tlv_tree, hf_pagp_tlv_device_name,
- tvb, offset+4, len-4, ch);
- break;
- case PAGP_TLV_PORT_NAME:
- ch = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len-4, ENC_ASCII);
- proto_tree_add_string(tlv_tree, hf_pagp_tlv_port_name,
- tvb, offset+4, len-4, ch);
- break;
- case PAGP_TLV_AGPORT_MAC:
- proto_tree_add_item(tlv_tree, hf_pagp_tlv_agport_mac,
- tvb, offset+4, 6, ENC_NA);
- break;
- case PAGP_TLV_RESERVED:
- break;
- }
-
- offset += len;
-
- }
+ }
+ }
+
+ col_append_fstr(pinfo->cinfo, COL_INFO, "; Local DevID: %s",
+ tvb_ether_to_str(tvb, PAGP_LOCAL_DEVICE_ID));
+
+ proto_tree_add_item(pagp_tree, hf_pagp_local_device_id, tvb,
+ PAGP_LOCAL_DEVICE_ID, 6, ENC_NA);
+
+ if (tree) {
+ raw_octet = tvb_get_guint8(tvb, PAGP_LOCAL_LEARN_CAP);
+ proto_tree_add_uint(pagp_tree, hf_pagp_local_learn_cap, tvb,
+ PAGP_LOCAL_LEARN_CAP, 1, raw_octet);
+
+ raw_octet = tvb_get_guint8(tvb, PAGP_LOCAL_PORT_PRIORITY);
+ proto_tree_add_uint(pagp_tree, hf_pagp_local_port_priority, tvb,
+ PAGP_LOCAL_PORT_PRIORITY, 1, raw_octet);
+
+ raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_SENT_PORT_IFINDEX);
+ proto_tree_add_uint(pagp_tree, hf_pagp_local_sent_port_ifindex, tvb,
+ PAGP_LOCAL_SENT_PORT_IFINDEX, 4, raw_word);
+
+ raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_GROUP_CAPABILITY);
+ proto_tree_add_uint(pagp_tree, hf_pagp_local_group_capability, tvb,
+ PAGP_LOCAL_GROUP_CAPABILITY, 4, raw_word);
+
+ raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_GROUP_IFINDEX);
+ proto_tree_add_uint(pagp_tree, hf_pagp_local_group_ifindex, tvb,
+ PAGP_LOCAL_GROUP_IFINDEX, 4, raw_word);
+ }
+
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", Partner DevID: %s",
+ tvb_ether_to_str(tvb, PAGP_PARTNER_DEVICE_ID));
+
+ proto_tree_add_item(pagp_tree, hf_pagp_partner_device_id, tvb,
+ PAGP_PARTNER_DEVICE_ID, 6, ENC_NA);
+
+ raw_octet = tvb_get_guint8(tvb, PAGP_PARTNER_LEARN_CAP);
+ proto_tree_add_uint(pagp_tree, hf_pagp_partner_learn_cap, tvb,
+ PAGP_PARTNER_LEARN_CAP, 1, raw_octet);
+
+ raw_octet = tvb_get_guint8(tvb, PAGP_PARTNER_PORT_PRIORITY);
+ proto_tree_add_uint(pagp_tree, hf_pagp_partner_port_priority, tvb,
+ PAGP_PARTNER_PORT_PRIORITY, 1, raw_octet);
+
+ raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_SENT_PORT_IFINDEX);
+ proto_tree_add_uint(pagp_tree, hf_pagp_partner_sent_port_ifindex, tvb,
+ PAGP_PARTNER_SENT_PORT_IFINDEX, 4, raw_word);
+
+ raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_GROUP_CAPABILITY);
+ proto_tree_add_uint(pagp_tree, hf_pagp_partner_group_capability, tvb,
+ PAGP_PARTNER_GROUP_CAPABILITY, 4, raw_word);
+
+ raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_GROUP_IFINDEX);
+ proto_tree_add_uint(pagp_tree, hf_pagp_partner_group_ifindex, tvb,
+ PAGP_PARTNER_GROUP_IFINDEX, 4, raw_word);
+
+ raw_half_word = tvb_get_ntohs(tvb, PAGP_PARTNER_COUNT);
+ proto_tree_add_uint(pagp_tree, hf_pagp_partner_count, tvb,
+ PAGP_PARTNER_COUNT, 2, raw_half_word);
+
+ num_tlvs = tvb_get_ntohs(tvb, PAGP_NUM_TLVS);
+ proto_tree_add_uint(pagp_tree, hf_pagp_num_tlvs, tvb,
+ PAGP_NUM_TLVS, 2, num_tlvs);
+
+ /* dump TLV entries */
+
+ for ( ii = 0; ii < num_tlvs; ii++ ) {
+
+ tlv = tvb_get_ntohs(tvb, offset);
+ len = tvb_get_ntohs(tvb, offset + 2);
+
+ tlv_tree = proto_tree_add_subtree_format(pagp_tree, tvb, offset, len,
+ ett_pagp_tlvs, NULL, "TLV Entry #%d", ii+1);
+
+ proto_tree_add_uint(tlv_tree, hf_pagp_tlv, tvb, offset, 2, tlv);
+ len_item = proto_tree_add_uint(tlv_tree, hf_pagp_tlv_length, tvb, offset+2, 2, len);
+ if ( len == 0 ) {
+ expert_add_info_format(pinfo, len_item, &ei_pagp_tlv_length,
+ "Unknown data - TLV len=0");
+ return;
+ }
+ if ( tvb_reported_length_remaining(tvb, offset) < len ) {
+ expert_add_info_format(pinfo, len_item, &ei_pagp_tlv_length,
+ "TLV length too large");
+ return;
+ }
+
+ switch (tlv) {
+ case PAGP_TLV_DEVICE_NAME:
+ ch = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len-4, ENC_ASCII);
+ proto_tree_add_string(tlv_tree, hf_pagp_tlv_device_name,
+ tvb, offset+4, len-4, ch);
+ break;
+ case PAGP_TLV_PORT_NAME:
+ ch = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len-4, ENC_ASCII);
+ proto_tree_add_string(tlv_tree, hf_pagp_tlv_port_name,
+ tvb, offset+4, len-4, ch);
+ break;
+ case PAGP_TLV_AGPORT_MAC:
+ proto_tree_add_item(tlv_tree, hf_pagp_tlv_agport_mac,
+ tvb, offset+4, 6, ENC_NA);
+ break;
+ case PAGP_TLV_RESERVED:
+ break;
+ }
+
+ offset += len;
+
+ }
}
@@ -370,176 +370,189 @@ proto_register_pagp(void)
{
/* Setup list of header fields */
- static hf_register_info hf[] = {
-
- { &hf_pagp_version_number,
- { "Version", "pagp.version",
- FT_UINT8, BASE_HEX, VALS(pdu_vers), 0x0,
- "Identifies the PAgP PDU version: 1 = Info, 2 = Flush", HFILL }},
-
- { &hf_pagp_flags,
- { "Flags", "pagp.flags",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- "Information flags", HFILL }},
-
- { &hf_pagp_flags_slow_hello,
- { "Slow Hello", "pagp.flags.slowhello",
- FT_BOOLEAN, 8, TFS(&tfs_yes_no), PAGP_FLAGS_SLOW_HELLO,
- "1 = using Slow Hello, 0 = Slow Hello disabled", HFILL }},
-
- { &hf_pagp_flags_auto_mode,
- { "Auto Mode", "pagp.flags.automode",
- FT_BOOLEAN, 8, TFS(&automode), PAGP_FLAGS_AUTO_MODE,
- "1 = Auto Mode enabled, 0 = Desirable Mode", HFILL }},
-
- { &hf_pagp_flags_consistent_state,
- { "Consistent State", "pagp.flags.state",
- FT_BOOLEAN, 8, NULL, PAGP_FLAGS_CONSISTENT_STATE,
- "1 = Consistent State, 0 = Not Ready", HFILL }},
-
- { &hf_pagp_local_device_id,
- { "Local Device ID", "pagp.localdevid",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
-
- { &hf_pagp_local_learn_cap,
- { "Local Learn Capability", "pagp.localearncap",
- FT_UINT8, BASE_HEX, VALS(learn_cap), 0x0,
- NULL, HFILL }},
-
- { &hf_pagp_local_port_priority,
- { "Local Port Hot Standby Priority", "pagp.localportpri",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "The local hot standby priority assigned to this port", HFILL }},
-
- { &hf_pagp_local_sent_port_ifindex,
- { "Local Sent Port ifindex", "pagp.localsentportifindex",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "The interface index of the local port used to send PDU", HFILL }},
-
- { &hf_pagp_local_group_capability,
- { "Local Group Capability", "pagp.localgroupcap",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- "The local group capability", HFILL }},
-
- { &hf_pagp_local_group_ifindex,
- { "Local Group ifindex", "pagp.localgroupifindex",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "The local group interface index", HFILL }},
-
- { &hf_pagp_partner_device_id,
- { "Partner Device ID", "pagp.partnerdevid",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- "Remote Device ID (MAC)", HFILL }},
-
- { &hf_pagp_partner_learn_cap,
- { "Partner Learn Capability", "pagp.partnerlearncap",
- FT_UINT8, BASE_HEX, VALS(learn_cap), 0x0,
- "Remote learn capability", HFILL }},
-
- { &hf_pagp_partner_port_priority,
- { "Partner Port Hot Standby Priority", "pagp.partnerportpri",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Remote port priority", HFILL }},
-
- { &hf_pagp_partner_sent_port_ifindex,
- { "Partner Sent Port ifindex", "pagp.partnersentportifindex",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Remote port interface index sent", HFILL }},
-
- { &hf_pagp_partner_group_capability,
- { "Partner Group Capability", "pagp.partnergroupcap",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- "Remote group capability", HFILL }},
-
- { &hf_pagp_partner_group_ifindex,
- { "Partner Group ifindex", "pagp.partnergroupifindex",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Remote group interface index", HFILL }},
-
- { &hf_pagp_partner_count,
- { "Partner Count", "pagp.partnercount",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
-
- { &hf_pagp_num_tlvs,
- { "Number of TLVs", "pagp.numtlvs",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Number of TLVs following", HFILL }},
-
- { &hf_pagp_tlv,
- { "Type", "pagp.tlv",
- FT_UINT16, BASE_DEC, VALS(tlv_types), 0x0,
- "Type/Length/Value", HFILL }},
-
- { &hf_pagp_tlv_length,
- { "Length", "pagp.tlv_length",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
-
- { &hf_pagp_tlv_device_name,
- { "Device Name", "pagp.tlvdevname",
- FT_STRING, BASE_NONE, NULL, 0x0,
- "sysName of device", HFILL }},
-
- { &hf_pagp_tlv_port_name,
- { "Physical Port Name", "pagp.tlvportname",
- FT_STRING, BASE_NONE, NULL, 0x0,
- "Name of port used to send PDU", HFILL }},
-
- { &hf_pagp_tlv_agport_mac,
- { "Agport MAC Address", "pagp.tlvagportmac",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- "Source MAC on frames for this aggregate", HFILL }},
-
- { &hf_pagp_flush_local_device_id,
- { "Flush Local Device ID", "pagp.flushlocaldevid",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
-
- { &hf_pagp_flush_partner_device_id,
- { "Flush Partner Device ID", "pagp.flushpartnerdevid",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- "Flush remote device ID", HFILL }},
-
- { &hf_pagp_flush_transaction_id,
- { "Transaction ID", "pagp.transid",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- "Flush transaction ID", HFILL }},
-
- };
-
- /* Setup protocol subtree array */
-
- static gint *ett[] = {
- &ett_pagp,
- &ett_pagp_flags,
- &ett_pagp_tlvs,
- };
-
- static ei_register_info ei[] = {
- { &ei_pagp_tlv_length, { "pagp.tlv_length.invalid", PI_PROTOCOL, PI_WARN, "Invalid TLV length", EXPFILL }},
- };
- expert_module_t* expert_pagp;
-
- /* Register the protocol name and description */
-
- proto_pagp = proto_register_protocol("Port Aggregation Protocol", "PAGP", "pagp");
-
- /* Required function calls to register the header fields and subtrees used */
-
- proto_register_field_array(proto_pagp, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
- expert_pagp = expert_register_protocol(proto_pagp);
- expert_register_field_array(expert_pagp, ei, array_length(ei));
+ static hf_register_info hf[] = {
+
+ { &hf_pagp_version_number,
+ { "Version", "pagp.version",
+ FT_UINT8, BASE_HEX, VALS(pdu_vers), 0x0,
+ "Identifies the PAgP PDU version: 1 = Info, 2 = Flush", HFILL }},
+
+ { &hf_pagp_flags,
+ { "Flags", "pagp.flags",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ "Information flags", HFILL }},
+
+ { &hf_pagp_flags_slow_hello,
+ { "Slow Hello", "pagp.flags.slowhello",
+ FT_BOOLEAN, 8, TFS(&tfs_yes_no), PAGP_FLAGS_SLOW_HELLO,
+ "1 = using Slow Hello, 0 = Slow Hello disabled", HFILL }},
+
+ { &hf_pagp_flags_auto_mode,
+ { "Auto Mode", "pagp.flags.automode",
+ FT_BOOLEAN, 8, TFS(&automode), PAGP_FLAGS_AUTO_MODE,
+ "1 = Auto Mode enabled, 0 = Desirable Mode", HFILL }},
+
+ { &hf_pagp_flags_consistent_state,
+ { "Consistent State", "pagp.flags.state",
+ FT_BOOLEAN, 8, NULL, PAGP_FLAGS_CONSISTENT_STATE,
+ "1 = Consistent State, 0 = Not Ready", HFILL }},
+
+ { &hf_pagp_local_device_id,
+ { "Local Device ID", "pagp.localdevid",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_pagp_local_learn_cap,
+ { "Local Learn Capability", "pagp.localearncap",
+ FT_UINT8, BASE_HEX, VALS(learn_cap), 0x0,
+ NULL, HFILL }},
+
+ { &hf_pagp_local_port_priority,
+ { "Local Port Hot Standby Priority", "pagp.localportpri",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "The local hot standby priority assigned to this port", HFILL }},
+
+ { &hf_pagp_local_sent_port_ifindex,
+ { "Local Sent Port ifindex", "pagp.localsentportifindex",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "The interface index of the local port used to send PDU", HFILL }},
+
+ { &hf_pagp_local_group_capability,
+ { "Local Group Capability", "pagp.localgroupcap",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ "The local group capability", HFILL }},
+
+ { &hf_pagp_local_group_ifindex,
+ { "Local Group ifindex", "pagp.localgroupifindex",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "The local group interface index", HFILL }},
+
+ { &hf_pagp_partner_device_id,
+ { "Partner Device ID", "pagp.partnerdevid",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Remote Device ID (MAC)", HFILL }},
+
+ { &hf_pagp_partner_learn_cap,
+ { "Partner Learn Capability", "pagp.partnerlearncap",
+ FT_UINT8, BASE_HEX, VALS(learn_cap), 0x0,
+ "Remote learn capability", HFILL }},
+
+ { &hf_pagp_partner_port_priority,
+ { "Partner Port Hot Standby Priority", "pagp.partnerportpri",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Remote port priority", HFILL }},
+
+ { &hf_pagp_partner_sent_port_ifindex,
+ { "Partner Sent Port ifindex", "pagp.partnersentportifindex",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Remote port interface index sent", HFILL }},
+
+ { &hf_pagp_partner_group_capability,
+ { "Partner Group Capability", "pagp.partnergroupcap",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ "Remote group capability", HFILL }},
+
+ { &hf_pagp_partner_group_ifindex,
+ { "Partner Group ifindex", "pagp.partnergroupifindex",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Remote group interface index", HFILL }},
+
+ { &hf_pagp_partner_count,
+ { "Partner Count", "pagp.partnercount",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_pagp_num_tlvs,
+ { "Number of TLVs", "pagp.numtlvs",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Number of TLVs following", HFILL }},
+
+ { &hf_pagp_tlv,
+ { "Type", "pagp.tlv",
+ FT_UINT16, BASE_DEC, VALS(tlv_types), 0x0,
+ "Type/Length/Value", HFILL }},
+
+ { &hf_pagp_tlv_length,
+ { "Length", "pagp.tlv_length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_pagp_tlv_device_name,
+ { "Device Name", "pagp.tlvdevname",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "sysName of device", HFILL }},
+
+ { &hf_pagp_tlv_port_name,
+ { "Physical Port Name", "pagp.tlvportname",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "Name of port used to send PDU", HFILL }},
+
+ { &hf_pagp_tlv_agport_mac,
+ { "Agport MAC Address", "pagp.tlvagportmac",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Source MAC on frames for this aggregate", HFILL }},
+
+ { &hf_pagp_flush_local_device_id,
+ { "Flush Local Device ID", "pagp.flushlocaldevid",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+
+ { &hf_pagp_flush_partner_device_id,
+ { "Flush Partner Device ID", "pagp.flushpartnerdevid",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Flush remote device ID", HFILL }},
+
+ { &hf_pagp_flush_transaction_id,
+ { "Transaction ID", "pagp.transid",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ "Flush transaction ID", HFILL }},
+
+ };
+
+ /* Setup protocol subtree array */
+
+ static gint *ett[] = {
+ &ett_pagp,
+ &ett_pagp_flags,
+ &ett_pagp_tlvs,
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_pagp_tlv_length, { "pagp.tlv_length.invalid", PI_PROTOCOL, PI_WARN, "Invalid TLV length", EXPFILL }},
+ };
+ expert_module_t* expert_pagp;
+
+ /* Register the protocol name and description */
+
+ proto_pagp = proto_register_protocol("Port Aggregation Protocol", "PAGP", "pagp");
+
+ /* Required function calls to register the header fields and subtrees used */
+
+ proto_register_field_array(proto_pagp, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ expert_pagp = expert_register_protocol(proto_pagp);
+ expert_register_field_array(expert_pagp, ei, array_length(ei));
}
void
proto_reg_handoff_pagp(void)
{
- dissector_handle_t pagp_handle;
+ dissector_handle_t pagp_handle;
- pagp_handle = create_dissector_handle(dissect_pagp, proto_pagp);
- dissector_add_uint("llc.cisco_pid", 0x0104, pagp_handle);
+ pagp_handle = create_dissector_handle(dissect_pagp, proto_pagp);
+ dissector_add_uint("llc.cisco_pid", 0x0104, pagp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-pcnfsd.c b/epan/dissectors/packet-pcnfsd.c
index 2c0ed6bfa0..81a665cfd9 100644
--- a/epan/dissectors/packet-pcnfsd.c
+++ b/epan/dissectors/packet-pcnfsd.c
@@ -25,7 +25,7 @@
/*
Protocol information comes from the book
- "NFS Illustrated" by Brent Callaghan, ISBN 0-201-32570-5
+ "NFS Illustrated" by Brent Callaghan, ISBN 0-201-32570-5
*/
@@ -68,213 +68,213 @@ static gint ett_pcnfsd_gids = -1;
static int
dissect_pcnfsd_username(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- return dissect_rpc_string(tvb, tree, hf_pcnfsd_username, offset, NULL);
+ return dissect_rpc_string(tvb, tree, hf_pcnfsd_username, offset, NULL);
}
-#define MAP_REQ_UID 0
-#define MAP_REQ_GID 1
-#define MAP_REQ_UNAME 2
-#define MAP_REQ_GNAME 3
+#define MAP_REQ_UID 0
+#define MAP_REQ_GID 1
+#define MAP_REQ_UNAME 2
+#define MAP_REQ_GNAME 3
static const value_string names_mapreq[] =
{
- { MAP_REQ_UID, "MAP_REQ_UID" },
- { MAP_REQ_GID, "MAP_REQ_GID" },
- { MAP_REQ_UNAME, "MAP_REQ_UNAME" },
- { MAP_REQ_GNAME, "MAP_REQ_GNAME" },
- { 0, NULL }
+ { MAP_REQ_UID, "MAP_REQ_UID" },
+ { MAP_REQ_GID, "MAP_REQ_GID" },
+ { MAP_REQ_UNAME, "MAP_REQ_UNAME" },
+ { MAP_REQ_GNAME, "MAP_REQ_GNAME" },
+ { 0, NULL }
};
static int
dissect_pcnfsd2_dissect_mapreq_arg_item(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- proto_tree_add_item(tree, hf_pcnfsd_mapreq, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(tree, hf_pcnfsd_mapreq, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
- offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
- offset = dissect_pcnfsd_username(tvb, offset, tree);
+ offset = dissect_pcnfsd_username(tvb, offset, tree);
- return offset;
+ return offset;
}
static int
dissect_pcnfsd2_mapid_call(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void* data _U_)
+ proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
- offset = dissect_rpc_list(tvb, pinfo, tree, offset,
- dissect_pcnfsd2_dissect_mapreq_arg_item, NULL);
+ offset = dissect_rpc_list(tvb, pinfo, tree, offset,
+ dissect_pcnfsd2_dissect_mapreq_arg_item, NULL);
- return offset;
+ return offset;
}
-#define MAP_RES_OK 0
-#define MAP_RES_UNKNOWN 1
-#define MAP_RES_DENIED 2
+#define MAP_RES_OK 0
+#define MAP_RES_UNKNOWN 1
+#define MAP_RES_DENIED 2
static const value_string names_maprstat[] =
{
- { MAP_RES_OK, "MAP_RES_OK" },
- { MAP_RES_UNKNOWN, "MAP_RES_UNKNOWN" },
- { MAP_RES_DENIED, "MAP_RES_DENIED" },
- { 0, NULL }
+ { MAP_RES_OK, "MAP_RES_OK" },
+ { MAP_RES_UNKNOWN, "MAP_RES_UNKNOWN" },
+ { MAP_RES_DENIED, "MAP_RES_DENIED" },
+ { 0, NULL }
};
static int
dissect_pcnfsd2_dissect_mapreq_res_item(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+ packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- proto_tree_add_item(tree, hf_pcnfsd_mapreq, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(tree, hf_pcnfsd_mapreq, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
- proto_tree_add_item(tree, hf_pcnfsd_mapreq_status, tvb, offset, 4, ENC_BIG_ENDIAN);
- offset += 4;
+ proto_tree_add_item(tree, hf_pcnfsd_mapreq_status, tvb, offset, 4, ENC_BIG_ENDIAN);
+ offset += 4;
- offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
- offset = dissect_pcnfsd_username(tvb, offset, tree);
+ offset = dissect_pcnfsd_username(tvb, offset, tree);
- return offset;
+ return offset;
}
static int
dissect_pcnfsd2_mapid_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, void* data _U_)
+ proto_tree *tree, void* data _U_)
{
- offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
+ offset = dissect_rpc_string(tvb, tree, hf_pcnfsd_comment, offset, NULL);
- offset = dissect_rpc_list(tvb, pinfo, tree, offset,
- dissect_pcnfsd2_dissect_mapreq_res_item, NULL);
+ offset = dissect_rpc_list(tvb, pinfo, tree, offset,
+ dissect_pcnfsd2_dissect_mapreq_res_item, NULL);
- return offset;
+ return offset;
}
/* "NFS Illustrated 14.7.13 */
static char *
pcnfsd_decode_obscure(const char* data, int len)
{
- char *decoded_buf;
- char *decoded_data;
-
- decoded_buf = (char *)wmem_alloc(wmem_packet_scope(), len);
- decoded_data = decoded_buf;
- for ( ; len>0 ; len--, data++, decoded_data++) {
- *decoded_data = (*data ^ 0x5b) & 0x7f;
- }
- return decoded_buf;
+ char *decoded_buf;
+ char *decoded_data;
+
+ decoded_buf = (char *)wmem_alloc(wmem_packet_scope(), len);
+ decoded_data = decoded_buf;
+ for ( ; len>0 ; len--, data++, decoded_data++) {
+ *decoded_data = (*data ^ 0x5b) & 0x7f;
+ }
+ return decoded_buf;
}
/* "NFS Illustrated" 14.7.13 */
static int
dissect_pcnfsd2_auth_call(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void* data _U_)
+ proto_tree *tree, void* data _U_)
{
- int newoffset;
- const char *ident = NULL;
- const char *ident_decoded;
- proto_item *ident_item;
- proto_tree *ident_tree;
- const char *password = NULL;
- proto_item *password_item = NULL;
- proto_tree *password_tree = NULL;
-
- offset = dissect_rpc_string(tvb, tree,
- hf_pcnfsd_auth_client, offset, NULL);
-
- ident_tree = proto_tree_add_subtree(tree, tvb,
- offset, -1, ett_pcnfsd_auth_ident, &ident_item, "Authentication Ident");
-
- newoffset = dissect_rpc_string(tvb, ident_tree,
- hf_pcnfsd_auth_ident_obscure, offset, &ident);
- proto_item_set_len(ident_item, newoffset-offset);
-
- if (ident) {
- /* Only attempt to decode the ident if it has been specified */
- if (strcmp(ident, RPC_STRING_EMPTY) != 0)
- ident_decoded = pcnfsd_decode_obscure(ident, (int)strlen(ident));
- else
- ident_decoded = ident;
-
- if (ident_tree)
- proto_tree_add_string(ident_tree,
- hf_pcnfsd_auth_ident_clear,
- tvb, offset+4, (gint)strlen(ident_decoded), ident_decoded);
- }
- if (ident_item) {
- proto_item_set_text(ident_item, "Authentication Ident: %s",
- ident);
- }
-
- offset = newoffset;
-
- password_tree = proto_tree_add_subtree(tree, tvb,
- offset, -1, ett_pcnfsd_auth_password, NULL, "Authentication Password");
-
- newoffset = dissect_rpc_string(tvb, password_tree,
- hf_pcnfsd_auth_password_obscure, offset, &password);
- if (password_item) {
- proto_item_set_len(password_item, newoffset-offset);
- }
-
- if (password) {
- /* Only attempt to decode the password if it has been specified */
- if (strcmp(password, RPC_STRING_EMPTY))
- pcnfsd_decode_obscure(password, (int)strlen(password));
-
- if (password_tree)
- proto_tree_add_string(password_tree,
- hf_pcnfsd_auth_password_clear,
- tvb, offset+4, (gint)strlen(password), password);
- }
- if (password_item) {
- proto_item_set_text(password_item, "Authentication Password: %s",
- password);
- }
-
- offset = newoffset;
-
- offset = dissect_rpc_string(tvb, tree,
- hf_pcnfsd_comment, offset, NULL);
-
- return offset;
+ int newoffset;
+ const char *ident = NULL;
+ const char *ident_decoded;
+ proto_item *ident_item;
+ proto_tree *ident_tree;
+ const char *password = NULL;
+ proto_item *password_item = NULL;
+ proto_tree *password_tree = NULL;
+
+ offset = dissect_rpc_string(tvb, tree,
+ hf_pcnfsd_auth_client, offset, NULL);
+
+ ident_tree = proto_tree_add_subtree(tree, tvb,
+ offset, -1, ett_pcnfsd_auth_ident, &ident_item, "Authentication Ident");
+
+ newoffset = dissect_rpc_string(tvb, ident_tree,
+ hf_pcnfsd_auth_ident_obscure, offset, &ident);
+ proto_item_set_len(ident_item, newoffset-offset);
+
+ if (ident) {
+ /* Only attempt to decode the ident if it has been specified */
+ if (strcmp(ident, RPC_STRING_EMPTY) != 0)
+ ident_decoded = pcnfsd_decode_obscure(ident, (int)strlen(ident));
+ else
+ ident_decoded = ident;
+
+ if (ident_tree)
+ proto_tree_add_string(ident_tree,
+ hf_pcnfsd_auth_ident_clear,
+ tvb, offset+4, (gint)strlen(ident_decoded), ident_decoded);
+ }
+ if (ident_item) {
+ proto_item_set_text(ident_item, "Authentication Ident: %s",
+ ident);
+ }
+
+ offset = newoffset;
+
+ password_tree = proto_tree_add_subtree(tree, tvb,
+ offset, -1, ett_pcnfsd_auth_password, NULL, "Authentication Password");
+
+ newoffset = dissect_rpc_string(tvb, password_tree,
+ hf_pcnfsd_auth_password_obscure, offset, &password);
+ if (password_item) {
+ proto_item_set_len(password_item, newoffset-offset);
+ }
+
+ if (password) {
+ /* Only attempt to decode the password if it has been specified */
+ if (strcmp(password, RPC_STRING_EMPTY))
+ pcnfsd_decode_obscure(password, (int)strlen(password));
+
+ if (password_tree)
+ proto_tree_add_string(password_tree,
+ hf_pcnfsd_auth_password_clear,
+ tvb, offset+4, (gint)strlen(password), password);
+ }
+ if (password_item) {
+ proto_item_set_text(password_item, "Authentication Password: %s",
+ password);
+ }
+
+ offset = newoffset;
+
+ offset = dissect_rpc_string(tvb, tree,
+ hf_pcnfsd_comment, offset, NULL);
+
+ return offset;
}
/* "NFS Illustrated" 14.7.13 */
static int
dissect_pcnfsd2_auth_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, void* data _U_)
+ proto_tree *tree, void* data _U_)
{
- int gids_count;
- proto_tree *gtree;
- int gids_i;
-
- offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_status, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
- offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_gid, offset);
- gids_count = tvb_get_ntohl(tvb,offset+0);
- gtree = proto_tree_add_subtree_format(tree, tvb,
- offset, 4+gids_count*4, ett_pcnfsd_gids, NULL, "Group IDs: %d", gids_count);
-
- proto_tree_add_item(gtree, hf_pcnfsd_gids_count, tvb, offset, 4, ENC_BIG_ENDIAN);
-
- offset += 4;
- for (gids_i = 0 ; gids_i < gids_count ; gids_i++) {
- offset = dissect_rpc_uint32(tvb, gtree,
- hf_pcnfsd_gid, offset);
- }
- offset = dissect_rpc_string(tvb, tree,
- hf_pcnfsd_homedir, offset, NULL);
- /* should be signed int32 */
- offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_def_umask, offset);
- offset = dissect_rpc_string(tvb, tree,
- hf_pcnfsd_comment, offset, NULL);
-
- return offset;
+ int gids_count;
+ proto_tree *gtree;
+ int gids_i;
+
+ offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_status, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_uid, offset);
+ offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_gid, offset);
+ gids_count = tvb_get_ntohl(tvb,offset+0);
+ gtree = proto_tree_add_subtree_format(tree, tvb,
+ offset, 4+gids_count*4, ett_pcnfsd_gids, NULL, "Group IDs: %d", gids_count);
+
+ proto_tree_add_item(gtree, hf_pcnfsd_gids_count, tvb, offset, 4, ENC_BIG_ENDIAN);
+
+ offset += 4;
+ for (gids_i = 0 ; gids_i < gids_count ; gids_i++) {
+ offset = dissect_rpc_uint32(tvb, gtree,
+ hf_pcnfsd_gid, offset);
+ }
+ offset = dissect_rpc_string(tvb, tree,
+ hf_pcnfsd_homedir, offset, NULL);
+ /* should be signed int32 */
+ offset = dissect_rpc_uint32(tvb, tree, hf_pcnfsd_def_umask, offset);
+ offset = dissect_rpc_string(tvb, tree,
+ hf_pcnfsd_comment, offset, NULL);
+
+ return offset;
}
@@ -282,60 +282,60 @@ dissect_pcnfsd2_auth_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* proc number, "proc name", dissect_request, dissect_reply */
/* NULL as function pointer means: type of arguments is "void". */
static const vsff pcnfsd1_proc[] = {
- { 0, "NULL", NULL, NULL },
- { 1, "AUTH", NULL, NULL },
- { 2, "PR_INIT", NULL, NULL },
- { 3, "PR_START", NULL, NULL },
- { 0, NULL, NULL, NULL }
+ { 0, "NULL", NULL, NULL },
+ { 1, "AUTH", NULL, NULL },
+ { 2, "PR_INIT", NULL, NULL },
+ { 3, "PR_START", NULL, NULL },
+ { 0, NULL, NULL, NULL }
};
static const value_string pcnfsd1_proc_vals[] = {
- { 0, "NULL" },
- { 1, "AUTH" },
- { 2, "PR_INIT" },
- { 3, "PR_START" },
- { 0, NULL }
+ { 0, "NULL" },
+ { 1, "AUTH" },
+ { 2, "PR_INIT" },
+ { 3, "PR_START" },
+ { 0, NULL }
};
/* end of PCNFS version 1 */
/* "NFS Illustrated", 14.7 */
static const vsff pcnfsd2_proc[] = {
- { 0, "NULL", NULL, NULL },
- { 1, "INFO", NULL, NULL },
- { 2, "PR_INIT", NULL, NULL },
- { 3, "PR_START", NULL, NULL },
- { 4, "PR_LIST", NULL, NULL },
- { 5, "PR_QUEUE", NULL, NULL },
- { 6, "PR_STATUS", NULL, NULL },
- { 7, "PR_CANCEL", NULL, NULL },
- { 8, "PR_ADMIN", NULL, NULL },
- { 9, "PR_REQUEUE", NULL, NULL },
- { 10, "PR_HOLD", NULL, NULL },
- { 11, "PR_RELEASE", NULL, NULL },
- { 12, "MAPID",
- dissect_pcnfsd2_mapid_call, dissect_pcnfsd2_mapid_reply },
- { 13, "AUTH",
- dissect_pcnfsd2_auth_call, dissect_pcnfsd2_auth_reply },
- { 14, "ALERT", NULL, NULL },
- { 0, NULL, NULL, NULL }
+ { 0, "NULL", NULL, NULL },
+ { 1, "INFO", NULL, NULL },
+ { 2, "PR_INIT", NULL, NULL },
+ { 3, "PR_START", NULL, NULL },
+ { 4, "PR_LIST", NULL, NULL },
+ { 5, "PR_QUEUE", NULL, NULL },
+ { 6, "PR_STATUS", NULL, NULL },
+ { 7, "PR_CANCEL", NULL, NULL },
+ { 8, "PR_ADMIN", NULL, NULL },
+ { 9, "PR_REQUEUE", NULL, NULL },
+ { 10, "PR_HOLD", NULL, NULL },
+ { 11, "PR_RELEASE", NULL, NULL },
+ { 12, "MAPID",
+ dissect_pcnfsd2_mapid_call, dissect_pcnfsd2_mapid_reply },
+ { 13, "AUTH",
+ dissect_pcnfsd2_auth_call, dissect_pcnfsd2_auth_reply },
+ { 14, "ALERT", NULL, NULL },
+ { 0, NULL, NULL, NULL }
};
static const value_string pcnfsd2_proc_vals[] = {
- { 0, "NULL" },
- { 1, "INFO" },
- { 2, "PR_INIT" },
- { 3, "PR_START" },
- { 4, "PR_LIST" },
- { 5, "PR_QUEUE" },
- { 6, "PR_STATUS" },
- { 7, "PR_CANCEL" },
- { 8, "PR_ADMIN" },
- { 9, "PR_REQUEUE" },
- { 10, "PR_HOLD" },
- { 11, "PR_RELEASE" },
- { 12, "MAPID" },
- { 13, "AUTH" },
- { 14, "ALERT" },
- { 0, NULL }
+ { 0, "NULL" },
+ { 1, "INFO" },
+ { 2, "PR_INIT" },
+ { 3, "PR_START" },
+ { 4, "PR_LIST" },
+ { 5, "PR_QUEUE" },
+ { 6, "PR_STATUS" },
+ { 7, "PR_CANCEL" },
+ { 8, "PR_ADMIN" },
+ { 9, "PR_REQUEUE" },
+ { 10, "PR_HOLD" },
+ { 11, "PR_RELEASE" },
+ { 12, "MAPID" },
+ { 13, "AUTH" },
+ { 14, "ALERT" },
+ { 0, NULL }
};
/* end of PCNFS version 2 */
@@ -343,79 +343,92 @@ static const value_string pcnfsd2_proc_vals[] = {
void
proto_register_pcnfsd(void)
{
- static hf_register_info hf[] = {
- { &hf_pcnfsd_procedure_v1, {
- "V1 Procedure", "pcnfsd.procedure_v1", FT_UINT32, BASE_DEC,
- VALS(pcnfsd1_proc_vals), 0, NULL, HFILL }},
- { &hf_pcnfsd_procedure_v2, {
- "V2 Procedure", "pcnfsd.procedure_v2", FT_UINT32, BASE_DEC,
- VALS(pcnfsd2_proc_vals), 0, NULL, HFILL }},
- { &hf_pcnfsd_auth_client, {
- "Authentication Client", "pcnfsd.auth.client", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
- { &hf_pcnfsd_auth_ident_obscure, {
- "Obscure Ident", "pcnfsd.auth.ident.obscure", FT_STRING, BASE_NONE,
- NULL, 0, "Authentication Obscure Ident", HFILL }},
- { &hf_pcnfsd_auth_ident_clear, {
- "Clear Ident", "pcnfsd.auth.ident.clear", FT_STRING, BASE_NONE,
- NULL, 0, "Authentication Clear Ident", HFILL }},
- { &hf_pcnfsd_auth_password_obscure, {
- "Obscure Password", "pcnfsd.auth.password.obscure", FT_STRING, BASE_NONE,
- NULL, 0, "Authentication Obscure Password", HFILL }},
- { &hf_pcnfsd_auth_password_clear, {
- "Clear Password", "pcnfsd.auth.password.clear", FT_STRING, BASE_NONE,
- NULL, 0, "Authentication Clear Password", HFILL }},
- { &hf_pcnfsd_comment, {
- "Comment", "pcnfsd.comment", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
- { &hf_pcnfsd_status, {
- "Reply Status", "pcnfsd.status", FT_UINT32, BASE_DEC,
- NULL, 0, "Status", HFILL }},
- { &hf_pcnfsd_uid, {
- "User ID", "pcnfsd.uid", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_pcnfsd_gid, {
- "Group ID", "pcnfsd.gid", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_pcnfsd_gids_count, {
- "Group ID Count", "pcnfsd.gids.count", FT_UINT32, BASE_DEC,
- NULL, 0, NULL, HFILL }},
- { &hf_pcnfsd_homedir, {
- "Home Directory", "pcnfsd.homedir", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL }},
- { &hf_pcnfsd_def_umask, {
- "def_umask", "pcnfsd.def_umask", FT_UINT32, BASE_OCT,
- NULL, 0, NULL, HFILL }},
- { &hf_pcnfsd_mapreq, {
- "Request", "pcnfsd.mapreq", FT_UINT32, BASE_DEC,
- VALS(names_mapreq), 0, NULL, HFILL }},
- { &hf_pcnfsd_mapreq_status, {
- "Status", "pcnfsd.mapreq_status", FT_UINT32, BASE_DEC,
- VALS(names_maprstat), 0, NULL, HFILL }},
- { &hf_pcnfsd_username, {
- "User name", "pcnfsd.username", FT_STRING, BASE_NONE,
- NULL, 0, "pcnfsd.username", HFILL }},
- };
-
- static gint *ett[] = {
- &ett_pcnfsd,
- &ett_pcnfsd_auth_ident,
- &ett_pcnfsd_auth_password,
- &ett_pcnfsd_gids
- };
-
- proto_pcnfsd = proto_register_protocol("PC NFS",
- "PCNFSD", "pcnfsd");
- proto_register_field_array(proto_pcnfsd, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ static hf_register_info hf[] = {
+ { &hf_pcnfsd_procedure_v1, {
+ "V1 Procedure", "pcnfsd.procedure_v1", FT_UINT32, BASE_DEC,
+ VALS(pcnfsd1_proc_vals), 0, NULL, HFILL }},
+ { &hf_pcnfsd_procedure_v2, {
+ "V2 Procedure", "pcnfsd.procedure_v2", FT_UINT32, BASE_DEC,
+ VALS(pcnfsd2_proc_vals), 0, NULL, HFILL }},
+ { &hf_pcnfsd_auth_client, {
+ "Authentication Client", "pcnfsd.auth.client", FT_STRING, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
+ { &hf_pcnfsd_auth_ident_obscure, {
+ "Obscure Ident", "pcnfsd.auth.ident.obscure", FT_STRING, BASE_NONE,
+ NULL, 0, "Authentication Obscure Ident", HFILL }},
+ { &hf_pcnfsd_auth_ident_clear, {
+ "Clear Ident", "pcnfsd.auth.ident.clear", FT_STRING, BASE_NONE,
+ NULL, 0, "Authentication Clear Ident", HFILL }},
+ { &hf_pcnfsd_auth_password_obscure, {
+ "Obscure Password", "pcnfsd.auth.password.obscure", FT_STRING, BASE_NONE,
+ NULL, 0, "Authentication Obscure Password", HFILL }},
+ { &hf_pcnfsd_auth_password_clear, {
+ "Clear Password", "pcnfsd.auth.password.clear", FT_STRING, BASE_NONE,
+ NULL, 0, "Authentication Clear Password", HFILL }},
+ { &hf_pcnfsd_comment, {
+ "Comment", "pcnfsd.comment", FT_STRING, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
+ { &hf_pcnfsd_status, {
+ "Reply Status", "pcnfsd.status", FT_UINT32, BASE_DEC,
+ NULL, 0, "Status", HFILL }},
+ { &hf_pcnfsd_uid, {
+ "User ID", "pcnfsd.uid", FT_UINT32, BASE_DEC,
+ NULL, 0, NULL, HFILL }},
+ { &hf_pcnfsd_gid, {
+ "Group ID", "pcnfsd.gid", FT_UINT32, BASE_DEC,
+ NULL, 0, NULL, HFILL }},
+ { &hf_pcnfsd_gids_count, {
+ "Group ID Count", "pcnfsd.gids.count", FT_UINT32, BASE_DEC,
+ NULL, 0, NULL, HFILL }},
+ { &hf_pcnfsd_homedir, {
+ "Home Directory", "pcnfsd.homedir", FT_STRING, BASE_NONE,
+ NULL, 0, NULL, HFILL }},
+ { &hf_pcnfsd_def_umask, {
+ "def_umask", "pcnfsd.def_umask", FT_UINT32, BASE_OCT,
+ NULL, 0, NULL, HFILL }},
+ { &hf_pcnfsd_mapreq, {
+ "Request", "pcnfsd.mapreq", FT_UINT32, BASE_DEC,
+ VALS(names_mapreq), 0, NULL, HFILL }},
+ { &hf_pcnfsd_mapreq_status, {
+ "Status", "pcnfsd.mapreq_status", FT_UINT32, BASE_DEC,
+ VALS(names_maprstat), 0, NULL, HFILL }},
+ { &hf_pcnfsd_username, {
+ "User name", "pcnfsd.username", FT_STRING, BASE_NONE,
+ NULL, 0, "pcnfsd.username", HFILL }},
+ };
+
+ static gint *ett[] = {
+ &ett_pcnfsd,
+ &ett_pcnfsd_auth_ident,
+ &ett_pcnfsd_auth_password,
+ &ett_pcnfsd_gids
+ };
+
+ proto_pcnfsd = proto_register_protocol("PC NFS",
+ "PCNFSD", "pcnfsd");
+ proto_register_field_array(proto_pcnfsd, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
void
proto_reg_handoff_pcnfsd(void)
{
- /* Register the protocol as RPC */
- rpc_init_prog(proto_pcnfsd, PCNFSD_PROGRAM, ett_pcnfsd);
- /* Register the procedure tables */
- rpc_init_proc_table(PCNFSD_PROGRAM, 1, pcnfsd1_proc, hf_pcnfsd_procedure_v1);
- rpc_init_proc_table(PCNFSD_PROGRAM, 2, pcnfsd2_proc, hf_pcnfsd_procedure_v2);
+ /* Register the protocol as RPC */
+ rpc_init_prog(proto_pcnfsd, PCNFSD_PROGRAM, ett_pcnfsd);
+ /* Register the procedure tables */
+ rpc_init_proc_table(PCNFSD_PROGRAM, 1, pcnfsd1_proc, hf_pcnfsd_procedure_v1);
+ rpc_init_proc_table(PCNFSD_PROGRAM, 2, pcnfsd2_proc, hf_pcnfsd_procedure_v2);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-pw-cesopsn.c b/epan/dissectors/packet-pw-cesopsn.c
index e99a36be58..d6b40f5543 100644
--- a/epan/dissectors/packet-pw-cesopsn.c
+++ b/epan/dissectors/packet-pw-cesopsn.c
@@ -461,3 +461,16 @@ void proto_reg_handoff_pw_cesopsn(void)
dissector_add_for_decode_as("udp.port", find_dissector("pw_cesopsn_udp"));
return;
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-rip.c b/epan/dissectors/packet-rip.c
index d9f0b76141..410b2ac27b 100644
--- a/epan/dissectors/packet-rip.c
+++ b/epan/dissectors/packet-rip.c
@@ -37,44 +37,44 @@
#define UDP_PORT_RIP 520
-#define RIPv1 1
-#define RIPv2 2
+#define RIPv1 1
+#define RIPv2 2
void proto_register_rip(void);
static const value_string version_vals[] = {
- { RIPv1, "RIPv1" },
- { RIPv2, "RIPv2" },
- { 0, NULL }
+ { RIPv1, "RIPv1" },
+ { RIPv2, "RIPv2" },
+ { 0, NULL }
};
static const value_string command_vals[] = {
- { 1, "Request" },
- { 2, "Response" },
- { 3, "Traceon" },
- { 4, "Traceoff" },
- { 5, "Vendor specific (Sun)" },
- { 0, NULL }
+ { 1, "Request" },
+ { 2, "Response" },
+ { 3, "Traceon" },
+ { 4, "Traceoff" },
+ { 5, "Vendor specific (Sun)" },
+ { 0, NULL }
};
-#define AFVAL_UNSPEC 0
-#define AFVAL_IP 2
+#define AFVAL_UNSPEC 0
+#define AFVAL_IP 2
static const value_string family_vals[] = {
- { AFVAL_UNSPEC, "Unspecified" },
- { AFVAL_IP, "IP" },
- { 0, NULL }
+ { AFVAL_UNSPEC, "Unspecified" },
+ { AFVAL_IP, "IP" },
+ { 0, NULL }
};
-#define AUTH_IP_ROUTE 1
-#define AUTH_PASSWORD 2
-#define AUTH_KEYED_MSG_DIGEST 3
+#define AUTH_IP_ROUTE 1
+#define AUTH_PASSWORD 2
+#define AUTH_KEYED_MSG_DIGEST 3
static const value_string rip_auth_type[] = {
- { AUTH_IP_ROUTE, "IP Route" },
- { AUTH_PASSWORD, "Simple Password" },
- { AUTH_KEYED_MSG_DIGEST, "Keyed Message Digest" },
- { 0, NULL }
+ { AUTH_IP_ROUTE, "IP Route" },
+ { AUTH_PASSWORD, "Simple Password" },
+ { AUTH_KEYED_MSG_DIGEST, "Keyed Message Digest" },
+ { 0, NULL }
};
#define RIP_HEADER_LENGTH 4
@@ -92,53 +92,53 @@ static header_field_info *hfi_rip = NULL;
#define RIP_HFI_INIT HFI_INIT(proto_rip)
-static header_field_info hfi_rip_command RIP_HFI_INIT =
- { "Command", "rip.command", FT_UINT8, BASE_DEC,
- VALS(command_vals), 0, "What type of RIP Command is this", HFILL };
+static header_field_info hfi_rip_command RIP_HFI_INIT = {
+ "Command", "rip.command", FT_UINT8, BASE_DEC,
+ VALS(command_vals), 0, "What type of RIP Command is this", HFILL };
-static header_field_info hfi_rip_version RIP_HFI_INIT =
- { "Version", "rip.version", FT_UINT8, BASE_DEC,
- VALS(version_vals), 0, "Version of the RIP protocol", HFILL };
+static header_field_info hfi_rip_version RIP_HFI_INIT = {
+ "Version", "rip.version", FT_UINT8, BASE_DEC,
+ VALS(version_vals), 0, "Version of the RIP protocol", HFILL };
-static header_field_info hfi_rip_routing_domain RIP_HFI_INIT =
- { "Routing Domain", "rip.routing_domain", FT_UINT16, BASE_DEC,
- NULL, 0, "RIPv2 Routing Domain", HFILL };
+static header_field_info hfi_rip_routing_domain RIP_HFI_INIT = {
+ "Routing Domain", "rip.routing_domain", FT_UINT16, BASE_DEC,
+ NULL, 0, "RIPv2 Routing Domain", HFILL };
-static header_field_info hfi_rip_ip RIP_HFI_INIT =
- { "IP Address", "rip.ip", FT_IPv4, BASE_NONE,
- NULL, 0, NULL, HFILL};
+static header_field_info hfi_rip_ip RIP_HFI_INIT = {
+ "IP Address", "rip.ip", FT_IPv4, BASE_NONE,
+ NULL, 0, NULL, HFILL};
-static header_field_info hfi_rip_netmask RIP_HFI_INIT =
- { "Netmask", "rip.netmask", FT_IPv4, BASE_NONE,
- NULL, 0, NULL, HFILL};
+static header_field_info hfi_rip_netmask RIP_HFI_INIT = {
+ "Netmask", "rip.netmask", FT_IPv4, BASE_NONE,
+ NULL, 0, NULL, HFILL};
-static header_field_info hfi_rip_next_hop RIP_HFI_INIT =
- { "Next Hop", "rip.next_hop", FT_IPv4, BASE_NONE,
- NULL, 0, "Next Hop router for this route", HFILL};
+static header_field_info hfi_rip_next_hop RIP_HFI_INIT = {
+ "Next Hop", "rip.next_hop", FT_IPv4, BASE_NONE,
+ NULL, 0, "Next Hop router for this route", HFILL};
-static header_field_info hfi_rip_metric RIP_HFI_INIT =
- { "Metric", "rip.metric", FT_UINT16, BASE_DEC,
- NULL, 0, "Metric for this route", HFILL };
+static header_field_info hfi_rip_metric RIP_HFI_INIT = {
+ "Metric", "rip.metric", FT_UINT16, BASE_DEC,
+ NULL, 0, "Metric for this route", HFILL };
-static header_field_info hfi_rip_auth RIP_HFI_INIT =
- { "Authentication type", "rip.auth.type", FT_UINT16, BASE_DEC,
- VALS(rip_auth_type), 0, "Type of authentication", HFILL };
+static header_field_info hfi_rip_auth RIP_HFI_INIT = {
+ "Authentication type", "rip.auth.type", FT_UINT16, BASE_DEC,
+ VALS(rip_auth_type), 0, "Type of authentication", HFILL };
-static header_field_info hfi_rip_auth_passwd RIP_HFI_INIT =
- { "Password", "rip.auth.passwd", FT_STRING, BASE_NONE,
- NULL, 0, "Authentication password", HFILL };
+static header_field_info hfi_rip_auth_passwd RIP_HFI_INIT = {
+ "Password", "rip.auth.passwd", FT_STRING, BASE_NONE,
+ NULL, 0, "Authentication password", HFILL };
-static header_field_info hfi_rip_family RIP_HFI_INIT =
- { "Address Family", "rip.family", FT_UINT16, BASE_DEC,
- VALS(family_vals), 0, NULL, HFILL };
+static header_field_info hfi_rip_family RIP_HFI_INIT = {
+ "Address Family", "rip.family", FT_UINT16, BASE_DEC,
+ VALS(family_vals), 0, NULL, HFILL };
-static header_field_info hfi_rip_route_tag RIP_HFI_INIT =
- { "Route Tag", "rip.route_tag", FT_UINT16, BASE_DEC,
- NULL, 0, NULL, HFILL };
+static header_field_info hfi_rip_route_tag RIP_HFI_INIT = {
+ "Route Tag", "rip.route_tag", FT_UINT16, BASE_DEC,
+ NULL, 0, NULL, HFILL };
-static header_field_info hfi_rip_zero_padding RIP_HFI_INIT =
- { "Zero Padding", "rip.zero_padding", FT_STRING, BASE_NONE,
- NULL, 0, "Authentication password", HFILL };
+static header_field_info hfi_rip_zero_padding RIP_HFI_INIT = {
+ "Zero adding", "rip.zero_padding", FT_STRING, BASE_NONE,
+ NULL, 0, "Authentication password", HFILL };
static gint ett_rip = -1;
static gint ett_rip_vec = -1;
@@ -154,14 +154,14 @@ static gint dissect_rip_authentication(tvbuff_t *tvb, int offset,
static void
dissect_rip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- int offset = 0;
- proto_tree *rip_tree = NULL;
+ int offset = 0;
+ proto_tree *rip_tree = NULL;
proto_item *ti;
- guint8 command;
- guint8 version;
- guint16 family;
- gint trailer_len = 0;
- gboolean is_md5_auth = FALSE;
+ guint8 command;
+ guint8 version;
+ guint16 family;
+ gint trailer_len = 0;
+ gboolean is_md5_auth = FALSE;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RIP");
col_clear(pinfo->cinfo, COL_INFO);
@@ -170,52 +170,52 @@ dissect_rip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
version = tvb_get_guint8(tvb, 1);
col_set_str(pinfo->cinfo, COL_PROTOCOL,
- val_to_str_const(version, version_vals, "RIP"));
+ val_to_str_const(version, version_vals, "RIP"));
col_add_str(pinfo->cinfo, COL_INFO,
- val_to_str(command, command_vals, "Unknown command (%u)"));
+ val_to_str(command, command_vals, "Unknown command (%u)"));
if (tree) {
- ti = proto_tree_add_item(tree, hfi_rip, tvb, 0, -1, ENC_NA);
- rip_tree = proto_item_add_subtree(ti, ett_rip);
+ ti = proto_tree_add_item(tree, hfi_rip, tvb, 0, -1, ENC_NA);
+ rip_tree = proto_item_add_subtree(ti, ett_rip);
- proto_tree_add_uint(rip_tree, &hfi_rip_command, tvb, 0, 1, command);
- proto_tree_add_uint(rip_tree, &hfi_rip_version, tvb, 1, 1, version);
- if (version == RIPv2 && pref_display_routing_domain == TRUE)
- proto_tree_add_uint(rip_tree, &hfi_rip_routing_domain, tvb, 2, 2,
- tvb_get_ntohs(tvb, 2));
+ proto_tree_add_uint(rip_tree, &hfi_rip_command, tvb, 0, 1, command);
+ proto_tree_add_uint(rip_tree, &hfi_rip_version, tvb, 1, 1, version);
+ if (version == RIPv2 && pref_display_routing_domain == TRUE)
+ proto_tree_add_uint(rip_tree, &hfi_rip_routing_domain, tvb, 2, 2,
+ tvb_get_ntohs(tvb, 2));
- /* skip header */
- offset = RIP_HEADER_LENGTH;
+ /* skip header */
+ offset = RIP_HEADER_LENGTH;
/* zero or more entries */
- while (tvb_reported_length_remaining(tvb, offset) > trailer_len ) {
- family = tvb_get_ntohs(tvb, offset);
- switch (family) {
- case AFVAL_UNSPEC: /* Unspecified */
- /*
- * There should be one entry in the request, and a metric
- * of infinity, meaning "show the entire routing table".
- */
- dissect_unspec_rip_vektor(tvb, offset, version, rip_tree);
- break;
- case AFVAL_IP: /* IP */
- dissect_ip_rip_vektor(tvb, offset, version, rip_tree);
- break;
- case 0xFFFF:
- if( offset == RIP_HEADER_LENGTH ) {
- trailer_len=dissect_rip_authentication(tvb, offset, rip_tree);
- is_md5_auth = TRUE;
- break;
- }
- if(is_md5_auth && tvb_reported_length_remaining(tvb, offset) == 20)
- break;
- /* Intentional fall through: auth Entry MUST be the first! */
- default:
- proto_tree_add_text(rip_tree, tvb, offset,
- RIP_ENTRY_LENGTH, "Unknown address family %u",
- family);
- break;
- }
+ while (tvb_reported_length_remaining(tvb, offset) > trailer_len ) {
+ family = tvb_get_ntohs(tvb, offset);
+ switch (family) {
+ case AFVAL_UNSPEC: /* Unspecified */
+ /*
+ * There should be one entry in the request, and a metric
+ * of infinity, meaning "show the entire routing table".
+ */
+ dissect_unspec_rip_vektor(tvb, offset, version, rip_tree);
+ break;
+ case AFVAL_IP: /* IP */
+ dissect_ip_rip_vektor(tvb, offset, version, rip_tree);
+ break;
+ case 0xFFFF:
+ if( offset == RIP_HEADER_LENGTH ) {
+ trailer_len=dissect_rip_authentication(tvb, offset, rip_tree);
+ is_md5_auth = TRUE;
+ break;
+ }
+ if(is_md5_auth && tvb_reported_length_remaining(tvb, offset) == 20)
+ break;
+ /* Intentional fall through: auth Entry MUST be the first! */
+ default:
+ proto_tree_add_text(rip_tree, tvb, offset,
+ RIP_ENTRY_LENGTH, "Unknown address family %u",
+ family);
+ break;
+ }
offset += RIP_ENTRY_LENGTH;
}
@@ -224,103 +224,103 @@ dissect_rip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_unspec_rip_vektor(tvbuff_t *tvb, int offset, guint8 version,
- proto_tree *tree)
+ proto_tree *tree)
{
proto_tree *rip_vektor_tree;
- guint32 metric;
+ guint32 metric;
metric = tvb_get_ntohl(tvb, offset+16);
rip_vektor_tree = proto_tree_add_subtree_format(tree, tvb, offset,
- RIP_ENTRY_LENGTH, ett_rip_vec, NULL, "Address not specified, Metric: %u",
- metric);
+ RIP_ENTRY_LENGTH, ett_rip_vec, NULL, "Address not specified, Metric: %u",
+ metric);
proto_tree_add_item(rip_vektor_tree, &hfi_rip_family, tvb, offset, 2, ENC_BIG_ENDIAN);
if (version == RIPv2) {
- proto_tree_add_item(rip_vektor_tree, &hfi_rip_route_tag, tvb, offset+2, 2,
- ENC_BIG_ENDIAN);
- proto_tree_add_item(rip_vektor_tree, &hfi_rip_netmask, tvb, offset+8, 4,
- ENC_BIG_ENDIAN);
- proto_tree_add_item(rip_vektor_tree, &hfi_rip_next_hop, tvb, offset+12, 4,
- ENC_BIG_ENDIAN);
+ proto_tree_add_item(rip_vektor_tree, &hfi_rip_route_tag, tvb, offset+2, 2,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(rip_vektor_tree, &hfi_rip_netmask, tvb, offset+8, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(rip_vektor_tree, &hfi_rip_next_hop, tvb, offset+12, 4,
+ ENC_BIG_ENDIAN);
}
proto_tree_add_uint(rip_vektor_tree, &hfi_rip_metric, tvb,
- offset+16, 4, metric);
+ offset+16, 4, metric);
}
static void
dissect_ip_rip_vektor(tvbuff_t *tvb, int offset, guint8 version,
- proto_tree *tree)
+ proto_tree *tree)
{
proto_tree *rip_vektor_tree;
- guint32 metric;
+ guint32 metric;
metric = tvb_get_ntohl(tvb, offset+16);
rip_vektor_tree = proto_tree_add_subtree_format(tree, tvb, offset,
- RIP_ENTRY_LENGTH, ett_rip_vec, NULL, "IP Address: %s, Metric: %u",
- tvb_ip_to_str(tvb, offset+4), metric);
+ RIP_ENTRY_LENGTH, ett_rip_vec, NULL, "IP Address: %s, Metric: %u",
+ tvb_ip_to_str(tvb, offset+4), metric);
proto_tree_add_item(rip_vektor_tree, &hfi_rip_family, tvb, offset, 2, ENC_BIG_ENDIAN);
if (version == RIPv2) {
- proto_tree_add_item(rip_vektor_tree, &hfi_rip_route_tag, tvb, offset+2, 2,
- ENC_BIG_ENDIAN);
+ proto_tree_add_item(rip_vektor_tree, &hfi_rip_route_tag, tvb, offset+2, 2,
+ ENC_BIG_ENDIAN);
}
proto_tree_add_item(rip_vektor_tree, &hfi_rip_ip, tvb, offset+4, 4, ENC_BIG_ENDIAN);
if (version == RIPv2) {
- proto_tree_add_item(rip_vektor_tree, &hfi_rip_netmask, tvb, offset+8, 4,
- ENC_BIG_ENDIAN);
- proto_tree_add_item(rip_vektor_tree, &hfi_rip_next_hop, tvb, offset+12, 4,
- ENC_BIG_ENDIAN);
+ proto_tree_add_item(rip_vektor_tree, &hfi_rip_netmask, tvb, offset+8, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(rip_vektor_tree, &hfi_rip_next_hop, tvb, offset+12, 4,
+ ENC_BIG_ENDIAN);
}
proto_tree_add_uint(rip_vektor_tree, &hfi_rip_metric, tvb,
- offset+16, 4, metric);
+ offset+16, 4, metric);
}
static gint
dissect_rip_authentication(tvbuff_t *tvb, int offset, proto_tree *tree)
{
proto_tree *rip_authentication_tree;
- guint16 authtype;
- guint32 val, digest_off, auth_data_len;
+ guint16 authtype;
+ guint32 val, digest_off, auth_data_len;
auth_data_len = 0;
authtype = tvb_get_ntohs(tvb, offset + 2);
rip_authentication_tree = proto_tree_add_subtree_format(tree, tvb, offset, RIP_ENTRY_LENGTH,
- ett_rip_vec, NULL, "Authentication: %s", val_to_str( authtype, rip_auth_type, "Unknown (%u)" ) );
+ ett_rip_vec, NULL, "Authentication: %s", val_to_str( authtype, rip_auth_type, "Unknown (%u)" ) );
proto_tree_add_uint(rip_authentication_tree, &hfi_rip_auth, tvb, offset+2, 2,
- authtype);
+ authtype);
switch ( authtype ) {
case AUTH_PASSWORD: /* Plain text password */
- proto_tree_add_item(rip_authentication_tree, &hfi_rip_auth_passwd,
- tvb, offset+4, 16, ENC_ASCII|ENC_NA);
- break;
+ proto_tree_add_item(rip_authentication_tree, &hfi_rip_auth_passwd,
+ tvb, offset+4, 16, ENC_ASCII|ENC_NA);
+ break;
case AUTH_KEYED_MSG_DIGEST: /* Keyed MD5 rfc 2082 */
- digest_off = tvb_get_ntohs( tvb, offset+4 );
- proto_tree_add_text( rip_authentication_tree, tvb, offset+4, 2,
- "Digest Offset: %u" , digest_off );
- val = tvb_get_guint8( tvb, offset+6 );
- proto_tree_add_text( rip_authentication_tree, tvb, offset+6, 1,
- "Key ID: %u" , val );
- auth_data_len = tvb_get_guint8( tvb, offset+7 );
- proto_tree_add_text( rip_authentication_tree, tvb, offset+7, 1,
- "Auth Data Len: %u" , auth_data_len );
- val = tvb_get_ntohl( tvb, offset+8 );
- proto_tree_add_text( rip_authentication_tree, tvb, offset+8, 4,
- "Seq num: %u" , val );
- proto_tree_add_item( rip_authentication_tree, &hfi_rip_zero_padding, tvb, offset+12, 8, ENC_NA);
- rip_authentication_tree = proto_tree_add_subtree( rip_authentication_tree, tvb, offset-4+digest_off,
- MD5_AUTH_DATA_LEN+4, ett_auth_vec, NULL, "Authentication Data Trailer" );
- proto_tree_add_text( rip_authentication_tree, tvb, offset-4+digest_off+4,
- MD5_AUTH_DATA_LEN, "Authentication Data: %s",
- tvb_bytes_to_ep_str_punct(tvb, offset-4+digest_off+4,
- MD5_AUTH_DATA_LEN, ' '));
- break;
+ digest_off = tvb_get_ntohs( tvb, offset+4 );
+ proto_tree_add_text( rip_authentication_tree, tvb, offset+4, 2,
+ "Digest Offset: %u" , digest_off );
+ val = tvb_get_guint8( tvb, offset+6 );
+ proto_tree_add_text( rip_authentication_tree, tvb, offset+6, 1,
+ "Key ID: %u" , val );
+ auth_data_len = tvb_get_guint8( tvb, offset+7 );
+ proto_tree_add_text( rip_authentication_tree, tvb, offset+7, 1,
+ "Auth Data Len: %u" , auth_data_len );
+ val = tvb_get_ntohl( tvb, offset+8 );
+ proto_tree_add_text( rip_authentication_tree, tvb, offset+8, 4,
+ "Seq num: %u" , val );
+ proto_tree_add_item( rip_authentication_tree, &hfi_rip_zero_padding, tvb, offset+12, 8, ENC_NA);
+ rip_authentication_tree = proto_tree_add_subtree( rip_authentication_tree, tvb, offset-4+digest_off,
+ MD5_AUTH_DATA_LEN+4, ett_auth_vec, NULL, "Authentication Data Trailer" );
+ proto_tree_add_text( rip_authentication_tree, tvb, offset-4+digest_off+4,
+ MD5_AUTH_DATA_LEN, "Authentication Data: %s",
+ tvb_bytes_to_ep_str_punct(tvb, offset-4+digest_off+4,
+ MD5_AUTH_DATA_LEN, ' '));
+ break;
}
return auth_data_len;
}
@@ -329,47 +329,60 @@ void
proto_register_rip(void)
{
#ifndef HAVE_HFI_SECTION_INIT
- static header_field_info *hfi[] = {
- &hfi_rip_command,
- &hfi_rip_version,
- &hfi_rip_routing_domain,
- &hfi_rip_ip,
- &hfi_rip_netmask,
- &hfi_rip_next_hop,
- &hfi_rip_metric,
- &hfi_rip_auth,
- &hfi_rip_auth_passwd,
- &hfi_rip_family,
- &hfi_rip_route_tag,
- &hfi_rip_zero_padding,
- };
+ static header_field_info *hfi[] = {
+ &hfi_rip_command,
+ &hfi_rip_version,
+ &hfi_rip_routing_domain,
+ &hfi_rip_ip,
+ &hfi_rip_netmask,
+ &hfi_rip_next_hop,
+ &hfi_rip_metric,
+ &hfi_rip_auth,
+ &hfi_rip_auth_passwd,
+ &hfi_rip_family,
+ &hfi_rip_route_tag,
+ &hfi_rip_zero_padding,
+ };
#endif /* HAVE_HFI_SECTION_INIT */
- static gint *ett[] = {
- &ett_rip,
- &ett_rip_vec,
- &ett_auth_vec,
- };
+ static gint *ett[] = {
+ &ett_rip,
+ &ett_rip_vec,
+ &ett_auth_vec,
+ };
- module_t *rip_module;
- int proto_rip;
+ module_t *rip_module;
+ int proto_rip;
- proto_rip = proto_register_protocol("Routing Information Protocol",
- "RIP", "rip");
- hfi_rip = proto_registrar_get_nth(proto_rip);
+ proto_rip = proto_register_protocol("Routing Information Protocol",
+ "RIP", "rip");
+ hfi_rip = proto_registrar_get_nth(proto_rip);
- proto_register_fields(proto_rip, hfi, array_length(hfi));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_register_fields(proto_rip, hfi, array_length(hfi));
+ proto_register_subtree_array(ett, array_length(ett));
- rip_module = prefs_register_protocol(proto_rip, proto_reg_handoff_rip);
+ rip_module = prefs_register_protocol(proto_rip, proto_reg_handoff_rip);
- prefs_register_bool_preference(rip_module, "display_routing_domain", "Display Routing Domain field", "Display the third and forth bytes of the RIPv2 header as the Routing Domain field (introduced in RFC 1388 [January 1993] and obsolete as of RFC 1723 [November 1994])", &pref_display_routing_domain);
+ prefs_register_bool_preference(rip_module, "display_routing_domain", "Display Routing Domain field", "Display the third and forth bytes of the RIPv2 header as the Routing Domain field (introduced in RFC 1388 [January 1993] and obsolete as of RFC 1723 [November 1994])", &pref_display_routing_domain);
- rip_handle = create_dissector_handle(dissect_rip, proto_rip);
+ rip_handle = create_dissector_handle(dissect_rip, proto_rip);
}
void
proto_reg_handoff_rip(void)
{
- dissector_add_uint("udp.port", UDP_PORT_RIP, rip_handle);
+ dissector_add_uint("udp.port", UDP_PORT_RIP, rip_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-rmi.c b/epan/dissectors/packet-rmi.c
index 6181ec5bd1..dbf38cc26d 100644
--- a/epan/dissectors/packet-rmi.c
+++ b/epan/dissectors/packet-rmi.c
@@ -71,16 +71,16 @@ static gint ett_ser = -1;
/*
* See
*
- * http://java.sun.com/products/jdk/1.2/docs/guide/rmi/spec/rmi-protocol.doc1.html
+ * http://java.sun.com/products/jdk/1.2/docs/guide/rmi/spec/rmi-protocol.doc1.html
*
* for RMI, and
*
- * http://java.sun.com/products/jdk/1.2/docs/guide/serialization/spec/protocol.doc.html
+ * http://java.sun.com/products/jdk/1.2/docs/guide/serialization/spec/protocol.doc.html
*
* for the serialization protocol.
*/
-#define TCP_PORT_RMI 1099
+#define TCP_PORT_RMI 1099
static const value_string rmi_protocol_str[] = {
{RMI_OUTPUTSTREAM_PROTOCOL_STREAM, "StreamProtocol"},
@@ -112,17 +112,17 @@ dissect_rmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbuff_t *next_tvb;
- gint offset;
- gint next_offset;
- int datalen;
+ gint offset;
+ gint next_offset;
+ int datalen;
- guint16 version, len, port;
- guint8 message, proto;
+ guint16 version, len, port;
+ guint8 message, proto;
- rmi_type rmitype;
+ rmi_type rmitype;
const char *epid_hostname;
- guint epid_len;
+ guint epid_len;
offset = 0;
@@ -133,109 +133,109 @@ dissect_rmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
rmitype = get_rmi_type(tvb, offset, datalen);
- switch(rmitype) {
- case RMI_OUTPUTSTREAM:
- version = tvb_get_ntohs(tvb,4);
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "JRMI, Version: %d, ", version);
-
- proto = tvb_get_guint8(tvb, 6);
- col_append_str(pinfo->cinfo, COL_INFO,
- val_to_str_const(proto, rmi_protocol_str,
- "Unknown protocol"));
- break;
- case RMI_OUTPUTMESSAGE:
- message = tvb_get_guint8(tvb,0);
- col_set_str(pinfo->cinfo, COL_INFO,
- "JRMI, ");
- col_append_str(pinfo->cinfo, COL_INFO,
- val_to_str_const(message, rmi_output_message_str,
- "Unknown message"));
- break;
- case RMI_INPUTSTREAM:
- message = tvb_get_guint8(tvb,0);
- col_set_str(pinfo->cinfo, COL_INFO,
- "JRMI, ");
- col_append_str(pinfo->cinfo, COL_INFO,
- val_to_str_const(message, rmi_input_message_str,
- "Unknown message"));
- break;
- case SERIALIZATION_DATA:
- version = tvb_get_ntohs(tvb,2);
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "Serialization data, Version: %d", version);
- break;
- default:
- col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
- break;
- }
+ switch(rmitype) {
+ case RMI_OUTPUTSTREAM:
+ version = tvb_get_ntohs(tvb,4);
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "JRMI, Version: %d, ", version);
+
+ proto = tvb_get_guint8(tvb, 6);
+ col_append_str(pinfo->cinfo, COL_INFO,
+ val_to_str_const(proto, rmi_protocol_str,
+ "Unknown protocol"));
+ break;
+ case RMI_OUTPUTMESSAGE:
+ message = tvb_get_guint8(tvb,0);
+ col_set_str(pinfo->cinfo, COL_INFO,
+ "JRMI, ");
+ col_append_str(pinfo->cinfo, COL_INFO,
+ val_to_str_const(message, rmi_output_message_str,
+ "Unknown message"));
+ break;
+ case RMI_INPUTSTREAM:
+ message = tvb_get_guint8(tvb,0);
+ col_set_str(pinfo->cinfo, COL_INFO,
+ "JRMI, ");
+ col_append_str(pinfo->cinfo, COL_INFO,
+ val_to_str_const(message, rmi_input_message_str,
+ "Unknown message"));
+ break;
+ case SERIALIZATION_DATA:
+ version = tvb_get_ntohs(tvb,2);
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "Serialization data, Version: %d", version);
+ break;
+ default:
+ col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
+ break;
+ }
if (tree) {
- ti = proto_tree_add_item(tree, proto_rmi, tvb, 0, -1, ENC_NA);
- rmi_tree = proto_item_add_subtree(ti, ett_rmi);
- switch(rmitype) {
- case RMI_OUTPUTSTREAM:
- /* XXX - uint, or string? */
- proto_tree_add_uint(rmi_tree, hf_rmi_magic,
- tvb, offset, 4, tvb_get_ntohl(tvb,0));
- proto_tree_add_item(rmi_tree, hf_rmi_version,
- tvb, offset + 4, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(rmi_tree, hf_rmi_protocol,
- tvb, offset + 6, 1, ENC_BIG_ENDIAN);
- break;
- case RMI_INPUTSTREAM:
- message = tvb_get_guint8(tvb, 0);
- proto_tree_add_uint(rmi_tree, hf_rmi_inputmessage,
- tvb, offset, 1, message);
- if(message == RMI_INPUTSTREAM_MESSAGE_ACK) {
- proto_tree_add_text(rmi_tree, tvb, offset + 1, -1,
- "EndPointIdentifier");
- /* MESSAGE_ACK should include EndpointIdentifier */
- len = tvb_get_ntohs(tvb, 1);
- proto_tree_add_uint(rmi_tree, hf_rmi_epid_length,
- tvb, offset + 1, 2, len);
- epid_len = len < ITEM_LABEL_LENGTH ? len : ITEM_LABEL_LENGTH;
- if (epid_len > 0) {
- epid_hostname = tvb_format_text(tvb, offset + 3, epid_len);
- } else {
- epid_hostname = "[Empty]";
- }
- proto_tree_add_string(rmi_tree, hf_rmi_epid_hostname,
- tvb, offset + 3, len, epid_hostname);
-
- port = tvb_get_ntohs(tvb, offset + len + 5);
- proto_tree_add_uint(rmi_tree, hf_rmi_epid_port,
- tvb, offset + len + 5, 2, port);
- }
- if(message == RMI_INPUTSTREAM_MESSAGE_RETURNDATA) {
- proto_tree_add_text(rmi_tree, tvb, offset + 1, -1,
- "Serialization Data");
- next_tvb = tvb_new_subset_remaining(tvb, offset + 1);
- dissect_ser(next_tvb, tree);
- }
- break;
- case RMI_OUTPUTMESSAGE:
- message = tvb_get_guint8(tvb, 0);
- proto_tree_add_uint(rmi_tree, hf_rmi_outputmessage,
- tvb, offset, 1, message);
- if(message == RMI_OUTPUTSTREAM_MESSAGE_CALL) {
- proto_tree_add_text(rmi_tree, tvb, offset + 1, -1,
- "Serialization Data");
- /* XXX */
- next_tvb = tvb_new_subset_remaining(tvb, offset + 1);
- dissect_ser(next_tvb, tree);
- }
- if(message == RMI_OUTPUTSTREAM_MESSAGE_DGCACK) {
- proto_tree_add_text(rmi_tree, tvb, offset + 1, -1,
- "UniqueIdentifier");
- }
- break;
- case SERIALIZATION_DATA:
- dissect_ser(tvb, tree);
- break;
- default:
- break;
- }
+ ti = proto_tree_add_item(tree, proto_rmi, tvb, 0, -1, ENC_NA);
+ rmi_tree = proto_item_add_subtree(ti, ett_rmi);
+ switch(rmitype) {
+ case RMI_OUTPUTSTREAM:
+ /* XXX - uint, or string? */
+ proto_tree_add_uint(rmi_tree, hf_rmi_magic,
+ tvb, offset, 4, tvb_get_ntohl(tvb,0));
+ proto_tree_add_item(rmi_tree, hf_rmi_version,
+ tvb, offset + 4, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(rmi_tree, hf_rmi_protocol,
+ tvb, offset + 6, 1, ENC_BIG_ENDIAN);
+ break;
+ case RMI_INPUTSTREAM:
+ message = tvb_get_guint8(tvb, 0);
+ proto_tree_add_uint(rmi_tree, hf_rmi_inputmessage,
+ tvb, offset, 1, message);
+ if(message == RMI_INPUTSTREAM_MESSAGE_ACK) {
+ proto_tree_add_text(rmi_tree, tvb, offset + 1, -1,
+ "EndPointIdentifier");
+ /* MESSAGE_ACK should include EndpointIdentifier */
+ len = tvb_get_ntohs(tvb, 1);
+ proto_tree_add_uint(rmi_tree, hf_rmi_epid_length,
+ tvb, offset + 1, 2, len);
+ epid_len = len < ITEM_LABEL_LENGTH ? len : ITEM_LABEL_LENGTH;
+ if (epid_len > 0) {
+ epid_hostname = tvb_format_text(tvb, offset + 3, epid_len);
+ } else {
+ epid_hostname = "[Empty]";
+ }
+ proto_tree_add_string(rmi_tree, hf_rmi_epid_hostname,
+ tvb, offset + 3, len, epid_hostname);
+
+ port = tvb_get_ntohs(tvb, offset + len + 5);
+ proto_tree_add_uint(rmi_tree, hf_rmi_epid_port,
+ tvb, offset + len + 5, 2, port);
+ }
+ if(message == RMI_INPUTSTREAM_MESSAGE_RETURNDATA) {
+ proto_tree_add_text(rmi_tree, tvb, offset + 1, -1,
+ "Serialization Data");
+ next_tvb = tvb_new_subset_remaining(tvb, offset + 1);
+ dissect_ser(next_tvb, tree);
+ }
+ break;
+ case RMI_OUTPUTMESSAGE:
+ message = tvb_get_guint8(tvb, 0);
+ proto_tree_add_uint(rmi_tree, hf_rmi_outputmessage,
+ tvb, offset, 1, message);
+ if(message == RMI_OUTPUTSTREAM_MESSAGE_CALL) {
+ proto_tree_add_text(rmi_tree, tvb, offset + 1, -1,
+ "Serialization Data");
+ /* XXX */
+ next_tvb = tvb_new_subset_remaining(tvb, offset + 1);
+ dissect_ser(next_tvb, tree);
+ }
+ if(message == RMI_OUTPUTSTREAM_MESSAGE_DGCACK) {
+ proto_tree_add_text(rmi_tree, tvb, offset + 1, -1,
+ "UniqueIdentifier");
+ }
+ break;
+ case SERIALIZATION_DATA:
+ dissect_ser(tvb, tree);
+ break;
+ default:
+ break;
+ }
}
}
@@ -250,12 +250,12 @@ dissect_ser(tvbuff_t *tvb, proto_tree *tree)
offset = 0;
if(tree) {
- ti = proto_tree_add_item(tree, proto_ser, tvb, 0, -1, ENC_NA);
- ser_tree = proto_item_add_subtree(ti, ett_ser);
- proto_tree_add_item(ser_tree, hf_ser_magic,
- tvb, offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(ser_tree, hf_ser_version,
- tvb, offset + 2, 2, ENC_BIG_ENDIAN);
+ ti = proto_tree_add_item(tree, proto_ser, tvb, 0, -1, ENC_NA);
+ ser_tree = proto_item_add_subtree(ti, ett_ser);
+ proto_tree_add_item(ser_tree, hf_ser_magic,
+ tvb, offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(ser_tree, hf_ser_version,
+ tvb, offset + 2, 2, ENC_BIG_ENDIAN);
}
}
@@ -264,35 +264,35 @@ static rmi_type
get_rmi_type(tvbuff_t *tvb, gint offset, int datalen)
{
guint16 ser_magic;
- guchar data[4];
+ guchar data[4];
tvb_memcpy(tvb, data, offset, (datalen > 4) ? 4 : datalen);
if (datalen >= 2) {
- ser_magic = data[0] << 8 | data[1];
- if (ser_magic == SER_STREAM_MAGIC) {
- return SERIALIZATION_DATA;
- }
+ ser_magic = data[0] << 8 | data[1];
+ if (ser_magic == SER_STREAM_MAGIC) {
+ return SERIALIZATION_DATA;
+ }
}
if (datalen >= 4) {
- if(strncmp(data, RMI_MAGIC, 4) == 0) {
- return RMI_OUTPUTSTREAM;
- }
+ if(strncmp(data, RMI_MAGIC, 4) == 0) {
+ return RMI_OUTPUTSTREAM;
+ }
}
if (datalen >= 1) {
- if (data[0] == RMI_INPUTSTREAM_MESSAGE_ACK ||
- data[0] == RMI_INPUTSTREAM_MESSAGE_NOTSUPPORTED ||
- data[0] == RMI_INPUTSTREAM_MESSAGE_RETURNDATA ||
- data[0] == RMI_INPUTSTREAM_MESSAGE_PINGACK) {
- return RMI_INPUTSTREAM;
- }
+ if (data[0] == RMI_INPUTSTREAM_MESSAGE_ACK ||
+ data[0] == RMI_INPUTSTREAM_MESSAGE_NOTSUPPORTED ||
+ data[0] == RMI_INPUTSTREAM_MESSAGE_RETURNDATA ||
+ data[0] == RMI_INPUTSTREAM_MESSAGE_PINGACK) {
+ return RMI_INPUTSTREAM;
+ }
}
if (datalen >= 1) {
- if (data[0] == RMI_OUTPUTSTREAM_MESSAGE_CALL ||
- data[0] == RMI_OUTPUTSTREAM_MESSAGE_PING ||
- data[0] == RMI_OUTPUTSTREAM_MESSAGE_DGCACK) {
- return RMI_OUTPUTMESSAGE;
- }
+ if (data[0] == RMI_OUTPUTSTREAM_MESSAGE_CALL ||
+ data[0] == RMI_OUTPUTSTREAM_MESSAGE_PING ||
+ data[0] == RMI_OUTPUTSTREAM_MESSAGE_DGCACK) {
+ return RMI_OUTPUTMESSAGE;
+ }
}
return CONTINUATION;
}
@@ -302,64 +302,64 @@ proto_register_rmi(void)
{
static hf_register_info hf[] = {
- { &hf_rmi_magic,
- { "Magic", "rmi.magic",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- "RMI Header Magic", HFILL }},
- { &hf_rmi_version,
- { "Version", "rmi.version",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "RMI Protocol Version", HFILL }},
- { &hf_rmi_protocol,
- { "Protocol","rmi.protocol",
- FT_UINT8, BASE_HEX, VALS(rmi_protocol_str), 0x0,
- "RMI Protocol Type", HFILL }},
- { &hf_rmi_inputmessage,
- { "Input Stream Message", "rmi.inputstream.message",
- FT_UINT8, BASE_HEX, VALS(rmi_input_message_str), 0x0,
- "RMI Inputstream Message Token", HFILL }},
- { &hf_rmi_outputmessage,
- { "Output Stream Message", "rmi.outputstream.message",
- FT_UINT8, BASE_HEX, VALS(rmi_output_message_str), 0x0,
- "RMI Outputstream Message token", HFILL }},
- { &hf_rmi_epid_length,
- { "Length", "rmi.endpoint_id.length",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "RMI Endpointidentifier Length", HFILL }},
- { &hf_rmi_epid_hostname,
- { "Hostname", "rmi.endpoint_id.hostname",
- FT_STRING, BASE_NONE, NULL, 0x0,
- "RMI Endpointidentifier Hostname", HFILL }},
- { &hf_rmi_epid_port,
- { "Port", "rmi.endpoint_id.port",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "RMI Endpointindentifier Port", HFILL }},
-
- { &hf_ser_magic,
- { "Magic", "rmi.ser.magic",
- FT_UINT16, BASE_HEX, NULL, 0x0,
- "Java Serialization Magic", HFILL }},
- { &hf_ser_version,
- { "Version", "rmi.ser.version",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Java Serialization Version", HFILL }},
+ { &hf_rmi_magic,
+ { "Magic", "rmi.magic",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ "RMI Header Magic", HFILL }},
+ { &hf_rmi_version,
+ { "Version", "rmi.version",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "RMI Protocol Version", HFILL }},
+ { &hf_rmi_protocol,
+ { "Protocol","rmi.protocol",
+ FT_UINT8, BASE_HEX, VALS(rmi_protocol_str), 0x0,
+ "RMI Protocol Type", HFILL }},
+ { &hf_rmi_inputmessage,
+ { "Input Stream Message", "rmi.inputstream.message",
+ FT_UINT8, BASE_HEX, VALS(rmi_input_message_str), 0x0,
+ "RMI Inputstream Message Token", HFILL }},
+ { &hf_rmi_outputmessage,
+ { "Output Stream Message", "rmi.outputstream.message",
+ FT_UINT8, BASE_HEX, VALS(rmi_output_message_str), 0x0,
+ "RMI Outputstream Message token", HFILL }},
+ { &hf_rmi_epid_length,
+ { "Length", "rmi.endpoint_id.length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "RMI Endpointidentifier Length", HFILL }},
+ { &hf_rmi_epid_hostname,
+ { "Hostname", "rmi.endpoint_id.hostname",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "RMI Endpointidentifier Hostname", HFILL }},
+ { &hf_rmi_epid_port,
+ { "Port", "rmi.endpoint_id.port",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "RMI Endpointindentifier Port", HFILL }},
+
+ { &hf_ser_magic,
+ { "Magic", "rmi.ser.magic",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ "Java Serialization Magic", HFILL }},
+ { &hf_ser_version,
+ { "Version", "rmi.ser.version",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Java Serialization Version", HFILL }},
};
static gint *ett[] = {
- &ett_rmi,
- &ett_rmi_magic,
- &ett_rmi_version,
- &ett_rmi_inputmessage,
- &ett_rmi_outputmessage,
- &ett_rmi_epid_length,
- &ett_rmi_epid_hostname,
- &ett_rmi_epid_port,
- &ett_ser,
+ &ett_rmi,
+ &ett_rmi_magic,
+ &ett_rmi_version,
+ &ett_rmi_inputmessage,
+ &ett_rmi_outputmessage,
+ &ett_rmi_epid_length,
+ &ett_rmi_epid_hostname,
+ &ett_rmi_epid_port,
+ &ett_ser,
};
proto_rmi = proto_register_protocol("Java RMI", "RMI", "rmi");
proto_ser = proto_register_protocol("Java Serialization", "Serialization",
- "serialization");
+ "serialization");
proto_register_field_array(proto_rmi, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -373,3 +373,16 @@ proto_reg_handoff_rmi(void)
rmi_handle = create_dissector_handle(dissect_rmi, proto_rmi);
dissector_add_uint("tcp.port", TCP_PORT_RMI, rmi_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-rpl.c b/epan/dissectors/packet-rpl.c
index d3545e8786..e725d76b37 100644
--- a/epan/dissectors/packet-rpl.c
+++ b/epan/dissectors/packet-rpl.c
@@ -397,7 +397,7 @@ proto_register_rpl(void)
&ett_rpl_unkn
};
- proto_rpl = proto_register_protocol("Remote Program Load",
+ proto_rpl = proto_register_protocol("Remote Program Load",
"RPL", "rpl");
proto_register_field_array(proto_rpl, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -413,3 +413,16 @@ proto_reg_handoff_rpl(void)
rpl_handle = find_dissector("rpl");
dissector_add_uint("llc.dsap", SAP_RPL, rpl_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-rudp.c b/epan/dissectors/packet-rudp.c
index 8996464171..64471f0645 100644
--- a/epan/dissectors/packet-rudp.c
+++ b/epan/dissectors/packet-rudp.c
@@ -266,3 +266,16 @@ proto_reg_handoff_rudp(void) {
}
saved_udp_port = udp_port;
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-sebek.c b/epan/dissectors/packet-sebek.c
index ec22f89e4b..d9febb83c9 100644
--- a/epan/dissectors/packet-sebek.c
+++ b/epan/dissectors/packet-sebek.c
@@ -120,13 +120,13 @@ static gint ett_sebek = -1;
static int
dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- proto_tree *sebek_tree;
- proto_item *ti;
- int offset = 0;
- nstime_t ts;
- int sebek_ver = 0;
- int sebek_type = 0;
- int cmd_len = 0;
+ proto_tree *sebek_tree;
+ proto_item *ti;
+ int offset = 0;
+ nstime_t ts;
+ int sebek_ver = 0;
+ int sebek_type = 0;
+ int cmd_len = 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SEBEK");
@@ -257,7 +257,7 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
proto_tree_add_item(sebek_tree, hf_sebek_socket_proto, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
} else {
- proto_tree_add_item(sebek_tree, hf_sebek_data, tvb, offset, -1, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(sebek_tree, hf_sebek_data, tvb, offset, -1, ENC_ASCII|ENC_NA);
}
break;
@@ -349,3 +349,16 @@ proto_reg_handoff_sebek(void)
sebek_handle = new_create_dissector_handle(dissect_sebek, proto_sebek);
dissector_add_uint("udp.port", UDP_PORT_SEBEK, sebek_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-smb-common.c b/epan/dissectors/packet-smb-common.c
index 4dc0368ef4..6f94d1a262 100644
--- a/epan/dissectors/packet-smb-common.c
+++ b/epan/dissectors/packet-smb-common.c
@@ -59,7 +59,7 @@ const value_string share_type_vals[] = {
int display_ms_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index, char **data)
{
char *str;
- gint len;
+ gint len;
/* display a string from the tree and return the new offset */
@@ -77,10 +77,10 @@ int display_ms_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index,
int display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index, char **data)
{
- char *str, *p;
- int len;
- int charoffset;
- guint16 character;
+ char *str, *p;
+ int len;
+ int charoffset;
+ guint16 character;
/* display a unicode string from the tree and return new offset */
@@ -128,7 +128,7 @@ int display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_i
int dissect_ms_compressed_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index,
const char **data)
{
- int compr_len;
+ int compr_len;
const guchar *str = NULL;
/* The name data MUST start at offset 0 of the tvb */
@@ -154,12 +154,12 @@ static gchar *
unicode_to_str(tvbuff_t *tvb, int offset, int *us_lenp, gboolean exactlen,
guint16 bc)
{
- gchar *cur;
- gchar *p;
- guint16 uchar;
- int len;
- int us_len;
- gboolean overflow = FALSE;
+ gchar *cur;
+ gchar *p;
+ guint16 uchar;
+ int len;
+ int us_len;
+ gboolean overflow = FALSE;
cur=(gchar *)wmem_alloc(wmem_packet_scope(), MAX_UNICODE_STR_LEN+3+1);
p = cur;
@@ -224,11 +224,11 @@ get_unicode_or_ascii_string(tvbuff_t *tvb, int *offsetp,
gboolean useunicode, int *len, gboolean nopad, gboolean exactlen,
guint16 *bcp)
{
- gchar *cur;
+ gchar *cur;
const gchar *string;
- int string_len = 0;
- int copylen;
- gboolean overflow = FALSE;
+ int string_len = 0;
+ int copylen;
+ gboolean overflow = FALSE;
if (*bcp == 0) {
/* Not enough data in buffer */
@@ -296,3 +296,16 @@ get_unicode_or_ascii_string(tvbuff_t *tvb, int *offsetp,
*len = string_len;
return string;
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-smb-mailslot.c b/epan/dissectors/packet-smb-mailslot.c
index b3204b35cb..12db7fa641 100644
--- a/epan/dissectors/packet-smb-mailslot.c
+++ b/epan/dissectors/packet-smb-mailslot.c
@@ -222,24 +222,24 @@ proto_register_smb_mailslot(void)
{
static hf_register_info hf[] = {
{ &hf_opcode,
- { "Opcode", "mailslot.opcode", FT_UINT16, BASE_DEC,
- VALS(opcode_vals), 0, "MAILSLOT OpCode", HFILL }},
+ { "Opcode", "mailslot.opcode", FT_UINT16, BASE_DEC,
+ VALS(opcode_vals), 0, "MAILSLOT OpCode", HFILL }},
{ &hf_priority,
- { "Priority", "mailslot.priority", FT_UINT16, BASE_DEC,
- NULL, 0, "MAILSLOT Priority of transaction", HFILL }},
+ { "Priority", "mailslot.priority", FT_UINT16, BASE_DEC,
+ NULL, 0, "MAILSLOT Priority of transaction", HFILL }},
{ &hf_class,
- { "Class", "mailslot.class", FT_UINT16, BASE_DEC,
- VALS(class_vals), 0, "MAILSLOT Class of transaction", HFILL }},
+ { "Class", "mailslot.class", FT_UINT16, BASE_DEC,
+ VALS(class_vals), 0, "MAILSLOT Class of transaction", HFILL }},
{ &hf_size,
- { "Size", "mailslot.size", FT_UINT16, BASE_DEC,
- NULL, 0, "MAILSLOT Total size of mail data", HFILL }},
+ { "Size", "mailslot.size", FT_UINT16, BASE_DEC,
+ NULL, 0, "MAILSLOT Total size of mail data", HFILL }},
{ &hf_name,
- { "Mailslot Name", "mailslot.name", FT_STRING, BASE_NONE,
- NULL, 0, "MAILSLOT Name of mailslot", HFILL }},
+ { "Mailslot Name", "mailslot.name", FT_STRING, BASE_NONE,
+ NULL, 0, "MAILSLOT Name of mailslot", HFILL }},
};
@@ -262,3 +262,16 @@ proto_reg_handoff_smb_mailslot(void)
netlogon_handle = find_dissector("smb_netlogon");
data_handle = find_dissector("data");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-smb-sidsnooping.c b/epan/dissectors/packet-smb-sidsnooping.c
index c2c51f8154..58ccf9dbae 100644
--- a/epan/dissectors/packet-smb-sidsnooping.c
+++ b/epan/dissectors/packet-smb-sidsnooping.c
@@ -66,7 +66,7 @@ char *
find_sid_name(const char *sid)
{
sid_name *sn;
- sid_name old_sn;
+ sid_name old_sn;
old_sn.sid=(char*)sid;
sn=(sid_name *)g_hash_table_lookup(sid_name_table, &old_sn);
@@ -80,7 +80,7 @@ static void
add_sid_name_mapping(char *sid, char *name)
{
sid_name *sn;
- sid_name old_sn;
+ sid_name old_sn;
old_sn.sid=sid;
sn=(sid_name *)g_hash_table_lookup(sid_name_table, &old_sn);
@@ -409,5 +409,18 @@ sid_name_snooping=0;
void
proto_register_smb_sidsnooping(void)
{
- register_init_routine(sid_snooping_init);
+ register_init_routine(sid_snooping_init);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-socketcan.c b/epan/dissectors/packet-socketcan.c
index 6f2aa55389..d464df3f5e 100644
--- a/epan/dissectors/packet-socketcan.c
+++ b/epan/dissectors/packet-socketcan.c
@@ -89,10 +89,10 @@ struct can_identifier
};
static const enum_val_t can_high_level_protocol_dissector_options[] = {
- { "raw", "Raw data (no further dissection)", CAN_DATA_DISSECTOR },
+ { "raw", "Raw data (no further dissection)", CAN_DATA_DISSECTOR },
{ "CANopen", "CANopen protocol", CAN_CANOPEN_DISSECTOR },
{ "DeviceNet", "DeviceNet protocol", CAN_DEVICENET_DISSECTOR },
- { "J1939", "J1939 protocol", CAN_J1939_DISSECTOR },
+ { "J1939", "J1939 protocol", CAN_J1939_DISSECTOR },
{ NULL, NULL, 0 }
};
@@ -169,7 +169,7 @@ dissect_socketcan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case CAN_DEVICENET_DISSECTOR:
/* XXX - Not sure this is correct. But the capture provided in
- * bug 8564 provides CAN ID in little endian format, so this makes it work */
+ * bug 8564 provides CAN ID in little endian format, so this makes it work */
can_id.id = GUINT32_SWAP_LE_BE(can_id.id);
call_dissector_with_data(devicenet_handle, next_tvb, pinfo, tree, &can_id);
@@ -274,3 +274,16 @@ proto_reg_handoff_socketcan(void)
j1939_handle = find_dissector("j1939");
data_handle = find_dissector("data");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-spp.c b/epan/dissectors/packet-spp.c
index fb7273cc42..96a50837b4 100644
--- a/epan/dissectors/packet-spp.c
+++ b/epan/dissectors/packet-spp.c
@@ -106,16 +106,16 @@ spp_datastream(guint8 type)
static void
dissect_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *spp_tree = NULL;
- proto_item *ti;
- tvbuff_t *next_tvb;
- guint8 conn_ctrl;
- proto_tree *cc_tree;
- guint8 datastream_type;
- const char *datastream_type_string;
- guint16 spp_seq;
- const char *spp_msg_string;
- guint16 low_socket, high_socket;
+ proto_tree *spp_tree = NULL;
+ proto_item *ti;
+ tvbuff_t *next_tvb;
+ guint8 conn_ctrl;
+ proto_tree *cc_tree;
+ guint8 datastream_type;
+ const char *datastream_type_string;
+ guint16 spp_seq;
+ const char *spp_msg_string;
+ guint16 low_socket, high_socket;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SPP");
col_set_str(pinfo->cinfo, COL_INFO, "SPP");
@@ -282,3 +282,16 @@ proto_reg_handoff_spp(void)
data_handle = find_dissector("data");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-stat.c b/epan/dissectors/packet-stat.c
index 8db649f26a..ff61c80f6a 100644
--- a/epan/dissectors/packet-stat.c
+++ b/epan/dissectors/packet-stat.c
@@ -165,7 +165,7 @@ mon_id_len(tvbuff_t *tvb, int offset)
}
static int
-dissect_stat_stat(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_stat_stat(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
if (tree)
{
@@ -176,10 +176,10 @@ dissect_stat_stat(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
}
static int
-dissect_stat_stat_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_stat_stat_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- proto_item* sub_item;
- proto_tree* sub_tree;
+ proto_item *sub_item;
+ proto_tree *sub_tree;
gint32 res;
sub_item = proto_tree_add_item(tree, &hfi_stat_stat_res, tvb,
@@ -201,8 +201,8 @@ dissect_stat_stat_res(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
static int
dissect_stat_my_id(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- proto_item* sub_item;
- proto_tree* sub_tree;
+ proto_item *sub_item;
+ proto_tree *sub_tree;
sub_item = proto_tree_add_item(tree, &hfi_stat_my_id, tvb,
offset, my_id_len(tvb,offset), ENC_NA);
@@ -217,10 +217,10 @@ dissect_stat_my_id(tvbuff_t *tvb, int offset, proto_tree *tree)
}
static int
-dissect_stat_mon_id(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_stat_mon_id(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- proto_item* sub_item;
- proto_tree* sub_tree;
+ proto_item *sub_item;
+ proto_tree *sub_tree;
sub_item = proto_tree_add_item(tree, &hfi_stat_mon, tvb,
offset, mon_id_len(tvb,offset), ENC_NA);
@@ -243,7 +243,7 @@ dissect_stat_priv(tvbuff_t *tvb, int offset, proto_tree *tree)
}
static int
-dissect_stat_mon(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void* data _U_)
+dissect_stat_mon(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
offset = dissect_stat_mon_id(tvb,offset,pinfo,tree,data);
@@ -253,7 +253,7 @@ dissect_stat_mon(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
}
static int
-dissect_stat_state(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_stat_state(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
offset = dissect_rpc_uint32(tvb,tree,hfi_stat_state.id,offset);
@@ -261,10 +261,10 @@ dissect_stat_state(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
}
static int
-dissect_stat_notify(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_stat_notify(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
- proto_item* sub_item;
- proto_tree* sub_tree;
+ proto_item *sub_item;
+ proto_tree *sub_tree;
int start_offset = offset;
sub_item = proto_tree_add_item(tree, &hfi_stat_stat_chge, tvb,
@@ -282,7 +282,7 @@ dissect_stat_notify(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tre
}
static int
-dissect_stat_umon_all(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
+dissect_stat_umon_all(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
{
offset = dissect_stat_my_id(tvb,offset,tree);
@@ -293,20 +293,20 @@ dissect_stat_umon_all(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t
/* NULL as function pointer means: type of arguments is "void". */
static const vsff stat1_proc[] = {
- { 0, "NULL", NULL, NULL },
- { STATPROC_STAT, "STAT",
- dissect_stat_stat, dissect_stat_stat_res },
- { STATPROC_MON, "MON",
- dissect_stat_mon, dissect_stat_stat_res },
- { STATPROC_UNMON, "UNMON",
- dissect_stat_mon_id, dissect_stat_state },
- { STATPROC_UNMON_ALL, "UNMON_ALL",
- dissect_stat_umon_all, dissect_stat_state },
- { STATPROC_SIMU_CRASH, "SIMU_CRASH",
- NULL, NULL },
- { STATPROC_NOTIFY, "NOTIFY",
- dissect_stat_notify, NULL },
- { 0, NULL, NULL, NULL }
+ { 0, "NULL", NULL, NULL },
+ { STATPROC_STAT, "STAT",
+ dissect_stat_stat, dissect_stat_stat_res },
+ { STATPROC_MON, "MON",
+ dissect_stat_mon, dissect_stat_stat_res },
+ { STATPROC_UNMON, "UNMON",
+ dissect_stat_mon_id, dissect_stat_state },
+ { STATPROC_UNMON_ALL, "UNMON_ALL",
+ dissect_stat_umon_all, dissect_stat_state },
+ { STATPROC_SIMU_CRASH, "SIMU_CRASH",
+ NULL, NULL },
+ { STATPROC_NOTIFY, "NOTIFY",
+ dissect_stat_notify, NULL },
+ { 0, NULL, NULL, NULL }
};
/* end of stat version 1 */
@@ -359,3 +359,16 @@ proto_reg_handoff_stat(void)
/* Register the procedure tables */
rpc_init_proc_table(STAT_PROGRAM, 1, stat1_proc, hfi_stat_procedure_v1.id);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-tnef.c b/epan/dissectors/packet-tnef.c
index 66bc51e8ae..23390a84de 100644
--- a/epan/dissectors/packet-tnef.c
+++ b/epan/dissectors/packet-tnef.c
@@ -184,120 +184,120 @@ static const value_string tnef_Priority_vals[] = {
};
static const value_string tnef_Types_vals[] = {
- { ATP_TRIPLES, "Triples" },
- { ATP_STRING, "String"},
- { ATP_TEXT, "Text" },
- { ATP_DATE, "Date"},
- { ATP_SHORT, "Short"},
- { ATP_LONG, "Long"},
- { ATP_BYTE, "Byte"},
- { ATP_WORD, "Word"},
- { ATP_DWORD, "DWord"},
- { ATP_MAX, "Max"},
- { 0, NULL }
+ { ATP_TRIPLES, "Triples" },
+ { ATP_STRING, "String"},
+ { ATP_TEXT, "Text" },
+ { ATP_DATE, "Date"},
+ { ATP_SHORT, "Short"},
+ { ATP_LONG, "Long"},
+ { ATP_BYTE, "Byte"},
+ { ATP_WORD, "Word"},
+ { ATP_DWORD, "DWord"},
+ { ATP_MAX, "Max"},
+ { 0, NULL }
};
static const value_string weekday_vals[] = {
- {0, "Sunday"},
- {1, "Monday"},
- {2, "Tuesday"},
- {3, "Wednesday"},
- {4, "Thursday"},
- {5, "Friday"},
- {6, "Saturday"},
- {0, NULL}
+ {0, "Sunday"},
+ {1, "Monday"},
+ {2, "Tuesday"},
+ {3, "Wednesday"},
+ {4, "Thursday"},
+ {5, "Friday"},
+ {6, "Saturday"},
+ {0, NULL}
};
static const value_string tnef_Attribute_vals[] = {
- { ATT_OWNER, "ATT_OWNER" },
- { ATT_SENT_FOR, "ATT_SENT_FOR" },
- { ATT_DELEGATE, "ATT_DELEGATE" },
- { ATT_OWNER, "ATT_OWNER" },
- { ATT_DATE_START, "ATT_DATE_START" },
- { ATT_DATE_END, "ATT_DATE_END" },
- { ATT_AID_OWNER, "ATT_AID_OWNER" },
- { ATT_REQUEST_RES, "ATT_REQUEST_RES" },
- { ATT_FROM, "ATT_FROM" },
- { ATT_SUBJECT, "ATT_SUBJECT" },
- { ATT_DATE_SENT, "ATT_DATE_SENT" },
- { ATT_DATE_RECD, "ATT_DATE_RECD" },
- { ATT_MESSAGE_STATUS, "ATT_MESSAGE_STATUS" },
- { ATT_MESSAGE_CLASS, "ATT_MESSAGE_CLASS" },
- { ATT_MESSAGE_ID, "ATT_MESSAGE_ID" },
- { ATT_PARENT_ID, "ATT_PARENT_ID" },
- { ATT_CONVERSATION_ID, "ATT_CONVERSATION_ID" },
- { ATT_BODY, "ATT_BODY" },
- { ATT_PRIORITY, "ATT_PRIORITY" },
- { ATT_ATTACH_DATA, "ATT_ATTACH_DATA" },
- { ATT_ATTACH_TITLE, "ATT_ATTACH_TITLE" },
- { ATT_ATTACH_META_FILE, "ATT_ATTACH_META_FILE" },
- { ATT_ATTACH_CREATE_DATE, "ATT_ATTACH_CREATE_DATE" },
- { ATT_ATTACH_MODIFY_DATE, "ATT_ATTACH_MODIFY_DATE" },
- { ATT_DATE_MODIFIED, "ATT_DATE_MODIFIED" },
- { ATT_ATTACH_TRANSPORT_FILENAME, "ATT_ATTACH_TRANSPORT_FILENAME" },
- { ATT_ATTACH_REND_DATA, "ATT_ATTACH_REND_DATA" },
- { ATT_MAPI_PROPS, "ATT_MAPI_PROPS" },
- { ATT_RECIP_TABLE, "ATT_RECIP_TABLE" },
- { ATT_ATTACHMENT, "ATT_ATTACHMENT" },
- { ATT_TNEF_VERSION, "ATT_TNEF_VERSION" },
- { ATT_OEM_CODEPAGE, "ATT_OEM_CODEPAGE" },
- { ATT_ORIGINAL_MESSAGE_CLASS, "ATT_ORIGINAL_MESSAGE_CLASS" },
- { 0, NULL }
+ { ATT_OWNER, "ATT_OWNER" },
+ { ATT_SENT_FOR, "ATT_SENT_FOR" },
+ { ATT_DELEGATE, "ATT_DELEGATE" },
+ { ATT_OWNER, "ATT_OWNER" },
+ { ATT_DATE_START, "ATT_DATE_START" },
+ { ATT_DATE_END, "ATT_DATE_END" },
+ { ATT_AID_OWNER, "ATT_AID_OWNER" },
+ { ATT_REQUEST_RES, "ATT_REQUEST_RES" },
+ { ATT_FROM, "ATT_FROM" },
+ { ATT_SUBJECT, "ATT_SUBJECT" },
+ { ATT_DATE_SENT, "ATT_DATE_SENT" },
+ { ATT_DATE_RECD, "ATT_DATE_RECD" },
+ { ATT_MESSAGE_STATUS, "ATT_MESSAGE_STATUS" },
+ { ATT_MESSAGE_CLASS, "ATT_MESSAGE_CLASS" },
+ { ATT_MESSAGE_ID, "ATT_MESSAGE_ID" },
+ { ATT_PARENT_ID, "ATT_PARENT_ID" },
+ { ATT_CONVERSATION_ID, "ATT_CONVERSATION_ID" },
+ { ATT_BODY, "ATT_BODY" },
+ { ATT_PRIORITY, "ATT_PRIORITY" },
+ { ATT_ATTACH_DATA, "ATT_ATTACH_DATA" },
+ { ATT_ATTACH_TITLE, "ATT_ATTACH_TITLE" },
+ { ATT_ATTACH_META_FILE, "ATT_ATTACH_META_FILE" },
+ { ATT_ATTACH_CREATE_DATE, "ATT_ATTACH_CREATE_DATE" },
+ { ATT_ATTACH_MODIFY_DATE, "ATT_ATTACH_MODIFY_DATE" },
+ { ATT_DATE_MODIFIED, "ATT_DATE_MODIFIED" },
+ { ATT_ATTACH_TRANSPORT_FILENAME, "ATT_ATTACH_TRANSPORT_FILENAME" },
+ { ATT_ATTACH_REND_DATA, "ATT_ATTACH_REND_DATA" },
+ { ATT_MAPI_PROPS, "ATT_MAPI_PROPS" },
+ { ATT_RECIP_TABLE, "ATT_RECIP_TABLE" },
+ { ATT_ATTACHMENT, "ATT_ATTACHMENT" },
+ { ATT_TNEF_VERSION, "ATT_TNEF_VERSION" },
+ { ATT_OEM_CODEPAGE, "ATT_OEM_CODEPAGE" },
+ { ATT_ORIGINAL_MESSAGE_CLASS, "ATT_ORIGINAL_MESSAGE_CLASS" },
+ { 0, NULL }
};
static gint dissect_counted_values(tvbuff_t *tvb, gint offset, int hf_id, packet_info *pinfo, proto_tree *tree, gboolean single, guint encoding)
{
- proto_item *item;
- guint32 length, count, i;
+ proto_item *item;
+ guint32 length, count, i;
- count = tvb_get_letohl(tvb, offset);
- proto_tree_add_item(tree, hf_tnef_values_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ count = tvb_get_letohl(tvb, offset);
+ proto_tree_add_item(tree, hf_tnef_values_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- if(count > 1) {
- if(single) {
- item = proto_tree_add_expert_format(tree, pinfo, &ei_tnef_expect_single_item, tvb, offset, 4,
- "Expecting a single item but found %d", count);
- tree = proto_item_add_subtree(item, ett_tnef_counted_items);
- }
- }
+ if(count > 1) {
+ if(single) {
+ item = proto_tree_add_expert_format(tree, pinfo, &ei_tnef_expect_single_item, tvb, offset, 4,
+ "Expecting a single item but found %d", count);
+ tree = proto_item_add_subtree(item, ett_tnef_counted_items);
+ }
+ }
- offset += 4;
+ offset += 4;
- for(i = 0; i < count; i++) {
+ for(i = 0; i < count; i++) {
- length = tvb_get_letohl(tvb, offset);
- proto_tree_add_item(tree, hf_tnef_value_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- offset += 4;
+ length = tvb_get_letohl(tvb, offset);
+ proto_tree_add_item(tree, hf_tnef_value_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ offset += 4;
- proto_tree_add_item(tree, hf_id, tvb, offset, length, encoding);
- offset += length;
+ proto_tree_add_item(tree, hf_id, tvb, offset, length, encoding);
+ offset += length;
- /* XXX: may be padding ? */
+ /* XXX: may be padding ? */
- }
+ }
- return offset;
+ return offset;
}
static gint dissect_counted_address(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint16 length;
+ guint16 length;
- length = tvb_get_letohs(tvb, offset);
- proto_tree_add_item(tree, hf_tnef_value_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- offset += 2;
+ length = tvb_get_letohs(tvb, offset);
+ proto_tree_add_item(tree, hf_tnef_value_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_tnef_attribute_display_name, tvb, offset, length, ENC_ASCII|ENC_NA);
- offset += length;
+ proto_tree_add_item(tree, hf_tnef_attribute_display_name, tvb, offset, length, ENC_ASCII|ENC_NA);
+ offset += length;
- length = tvb_get_letohs(tvb, offset);
- proto_tree_add_item(tree, hf_tnef_value_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- offset += 2;
+ length = tvb_get_letohs(tvb, offset);
+ proto_tree_add_item(tree, hf_tnef_value_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
- proto_tree_add_item(tree, hf_tnef_attribute_email_address, tvb, offset, length, ENC_ASCII|ENC_NA);
- offset += length;
+ proto_tree_add_item(tree, hf_tnef_attribute_email_address, tvb, offset, length, ENC_ASCII|ENC_NA);
+ offset += length;
- return offset;
+ return offset;
}
@@ -332,170 +332,170 @@ static void dissect_DTR(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *item, *prop_item;
- proto_tree *prop_tree, *tag_tree;
- guint32 /*count,*/ tag, tag_kind, tag_length;
- guint16 padding;
- gint offset, start_offset;
+ proto_item *item, *prop_item;
+ proto_tree *prop_tree, *tag_tree;
+ guint32 /*count,*/ tag, tag_kind, tag_length;
+ guint16 padding;
+ gint offset, start_offset;
- guint8 drep[] = {0x10 /* LE */, /* DCE_RPC_DREP_FP_IEEE */ 0 };
- static dcerpc_info di;
- static dcerpc_call_value call_data;
+ guint8 drep[] = {0x10 /* LE */, /* DCE_RPC_DREP_FP_IEEE */ 0 };
+ static dcerpc_info di;
+ static dcerpc_call_value call_data;
- offset = 0;
+ offset = 0;
+
+ di.conformant_run = 0;
+ /* we need di->call_data->flags.NDR64 == 0 */
+ di.call_data = &call_data;
+ di.dcerpc_procedure_name = "";
+
+ /* first the count */
+ proto_tree_add_item(tree, hf_tnef_mapi_props_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ /*count = tvb_get_letohl(tvb, offset);*/
+
+ offset += 4;
+
+ while(tvb_reported_length_remaining(tvb, offset) > 0 ) {
+
+ start_offset = offset;
+
+ /* get the property tag */
+
+ prop_item = proto_tree_add_item(tree, hf_tnef_property, tvb, offset, -1, ENC_NA);
+ prop_tree = proto_item_add_subtree(prop_item, ett_tnef_property);
+
+ item = proto_tree_add_item(prop_tree, hf_tnef_property_tag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ tag_tree = proto_item_add_subtree(item, ett_tnef_property_tag);
+
+ /* add a nice name to the property */
+ tag = tvb_get_letohl(tvb, offset);
+ proto_item_append_text(prop_item, " %s", val_to_str(tag, nspi_MAPITAGS_vals, "Unknown tag (0x%08lx)"));
+
+ proto_tree_add_item(tag_tree, hf_tnef_property_tag_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
- di.conformant_run = 0;
- /* we need di->call_data->flags.NDR64 == 0 */
- di.call_data = &call_data;
- di.dcerpc_procedure_name = "";
-
- /* first the count */
- proto_tree_add_item(tree, hf_tnef_mapi_props_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- /*count = tvb_get_letohl(tvb, offset);*/
-
- offset += 4;
-
- while(tvb_reported_length_remaining(tvb, offset) > 0 ) {
-
- start_offset = offset;
-
- /* get the property tag */
-
- prop_item = proto_tree_add_item(tree, hf_tnef_property, tvb, offset, -1, ENC_NA);
- prop_tree = proto_item_add_subtree(prop_item, ett_tnef_property);
-
- item = proto_tree_add_item(prop_tree, hf_tnef_property_tag, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- tag_tree = proto_item_add_subtree(item, ett_tnef_property_tag);
-
- /* add a nice name to the property */
- tag = tvb_get_letohl(tvb, offset);
- proto_item_append_text(prop_item, " %s", val_to_str(tag, nspi_MAPITAGS_vals, "Unknown tag (0x%08lx)"));
-
- proto_tree_add_item(tag_tree, hf_tnef_property_tag_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- offset += 2;
-
- proto_tree_add_item(tag_tree, hf_tnef_property_tag_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- offset += 2;
-
- if(tag & 0x80000000) {
-
- /* it is a named property */
- proto_tree_add_item(tag_tree, hf_tnef_property_tag_set, tvb, offset, 16, ENC_LITTLE_ENDIAN);
- offset += 16;
-
- tag_kind = tvb_get_letohl(tvb, offset);
- proto_tree_add_item(tag_tree, hf_tnef_property_tag_kind, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- offset += 4;
-
- if(tag_kind == 0) {
- proto_tree_add_item(tag_tree, hf_tnef_property_tag_name_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- offset += 4;
-
- proto_item_append_text(prop_item, " [Named Property]");
- } else {
- char *name_string = NULL;
-
- tag_length = tvb_get_letohl(tvb, offset);
- proto_tree_add_item(tag_tree, hf_tnef_property_tag_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- offset += 4;
-
- proto_tree_add_item(tag_tree, hf_tnef_property_tag_name_string, tvb, offset, tag_length, ENC_UTF_16|ENC_LITTLE_ENDIAN);
- offset += tag_length;
-
- if((padding = (4 - tag_length % 4)) != 4) {
- proto_tree_add_item(tag_tree, hf_tnef_property_padding, tvb, offset, padding, ENC_NA);
- offset += padding;
- }
-
- proto_item_append_text(prop_item, " [Named Property: %s]", name_string);
-
- }
- }
-
- switch(tag) {
- /* handle any specific tags here */
- default:
- /* otherwise just use the type */
- switch(tag & 0x0000ffff) {
- case PT_I2:
- offset = PIDL_dissect_uint16(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_i, 0);
- break;
- case PT_LONG:
- offset = PIDL_dissect_uint32(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_l, 0);
- break;
- case PT_BOOLEAN:
- offset = PIDL_dissect_uint16(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_b, 0);
- break;
- case PT_STRING8:
- /* XXX - code page? */
- offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_lpszA, pinfo, prop_tree, TRUE, ENC_ASCII|ENC_NA);
- break;
- case PT_BINARY:
- offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_bin, pinfo, prop_tree, TRUE, ENC_NA);
- break;
- case PT_UNICODE:
- offset = dissect_counted_values (tvb, offset, hf_tnef_PropValue_lpszW, pinfo, prop_tree, TRUE, ENC_UTF_16|ENC_NA);
- break;
- case PT_CLSID:
- offset = nspi_dissect_struct_MAPIUID(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_lpguid, 0);
- break;
- case PT_SYSTIME:
- offset = nspi_dissect_struct_FILETIME(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_ft,0);
- break;
- case PT_ERROR:
- offset = nspi_dissect_enum_MAPISTATUS(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_err, 0);
- break;
- case PT_MV_I2:
- offset = nspi_dissect_struct_SShortArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVi,0);
- break;
- case PT_MV_LONG:
- offset = nspi_dissect_struct_MV_LONG_STRUCT(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVl,0);
- break;
- case PT_MV_STRING8:
- offset = nspi_dissect_struct_SLPSTRArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVszA,0);
- break;
- case PT_MV_BINARY:
- offset = nspi_dissect_struct_SBinaryArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVbin,0);
- break;
- case PT_MV_CLSID:
- offset = nspi_dissect_struct_SGuidArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVguid,0);
- break;
- case PT_MV_UNICODE:
- offset = nspi_dissect_struct_MV_UNICODE_STRUCT(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVszW,0);
- break;
- case PT_MV_SYSTIME:
- offset = nspi_dissect_struct_SDateTimeArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVft,0);
- break;
- case PT_NULL:
- offset = PIDL_dissect_uint32(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_null, 0);
- break;
- case PT_OBJECT:
- offset = PIDL_dissect_uint32(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_object, 0);
- break;
- }
- }
-
- /* we may need to pad to a 4-byte boundary */
- if((padding = (4 - (offset - start_offset) % 4)) != 4) {
-
- /* we need to pad */
- proto_tree_add_item(prop_tree, hf_tnef_property_padding, tvb, offset, padding, ENC_NA);
-
- offset += padding;
- }
-
- proto_item_set_len(prop_item, offset - start_offset);
- }
+ proto_tree_add_item(tag_tree, hf_tnef_property_tag_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ offset += 2;
+
+ if(tag & 0x80000000) {
+
+ /* it is a named property */
+ proto_tree_add_item(tag_tree, hf_tnef_property_tag_set, tvb, offset, 16, ENC_LITTLE_ENDIAN);
+ offset += 16;
+
+ tag_kind = tvb_get_letohl(tvb, offset);
+ proto_tree_add_item(tag_tree, hf_tnef_property_tag_kind, tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ offset += 4;
+
+ if(tag_kind == 0) {
+ proto_tree_add_item(tag_tree, hf_tnef_property_tag_name_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ offset += 4;
+
+ proto_item_append_text(prop_item, " [Named Property]");
+ } else {
+ char *name_string = NULL;
+
+ tag_length = tvb_get_letohl(tvb, offset);
+ proto_tree_add_item(tag_tree, hf_tnef_property_tag_name_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
+ offset += 4;
+
+ proto_tree_add_item(tag_tree, hf_tnef_property_tag_name_string, tvb, offset, tag_length, ENC_UTF_16|ENC_LITTLE_ENDIAN);
+ offset += tag_length;
+
+ if((padding = (4 - tag_length % 4)) != 4) {
+ proto_tree_add_item(tag_tree, hf_tnef_property_padding, tvb, offset, padding, ENC_NA);
+ offset += padding;
+ }
+
+ proto_item_append_text(prop_item, " [Named Property: %s]", name_string);
+
+ }
+ }
+
+ switch(tag) {
+ /* handle any specific tags here */
+ default:
+ /* otherwise just use the type */
+ switch(tag & 0x0000ffff) {
+ case PT_I2:
+ offset = PIDL_dissect_uint16(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_i, 0);
+ break;
+ case PT_LONG:
+ offset = PIDL_dissect_uint32(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_l, 0);
+ break;
+ case PT_BOOLEAN:
+ offset = PIDL_dissect_uint16(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_b, 0);
+ break;
+ case PT_STRING8:
+ /* XXX - code page? */
+ offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_lpszA, pinfo, prop_tree, TRUE, ENC_ASCII|ENC_NA);
+ break;
+ case PT_BINARY:
+ offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_bin, pinfo, prop_tree, TRUE, ENC_NA);
+ break;
+ case PT_UNICODE:
+ offset = dissect_counted_values (tvb, offset, hf_tnef_PropValue_lpszW, pinfo, prop_tree, TRUE, ENC_UTF_16|ENC_NA);
+ break;
+ case PT_CLSID:
+ offset = nspi_dissect_struct_MAPIUID(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_lpguid, 0);
+ break;
+ case PT_SYSTIME:
+ offset = nspi_dissect_struct_FILETIME(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_ft,0);
+ break;
+ case PT_ERROR:
+ offset = nspi_dissect_enum_MAPISTATUS(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_err, 0);
+ break;
+ case PT_MV_I2:
+ offset = nspi_dissect_struct_SShortArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVi,0);
+ break;
+ case PT_MV_LONG:
+ offset = nspi_dissect_struct_MV_LONG_STRUCT(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVl,0);
+ break;
+ case PT_MV_STRING8:
+ offset = nspi_dissect_struct_SLPSTRArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVszA,0);
+ break;
+ case PT_MV_BINARY:
+ offset = nspi_dissect_struct_SBinaryArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVbin,0);
+ break;
+ case PT_MV_CLSID:
+ offset = nspi_dissect_struct_SGuidArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVguid,0);
+ break;
+ case PT_MV_UNICODE:
+ offset = nspi_dissect_struct_MV_UNICODE_STRUCT(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVszW,0);
+ break;
+ case PT_MV_SYSTIME:
+ offset = nspi_dissect_struct_SDateTimeArray(tvb,offset,pinfo,prop_tree,&di,drep,hf_tnef_PropValue_MVft,0);
+ break;
+ case PT_NULL:
+ offset = PIDL_dissect_uint32(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_null, 0);
+ break;
+ case PT_OBJECT:
+ offset = PIDL_dissect_uint32(tvb, offset, pinfo, prop_tree, &di, drep, hf_tnef_PropValue_object, 0);
+ break;
+ }
+ }
+
+ /* we may need to pad to a 4-byte boundary */
+ if((padding = (4 - (offset - start_offset) % 4)) != 4) {
+
+ /* we need to pad */
+ proto_tree_add_item(prop_tree, hf_tnef_property_padding, tvb, offset, padding, ENC_NA);
+
+ offset += padding;
+ }
+
+ proto_item_set_len(prop_item, offset - start_offset);
+ }
}
static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *attr_item, *item;
- proto_tree *attr_tree, *tag_tree, *props_tree, *addr_tree, *date_tree;
+ proto_item *attr_item, *item;
+ proto_tree *attr_tree, *tag_tree, *props_tree, *addr_tree, *date_tree;
guint32 tag, length, signature;
gint offset, start_offset;
- tvbuff_t *next_tvb;
+ tvbuff_t *next_tvb;
if(tree){
item = proto_tree_add_item(tree, proto_tnef, tvb, 0, -1, ENC_NA);
@@ -555,56 +555,56 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch(tag) {
case ATT_OEM_CODEPAGE:
- proto_tree_add_item(attr_tree, hf_tnef_oem_codepage, tvb, offset, length, ENC_LITTLE_ENDIAN);
- break;
+ proto_tree_add_item(attr_tree, hf_tnef_oem_codepage, tvb, offset, length, ENC_LITTLE_ENDIAN);
+ break;
case ATT_TNEF_VERSION:
- proto_tree_add_item(attr_tree, hf_tnef_version, tvb, offset, length, ENC_LITTLE_ENDIAN);
- break;
+ proto_tree_add_item(attr_tree, hf_tnef_version, tvb, offset, length, ENC_LITTLE_ENDIAN);
+ break;
case ATT_MESSAGE_CLASS:
- proto_tree_add_item(attr_tree, hf_tnef_message_class, tvb, offset, length, ENC_ASCII|ENC_NA);
- break;
+ proto_tree_add_item(attr_tree, hf_tnef_message_class, tvb, offset, length, ENC_ASCII|ENC_NA);
+ break;
case ATT_ORIGINAL_MESSAGE_CLASS:
- proto_tree_add_item(attr_tree, hf_tnef_original_message_class, tvb, offset, length, ENC_ASCII|ENC_NA);
- break;
+ proto_tree_add_item(attr_tree, hf_tnef_original_message_class, tvb, offset, length, ENC_ASCII|ENC_NA);
+ break;
case ATT_MAPI_PROPS:
- item = proto_tree_add_item(attr_tree, hf_tnef_mapi_props, tvb, offset, length, ENC_NA);
- props_tree = proto_item_add_subtree(item, ett_tnef_mapi_props);
+ item = proto_tree_add_item(attr_tree, hf_tnef_mapi_props, tvb, offset, length, ENC_NA);
+ props_tree = proto_item_add_subtree(item, ett_tnef_mapi_props);
- next_tvb = tvb_new_subset_length(tvb, offset, length);
+ next_tvb = tvb_new_subset_length(tvb, offset, length);
- dissect_mapiprops(next_tvb, pinfo, props_tree);
+ dissect_mapiprops(next_tvb, pinfo, props_tree);
- break;
+ break;
case ATT_OWNER:
case ATT_SENT_FOR:
- addr_tree = proto_item_add_subtree(item, ett_tnef_attribute_address);
+ addr_tree = proto_item_add_subtree(item, ett_tnef_attribute_address);
- (void)dissect_counted_address(tvb, offset, pinfo, addr_tree);
+ (void)dissect_counted_address(tvb, offset, pinfo, addr_tree);
- break;
+ break;
case ATT_PRIORITY:
- proto_tree_add_item(attr_tree, hf_tnef_priority, tvb, offset, length, ENC_LITTLE_ENDIAN);
- break;
+ proto_tree_add_item(attr_tree, hf_tnef_priority, tvb, offset, length, ENC_LITTLE_ENDIAN);
+ break;
default:
- /* just do it on the type */
- switch((tag >> 16) & 0xffff) {
- case ATP_DATE:
- item = proto_tree_add_item(attr_tree, hf_tnef_attribute_date, tvb, offset, length, ENC_NA);
- date_tree = proto_item_add_subtree(item, ett_tnef_attribute_date);
-
- next_tvb = tvb_new_subset_length(tvb, offset, length);
-
- dissect_DTR(next_tvb, pinfo, date_tree);
-
- break;
- case ATP_STRING:
- proto_tree_add_item(attr_tree, hf_tnef_attribute_string, tvb, offset, length, ENC_ASCII|ENC_NA);
- proto_item_append_text(attr_item, " %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
- break;
- default:
- proto_tree_add_item(attr_tree, hf_tnef_attribute_value, tvb, offset, length, ENC_NA);
- break;
- }
+ /* just do it on the type */
+ switch((tag >> 16) & 0xffff) {
+ case ATP_DATE:
+ item = proto_tree_add_item(attr_tree, hf_tnef_attribute_date, tvb, offset, length, ENC_NA);
+ date_tree = proto_item_add_subtree(item, ett_tnef_attribute_date);
+
+ next_tvb = tvb_new_subset_length(tvb, offset, length);
+
+ dissect_DTR(next_tvb, pinfo, date_tree);
+
+ break;
+ case ATP_STRING:
+ proto_tree_add_item(attr_tree, hf_tnef_attribute_string, tvb, offset, length, ENC_ASCII|ENC_NA);
+ proto_item_append_text(attr_item, " %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_ASCII));
+ break;
+ default:
+ proto_tree_add_item(attr_tree, hf_tnef_attribute_value, tvb, offset, length, ENC_NA);
+ break;
+ }
}
offset += length;
@@ -836,3 +836,16 @@ proto_reg_handoff_tnef(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_TNEF, tnef_file_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-tpkt.c b/epan/dissectors/packet-tpkt.c
index 13265a3e0a..fe4900ebbb 100644
--- a/epan/dissectors/packet-tpkt.c
+++ b/epan/dissectors/packet-tpkt.c
@@ -43,12 +43,12 @@ void proto_register_tpkt(void);
void proto_reg_handoff_tpkt(void);
/* TPKT header fields */
-static int proto_tpkt = -1;
+static int proto_tpkt = -1;
static protocol_t *proto_tpkt_ptr;
-static int hf_tpkt_version = -1;
-static int hf_tpkt_reserved = -1;
-static int hf_tpkt_length = -1;
-static int hf_tpkt_continuation_data = -1;
+static int hf_tpkt_version = -1;
+static int hf_tpkt_reserved = -1;
+static int hf_tpkt_length = -1;
+static int hf_tpkt_continuation_data = -1;
/* TPKT fields defining a sub tree */
@@ -57,7 +57,7 @@ static gint ett_tpkt = -1;
/* desegmentation of OSI over TPKT over TCP */
static gboolean tpkt_desegment = TRUE;
-#define TCP_PORT_TPKT 102
+#define TCP_PORT_TPKT 102
/* find the dissector for OSI TP (aka COTP) */
static dissector_handle_t osi_tp_handle;
@@ -74,39 +74,39 @@ static dissector_handle_t osi_tp_handle;
int
is_tpkt(tvbuff_t *tvb, int min_len)
{
- guint16 pkt_len;
-
- /*
- * If TPKT is disabled, don't dissect it, just return -1, meaning
- * "this isn't TPKT".
- */
- if (!proto_is_protocol_enabled(proto_tpkt_ptr))
- return -1;
-
- /* There should at least be 4 bytes left in the frame */
- if (tvb_length(tvb) < 4)
- return -1; /* there aren't */
-
- /*
- * The first octet should be 3 and the second one should be 0
- * The H.323 implementers guide suggests that this might not
- * always be the case....
- */
- if (!(tvb_get_guint8(tvb, 0) == 3 && tvb_get_guint8(tvb, 1) == 0))
- return -1; /* they're not */
-
- /*
- * Get the length from the TPKT header. Make sure it's large
- * enough.
- */
- pkt_len = tvb_get_ntohs(tvb, 2);
- if (pkt_len < 4 + min_len)
- return -1; /* it's not */
-
- /*
- * Return the length from the header.
- */
- return pkt_len;
+ guint16 pkt_len;
+
+ /*
+ * If TPKT is disabled, don't dissect it, just return -1, meaning
+ * "this isn't TPKT".
+ */
+ if (!proto_is_protocol_enabled(proto_tpkt_ptr))
+ return -1;
+
+ /* There should at least be 4 bytes left in the frame */
+ if (tvb_length(tvb) < 4)
+ return -1; /* there aren't */
+
+ /*
+ * The first octet should be 3 and the second one should be 0
+ * The H.323 implementers guide suggests that this might not
+ * always be the case....
+ */
+ if (!(tvb_get_guint8(tvb, 0) == 3 && tvb_get_guint8(tvb, 1) == 0))
+ return -1; /* they're not */
+
+ /*
+ * Get the length from the TPKT header. Make sure it's large
+ * enough.
+ */
+ pkt_len = tvb_get_ntohs(tvb, 2);
+ if (pkt_len < 4 + min_len)
+ return -1; /* it's not */
+
+ /*
+ * Return the length from the header.
+ */
+ return pkt_len;
}
guint16
is_asciitpkt(tvbuff_t *tvb)
@@ -207,7 +207,7 @@ parseReservedText ( guint8* pTpktData )
*/
void
dissect_asciitpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- dissector_handle_t subdissector_handle)
+ dissector_handle_t subdissector_handle)
{
proto_item *ti = NULL;
proto_tree *tpkt_tree = NULL;
@@ -252,7 +252,7 @@ dissect_asciitpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
if (tree) {
ti = proto_tree_add_item(tree, proto_tpkt, tvb,
- offset, -1, ENC_NA);
+ offset, -1, ENC_NA);
tpkt_tree = proto_item_add_subtree(ti, ett_tpkt);
proto_tree_add_item(tpkt_tree, hf_tpkt_continuation_data, tvb, offset, -1, ENC_NA);
@@ -293,26 +293,26 @@ dissect_asciitpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
*/
if (!tpkt_desegment && !pinfo->fragmented) {
col_add_fstr(pinfo->cinfo, COL_INFO,
- "TPKT Data length = %u", data_len);
+ "TPKT Data length = %u", data_len);
}
if (tree) {
ti = proto_tree_add_item(tree, proto_tpkt, tvb,
- offset, 8, ENC_NA);
+ offset, 8, ENC_NA);
tpkt_tree = proto_item_add_subtree(ti, ett_tpkt);
proto_item_set_text(ti, "TPKT");
/* Version */
proto_tree_add_uint(tpkt_tree, hf_tpkt_version, tvb,
- offset, 2, mgcp_version);
+ offset, 2, mgcp_version);
/* Reserved octet*/
proto_tree_add_uint(tpkt_tree, hf_tpkt_reserved, tvb,
- offset + 2, 2, mgcp_reserved);
+ offset + 2, 2, mgcp_reserved);
/* Length */
proto_tree_add_uint(tpkt_tree, hf_tpkt_length, tvb,
- offset + 4, 4, mgcp_packet_len);
+ offset + 4, 4, mgcp_packet_len);
}
pinfo->current_proto = saved_proto;
@@ -336,17 +336,17 @@ dissect_asciitpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* we should stop dissecting TPKT messages within this frame
* or chunk of reassembled data.
*/
- pd_save = pinfo->private_data;
+ pd_save = pinfo->private_data;
TRY {
call_dissector(subdissector_handle, next_tvb, pinfo,
- tree);
+ tree);
}
CATCH_NONFATAL_ERRORS {
- /* Restore the private_data structure in case one of the
- * called dissectors modified it (and, due to the exception,
- * was unable to restore it).
- */
- pinfo->private_data = pd_save;
+ /* Restore the private_data structure in case one of the
+ * called dissectors modified it (and, due to the exception,
+ * was unable to restore it).
+ */
+ pinfo->private_data = pd_save;
show_exception(tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
}
@@ -364,211 +364,211 @@ dissect_asciitpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
*/
void
dissect_tpkt_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- gboolean desegment, dissector_handle_t subdissector_handle)
+ gboolean desegment, dissector_handle_t subdissector_handle)
{
- proto_item *ti = NULL;
- proto_tree *tpkt_tree = NULL;
- volatile int offset = 0;
- int length_remaining;
- int data_len;
- volatile int length;
- tvbuff_t *volatile next_tvb;
- const char *saved_proto;
- void *pd_save;
-
- /*
- * If we're reassembling segmented TPKT PDUs, empty the COL_INFO
- * column, so subdissectors can append information
- * without having to worry about emptying the column.
- *
- * We use "col_add_str()" because the subdissector
- * might be appending information to the column, in
- * which case we'd have to zero the buffer out explicitly
- * anyway.
- */
- if (desegment)
- col_set_str(pinfo->cinfo, COL_INFO, "");
-
- while (tvb_reported_length_remaining(tvb, offset) != 0) {
- /*
- * Is the first byte of this putative TPKT header
- * a valid TPKT version number, i.e. 3?
- */
- if (tvb_get_guint8(tvb, offset) != 3) {
- /*
- * No, so don't assume this is a TPKT header;
- * we might be in the middle of TPKT data,
- * so don't get the length and don't try to
- * do reassembly.
- */
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "TPKT");
- col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
- if (tree) {
- ti = proto_tree_add_item(tree, proto_tpkt, tvb,
- offset, -1, ENC_NA);
- tpkt_tree = proto_item_add_subtree(ti, ett_tpkt);
-
- proto_tree_add_item(tpkt_tree, hf_tpkt_continuation_data, tvb, offset, -1, ENC_NA);
- }
- return;
- }
-
- length_remaining = tvb_length_remaining(tvb, offset);
-
- /*
- * Can we do reassembly?
- */
- if (desegment && pinfo->can_desegment) {
- /*
- * Yes - is the TPKT header split across segment
- * boundaries?
- */
- if (length_remaining < 4) {
- /*
- * Yes. Tell the TCP dissector where the data
- * for this message starts in the data it
- * handed us and that we need "some more data."
- * Don't tell it exactly how many bytes we need
- * because if/when we ask for even more (after
- * the header) that will break reassembly.
- */
- pinfo->desegment_offset = offset;
- pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
- return;
- }
- }
-
- /*
- * Get the length from the TPKT header.
- */
- data_len = tvb_get_ntohs(tvb, offset + 2);
-
- /*
- * Can we do reassembly?
- */
- if (desegment && pinfo->can_desegment) {
- /*
- * Yes - is the payload split across segment
- * boundaries?
- */
- if (length_remaining < data_len) {
- /*
- * Yes. Tell the TCP dissector where
- * the data for this message starts in
- * the data it handed us, and how many
- * more bytes we need, and return.
- */
- pinfo->desegment_offset = offset;
- pinfo->desegment_len =
- data_len - length_remaining;
- return;
- }
- }
-
- /*
- * Dissect the TPKT header.
- * Save and restore "pinfo->current_proto".
- */
- saved_proto = pinfo->current_proto;
- pinfo->current_proto = "TPKT";
-
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "TPKT");
- /*
- * Don't add the TPKT header information if we're
- * reassembling segmented TPKT PDUs or if this
- * PDU isn't reassembled.
- *
- * XXX - the first is so that subdissectors can append
- * information without getting TPKT stuff in the middle;
- * why the second?
- */
- if (!desegment && !pinfo->fragmented) {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "TPKT Data length = %u", data_len);
- }
-
- if (tree) {
- ti = proto_tree_add_item(tree, proto_tpkt, tvb,
- offset, 4, ENC_NA);
- tpkt_tree = proto_item_add_subtree(ti, ett_tpkt);
- proto_item_set_text(ti, "TPKT");
-
- /* Version */
- proto_tree_add_item(tpkt_tree, hf_tpkt_version, tvb,
- offset, 1, ENC_BIG_ENDIAN);
- proto_item_append_text(ti, ", Version: 3");
-
- /* Reserved octet*/
- proto_tree_add_item(tpkt_tree, hf_tpkt_reserved, tvb,
- offset + 1, 1, ENC_BIG_ENDIAN);
-
- /* Length */
- proto_tree_add_uint(tpkt_tree, hf_tpkt_length, tvb,
- offset + 2, 2, data_len);
- proto_item_append_text(ti, ", Length: %u", data_len);
- }
- pinfo->current_proto = saved_proto;
-
- /* Skip the TPKT header. */
- offset += 4;
- data_len -= 4;
-
- /*
- * Construct a tvbuff containing the amount of the payload
- * we have available. Make its reported length the
- * amount of data in this TPKT packet.
- *
- * XXX - if reassembly isn't enabled. the subdissector
- * will throw a BoundsError exception, rather than a
- * ReportedBoundsError exception. We really want
- * a tvbuff where the length is "length", the reported
- * length is "plen + 2", and the "if the snapshot length
- * were infinite" length were the minimum of the
- * reported length of the tvbuff handed to us and "plen+2",
- * with a new type of exception thrown if the offset is
- * within the reported length but beyond that third length,
- * with that exception getting the "Unreassembled Packet"
- * error.
- */
- length = length_remaining - 4;
- if (length > data_len)
- length = data_len;
- next_tvb = tvb_new_subset(tvb, offset, length, data_len);
-
- /*
- * Call the subdissector.
- *
- * If it gets an error that means there's no point in
- * dissecting any more TPKT messages, rethrow the
- * exception in question.
- *
- * If it gets any other error, report it and continue,
- * as that means that TPKT message got an error, but
- * that doesn't mean we should stop dissecting TPKT
- * messages within this frame or chunk of reassembled
- * data.
- */
- pd_save = pinfo->private_data;
- TRY {
- call_dissector(subdissector_handle, next_tvb, pinfo,
- tree);
- }
- CATCH_NONFATAL_ERRORS {
- /* Restore the private_data structure in case one of the
- * called dissectors modified it (and, due to the exception,
- * was unable to restore it).
- */
- pinfo->private_data = pd_save;
-
- show_exception(tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
- }
- ENDTRY;
-
- /*
- * Skip the payload.
- */
- offset += length;
- }
+ proto_item *ti = NULL;
+ proto_tree *tpkt_tree = NULL;
+ volatile int offset = 0;
+ int length_remaining;
+ int data_len;
+ volatile int length;
+ tvbuff_t *volatile next_tvb;
+ const char *saved_proto;
+ void *pd_save;
+
+ /*
+ * If we're reassembling segmented TPKT PDUs, empty the COL_INFO
+ * column, so subdissectors can append information
+ * without having to worry about emptying the column.
+ *
+ * We use "col_add_str()" because the subdissector
+ * might be appending information to the column, in
+ * which case we'd have to zero the buffer out explicitly
+ * anyway.
+ */
+ if (desegment)
+ col_set_str(pinfo->cinfo, COL_INFO, "");
+
+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
+ /*
+ * Is the first byte of this putative TPKT header
+ * a valid TPKT version number, i.e. 3?
+ */
+ if (tvb_get_guint8(tvb, offset) != 3) {
+ /*
+ * No, so don't assume this is a TPKT header;
+ * we might be in the middle of TPKT data,
+ * so don't get the length and don't try to
+ * do reassembly.
+ */
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TPKT");
+ col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
+ if (tree) {
+ ti = proto_tree_add_item(tree, proto_tpkt, tvb,
+ offset, -1, ENC_NA);
+ tpkt_tree = proto_item_add_subtree(ti, ett_tpkt);
+
+ proto_tree_add_item(tpkt_tree, hf_tpkt_continuation_data, tvb, offset, -1, ENC_NA);
+ }
+ return;
+ }
+
+ length_remaining = tvb_length_remaining(tvb, offset);
+
+ /*
+ * Can we do reassembly?
+ */
+ if (desegment && pinfo->can_desegment) {
+ /*
+ * Yes - is the TPKT header split across segment
+ * boundaries?
+ */
+ if (length_remaining < 4) {
+ /*
+ * Yes. Tell the TCP dissector where the data
+ * for this message starts in the data it
+ * handed us and that we need "some more data."
+ * Don't tell it exactly how many bytes we need
+ * because if/when we ask for even more (after
+ * the header) that will break reassembly.
+ */
+ pinfo->desegment_offset = offset;
+ pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
+ return;
+ }
+ }
+
+ /*
+ * Get the length from the TPKT header.
+ */
+ data_len = tvb_get_ntohs(tvb, offset + 2);
+
+ /*
+ * Can we do reassembly?
+ */
+ if (desegment && pinfo->can_desegment) {
+ /*
+ * Yes - is the payload split across segment
+ * boundaries?
+ */
+ if (length_remaining < data_len) {
+ /*
+ * Yes. Tell the TCP dissector where
+ * the data for this message starts in
+ * the data it handed us, and how many
+ * more bytes we need, and return.
+ */
+ pinfo->desegment_offset = offset;
+ pinfo->desegment_len =
+ data_len - length_remaining;
+ return;
+ }
+ }
+
+ /*
+ * Dissect the TPKT header.
+ * Save and restore "pinfo->current_proto".
+ */
+ saved_proto = pinfo->current_proto;
+ pinfo->current_proto = "TPKT";
+
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "TPKT");
+ /*
+ * Don't add the TPKT header information if we're
+ * reassembling segmented TPKT PDUs or if this
+ * PDU isn't reassembled.
+ *
+ * XXX - the first is so that subdissectors can append
+ * information without getting TPKT stuff in the middle;
+ * why the second?
+ */
+ if (!desegment && !pinfo->fragmented) {
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "TPKT Data length = %u", data_len);
+ }
+
+ if (tree) {
+ ti = proto_tree_add_item(tree, proto_tpkt, tvb,
+ offset, 4, ENC_NA);
+ tpkt_tree = proto_item_add_subtree(ti, ett_tpkt);
+ proto_item_set_text(ti, "TPKT");
+
+ /* Version */
+ proto_tree_add_item(tpkt_tree, hf_tpkt_version, tvb,
+ offset, 1, ENC_BIG_ENDIAN);
+ proto_item_append_text(ti, ", Version: 3");
+
+ /* Reserved octet*/
+ proto_tree_add_item(tpkt_tree, hf_tpkt_reserved, tvb,
+ offset + 1, 1, ENC_BIG_ENDIAN);
+
+ /* Length */
+ proto_tree_add_uint(tpkt_tree, hf_tpkt_length, tvb,
+ offset + 2, 2, data_len);
+ proto_item_append_text(ti, ", Length: %u", data_len);
+ }
+ pinfo->current_proto = saved_proto;
+
+ /* Skip the TPKT header. */
+ offset += 4;
+ data_len -= 4;
+
+ /*
+ * Construct a tvbuff containing the amount of the payload
+ * we have available. Make its reported length the
+ * amount of data in this TPKT packet.
+ *
+ * XXX - if reassembly isn't enabled. the subdissector
+ * will throw a BoundsError exception, rather than a
+ * ReportedBoundsError exception. We really want
+ * a tvbuff where the length is "length", the reported
+ * length is "plen + 2", and the "if the snapshot length
+ * were infinite" length were the minimum of the
+ * reported length of the tvbuff handed to us and "plen+2",
+ * with a new type of exception thrown if the offset is
+ * within the reported length but beyond that third length,
+ * with that exception getting the "Unreassembled Packet"
+ * error.
+ */
+ length = length_remaining - 4;
+ if (length > data_len)
+ length = data_len;
+ next_tvb = tvb_new_subset(tvb, offset, length, data_len);
+
+ /*
+ * Call the subdissector.
+ *
+ * If it gets an error that means there's no point in
+ * dissecting any more TPKT messages, rethrow the
+ * exception in question.
+ *
+ * If it gets any other error, report it and continue,
+ * as that means that TPKT message got an error, but
+ * that doesn't mean we should stop dissecting TPKT
+ * messages within this frame or chunk of reassembled
+ * data.
+ */
+ pd_save = pinfo->private_data;
+ TRY {
+ call_dissector(subdissector_handle, next_tvb, pinfo,
+ tree);
+ }
+ CATCH_NONFATAL_ERRORS {
+ /* Restore the private_data structure in case one of the
+ * called dissectors modified it (and, due to the exception,
+ * was unable to restore it).
+ */
+ pinfo->private_data = pd_save;
+
+ show_exception(tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
+ }
+ ENDTRY;
+
+ /*
+ * Skip the payload.
+ */
+ offset += length;
+ }
}
/*
@@ -578,7 +578,7 @@ dissect_tpkt_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- dissect_tpkt_encap(tvb, pinfo, tree, tpkt_desegment, osi_tp_handle);
+ dissect_tpkt_encap(tvb, pinfo, tree, tpkt_desegment, osi_tp_handle);
}
/*
@@ -589,97 +589,109 @@ dissect_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_ascii_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- dissect_asciitpkt(tvb, pinfo, tree, osi_tp_handle);
+ dissect_asciitpkt(tvb, pinfo, tree, osi_tp_handle);
}
#endif
void
proto_register_tpkt(void)
{
- static hf_register_info hf[] =
- {
- {
- &hf_tpkt_version,
- {
- "Version",
- "tpkt.version",
- FT_UINT8,
- BASE_DEC,
- NULL,
- 0x0,
- "Version, only version 3 is defined", HFILL
- }
- },
- {
- &hf_tpkt_reserved,
- {
- "Reserved",
- "tpkt.reserved",
- FT_UINT8,
- BASE_DEC,
- NULL,
- 0x0,
- "Reserved, should be 0", HFILL
- }
- },
- {
- &hf_tpkt_length,
- {
- "Length",
- "tpkt.length",
- FT_UINT16,
- BASE_DEC,
- NULL,
- 0x0,
- "Length of data unit, including this header", HFILL
- }
- },
- {
- &hf_tpkt_continuation_data,
- {
- "Continuation data",
- "tpkt.continuation_data",
- FT_BYTES,
- BASE_NONE,
- NULL,
- 0x0,
- NULL, HFILL
- }
- },
- };
-
- static gint *ett[] =
- {
- &ett_tpkt,
- };
- module_t *tpkt_module;
-
- proto_tpkt = proto_register_protocol("TPKT - ISO on TCP - RFC1006", "TPKT", "tpkt");
- proto_tpkt_ptr = find_protocol_by_id(proto_tpkt);
- proto_register_field_array(proto_tpkt, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
- register_dissector("tpkt", dissect_tpkt, proto_tpkt);
-
- tpkt_module = prefs_register_protocol(proto_tpkt, NULL);
- prefs_register_bool_preference(tpkt_module, "desegment",
- "Reassemble TPKT messages spanning multiple TCP segments",
- "Whether the TPKT dissector should reassemble messages spanning multiple TCP segments. "
- "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
- &tpkt_desegment);
+ static hf_register_info hf[] = {
+ {
+ &hf_tpkt_version,
+ {
+ "Version",
+ "tpkt.version",
+ FT_UINT8,
+ BASE_DEC,
+ NULL,
+ 0x0,
+ "Version, only version 3 is defined", HFILL
+ }
+ },
+ {
+ &hf_tpkt_reserved,
+ {
+ "Reserved",
+ "tpkt.reserved",
+ FT_UINT8,
+ BASE_DEC,
+ NULL,
+ 0x0,
+ "Reserved, should be 0", HFILL
+ }
+ },
+ {
+ &hf_tpkt_length,
+ {
+ "Length",
+ "tpkt.length",
+ FT_UINT16,
+ BASE_DEC,
+ NULL,
+ 0x0,
+ "Length of data unit, including this header", HFILL
+ }
+ },
+ {
+ &hf_tpkt_continuation_data,
+ {
+ "Continuation data",
+ "tpkt.continuation_data",
+ FT_BYTES,
+ BASE_NONE,
+ NULL,
+ 0x0,
+ NULL, HFILL
+ }
+ },
+ };
+
+ static gint *ett[] =
+ {
+ &ett_tpkt,
+ };
+ module_t *tpkt_module;
+
+ proto_tpkt = proto_register_protocol("TPKT - ISO on TCP - RFC1006", "TPKT", "tpkt");
+ proto_tpkt_ptr = find_protocol_by_id(proto_tpkt);
+ proto_register_field_array(proto_tpkt, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ register_dissector("tpkt", dissect_tpkt, proto_tpkt);
+
+ tpkt_module = prefs_register_protocol(proto_tpkt, NULL);
+ prefs_register_bool_preference(tpkt_module, "desegment",
+ "Reassemble TPKT messages spanning multiple TCP segments",
+ "Whether the TPKT dissector should reassemble messages spanning multiple TCP segments. "
+ "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
+ &tpkt_desegment);
}
void
proto_reg_handoff_tpkt(void)
{
- dissector_handle_t tpkt_handle;
+ dissector_handle_t tpkt_handle;
- osi_tp_handle = find_dissector("ositp");
- tpkt_handle = find_dissector("tpkt");
- dissector_add_uint("tcp.port", TCP_PORT_TPKT, tpkt_handle);
+ osi_tp_handle = find_dissector("ositp");
+ tpkt_handle = find_dissector("tpkt");
+ dissector_add_uint("tcp.port", TCP_PORT_TPKT, tpkt_handle);
- /*
- tpkt_ascii_handle = create_dissector_handle(dissect_ascii_tpkt, proto_tpkt);
- dissector_add_uint("tcp.port", TCP_PORT_TPKT, tpkt_ascii_handle);
- */
+ /*
+ tpkt_ascii_handle = create_dissector_handle(dissect_ascii_tpkt, proto_tpkt);
+ dissector_add_uint("tcp.port", TCP_PORT_TPKT, tpkt_ascii_handle);
+ */
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-udld.c b/epan/dissectors/packet-udld.c
index ae08a3a111..d3a1e7cf65 100644
--- a/epan/dissectors/packet-udld.c
+++ b/epan/dissectors/packet-udld.c
@@ -35,14 +35,14 @@
/*
* See
*
- * http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt
+ * http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt
*
* for some information on UDLD.
*/
/* Offsets in TLV structure. */
-#define TLV_TYPE 0
-#define TLV_LENGTH 2
+#define TLV_TYPE 0
+#define TLV_LENGTH 2
void proto_register_udld(void);
void proto_reg_handoff_udld(void);
@@ -69,37 +69,37 @@ static gint ett_udld_tlv = -1;
static dissector_handle_t data_handle;
-#define TYPE_DEVICE_ID 0x0001
-#define TYPE_PORT_ID 0x0002
-#define TYPE_ECHO 0x0003
-#define TYPE_MESSAGE_INTERVAL 0x0004
-#define TYPE_TIMEOUT_INTERVAL 0x0005
-#define TYPE_DEVICE_NAME 0x0006
-#define TYPE_SEQUENCE_NUMBER 0x0007
+#define TYPE_DEVICE_ID 0x0001
+#define TYPE_PORT_ID 0x0002
+#define TYPE_ECHO 0x0003
+#define TYPE_MESSAGE_INTERVAL 0x0004
+#define TYPE_TIMEOUT_INTERVAL 0x0005
+#define TYPE_DEVICE_NAME 0x0006
+#define TYPE_SEQUENCE_NUMBER 0x0007
static const value_string type_vals[] = {
- { TYPE_DEVICE_ID, "Device ID" },
- { TYPE_PORT_ID, "Port ID" },
- { TYPE_ECHO, "Echo" },
- { TYPE_MESSAGE_INTERVAL,"Message interval" },
- { TYPE_TIMEOUT_INTERVAL,"Timeout interval" },
- { TYPE_DEVICE_NAME, "Device name" },
- { TYPE_SEQUENCE_NUMBER, "Sequence number" },
- { 0, NULL }
+ { TYPE_DEVICE_ID, "Device ID" },
+ { TYPE_PORT_ID, "Port ID" },
+ { TYPE_ECHO, "Echo" },
+ { TYPE_MESSAGE_INTERVAL, "Message interval" },
+ { TYPE_TIMEOUT_INTERVAL, "Timeout interval" },
+ { TYPE_DEVICE_NAME, "Device name" },
+ { TYPE_SEQUENCE_NUMBER, "Sequence number" },
+ { 0, NULL }
};
-#define OPCODE_RESERVED 0x00
-#define OPCODE_PROBE 0x01
-#define OPCODE_ECHO 0x02
-#define OPCODE_FLUSH 0x03
+#define OPCODE_RESERVED 0x00
+#define OPCODE_PROBE 0x01
+#define OPCODE_ECHO 0x02
+#define OPCODE_FLUSH 0x03
static const value_string opcode_vals[] = {
- { OPCODE_RESERVED, "Reserved" },
- { OPCODE_PROBE, "Probe" },
- { OPCODE_ECHO, "Echo" },
- { OPCODE_FLUSH, "Flush" },
- { 0, NULL }
+ { OPCODE_RESERVED, "Reserved" },
+ { OPCODE_PROBE, "Probe" },
+ { OPCODE_ECHO, "Echo" },
+ { OPCODE_FLUSH, "Flush" },
+ { 0, NULL }
};
static void
@@ -107,129 +107,129 @@ dissect_udld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
proto_tree *udld_tree = NULL;
- int offset = 0;
- guint16 type;
- guint16 length;
+ int offset = 0;
+ guint16 type;
+ guint16 length;
proto_tree *tlv_tree;
- int real_length;
+ int real_length;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UDLD");
col_clear(pinfo->cinfo, COL_INFO);
if (tree) {
- proto_item *flags_ti;
- proto_tree *flags_tree;
-
- ti = proto_tree_add_item(tree, proto_udld, tvb, offset, -1, ENC_NA);
- udld_tree = proto_item_add_subtree(ti, ett_udld);
-
- /* UDLD header */
- proto_tree_add_item(udld_tree, hf_udld_version, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(udld_tree, hf_udld_opcode, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
- flags_ti = proto_tree_add_item(udld_tree, hf_udld_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
- flags_tree = proto_item_add_subtree(flags_ti, ett_udld_flags);
- proto_tree_add_item(flags_tree, hf_udld_flags_rt, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(flags_tree, hf_udld_flags_rsy, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset += 1;
- proto_tree_add_item(udld_tree, hf_udld_checksum, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset += 2;
+ proto_item *flags_ti;
+ proto_tree *flags_tree;
+
+ ti = proto_tree_add_item(tree, proto_udld, tvb, offset, -1, ENC_NA);
+ udld_tree = proto_item_add_subtree(ti, ett_udld);
+
+ /* UDLD header */
+ proto_tree_add_item(udld_tree, hf_udld_version, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(udld_tree, hf_udld_opcode, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ flags_ti = proto_tree_add_item(udld_tree, hf_udld_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
+ flags_tree = proto_item_add_subtree(flags_ti, ett_udld_flags);
+ proto_tree_add_item(flags_tree, hf_udld_flags_rt, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(flags_tree, hf_udld_flags_rsy, tvb, offset, 1, ENC_BIG_ENDIAN);
+ offset += 1;
+ proto_tree_add_item(udld_tree, hf_udld_checksum, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
} else {
- offset += 4; /* The version/opcode/flags/checksum fields from above */
+ offset += 4; /* The version/opcode/flags/checksum fields from above */
}
- while (tvb_reported_length_remaining(tvb, offset) != 0) {
- type = tvb_get_ntohs(tvb, offset + TLV_TYPE);
- length = tvb_get_ntohs(tvb, offset + TLV_LENGTH);
- if (length < 4) {
- tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset, 4,
- ett_udld_tlv, NULL, "TLV with invalid length %u (< 4)", length);
- proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
- offset + TLV_TYPE, 2, type);
- ti = proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
- offset + TLV_LENGTH, 2, length);
- expert_add_info(pinfo, ti, &ei_udld_tlvlength);
- offset += 4;
- break;
- }
-
- switch (type) {
-
- case TYPE_DEVICE_ID:
- /* Device ID */
-
- col_append_fstr(pinfo->cinfo, COL_INFO,
- "Device ID: %s ",
- tvb_format_stringzpad(tvb, offset + 4,
- length - 4));
-
- if (tree) {
- tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset,
- length, ett_udld_tlv, NULL, "Device ID: %s",
- tvb_format_stringzpad(tvb, offset + 4, length - 4));
- proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
- offset + TLV_TYPE, 2, type);
- proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
- offset + TLV_LENGTH, 2, length);
- proto_tree_add_item(tlv_tree, hf_udld_device_id, tvb, offset + 4,
- length - 4, ENC_ASCII|ENC_NA);
- }
- offset += length;
- break;
-
- case TYPE_PORT_ID:
- real_length = length;
- if (tvb_get_guint8(tvb, offset + real_length) != 0x00) {
- /* The length in the TLV doesn't appear to be the
- length of the TLV, as the byte just past it
- isn't the first byte of a 2-byte big-endian
- small integer; make the length of the TLV the length
- in the TLV, plus 4 bytes for the TLV type and length,
- minus 1 because that's what makes one capture work. */
- real_length = length + 3;
- }
-
- col_append_fstr(pinfo->cinfo, COL_INFO,
- "Port ID: %s ",
- tvb_format_stringzpad(tvb, offset + 4, length - 4));
-
- if (tree) {
- tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset,
- real_length, ett_udld_tlv, NULL, "Port ID: %s",
- tvb_format_text(tvb, offset + 4, real_length - 4));
- proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
- offset + TLV_TYPE, 2, type);
- proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
- offset + TLV_LENGTH, 2, length);
- proto_tree_add_item(tlv_tree, hf_udld_sent_through_interface, tvb, offset + 4,
- real_length - 4, ENC_ASCII|ENC_NA);
- }
- offset += real_length;
- break;
-
- case TYPE_ECHO:
- case TYPE_MESSAGE_INTERVAL:
- case TYPE_TIMEOUT_INTERVAL:
- case TYPE_DEVICE_NAME:
- case TYPE_SEQUENCE_NUMBER:
- default:
- tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset,
- length, ett_udld_tlv, NULL, "Type: %s, length: %u",
- val_to_str(type, type_vals, "Unknown (0x%04x)"),
- length);
- proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
- offset + TLV_TYPE, 2, type);
- proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
- offset + TLV_LENGTH, 2, length);
- if (length > 4) {
- proto_tree_add_item(tlv_tree, hf_udld_data, tvb, offset + 4,
- length - 4, ENC_NA);
- } else {
- return;
- }
- offset += length;
- }
- }
+ while (tvb_reported_length_remaining(tvb, offset) != 0) {
+ type = tvb_get_ntohs(tvb, offset + TLV_TYPE);
+ length = tvb_get_ntohs(tvb, offset + TLV_LENGTH);
+ if (length < 4) {
+ tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset, 4,
+ ett_udld_tlv, NULL, "TLV with invalid length %u (< 4)", length);
+ proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
+ offset + TLV_TYPE, 2, type);
+ ti = proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
+ offset + TLV_LENGTH, 2, length);
+ expert_add_info(pinfo, ti, &ei_udld_tlvlength);
+ offset += 4;
+ break;
+ }
+
+ switch (type) {
+
+ case TYPE_DEVICE_ID:
+ /* Device ID */
+
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Device ID: %s ",
+ tvb_format_stringzpad(tvb, offset + 4,
+ length - 4));
+
+ if (tree) {
+ tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset,
+ length, ett_udld_tlv, NULL, "Device ID: %s",
+ tvb_format_stringzpad(tvb, offset + 4, length - 4));
+ proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
+ offset + TLV_TYPE, 2, type);
+ proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
+ offset + TLV_LENGTH, 2, length);
+ proto_tree_add_item(tlv_tree, hf_udld_device_id, tvb, offset + 4,
+ length - 4, ENC_ASCII|ENC_NA);
+ }
+ offset += length;
+ break;
+
+ case TYPE_PORT_ID:
+ real_length = length;
+ if (tvb_get_guint8(tvb, offset + real_length) != 0x00) {
+ /* The length in the TLV doesn't appear to be the
+ length of the TLV, as the byte just past it
+ isn't the first byte of a 2-byte big-endian
+ small integer; make the length of the TLV the length
+ in the TLV, plus 4 bytes for the TLV type and length,
+ minus 1 because that's what makes one capture work. */
+ real_length = length + 3;
+ }
+
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Port ID: %s ",
+ tvb_format_stringzpad(tvb, offset + 4, length - 4));
+
+ if (tree) {
+ tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset,
+ real_length, ett_udld_tlv, NULL, "Port ID: %s",
+ tvb_format_text(tvb, offset + 4, real_length - 4));
+ proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
+ offset + TLV_TYPE, 2, type);
+ proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
+ offset + TLV_LENGTH, 2, length);
+ proto_tree_add_item(tlv_tree, hf_udld_sent_through_interface, tvb, offset + 4,
+ real_length - 4, ENC_ASCII|ENC_NA);
+ }
+ offset += real_length;
+ break;
+
+ case TYPE_ECHO:
+ case TYPE_MESSAGE_INTERVAL:
+ case TYPE_TIMEOUT_INTERVAL:
+ case TYPE_DEVICE_NAME:
+ case TYPE_SEQUENCE_NUMBER:
+ default:
+ tlv_tree = proto_tree_add_subtree_format(udld_tree, tvb, offset,
+ length, ett_udld_tlv, NULL, "Type: %s, length: %u",
+ val_to_str(type, type_vals, "Unknown (0x%04x)"),
+ length);
+ proto_tree_add_uint(tlv_tree, hf_udld_tlvtype, tvb,
+ offset + TLV_TYPE, 2, type);
+ proto_tree_add_uint(tlv_tree, hf_udld_tlvlength, tvb,
+ offset + TLV_LENGTH, 2, length);
+ if (length > 4) {
+ proto_tree_add_item(tlv_tree, hf_udld_data, tvb, offset + 4,
+ length - 4, ENC_NA);
+ } else {
+ return;
+ }
+ offset += length;
+ }
+ }
call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, udld_tree);
}
@@ -238,55 +238,55 @@ void
proto_register_udld(void)
{
static hf_register_info hf[] = {
- { &hf_udld_version,
- { "Version", "udld.version", FT_UINT8, BASE_DEC, NULL, 0xE0,
- NULL, HFILL }},
+ { &hf_udld_version,
+ { "Version", "udld.version", FT_UINT8, BASE_DEC, NULL, 0xE0,
+ NULL, HFILL }},
- { &hf_udld_opcode,
- { "Opcode", "udld.opcode", FT_UINT8, BASE_DEC, VALS(opcode_vals), 0x1F,
- NULL, HFILL }},
+ { &hf_udld_opcode,
+ { "Opcode", "udld.opcode", FT_UINT8, BASE_DEC, VALS(opcode_vals), 0x1F,
+ NULL, HFILL }},
- { &hf_udld_flags,
- { "Flags", "udld.flags", FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { &hf_udld_flags,
+ { "Flags", "udld.flags", FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
- { &hf_udld_flags_rt,
- { "Recommended timeout", "udld.flags.rt", FT_UINT8, BASE_HEX, NULL, 0x80,
- NULL, HFILL }},
+ { &hf_udld_flags_rt,
+ { "Recommended timeout", "udld.flags.rt", FT_UINT8, BASE_HEX, NULL, 0x80,
+ NULL, HFILL }},
- { &hf_udld_flags_rsy,
- { "ReSynch", "udld.flags.rsy", FT_UINT8, BASE_HEX, NULL, 0x40,
- NULL, HFILL }},
+ { &hf_udld_flags_rsy,
+ { "ReSynch", "udld.flags.rsy", FT_UINT8, BASE_HEX, NULL, 0x40,
+ NULL, HFILL }},
- { &hf_udld_checksum,
- { "Checksum", "udld.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
+ { &hf_udld_checksum,
+ { "Checksum", "udld.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
- { &hf_udld_tlvtype,
- { "Type", "udld.tlv.type", FT_UINT16, BASE_HEX, VALS(type_vals), 0x0,
- NULL, HFILL }},
+ { &hf_udld_tlvtype,
+ { "Type", "udld.tlv.type", FT_UINT16, BASE_HEX, VALS(type_vals), 0x0,
+ NULL, HFILL }},
- { &hf_udld_tlvlength,
- { "Length", "udld.tlv.len", FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }},
+ { &hf_udld_tlvlength,
+ { "Length", "udld.tlv.len", FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }},
- { &hf_udld_device_id,
- { "Device ID", "udld.device_id", FT_STRINGZ, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { &hf_udld_device_id,
+ { "Device ID", "udld.device_id", FT_STRINGZ, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
- { &hf_udld_sent_through_interface,
- { "Sent through Interface", "udld.sent_through_interface", FT_STRING, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { &hf_udld_sent_through_interface,
+ { "Sent through Interface", "udld.sent_through_interface", FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
- { &hf_udld_data,
- { "Data", "udld.data", FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ { &hf_udld_data,
+ { "Data", "udld.data", FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
};
static gint *ett[] = {
- &ett_udld,
- &ett_udld_flags,
- &ett_udld_tlv
+ &ett_udld,
+ &ett_udld_flags,
+ &ett_udld_tlv
};
static ei_register_info ei[] = {
@@ -296,7 +296,7 @@ proto_register_udld(void)
expert_module_t* expert_udld;
proto_udld = proto_register_protocol("Unidirectional Link Detection",
- "UDLD", "udld");
+ "UDLD", "udld");
proto_register_field_array(proto_udld, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_udld = expert_register_protocol(proto_udld);
@@ -313,3 +313,16 @@ proto_reg_handoff_udld(void)
dissector_add_uint("llc.cisco_pid", 0x0111, udld_handle);
dissector_add_uint("chdlc.protocol", 0x0111, udld_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */
diff --git a/epan/dissectors/packet-uts.c b/epan/dissectors/packet-uts.c
index 109deadc3a..940d73e81d 100644
--- a/epan/dissectors/packet-uts.c
+++ b/epan/dissectors/packet-uts.c
@@ -163,21 +163,21 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
set_addr(pinfo, SRC, rid, sid, did); /* if the ACN received it, the address if of the source... the terminal */
}
}
- } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
+ } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
testchar(tvb, pinfo, offset+1, MATCH, NAK, NULL) &&
testchar(tvb, pinfo, offset+2, MATCH, ETX, NULL) &&
sid != GSID && did == GDID) {
nak_start = offset;
col_set_str(pinfo->cinfo, COL_INFO, "Retransmit Request");
set_addr(pinfo, DST, rid, sid, did);
- } else if (testchar(tvb, pinfo, offset, MATCH, BEL, NULL) &&
+ } else if (testchar(tvb, pinfo, offset, MATCH, BEL, NULL) &&
testchar(tvb, pinfo, offset+1, MATCH, STX, NULL) &&
testchar(tvb, pinfo, offset+2, MATCH, ETX, NULL)) {
header_length = offset+2;
msgwaiting_start = offset;
col_set_str(pinfo->cinfo, COL_INFO, "Message Waiting");
set_addr(pinfo, DST, rid, sid, did);
- } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
+ } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
testchar(tvb, pinfo, offset+1, MATCH, '1', NULL) &&
testchar(tvb, pinfo, offset+2, MATCH, STX, NULL)) {
ack_start = offset;
@@ -194,25 +194,25 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
} else {
set_addr(pinfo, SRC, rid, sid, did); /* if the ACN received it, the address if of the source... the terminal */
}
- } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
+ } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
testchar(tvb, pinfo, offset+1, MATCH, ENQ, NULL) &&
testchar(tvb, pinfo, offset+2, MATCH, ETX, NULL)) {
replyrequest_start = offset;
col_set_str(pinfo->cinfo, COL_INFO, "Reply Request");
set_addr(pinfo, SRC, rid, sid, did);
- } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
+ } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
testchar(tvb, pinfo, offset+1, MATCH, '?', NULL) &&
testchar(tvb, pinfo, offset+2, MATCH, ETX, NULL)) {
busy_start = offset;
col_set_str(pinfo->cinfo, COL_INFO, "Busy");
set_addr(pinfo, SRC, rid, sid, did);
- } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
+ } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
testchar(tvb, pinfo, offset+1, MATCH, ';', NULL) &&
testchar(tvb, pinfo, offset+2, MATCH, ETX, NULL)) {
notbusy_start = offset;
col_set_str(pinfo->cinfo, COL_INFO, "Not Busy");
set_addr(pinfo, SRC, rid, sid, did);
- } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
+ } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
testchar(tvb, pinfo, offset+1, MATCH, '1', NULL) &&
testchar(tvb, pinfo, offset+2, MATCH, DLE, NULL) &&
testchar(tvb, pinfo, offset+3, MATCH, ';', NULL) &&
@@ -221,15 +221,15 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
ack_start = offset;
col_set_str(pinfo->cinfo, COL_INFO, "Not Busy + ACK");
set_addr(pinfo, SRC, rid, sid, did);
- } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
- testchar(tvb, pinfo, offset+1, MATCH, '1', NULL) &&
+ } else if (testchar(tvb, pinfo, offset, MATCH, DLE, NULL) &&
+ testchar(tvb, pinfo, offset+1, MATCH, '1', NULL) &&
testchar(tvb, pinfo, offset+2, FETCH, 0, &function_code) &&
testchar(tvb, pinfo, offset+3, MATCH, ETX, NULL)) {
ack_start = offset;
function_start = offset + 2;
col_add_fstr(pinfo->cinfo, COL_INFO, "Function Message '%c' + ACK", function_code);
set_addr(pinfo, SRC, rid, sid, did);
- } else if (testchar(tvb, pinfo, offset, FETCH, 0, &function_code) &&
+ } else if (testchar(tvb, pinfo, offset, FETCH, 0, &function_code) &&
testchar(tvb, pinfo, offset+1, MATCH, ETX, NULL)) {
function_start = offset;
col_add_fstr(pinfo->cinfo, COL_INFO, "Function Message '%c'", function_code);
@@ -302,7 +302,7 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
length = tvb_length_remaining(tvb, stx_start+1); /* find out how much message remains */
if (etx_start)
length = (etx_start - stx_start - 1); /* and the data part is the rest... */
- /* whatever preceeds the ETX if it exists */
+ /* whatever preceeds the ETX if it exists */
data_ptr = tvb_get_string_enc(wmem_packet_scope(), tvb, stx_start+1, length, ENC_ASCII); /* copy the string for dissecting */
proto_tree_add_string_format(uts_tree, hf_data, tvb, stx_start + 1, length, data_ptr,
"Text (%d byte%s)", length, plurality(length, "", "s"));
@@ -323,41 +323,41 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
void
proto_register_uts(void)
{
- static hf_register_info hf[] = {
- { &hf_rid,
- { "RID", "uts.rid",
- 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 }},
- { &hf_did,
- { "DID", "uts.did",
- 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 }},
- { &hf_ack,
- { "Ack", "uts.ack",
- 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 }},
- { &hf_busy,
- { "Busy", "uts.busy",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Busy", HFILL }},
- { &hf_notbusy,
- { "NotBusy", "uts.notbusy",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Not Busy", HFILL }},
- { &hf_msgwaiting,
- { "MsgWaiting", "uts.msgwaiting",
- FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Message Waiting", HFILL }},
- { &hf_function,
- { "Function", "uts.function",
- FT_UINT8, BASE_HEX, NULL, 0, "Function Code value", HFILL }},
- { &hf_data,
- { "Data", "uts.data",
- FT_STRING, BASE_NONE, NULL, 0, "User Data Message", HFILL }},
- };
+ static hf_register_info hf[] = {
+ { &hf_rid,
+ { "RID", "uts.rid",
+ 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 }},
+ { &hf_did,
+ { "DID", "uts.did",
+ 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 }},
+ { &hf_ack,
+ { "Ack", "uts.ack",
+ 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 }},
+ { &hf_busy,
+ { "Busy", "uts.busy",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Busy", HFILL }},
+ { &hf_notbusy,
+ { "NotBusy", "uts.notbusy",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Not Busy", HFILL }},
+ { &hf_msgwaiting,
+ { "MsgWaiting", "uts.msgwaiting",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x0, "TRUE if Message Waiting", HFILL }},
+ { &hf_function,
+ { "Function", "uts.function",
+ FT_UINT8, BASE_HEX, NULL, 0, "Function Code value", HFILL }},
+ { &hf_data,
+ { "Data", "uts.data",
+ FT_STRING, BASE_NONE, NULL, 0, "User Data Message", HFILL }},
+ };
static gint *ett[] = {
&ett_uts,
@@ -370,3 +370,16 @@ proto_register_uts(void)
proto_register_subtree_array(ett, array_length(ett));
register_dissector("uts", dissect_uts, proto_uts);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-v120.c b/epan/dissectors/packet-v120.c
index aa44bb3bbf..454d43560a 100644
--- a/epan/dissectors/packet-v120.c
+++ b/epan/dissectors/packet-v120.c
@@ -107,13 +107,13 @@ static const xdlc_cf_items v120_cf_items_ext = {
static void
dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *v120_tree, *address_tree;
- proto_item *ti, *tc;
- int is_response;
- int v120len;
- guint8 byte0, byte1;
- guint16 control;
- tvbuff_t *next_tvb;
+ proto_tree *v120_tree, *address_tree;
+ proto_item *ti, *tc;
+ int is_response;
+ int v120len;
+ guint8 byte0, byte1;
+ guint16 control;
+ tvbuff_t *next_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "V.120");
col_clear(pinfo->cinfo, COL_INFO);
@@ -179,8 +179,8 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_v120_header(tvbuff_t *tvb, int offset, proto_tree *tree)
{
- int header_len;
- guint8 byte0;
+ int header_len;
+ guint8 byte0;
proto_tree *h_tree;
proto_item *tc;
@@ -211,7 +211,7 @@ dissect_v120_header(tvbuff_t *tvb, int offset, proto_tree *tree)
}
proto_item_append_text(tc, " B: %d F: %d",
- byte0 & 0x02 ? 1:0, byte0 & 0x01 ? 1:0);
+ byte0 & 0x02 ? 1:0, byte0 & 0x01 ? 1:0);
return header_len;
}
@@ -219,127 +219,140 @@ dissect_v120_header(tvbuff_t *tvb, int offset, proto_tree *tree)
void
proto_register_v120(void)
{
- static hf_register_info hf[] = {
- { &hf_v120_address,
- { "Link Address", "v120.address", FT_UINT16, BASE_HEX, NULL,
- 0x0, NULL, HFILL }},
- { &hf_v120_rc,
- { "R/C", "v120.rc", FT_BOOLEAN, 16, TFS(&tfs_response_command),
- 0x0002, NULL, HFILL }},
- { &hf_v120_lli,
- { "LLI", "v120.lli", FT_UINT16, BASE_HEX, NULL,
- 0xfefc, NULL, HFILL }},
- { &hf_v120_ea0,
- { "EA0", "v120.ea0", FT_BOOLEAN, 16, TFS(&tfs_error_ok),
- 0x0001, NULL, HFILL }},
- { &hf_v120_ea1,
- { "EA1", "v120.ea1", FT_BOOLEAN, 16, TFS(&tfs_ok_error),
- 0x0100, NULL, HFILL }},
- { &hf_v120_control,
- { "Control Field", "v120.control", FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
- { &hf_v120_n_r,
- { "N(R)", "v120.control.n_r", FT_UINT16, BASE_DEC,
- NULL, XDLC_N_R_EXT_MASK, NULL, HFILL }},
- { &hf_v120_n_s,
- { "N(S)", "v120.control.n_s", FT_UINT16, BASE_DEC,
- NULL, XDLC_N_S_EXT_MASK, NULL, HFILL }},
- { &hf_v120_p,
- { "Poll", "v120.control.p", FT_BOOLEAN, 8,
- TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }},
- { &hf_v120_p_ext,
- { "Poll", "v120.control.p", FT_BOOLEAN, 16,
- TFS(&tfs_set_notset), XDLC_P_F_EXT, NULL, HFILL }},
- { &hf_v120_f,
- { "Final", "v120.control.f", FT_BOOLEAN, 8,
- TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }},
- { &hf_v120_f_ext,
- { "Final", "v120.control.f", FT_BOOLEAN, 16,
- TFS(&tfs_set_notset), XDLC_P_F_EXT, NULL, HFILL }},
- { &hf_v120_s_ftype,
- { "Supervisory frame type", "v120.control.s_ftype", FT_UINT16, BASE_HEX,
- VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }},
- { &hf_v120_u_modifier_cmd,
- { "Command", "v120.control.u_modifier_cmd", FT_UINT8, BASE_HEX,
- VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }},
- { &hf_v120_u_modifier_resp,
- { "Response", "v120.control.u_modifier_resp", FT_UINT8, BASE_HEX,
- VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }},
- { &hf_v120_ftype_i,
- { "Frame type", "v120.control.ftype", FT_UINT16, BASE_HEX,
- VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }},
- { &hf_v120_ftype_s_u,
- { "Frame type", "v120.control.ftype", FT_UINT8, BASE_HEX,
- VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }},
- { &hf_v120_ftype_s_u_ext,
- { "Frame type", "v120.control.ftype", FT_UINT16, BASE_HEX,
- VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }},
- { &hf_v120_header8,
- { "Header", "v120.header", FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
- { &hf_v120_header_ext8,
- { "Extension octet", "v120.header.ext", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
- NULL, HFILL }},
- { &hf_v120_header_break8,
- { "Break condition", "v120.header.break", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
- NULL, HFILL }},
- { &hf_v120_header_error_control8,
- { "Error control C1/C2", "v120.error_control", FT_UINT8, BASE_HEX, NULL, 0x0C,
- NULL, HFILL }},
- { &hf_v120_header_segb8,
- { "Bit B", "v120.header.segb", FT_BOOLEAN, 8, TFS(&tfs_segmentation_no_segmentation), 0x02,
- NULL, HFILL }},
- { &hf_v120_header_segf8,
- { "Bit F", "v120.header.segf", FT_BOOLEAN, 8, TFS(&tfs_segmentation_no_segmentation), 0x01,
- NULL, HFILL }},
- { &hf_v120_header16,
- { "Header", "v120.header", FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
- { &hf_v120_header_ext16,
- { "Extension octet", "v120.header.ext", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x80,
- NULL, HFILL }},
- { &hf_v120_header_break16,
- { "Break condition", "v120.header.break", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x40,
- NULL, HFILL }},
- { &hf_v120_header_error_control16,
- { "Error control C1/C2", "v120.error_control", FT_UINT16, BASE_HEX, NULL, 0x0C,
- NULL, HFILL }},
- { &hf_v120_header_segb16,
- { "Bit B", "v120.header.segb", FT_BOOLEAN, 16, TFS(&tfs_segmentation_no_segmentation), 0x02,
- NULL, HFILL }},
- { &hf_v120_header_segf16,
- { "Bit F", "v120.header.segf", FT_BOOLEAN, 16, TFS(&tfs_segmentation_no_segmentation), 0x01,
- NULL, HFILL }},
- { &hf_v120_header_e,
- { "E", "v120.header.e", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x8000,
- NULL, HFILL }},
- { &hf_v120_header_dr,
- { "DR", "v120.header.dr", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x4000,
- NULL, HFILL }},
- { &hf_v120_header_sr,
- { "SR", "v120.header.sr", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x2000,
- NULL, HFILL }},
- { &hf_v120_header_rr,
- { "RR", "v120.header.rr", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x1000,
- NULL, HFILL }},
- };
- static gint *ett[] = {
- &ett_v120,
- &ett_v120_address,
- &ett_v120_control,
- &ett_v120_header,
- };
+ static hf_register_info hf[] = {
+ { &hf_v120_address,
+ { "Link Address", "v120.address", FT_UINT16, BASE_HEX, NULL,
+ 0x0, NULL, HFILL }},
+ { &hf_v120_rc,
+ { "R/C", "v120.rc", FT_BOOLEAN, 16, TFS(&tfs_response_command),
+ 0x0002, NULL, HFILL }},
+ { &hf_v120_lli,
+ { "LLI", "v120.lli", FT_UINT16, BASE_HEX, NULL,
+ 0xfefc, NULL, HFILL }},
+ { &hf_v120_ea0,
+ { "EA0", "v120.ea0", FT_BOOLEAN, 16, TFS(&tfs_error_ok),
+ 0x0001, NULL, HFILL }},
+ { &hf_v120_ea1,
+ { "EA1", "v120.ea1", FT_BOOLEAN, 16, TFS(&tfs_ok_error),
+ 0x0100, NULL, HFILL }},
+ { &hf_v120_control,
+ { "Control Field", "v120.control", FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_v120_n_r,
+ { "N(R)", "v120.control.n_r", FT_UINT16, BASE_DEC,
+ NULL, XDLC_N_R_EXT_MASK, NULL, HFILL }},
+ { &hf_v120_n_s,
+ { "N(S)", "v120.control.n_s", FT_UINT16, BASE_DEC,
+ NULL, XDLC_N_S_EXT_MASK, NULL, HFILL }},
+ { &hf_v120_p,
+ { "Poll", "v120.control.p", FT_BOOLEAN, 8,
+ TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }},
+ { &hf_v120_p_ext,
+ { "Poll", "v120.control.p", FT_BOOLEAN, 16,
+ TFS(&tfs_set_notset), XDLC_P_F_EXT, NULL, HFILL }},
+ { &hf_v120_f,
+ { "Final", "v120.control.f", FT_BOOLEAN, 8,
+ TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }},
+ { &hf_v120_f_ext,
+ { "Final", "v120.control.f", FT_BOOLEAN, 16,
+ TFS(&tfs_set_notset), XDLC_P_F_EXT, NULL, HFILL }},
+ { &hf_v120_s_ftype,
+ { "Supervisory frame type", "v120.control.s_ftype", FT_UINT16, BASE_HEX,
+ VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }},
+ { &hf_v120_u_modifier_cmd,
+ { "Command", "v120.control.u_modifier_cmd", FT_UINT8, BASE_HEX,
+ VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }},
+ { &hf_v120_u_modifier_resp,
+ { "Response", "v120.control.u_modifier_resp", FT_UINT8, BASE_HEX,
+ VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }},
+ { &hf_v120_ftype_i,
+ { "Frame type", "v120.control.ftype", FT_UINT16, BASE_HEX,
+ VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }},
+ { &hf_v120_ftype_s_u,
+ { "Frame type", "v120.control.ftype", FT_UINT8, BASE_HEX,
+ VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }},
+ { &hf_v120_ftype_s_u_ext,
+ { "Frame type", "v120.control.ftype", FT_UINT16, BASE_HEX,
+ VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }},
+ { &hf_v120_header8,
+ { "Header", "v120.header", FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_v120_header_ext8,
+ { "Extension octet", "v120.header.ext", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
+ NULL, HFILL }},
+ { &hf_v120_header_break8,
+ { "Break condition", "v120.header.break", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
+ NULL, HFILL }},
+ { &hf_v120_header_error_control8,
+ { "Error control C1/C2", "v120.error_control", FT_UINT8, BASE_HEX, NULL, 0x0C,
+ NULL, HFILL }},
+ { &hf_v120_header_segb8,
+ { "Bit B", "v120.header.segb", FT_BOOLEAN, 8, TFS(&tfs_segmentation_no_segmentation), 0x02,
+ NULL, HFILL }},
+ { &hf_v120_header_segf8,
+ { "Bit F", "v120.header.segf", FT_BOOLEAN, 8, TFS(&tfs_segmentation_no_segmentation), 0x01,
+ NULL, HFILL }},
+ { &hf_v120_header16,
+ { "Header", "v120.header", FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_v120_header_ext16,
+ { "Extension octet", "v120.header.ext", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x80,
+ NULL, HFILL }},
+ { &hf_v120_header_break16,
+ { "Break condition", "v120.header.break", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x40,
+ NULL, HFILL }},
+ { &hf_v120_header_error_control16,
+ { "Error control C1/C2", "v120.error_control", FT_UINT16, BASE_HEX, NULL, 0x0C,
+ NULL, HFILL }},
+ { &hf_v120_header_segb16,
+ { "Bit B", "v120.header.segb", FT_BOOLEAN, 16, TFS(&tfs_segmentation_no_segmentation), 0x02,
+ NULL, HFILL }},
+ { &hf_v120_header_segf16,
+ { "Bit F", "v120.header.segf", FT_BOOLEAN, 16, TFS(&tfs_segmentation_no_segmentation), 0x01,
+ NULL, HFILL }},
+ { &hf_v120_header_e,
+ { "E", "v120.header.e", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x8000,
+ NULL, HFILL }},
+ { &hf_v120_header_dr,
+ { "DR", "v120.header.dr", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x4000,
+ NULL, HFILL }},
+ { &hf_v120_header_sr,
+ { "SR", "v120.header.sr", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x2000,
+ NULL, HFILL }},
+ { &hf_v120_header_rr,
+ { "RR", "v120.header.rr", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x1000,
+ NULL, HFILL }},
+ };
+ static gint *ett[] = {
+ &ett_v120,
+ &ett_v120_address,
+ &ett_v120_control,
+ &ett_v120_header,
+ };
- proto_v120 = proto_register_protocol("Async data over ISDN (V.120)",
- "V.120", "v120");
- proto_register_field_array (proto_v120, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ proto_v120 = proto_register_protocol("Async data over ISDN (V.120)",
+ "V.120", "v120");
+ proto_register_field_array (proto_v120, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
- register_dissector("v120", dissect_v120, proto_v120);
+ register_dissector("v120", dissect_v120, proto_v120);
}
void
proto_reg_handoff_v120(void)
{
- data_handle = find_dissector("data");
+ data_handle = find_dissector("data");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-x224.c b/epan/dissectors/packet-x224.c
index a5d53c0a7e..a5b0c0c542 100644
--- a/epan/dissectors/packet-x224.c
+++ b/epan/dissectors/packet-x224.c
@@ -101,16 +101,16 @@ dissect_x224_cr(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int off
gint len, next_offset;
/*DST-REF is always 0 */
- offset+=2;
+ offset += 2;
/*SRC-REF*/
proto_tree_add_item(tree, hf_x224_src_ref, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset+=2;
+ offset += 2;
/* class options */
/*class = tvb_get_guint8(tvb, offset);*/
proto_tree_add_item(tree, hf_x224_class, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ offset += 1;
if(tvb_length_remaining(tvb, offset) > 0) {
len = tvb_find_line_end(tvb, offset, -1, &next_offset, TRUE);
@@ -129,17 +129,17 @@ dissect_x224_cc(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int off
/*DST-REF */
proto_tree_add_item(tree, hf_x224_dst_ref, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset+=2;
+ offset += 2;
/*SRC-REF*/
proto_tree_add_item(tree, hf_x224_src_ref, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset+=2;
+ offset += 2;
/* class options */
klass = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_x224_class, tvb, offset, 1, ENC_BIG_ENDIAN);
x224_info->klass = klass;
- offset+=1;
+ offset += 1;
return offset;
}
@@ -148,7 +148,7 @@ static int
dissect_x224_dt(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int offset, x224_conv_info_t *x224_info, proto_tree *parent_tree)
{
proto_item *item = NULL;
- tvbuff_t *next_tvb;
+ tvbuff_t *next_tvb;
switch (x224_info->klass >>4) {
case 2:
@@ -156,7 +156,7 @@ dissect_x224_dt(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int off
case 4:
/*DST-REF */
proto_tree_add_item(tree, hf_x224_dst_ref, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset+=2;
+ offset += 2;
break;
}
@@ -167,7 +167,7 @@ dissect_x224_dt(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int off
/* EOT / NR */
proto_tree_add_item(tree, hf_x224_eot, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_x224_nr, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ offset += 1;
next_tvb = tvb_new_subset_remaining(tvb, offset);
@@ -179,11 +179,11 @@ dissect_x224_dt(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int off
static int
dissect_x224(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
{
- proto_tree *tree = NULL;
- proto_item *item = NULL;
- int offset = 0 ;
- guint8 code, length;
- conversation_t *conversation;
+ proto_tree *tree = NULL;
+ proto_item *item = NULL;
+ int offset = 0 ;
+ guint8 code, length;
+ conversation_t *conversation;
x224_conv_info_t *x224_info;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "X.224");
@@ -198,12 +198,12 @@ dissect_x224(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
/* length indicator */
proto_tree_add_item(tree, hf_x224_length, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ offset += 1;
/* code */
code = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_x224_code, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset+=1;
+ offset += 1;
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)",
val_to_str(code>>4, code_vals, "Unknown code :%x"),
@@ -229,7 +229,7 @@ dissect_x224(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
x224_info->klass=0;
conversation_add_proto_data(conversation, proto_x224, x224_info);
- }
+ }
switch (code>>4) {
case X224_CODE_CR:
@@ -322,3 +322,16 @@ proto_reg_handoff_x224(void)
{
t125_handle = find_dissector("t125");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-x29.c b/epan/dissectors/packet-x29.c
index 528a460b63..72a009f45f 100644
--- a/epan/dissectors/packet-x29.c
+++ b/epan/dissectors/packet-x29.c
@@ -76,15 +76,15 @@ static const value_string error_type_vals[] = {
static int
dissect_x29(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
- int offset = 0;
+ int offset = 0;
proto_tree *x29_tree;
proto_item *ti;
- gboolean *q_bit_set;
- guint8 msg_code;
- guint8 error_type;
- guint8 type_ref;
- gint next_offset;
- int linelen;
+ gboolean *q_bit_set;
+ guint8 msg_code;
+ guint8 error_type;
+ guint8 type_ref;
+ gint next_offset;
+ int linelen;
/* Reject the packet if data is NULL */
if (data == NULL)
@@ -274,3 +274,16 @@ proto_reg_handoff_x29(void)
x29_handle = new_create_dissector_handle(dissect_x29, proto_x29);
dissector_add_uint("x.25.spi", NLPID_SPI_X_29, x29_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-yhoo.c b/epan/dissectors/packet-yhoo.c
index 2df810adb5..27b5dbd43f 100644
--- a/epan/dissectors/packet-yhoo.c
+++ b/epan/dissectors/packet-yhoo.c
@@ -288,7 +288,7 @@ proto_register_yhoo(void)
{ &hf_yhoo_version, {
"Version", "yhoo.version", FT_STRING, BASE_NONE,
NULL, 0, "Packet version identifier", HFILL }},
- };
+ };
static gint *ett[] = {
&ett_yhoo,
};
@@ -313,3 +313,16 @@ proto_reg_handoff_yhoo(void)
*/
heur_dissector_add("tcp", dissect_yhoo, proto_yhoo);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */
diff --git a/epan/dissectors/packet-ypserv.c b/epan/dissectors/packet-ypserv.c
index c5c12568fb..8a113d569d 100644
--- a/epan/dissectors/packet-ypserv.c
+++ b/epan/dissectors/packet-ypserv.c
@@ -528,17 +528,17 @@ static const vsff ypserv1_proc[] = {
};
static const value_string ypserv1_proc_vals[] = {
- { YPPROC_DOMAIN, "DOMAIN" },
+ { YPPROC_DOMAIN, "DOMAIN" },
{ YPPROC_DOMAIN_NONACK, "DOMAIN_NONACK" },
- { YPPROC_MATCH, "MATCH" },
- { YPPROC_FIRST, "FIRST" },
- { YPPROC_NEXT, "NEXT" },
- { YPPROC_XFR, "XFR" },
- { YPPROC_CLEAR, "CLEAR" },
- { YPPROC_ALL, "ALL" },
- { YPPROC_MASTER, "MASTER" },
- { YPPROC_ORDER, "ORDER" },
- { YPPROC_MAPLIST, "MAPLIST" },
+ { YPPROC_MATCH, "MATCH" },
+ { YPPROC_FIRST, "FIRST" },
+ { YPPROC_NEXT, "NEXT" },
+ { YPPROC_XFR, "XFR" },
+ { YPPROC_CLEAR, "CLEAR" },
+ { YPPROC_ALL, "ALL" },
+ { YPPROC_MASTER, "MASTER" },
+ { YPPROC_ORDER, "ORDER" },
+ { YPPROC_MAPLIST, "MAPLIST" },
{ 0, NULL }
};
@@ -548,45 +548,45 @@ static const value_string ypserv1_proc_vals[] = {
/* NULL as function pointer means: type of arguments is "void". */
static const vsff ypserv2_proc[] = {
- { 0, "NULL", NULL, NULL },
- { YPPROC_DOMAIN, "DOMAIN",
+ { 0, "NULL", NULL, NULL },
+ { YPPROC_DOMAIN, "DOMAIN",
dissect_domain_call, dissect_domain_reply },
{ YPPROC_DOMAIN_NONACK, "DOMAIN_NONACK",
dissect_domain_nonack_call, dissect_domain_nonack_reply },
- { YPPROC_MATCH, "MATCH",
+ { YPPROC_MATCH, "MATCH",
dissect_match_call, dissect_match_reply },
- { YPPROC_FIRST, "FIRST",
+ { YPPROC_FIRST, "FIRST",
dissect_first_call, dissect_first_reply },
- { YPPROC_NEXT, "NEXT",
+ { YPPROC_NEXT, "NEXT",
dissect_next_call, dissect_next_reply },
- { YPPROC_XFR, "XFR",
+ { YPPROC_XFR, "XFR",
dissect_xfr_call, dissect_xfr_reply },
- { YPPROC_CLEAR, "CLEAR",
+ { YPPROC_CLEAR, "CLEAR",
dissect_clear_call, dissect_clear_reply },
- { YPPROC_ALL, "ALL",
+ { YPPROC_ALL, "ALL",
dissect_all_call, dissect_all_reply },
- { YPPROC_MASTER, "MASTER",
+ { YPPROC_MASTER, "MASTER",
dissect_master_call, dissect_master_reply },
- { YPPROC_ORDER, "ORDER",
+ { YPPROC_ORDER, "ORDER",
dissect_order_call, dissect_order_reply },
- { YPPROC_MAPLIST, "MAPLIST",
+ { YPPROC_MAPLIST, "MAPLIST",
dissect_maplist_call, dissect_maplist_reply },
{ 0, NULL, NULL, NULL }
};
static const value_string ypserv2_proc_vals[] = {
- { YPPROC_DOMAIN, "DOMAIN" },
- { YPPROC_DOMAIN_NONACK, "DOMAIN_NONACK" },
- { YPPROC_MATCH, "MATCH" },
- { YPPROC_FIRST, "FIRST" },
- { YPPROC_NEXT, "NEXT" },
- { YPPROC_XFR, "XFR" },
- { YPPROC_CLEAR, "CLEAR" },
- { YPPROC_ALL, "ALL" },
- { YPPROC_MASTER, "MASTER" },
- { YPPROC_ORDER, "ORDER" },
- { YPPROC_MAPLIST, "MAPLIST" },
- { 0, NULL }
+ { YPPROC_DOMAIN, "DOMAIN" },
+ { YPPROC_DOMAIN_NONACK, "DOMAIN_NONACK" },
+ { YPPROC_MATCH, "MATCH" },
+ { YPPROC_FIRST, "FIRST" },
+ { YPPROC_NEXT, "NEXT" },
+ { YPPROC_XFR, "XFR" },
+ { YPPROC_CLEAR, "CLEAR" },
+ { YPPROC_ALL, "ALL" },
+ { YPPROC_MASTER, "MASTER" },
+ { YPPROC_ORDER, "ORDER" },
+ { YPPROC_MAPLIST, "MAPLIST" },
+ { 0, NULL }
};
/* end of YPServ version 2 */
@@ -667,3 +667,16 @@ proto_reg_handoff_ypserv(void)
rpc_init_proc_table(YPSERV_PROGRAM, 2, ypserv2_proc,
hf_ypserv_procedure_v2);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */