From 0b18d6cb77022494a875e6e0d9d2ad27fb6ac6d9 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Sun, 5 Oct 2014 15:57:05 -0400 Subject: Add editor modelines; Adjust whitespace as needed. Change-Id: I6e70c933ae61a97377235d67b2f6a1b3d67dc155 Reviewed-on: https://code.wireshark.org/review/4484 Reviewed-by: Bill Meier --- epan/dissectors/file-jpeg.c | 13 + epan/dissectors/packet-aarp.c | 165 +++++++------ epan/dissectors/packet-aim-bos.c | 131 +++++----- epan/dissectors/packet-aim-buddylist.c | 13 + epan/dissectors/packet-aim-chat.c | 45 ++-- epan/dissectors/packet-aim-location.c | 13 + epan/dissectors/packet-aim-signon.c | 13 + epan/dissectors/packet-aim-sst.c | 13 + epan/dissectors/packet-ax4000.c | 57 +++-- epan/dissectors/packet-ayiya.c | 277 +++++++++++---------- epan/dissectors/packet-bootparams.c | 13 + epan/dissectors/packet-bpq.c | 13 + epan/dissectors/packet-cgmp.c | 19 +- epan/dissectors/packet-cimetrics.c | 41 +-- epan/dissectors/packet-data.c | 13 + epan/dissectors/packet-dcerpc-rpriv.c | 13 + epan/dissectors/packet-dcerpc-rras.c | 25 +- epan/dissectors/packet-dcerpc-rs_acct.c | 27 +- epan/dissectors/packet-ddtp.c | 167 +++++++------ epan/dissectors/packet-dmx-test.c | 13 + epan/dissectors/packet-dmx.c | 13 + epan/dissectors/packet-flexnet.c | 13 + epan/dissectors/packet-gift.c | 13 + epan/dissectors/packet-gmr1_dtap.c | 13 + epan/dissectors/packet-gpef.c | 61 +++-- epan/dissectors/packet-h1.c | 209 ++++++++-------- epan/dissectors/packet-hpext.c | 13 + epan/dissectors/packet-icp.c | 191 +++++++------- epan/dissectors/packet-idp.c | 15 +- epan/dissectors/packet-ieee802a.c | 23 +- epan/dissectors/packet-isl.c | 228 +++++++++-------- epan/dissectors/packet-jmirror.c | 13 + epan/dissectors/packet-kadm5.c | 33 ++- epan/dissectors/packet-klm.c | 21 +- epan/dissectors/packet-l1-events.c | 15 +- epan/dissectors/packet-lapb.c | 209 ++++++++-------- epan/dissectors/packet-llt.c | 17 +- epan/dissectors/packet-lpd.c | 87 ++++--- epan/dissectors/packet-m3ua.c | 247 +++++++++--------- epan/dissectors/packet-netlink-netfilter.c | 31 ++- epan/dissectors/packet-nntp.c | 23 +- epan/dissectors/packet-nt-tpcp.c | 55 +++-- epan/dissectors/packet-pktc.c | 211 ++++++++-------- epan/dissectors/packet-pw-common.c | 13 + epan/dissectors/packet-pw-hdlc.c | 15 +- epan/dissectors/packet-ripng.c | 157 ++++++------ epan/dissectors/packet-rmcp.c | 13 + epan/dissectors/packet-rstat.c | 13 + epan/dissectors/packet-sdlc.c | 53 ++-- epan/dissectors/packet-syslog.c | 233 ++++++++--------- epan/dissectors/packet-tdmoe.c | 51 ++-- epan/dissectors/packet-text-media.c | 13 + epan/dissectors/packet-turnchannel.c | 19 +- epan/dissectors/packet-vntag.c | 13 + epan/dissectors/packet-xot.c | 385 +++++++++++++++-------------- epan/dissectors/packet-ypbind.c | 25 +- 56 files changed, 2284 insertions(+), 1557 deletions(-) (limited to 'epan/dissectors') diff --git a/epan/dissectors/file-jpeg.c b/epan/dissectors/file-jpeg.c index 6534bacdf7..ae7590453f 100644 --- a/epan/dissectors/file-jpeg.c +++ b/epan/dissectors/file-jpeg.c @@ -1206,3 +1206,16 @@ proto_reg_handoff_jfif(void) heur_dissector_add("http", dissect_jfif_heur, proto_jfif); heur_dissector_add("wtap_file", dissect_jfif_heur, proto_jfif); } + +/* + * 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-aarp.c b/epan/dissectors/packet-aarp.c index dd4d298a62..2c7613127a 100644 --- a/epan/dissectors/packet-aarp.c +++ b/epan/dissectors/packet-aarp.c @@ -52,13 +52,13 @@ static int hf_aarp_dst_proto_id = -1; static gint ett_aarp = -1; #ifndef AARP_REQUEST -#define AARP_REQUEST 0x0001 +#define AARP_REQUEST 0x0001 #endif #ifndef AARP_REPLY -#define AARP_REPLY 0x0002 +#define AARP_REPLY 0x0002 #endif #ifndef AARP_PROBE -#define AARP_PROBE 0x0003 +#define AARP_PROBE 0x0003 #endif /* The following is screwed up shit to deal with the fact that @@ -77,8 +77,8 @@ static const value_string op_vals[] = { {0, NULL } }; /* AARP protocol HARDWARE identifiers. */ -#define AARPHRD_ETHER 1 /* Ethernet 10Mbps */ -#define AARPHRD_TR 2 /* Token Ring */ +#define AARPHRD_ETHER 1 /* Ethernet 10Mbps */ +#define AARPHRD_TR 2 /* Token Ring */ static const value_string hrd_vals[] = { {AARPHRD_ETHER, "Ethernet" }, @@ -91,8 +91,8 @@ static const value_string hrd_vals[] = { * "Token Ring", and the length must be 6 bytes. */ #define AARP_HW_IS_ETHER(ar_hrd, ar_hln) \ - (((ar_hrd) == AARPHRD_ETHER || (ar_hrd) == AARPHRD_TR) \ - && (ar_hln) == 6) + (((ar_hrd) == AARPHRD_ETHER || (ar_hrd) == AARPHRD_TR) \ + && (ar_hln) == 6) /* * Given the protocol address type and length, check whether an address @@ -100,7 +100,7 @@ static const value_string hrd_vals[] = { * and the length must be 4 bytes. */ #define AARP_PRO_IS_ATALK(ar_pro, ar_pln) \ - ((ar_pro) == ETHERTYPE_ATALK && (ar_pln) == 4) + ((ar_pro) == ETHERTYPE_ATALK && (ar_pln) == 4) static gchar * tvb_atalkid_to_str(tvbuff_t *tvb, gint offset) @@ -136,12 +136,12 @@ tvb_aarpproaddr_to_str(tvbuff_t *tvb, gint offset, int ad_len, guint16 type) } /* Offsets of fields within an AARP packet. */ -#define AR_HRD 0 -#define AR_PRO 2 -#define AR_HLN 4 -#define AR_PLN 5 -#define AR_OP 6 -#define MIN_AARP_HEADER_SIZE 8 +#define AR_HRD 0 +#define AR_PRO 2 +#define AR_HLN 4 +#define AR_PLN 5 +#define AR_OP 6 +#define MIN_AARP_HEADER_SIZE 8 static void dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -201,57 +201,57 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { if (tree) { if ((op_str = try_val_to_str(ar_op, op_vals))) ti = proto_tree_add_protocol_format(tree, proto_aarp, tvb, 0, - MIN_AARP_HEADER_SIZE + 2*ar_hln + - 2*ar_pln, "AppleTalk Address Resolution Protocol (%s)", op_str); + MIN_AARP_HEADER_SIZE + 2*ar_hln + + 2*ar_pln, "AppleTalk Address Resolution Protocol (%s)", op_str); else ti = proto_tree_add_protocol_format(tree, proto_aarp, tvb, 0, - MIN_AARP_HEADER_SIZE + 2*ar_hln + - 2*ar_pln, - "AppleTalk Address Resolution Protocol (opcode 0x%04x)", ar_op); + MIN_AARP_HEADER_SIZE + 2*ar_hln + + 2*ar_pln, + "AppleTalk Address Resolution Protocol (opcode 0x%04x)", ar_op); aarp_tree = proto_item_add_subtree(ti, ett_aarp); proto_tree_add_uint(aarp_tree, hf_aarp_hard_type, tvb, AR_HRD, 2, - ar_hrd); + ar_hrd); proto_tree_add_uint(aarp_tree, hf_aarp_proto_type, tvb, AR_PRO, 2, - ar_pro); + ar_pro); proto_tree_add_uint(aarp_tree, hf_aarp_hard_size, tvb, AR_HLN, 1, - ar_hln); + ar_hln); proto_tree_add_uint(aarp_tree, hf_aarp_proto_size, tvb, AR_PLN, 1, - ar_pln); + ar_pln); proto_tree_add_uint(aarp_tree, hf_aarp_opcode, tvb, AR_OP, 2, - ar_op); + ar_op); if (ar_hln != 0) { proto_tree_add_item(aarp_tree, - AARP_HW_IS_ETHER(ar_hrd, ar_hln) ? hf_aarp_src_hw_mac : hf_aarp_src_hw, - tvb, sha_offset, ar_hln, ENC_NA); + AARP_HW_IS_ETHER(ar_hrd, ar_hln) ? hf_aarp_src_hw_mac : hf_aarp_src_hw, + tvb, sha_offset, ar_hln, ENC_NA); } if (ar_pln != 0) { if (AARP_PRO_IS_ATALK(ar_pro, ar_pln)) { proto_tree_add_bytes_format_value(aarp_tree, hf_aarp_src_proto_id, tvb, - spa_offset, ar_pln, NULL, - "%s", spa_str); + spa_offset, ar_pln, NULL, + "%s", spa_str); } else { proto_tree_add_bytes_format_value(aarp_tree, hf_aarp_src_proto, tvb, - spa_offset, ar_pln, NULL, - "%s", spa_str); + spa_offset, ar_pln, NULL, + "%s", spa_str); } } if (ar_hln != 0) { proto_tree_add_item(aarp_tree, - AARP_HW_IS_ETHER(ar_hrd, ar_hln) ? hf_aarp_dst_hw_mac : hf_aarp_dst_hw, - tvb, tha_offset, ar_hln, ENC_NA); + AARP_HW_IS_ETHER(ar_hrd, ar_hln) ? hf_aarp_dst_hw_mac : hf_aarp_dst_hw, + tvb, tha_offset, ar_hln, ENC_NA); } if (ar_pln != 0) { if (AARP_PRO_IS_ATALK(ar_pro, ar_pln)) { proto_tree_add_bytes_format_value(aarp_tree, hf_aarp_dst_proto_id, tvb, - tpa_offset, ar_pln, - NULL, "%s", tpa_str); + tpa_offset, ar_pln, + NULL, "%s", tpa_str); } else { proto_tree_add_bytes_format_value(aarp_tree, hf_aarp_dst_proto, tvb, - tpa_offset, ar_pln, - NULL, "%s", tpa_str); + tpa_offset, ar_pln, + NULL, "%s", tpa_str); } } } @@ -262,77 +262,77 @@ proto_register_aarp(void) { static hf_register_info hf[] = { { &hf_aarp_hard_type, - { "Hardware type", "aarp.hard.type", - FT_UINT16, BASE_HEX, VALS(hrd_vals), 0x0, - NULL, HFILL }}, + { "Hardware type", "aarp.hard.type", + FT_UINT16, BASE_HEX, VALS(hrd_vals), 0x0, + NULL, HFILL }}, { &hf_aarp_proto_type, - { "Protocol type", "aarp.proto.type", - FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, - NULL, HFILL }}, + { "Protocol type", "aarp.proto.type", + FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, + NULL, HFILL }}, { &hf_aarp_hard_size, - { "Hardware size", "aarp.hard.size", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + { "Hardware size", "aarp.hard.size", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_aarp_proto_size, - { "Protocol size", "aarp.proto.size", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + { "Protocol size", "aarp.proto.size", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_aarp_opcode, - { "Opcode", "aarp.opcode", - FT_UINT16, BASE_DEC, VALS(op_vals), 0x0, - NULL, HFILL }}, + { "Opcode", "aarp.opcode", + FT_UINT16, BASE_DEC, VALS(op_vals), 0x0, + NULL, HFILL }}, { &hf_aarp_src_hw, - { "Sender hardware address", "aarp.src.hw", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Sender hardware address", "aarp.src.hw", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_aarp_src_hw_mac, - { "Sender MAC address", "aarp.src.hw_mac", - FT_ETHER, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Sender MAC address", "aarp.src.hw_mac", + FT_ETHER, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_aarp_src_proto, - { "Sender protocol address", "aarp.src.proto", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Sender protocol address", "aarp.src.proto", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_aarp_src_proto_id, - { "Sender ID", "aarp.src.proto_id", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Sender ID", "aarp.src.proto_id", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_aarp_dst_hw, - { "Target hardware address", "aarp.dst.hw", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Target hardware address", "aarp.dst.hw", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_aarp_dst_hw_mac, - { "Target MAC address", "aarp.dst.hw_mac", - FT_ETHER, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Target MAC address", "aarp.dst.hw_mac", + FT_ETHER, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_aarp_dst_proto, - { "Target protocol address", "aarp.dst.proto", - FT_BYTES, BASE_NONE, NULL, 0x0, + { "Target protocol address", "aarp.dst.proto", + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_aarp_dst_proto_id, - { "Target ID", "aarp.dst.proto_id", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Target ID", "aarp.dst.proto_id", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, }; static gint *ett[] = { &ett_aarp, }; proto_aarp = proto_register_protocol("Appletalk Address Resolution Protocol", - "AARP", - "aarp"); + "AARP", + "aarp"); proto_register_field_array(proto_aarp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } @@ -346,3 +346,16 @@ proto_reg_handoff_aarp(void) dissector_add_uint("ethertype", ETHERTYPE_AARP, aarp_handle); dissector_add_uint("chdlc.protocol", ETHERTYPE_AARP, aarp_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-aim-bos.c b/epan/dissectors/packet-aim-bos.c index 69fe798562..b99d12ef92 100644 --- a/epan/dissectors/packet-aim-bos.c +++ b/epan/dissectors/packet-aim-bos.c @@ -36,26 +36,26 @@ void proto_reg_handoff_aim_bos(void); /* Family BOS (Misc) */ -#define CLASS_UNCONFIRMED 0x0001 -#define CLASS_ADMINISTRATOR 0x0002 -#define CLASS_AOL 0x0004 -#define CLASS_COMMERCIAL 0x0008 -#define CLASS_FREE 0x0010 -#define CLASS_AWAY 0x0020 -#define CLASS_ICQ 0x0040 -#define CLASS_WIRELESS 0x0080 -#define CLASS_UNKNOWN100 0x0100 -#define CLASS_UNKNOWN200 0x0200 -#define CLASS_UNKNOWN400 0x0400 -#define CLASS_UNKNOWN800 0x0800 - -#define AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE 0x001 -#define AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE 0x002 +#define CLASS_UNCONFIRMED 0x0001 +#define CLASS_ADMINISTRATOR 0x0002 +#define CLASS_AOL 0x0004 +#define CLASS_COMMERCIAL 0x0008 +#define CLASS_FREE 0x0010 +#define CLASS_AWAY 0x0020 +#define CLASS_ICQ 0x0040 +#define CLASS_WIRELESS 0x0080 +#define CLASS_UNKNOWN100 0x0100 +#define CLASS_UNKNOWN200 0x0200 +#define CLASS_UNKNOWN400 0x0400 +#define CLASS_UNKNOWN800 0x0800 + +#define AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE 0x001 +#define AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE 0x002 static const aim_tlv aim_privacy_tlvs[] = { - { AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE, "Max visible list size", dissect_aim_tlv_value_uint16 }, - { AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE, "Max invisible list size", dissect_aim_tlv_value_uint16 }, - { 0, NULL, NULL }, + { AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE, "Max visible list size", dissect_aim_tlv_value_uint16 }, + { AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE, "Max invisible list size", dissect_aim_tlv_value_uint16 }, + { 0, NULL, NULL }, }; /* Initialize the protocol and registered fields */ @@ -68,24 +68,24 @@ static gint ett_aim_bos = -1; static int dissect_aim_bos_set_group_perm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *bos_tree) { - int offset = 0; - guint32 userclass = tvb_get_ntohl(tvb, offset); - proto_item *ti = proto_tree_add_uint(bos_tree, hf_aim_bos_class, tvb, offset, 4, userclass); - return dissect_aim_userclass(tvb, offset, 4, ti, userclass); + int offset = 0; + guint32 userclass = tvb_get_ntohl(tvb, offset); + proto_item *ti = proto_tree_add_uint(bos_tree, hf_aim_bos_class, tvb, offset, 4, userclass); + return dissect_aim_userclass(tvb, offset, 4, ti, userclass); } static int dissect_aim_bos_rights(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bos_tree) { - return dissect_aim_tlv_sequence(tvb, pinfo, 0, bos_tree, aim_privacy_tlvs); + return dissect_aim_tlv_sequence(tvb, pinfo, 0, bos_tree, aim_privacy_tlvs); } static int dissect_aim_bos_buddyname(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bos_tree) { - int offset = 0; - while(tvb_reported_length_remaining(tvb, offset) > 0) { - offset = dissect_aim_buddyname(tvb, pinfo, offset, bos_tree); - } - return offset; + int offset = 0; + while(tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_buddyname(tvb, pinfo, offset, bos_tree); + } + return offset; } /* Register the protocol with Wireshark */ @@ -93,45 +93,58 @@ void proto_register_aim_bos(void) { - /* Setup list of header fields */ - static hf_register_info hf[] = { + /* Setup list of header fields */ + static hf_register_info hf[] = { #if 0 - { &hf_aim_bos_data, - { "Data", "aim_bos.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } - }, + { &hf_aim_bos_data, + { "Data", "aim_bos.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, #endif - { &hf_aim_bos_class, - { "User class", "aim_bos.userclass", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, - }, - }; - - /* Setup protocol subtree array */ - static gint *ett[] = { - &ett_aim_bos, - }; - - /* Register the protocol name and description */ - proto_aim_bos = proto_register_protocol("AIM Privacy Management Service", "AIM BOS", "aim_bos"); - - /* Required function calls to register the header fields and subtrees used */ - proto_register_field_array(proto_aim_bos, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + { &hf_aim_bos_class, + { "User class", "aim_bos.userclass", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + }; + + /* Setup protocol subtree array */ + static gint *ett[] = { + &ett_aim_bos, + }; + + /* Register the protocol name and description */ + proto_aim_bos = proto_register_protocol("AIM Privacy Management Service", "AIM BOS", "aim_bos"); + + /* Required function calls to register the header fields and subtrees used */ + proto_register_field_array(proto_aim_bos, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); } static const aim_subtype aim_fnac_family_bos[] = { - { 0x0001, "Error", dissect_aim_snac_error }, - { 0x0002, "Rights Query", NULL }, - { 0x0003, "Rights" , dissect_aim_bos_rights }, - { 0x0004, "Set Group Permissions Mask", dissect_aim_bos_set_group_perm }, - { 0x0005, "Add To Visible List", dissect_aim_bos_buddyname }, - { 0x0006, "Delete From Visible List", dissect_aim_bos_buddyname }, - { 0x0007, "Add To Invisible List", dissect_aim_bos_buddyname }, - { 0x0008, "Delete From Invisible List", dissect_aim_bos_buddyname }, - { 0, NULL, NULL } + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Rights Query", NULL }, + { 0x0003, "Rights" , dissect_aim_bos_rights }, + { 0x0004, "Set Group Permissions Mask", dissect_aim_bos_set_group_perm }, + { 0x0005, "Add To Visible List", dissect_aim_bos_buddyname }, + { 0x0006, "Delete From Visible List", dissect_aim_bos_buddyname }, + { 0x0007, "Add To Invisible List", dissect_aim_bos_buddyname }, + { 0x0008, "Delete From Invisible List", dissect_aim_bos_buddyname }, + { 0, NULL, NULL } }; void proto_reg_handoff_aim_bos(void) { - aim_init_family(proto_aim_bos, ett_aim_bos, FAMILY_BOS, aim_fnac_family_bos); + aim_init_family(proto_aim_bos, ett_aim_bos, FAMILY_BOS, aim_fnac_family_bos); } + +/* + * 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-aim-buddylist.c b/epan/dissectors/packet-aim-buddylist.c index 27de2a2b48..b8ebc8acb0 100644 --- a/epan/dissectors/packet-aim-buddylist.c +++ b/epan/dissectors/packet-aim-buddylist.c @@ -161,3 +161,16 @@ proto_reg_handoff_aim_buddylist(void) { aim_init_family(proto_aim_buddylist, ett_aim_buddylist, FAMILY_BUDDYLIST, aim_fnac_family_buddylist); } + +/* + * 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-chat.c b/epan/dissectors/packet-aim-chat.c index b6870613b4..a9aba7e2b6 100644 --- a/epan/dissectors/packet-aim-chat.c +++ b/epan/dissectors/packet-aim-chat.c @@ -43,23 +43,23 @@ void proto_reg_handoff_aim_chat(void); #define AIM_CHAT_TLV_CLASS_EXCLUSIVE 0x002 #define AIM_CHAT_TLV_MAX_CONCURRENT_ROOMS 0x003 #define AIM_CHAT_TLV_MAX_ROOM_NAME_LEN 0x004 -#define AIM_CHAT_TLV_ROOT_ROOMS 0x005 -#define AIM_CHAT_TLV_SEARCH_TAGS 0x006 -#define AIM_CHAT_TLV_CHILD_ROOMS 0x065 +#define AIM_CHAT_TLV_ROOT_ROOMS 0x005 +#define AIM_CHAT_TLV_SEARCH_TAGS 0x006 +#define AIM_CHAT_TLV_CHILD_ROOMS 0x065 #define AIM_CHAT_TLV_CONTAINS_USER_CLASS 0x066 #define AIM_CHAT_TLV_CONTAINS_USER_ARRAY 0x067 #if 0 static const aim_tlv aim_chat_tlvs[] _U_ = { - { AIM_CHAT_TLV_BROWSABLE_TREE, "Browsable tree", dissect_aim_tlv_value_bytes }, - { AIM_CHAT_TLV_CLASS_EXCLUSIVE, "Exclusively for class", dissect_aim_tlv_value_userclass }, + { AIM_CHAT_TLV_BROWSABLE_TREE, "Browsable tree", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_CLASS_EXCLUSIVE, "Exclusively for class", dissect_aim_tlv_value_userclass }, { AIM_CHAT_TLV_MAX_CONCURRENT_ROOMS, "Max. number of concurrent rooms", dissect_aim_tlv_value_uint8 }, - { AIM_CHAT_TLV_MAX_ROOM_NAME_LEN, "Max. length of room name", dissect_aim_tlv_value_uint8 }, - { AIM_CHAT_TLV_ROOT_ROOMS, "Root Rooms", dissect_aim_tlv_value_bytes }, - { AIM_CHAT_TLV_SEARCH_TAGS, "Search Tags", dissect_aim_tlv_value_bytes }, - { AIM_CHAT_TLV_CHILD_ROOMS, "Child Rooms", dissect_aim_tlv_value_bytes }, - { AIM_CHAT_TLV_CONTAINS_USER_CLASS, "Contains User Class", dissect_aim_tlv_value_bytes }, - { AIM_CHAT_TLV_CONTAINS_USER_ARRAY, "Contains User Array", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_MAX_ROOM_NAME_LEN, "Max. length of room name", dissect_aim_tlv_value_uint8 }, + { AIM_CHAT_TLV_ROOT_ROOMS, "Root Rooms", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_SEARCH_TAGS, "Search Tags", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_CHILD_ROOMS, "Child Rooms", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_CONTAINS_USER_CLASS, "Contains User Class", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_CONTAINS_USER_ARRAY, "Contains User Array", dissect_aim_tlv_value_bytes }, { 0, NULL, NULL } }; #endif @@ -122,14 +122,14 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot } static const aim_subtype aim_fnac_family_chat[] = { - { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0001, "Error", dissect_aim_snac_error }, { 0x0002, "Room Info Update", NULL }, - { 0x0003, "User Join", dissect_aim_chat_userinfo_list }, - { 0x0004, "User Leave", dissect_aim_chat_userinfo_list }, + { 0x0003, "User Join", dissect_aim_chat_userinfo_list }, + { 0x0004, "User Leave", dissect_aim_chat_userinfo_list }, { 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg }, { 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg }, - { 0x0007, "Evil Request", NULL }, - { 0x0008, "Evil Reply", NULL }, + { 0x0007, "Evil Request", NULL }, + { 0x0008, "Evil Reply", NULL }, { 0, NULL, NULL } }; @@ -163,3 +163,16 @@ proto_reg_handoff_aim_chat(void) { aim_init_family(proto_aim_chat, ett_aim_chat, FAMILY_CHAT, aim_fnac_family_chat); } + +/* + * 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-location.c b/epan/dissectors/packet-aim-location.c index 41d925f0ed..bcd8856e6e 100644 --- a/epan/dissectors/packet-aim-location.c +++ b/epan/dissectors/packet-aim-location.c @@ -214,3 +214,16 @@ proto_reg_handoff_aim_location(void) { aim_init_family(proto_aim_location, ett_aim_location, FAMILY_LOCATION, aim_fnac_family_location); } + +/* + * 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-signon.c b/epan/dissectors/packet-aim-signon.c index 8144d1130d..9dd02febcf 100644 --- a/epan/dissectors/packet-aim-signon.c +++ b/epan/dissectors/packet-aim-signon.c @@ -181,3 +181,16 @@ proto_reg_handoff_aim_signon(void) { aim_init_family(proto_aim_signon, ett_aim_signon, FAMILY_SIGNON, aim_fnac_family_signon); } + +/* + * 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-sst.c b/epan/dissectors/packet-aim-sst.c index af08f6aecc..1f4ff5d908 100644 --- a/epan/dissectors/packet-aim-sst.c +++ b/epan/dissectors/packet-aim-sst.c @@ -191,3 +191,16 @@ proto_reg_handoff_aim_sst(void) { aim_init_family(proto_aim_sst, ett_aim_sst, FAMILY_SST, aim_fnac_family_sst); } + +/* + * 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-ax4000.c b/epan/dissectors/packet-ax4000.c index 286a02c2b8..cd892825da 100644 --- a/epan/dissectors/packet-ax4000.c +++ b/epan/dissectors/packet-ax4000.c @@ -106,39 +106,39 @@ proto_register_ax4000(void) { static hf_register_info hf[] = { { &hf_ax4000_port, - { "Port Number", "ax4000.port", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } + { "Port Number", "ax4000.port", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } }, { &hf_ax4000_chassis, - { "Chassis Number", "ax4000.chassis", - FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL } + { "Chassis Number", "ax4000.chassis", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL } }, { &hf_ax4000_fill, - { "Fill Type", "ax4000.fill", - FT_UINT8, BASE_DEC, NULL, 0xc0, - NULL, HFILL } + { "Fill Type", "ax4000.fill", + FT_UINT8, BASE_DEC, NULL, 0xc0, + NULL, HFILL } }, { &hf_ax4000_index, - { "Index", "ax4000.index", - FT_UINT16, BASE_DEC, NULL, 0x0FFF, - NULL, HFILL } + { "Index", "ax4000.index", + FT_UINT16, BASE_DEC, NULL, 0x0FFF, + NULL, HFILL } }, { &hf_ax4000_timestamp, - { "Timestamp", "ax4000.timestamp", - FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL } + { "Timestamp", "ax4000.timestamp", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } }, { &hf_ax4000_seq, - { "Sequence Number", "ax4000.seq", - FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL } + { "Sequence Number", "ax4000.seq", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } }, { &hf_ax4000_crc, - { "CRC (unchecked)", "ax4000.crc", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL } + { "CRC (unchecked)", "ax4000.crc", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL } } }; @@ -149,7 +149,7 @@ proto_register_ax4000(void) /* Register the protocol name and description */ proto_ax4000 = proto_register_protocol("AX/4000 Test Block", - "AX4000", "ax4000"); + "AX4000", "ax4000"); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_ax4000, hf, array_length(hf)); @@ -170,3 +170,16 @@ proto_reg_handoff_ax4000(void) dissector_add_uint("tcp.port", AX4000_TCP_PORT, ax4000_handle); dissector_add_uint("udp.port", AX4000_UDP_PORT, ax4000_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-ayiya.c b/epan/dissectors/packet-ayiya.c index 4ba97ba633..3cd47e17f3 100644 --- a/epan/dissectors/packet-ayiya.c +++ b/epan/dissectors/packet-ayiya.c @@ -50,165 +50,178 @@ static int hf_signature = -1; static gint ett_ayiya = -1; static const value_string identity_types[] = { - { 0x0, "None" }, - { 0x1, "Integer" }, - { 0x2, "ASCII string" }, - { 0, NULL } + { 0x0, "None" }, + { 0x1, "Integer" }, + { 0x2, "ASCII string" }, + { 0, NULL } }; static const value_string hash_methods[] = { - { 0x0, "No hash" }, - { 0x1, "MD5" }, - { 0x2, "SHA1" }, - { 0, NULL } + { 0x0, "No hash" }, + { 0x1, "MD5" }, + { 0x2, "SHA1" }, + { 0, NULL } }; static const value_string auth_methods[] = { - { 0x0, "No authentication" }, - { 0x1, "Hash using a Shared Secret" }, - { 0x2, "Hash using a public/private key method" }, - { 0, NULL } + { 0x0, "No authentication" }, + { 0x1, "Hash using a Shared Secret" }, + { 0x2, "Hash using a public/private key method" }, + { 0, NULL } }; #define OPCODE_FORWARD 1 static const value_string opcodes[] = { - { 0x0, "No Operation / Heartbeat" }, - { 0x1, "Forward" }, - { 0x2, "Echo Request" }, - { 0x3, "Echo Request and Forward" }, - { 0x4, "Echo Response" }, - { 0x5, "MOTD" }, - { 0x6, "Query Request" }, - { 0x7, "Query Response" }, - { 0, NULL } + { 0x0, "No Operation / Heartbeat" }, + { 0x1, "Forward" }, + { 0x2, "Echo Request" }, + { 0x3, "Echo Request and Forward" }, + { 0x4, "Echo Response" }, + { 0x5, "MOTD" }, + { 0x6, "Query Request" }, + { 0x7, "Query Response" }, + { 0, NULL } }; -#define UDP_PORT_AYIYA 5072 +#define UDP_PORT_AYIYA 5072 static void dissect_ayiya(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *ayiya_tree; - int offset = 0; - int idlen, siglen, ayiya_len; - guint8 next_header, opcode; - tvbuff_t *payload; - - idlen = 1 << tvb_get_bits8(tvb, 0, 4); - siglen = tvb_get_bits8(tvb, 8, 4) * 4; - opcode = tvb_get_bits8(tvb, 20, 4); - next_header = tvb_get_guint8(tvb, 3); - - ayiya_len = 8+idlen+siglen; - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "AYIYA"); - - if (tree) { - proto_item *ti; - nstime_t tv; - ti = proto_tree_add_protocol_format( tree, proto_ayiya, tvb, - offset, ayiya_len, "AYIYA" ); - ayiya_tree = proto_item_add_subtree(ti, ett_ayiya); - - proto_tree_add_bits_item(ayiya_tree, hf_id_len, tvb, 0, 4, ENC_BIG_ENDIAN); - proto_tree_add_bits_item(ayiya_tree, hf_id_type, tvb, 4, 4, ENC_BIG_ENDIAN); - proto_tree_add_bits_item(ayiya_tree, hf_sig_len, tvb, 8, 4, ENC_BIG_ENDIAN); - proto_tree_add_bits_item(ayiya_tree, hf_hash_method, tvb, 12, 4, ENC_BIG_ENDIAN); - proto_tree_add_bits_item(ayiya_tree, hf_auth_method, tvb, 16, 4, ENC_BIG_ENDIAN); - proto_tree_add_bits_item(ayiya_tree, hf_opcode, tvb, 20, 4, ENC_BIG_ENDIAN); - proto_tree_add_uint_format_value(ayiya_tree, hf_next_header, tvb, - 3, 1, next_header, - "%s (0x%02x)", - ipprotostr(next_header), next_header); - tv.secs = tvb_get_ntohl(tvb, 4); - tv.nsecs = 0; - proto_tree_add_time(ayiya_tree, hf_epoch, tvb, 4, 4, &tv); - proto_tree_add_item(ayiya_tree, hf_identity, tvb, 8, idlen, ENC_NA); - proto_tree_add_item(ayiya_tree, hf_signature, tvb, 8+idlen, siglen, ENC_NA); - } - offset = ayiya_len; - switch (opcode) { - case OPCODE_FORWARD: - payload = tvb_new_subset_remaining(tvb, offset); - dissector_try_uint(ip_dissector_table, next_header, payload, pinfo, tree); - break; - } + proto_tree *ayiya_tree; + int offset = 0; + int idlen, siglen, ayiya_len; + guint8 next_header, opcode; + tvbuff_t *payload; + + idlen = 1 << tvb_get_bits8(tvb, 0, 4); + siglen = tvb_get_bits8(tvb, 8, 4) * 4; + opcode = tvb_get_bits8(tvb, 20, 4); + next_header = tvb_get_guint8(tvb, 3); + + ayiya_len = 8+idlen+siglen; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "AYIYA"); + + if (tree) { + proto_item *ti; + nstime_t tv; + ti = proto_tree_add_protocol_format( tree, proto_ayiya, tvb, + offset, ayiya_len, "AYIYA" ); + ayiya_tree = proto_item_add_subtree(ti, ett_ayiya); + + proto_tree_add_bits_item(ayiya_tree, hf_id_len, tvb, 0, 4, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(ayiya_tree, hf_id_type, tvb, 4, 4, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(ayiya_tree, hf_sig_len, tvb, 8, 4, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(ayiya_tree, hf_hash_method, tvb, 12, 4, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(ayiya_tree, hf_auth_method, tvb, 16, 4, ENC_BIG_ENDIAN); + proto_tree_add_bits_item(ayiya_tree, hf_opcode, tvb, 20, 4, ENC_BIG_ENDIAN); + proto_tree_add_uint_format_value(ayiya_tree, hf_next_header, tvb, + 3, 1, next_header, + "%s (0x%02x)", + ipprotostr(next_header), next_header); + tv.secs = tvb_get_ntohl(tvb, 4); + tv.nsecs = 0; + proto_tree_add_time(ayiya_tree, hf_epoch, tvb, 4, 4, &tv); + proto_tree_add_item(ayiya_tree, hf_identity, tvb, 8, idlen, ENC_NA); + proto_tree_add_item(ayiya_tree, hf_signature, tvb, 8+idlen, siglen, ENC_NA); + } + offset = ayiya_len; + switch (opcode) { + case OPCODE_FORWARD: + payload = tvb_new_subset_remaining(tvb, offset); + dissector_try_uint(ip_dissector_table, next_header, payload, pinfo, tree); + break; + } } void proto_register_ayiya(void) { - static hf_register_info hf[] = { - { &hf_id_len, - { "Identity field length", "ayiya.idlen", FT_UINT8, - BASE_HEX, NULL, 0x0, NULL, HFILL - } - }, - { &hf_id_type, - { "Identity field type", "ayiya.idtype", FT_UINT8, - BASE_HEX, VALS(identity_types), 0x0, NULL, HFILL - } - }, - { &hf_sig_len, - { "Signature Length", "ayiya.siglen", FT_UINT8, - BASE_HEX, NULL, 0x0, NULL, HFILL - } - }, - { &hf_hash_method, - { "Hash method", "ayiya.hashmethod", FT_UINT8, - BASE_HEX, VALS(hash_methods), 0x0, NULL, HFILL - } - }, - { &hf_auth_method, - { "Authentication method", "ayiya.authmethod", FT_UINT8, - BASE_HEX, VALS(auth_methods), 0x0, NULL, HFILL - } - }, - { &hf_opcode, - { "Operation Code", "ayiya.opcode", FT_UINT8, - BASE_HEX, VALS(opcodes), 0x0, NULL, HFILL - } - }, - { &hf_next_header, - { "Next Header", "ayiya.nextheader", FT_UINT8, - BASE_HEX, NULL, 0x0, NULL, HFILL - } - }, - { &hf_epoch, - { "Epoch", "ayiya.epoch", FT_ABSOLUTE_TIME, - ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL - } - }, - { &hf_identity, - { "Identity", "ayiya.identity", FT_BYTES, - BASE_NONE, NULL, 0x0, NULL, HFILL - } - }, - { &hf_signature, - { "Signature", "ayiya.signature", FT_BYTES, - BASE_NONE, NULL, 0x0, NULL, HFILL - } - }, - }; - static gint *ett[] = { - &ett_ayiya, - }; - - proto_ayiya = proto_register_protocol("Anything in Anything Protocol", - "AYIYA", "ayiya"); - register_dissector("ayiya", dissect_ayiya, proto_ayiya); - proto_register_field_array(proto_ayiya, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + static hf_register_info hf[] = { + { &hf_id_len, + { "Identity field length", "ayiya.idlen", FT_UINT8, + BASE_HEX, NULL, 0x0, NULL, HFILL + } + }, + { &hf_id_type, + { "Identity field type", "ayiya.idtype", FT_UINT8, + BASE_HEX, VALS(identity_types), 0x0, NULL, HFILL + } + }, + { &hf_sig_len, + { "Signature Length", "ayiya.siglen", FT_UINT8, + BASE_HEX, NULL, 0x0, NULL, HFILL + } + }, + { &hf_hash_method, + { "Hash method", "ayiya.hashmethod", FT_UINT8, + BASE_HEX, VALS(hash_methods), 0x0, NULL, HFILL + } + }, + { &hf_auth_method, + { "Authentication method", "ayiya.authmethod", FT_UINT8, + BASE_HEX, VALS(auth_methods), 0x0, NULL, HFILL + } + }, + { &hf_opcode, + { "Operation Code", "ayiya.opcode", FT_UINT8, + BASE_HEX, VALS(opcodes), 0x0, NULL, HFILL + } + }, + { &hf_next_header, + { "Next Header", "ayiya.nextheader", FT_UINT8, + BASE_HEX, NULL, 0x0, NULL, HFILL + } + }, + { &hf_epoch, + { "Epoch", "ayiya.epoch", FT_ABSOLUTE_TIME, + ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL + } + }, + { &hf_identity, + { "Identity", "ayiya.identity", FT_BYTES, + BASE_NONE, NULL, 0x0, NULL, HFILL + } + }, + { &hf_signature, + { "Signature", "ayiya.signature", FT_BYTES, + BASE_NONE, NULL, 0x0, NULL, HFILL + } + }, + }; + static gint *ett[] = { + &ett_ayiya, + }; + + proto_ayiya = proto_register_protocol("Anything in Anything Protocol", + "AYIYA", "ayiya"); + register_dissector("ayiya", dissect_ayiya, proto_ayiya); + proto_register_field_array(proto_ayiya, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); } void proto_reg_handoff_ayiya(void) { - dissector_handle_t ayiya_handle; + dissector_handle_t ayiya_handle; - ayiya_handle = find_dissector("ayiya"); - dissector_add_uint("udp.port", UDP_PORT_AYIYA, ayiya_handle); + ayiya_handle = find_dissector("ayiya"); + dissector_add_uint("udp.port", UDP_PORT_AYIYA, ayiya_handle); - ip_dissector_table = find_dissector_table("ip.proto"); + ip_dissector_table = find_dissector_table("ip.proto"); } + +/* + * 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-bootparams.c b/epan/dissectors/packet-bootparams.c index fc8ed6ed09..7f13f7a226 100644 --- a/epan/dissectors/packet-bootparams.c +++ b/epan/dissectors/packet-bootparams.c @@ -202,3 +202,16 @@ proto_reg_handoff_bootparams(void) /* Register the procedure tables */ rpc_init_proc_table(BOOTPARAMS_PROGRAM, 1, bootparams1_proc, hf_bootparams_procedure_v1); } + +/* + * 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-bpq.c b/epan/dissectors/packet-bpq.c index 46d6406bc9..0413da202c 100644 --- a/epan/dissectors/packet-bpq.c +++ b/epan/dissectors/packet-bpq.c @@ -158,3 +158,16 @@ proto_reg_handoff_bpq(void) ax25_handle = find_dissector( "ax25" ); } + +/* + * 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-cgmp.c b/epan/dissectors/packet-cgmp.c index 6cb4fb1d42..9817b145e0 100644 --- a/epan/dissectors/packet-cgmp.c +++ b/epan/dissectors/packet-cgmp.c @@ -117,14 +117,14 @@ proto_register_cgmp(void) { &hf_cgmp_usa, { "Unicast Source Address", "cgmp.usa", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - }; + }; static gint *ett[] = { &ett_cgmp, }; - proto_cgmp = proto_register_protocol("Cisco Group Management Protocol", + proto_cgmp = proto_register_protocol("Cisco Group Management Protocol", "CGMP", "cgmp"); - proto_register_field_array(proto_cgmp, hf, array_length(hf)); + proto_register_field_array(proto_cgmp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } @@ -137,3 +137,16 @@ proto_reg_handoff_cgmp(void) dissector_add_uint("llc.cisco_pid", 0x2001, cgmp_handle); dissector_add_uint("ethertype", 0x2001, cgmp_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-cimetrics.c b/epan/dissectors/packet-cimetrics.c index ae0c573a42..faa278a353 100644 --- a/epan/dissectors/packet-cimetrics.c +++ b/epan/dissectors/packet-cimetrics.c @@ -88,38 +88,38 @@ proto_register_cimetrics(void) { static hf_register_info hf[] = { { &hf_cimetrics_mstp_timer, - { "Delta Time", "cimetrics.mstp_timer", - FT_UINT16, BASE_DEC, NULL, 0, - "Milliseconds", HFILL } + { "Delta Time", "cimetrics.mstp_timer", + FT_UINT16, BASE_DEC, NULL, 0, + "Milliseconds", HFILL } }, { &hf_cimetrics_mstp_value, - { "8-bit value", "cimetrics.mstp_value", - FT_UINT8, BASE_DEC, NULL, 0, - "value", HFILL } + { "8-bit value", "cimetrics.mstp_value", + FT_UINT8, BASE_DEC, NULL, 0, + "value", HFILL } } }; static hf_register_info hf2[] = { - { &hf_llc_cimetrics_pid, - { "PID", "llc.cimetrics_pid", - FT_UINT16, BASE_HEX, VALS(cimetrics_pid_vals), 0, - NULL, HFILL } - } + { &hf_llc_cimetrics_pid, + { "PID", "llc.cimetrics_pid", + FT_UINT16, BASE_HEX, VALS(cimetrics_pid_vals), 0, + NULL, HFILL } + } }; static gint *ett[] = { &ett_cimetrics_mstp }; proto_cimetrics_mstp = proto_register_protocol("Cimetrics MS/TP", - "Cimetrics MS/TP", "cimetrics"); + "Cimetrics MS/TP", "cimetrics"); proto_register_field_array(proto_cimetrics_mstp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_dissector("cimetrics", dissect_cimetrics_mstp, - proto_cimetrics_mstp); + proto_cimetrics_mstp); llc_add_oui(OUI_CIMETRICS, "llc.cimetrics_pid", - "LLC Cimetrics OUI PID", hf2); + "LLC Cimetrics OUI PID", hf2); } void @@ -130,3 +130,16 @@ proto_reg_handoff_cimetrics(void) mstp_handle = find_dissector("cimetrics"); dissector_add_uint("llc.cimetrics_pid", 1, mstp_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-data.c b/epan/dissectors/packet-data.c index 7a10bd5b82..a6eaf9801f 100644 --- a/epan/dissectors/packet-data.c +++ b/epan/dissectors/packet-data.c @@ -167,3 +167,16 @@ proto_register_data(void) */ proto_set_cant_toggle(proto_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-dcerpc-rpriv.c b/epan/dissectors/packet-dcerpc-rpriv.c index 7cc4c0a680..646544c9f3 100644 --- a/epan/dissectors/packet-dcerpc-rpriv.c +++ b/epan/dissectors/packet-dcerpc-rpriv.c @@ -142,3 +142,16 @@ proto_reg_handoff_rpriv (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rpriv, ett_rpriv, &uuid_rpriv, ver_rpriv, rpriv_dissectors, hf_rpriv_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-dcerpc-rras.c b/epan/dissectors/packet-dcerpc-rras.c index f6f7f2d7c7..f1066c8fa5 100644 --- a/epan/dissectors/packet-dcerpc-rras.c +++ b/epan/dissectors/packet-dcerpc-rras.c @@ -124,7 +124,7 @@ static dcerpc_sub_dissector dcerpc_rras_dissectors[] = { { RRAS_RI_GET_CRED_EX, "RouterInterfaceGetCredentialsEx", NULL, NULL }, { RRAS_ADMIN_CONNECTION_REM_QUARANT, "RasAdminConnectionRemoveQuarantine", NULL, NULL }, - { 0, NULL, NULL, NULL } + { 0, NULL, NULL, NULL } }; @@ -132,7 +132,7 @@ void proto_register_dcerpc_rras(void) { - static hf_register_info hf[] = { + static hf_register_info hf[] = { { &hf_rras_opnum, { "Operation", "rras.opnum", FT_UINT16, BASE_DEC, @@ -140,9 +140,9 @@ proto_register_dcerpc_rras(void) }; - static gint *ett[] = { - &ett_dcerpc_rras, - }; + static gint *ett[] = { + &ett_dcerpc_rras, + }; proto_dcerpc_rras = proto_register_protocol( @@ -150,7 +150,7 @@ proto_register_dcerpc_rras(void) proto_register_field_array(proto_dcerpc_rras, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + proto_register_subtree_array(ett, array_length(ett)); } @@ -164,3 +164,16 @@ proto_reg_handoff_dcerpc_rras(void) proto_dcerpc_rras, ett_dcerpc_rras, &uuid_dcerpc_rras, ver_dcerpc_rras, dcerpc_rras_dissectors, hf_rras_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-dcerpc-rs_acct.c b/epan/dissectors/packet-dcerpc-rs_acct.c index d57f6f2fe7..1693ee0c7b 100644 --- a/epan/dissectors/packet-dcerpc-rs_acct.c +++ b/epan/dissectors/packet-dcerpc-rs_acct.c @@ -106,13 +106,13 @@ rs_acct_dissect_get_projlist_rqst (tvbuff_t *tvb, int offset, static dcerpc_sub_dissector rs_acct_dissectors[] = { - { 0, "add", NULL, NULL}, - { 1, "delete", NULL, NULL}, - { 2, "rename", NULL, NULL}, - { 3, "lookup", rs_acct_dissect_lookup_rqst, NULL}, - { 4, "replace", NULL, NULL}, - { 5, "get_projlist", rs_acct_dissect_get_projlist_rqst, NULL}, - { 0, NULL, NULL, NULL } + { 0, "add", NULL, NULL}, + { 1, "delete", NULL, NULL}, + { 2, "rename", NULL, NULL}, + { 3, "lookup", rs_acct_dissect_lookup_rqst, NULL}, + { 4, "replace", NULL, NULL}, + { 5, "get_projlist", rs_acct_dissect_get_projlist_rqst, NULL}, + { 0, NULL, NULL, NULL } }; void @@ -151,3 +151,16 @@ proto_reg_handoff_rs_acct (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_acct, ett_rs_acct, &uuid_rs_acct, ver_rs_acct, rs_acct_dissectors, hf_rs_acct_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-ddtp.c b/epan/dissectors/packet-ddtp.c index 2a91594541..66f746826d 100644 --- a/epan/dissectors/packet-ddtp.c +++ b/epan/dissectors/packet-ddtp.c @@ -28,28 +28,28 @@ #include #include -#define DDTP_VERSION_ERROR 0 -#define DDTP_VERSION_4 1 -#define DDTP_VERSION_5 2 +#define DDTP_VERSION_ERROR 0 +#define DDTP_VERSION_4 1 +#define DDTP_VERSION_5 2 -#define DDTP_ENCRYPT_ERROR 0 -#define DDTP_ENCRYPT_PLAINTEXT 1 -#define DDTP_ENCRYPT_BLOWFISH 2 +#define DDTP_ENCRYPT_ERROR 0 +#define DDTP_ENCRYPT_PLAINTEXT 1 +#define DDTP_ENCRYPT_BLOWFISH 2 -#define DDTP_MESSAGE_ERROR 0 -#define DDTP_UPDATE_QUERY 1 -#define DDTP_UPDATE_REPLY 2 -#define DDTP_ALIVE_QUERY 3 -#define DDTP_ALIVE_REPLY 4 +#define DDTP_MESSAGE_ERROR 0 +#define DDTP_UPDATE_QUERY 1 +#define DDTP_UPDATE_REPLY 2 +#define DDTP_ALIVE_QUERY 3 +#define DDTP_ALIVE_REPLY 4 -#define DDTP_MARK_ONLINE 0 -#define DDTP_MARK_OFFLINE 1 +#define DDTP_MARK_ONLINE 0 +#define DDTP_MARK_OFFLINE 1 -#define DDTP_UPDATE_SUCCEEDED 0 -#define DDTP_UPDATE_FAILED 1 -#define DDTP_INVALID_PASSWORD 2 -#define DDTP_INVALID_ACCOUNT 3 -#define DDTP_INVALID_OPCODE 4 +#define DDTP_UPDATE_SUCCEEDED 0 +#define DDTP_UPDATE_FAILED 1 +#define DDTP_INVALID_PASSWORD 2 +#define DDTP_INVALID_ACCOUNT 3 +#define DDTP_INVALID_OPCODE 4 void proto_register_ddtp (void); void proto_reg_handoff_ddtp (void); @@ -68,7 +68,7 @@ static int ett_ddtp = -1; static expert_field ei_ddtp_msgtype = EI_INIT; -#define UDP_PORT_DDTP 1052 +#define UDP_PORT_DDTP 1052 /* * XXX - is 0 an invalid value? If so, should we remove it from this @@ -126,49 +126,49 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ return 0; if (try_val_to_str(tvb_get_ntohl(tvb, 0), vals_ddtp_version) == NULL) - return 0; + return 0; /* Indicate what kind of message this is. */ col_set_str (pinfo->cinfo, COL_PROTOCOL, "DDTP"); /* In case we throw an exception below. */ col_clear (pinfo->cinfo, COL_INFO); - ti = proto_tree_add_item(tree, proto_ddtp, tvb, 0, -1, ENC_NA); - ddtp_tree = proto_item_add_subtree(ti, ett_ddtp); + ti = proto_tree_add_item(tree, proto_ddtp, tvb, 0, -1, ENC_NA); + ddtp_tree = proto_item_add_subtree(ti, ett_ddtp); - proto_tree_add_item(ddtp_tree, hf_ddtp_version, tvb, 0, 4, ENC_BIG_ENDIAN); - proto_tree_add_item(ddtp_tree, hf_ddtp_encrypt, tvb, 4, 4, ENC_BIG_ENDIAN); - proto_tree_add_item(ddtp_tree, hf_ddtp_hostid, tvb, 8, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(ddtp_tree, hf_ddtp_version, tvb, 0, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(ddtp_tree, hf_ddtp_encrypt, tvb, 4, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(ddtp_tree, hf_ddtp_hostid, tvb, 8, 4, ENC_BIG_ENDIAN); if (tvb_get_ntohl(tvb, 4) == DDTP_ENCRYPT_PLAINTEXT) { - ti = proto_tree_add_item(ddtp_tree, hf_ddtp_msgtype, tvb, 12, 4, ENC_BIG_ENDIAN); - switch (tvb_get_ntohl(tvb, 12)) { - case DDTP_MESSAGE_ERROR : - col_set_str(pinfo->cinfo, COL_INFO, "Message Error"); - break; - case DDTP_UPDATE_QUERY : - col_set_str(pinfo->cinfo, COL_INFO, "Update Query"); - proto_tree_add_item(ddtp_tree, hf_ddtp_opcode, tvb, 16, 4, ENC_BIG_ENDIAN); - proto_tree_add_item(ddtp_tree, hf_ddtp_ipaddr, tvb, 20, 4, ENC_BIG_ENDIAN); - break; - case DDTP_UPDATE_REPLY : - col_set_str(pinfo->cinfo, COL_INFO, "Update Reply"); - proto_tree_add_item(ddtp_tree, hf_ddtp_status, tvb, 16, 4, ENC_BIG_ENDIAN); - break; - case DDTP_ALIVE_QUERY : - col_set_str(pinfo->cinfo, COL_INFO, "Alive Query"); - proto_tree_add_item(ddtp_tree, hf_ddtp_alive, tvb, 16, 4, ENC_BIG_ENDIAN); - break; - case DDTP_ALIVE_REPLY : - col_set_str(pinfo->cinfo, COL_INFO, "Alive Reply"); - proto_tree_add_item(ddtp_tree, hf_ddtp_alive, tvb, 16, 4, ENC_BIG_ENDIAN); - break; - default : - col_set_str(pinfo->cinfo, COL_INFO, "Unknown type"); - expert_add_info(pinfo, ti, &ei_ddtp_msgtype); - } + ti = proto_tree_add_item(ddtp_tree, hf_ddtp_msgtype, tvb, 12, 4, ENC_BIG_ENDIAN); + switch (tvb_get_ntohl(tvb, 12)) { + case DDTP_MESSAGE_ERROR : + col_set_str(pinfo->cinfo, COL_INFO, "Message Error"); + break; + case DDTP_UPDATE_QUERY : + col_set_str(pinfo->cinfo, COL_INFO, "Update Query"); + proto_tree_add_item(ddtp_tree, hf_ddtp_opcode, tvb, 16, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(ddtp_tree, hf_ddtp_ipaddr, tvb, 20, 4, ENC_BIG_ENDIAN); + break; + case DDTP_UPDATE_REPLY : + col_set_str(pinfo->cinfo, COL_INFO, "Update Reply"); + proto_tree_add_item(ddtp_tree, hf_ddtp_status, tvb, 16, 4, ENC_BIG_ENDIAN); + break; + case DDTP_ALIVE_QUERY : + col_set_str(pinfo->cinfo, COL_INFO, "Alive Query"); + proto_tree_add_item(ddtp_tree, hf_ddtp_alive, tvb, 16, 4, ENC_BIG_ENDIAN); + break; + case DDTP_ALIVE_REPLY : + col_set_str(pinfo->cinfo, COL_INFO, "Alive Reply"); + proto_tree_add_item(ddtp_tree, hf_ddtp_alive, tvb, 16, 4, ENC_BIG_ENDIAN); + break; + default : + col_set_str(pinfo->cinfo, COL_INFO, "Unknown type"); + expert_add_info(pinfo, ti, &ei_ddtp_msgtype); + } } else { - col_set_str(pinfo->cinfo, COL_INFO, "Encrypted payload"); + col_set_str(pinfo->cinfo, COL_INFO, "Encrypted payload"); } return tvb_length(tvb); } @@ -177,30 +177,30 @@ void proto_register_ddtp(void) { static hf_register_info hf_ddtp[] = { - { &hf_ddtp_version, - { "Version", "ddtp.version", FT_UINT32, BASE_DEC, VALS(vals_ddtp_version), 0x0, - NULL, HFILL }}, - { &hf_ddtp_encrypt, - { "Encryption", "ddtp.encrypt", FT_UINT32, BASE_DEC, VALS(vals_ddtp_encrypt), 0x0, - "Encryption type", HFILL }}, - { &hf_ddtp_hostid, - { "Hostid", "ddtp.hostid", FT_UINT32, BASE_DEC, NULL, 0x0, - "Host ID", HFILL }}, - { &hf_ddtp_msgtype, - { "Message type", "ddtp.msgtype", FT_UINT32, BASE_DEC, VALS(vals_ddtp_msgtype), 0x0, - NULL, HFILL }}, - { &hf_ddtp_opcode, - { "Opcode", "ddtp.opcode", FT_UINT32, BASE_DEC, VALS(vals_ddtp_opcode), 0x0, - "Update query opcode", HFILL }}, - { &hf_ddtp_ipaddr, - { "IP address", "ddtp.ipaddr", FT_IPv4, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_ddtp_status, - { "Status", "ddtp.status", FT_UINT32, BASE_DEC, VALS(vals_ddtp_status), 0x0, - "Update reply status", HFILL }}, - { &hf_ddtp_alive, - { "Dummy", "ddtp.alive", FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + { &hf_ddtp_version, + { "Version", "ddtp.version", FT_UINT32, BASE_DEC, VALS(vals_ddtp_version), 0x0, + NULL, HFILL }}, + { &hf_ddtp_encrypt, + { "Encryption", "ddtp.encrypt", FT_UINT32, BASE_DEC, VALS(vals_ddtp_encrypt), 0x0, + "Encryption type", HFILL }}, + { &hf_ddtp_hostid, + { "Hostid", "ddtp.hostid", FT_UINT32, BASE_DEC, NULL, 0x0, + "Host ID", HFILL }}, + { &hf_ddtp_msgtype, + { "Message type", "ddtp.msgtype", FT_UINT32, BASE_DEC, VALS(vals_ddtp_msgtype), 0x0, + NULL, HFILL }}, + { &hf_ddtp_opcode, + { "Opcode", "ddtp.opcode", FT_UINT32, BASE_DEC, VALS(vals_ddtp_opcode), 0x0, + "Update query opcode", HFILL }}, + { &hf_ddtp_ipaddr, + { "IP address", "ddtp.ipaddr", FT_IPv4, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_ddtp_status, + { "Status", "ddtp.status", FT_UINT32, BASE_DEC, VALS(vals_ddtp_status), 0x0, + "Update reply status", HFILL }}, + { &hf_ddtp_alive, + { "Dummy", "ddtp.alive", FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, }; static gint *ett[] = { &ett_ddtp }; @@ -212,7 +212,7 @@ proto_register_ddtp(void) expert_module_t* expert_ddtp; proto_ddtp = proto_register_protocol("Dynamic DNS Tools Protocol", - "DDTP", "ddtp"); + "DDTP", "ddtp"); proto_register_field_array(proto_ddtp, hf_ddtp, array_length(hf_ddtp)); proto_register_subtree_array(ett, array_length(ett)); expert_ddtp = expert_register_protocol(proto_ddtp); @@ -227,3 +227,16 @@ proto_reg_handoff_ddtp(void) ddtp_handle = new_create_dissector_handle(dissect_ddtp, proto_ddtp); dissector_add_uint("udp.port", UDP_PORT_DDTP, ddtp_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-dmx-test.c b/epan/dissectors/packet-dmx-test.c index 599e6e2319..cd50bf1a74 100644 --- a/epan/dissectors/packet-dmx-test.c +++ b/epan/dissectors/packet-dmx-test.c @@ -140,3 +140,16 @@ proto_register_dmx_test(void) proto_register_subtree_array(ett, array_length(ett)); register_dissector("dmx-test", dissect_dmx_test, proto_dmx_test); } + +/* + * 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-dmx.c b/epan/dissectors/packet-dmx.c index bf1a4c6773..ac12d72e36 100644 --- a/epan/dissectors/packet-dmx.c +++ b/epan/dissectors/packet-dmx.c @@ -134,3 +134,16 @@ proto_reg_handoff_dmx(void) dmx_sip_handle = find_dissector("dmx-sip"); 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-flexnet.c b/epan/dissectors/packet-flexnet.c index 0209de9015..7a9b47bd93 100644 --- a/epan/dissectors/packet-flexnet.c +++ b/epan/dissectors/packet-flexnet.c @@ -142,3 +142,16 @@ proto_reg_handoff_flexnet(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-gift.c b/epan/dissectors/packet-gift.c index 067607efc2..1e659e69a6 100644 --- a/epan/dissectors/packet-gift.c +++ b/epan/dissectors/packet-gift.c @@ -161,3 +161,16 @@ proto_reg_handoff_gift(void) gift_handle = create_dissector_handle(dissect_gift, proto_gift); dissector_add_uint("tcp.port", TCP_PORT_GIFT, gift_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-gmr1_dtap.c b/epan/dissectors/packet-gmr1_dtap.c index 9d8e7d58ea..15084d6e33 100644 --- a/epan/dissectors/packet-gmr1_dtap.c +++ b/epan/dissectors/packet-gmr1_dtap.c @@ -188,3 +188,16 @@ proto_reg_handoff_gmr1_dtap(void) gsm_dtap_handle = find_dissector("gsm_a_dtap"); } + +/* + * 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-gpef.c b/epan/dissectors/packet-gpef.c index 68b3dcc36f..6ec3cc1b50 100644 --- a/epan/dissectors/packet-gpef.c +++ b/epan/dissectors/packet-gpef.c @@ -139,37 +139,37 @@ void proto_register_gpef(void) { static hf_register_info hf[] = { - { &hf_gpef_keycount, - { "Key Count", "gpef.key_count", FT_UINT32, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { &hf_gpef_keycount, + { "Key Count", "gpef.key_count", FT_UINT32, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_gpef_efskey_length1, - { "Length1", "gpef.efskey.length1", FT_UINT32, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { &hf_gpef_efskey_length1, + { "Length1", "gpef.efskey.length1", FT_UINT32, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_gpef_efskey_length2, - { "Length2", "gpef.efskey.length2", FT_UINT32, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { &hf_gpef_efskey_length2, + { "Length2", "gpef.efskey.length2", FT_UINT32, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_gpef_efskey_sid_offset, - { "SID Offset", "gpef.efskey.sid_offset", FT_UINT32, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { &hf_gpef_efskey_sid_offset, + { "SID Offset", "gpef.efskey.sid_offset", FT_UINT32, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_gpef_efskey_cert_offset, - { "Cert Offset", "gpef.efskey.cert_offset", FT_UINT32, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { &hf_gpef_efskey_cert_offset, + { "Cert Offset", "gpef.efskey.cert_offset", FT_UINT32, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_gpef_efskey_cert_length, - { "Cert Length", "gpef.efskey.cert_length", FT_UINT32, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { &hf_gpef_efskey_cert_length, + { "Cert Length", "gpef.efskey.cert_length", FT_UINT32, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, - { &hf_gpef_efskey, - { "EfsKey", "gpef.efskey", FT_NONE, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_gpef_efskey, + { "EfsKey", "gpef.efskey", FT_NONE, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, - { &hf_gpef_efskey_certificate, - { "Certificate", "gpef.efskey.certificate", FT_NONE, BASE_NONE, NULL, - 0x0, NULL, HFILL }}, + { &hf_gpef_efskey_certificate, + { "Certificate", "gpef.efskey.certificate", FT_NONE, BASE_NONE, NULL, + 0x0, NULL, HFILL }}, }; @@ -184,3 +184,16 @@ proto_register_gpef(void) new_register_dissector("efsblob", dissect_gpef_efsblob, proto_gpef); } + +/* + * 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-h1.c b/epan/dissectors/packet-h1.c index c58be462ed..71ee74d5ee 100644 --- a/epan/dissectors/packet-h1.c +++ b/epan/dissectors/packet-h1.c @@ -51,10 +51,10 @@ static int hf_h1_empty = -1; static dissector_handle_t data_handle; -#define EMPTY_BLOCK 0xFF -#define OPCODE_BLOCK 0x01 -#define REQUEST_BLOCK 0x03 -#define RESPONSE_BLOCK 0x0F +#define EMPTY_BLOCK 0xFF +#define OPCODE_BLOCK 0x01 +#define REQUEST_BLOCK 0x03 +#define RESPONSE_BLOCK 0x0F static const value_string opcode_vals[] = { {3, "Write Request"}, @@ -128,110 +128,110 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ti = proto_tree_add_item (tree, proto_h1, tvb, offset, 16, ENC_NA); h1_tree = proto_item_add_subtree (ti, ett_h1); proto_tree_add_uint (h1_tree, hf_h1_header, tvb, offset, 2, - tvb_get_ntohs(tvb,offset)); + tvb_get_ntohs(tvb,offset)); proto_tree_add_uint (h1_tree, hf_h1_len, tvb, offset + 2, 1, - tvb_get_guint8(tvb,offset+2)); + tvb_get_guint8(tvb,offset+2)); } while (position < tvb_get_guint8(tvb,offset+2)) { switch (tvb_get_guint8(tvb,offset + position)) - { - case OPCODE_BLOCK: - if (h1_tree) - { - ti = proto_tree_add_uint (h1_tree, hf_h1_opfield, tvb, - offset + position, - tvb_get_guint8(tvb,offset+position+1), - tvb_get_guint8(tvb,offset+position)); - opcode_tree = proto_item_add_subtree (ti, ett_opcode); - proto_tree_add_uint (opcode_tree, hf_h1_oplen, tvb, - offset + position + 1, 1, - tvb_get_guint8(tvb,offset + position + 1)); - proto_tree_add_uint (opcode_tree, hf_h1_opcode, tvb, - offset + position + 2, 1, - tvb_get_guint8(tvb,offset + position + 2)); - } + { + case OPCODE_BLOCK: + if (h1_tree) + { + ti = proto_tree_add_uint (h1_tree, hf_h1_opfield, tvb, + offset + position, + tvb_get_guint8(tvb,offset+position+1), + tvb_get_guint8(tvb,offset+position)); + opcode_tree = proto_item_add_subtree (ti, ett_opcode); + proto_tree_add_uint (opcode_tree, hf_h1_oplen, tvb, + offset + position + 1, 1, + tvb_get_guint8(tvb,offset + position + 1)); + proto_tree_add_uint (opcode_tree, hf_h1_opcode, tvb, + offset + position + 2, 1, + tvb_get_guint8(tvb,offset + position + 2)); + } - col_append_str (pinfo->cinfo, COL_INFO, - val_to_str (tvb_get_guint8(tvb,offset + position + 2), - opcode_vals,"Unknown Opcode (0x%2.2x)")); - break; - case REQUEST_BLOCK: - if (h1_tree) - { - ti = proto_tree_add_uint (h1_tree, hf_h1_requestblock, tvb, - offset + position, - tvb_get_guint8(tvb,offset + position + 1), - tvb_get_guint8(tvb,offset + position)); - org_tree = proto_item_add_subtree (ti, ett_org); - proto_tree_add_uint (org_tree, hf_h1_requestlen, tvb, - offset + position + 1, 1, - tvb_get_guint8(tvb,offset + position+1)); - proto_tree_add_uint (org_tree, hf_h1_org, tvb, - offset + position + 2, 1, - tvb_get_guint8(tvb,offset + position+2)); - proto_tree_add_uint (org_tree, hf_h1_dbnr, tvb, - offset + position + 3, 1, - tvb_get_guint8(tvb,offset + position+3)); - proto_tree_add_uint (org_tree, hf_h1_dwnr, tvb, - offset + position + 4, 2, - tvb_get_ntohs(tvb,offset+position+4)); - proto_tree_add_int (org_tree, hf_h1_dlen, tvb, - offset + position + 6, 2, - tvb_get_ntohs(tvb,offset+position+6)); - } - col_append_fstr (pinfo->cinfo, COL_INFO, " %s %d", - val_to_str (tvb_get_guint8(tvb,offset + position + 2), - org_vals,"Unknown Type (0x%2.2x)"), - tvb_get_guint8(tvb,offset + position + 3)); - col_append_fstr (pinfo->cinfo, COL_INFO, " DW %d", - tvb_get_ntohs(tvb,offset+position+4)); - col_append_fstr (pinfo->cinfo, COL_INFO, " Count %d", - tvb_get_ntohs(tvb,offset+position+6)); - break; - case RESPONSE_BLOCK: - if (h1_tree) - { - ti = proto_tree_add_uint (h1_tree, hf_h1_response, tvb, - offset + position, - tvb_get_guint8(tvb,offset + position + 1), - tvb_get_guint8(tvb,offset + position)); - response_tree = proto_item_add_subtree (ti, ett_response); - proto_tree_add_uint (response_tree, hf_h1_response_len, tvb, - offset + position + 1, 1, - tvb_get_guint8(tvb,offset + position+1)); - proto_tree_add_uint (response_tree, hf_h1_response_value, tvb, - offset + position + 2, 1, - tvb_get_guint8(tvb,offset + position+2)); - } - col_append_fstr (pinfo->cinfo, COL_INFO, " %s", - val_to_str (tvb_get_guint8(tvb,offset + position + 2), - returncode_vals,"Unknown Returncode (0x%2.2x")); - break; - case EMPTY_BLOCK: - if (h1_tree) - { - ti = proto_tree_add_uint (h1_tree, hf_h1_empty, tvb, - offset + position, - tvb_get_guint8(tvb,offset + position + 1), - tvb_get_guint8(tvb,offset + position)); - empty_tree = proto_item_add_subtree (ti, ett_empty); + col_append_str (pinfo->cinfo, COL_INFO, + val_to_str (tvb_get_guint8(tvb,offset + position + 2), + opcode_vals,"Unknown Opcode (0x%2.2x)")); + break; + case REQUEST_BLOCK: + if (h1_tree) + { + ti = proto_tree_add_uint (h1_tree, hf_h1_requestblock, tvb, + offset + position, + tvb_get_guint8(tvb,offset + position + 1), + tvb_get_guint8(tvb,offset + position)); + org_tree = proto_item_add_subtree (ti, ett_org); + proto_tree_add_uint (org_tree, hf_h1_requestlen, tvb, + offset + position + 1, 1, + tvb_get_guint8(tvb,offset + position+1)); + proto_tree_add_uint (org_tree, hf_h1_org, tvb, + offset + position + 2, 1, + tvb_get_guint8(tvb,offset + position+2)); + proto_tree_add_uint (org_tree, hf_h1_dbnr, tvb, + offset + position + 3, 1, + tvb_get_guint8(tvb,offset + position+3)); + proto_tree_add_uint (org_tree, hf_h1_dwnr, tvb, + offset + position + 4, 2, + tvb_get_ntohs(tvb,offset+position+4)); + proto_tree_add_int (org_tree, hf_h1_dlen, tvb, + offset + position + 6, 2, + tvb_get_ntohs(tvb,offset+position+6)); + } + col_append_fstr (pinfo->cinfo, COL_INFO, " %s %d", + val_to_str (tvb_get_guint8(tvb,offset + position + 2), + org_vals,"Unknown Type (0x%2.2x)"), + tvb_get_guint8(tvb,offset + position + 3)); + col_append_fstr (pinfo->cinfo, COL_INFO, " DW %d", + tvb_get_ntohs(tvb,offset+position+4)); + col_append_fstr (pinfo->cinfo, COL_INFO, " Count %d", + tvb_get_ntohs(tvb,offset+position+6)); + break; + case RESPONSE_BLOCK: + if (h1_tree) + { + ti = proto_tree_add_uint (h1_tree, hf_h1_response, tvb, + offset + position, + tvb_get_guint8(tvb,offset + position + 1), + tvb_get_guint8(tvb,offset + position)); + response_tree = proto_item_add_subtree (ti, ett_response); + proto_tree_add_uint (response_tree, hf_h1_response_len, tvb, + offset + position + 1, 1, + tvb_get_guint8(tvb,offset + position+1)); + proto_tree_add_uint (response_tree, hf_h1_response_value, tvb, + offset + position + 2, 1, + tvb_get_guint8(tvb,offset + position+2)); + } + col_append_fstr (pinfo->cinfo, COL_INFO, " %s", + val_to_str (tvb_get_guint8(tvb,offset + position + 2), + returncode_vals,"Unknown Returncode (0x%2.2x")); + break; + case EMPTY_BLOCK: + if (h1_tree) + { + ti = proto_tree_add_uint (h1_tree, hf_h1_empty, tvb, + offset + position, + tvb_get_guint8(tvb,offset + position + 1), + tvb_get_guint8(tvb,offset + position)); + empty_tree = proto_item_add_subtree (ti, ett_empty); - proto_tree_add_uint (empty_tree, hf_h1_empty_len, tvb, - offset + position + 1, 1, - tvb_get_guint8(tvb,offset + position+1)); - } - break; - default: - /* This is not a valid telegram. So cancel dissection + proto_tree_add_uint (empty_tree, hf_h1_empty_len, tvb, + offset + position + 1, 1, + tvb_get_guint8(tvb,offset + position+1)); + } + break; + default: + /* This is not a valid telegram. So cancel dissection and try the next dissector */ return FALSE; - } - if (tvb_get_guint8(tvb,offset + position + 1) < 1) - THROW(ReportedBoundsError); - position += tvb_get_guint8(tvb,offset + position + 1); /* Goto next section */ - } /* ..while */ + } + if (tvb_get_guint8(tvb,offset + position + 1) < 1) + THROW(ReportedBoundsError); + position += tvb_get_guint8(tvb,offset + position + 1); /* Goto next section */ + } /* ..while */ next_tvb = tvb_new_subset_remaining(tvb, offset+tvb_get_guint8(tvb,offset+2)); call_dissector(data_handle,next_tvb, pinfo, tree); @@ -310,3 +310,16 @@ proto_reg_handoff_h1(void) heur_dissector_add("tcp", dissect_h1, proto_h1); 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-hpext.c b/epan/dissectors/packet-hpext.c index c39d8ebaea..3b16c83453 100644 --- a/epan/dissectors/packet-hpext.c +++ b/epan/dissectors/packet-hpext.c @@ -144,3 +144,16 @@ proto_reg_handoff_hpext(void) dissector_add_uint("llc.dsap", SAP_HPEXT, hpext_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-icp.c b/epan/dissectors/packet-icp.c index c5fda78086..fb64c0ea10 100644 --- a/epan/dissectors/packet-icp.c +++ b/epan/dissectors/packet-icp.c @@ -62,43 +62,43 @@ static gint ett_icp_payload = -1; #define CODE_ICP_OP_HIT_OBJ 23 static const value_string opcode_vals[] = { -{ CODE_ICP_OP_INVALID , "ICP_INVALID" }, -{ CODE_ICP_OP_QUERY , "ICP_QUERY" }, -{ CODE_ICP_OP_HIT , "ICP_HIT" }, -{ CODE_ICP_OP_MISS , "ICP_MISS" }, -{ CODE_ICP_OP_ERR , "ICP_ERR" }, -{ CODE_ICP_OP_SEND, "ICP_SEND" }, -{ CODE_ICP_OP_SENDA, "ICP_SENDA"}, -{ CODE_ICP_OP_DATABEG, "ICP_DATABEG"}, -{ CODE_ICP_OP_DATA, "ICP_DATA"}, -{ CODE_ICP_OP_DATAEND, "ICP_DATA_END"}, -{ CODE_ICP_OP_SECHO , "ICP_SECHO"}, -{ CODE_ICP_OP_DECHO , "ICP_DECHO"}, -{ CODE_ICP_OP_MISS_NOFETCH , "ICP_MISS_NOFETCH"}, -{ CODE_ICP_OP_DENIED , "ICP_DENIED"}, -{ CODE_ICP_OP_HIT_OBJ , "ICP_HIT_OBJ"}, +{ CODE_ICP_OP_INVALID , "ICP_INVALID" }, +{ CODE_ICP_OP_QUERY , "ICP_QUERY" }, +{ CODE_ICP_OP_HIT , "ICP_HIT" }, +{ CODE_ICP_OP_MISS , "ICP_MISS" }, +{ CODE_ICP_OP_ERR , "ICP_ERR" }, +{ CODE_ICP_OP_SEND, "ICP_SEND" }, +{ CODE_ICP_OP_SENDA, "ICP_SENDA"}, +{ CODE_ICP_OP_DATABEG, "ICP_DATABEG"}, +{ CODE_ICP_OP_DATA, "ICP_DATA"}, +{ CODE_ICP_OP_DATAEND, "ICP_DATA_END"}, +{ CODE_ICP_OP_SECHO , "ICP_SECHO"}, +{ CODE_ICP_OP_DECHO , "ICP_DECHO"}, +{ CODE_ICP_OP_MISS_NOFETCH , "ICP_MISS_NOFETCH"}, +{ CODE_ICP_OP_DENIED , "ICP_DENIED"}, +{ CODE_ICP_OP_HIT_OBJ , "ICP_HIT_OBJ"}, { 0, NULL} }; static void dissect_icp_payload(tvbuff_t *tvb, int offset, - proto_tree *pload_tree, guint8 opcode) + proto_tree *pload_tree, guint8 opcode) { - gint stringlength; - guint16 objectlength; + gint stringlength; + guint16 objectlength; - switch(opcode) - { + switch(opcode) + { case CODE_ICP_OP_QUERY: /* 4 byte requester host address */ proto_tree_add_text(pload_tree, tvb,offset,4, - "Requester Host Address %s", - tvb_ip_to_str(tvb, offset)); + "Requester Host Address %s", + tvb_ip_to_str(tvb, offset)); offset += 4; /* null terminated URL */ stringlength = tvb_strsize(tvb, offset); proto_tree_add_text(pload_tree, tvb, offset, stringlength, - "URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII)); + "URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII)); break; case CODE_ICP_OP_SECHO: @@ -110,14 +110,14 @@ static void dissect_icp_payload(tvbuff_t *tvb, int offset, case CODE_ICP_OP_DENIED: stringlength = tvb_strsize(tvb, offset); proto_tree_add_text(pload_tree, tvb, offset, stringlength, - "URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII)); + "URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII)); break; case CODE_ICP_OP_HIT_OBJ: /* null terminated URL */ stringlength = tvb_strsize(tvb, offset); proto_tree_add_text(pload_tree, tvb, offset, stringlength, - "URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII)); + "URL: %s", tvb_get_string_enc(wmem_packet_scope(), tvb, offset, stringlength, ENC_ASCII)); offset += stringlength; /* 2 byte object size */ @@ -131,98 +131,98 @@ static void dissect_icp_payload(tvbuff_t *tvb, int offset, if (objectlength > tvb_reported_length_remaining(tvb, offset)) { proto_tree_add_text(pload_tree, tvb,offset,0, - "Packet is fragmented, rest of object is in next udp packet"); + "Packet is fragmented, rest of object is in next udp packet"); } break; default: break; - } + } } static void dissect_icp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *icp_tree , *payload_tree; - proto_item *ti; - guint8 opcode; - guint16 message_length; - guint32 request_number; - guint32 options; - guint32 option_data; - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICP"); - col_clear(pinfo->cinfo, COL_INFO); - - opcode=tvb_get_guint8(tvb, 0); - message_length=tvb_get_ntohs(tvb, 2); - request_number=tvb_get_ntohl(tvb, 4); + proto_tree *icp_tree , *payload_tree; + proto_item *ti; + guint8 opcode; + guint16 message_length; + guint32 request_number; + guint32 options; + guint32 option_data; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICP"); + col_clear(pinfo->cinfo, COL_INFO); + + opcode=tvb_get_guint8(tvb, 0); + message_length=tvb_get_ntohs(tvb, 2); + request_number=tvb_get_ntohl(tvb, 4); + + col_add_fstr(pinfo->cinfo,COL_INFO,"Opcode: %s (%u), Req Nr: %u", + val_to_str_const(opcode, opcode_vals, "Unknown"), opcode, + request_number); + + if (tree) + { - col_add_fstr(pinfo->cinfo,COL_INFO,"Opcode: %s (%u), Req Nr: %u", - val_to_str_const(opcode, opcode_vals, "Unknown"), opcode, - request_number); + ti = proto_tree_add_item(tree,proto_icp, tvb, 0, message_length, ENC_NA); + icp_tree = proto_item_add_subtree(ti, ett_icp); - if (tree) - { + proto_tree_add_uint(icp_tree,hf_icp_opcode, tvb, 0, 1, opcode); - ti = proto_tree_add_item(tree,proto_icp, tvb, 0, message_length, ENC_NA); - icp_tree = proto_item_add_subtree(ti, ett_icp); + proto_tree_add_item(icp_tree,hf_icp_version, tvb, 1, 1, ENC_BIG_ENDIAN); - proto_tree_add_uint(icp_tree,hf_icp_opcode, tvb, 0, 1, opcode); + proto_tree_add_uint(icp_tree,hf_icp_length, tvb, 2, 2, message_length); - proto_tree_add_item(icp_tree,hf_icp_version, tvb, 1, 1, ENC_BIG_ENDIAN); + proto_tree_add_uint(icp_tree,hf_icp_request_nr, tvb, 4, 4, + request_number); - proto_tree_add_uint(icp_tree,hf_icp_length, tvb, 2, 2, message_length); + options=tvb_get_ntohl(tvb, 8); + if ( (opcode == CODE_ICP_OP_QUERY) && ((options & 0x80000000 ) != 0) ) + { + proto_tree_add_text(icp_tree, tvb,8,4, + "option: ICP_FLAG_HIT_OBJ"); + } + if ( (opcode == CODE_ICP_OP_QUERY)&& ((options & 0x40000000 ) != 0) ) + { + proto_tree_add_text(icp_tree, tvb,8,4, + "option:ICP_FLAG_SRC_RTT"); + } + if ((opcode != CODE_ICP_OP_QUERY)&& ((options & 0x40000000 ) != 0)) + { + option_data=tvb_get_ntohl(tvb, 12); + proto_tree_add_text(icp_tree, tvb,8,8, + "option: ICP_FLAG_SCR_RTT RTT=%u", + option_data & 0x0000ffff); + } - proto_tree_add_uint(icp_tree,hf_icp_request_nr, tvb, 4, 4, - request_number); + proto_tree_add_text(icp_tree, tvb, 16, 4, + "Sender Host IP address %s", + tvb_ip_to_str(tvb, 16)); - options=tvb_get_ntohl(tvb, 8); - if ( (opcode == CODE_ICP_OP_QUERY) && ((options & 0x80000000 ) != 0) ) - { - proto_tree_add_text(icp_tree, tvb,8,4, - "option: ICP_FLAG_HIT_OBJ"); - } - if ( (opcode == CODE_ICP_OP_QUERY)&& ((options & 0x40000000 ) != 0) ) - { - proto_tree_add_text(icp_tree, tvb,8,4, - "option:ICP_FLAG_SRC_RTT"); - } - if ((opcode != CODE_ICP_OP_QUERY)&& ((options & 0x40000000 ) != 0)) - { - option_data=tvb_get_ntohl(tvb, 12); - proto_tree_add_text(icp_tree, tvb,8,8, - "option: ICP_FLAG_SCR_RTT RTT=%u", - option_data & 0x0000ffff); + payload_tree = proto_tree_add_subtree(icp_tree, tvb, + 20, message_length - 20, + ett_icp_payload, NULL, "Payload"); + dissect_icp_payload(tvb, 20, payload_tree, opcode); } - - proto_tree_add_text(icp_tree, tvb, 16, 4, - "Sender Host IP address %s", - tvb_ip_to_str(tvb, 16)); - - payload_tree = proto_tree_add_subtree(icp_tree, tvb, - 20, message_length - 20, - ett_icp_payload, NULL, "Payload"); - dissect_icp_payload(tvb, 20, payload_tree, opcode); - } } void proto_register_icp(void) { static hf_register_info hf[] = { { &hf_icp_opcode, - { "Opcode", "icp.opcode", FT_UINT8, BASE_HEX, VALS(opcode_vals), - 0x0, NULL, HFILL }}, + { "Opcode", "icp.opcode", FT_UINT8, BASE_HEX, VALS(opcode_vals), + 0x0, NULL, HFILL }}, { &hf_icp_version, - { "Version", "icp.version", FT_UINT8, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "Version", "icp.version", FT_UINT8, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, { &hf_icp_length, - { "Length", "icp.length", FT_UINT16, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "Length", "icp.length", FT_UINT16, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, { &hf_icp_request_nr, - { "Request Number", "icp.nr", FT_UINT32, BASE_DEC, NULL, - 0x0, NULL, HFILL }}, + { "Request Number", "icp.nr", FT_UINT32, BASE_DEC, NULL, + 0x0, NULL, HFILL }}, }; static gint *ett[] = { &ett_icp, @@ -230,7 +230,7 @@ proto_register_icp(void) }; proto_icp = proto_register_protocol("Internet Cache Protocol", - "ICP", "icp"); + "ICP", "icp"); proto_register_field_array(proto_icp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } @@ -243,3 +243,16 @@ proto_reg_handoff_icp(void) icp_handle = create_dissector_handle(dissect_icp, proto_icp); dissector_add_uint("udp.port", UDP_PORT_ICP, icp_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-idp.c b/epan/dissectors/packet-idp.c index f914f2cad1..9029119e1e 100644 --- a/epan/dissectors/packet-idp.c +++ b/epan/dissectors/packet-idp.c @@ -208,7 +208,20 @@ proto_reg_handoff_idp(void) idp_handle = create_dissector_handle(dissect_idp, proto_idp); dissector_add_uint("ethertype", ETHERTYPE_XNS_IDP, idp_handle); - dissector_add_uint("chdlc.protocol", ETHERTYPE_XNS_IDP, idp_handle); + dissector_add_uint("chdlc.protocol", ETHERTYPE_XNS_IDP, idp_handle); 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-ieee802a.c b/epan/dissectors/packet-ieee802a.c index 4de4d6b53a..ffb1cf64d7 100644 --- a/epan/dissectors/packet-ieee802a.c +++ b/epan/dissectors/packet-ieee802a.c @@ -58,7 +58,7 @@ static GHashTable *oui_info_table = NULL; */ void ieee802a_add_oui(guint32 oui, const char *table_name, const char *table_ui_name, - hf_register_info *hf_item) + hf_register_info *hf_item) { oui_info_t *new_info; @@ -147,12 +147,12 @@ proto_register_ieee802a(void) { static hf_register_info hf[] = { { &hf_ieee802a_oui, - { "Organization Code", "ieee802a.oui", FT_UINT24, BASE_HEX, - NULL, 0x0, NULL, HFILL }}, + { "Organization Code", "ieee802a.oui", FT_UINT24, BASE_HEX, + NULL, 0x0, NULL, HFILL }}, { &hf_ieee802a_pid, - { "Protocol ID", "ieee802a.pid", FT_UINT16, BASE_HEX, - NULL, 0x0, NULL, HFILL }} + { "Protocol ID", "ieee802a.pid", FT_UINT16, BASE_HEX, + NULL, 0x0, NULL, HFILL }} }; static gint *ett[] = { &ett_ieee802a, @@ -189,3 +189,16 @@ proto_reg_handoff_ieee802a(void) if (oui_info_table != NULL) g_hash_table_foreach(oui_info_table, register_hf, NULL); } + +/* + * 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-isl.c b/epan/dissectors/packet-isl.c index d93b2d81ce..fecfe7e054 100644 --- a/epan/dissectors/packet-isl.c +++ b/epan/dissectors/packet-isl.c @@ -74,17 +74,17 @@ static int hf_isl_trailer = -1; static gint ett_isl = -1; static gint ett_isl_dst = -1; -#define ISL_HEADER_SIZE 26 +#define ISL_HEADER_SIZE 26 -#define TYPE_ETHER 0x0 -#define TYPE_TR 0x1 -#define TYPE_FDDI 0x2 -#define TYPE_ATM 0x3 +#define TYPE_ETHER 0x0 +#define TYPE_TR 0x1 +#define TYPE_FDDI 0x2 +#define TYPE_ATM 0x3 -#define USER_PRIORITY_NORMAL 0x0 -#define USER_PRIORITY_1 0x1 -#define USER_PRIORITY_2 0x2 -#define USER_PRIORITY_HIGHEST 0x3 +#define USER_PRIORITY_NORMAL 0x0 +#define USER_PRIORITY_1 0x1 +#define USER_PRIORITY_2 0x2 +#define USER_PRIORITY_HIGHEST 0x3 static dissector_handle_t eth_withfcs_handle; static dissector_handle_t tr_handle; @@ -105,12 +105,12 @@ capture_isl(const guchar *pd, int offset, int len, packet_counts *ld) switch (type) { case TYPE_ETHER: - offset += 14+12; /* skip the header */ + offset += 14+12; /* skip the header */ capture_eth(pd, offset, len, ld); break; case TYPE_TR: - offset += 14+17; /* skip the header */ + offset += 14+17; /* skip the header */ capture_tr(pd, offset, len, ld); break; @@ -121,24 +121,24 @@ capture_isl(const guchar *pd, int offset, int len, packet_counts *ld) } static const value_string type_vals[] = { - {TYPE_ETHER, "Ethernet"}, - {TYPE_TR, "Token-Ring"}, - {TYPE_FDDI, "FDDI"}, - {TYPE_ATM, "ATM"}, - {0, NULL} + {TYPE_ETHER, "Ethernet"}, + {TYPE_TR, "Token-Ring"}, + {TYPE_FDDI, "FDDI"}, + {TYPE_ATM, "ATM"}, + {0, NULL} }; static const value_string user_vals[] = { - {USER_PRIORITY_NORMAL, "Normal Priority"}, - {USER_PRIORITY_1, "Priority 1"}, - {USER_PRIORITY_2, "Priority 2"}, - {USER_PRIORITY_HIGHEST, "Highest Priority"}, - {0, NULL} + {USER_PRIORITY_NORMAL, "Normal Priority"}, + {USER_PRIORITY_1, "Priority 1"}, + {USER_PRIORITY_2, "Priority 2"}, + {USER_PRIORITY_HIGHEST, "Highest Priority"}, + {0, NULL} }; static const true_false_string explorer_tfs = { - "Explorer frame", - "Data frame" + "Explorer frame", + "Data frame" }; void @@ -163,7 +163,7 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len) if (tree) { ti = proto_tree_add_protocol_format(tree, proto_isl, tvb, 0, ISL_HEADER_SIZE, - "ISL"); + "ISL"); fh_tree = proto_item_add_subtree(ti, ett_isl); ti = proto_tree_add_item(fh_tree, hf_isl_dst, tvb, 0, 6, ENC_NA); @@ -204,17 +204,17 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len) CATCH_BOUNDS_ERRORS { /* Either: - the packet doesn't have "length" bytes worth of - captured data left in it - or it may not even have - "length" bytes worth of data in it, period - - so the "tvb_new_subset()" creating "payload_tvb" - threw an exception + the packet doesn't have "length" bytes worth of + captured data left in it - or it may not even have + "length" bytes worth of data in it, period - + so the "tvb_new_subset()" creating "payload_tvb" + threw an exception or - the packet has exactly "length" bytes worth of - captured data left in it, so the "tvb_new_subset_remaining()" - creating "trailer_tvb" threw an exception. + the packet has exactly "length" bytes worth of + captured data left in it, so the "tvb_new_subset_remaining()" + creating "trailer_tvb" threw an exception. In either case, this means that all the data in the frame is within the length value, so we give all the data to the @@ -242,7 +242,7 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len) proto_tree_add_item(fh_tree, hf_isl_hsa, payload_tvb, 3, 3, ENC_BIG_ENDIAN); } col_add_fstr(pinfo->cinfo, COL_INFO, "VLAN ID: %u", - tvb_get_ntohs(tvb, 20) >> 1); + tvb_get_ntohs(tvb, 20) >> 1); if (tree) { proto_tree_add_item(fh_tree, hf_isl_vlan_id, payload_tvb, 6, 2, ENC_BIG_ENDIAN); proto_tree_add_item(fh_tree, hf_isl_bpdu, payload_tvb, 6, 2, ENC_BIG_ENDIAN); @@ -290,10 +290,10 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len) restoring the protocol value that was in effect before we called the subdissector. - 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(next_tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE); pinfo->current_proto = saved_proto; @@ -331,81 +331,80 @@ void proto_register_isl(void) { static hf_register_info hf[] = { - { &hf_isl_dst, - { "Destination", "isl.dst", FT_ETHER, BASE_NONE, NULL, 0x0, - "Destination Address", HFILL }}, - { &hf_isl_type, - { "Type", "isl.type", FT_UINT8, BASE_DEC, - VALS(type_vals), 0xF0, NULL, HFILL }}, - { &hf_isl_user_eth, - { "User", "isl.user_eth", FT_UINT8, BASE_DEC, - VALS(user_vals), 0x03, "Priority while passing through switch", HFILL }}, - { &hf_isl_user, - { "User", "isl.user", FT_UINT8, BASE_HEX, NULL, 0x0F, - "User-defined bits", HFILL }}, - { &hf_isl_src, - { "Source", "isl.src", FT_ETHER, BASE_NONE, NULL, 0x0, - "Source Hardware Address", HFILL }}, - { &hf_isl_addr, - { "Source or Destination Address", "isl.addr", FT_ETHER, BASE_NONE, NULL, 0x0, - "Source or Destination Hardware Address", HFILL }}, - { &hf_isl_len, - { "Length", "isl.len", FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, - { &hf_isl_hsa, - { "HSA", "isl.hsa", FT_UINT24, BASE_HEX, NULL, 0x0, - "High bits of source address", HFILL }}, - { &hf_isl_dsap, - { "DSAP", "isl.dsap", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_isl_ssap, - { "SSAP", "isl.ssap", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_isl_control, - { "Control", "isl.control", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - { &hf_isl_vlan_id, - { "VLAN ID", "isl.vlan_id", FT_UINT16, BASE_DEC, NULL, - 0xFFFE, "Virtual LAN ID (Color)", HFILL }}, - { &hf_isl_bpdu, - { "BPDU/CDP/VTP", "isl.bpdu", FT_BOOLEAN, 16, - TFS(&tfs_yes_no), 0x0001, "BPDU/CDP/VTP indicator", HFILL }}, - { &hf_isl_index, - { "Index", "isl.index", FT_UINT16, BASE_DEC, NULL, 0x0, - "Port index of packet source", HFILL }}, + { &hf_isl_dst, + { "Destination", "isl.dst", FT_ETHER, BASE_NONE, NULL, 0x0, + "Destination Address", HFILL }}, + { &hf_isl_type, + { "Type", "isl.type", FT_UINT8, BASE_DEC, + VALS(type_vals), 0xF0, NULL, HFILL }}, + { &hf_isl_user_eth, + { "User", "isl.user_eth", FT_UINT8, BASE_DEC, + VALS(user_vals), 0x03, "Priority while passing through switch", HFILL }}, + { &hf_isl_user, + { "User", "isl.user", FT_UINT8, BASE_HEX, NULL, 0x0F, + "User-defined bits", HFILL }}, + { &hf_isl_src, + { "Source", "isl.src", FT_ETHER, BASE_NONE, NULL, 0x0, + "Source Hardware Address", HFILL }}, + { &hf_isl_addr, + { "Source or Destination Address", "isl.addr", FT_ETHER, BASE_NONE, NULL, 0x0, + "Source or Destination Hardware Address", HFILL }}, + { &hf_isl_len, + { "Length", "isl.len", FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, + { &hf_isl_hsa, + { "HSA", "isl.hsa", FT_UINT24, BASE_HEX, NULL, 0x0, + "High bits of source address", HFILL }}, + { &hf_isl_dsap, + { "DSAP", "isl.dsap", FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_isl_ssap, + { "SSAP", "isl.ssap", FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_isl_control, + { "Control", "isl.control", FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + { &hf_isl_vlan_id, + { "VLAN ID", "isl.vlan_id", FT_UINT16, BASE_DEC, NULL, + 0xFFFE, "Virtual LAN ID (Color)", HFILL }}, + { &hf_isl_bpdu, + { "BPDU/CDP/VTP", "isl.bpdu", FT_BOOLEAN, 16, + TFS(&tfs_yes_no), 0x0001, "BPDU/CDP/VTP indicator", HFILL }}, + { &hf_isl_index, + { "Index", "isl.index", FT_UINT16, BASE_DEC, NULL, 0x0, + "Port index of packet source", HFILL }}, #if 0 - { &hf_isl_crc, - { "CRC", "isl.crc", FT_UINT32, BASE_HEX, NULL, 0x0, - "CRC field of encapsulated frame", HFILL }}, + { &hf_isl_crc, + { "CRC", "isl.crc", FT_UINT32, BASE_HEX, NULL, 0x0, + "CRC field of encapsulated frame", HFILL }}, #endif - { &hf_isl_src_vlan_id, - { "Source VLAN ID", "isl.src_vlan_id", FT_UINT16, BASE_DEC, NULL, - 0xFFFE, "Source Virtual LAN ID (Color)", HFILL }}, - { &hf_isl_explorer, - { "Explorer", "isl.explorer", FT_BOOLEAN, 16, - TFS(&explorer_tfs), 0x0001, NULL, HFILL }}, - { &hf_isl_dst_route_descriptor, - { "Destination route descriptor", "isl.dst_route_desc", - FT_UINT16, BASE_HEX, NULL, 0x0, - "Route descriptor to be used for forwarding", HFILL }}, - { &hf_isl_src_route_descriptor, - { "Source-route descriptor", "isl.src_route_desc", - FT_UINT16, BASE_HEX, NULL, 0x0, - "Route descriptor to be used for source learning", HFILL }}, - { &hf_isl_fcs_not_incl, - { "FCS Not Included", "isl.fcs_not_incl", FT_BOOLEAN, 9, - NULL, 0x40, NULL, HFILL }}, - { &hf_isl_esize, - { "Esize", "isl.esize", FT_UINT8, BASE_DEC, NULL, - 0x3F, "Frame size for frames less than 64 bytes", HFILL }}, - { &hf_isl_trailer, - { "Trailer", "isl.trailer", FT_BYTES, BASE_NONE, NULL, 0x0, - "Ethernet Trailer or Checksum", HFILL }}, - + { &hf_isl_src_vlan_id, + { "Source VLAN ID", "isl.src_vlan_id", FT_UINT16, BASE_DEC, NULL, + 0xFFFE, "Source Virtual LAN ID (Color)", HFILL }}, + { &hf_isl_explorer, + { "Explorer", "isl.explorer", FT_BOOLEAN, 16, + TFS(&explorer_tfs), 0x0001, NULL, HFILL }}, + { &hf_isl_dst_route_descriptor, + { "Destination route descriptor", "isl.dst_route_desc", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Route descriptor to be used for forwarding", HFILL }}, + { &hf_isl_src_route_descriptor, + { "Source-route descriptor", "isl.src_route_desc", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Route descriptor to be used for source learning", HFILL }}, + { &hf_isl_fcs_not_incl, + { "FCS Not Included", "isl.fcs_not_incl", FT_BOOLEAN, 9, + NULL, 0x40, NULL, HFILL }}, + { &hf_isl_esize, + { "Esize", "isl.esize", FT_UINT8, BASE_DEC, NULL, + 0x3F, "Frame size for frames less than 64 bytes", HFILL }}, + { &hf_isl_trailer, + { "Trailer", "isl.trailer", FT_BYTES, BASE_NONE, NULL, 0x0, + "Ethernet Trailer or Checksum", HFILL }}, }; static gint *ett[] = { - &ett_isl, - &ett_isl_dst, + &ett_isl, + &ett_isl_dst, }; proto_isl = proto_register_protocol("Cisco ISL", "ISL", "isl"); @@ -423,3 +422,16 @@ proto_reg_handoff_isl(void) tr_handle = find_dissector("tr"); 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-jmirror.c b/epan/dissectors/packet-jmirror.c index bb6831b082..e4a9532bd3 100644 --- a/epan/dissectors/packet-jmirror.c +++ b/epan/dissectors/packet-jmirror.c @@ -224,3 +224,16 @@ proto_reg_handoff_jmirror(void) /* Register as a normal IP dissector with default UDP port 30030 */ dissector_add_uint("udp.port", jmirror_udp_port, jmirror_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-kadm5.c b/epan/dissectors/packet-kadm5.c index 63f5d90fed..d0b1a23bf1 100644 --- a/epan/dissectors/packet-kadm5.c +++ b/epan/dissectors/packet-kadm5.c @@ -34,16 +34,16 @@ void proto_register_kadm5(void); void proto_reg_handoff_kadm5(void); #define KADM5_PROGRAM 2112 -#define KADM5PROC_NULL 0 -#define KADM5PROC_CREATE_PRINCIPAL 1 -#define KADM5PROC_DELETE_PRINCIPAL 2 -#define KADM5PROC_MODIFY_PRINCIPAL 3 -#define KADM5PROC_RENAME_PRINCIPAL 4 -#define KADM5PROC_GET_PRINCIPAL 5 -#define KADM5PROC_CHPASS_PRINCIPAL 6 -#define KADM5PROC_CHRAND_PRINCIPAL 7 -#define KADM5PROC_CREATE_POLICY 8 -#define KADM5PROC_DELETE_POLICY 9 +#define KADM5PROC_NULL 0 +#define KADM5PROC_CREATE_PRINCIPAL 1 +#define KADM5PROC_DELETE_PRINCIPAL 2 +#define KADM5PROC_MODIFY_PRINCIPAL 3 +#define KADM5PROC_RENAME_PRINCIPAL 4 +#define KADM5PROC_GET_PRINCIPAL 5 +#define KADM5PROC_CHPASS_PRINCIPAL 6 +#define KADM5PROC_CHRAND_PRINCIPAL 7 +#define KADM5PROC_CREATE_POLICY 8 +#define KADM5PROC_DELETE_POLICY 9 #define KADM5PROC_MODIFY_POLICY 10 #define KADM5PROC_GET_POLICY 11 #define KADM5PROC_GET_PRIVS 12 @@ -143,3 +143,16 @@ proto_reg_handoff_kadm5(void) rpc_init_proc_table(KADM5_PROGRAM, 2, kadm5_v2_proc, hf_kadm5_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: + */ diff --git a/epan/dissectors/packet-klm.c b/epan/dissectors/packet-klm.c index 997722eaec..dfa2ba2247 100644 --- a/epan/dissectors/packet-klm.c +++ b/epan/dissectors/packet-klm.c @@ -187,10 +187,10 @@ static const vsff klm1_proc[] = { { 0, NULL, NULL, NULL } }; static const value_string klm1_proc_vals[] = { - { KLMPROC_TEST, "TEST" }, - { KLMPROC_LOCK, "LOCK" }, - { KLMPROC_CANCEL, "CANCEL" }, - { KLMPROC_UNLOCK, "UNLOCK" }, + { KLMPROC_TEST, "TEST" }, + { KLMPROC_LOCK, "LOCK" }, + { KLMPROC_CANCEL, "CANCEL" }, + { KLMPROC_UNLOCK, "UNLOCK" }, { 0, NULL} }; @@ -262,3 +262,16 @@ proto_reg_handoff_klm(void) /* Register the procedure tables */ rpc_init_proc_table(KLM_PROGRAM, 1, klm1_proc, hf_klm_procedure_v1); } + +/* + * 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-l1-events.c b/epan/dissectors/packet-l1-events.c index bcc6a72297..5651063063 100644 --- a/epan/dissectors/packet-l1-events.c +++ b/epan/dissectors/packet-l1-events.c @@ -142,5 +142,18 @@ proto_reg_handoff_l1_events(void) dissector_handle_t l1_events_handle; l1_events_handle = find_dissector("data-l1-events"); - dissector_add_uint("wtap_encap", WTAP_ENCAP_LAYER1_EVENT, l1_events_handle); /* for text msgs from trace files */ + dissector_add_uint("wtap_encap", WTAP_ENCAP_LAYER1_EVENT, l1_events_handle); /* for text msgs from trace files */ } + +/* + * 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-lapb.c b/epan/dissectors/packet-lapb.c index 8e4bf7d488..e1f6388017 100644 --- a/epan/dissectors/packet-lapb.c +++ b/epan/dissectors/packet-lapb.c @@ -52,25 +52,25 @@ static dissector_handle_t x25_dir_handle; static dissector_handle_t x25_handle; static const xdlc_cf_items lapb_cf_items = { - &hf_lapb_n_r, - &hf_lapb_n_s, - &hf_lapb_p, - &hf_lapb_f, - &hf_lapb_s_ftype, - &hf_lapb_u_modifier_cmd, - &hf_lapb_u_modifier_resp, - &hf_lapb_ftype_i, - &hf_lapb_ftype_s_u + &hf_lapb_n_r, + &hf_lapb_n_s, + &hf_lapb_p, + &hf_lapb_f, + &hf_lapb_s_ftype, + &hf_lapb_u_modifier_cmd, + &hf_lapb_u_modifier_resp, + &hf_lapb_ftype_i, + &hf_lapb_ftype_s_u }; static void dissect_lapb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *lapb_tree, *ti; - guint16 control; - int is_response; - guint8 byte0; - tvbuff_t *next_tvb; + proto_tree *lapb_tree, *ti; + guint16 control; + int is_response; + guint8 byte0; + tvbuff_t *next_tvb; col_set_str(pinfo->cinfo, COL_PROTOCOL, "LAPB"); col_clear(pinfo->cinfo, COL_INFO); @@ -78,82 +78,82 @@ dissect_lapb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (pinfo->p2p_dir) { case P2P_DIR_SENT: - col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE"); - col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE"); - break; + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE"); + break; case P2P_DIR_RECV: - col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE"); - col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE"); - break; + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE"); + break; default: - col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "N/A"); - col_set_str(pinfo->cinfo, COL_RES_DL_DST, "N/A"); - break; + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "N/A"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "N/A"); + break; } byte0 = tvb_get_guint8(tvb, 0); if (byte0 != 0x01 && byte0 != 0x03 && byte0 != 0x07 && byte0 != 0x0f) /* invalid LAPB frame */ { - col_set_str(pinfo->cinfo, COL_INFO, "Invalid LAPB frame"); - if (tree) - proto_tree_add_protocol_format(tree, proto_lapb, tvb, 0, -1, - "Invalid LAPB frame"); - return; + col_set_str(pinfo->cinfo, COL_INFO, "Invalid LAPB frame"); + if (tree) + proto_tree_add_protocol_format(tree, proto_lapb, tvb, 0, -1, + "Invalid LAPB frame"); + return; } switch (pinfo->p2p_dir) { case P2P_DIR_SENT: - if (byte0 == 0x03) - is_response = TRUE; - else - is_response = FALSE; - break; + if (byte0 == 0x03) + is_response = TRUE; + else + is_response = FALSE; + break; case P2P_DIR_RECV: - if (byte0 == 0x01) - is_response = TRUE; - else - is_response = FALSE; - break; + if (byte0 == 0x01) + is_response = TRUE; + else + is_response = FALSE; + break; default: - /* - * XXX - should we base this on the source and destination - * addresses? The problem is that we can tell one direction - * from another with that, but we can't say which is DTE->DCE - * and which is DCE->DTE. - */ - is_response = FALSE; - break; + /* + * XXX - should we base this on the source and destination + * addresses? The problem is that we can tell one direction + * from another with that, but we can't say which is DTE->DCE + * and which is DCE->DTE. + */ + is_response = FALSE; + break; } - ti = proto_tree_add_protocol_format(tree, proto_lapb, tvb, 0, 2, - "LAPB"); - lapb_tree = proto_item_add_subtree(ti, ett_lapb); - proto_tree_add_uint(lapb_tree, hf_lapb_address, tvb, 0, 1, byte0); + ti = proto_tree_add_protocol_format(tree, proto_lapb, tvb, 0, 2, + "LAPB"); + lapb_tree = proto_item_add_subtree(ti, ett_lapb); + proto_tree_add_uint(lapb_tree, hf_lapb_address, tvb, 0, 1, byte0); control = dissect_xdlc_control(tvb, 1, pinfo, lapb_tree, hf_lapb_control, - ett_lapb_control, &lapb_cf_items, NULL, NULL, NULL, - is_response, FALSE, FALSE); + ett_lapb_control, &lapb_cf_items, NULL, NULL, NULL, + is_response, FALSE, FALSE); /* information frame ==> X.25 */ if (XDLC_IS_INFORMATION(control)) { - next_tvb = tvb_new_subset_remaining(tvb, 2); - switch (pinfo->p2p_dir) { - - case P2P_DIR_SENT: - case P2P_DIR_RECV: - call_dissector(x25_dir_handle, next_tvb, pinfo, tree); - break; - - default: - call_dissector(x25_handle, next_tvb, pinfo, tree); - break; - } + next_tvb = tvb_new_subset_remaining(tvb, 2); + switch (pinfo->p2p_dir) { + + case P2P_DIR_SENT: + case P2P_DIR_RECV: + call_dissector(x25_dir_handle, next_tvb, pinfo, tree); + break; + + default: + call_dissector(x25_handle, next_tvb, pinfo, tree); + break; + } } } @@ -161,49 +161,49 @@ void proto_register_lapb(void) { static hf_register_info hf[] = { - { &hf_lapb_address, - { "Address", "lapb.address", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, + { &hf_lapb_address, + { "Address", "lapb.address", FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, - { &hf_lapb_control, - { "Control Field", "lapb.control", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, + { &hf_lapb_control, + { "Control Field", "lapb.control", FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, - { &hf_lapb_n_r, - { "N(R)", "lapb.control.n_r", FT_UINT8, BASE_DEC, - NULL, XDLC_N_R_MASK, NULL, HFILL }}, + { &hf_lapb_n_r, + { "N(R)", "lapb.control.n_r", FT_UINT8, BASE_DEC, + NULL, XDLC_N_R_MASK, NULL, HFILL }}, - { &hf_lapb_n_s, - { "N(S)", "lapb.control.n_s", FT_UINT8, BASE_DEC, - NULL, XDLC_N_S_MASK, NULL, HFILL }}, + { &hf_lapb_n_s, + { "N(S)", "lapb.control.n_s", FT_UINT8, BASE_DEC, + NULL, XDLC_N_S_MASK, NULL, HFILL }}, - { &hf_lapb_p, - { "Poll", "lapb.control.p", FT_BOOLEAN, 8, - TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }}, + { &hf_lapb_p, + { "Poll", "lapb.control.p", FT_BOOLEAN, 8, + TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }}, - { &hf_lapb_f, - { "Final", "lapb.control.f", FT_BOOLEAN, 8, - TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }}, + { &hf_lapb_f, + { "Final", "lapb.control.f", FT_BOOLEAN, 8, + TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }}, - { &hf_lapb_s_ftype, - { "Supervisory frame type", "lapb.control.s_ftype", FT_UINT8, BASE_HEX, - VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }}, + { &hf_lapb_s_ftype, + { "Supervisory frame type", "lapb.control.s_ftype", FT_UINT8, BASE_HEX, + VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }}, - { &hf_lapb_u_modifier_cmd, - { "Command", "lapb.control.u_modifier_cmd", FT_UINT8, BASE_HEX, - VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, + { &hf_lapb_u_modifier_cmd, + { "Command", "lapb.control.u_modifier_cmd", FT_UINT8, BASE_HEX, + VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, - { &hf_lapb_u_modifier_resp, - { "Response", "lapb.control.u_modifier_resp", FT_UINT8, BASE_HEX, - VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, + { &hf_lapb_u_modifier_resp, + { "Response", "lapb.control.u_modifier_resp", FT_UINT8, BASE_HEX, + VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, - { &hf_lapb_ftype_i, - { "Frame type", "lapb.control.ftype", FT_UINT8, BASE_HEX, - VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }}, + { &hf_lapb_ftype_i, + { "Frame type", "lapb.control.ftype", FT_UINT8, BASE_HEX, + VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }}, - { &hf_lapb_ftype_s_u, - { "Frame type", "lapb.control.ftype", FT_UINT8, BASE_HEX, - VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, + { &hf_lapb_ftype_s_u, + { "Frame type", "lapb.control.ftype", FT_UINT8, BASE_HEX, + VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, }; static gint *ett[] = { &ett_lapb, @@ -211,7 +211,7 @@ proto_register_lapb(void) }; proto_lapb = proto_register_protocol("Link Access Procedure Balanced (LAPB)", - "LAPB", "lapb"); + "LAPB", "lapb"); proto_register_field_array (proto_lapb, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -234,3 +234,16 @@ proto_reg_handoff_lapb(void) lapb_handle = find_dissector("lapb"); dissector_add_uint("wtap_encap", WTAP_ENCAP_LAPB, lapb_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-llt.c b/epan/dissectors/packet-llt.c index 455e926da4..8672958469 100644 --- a/epan/dissectors/packet-llt.c +++ b/epan/dissectors/packet-llt.c @@ -33,8 +33,8 @@ void proto_register_llt(void); void proto_reg_handoff_llt(void); static const value_string message_type_vs[] = { - { 0x0a, "heartbeat" }, - { 0, NULL} + { 0x0a, "heartbeat" }, + { 0, NULL} }; /* Variables for our preferences */ @@ -156,3 +156,16 @@ proto_reg_handoff_llt(void) dissector_add_uint("ethertype", preference_alternate_ethertype, llt_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-lpd.c b/epan/dissectors/packet-lpd.c index ea338667e9..290aa56f1d 100644 --- a/epan/dissectors/packet-lpd.c +++ b/epan/dissectors/packet-lpd.c @@ -158,47 +158,60 @@ find_printer_string(tvbuff_t *tvb, int offset) void proto_register_lpd(void) { - static hf_register_info hf[] = { - { &hf_lpd_response, - { "Response", "lpd.response", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "TRUE if LPD response", HFILL }}, - - { &hf_lpd_request, - { "Request", "lpd.request", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "TRUE if LPD request", HFILL }}, - - { &hf_lpd_client_code, - { "Client code", "lpd.client_code", - FT_UINT8, BASE_DEC, VALS(lpd_client_code), 0x0, - NULL, HFILL }}, - - { &hf_lpd_printer_option, - { "Printer/options", "lpd.printer_option", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - - { &hf_lpd_response_code, - { "Response", "lpd.response_code", - FT_UINT8, BASE_DEC, VALS(lpd_server_code), 0x0, - NULL, HFILL }}, - }; - static gint *ett[] = { - &ett_lpd, - }; - - proto_lpd = proto_register_protocol("Line Printer Daemon Protocol", "LPD", "lpd"); - proto_register_field_array(proto_lpd, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + static hf_register_info hf[] = { + { &hf_lpd_response, + { "Response", "lpd.response", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "TRUE if LPD response", HFILL }}, + + { &hf_lpd_request, + { "Request", "lpd.request", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "TRUE if LPD request", HFILL }}, + + { &hf_lpd_client_code, + { "Client code", "lpd.client_code", + FT_UINT8, BASE_DEC, VALS(lpd_client_code), 0x0, + NULL, HFILL }}, + + { &hf_lpd_printer_option, + { "Printer/options", "lpd.printer_option", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + + { &hf_lpd_response_code, + { "Response", "lpd.response_code", + FT_UINT8, BASE_DEC, VALS(lpd_server_code), 0x0, + NULL, HFILL }}, + }; + static gint *ett[] = { + &ett_lpd, + }; + + proto_lpd = proto_register_protocol("Line Printer Daemon Protocol", "LPD", "lpd"); + proto_register_field_array(proto_lpd, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); } void proto_reg_handoff_lpd(void) { - dissector_handle_t lpd_handle; + dissector_handle_t lpd_handle; - lpd_handle = create_dissector_handle(dissect_lpd, proto_lpd); - dissector_add_uint("tcp.port", TCP_PORT_PRINTER, lpd_handle); - data_handle = find_dissector("data"); + lpd_handle = create_dissector_handle(dissect_lpd, proto_lpd); + dissector_add_uint("tcp.port", TCP_PORT_PRINTER, lpd_handle); + 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-m3ua.c b/epan/dissectors/packet-m3ua.c index 1582561349..81b567bcda 100644 --- a/epan/dissectors/packet-m3ua.c +++ b/epan/dissectors/packet-m3ua.c @@ -1114,42 +1114,42 @@ dissect_circuit_range_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_t static guint m3ua_heur_mtp3_standard(tvbuff_t *tvb, packet_info *pinfo, guint32 opc, guint32 dpc, guint8 si) { - switch (si) { - case MTP_SI_SCCP: - { - if (opc < ITU_PC_MASK && dpc < ITU_PC_MASK && - looks_like_valid_sccp(PINFO_FD_NUM(pinfo), tvb, ITU_STANDARD)) { - - return ITU_STANDARD; - } - /* Network 0 is reserved in ANSI */ - /* Could also check that cluster!=0 for small networks (networks 1-5) */ - if ((opc & ANSI_NETWORK_MASK) > 0 && (dpc & ANSI_NETWORK_MASK) > 0 && - looks_like_valid_sccp(PINFO_FD_NUM(pinfo), tvb, ANSI_STANDARD)) { - - return ANSI_STANDARD; - } - if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), tvb, CHINESE_ITU_STANDARD)) { - return CHINESE_ITU_STANDARD; - } - if (opc < JAPAN_PC_MASK && dpc < JAPAN_PC_MASK && - looks_like_valid_sccp(PINFO_FD_NUM(pinfo), tvb, JAPAN_STANDARD)) { - - return JAPAN_STANDARD; - } - - return HEURISTIC_FAILED_STANDARD; - - } - default: - return HEURISTIC_FAILED_STANDARD; + switch (si) { + case MTP_SI_SCCP: + { + if (opc < ITU_PC_MASK && dpc < ITU_PC_MASK && + looks_like_valid_sccp(PINFO_FD_NUM(pinfo), tvb, ITU_STANDARD)) { + + return ITU_STANDARD; + } + /* Network 0 is reserved in ANSI */ + /* Could also check that cluster!=0 for small networks (networks 1-5) */ + if ((opc & ANSI_NETWORK_MASK) > 0 && (dpc & ANSI_NETWORK_MASK) > 0 && + looks_like_valid_sccp(PINFO_FD_NUM(pinfo), tvb, ANSI_STANDARD)) { + + return ANSI_STANDARD; } + if (looks_like_valid_sccp(PINFO_FD_NUM(pinfo), tvb, CHINESE_ITU_STANDARD)) { + return CHINESE_ITU_STANDARD; + } + if (opc < JAPAN_PC_MASK && dpc < JAPAN_PC_MASK && + looks_like_valid_sccp(PINFO_FD_NUM(pinfo), tvb, JAPAN_STANDARD)) { + + return JAPAN_STANDARD; + } + + return HEURISTIC_FAILED_STANDARD; + + } + default: + return HEURISTIC_FAILED_STANDARD; + } } static void m3ua_reset_mtp3_standard(void) { - mtp3_standard = m3ua_pref_mtp3_standard; + mtp3_standard = m3ua_pref_mtp3_standard; } static void @@ -1175,22 +1175,22 @@ dissect_protocol_data_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, pro m3ua_pref_mtp3_standard = mtp3_standard; if (mtp3_heuristic_standard) { - heuristic_standard = m3ua_heur_mtp3_standard(payload_tvb, pinfo, opc, dpc, si); - if (heuristic_standard == HEURISTIC_FAILED_STANDARD) { - gen_item = proto_tree_add_uint_format(tree, hf_heuristic_standard, parameter_tvb, 0, 0, heuristic_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_heuristic_standard, parameter_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, m3ua_reset_mtp3_standard); - } - PROTO_ITEM_SET_GENERATED(gen_item); + heuristic_standard = m3ua_heur_mtp3_standard(payload_tvb, pinfo, opc, dpc, si); + if (heuristic_standard == HEURISTIC_FAILED_STANDARD) { + gen_item = proto_tree_add_uint_format(tree, hf_heuristic_standard, parameter_tvb, 0, 0, heuristic_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_heuristic_standard, parameter_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, m3ua_reset_mtp3_standard); + } + PROTO_ITEM_SET_GENERATED(gen_item); } mtp3_tap->addr_dpc.type = (Standard_Type)mtp3_standard; @@ -2039,79 +2039,79 @@ proto_register_m3ua(void) /* Setup list of header fields */ static hf_register_info hf[] = { - { &hf_version, { "Version", "m3ua.version", FT_UINT8, BASE_DEC, VALS(protocol_version_values), 0x0, NULL, HFILL } }, - { &hf_reserved, { "Reserved", "m3ua.reserved", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } }, - { &hf_v5_message_class, { "Message class", "m3ua.message_class", FT_UINT8, BASE_DEC, VALS(v5_message_class_values), 0x0, NULL, HFILL } }, - { &hf_message_class, { "Message class", "m3ua.message_class", FT_UINT8, BASE_DEC, VALS(message_class_values), 0x0, NULL, HFILL } }, - { &hf_message_type, { "Message Type", "m3ua.message_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_message_length, { "Message length", "m3ua.message_length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_v5_parameter_tag, { "Parameter Tag", "m3ua.parameter_tag", FT_UINT16, BASE_DEC, VALS(v5_parameter_tag_values), 0x0, NULL, HFILL } }, - { &hf_v6_parameter_tag, { "Parameter Tag", "m3ua.parameter_tag", FT_UINT16, BASE_DEC, VALS(v6_parameter_tag_values), 0x0, NULL, HFILL } }, - { &hf_v7_parameter_tag, { "Parameter Tag", "m3ua.parameter_tag", FT_UINT16, BASE_DEC, VALS(v7_parameter_tag_values), 0x0, NULL, HFILL } }, - { &hf_parameter_tag, { "Parameter Tag", "m3ua.parameter_tag", FT_UINT16, BASE_DEC, VALS(parameter_tag_values), 0x0, NULL, HFILL } }, - { &hf_parameter_length, { "Parameter length", "m3ua.parameter_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_parameter_value, { "Parameter value", "m3ua.parameter_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, - { &hf_parameter_padding, { "Padding", "m3ua.parameter_padding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_version, { "Version", "m3ua.version", FT_UINT8, BASE_DEC, VALS(protocol_version_values), 0x0, NULL, HFILL } }, + { &hf_reserved, { "Reserved", "m3ua.reserved", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { &hf_v5_message_class, { "Message class", "m3ua.message_class", FT_UINT8, BASE_DEC, VALS(v5_message_class_values), 0x0, NULL, HFILL } }, + { &hf_message_class, { "Message class", "m3ua.message_class", FT_UINT8, BASE_DEC, VALS(message_class_values), 0x0, NULL, HFILL } }, + { &hf_message_type, { "Message Type", "m3ua.message_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_message_length, { "Message length", "m3ua.message_length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_v5_parameter_tag, { "Parameter Tag", "m3ua.parameter_tag", FT_UINT16, BASE_DEC, VALS(v5_parameter_tag_values), 0x0, NULL, HFILL } }, + { &hf_v6_parameter_tag, { "Parameter Tag", "m3ua.parameter_tag", FT_UINT16, BASE_DEC, VALS(v6_parameter_tag_values), 0x0, NULL, HFILL } }, + { &hf_v7_parameter_tag, { "Parameter Tag", "m3ua.parameter_tag", FT_UINT16, BASE_DEC, VALS(v7_parameter_tag_values), 0x0, NULL, HFILL } }, + { &hf_parameter_tag, { "Parameter Tag", "m3ua.parameter_tag", FT_UINT16, BASE_DEC, VALS(parameter_tag_values), 0x0, NULL, HFILL } }, + { &hf_parameter_length, { "Parameter length", "m3ua.parameter_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_parameter_value, { "Parameter value", "m3ua.parameter_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_parameter_padding, { "Padding", "m3ua.parameter_padding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, #if 0 - { &hf_parameter_trailer, { "Trailer", "m3ua.paramter_trailer", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_parameter_trailer, { "Trailer", "m3ua.paramter_trailer", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, #endif - { &hf_network_appearance, { "Network appearance", "m3ua.network_appearance", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_info_string, { "Info string", "m3ua.info_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, - { &hf_routing_context, { "Routing context", "m3ua.routing_context", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_diagnostic_information, { "Diagnostic information", "m3ua.diagnostic_information", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, - { &hf_heartbeat_data, { "Heartbeat data", "m3ua.heartbeat_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, - { &hf_v5_error_code, { "Error code", "m3ua.error_code", FT_UINT32, BASE_DEC, VALS(v5_error_code_values), 0x0, NULL, HFILL } }, - { &hf_v6_error_code, { "Error code", "m3ua.error_code", FT_UINT32, BASE_DEC, VALS(v6_error_code_values), 0x0, NULL, HFILL } }, - { &hf_v7_error_code, { "Error code", "m3ua.error_code", FT_UINT32, BASE_DEC, VALS(v7_error_code_values), 0x0, NULL, HFILL } }, - { &hf_error_code, { "Error code", "m3ua.error_code", FT_UINT32, BASE_DEC, VALS(error_code_values), 0x0, NULL, HFILL } }, - { &hf_status_type, { "Status type", "m3ua.status_type", FT_UINT16, BASE_DEC, VALS(status_type_values), 0x0, NULL, HFILL } }, - { &hf_status_info, { "Status info", "m3ua.status_info", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_asp_identifier, { "ASP identifier", "m3ua.asp_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_affected_point_code_mask, { "Mask", "m3ua.affected_point_code_mask", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_affected_point_code_pc, { "Affected point code", "m3ua.affected_point_code_pc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_cause, { "Unavailability cause", "m3ua.unavailability_cause", FT_UINT16, BASE_DEC, VALS(unavailability_cause_values), 0x0, NULL, HFILL } }, - { &hf_user, { "User Identity", "m3ua.user_identity", FT_UINT16, BASE_DEC, VALS(user_identity_values), 0x0, NULL, HFILL } }, - { &hf_reason, { "Reason", "m3ua.reason", FT_UINT32, BASE_DEC, VALS(reason_values), 0x0, NULL, HFILL } }, - { &hf_v5_traffic_mode_type, { "Traffic mode Type", "m3ua.traffic_mode_type", FT_UINT32, BASE_DEC, VALS(v5_traffic_mode_type_values), 0x0, NULL, HFILL } }, - { &hf_v6_traffic_mode_type, { "Traffic mode Type", "m3ua.traffic_mode_type", FT_UINT32, BASE_DEC, VALS(v6_traffic_mode_type_values), 0x0, NULL, HFILL } }, - { &hf_v7_traffic_mode_type, { "Traffic mode Type", "m3ua.traffic_mode_type", FT_UINT32, BASE_DEC, VALS(v7_traffic_mode_type_values), 0x0, NULL, HFILL } }, - { &hf_traffic_mode_type, { "Traffic mode Type", "m3ua.traffic_mode_type", FT_UINT32, BASE_DEC, VALS(traffic_mode_type_values), 0x0, NULL, HFILL } }, - { &hf_congestion_reserved, { "Reserved", "m3ua.congestion_reserved", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, - { &hf_congestion_level, { "Congestion level", "m3ua.congestion_level", FT_UINT8, BASE_DEC, VALS(congestion_level_values), 0x0, NULL, HFILL } }, - { &hf_concerned_dest_reserved, { "Reserved", "m3ua.concerned_reserved", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, - { &hf_concerned_dest_pc, { "Concerned DPC", "m3ua.concerned_dpc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_local_rk_identifier, { "Local routing key identifier", "m3ua.local_rk_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_dpc_mask, { "Mask", "m3ua.dpc_mask", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_dpc_pc, { "Destination point code", "m3ua.dpc_pc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_si, { "Service indicator", "m3ua.si", FT_UINT8, BASE_DEC, VALS(user_identity_values), 0x0, NULL, HFILL } }, - { &hf_ssn, { "Subsystem number", "m3ua.ssn", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_opc_list_mask, { "Mask", "m3ua.opc_list_mask", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_opc_list_pc, { "Originating point code", "m3ua.opc_list_pc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_cic_range_mask, { "Mask", "m3ua.cic_range_mask", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_cic_range_pc, { "Originating point code", "m3ua.cic_range_pc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_cic_range_lower, { "Lower CIC value", "m3ua.cic_range_lower", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_cic_range_upper, { "Upper CIC value", "m3ua.cic_range_upper", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_li, { "Length indicator", "m3ua.protocol_data_2_li", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_protocol_data_opc, { "OPC", "m3ua.protocol_data_opc", FT_UINT32, BASE_DEC, NULL, 0x0, "Originating Point Code", HFILL } }, - { &hf_protocol_data_dpc, { "DPC", "m3ua.protocol_data_dpc", FT_UINT32, BASE_DEC, NULL, 0x0, "Destination Point Code", HFILL } }, - { &hf_protocol_data_mtp3_opc, { "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_protocol_data_mtp3_dpc, { "DPC", "mtp3.dpc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_protocol_data_mtp3_pc, { "PC", "mtp3.pc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_protocol_data_si, { "SI", "m3ua.protocol_data_si", FT_UINT8, BASE_DEC, VALS(mtp3_service_indicator_code_short_vals), 0x0, "Service Indicator", HFILL } }, - { &hf_protocol_data_ni, { "NI", "m3ua.protocol_data_ni", FT_UINT8, BASE_DEC, VALS(mtp3_network_indicator_vals), 0x0, "Network Indicator", HFILL } }, - { &hf_protocol_data_mtp3_ni, { "NI", "mtp3.ni", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_protocol_data_mp, { "MP", "m3ua.protocol_data_mp", FT_UINT8, BASE_DEC, NULL, 0x0, "Message Priority", HFILL } }, - { &hf_protocol_data_sls, { "SLS", "m3ua.protocol_data_sls", FT_UINT8, BASE_DEC, NULL, 0x0, "Signalling Link Selection", HFILL } }, - { &hf_protocol_data_mtp3_sls, { "SLS", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_correlation_identifier, { "Correlation Identifier", "m3ua.correlation_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_registration_status, { "Registration status", "m3ua.registration_status", FT_UINT32, BASE_DEC, VALS(registration_status_values), 0x0, NULL, HFILL } }, - { &hf_deregistration_status, { "Deregistration status", "m3ua.deregistration_status", FT_UINT32, BASE_DEC, VALS(deregistration_status_values), 0x0, NULL, HFILL } }, - { &hf_registration_result_identifier, { "Local RK-identifier value", "m3ua.registration_result_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_registration_result_status, { "Registration status", "m3ua.registration_results_status", FT_UINT32, BASE_DEC, VALS(registration_result_status_values), 0x0, NULL, HFILL } }, - { &hf_registration_result_context, { "Routing context", "m3ua.registration_result_routing_context", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_v6_deregistration_result_status, { "De-Registration status", "m3ua.deregistration_results_status", FT_UINT32, BASE_DEC, VALS(v6_deregistration_result_status_values), 0x0, NULL, HFILL } }, - { &hf_v6_deregistration_result_context, { "Routing context", "m3ua.deregistration_result_routing_context", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_heuristic_standard, { "Heuristic standard", "m3ua.heuristic_standard", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_network_appearance, { "Network appearance", "m3ua.network_appearance", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_info_string, { "Info string", "m3ua.info_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_routing_context, { "Routing context", "m3ua.routing_context", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_diagnostic_information, { "Diagnostic information", "m3ua.diagnostic_information", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_heartbeat_data, { "Heartbeat data", "m3ua.heartbeat_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_v5_error_code, { "Error code", "m3ua.error_code", FT_UINT32, BASE_DEC, VALS(v5_error_code_values), 0x0, NULL, HFILL } }, + { &hf_v6_error_code, { "Error code", "m3ua.error_code", FT_UINT32, BASE_DEC, VALS(v6_error_code_values), 0x0, NULL, HFILL } }, + { &hf_v7_error_code, { "Error code", "m3ua.error_code", FT_UINT32, BASE_DEC, VALS(v7_error_code_values), 0x0, NULL, HFILL } }, + { &hf_error_code, { "Error code", "m3ua.error_code", FT_UINT32, BASE_DEC, VALS(error_code_values), 0x0, NULL, HFILL } }, + { &hf_status_type, { "Status type", "m3ua.status_type", FT_UINT16, BASE_DEC, VALS(status_type_values), 0x0, NULL, HFILL } }, + { &hf_status_info, { "Status info", "m3ua.status_info", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_asp_identifier, { "ASP identifier", "m3ua.asp_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_affected_point_code_mask, { "Mask", "m3ua.affected_point_code_mask", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_affected_point_code_pc, { "Affected point code", "m3ua.affected_point_code_pc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_cause, { "Unavailability cause", "m3ua.unavailability_cause", FT_UINT16, BASE_DEC, VALS(unavailability_cause_values), 0x0, NULL, HFILL } }, + { &hf_user, { "User Identity", "m3ua.user_identity", FT_UINT16, BASE_DEC, VALS(user_identity_values), 0x0, NULL, HFILL } }, + { &hf_reason, { "Reason", "m3ua.reason", FT_UINT32, BASE_DEC, VALS(reason_values), 0x0, NULL, HFILL } }, + { &hf_v5_traffic_mode_type, { "Traffic mode Type", "m3ua.traffic_mode_type", FT_UINT32, BASE_DEC, VALS(v5_traffic_mode_type_values), 0x0, NULL, HFILL } }, + { &hf_v6_traffic_mode_type, { "Traffic mode Type", "m3ua.traffic_mode_type", FT_UINT32, BASE_DEC, VALS(v6_traffic_mode_type_values), 0x0, NULL, HFILL } }, + { &hf_v7_traffic_mode_type, { "Traffic mode Type", "m3ua.traffic_mode_type", FT_UINT32, BASE_DEC, VALS(v7_traffic_mode_type_values), 0x0, NULL, HFILL } }, + { &hf_traffic_mode_type, { "Traffic mode Type", "m3ua.traffic_mode_type", FT_UINT32, BASE_DEC, VALS(traffic_mode_type_values), 0x0, NULL, HFILL } }, + { &hf_congestion_reserved, { "Reserved", "m3ua.congestion_reserved", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_congestion_level, { "Congestion level", "m3ua.congestion_level", FT_UINT8, BASE_DEC, VALS(congestion_level_values), 0x0, NULL, HFILL } }, + { &hf_concerned_dest_reserved, { "Reserved", "m3ua.concerned_reserved", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, + { &hf_concerned_dest_pc, { "Concerned DPC", "m3ua.concerned_dpc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_local_rk_identifier, { "Local routing key identifier", "m3ua.local_rk_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_dpc_mask, { "Mask", "m3ua.dpc_mask", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_dpc_pc, { "Destination point code", "m3ua.dpc_pc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_si, { "Service indicator", "m3ua.si", FT_UINT8, BASE_DEC, VALS(user_identity_values), 0x0, NULL, HFILL } }, + { &hf_ssn, { "Subsystem number", "m3ua.ssn", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_opc_list_mask, { "Mask", "m3ua.opc_list_mask", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_opc_list_pc, { "Originating point code", "m3ua.opc_list_pc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_cic_range_mask, { "Mask", "m3ua.cic_range_mask", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_cic_range_pc, { "Originating point code", "m3ua.cic_range_pc", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_cic_range_lower, { "Lower CIC value", "m3ua.cic_range_lower", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_cic_range_upper, { "Upper CIC value", "m3ua.cic_range_upper", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_li, { "Length indicator", "m3ua.protocol_data_2_li", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_protocol_data_opc, { "OPC", "m3ua.protocol_data_opc", FT_UINT32, BASE_DEC, NULL, 0x0, "Originating Point Code", HFILL } }, + { &hf_protocol_data_dpc, { "DPC", "m3ua.protocol_data_dpc", FT_UINT32, BASE_DEC, NULL, 0x0, "Destination Point Code", HFILL } }, + { &hf_protocol_data_mtp3_opc, { "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_protocol_data_mtp3_dpc, { "DPC", "mtp3.dpc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_protocol_data_mtp3_pc, { "PC", "mtp3.pc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_protocol_data_si, { "SI", "m3ua.protocol_data_si", FT_UINT8, BASE_DEC, VALS(mtp3_service_indicator_code_short_vals), 0x0, "Service Indicator", HFILL } }, + { &hf_protocol_data_ni, { "NI", "m3ua.protocol_data_ni", FT_UINT8, BASE_DEC, VALS(mtp3_network_indicator_vals), 0x0, "Network Indicator", HFILL } }, + { &hf_protocol_data_mtp3_ni, { "NI", "mtp3.ni", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_protocol_data_mp, { "MP", "m3ua.protocol_data_mp", FT_UINT8, BASE_DEC, NULL, 0x0, "Message Priority", HFILL } }, + { &hf_protocol_data_sls, { "SLS", "m3ua.protocol_data_sls", FT_UINT8, BASE_DEC, NULL, 0x0, "Signalling Link Selection", HFILL } }, + { &hf_protocol_data_mtp3_sls, { "SLS", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_correlation_identifier, { "Correlation Identifier", "m3ua.correlation_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_registration_status, { "Registration status", "m3ua.registration_status", FT_UINT32, BASE_DEC, VALS(registration_status_values), 0x0, NULL, HFILL } }, + { &hf_deregistration_status, { "Deregistration status", "m3ua.deregistration_status", FT_UINT32, BASE_DEC, VALS(deregistration_status_values), 0x0, NULL, HFILL } }, + { &hf_registration_result_identifier, { "Local RK-identifier value", "m3ua.registration_result_identifier", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_registration_result_status, { "Registration status", "m3ua.registration_results_status", FT_UINT32, BASE_DEC, VALS(registration_result_status_values), 0x0, NULL, HFILL } }, + { &hf_registration_result_context, { "Routing context", "m3ua.registration_result_routing_context", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_v6_deregistration_result_status, { "De-Registration status", "m3ua.deregistration_results_status", FT_UINT32, BASE_DEC, VALS(v6_deregistration_result_status_values), 0x0, NULL, HFILL } }, + { &hf_v6_deregistration_result_context, { "Routing context", "m3ua.deregistration_result_routing_context", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_heuristic_standard, { "Heuristic standard", "m3ua.heuristic_standard", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, }; /* Setup protocol subtree array */ @@ -2162,3 +2162,16 @@ proto_reg_handoff_m3ua(void) si_dissector_table = find_dissector_table("mtp3.service_indicator"); } + +/* + * 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-netlink-netfilter.c b/epan/dissectors/packet-netlink-netfilter.c index 580864d885..30e63792c4 100644 --- a/epan/dissectors/packet-netlink-netfilter.c +++ b/epan/dissectors/packet-netlink-netfilter.c @@ -137,16 +137,16 @@ dissect_netfilter_ulog(tvbuff_t *tvb, netlink_netfilter_info_t *info, proto_tree } static const value_string netlink_netfilter_subsystem_vals[] = { - { WS_NFNL_SUBSYS_NONE, "None" }, - { WS_NFNL_SUBSYS_CTNETLINK, "Conntrack" }, - { WS_NFNL_SUBSYS_CTNETLINK_EXP, "Conntrack expect" }, - { WS_NFNL_SUBSYS_QUEUE, "Netfilter packet queue" }, - { WS_NFNL_SUBSYS_ULOG, "Netfilter userspace logging" }, - { WS_NFNL_SUBSYS_OSF, "OS fingerprint" }, - { WS_NFNL_SUBSYS_IPSET, "IP set" }, - { WS_NFNL_SUBSYS_ACCT, "Extended Netfilter accounting infrastructure" }, + { WS_NFNL_SUBSYS_NONE, "None" }, + { WS_NFNL_SUBSYS_CTNETLINK, "Conntrack" }, + { WS_NFNL_SUBSYS_CTNETLINK_EXP, "Conntrack expect" }, + { WS_NFNL_SUBSYS_QUEUE, "Netfilter packet queue" }, + { WS_NFNL_SUBSYS_ULOG, "Netfilter userspace logging" }, + { WS_NFNL_SUBSYS_OSF, "OS fingerprint" }, + { WS_NFNL_SUBSYS_IPSET, "IP set" }, + { WS_NFNL_SUBSYS_ACCT, "Extended Netfilter accounting infrastructure" }, { WS_NFNL_SUBSYS_CTNETLINK_TIMEOUT, "Extended Netfilter Connection Tracking timeout tuning" }, - { WS_NFNL_SUBSYS_CTHELPER, "Connection Tracking Helpers" }, + { WS_NFNL_SUBSYS_CTHELPER, "Connection Tracking Helpers" }, { 0, NULL } }; @@ -233,3 +233,16 @@ proto_reg_handoff_netlink_netfilter(void) nflog_handle = find_dissector("nflog"); } + +/* + * 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-nntp.c b/epan/dissectors/packet-nntp.c index fe8abe0c5c..92d4ca4a5b 100644 --- a/epan/dissectors/packet-nntp.c +++ b/epan/dissectors/packet-nntp.c @@ -41,17 +41,17 @@ static gint ett_nntp = -1; static void dissect_nntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - const gchar *type; + const gchar *type; proto_tree *nntp_tree; proto_item *ti; gint offset = 0; gint next_offset; int linelen; - if (pinfo->match_uint == pinfo->destport) - type = "Request"; - else - type = "Response"; + if (pinfo->match_uint == pinfo->destport) + type = "Request"; + else + type = "Response"; col_set_str(pinfo->cinfo, COL_PROTOCOL, "NNTP"); @@ -137,3 +137,16 @@ proto_reg_handoff_nntp(void) nntp_handle = create_dissector_handle(dissect_nntp, proto_nntp); dissector_add_uint("tcp.port", TCP_PORT_NNTP, nntp_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-nt-tpcp.c b/epan/dissectors/packet-nt-tpcp.c index 3f27f9a3f9..4b61dec857 100644 --- a/epan/dissectors/packet-nt-tpcp.c +++ b/epan/dissectors/packet-nt-tpcp.c @@ -129,35 +129,35 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ return 0; } - ti = proto_tree_add_protocol_format(tree, proto_tpcp, tvb, 0, -1, - "Alteon WebSystems - Transparent Proxy Cache Protocol"); + ti = proto_tree_add_protocol_format(tree, proto_tpcp, tvb, 0, -1, + "Alteon WebSystems - Transparent Proxy Cache Protocol"); - tpcp_tree = proto_item_add_subtree(ti, ett_tpcp); + tpcp_tree = proto_item_add_subtree(ti, ett_tpcp); - proto_tree_add_item(tpcp_tree, hf_tpcp_version, tvb, 0, 1, ENC_NA); - type = tvb_get_guint8(tvb, 1); - proto_tree_add_item(tpcp_tree, hf_tpcp_type, tvb, 1, 1, ENC_NA); + proto_tree_add_item(tpcp_tree, hf_tpcp_version, tvb, 0, 1, ENC_NA); + type = tvb_get_guint8(tvb, 1); + proto_tree_add_item(tpcp_tree, hf_tpcp_type, tvb, 1, 1, ENC_NA); - proto_tree_add_bitmask(tpcp_tree, tvb, 2, hf_tpcp_flags, ett_tpcp_flags, tpcp_flags, ENC_NA); + proto_tree_add_bitmask(tpcp_tree, tvb, 2, hf_tpcp_flags, ett_tpcp_flags, tpcp_flags, ENC_NA); - id = tvb_get_ntohs(tvb, 4); - proto_tree_add_item(tpcp_tree, hf_tpcp_id, tvb, 4, 2, ENC_BIG_ENDIAN); + id = tvb_get_ntohs(tvb, 4); + proto_tree_add_item(tpcp_tree, hf_tpcp_id, tvb, 4, 2, ENC_BIG_ENDIAN); - cport = tvb_get_ntohs(tvb, 6); - proto_tree_add_uint_format_value(tpcp_tree, hf_tpcp_cport, tvb, 6, 2, cport, - "%s", ep_udp_port_to_display(cport)); + cport = tvb_get_ntohs(tvb, 6); + proto_tree_add_uint_format_value(tpcp_tree, hf_tpcp_cport, tvb, 6, 2, cport, + "%s", ep_udp_port_to_display(cport)); - caddr = tvb_get_ntohl(tvb, 8); - proto_tree_add_item(tpcp_tree, hf_tpcp_caddr, tvb, 8, 4, ENC_BIG_ENDIAN); + caddr = tvb_get_ntohl(tvb, 8); + proto_tree_add_item(tpcp_tree, hf_tpcp_caddr, tvb, 8, 4, ENC_BIG_ENDIAN); - saddr = tvb_get_ntohl(tvb, 12); - proto_tree_add_item(tpcp_tree, hf_tpcp_saddr, tvb, 12, 4, ENC_BIG_ENDIAN); + saddr = tvb_get_ntohl(tvb, 12); + proto_tree_add_item(tpcp_tree, hf_tpcp_saddr, tvb, 12, 4, ENC_BIG_ENDIAN); - if (version == TPCP_VER_2) { - proto_tree_add_item(tpcp_tree, hf_tpcp_vaddr, tvb, 16, 4, ENC_BIG_ENDIAN); - proto_tree_add_item(tpcp_tree, hf_tpcp_rasaddr, tvb, 20, 4, ENC_BIG_ENDIAN); - proto_tree_add_item(tpcp_tree, hf_tpcp_signature, tvb, 24, 4, ENC_BIG_ENDIAN); - } + if (version == TPCP_VER_2) { + proto_tree_add_item(tpcp_tree, hf_tpcp_vaddr, tvb, 16, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(tpcp_tree, hf_tpcp_rasaddr, tvb, 20, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(tpcp_tree, hf_tpcp_signature, tvb, 24, 4, ENC_BIG_ENDIAN); + } col_add_fstr(pinfo->cinfo, COL_INFO,"%s id %d CPort %s CIP %s SIP %s", val_to_str_const(type, type_vals, "Unknown"), @@ -253,3 +253,16 @@ proto_reg_handoff_tpcp(void) tpcp_handle = new_create_dissector_handle(dissect_tpcp, proto_tpcp); dissector_add_uint("udp.port", UDP_PORT_TPCP, tpcp_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-pktc.c b/epan/dissectors/packet-pktc.c index 299af7a9cb..a9d17333d1 100644 --- a/epan/dissectors/packet-pktc.c +++ b/epan/dissectors/packet-pktc.c @@ -39,8 +39,8 @@ #include "packet-kerberos.h" #include "packet-snmp.h" -#define PKTC_PORT 1293 -#define PKTC_MTAFQDN_PORT 2246 +#define PKTC_PORT 1293 +#define PKTC_MTAFQDN_PORT 2246 void proto_register_pktc(void); void proto_reg_handoff_pktc(void); @@ -95,43 +95,43 @@ static gint ett_pktc_mtafqdn = -1; static expert_field ei_pktc_unknown_kmmid = EI_INIT; static expert_field ei_pktc_unknown_doi = EI_INIT; -#define KMMID_WAKEUP 0x01 -#define KMMID_AP_REQUEST 0x02 -#define KMMID_AP_REPLY 0x03 -#define KMMID_SEC_PARAM_REC 0x04 -#define KMMID_REKEY 0x05 -#define KMMID_ERROR_REPLY 0x06 +#define KMMID_WAKEUP 0x01 +#define KMMID_AP_REQUEST 0x02 +#define KMMID_AP_REPLY 0x03 +#define KMMID_SEC_PARAM_REC 0x04 +#define KMMID_REKEY 0x05 +#define KMMID_ERROR_REPLY 0x06 static const value_string kmmid_types[] = { - { KMMID_WAKEUP , "Wake Up" }, - { KMMID_AP_REQUEST , "AP Request" }, - { KMMID_AP_REPLY , "AP Reply" }, - { KMMID_SEC_PARAM_REC , "Security Parameter Recovered" }, - { KMMID_REKEY , "Rekey" }, - { KMMID_ERROR_REPLY , "Error Reply" }, + { KMMID_WAKEUP , "Wake Up" }, + { KMMID_AP_REQUEST , "AP Request" }, + { KMMID_AP_REPLY , "AP Reply" }, + { KMMID_SEC_PARAM_REC , "Security Parameter Recovered" }, + { KMMID_REKEY , "Rekey" }, + { KMMID_ERROR_REPLY , "Error Reply" }, { 0, NULL } }; -#define DOI_IPSEC 1 -#define DOI_SNMPv3 2 -#define SNMPv3_NULL 0x20 -#define SNMPv3_DES 0x21 -#define SNMPv3_HMAC_MD5 0x21 +#define DOI_IPSEC 0x01 +#define DOI_SNMPv3 0x02 +#define SNMPv3_NULL 0x20 +#define SNMPv3_DES 0x21 +#define SNMPv3_HMAC_MD5 0x21 #define SNMPv3_HMAC_SHA1 0x22 -#define ESP_3DES 0x03 -#define ESP_RC5 0x04 -#define ESP_IDEA 0x05 -#define ESP_CAST 0x06 -#define ESP_BLOWFISH 0x07 -#define ESP_NULL 0x0b -#define ESP_AES 0x0c -#define HMAC_MD5_96 0x01 -#define HMAC_SHA1_96 0x02 +#define ESP_3DES 0x03 +#define ESP_RC5 0x04 +#define ESP_IDEA 0x05 +#define ESP_CAST 0x06 +#define ESP_BLOWFISH 0x07 +#define ESP_NULL 0x0b +#define ESP_AES 0x0c +#define HMAC_MD5_96 0x01 +#define HMAC_SHA1_96 0x02 /* Domain of Interpretation */ static const value_string doi_types[] = { - { DOI_IPSEC , "IPsec" }, - { DOI_SNMPv3 , "SNMPv3" }, + { DOI_IPSEC , "IPsec" }, + { DOI_SNMPv3 , "SNMPv3" }, { 0, NULL } }; @@ -156,7 +156,7 @@ static const value_string ipsec_transform_id_vals[] = { { ESP_BLOWFISH , "BLOWFISH" }, { ESP_NULL , "NULL" }, /* no encryption, RFC 2410 */ { ESP_AES , "AES-128" }, - { 0 , NULL } + { 0 , NULL } }; static const value_string ipsec_authentication_algorithm_vals[] = { @@ -173,7 +173,7 @@ static const value_string pktc_mtafqdn_msgtype_vals[] = { { PKTC_MTAFQDN_REQ, "MTA FQDN Request" }, { PKTC_MTAFQDN_REP, "MTA FQDN Reply" }, { PKTC_MTAFQDN_ERR, "MTA FQDN Error Reply" }, - { 0 , NULL } + { 0 , NULL } }; static int @@ -234,8 +234,8 @@ dissect_pktc_app_specific_data(packet_info *pinfo, proto_tree *parent_tree, tvbu case DOI_IPSEC: switch(kmmid){ /* we don't distinguish between SPIs for inbound Security Associations - of the client (AP-REQ) vs. server (AP-REP, REKEY). Feel free to add - separation for this if it is imporant enough for you. */ + of the client (AP-REQ) vs. server (AP-REP, REKEY). Feel free to add + separation for this if it is imporant enough for you. */ case KMMID_AP_REQUEST: case KMMID_AP_REPLY: case KMMID_REKEY: @@ -243,12 +243,12 @@ dissect_pktc_app_specific_data(packet_info *pinfo, proto_tree *parent_tree, tvbu proto_tree_add_item(tree, hf_pktc_ipsec_spi, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4; - break; + break; default: proto_tree_add_expert(tree, pinfo, &ei_pktc_unknown_kmmid, tvb, offset, 1); THROW(ReportedBoundsError); /* bail out and inform user we can't dissect the packet */ }; - break; + break; default: proto_tree_add_expert(tree, pinfo, &ei_pktc_unknown_doi, tvb, offset, 1); THROW(ReportedBoundsError); /* bail out and inform user we can't dissect the packet */ @@ -290,8 +290,8 @@ dissect_pktc_list_of_ciphersuites(packet_info *pinfo _U_, proto_tree *parent_tre proto_tree_add_item(tree, hf_pktc_snmpEncryptionTransformID, tvb, offset, 1, ENC_BIG_ENDIAN); proto_item_append_text(tree, "/%s", val_to_str(tvb_get_guint8(tvb, offset), snmp_transform_id_vals, "%0x")); offset+=1; - } - break; + } + break; case DOI_IPSEC: for(i=0;icinfo, COL_INFO, - val_to_str(kmmid, kmmid_types, "Unknown KMMID %#x")); - col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", - val_to_str(doi, doi_types, "Unknown DOI %#x")); + val_to_str(kmmid, kmmid_types, "Unknown KMMID %#x")); + col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", + val_to_str(doi, doi_types, "Unknown DOI %#x")); switch(kmmid){ case KMMID_WAKEUP: offset=dissect_pktc_wakeup(pktc_tree, tvb, offset); - break; + break; case KMMID_AP_REQUEST: offset=dissect_pktc_ap_request(pinfo, pktc_tree, tvb, offset, doi); break; @@ -623,13 +623,13 @@ dissect_pktc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case KMMID_SEC_PARAM_REC: offset=dissect_pktc_sec_param_rec(pktc_tree, tvb, offset); - break; + break; case KMMID_REKEY: offset=dissect_pktc_rekey(pinfo, pktc_tree, tvb, offset, doi); - break; + break; case KMMID_ERROR_REPLY: offset=dissect_pktc_error_reply(pinfo, pktc_tree, tvb, offset); - break; + break; }; proto_item_set_len(item, offset); @@ -639,84 +639,84 @@ void proto_register_pktc(void) { static hf_register_info hf[] = { - { &hf_pktc_kmmid, { - "Key Management Message ID", "pktc.kmmid", FT_UINT8, BASE_HEX, - VALS(kmmid_types), 0, NULL, HFILL }}, - { &hf_pktc_doi, { - "Domain of Interpretation", "pktc.doi", FT_UINT8, BASE_DEC, - VALS(doi_types), 0, NULL, HFILL }}, - { &hf_pktc_version_major, { - "Major version", "pktc.version.major", FT_UINT8, BASE_DEC, - NULL, 0xF0, "Major version of PKTC", HFILL }}, - { &hf_pktc_version_minor, { - "Minor version", "pktc.version.minor", FT_UINT8, BASE_DEC, - NULL, 0x0F, "Minor version of PKTC", HFILL }}, - { &hf_pktc_server_nonce, { - "Server Nonce", "pktc.server_nonce", FT_UINT32, BASE_HEX, - NULL, 0, "Server Nonce random number", HFILL }}, - { &hf_pktc_server_principal, { - "Server Kerberos Principal Identifier", "pktc.server_principal", FT_STRING, BASE_NONE, - NULL, 0, NULL, HFILL }}, - { &hf_pktc_timestamp, { - "Timestamp", "pktc.timestamp", FT_STRING, BASE_NONE, - NULL, 0, "Timestamp (UTC)", HFILL }}, - { &hf_pktc_app_spec_data, { - "Application Specific Data", "pktc.asd", FT_NONE, BASE_NONE, - NULL, 0, "KMMID/DOI application specific data", HFILL }}, - { &hf_pktc_list_of_ciphersuites, { + { &hf_pktc_kmmid, { + "Key Management Message ID", "pktc.kmmid", FT_UINT8, BASE_HEX, + VALS(kmmid_types), 0, NULL, HFILL }}, + { &hf_pktc_doi, { + "Domain of Interpretation", "pktc.doi", FT_UINT8, BASE_DEC, + VALS(doi_types), 0, NULL, HFILL }}, + { &hf_pktc_version_major, { + "Major version", "pktc.version.major", FT_UINT8, BASE_DEC, + NULL, 0xF0, "Major version of PKTC", HFILL }}, + { &hf_pktc_version_minor, { + "Minor version", "pktc.version.minor", FT_UINT8, BASE_DEC, + NULL, 0x0F, "Minor version of PKTC", HFILL }}, + { &hf_pktc_server_nonce, { + "Server Nonce", "pktc.server_nonce", FT_UINT32, BASE_HEX, + NULL, 0, "Server Nonce random number", HFILL }}, + { &hf_pktc_server_principal, { + "Server Kerberos Principal Identifier", "pktc.server_principal", FT_STRING, BASE_NONE, + NULL, 0, NULL, HFILL }}, + { &hf_pktc_timestamp, { + "Timestamp", "pktc.timestamp", FT_STRING, BASE_NONE, + NULL, 0, "Timestamp (UTC)", HFILL }}, + { &hf_pktc_app_spec_data, { + "Application Specific Data", "pktc.asd", FT_NONE, BASE_NONE, + NULL, 0, "KMMID/DOI application specific data", HFILL }}, + { &hf_pktc_list_of_ciphersuites, { "List of Ciphersuites", "pktc.ciphers", FT_NONE, BASE_NONE, - NULL, 0, NULL, HFILL }}, - { &hf_pktc_list_of_ciphersuites_len, { + NULL, 0, NULL, HFILL }}, + { &hf_pktc_list_of_ciphersuites_len, { "Number of Ciphersuites", "pktc.ciphers.len", FT_UINT8, BASE_DEC, - NULL, 0, NULL, HFILL }}, - { &hf_pktc_snmpAuthenticationAlgorithm, { + NULL, 0, NULL, HFILL }}, + { &hf_pktc_snmpAuthenticationAlgorithm, { "SNMPv3 Authentication Algorithm", "pktc.asd.snmp_auth_alg", FT_UINT8, BASE_HEX, VALS(snmp_authentication_algorithm_vals), 0, NULL, HFILL }}, - { &hf_pktc_snmpEncryptionTransformID, { + { &hf_pktc_snmpEncryptionTransformID, { "SNMPv3 Encryption Transform ID", "pktc.asd.snmp_enc_alg", FT_UINT8, BASE_HEX, VALS(snmp_transform_id_vals), 0, NULL, HFILL }}, - { &hf_pktc_ipsecAuthenticationAlgorithm, { + { &hf_pktc_ipsecAuthenticationAlgorithm, { "IPsec Authentication Algorithm", "pktc.asd.ipsec_auth_alg", FT_UINT8, BASE_HEX, VALS(ipsec_authentication_algorithm_vals), 0, NULL, HFILL }}, - { &hf_pktc_ipsecEncryptionTransformID, { + { &hf_pktc_ipsecEncryptionTransformID, { "IPsec Encryption Transform ID", "pktc.asd.ipsec_enc_alg", FT_UINT8, BASE_HEX, VALS(ipsec_transform_id_vals), 0, NULL, HFILL }}, - { &hf_pktc_snmpEngineID_len, { + { &hf_pktc_snmpEngineID_len, { "SNMPv3 Engine ID Length", "pktc.asd.snmp_engine_id.len", FT_UINT8, BASE_DEC, NULL, 0, "Length of SNMPv3 Engine ID", HFILL }}, - { &hf_pktc_snmpEngineID, { + { &hf_pktc_snmpEngineID, { "SNMPv3 Engine ID", "pktc.asd.snmp_engine_id", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_pktc_snmpEngineBoots, { + { &hf_pktc_snmpEngineBoots, { "SNMPv3 Engine Boots", "pktc.asd.snmp_engine_boots", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, - { &hf_pktc_snmpEngineTime, { + { &hf_pktc_snmpEngineTime, { "SNMPv3 Engine Time", "pktc.asd.snmp_engine_time", FT_UINT32, BASE_DEC, NULL, 0, "SNMPv3 Engine ID Time", HFILL }}, - { &hf_pktc_usmUserName_len, { + { &hf_pktc_usmUserName_len, { "SNMPv3 USM User Name Length", "pktc.asd.snmp_usm_username.len", FT_UINT8, BASE_DEC, NULL, 0, "Length of SNMPv3 USM User Name", HFILL }}, - { &hf_pktc_usmUserName, { + { &hf_pktc_usmUserName, { "SNMPv3 USM User Name", "pktc.asd.snmp_usm_username", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_pktc_ipsec_spi, { + { &hf_pktc_ipsec_spi, { "IPsec Security Parameter Index", "pktc.asd.ipsec_spi", FT_UINT32, BASE_HEX, NULL, 0, "Security Parameter Index for inbound Security Association (IPsec)", HFILL }}, - { &hf_pktc_reestablish_flag, { - "Re-establish Flag", "pktc.reestablish", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, NULL, HFILL }}, - { &hf_pktc_ack_required_flag, { - "ACK Required Flag", "pktc.ack_required", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, NULL, HFILL }}, - { &hf_pktc_sec_param_lifetime, { - "Security Parameter Lifetime", "pktc.spl", FT_UINT32, BASE_DEC, - NULL, 0, "Lifetime in seconds of security parameter", HFILL }}, + { &hf_pktc_reestablish_flag, { + "Re-establish Flag", "pktc.reestablish", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, NULL, HFILL }}, + { &hf_pktc_ack_required_flag, { + "ACK Required Flag", "pktc.ack_required", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, NULL, HFILL }}, + { &hf_pktc_sec_param_lifetime, { + "Security Parameter Lifetime", "pktc.spl", FT_UINT32, BASE_DEC, + NULL, 0, "Lifetime in seconds of security parameter", HFILL }}, { &hf_pktc_sha1_hmac, { "SHA-1 HMAC", "pktc.sha1_hmac", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, - { &hf_pktc_grace_period, { - "Grace Period", "pktc.grace_period", FT_UINT32, BASE_DEC, - NULL, 0, "Grace Period in seconds", HFILL }}, + { &hf_pktc_grace_period, { + "Grace Period", "pktc.grace_period", FT_UINT32, BASE_DEC, + NULL, 0, "Grace Period in seconds", HFILL }}, }; static gint *ett[] = { &ett_pktc, @@ -797,3 +797,16 @@ proto_reg_handoff_pktc_mtafqdn(void) pktc_mtafqdn_handle = create_dissector_handle(dissect_pktc_mtafqdn, proto_pktc); dissector_add_uint("udp.port", PKTC_MTAFQDN_PORT, pktc_mtafqdn_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-pw-common.c b/epan/dissectors/packet-pw-common.c index 399da11c54..02281659cb 100644 --- a/epan/dissectors/packet-pw-common.c +++ b/epan/dissectors/packet-pw-common.c @@ -133,3 +133,16 @@ void proto_reg_handoff_pw_padding(void) dh_data = find_dissector("data"); 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-pw-hdlc.c b/epan/dissectors/packet-pw-hdlc.c index 6933b4420e..e5d90724dd 100644 --- a/epan/dissectors/packet-pw-hdlc.c +++ b/epan/dissectors/packet-pw-hdlc.c @@ -143,7 +143,7 @@ static int dissect_pw_hdlc_nocw_hdlc_ppp( tvbuff_t * tvb, packet_info * pinfo, p } call_dissector( ppp_handle, tvb_new_subset_remaining(tvb, 2), pinfo, tree ); - return tvb_captured_length(tvb); + return tvb_captured_length(tvb); } void proto_register_pw_hdlc(void) @@ -239,3 +239,16 @@ void proto_reg_handoff_pw_hdlc(void) ppp_handle = find_dissector( "ppp" ); fr_handle = find_dissector( "fr" ); } + +/* + * 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-ripng.c b/epan/dissectors/packet-ripng.c index 75d8f0fa93..f2f3c3b2ea 100644 --- a/epan/dissectors/packet-ripng.c +++ b/epan/dissectors/packet-ripng.c @@ -52,11 +52,11 @@ static gint ett_ripng_rte = -1; #define UDP_PORT_RIPNG 521 -#define RIP6_REQUEST 1 -#define RIP6_RESPONSE 2 +#define RIP6_REQUEST 1 +#define RIP6_RESPONSE 2 static const value_string cmdvals[] = { - { RIP6_REQUEST, "Request" }, + { RIP6_REQUEST, "Request" }, { RIP6_RESPONSE, "Response" }, { 0, NULL }, }; @@ -68,50 +68,50 @@ dissect_ripng(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *ti, *rte_ti; col_set_str(pinfo->cinfo, COL_PROTOCOL, "RIPng"); - col_add_fstr(pinfo->cinfo, COL_INFO," Command %s, Version %u", - val_to_str(tvb_get_guint8(tvb, offset), cmdvals, "Unknown (%u)"), - tvb_get_guint8(tvb, offset +1)); + col_add_fstr(pinfo->cinfo, COL_INFO," Command %s, Version %u", + val_to_str(tvb_get_guint8(tvb, offset), cmdvals, "Unknown (%u)"), + tvb_get_guint8(tvb, offset +1)); if (tree) { - ti = proto_tree_add_item(tree, proto_ripng, tvb, offset, -1, ENC_NA); - ripng_tree = proto_item_add_subtree(ti, ett_ripng); + ti = proto_tree_add_item(tree, proto_ripng, tvb, offset, -1, ENC_NA); + ripng_tree = proto_item_add_subtree(ti, ett_ripng); - /* Command */ - proto_tree_add_item(ripng_tree, hf_ripng_cmd, tvb, offset, 1, ENC_BIG_ENDIAN); - offset += 1; + /* Command */ + proto_tree_add_item(ripng_tree, hf_ripng_cmd, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; - /* Version */ - proto_tree_add_item(ripng_tree, hf_ripng_version, tvb, offset, 1, ENC_BIG_ENDIAN); - offset += 1; + /* Version */ + proto_tree_add_item(ripng_tree, hf_ripng_version, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; - /* Reserved */ - proto_tree_add_item(ripng_tree, hf_ripng_reserved, tvb, offset, 2, ENC_NA); - offset += 2; + /* Reserved */ + proto_tree_add_item(ripng_tree, hf_ripng_reserved, tvb, offset, 2, ENC_NA); + offset += 2; - /* Route Table Entry */ - while (tvb_reported_length_remaining(tvb, offset) > 0) { + /* Route Table Entry */ + while (tvb_reported_length_remaining(tvb, offset) > 0) { - rte_ti = proto_tree_add_item(ripng_tree, hf_ripng_rte, tvb, offset, 16 + 2 + 1 + 1, ENC_NA); - rte_tree = proto_item_add_subtree(rte_ti, ett_ripng_rte); + rte_ti = proto_tree_add_item(ripng_tree, hf_ripng_rte, tvb, offset, 16 + 2 + 1 + 1, ENC_NA); + rte_tree = proto_item_add_subtree(rte_ti, ett_ripng_rte); - /* IPv6 Prefix */ - proto_tree_add_item(rte_tree, hf_ripng_rte_ipv6_prefix, tvb, offset, 16, ENC_NA); - proto_item_append_text(rte_ti, ": IPv6 Prefix: %s", tvb_ip6_to_str(tvb, offset)); - offset += 16; + /* IPv6 Prefix */ + proto_tree_add_item(rte_tree, hf_ripng_rte_ipv6_prefix, tvb, offset, 16, ENC_NA); + proto_item_append_text(rte_ti, ": IPv6 Prefix: %s", tvb_ip6_to_str(tvb, offset)); + offset += 16; - /* Route Tag */ - proto_tree_add_item(rte_tree, hf_ripng_rte_route_tag, tvb, offset, 2, ENC_BIG_ENDIAN); - offset += 2; + /* Route Tag */ + proto_tree_add_item(rte_tree, hf_ripng_rte_route_tag, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; - /* Prefix Length */ - proto_tree_add_item(rte_tree, hf_ripng_rte_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN); - proto_item_append_text(rte_ti, "/%u", tvb_get_guint8(tvb, offset)); - offset += 1; + /* Prefix Length */ + proto_tree_add_item(rte_tree, hf_ripng_rte_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_item_append_text(rte_ti, "/%u", tvb_get_guint8(tvb, offset)); + offset += 1; - /* Metric */ - proto_tree_add_item(rte_tree, hf_ripng_rte_metric, tvb, offset, 1, ENC_BIG_ENDIAN); - proto_item_append_text(rte_ti, " Metric: %u", tvb_get_guint8(tvb, offset)); - offset += 1; + /* Metric */ + proto_tree_add_item(rte_tree, hf_ripng_rte_metric, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_item_append_text(rte_ti, " Metric: %u", tvb_get_guint8(tvb, offset)); + offset += 1; } } } @@ -120,45 +120,45 @@ void proto_register_ripng(void) { static hf_register_info hf[] = { - { &hf_ripng_cmd, - { "Command", "ripng.cmd", - FT_UINT8, BASE_DEC, VALS(cmdvals), 0x0, - "Used to specify the purpose of this message", HFILL }}, - { &hf_ripng_version, - { "Version", "ripng.version", - FT_UINT8, BASE_DEC, NULL, 0x0, - "Version of RIPng", HFILL }}, - { &hf_ripng_reserved, - { "Reserved", "ripng.reserved", - FT_BYTES, BASE_NONE, NULL, 0x0, - "Must be Zero", HFILL }}, - { &hf_ripng_rte, - { "Route Table Entry", "ripng.rte", - FT_NONE, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, - { &hf_ripng_rte_ipv6_prefix, - { "IPv6 Prefix", "ripng.rte.ipv6_prefix", - FT_IPv6, BASE_NONE, NULL, 0x0, - "Destination", HFILL }}, - { &hf_ripng_rte_route_tag, - { "Route Tag", "ripng.rte.route_tag", - FT_UINT16, BASE_HEX, NULL, 0x0, - "Provides a method of separating internal RIPng routes (routes for networks within the RIPng routing domain) from external RIPng routes, which may have been imported from an EGP or another IGP", HFILL }}, - - { &hf_ripng_rte_prefix_length, - { "Prefix Length", "ripng.rte.prefix_length", - FT_UINT8, BASE_DEC, NULL, 0x0, - "The length in bits of the significant part of the prefix starting from the left of the prefix", HFILL }}, - - { &hf_ripng_rte_metric, - { "Metric", "ripng.rte.metric", - FT_UINT8, BASE_DEC, NULL, 0x0, - "The current metric for the destination; the value 16 (infinity) indicates that the destination is not reachable", HFILL }}, + { &hf_ripng_cmd, + { "Command", "ripng.cmd", + FT_UINT8, BASE_DEC, VALS(cmdvals), 0x0, + "Used to specify the purpose of this message", HFILL }}, + { &hf_ripng_version, + { "Version", "ripng.version", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Version of RIPng", HFILL }}, + { &hf_ripng_reserved, + { "Reserved", "ripng.reserved", + FT_BYTES, BASE_NONE, NULL, 0x0, + "Must be Zero", HFILL }}, + { &hf_ripng_rte, + { "Route Table Entry", "ripng.rte", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_ripng_rte_ipv6_prefix, + { "IPv6 Prefix", "ripng.rte.ipv6_prefix", + FT_IPv6, BASE_NONE, NULL, 0x0, + "Destination", HFILL }}, + { &hf_ripng_rte_route_tag, + { "Route Tag", "ripng.rte.route_tag", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Provides a method of separating internal RIPng routes (routes for networks within the RIPng routing domain) from external RIPng routes, which may have been imported from an EGP or another IGP", HFILL }}, + + { &hf_ripng_rte_prefix_length, + { "Prefix Length", "ripng.rte.prefix_length", + FT_UINT8, BASE_DEC, NULL, 0x0, + "The length in bits of the significant part of the prefix starting from the left of the prefix", HFILL }}, + + { &hf_ripng_rte_metric, + { "Metric", "ripng.rte.metric", + FT_UINT8, BASE_DEC, NULL, 0x0, + "The current metric for the destination; the value 16 (infinity) indicates that the destination is not reachable", HFILL }}, }; static gint *ett[] = { - &ett_ripng, - &ett_ripng_rte, + &ett_ripng, + &ett_ripng_rte, }; proto_ripng = proto_register_protocol("RIPng", "RIPng", "ripng"); @@ -174,3 +174,16 @@ proto_reg_handoff_ripng(void) ripng_handle = create_dissector_handle(dissect_ripng, proto_ripng); dissector_add_uint("udp.port", UDP_PORT_RIPNG, ripng_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-rmcp.c b/epan/dissectors/packet-rmcp.c index 446a97e3bf..4275f3febe 100644 --- a/epan/dissectors/packet-rmcp.c +++ b/epan/dissectors/packet-rmcp.c @@ -264,3 +264,16 @@ proto_reg_handoff_rsp(void) rsp_handle = new_create_dissector_handle(dissect_rsp, proto_rsp); dissector_add_uint("udp.port", UDP_PORT_RMCP_SECURE, rsp_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-rstat.c b/epan/dissectors/packet-rstat.c index e63ce7b8cc..9512eff37f 100644 --- a/epan/dissectors/packet-rstat.c +++ b/epan/dissectors/packet-rstat.c @@ -149,3 +149,16 @@ proto_reg_handoff_rstat(void) rpc_init_proc_table(RSTAT_PROGRAM, 3, rstat3_proc, hf_rstat_procedure_v3); rpc_init_proc_table(RSTAT_PROGRAM, 4, rstat4_proc, hf_rstat_procedure_v4); } + +/* + * 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-sdlc.c b/epan/dissectors/packet-sdlc.c index b61198f60b..21de5db9e3 100644 --- a/epan/dissectors/packet-sdlc.c +++ b/epan/dissectors/packet-sdlc.c @@ -145,47 +145,47 @@ proto_register_sdlc(void) static hf_register_info hf[] = { { &hf_sdlc_address, { "Address Field", "sdlc.address", FT_UINT8, BASE_HEX, - NULL, 0x0, "Address", HFILL }}, + NULL, 0x0, "Address", HFILL }}, { &hf_sdlc_control, { "Control Field", "sdlc.control", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdlc_n_r, - { "N(R)", "sdlc.control.n_r", FT_UINT8, BASE_DEC, - NULL, XDLC_N_R_MASK, NULL, HFILL }}, + { "N(R)", "sdlc.control.n_r", FT_UINT8, BASE_DEC, + NULL, XDLC_N_R_MASK, NULL, HFILL }}, { &hf_sdlc_n_s, - { "N(S)", "sdlc.control.n_s", FT_UINT8, BASE_DEC, - NULL, XDLC_N_S_MASK, NULL, HFILL }}, + { "N(S)", "sdlc.control.n_s", FT_UINT8, BASE_DEC, + NULL, XDLC_N_S_MASK, NULL, HFILL }}, { &hf_sdlc_p, - { "Poll", "sdlc.control.p", FT_BOOLEAN, 8, - TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }}, + { "Poll", "sdlc.control.p", FT_BOOLEAN, 8, + TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }}, { &hf_sdlc_f, - { "Final", "sdlc.control.f", FT_BOOLEAN, 8, - TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }}, + { "Final", "sdlc.control.f", FT_BOOLEAN, 8, + TFS(&tfs_set_notset), XDLC_P_F, NULL, HFILL }}, { &hf_sdlc_s_ftype, - { "Supervisory frame type", "sdlc.control.s_ftype", FT_UINT8, BASE_HEX, - VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }}, + { "Supervisory frame type", "sdlc.control.s_ftype", FT_UINT8, BASE_HEX, + VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }}, { &hf_sdlc_u_modifier_cmd, - { "Command", "sdlc.control.u_modifier_cmd", FT_UINT8, BASE_HEX, - VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, + { "Command", "sdlc.control.u_modifier_cmd", FT_UINT8, BASE_HEX, + VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, { &hf_sdlc_u_modifier_resp, - { "Response", "sdlc.control.u_modifier_resp", FT_UINT8, BASE_HEX, - VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, + { "Response", "sdlc.control.u_modifier_resp", FT_UINT8, BASE_HEX, + VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, { &hf_sdlc_ftype_i, - { "Frame type", "sdlc.control.ftype", FT_UINT8, BASE_HEX, - VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }}, + { "Frame type", "sdlc.control.ftype", FT_UINT8, BASE_HEX, + VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }}, { &hf_sdlc_ftype_s_u, - { "Frame type", "sdlc.control.ftype", FT_UINT8, BASE_HEX, - VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, + { "Frame type", "sdlc.control.ftype", FT_UINT8, BASE_HEX, + VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, }; static gint *ett[] = { &ett_sdlc, @@ -193,7 +193,7 @@ proto_register_sdlc(void) }; proto_sdlc = proto_register_protocol( - "Synchronous Data Link Control (SDLC)", "SDLC", "sdlc"); + "Synchronous Data Link Control (SDLC)", "SDLC", "sdlc"); proto_register_field_array(proto_sdlc, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } @@ -212,3 +212,16 @@ proto_reg_handoff_sdlc(void) sdlc_handle = create_dissector_handle(dissect_sdlc, proto_sdlc); dissector_add_uint("wtap_encap", WTAP_ENCAP_SDLC, sdlc_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-syslog.c b/epan/dissectors/packet-syslog.c index f50c80e135..f03e3a6a4a 100644 --- a/epan/dissectors/packet-syslog.c +++ b/epan/dissectors/packet-syslog.c @@ -47,115 +47,115 @@ void proto_register_syslog(void); /* The maximum number if priority digits to read in. */ #define MAX_DIGITS 3 -#define LEVEL_EMERG 0 -#define LEVEL_ALERT 1 -#define LEVEL_CRIT 2 -#define LEVEL_ERR 3 -#define LEVEL_WARNING 4 -#define LEVEL_NOTICE 5 -#define LEVEL_INFO 6 -#define LEVEL_DEBUG 7 +#define LEVEL_EMERG 0 +#define LEVEL_ALERT 1 +#define LEVEL_CRIT 2 +#define LEVEL_ERR 3 +#define LEVEL_WARNING 4 +#define LEVEL_NOTICE 5 +#define LEVEL_INFO 6 +#define LEVEL_DEBUG 7 static const value_string short_lev[] = { - { LEVEL_EMERG, "EMERG" }, - { LEVEL_ALERT, "ALERT" }, - { LEVEL_CRIT, "CRIT" }, - { LEVEL_ERR, "ERR" }, - { LEVEL_WARNING, "WARNING" }, - { LEVEL_NOTICE, "NOTICE" }, - { LEVEL_INFO, "INFO" }, - { LEVEL_DEBUG, "DEBUG" }, + { LEVEL_EMERG, "EMERG" }, + { LEVEL_ALERT, "ALERT" }, + { LEVEL_CRIT, "CRIT" }, + { LEVEL_ERR, "ERR" }, + { LEVEL_WARNING, "WARNING" }, + { LEVEL_NOTICE, "NOTICE" }, + { LEVEL_INFO, "INFO" }, + { LEVEL_DEBUG, "DEBUG" }, { 0, NULL } }; -#define FAC_KERN 0 -#define FAC_USER 1 -#define FAC_MAIL 2 -#define FAC_DAEMON 3 -#define FAC_AUTH 4 -#define FAC_SYSLOG 5 -#define FAC_LPR 6 -#define FAC_NEWS 7 -#define FAC_UUCP 8 -#define FAC_CRON 9 -#define FAC_AUTHPRIV 10 -#define FAC_FTP 11 -#define FAC_NTP 12 -#define FAC_LOGAUDIT 13 -#define FAC_LOGALERT 14 -#define FAC_CRON_SOL 15 -#define FAC_LOCAL0 16 -#define FAC_LOCAL1 17 -#define FAC_LOCAL2 18 -#define FAC_LOCAL3 19 -#define FAC_LOCAL4 20 -#define FAC_LOCAL5 21 -#define FAC_LOCAL6 22 -#define FAC_LOCAL7 23 +#define FAC_KERN 0 +#define FAC_USER 1 +#define FAC_MAIL 2 +#define FAC_DAEMON 3 +#define FAC_AUTH 4 +#define FAC_SYSLOG 5 +#define FAC_LPR 6 +#define FAC_NEWS 7 +#define FAC_UUCP 8 +#define FAC_CRON 9 +#define FAC_AUTHPRIV 10 +#define FAC_FTP 11 +#define FAC_NTP 12 +#define FAC_LOGAUDIT 13 +#define FAC_LOGALERT 14 +#define FAC_CRON_SOL 15 +#define FAC_LOCAL0 16 +#define FAC_LOCAL1 17 +#define FAC_LOCAL2 18 +#define FAC_LOCAL3 19 +#define FAC_LOCAL4 20 +#define FAC_LOCAL5 21 +#define FAC_LOCAL6 22 +#define FAC_LOCAL7 23 static const value_string short_fac[] = { - { FAC_KERN, "KERN" }, - { FAC_USER, "USER" }, - { FAC_MAIL, "MAIL" }, - { FAC_DAEMON, "DAEMON" }, - { FAC_AUTH, "AUTH" }, - { FAC_SYSLOG, "SYSLOG" }, - { FAC_LPR, "LPR" }, - { FAC_NEWS, "NEWS" }, - { FAC_UUCP, "UUCP" }, - { FAC_CRON, "CRON" }, /* The BSDs, Linux, and others */ - { FAC_AUTHPRIV, "AUTHPRIV" }, - { FAC_FTP, "FTP" }, - { FAC_NTP, "NTP" }, - { FAC_LOGAUDIT, "LOGAUDIT" }, - { FAC_LOGALERT, "LOGALERT" }, - { FAC_CRON_SOL, "CRON" }, /* Solaris */ - { FAC_LOCAL0, "LOCAL0" }, - { FAC_LOCAL1, "LOCAL1" }, - { FAC_LOCAL2, "LOCAL2" }, - { FAC_LOCAL3, "LOCAL3" }, - { FAC_LOCAL4, "LOCAL4" }, - { FAC_LOCAL5, "LOCAL5" }, - { FAC_LOCAL6, "LOCAL6" }, - { FAC_LOCAL7, "LOCAL7" }, + { FAC_KERN, "KERN" }, + { FAC_USER, "USER" }, + { FAC_MAIL, "MAIL" }, + { FAC_DAEMON, "DAEMON" }, + { FAC_AUTH, "AUTH" }, + { FAC_SYSLOG, "SYSLOG" }, + { FAC_LPR, "LPR" }, + { FAC_NEWS, "NEWS" }, + { FAC_UUCP, "UUCP" }, + { FAC_CRON, "CRON" }, /* The BSDs, Linux, and others */ + { FAC_AUTHPRIV, "AUTHPRIV" }, + { FAC_FTP, "FTP" }, + { FAC_NTP, "NTP" }, + { FAC_LOGAUDIT, "LOGAUDIT" }, + { FAC_LOGALERT, "LOGALERT" }, + { FAC_CRON_SOL, "CRON" }, /* Solaris */ + { FAC_LOCAL0, "LOCAL0" }, + { FAC_LOCAL1, "LOCAL1" }, + { FAC_LOCAL2, "LOCAL2" }, + { FAC_LOCAL3, "LOCAL3" }, + { FAC_LOCAL4, "LOCAL4" }, + { FAC_LOCAL5, "LOCAL5" }, + { FAC_LOCAL6, "LOCAL6" }, + { FAC_LOCAL7, "LOCAL7" }, { 0, NULL } }; static const value_string long_lev[] = { - { LEVEL_EMERG, "EMERG - system is unusable" }, - { LEVEL_ALERT, "ALERT - action must be taken immediately" }, - { LEVEL_CRIT, "CRIT - critical conditions" }, - { LEVEL_ERR, "ERR - error conditions" }, - { LEVEL_WARNING, "WARNING - warning conditions" }, - { LEVEL_NOTICE, "NOTICE - normal but significant condition" }, - { LEVEL_INFO, "INFO - informational" }, - { LEVEL_DEBUG, "DEBUG - debug-level messages" }, + { LEVEL_EMERG, "EMERG - system is unusable" }, + { LEVEL_ALERT, "ALERT - action must be taken immediately" }, + { LEVEL_CRIT, "CRIT - critical conditions" }, + { LEVEL_ERR, "ERR - error conditions" }, + { LEVEL_WARNING, "WARNING - warning conditions" }, + { LEVEL_NOTICE, "NOTICE - normal but significant condition" }, + { LEVEL_INFO, "INFO - informational" }, + { LEVEL_DEBUG, "DEBUG - debug-level messages" }, { 0, NULL } }; static const value_string long_fac[] = { - { FAC_KERN, "KERN - kernel messages" }, - { FAC_USER, "USER - random user-level messages" }, - { FAC_MAIL, "MAIL - mail system" }, - { FAC_DAEMON, "DAEMON - system daemons" }, - { FAC_AUTH, "AUTH - security/authorization messages" }, - { FAC_SYSLOG, "SYSLOG - messages generated internally by syslogd" }, - { FAC_LPR, "LPR - line printer subsystem" }, - { FAC_NEWS, "NEWS - network news subsystem" }, - { FAC_UUCP, "UUCP - UUCP subsystem" }, - { FAC_CRON, "CRON - clock daemon (BSD, Linux)" }, - { FAC_AUTHPRIV, "AUTHPRIV - security/authorization messages (private)" }, - { FAC_FTP, "FTP - ftp daemon" }, - { FAC_NTP, "NTP - ntp subsystem" }, - { FAC_LOGAUDIT, "LOGAUDIT - log audit" }, - { FAC_LOGALERT, "LOGALERT - log alert" }, - { FAC_CRON_SOL, "CRON - clock daemon (Solaris)" }, - { FAC_LOCAL0, "LOCAL0 - reserved for local use" }, - { FAC_LOCAL1, "LOCAL1 - reserved for local use" }, - { FAC_LOCAL2, "LOCAL2 - reserved for local use" }, - { FAC_LOCAL3, "LOCAL3 - reserved for local use" }, - { FAC_LOCAL4, "LOCAL4 - reserved for local use" }, - { FAC_LOCAL5, "LOCAL5 - reserved for local use" }, - { FAC_LOCAL6, "LOCAL6 - reserved for local use" }, - { FAC_LOCAL7, "LOCAL7 - reserved for local use" }, + { FAC_KERN, "KERN - kernel messages" }, + { FAC_USER, "USER - random user-level messages" }, + { FAC_MAIL, "MAIL - mail system" }, + { FAC_DAEMON, "DAEMON - system daemons" }, + { FAC_AUTH, "AUTH - security/authorization messages" }, + { FAC_SYSLOG, "SYSLOG - messages generated internally by syslogd" }, + { FAC_LPR, "LPR - line printer subsystem" }, + { FAC_NEWS, "NEWS - network news subsystem" }, + { FAC_UUCP, "UUCP - UUCP subsystem" }, + { FAC_CRON, "CRON - clock daemon (BSD, Linux)" }, + { FAC_AUTHPRIV, "AUTHPRIV - security/authorization messages (private)" }, + { FAC_FTP, "FTP - ftp daemon" }, + { FAC_NTP, "NTP - ntp subsystem" }, + { FAC_LOGAUDIT, "LOGAUDIT - log audit" }, + { FAC_LOGALERT, "LOGALERT - log alert" }, + { FAC_CRON_SOL, "CRON - clock daemon (Solaris)" }, + { FAC_LOCAL0, "LOCAL0 - reserved for local use" }, + { FAC_LOCAL1, "LOCAL1 - reserved for local use" }, + { FAC_LOCAL2, "LOCAL2 - reserved for local use" }, + { FAC_LOCAL3, "LOCAL3 - reserved for local use" }, + { FAC_LOCAL4, "LOCAL4 - reserved for local use" }, + { FAC_LOCAL5, "LOCAL5 - reserved for local use" }, + { FAC_LOCAL6, "LOCAL6 - reserved for local use" }, + { FAC_LOCAL7, "LOCAL7 - reserved for local use" }, { 0, NULL } }; @@ -207,14 +207,14 @@ mtp3_msu_present(tvbuff_t *tvb, packet_info *pinfo, gint fac, gint level, const * subdissector will except out, of course). */ if (len % 2) - msu_hex_dump[len - 1] = '\0'; + msu_hex_dump[len - 1] = '\0'; byte_array = convert_string_to_hex(msu_hex_dump, &nbytes); if (byte_array) { - mtp3_tvb = tvb_new_child_real_data(tvb, byte_array, (guint)nbytes, + mtp3_tvb = tvb_new_child_real_data(tvb, byte_array, (guint)nbytes, (guint)nbytes + chars_truncated / 2); - tvb_set_free_cb(mtp3_tvb, g_free); + tvb_set_free_cb(mtp3_tvb, g_free); /* ...and add the encapsulated MSU as a new data source so that it gets * its own tab in the packet bytes pane. */ @@ -261,7 +261,7 @@ dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) reported_msg_len = tvb_reported_length_remaining(tvb, msg_off); mtp3_tvb = mtp3_msu_present(tvb, pinfo, fac, lev, msg_str, - (reported_msg_len - msg_len)); + (reported_msg_len - msg_len)); if (mtp3_tvb == NULL) { if (pri >= 0) { @@ -296,7 +296,7 @@ dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (mtp3_tvb) { proto_item *mtp3_item; mtp3_item = proto_tree_add_boolean(syslog_tree, hf_syslog_msu_present, - tvb, msg_off, msg_len, TRUE); + tvb, msg_off, msg_len, TRUE); PROTO_ITEM_SET_GENERATED(mtp3_item); } } @@ -317,24 +317,24 @@ void proto_register_syslog(void) static hf_register_info hf[] = { { &hf_syslog_facility, { "Facility", "syslog.facility", - FT_UINT8, BASE_DEC, VALS(long_fac), FACILITY_MASK, - "Message facility", HFILL } + FT_UINT8, BASE_DEC, VALS(long_fac), FACILITY_MASK, + "Message facility", HFILL } }, { &hf_syslog_level, { "Level", "syslog.level", - FT_UINT8, BASE_DEC, VALS(long_lev), PRIORITY_MASK, - "Message level", HFILL } + FT_UINT8, BASE_DEC, VALS(long_lev), PRIORITY_MASK, + "Message level", HFILL } }, { &hf_syslog_msg, { "Message", "syslog.msg", - FT_STRING, BASE_NONE, NULL, 0x0, - "Message Text", HFILL } + FT_STRING, BASE_NONE, NULL, 0x0, + "Message Text", HFILL } }, { &hf_syslog_msu_present, { "SS7 MSU present", "syslog.msu_present", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "True if an SS7 MSU was detected in the syslog message", - HFILL } + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "True if an SS7 MSU was detected in the syslog message", + HFILL } } }; @@ -362,3 +362,16 @@ proto_reg_handoff_syslog(void) /* Find the mtp3 dissector */ mtp_handle = find_dissector("mtp3"); } + +/* + * 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-tdmoe.c b/epan/dissectors/packet-tdmoe.c index 9559883a46..799ba8119e 100644 --- a/epan/dissectors/packet-tdmoe.c +++ b/epan/dissectors/packet-tdmoe.c @@ -133,29 +133,29 @@ proto_register_tdmoe(void) static hf_register_info hf[] = { { &hf_tdmoe_subaddress, - { "Subaddress", "tdmoe.subaddress", FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + { "Subaddress", "tdmoe.subaddress", FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_tdmoe_samples, - { "Samples", "tdmoe.samples", FT_UINT8, BASE_DEC, NULL, 0x0, - "Samples per channel", HFILL }}, + { "Samples", "tdmoe.samples", FT_UINT8, BASE_DEC, NULL, 0x0, + "Samples per channel", HFILL }}, { &hf_tdmoe_flags, - { "Flags", "tdmoe.flags", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, + { "Flags", "tdmoe.flags", FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, { &hf_tdmoe_yellow_alarm, - { "Yellow Alarm", "tdmoe.yellowalarm", FT_BOOLEAN, 8, NULL, TDMOE_YELLOW_ALARM_BITMASK, - NULL, HFILL }}, + { "Yellow Alarm", "tdmoe.yellowalarm", FT_BOOLEAN, 8, NULL, TDMOE_YELLOW_ALARM_BITMASK, + NULL, HFILL }}, { &hf_tdmoe_sig_bits_present, - { "Sig bits present", "tdmoe.sig_bits_present", FT_BOOLEAN, 8, NULL, TDMOE_SIGBITS_BITMASK, - NULL, HFILL }}, + { "Sig bits present", "tdmoe.sig_bits_present", FT_BOOLEAN, 8, NULL, TDMOE_SIGBITS_BITMASK, + NULL, HFILL }}, { &hf_tdmoe_packet_counter, - { "Counter", "tdmoe.counter", FT_UINT16, BASE_DEC, NULL, 0x0, - "Packet number", HFILL }}, + { "Counter", "tdmoe.counter", FT_UINT16, BASE_DEC, NULL, 0x0, + "Packet number", HFILL }}, { &hf_tdmoe_channels, - { "Channels", "tdmoe.channels", FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + { "Channels", "tdmoe.channels", FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_tdmoe_sig_bits, - { "Sig bits", "tdmoe.sig_bits", FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + { "Sig bits", "tdmoe.sig_bits", FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, }; static gint *ett[] = { &ett_tdmoe, @@ -168,9 +168,9 @@ proto_register_tdmoe(void) proto_register_subtree_array(ett, array_length(ett)); tdmoe_module = prefs_register_protocol(proto_tdmoe, proto_reg_handoff_tdmoe); prefs_register_uint_preference(tdmoe_module, "d_channel", - "TDMoE D-Channel", - "The TDMoE channel that contains the D-Channel.", - 10, &pref_tdmoe_d_channel); + "TDMoE D-Channel", + "The TDMoE channel that contains the D-Channel.", + 10, &pref_tdmoe_d_channel); } void @@ -184,3 +184,16 @@ proto_reg_handoff_tdmoe(void) lapd_handle = find_dissector("lapd-bitstream"); 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-text-media.c b/epan/dissectors/packet-text-media.c index 824d5d1119..a6ad1d56ba 100644 --- a/epan/dissectors/packet-text-media.c +++ b/epan/dissectors/packet-text-media.c @@ -180,3 +180,16 @@ proto_reg_handoff_text_lines(void) dissector_add_string("media_type", "application/x-rtsp-udp-packetpair", text_lines_handle); xml_handle = find_dissector("xml"); } + +/* + * 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-turnchannel.c b/epan/dissectors/packet-turnchannel.c index b9da7eaac0..6376e07b31 100644 --- a/epan/dissectors/packet-turnchannel.c +++ b/epan/dissectors/packet-turnchannel.c @@ -61,7 +61,7 @@ static int dissect_turnchannel_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - guint len; + guint len; guint16 channel_id; guint16 data_len; proto_item *ti; @@ -139,11 +139,11 @@ dissect_turnchannel_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi static gboolean dissect_turnchannel_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - guint len; + guint len; guint16 channel_id; guint16 data_len; - len = tvb_length(tvb); + len = tvb_length(tvb); /* First, make sure we have enough data to do the check. */ if (len < TURNCHANNEL_HDR_LEN) { return FALSE; @@ -218,3 +218,16 @@ proto_reg_handoff_turnchannel(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-vntag.c b/epan/dissectors/packet-vntag.c index 16a9232f29..348e98572d 100644 --- a/epan/dissectors/packet-vntag.c +++ b/epan/dissectors/packet-vntag.c @@ -144,3 +144,16 @@ proto_reg_handoff_vntag(void) ethertype_handle = find_dissector("ethertype"); } + +/* + * 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-xot.c b/epan/dissectors/packet-xot.c index ae12d5b791..fb5b3da1ef 100644 --- a/epan/dissectors/packet-xot.c +++ b/epan/dissectors/packet-xot.c @@ -1,7 +1,7 @@ /* packet-xot.c * Routines for X.25 over TCP dissection (RFC 1613) * - * Copyright 2000, Paul Ionescu + * Copyright 2000, Paul Ionescu * * Wireshark - Network traffic analyzer * By Gerald Combs @@ -38,10 +38,10 @@ /* Some X25 macros from packet-x25.c - some adapted code as well below */ #define X25_MIN_HEADER_LENGTH 3 #define X25_MIN_M128_HEADER_LENGTH 4 -#define X25_NONDATA_BIT 0x01 -#define PACKET_IS_DATA(type) (!(type & X25_NONDATA_BIT)) -#define X25_MBIT_MOD8 0x10 -#define X25_MBIT_MOD128 0x01 +#define X25_NONDATA_BIT 0x01 +#define PACKET_IS_DATA(type) (!(type & X25_NONDATA_BIT)) +#define X25_MBIT_MOD8 0x10 +#define X25_MBIT_MOD128 0x01 void proto_register_xot(void); void proto_reg_handoff_xot(void); @@ -187,93 +187,93 @@ static guint get_xot_pdu_len_mult(packet_info *pinfo _U_, tvbuff_t *tvb, int off static int dissect_xot_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { - int offset = 0; - guint16 version; - guint16 plen; - guint8 pkt_type; - proto_item *ti = NULL; - proto_tree *xot_tree = NULL; - tvbuff_t *next_tvb; - - /* - * Dissect the X.25-over-TCP packet. - */ - col_set_str(pinfo->cinfo, COL_PROTOCOL, "XOT"); - version = tvb_get_ntohs(tvb, offset + 0); - plen = tvb_get_ntohs(tvb, offset + 2); - col_add_fstr(pinfo->cinfo, COL_INFO, "XOT Version = %u, size = %u", - version, plen); - if (offset == 0 && - tvb_length_remaining(tvb, offset) > XOT_HEADER_LENGTH + plen ) - col_append_fstr(pinfo->cinfo, COL_INFO, " TotX25: %d", - tvb_length_remaining(tvb, offset)); - - if (tree) { - ti = proto_tree_add_protocol_format(tree, proto_xot, tvb, offset, XOT_HEADER_LENGTH, - "X.25 over TCP"); - xot_tree = proto_item_add_subtree(ti, ett_xot); - - proto_tree_add_uint(xot_tree, hf_xot_version, tvb, offset, 2, version); - proto_tree_add_uint(xot_tree, hf_xot_length, tvb, offset + 2, 2, plen); - } - - offset += XOT_HEADER_LENGTH; - /* - * Construct a tvbuff containing the amount of the payload we have - * available. Make its reported length the amount of data in the - * X.25-over-TCP packet. - */ - if (plen >= X25_MIN_HEADER_LENGTH) { - pkt_type = tvb_get_guint8(tvb, offset + 2); - if (pkt_type == XOT_PVC_SETUP) { - guint init_itf_name_len, resp_itf_name_len, pkt_size; - gint hdr_offset = offset; - - col_set_str(pinfo->cinfo, COL_INFO, "XOT PVC Setup"); - proto_item_set_len(ti, XOT_HEADER_LENGTH + plen); - - /* These fields are in overlay with packet-x25.c */ - proto_tree_add_item(xot_tree, hf_x25_gfi, tvb, hdr_offset, 2, ENC_BIG_ENDIAN); - proto_tree_add_item(xot_tree, hf_x25_lcn, tvb, hdr_offset, 2, ENC_BIG_ENDIAN); - hdr_offset += 2; - proto_tree_add_item(xot_tree, hf_x25_type, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); - hdr_offset += 1; - - proto_tree_add_item(xot_tree, hf_xot_pvc_version, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); - hdr_offset += 1; - proto_tree_add_item(xot_tree, hf_xot_pvc_status, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); - hdr_offset += 1; - proto_tree_add_item(xot_tree, hf_xot_pvc_init_itf_name_len, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); - init_itf_name_len = tvb_get_guint8(tvb, hdr_offset); - hdr_offset += 1; - proto_tree_add_item(xot_tree, hf_xot_pvc_init_lcn, tvb, hdr_offset, 2, ENC_BIG_ENDIAN); - hdr_offset += 2; - proto_tree_add_item(xot_tree, hf_xot_pvc_resp_itf_name_len, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); - resp_itf_name_len = tvb_get_guint8(tvb, hdr_offset); - hdr_offset += 1; - proto_tree_add_item(xot_tree, hf_xot_pvc_resp_lcn, tvb, hdr_offset, 2, ENC_BIG_ENDIAN); - hdr_offset += 2; - proto_tree_add_item(xot_tree, hf_xot_pvc_send_inc_window, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); - hdr_offset += 1; - proto_tree_add_item(xot_tree, hf_xot_pvc_send_out_window, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); - hdr_offset += 1; - pkt_size = 1 << tvb_get_guint8(tvb, hdr_offset); - proto_tree_add_uint(xot_tree, hf_xot_pvc_send_inc_pkt_size, tvb, hdr_offset, 1, pkt_size); - hdr_offset += 1; - pkt_size = 1 << tvb_get_guint8(tvb, hdr_offset); - proto_tree_add_uint(xot_tree, hf_xot_pvc_send_out_pkt_size, tvb, hdr_offset, 1, pkt_size); - hdr_offset += 1; - proto_tree_add_item(xot_tree, hf_xot_pvc_init_itf_name, tvb, hdr_offset, init_itf_name_len, ENC_ASCII|ENC_NA); - hdr_offset += init_itf_name_len; - proto_tree_add_item(xot_tree, hf_xot_pvc_resp_itf_name, tvb, hdr_offset, resp_itf_name_len, ENC_ASCII|ENC_NA); - } else { - next_tvb = tvb_new_subset(tvb, offset, - MIN(plen, tvb_length_remaining(tvb, offset)), plen); - call_dissector(x25_handle, next_tvb, pinfo, tree); - } - } - - return tvb_length(tvb); + int offset = 0; + guint16 version; + guint16 plen; + guint8 pkt_type; + proto_item *ti = NULL; + proto_tree *xot_tree = NULL; + tvbuff_t *next_tvb; + + /* + * Dissect the X.25-over-TCP packet. + */ + col_set_str(pinfo->cinfo, COL_PROTOCOL, "XOT"); + version = tvb_get_ntohs(tvb, offset + 0); + plen = tvb_get_ntohs(tvb, offset + 2); + col_add_fstr(pinfo->cinfo, COL_INFO, "XOT Version = %u, size = %u", + version, plen); + if (offset == 0 && + tvb_length_remaining(tvb, offset) > XOT_HEADER_LENGTH + plen ) + col_append_fstr(pinfo->cinfo, COL_INFO, " TotX25: %d", + tvb_length_remaining(tvb, offset)); + + if (tree) { + ti = proto_tree_add_protocol_format(tree, proto_xot, tvb, offset, XOT_HEADER_LENGTH, + "X.25 over TCP"); + xot_tree = proto_item_add_subtree(ti, ett_xot); + + proto_tree_add_uint(xot_tree, hf_xot_version, tvb, offset, 2, version); + proto_tree_add_uint(xot_tree, hf_xot_length, tvb, offset + 2, 2, plen); + } + + offset += XOT_HEADER_LENGTH; + /* + * Construct a tvbuff containing the amount of the payload we have + * available. Make its reported length the amount of data in the + * X.25-over-TCP packet. + */ + if (plen >= X25_MIN_HEADER_LENGTH) { + pkt_type = tvb_get_guint8(tvb, offset + 2); + if (pkt_type == XOT_PVC_SETUP) { + guint init_itf_name_len, resp_itf_name_len, pkt_size; + gint hdr_offset = offset; + + col_set_str(pinfo->cinfo, COL_INFO, "XOT PVC Setup"); + proto_item_set_len(ti, XOT_HEADER_LENGTH + plen); + + /* These fields are in overlay with packet-x25.c */ + proto_tree_add_item(xot_tree, hf_x25_gfi, tvb, hdr_offset, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(xot_tree, hf_x25_lcn, tvb, hdr_offset, 2, ENC_BIG_ENDIAN); + hdr_offset += 2; + proto_tree_add_item(xot_tree, hf_x25_type, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); + hdr_offset += 1; + + proto_tree_add_item(xot_tree, hf_xot_pvc_version, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); + hdr_offset += 1; + proto_tree_add_item(xot_tree, hf_xot_pvc_status, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); + hdr_offset += 1; + proto_tree_add_item(xot_tree, hf_xot_pvc_init_itf_name_len, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); + init_itf_name_len = tvb_get_guint8(tvb, hdr_offset); + hdr_offset += 1; + proto_tree_add_item(xot_tree, hf_xot_pvc_init_lcn, tvb, hdr_offset, 2, ENC_BIG_ENDIAN); + hdr_offset += 2; + proto_tree_add_item(xot_tree, hf_xot_pvc_resp_itf_name_len, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); + resp_itf_name_len = tvb_get_guint8(tvb, hdr_offset); + hdr_offset += 1; + proto_tree_add_item(xot_tree, hf_xot_pvc_resp_lcn, tvb, hdr_offset, 2, ENC_BIG_ENDIAN); + hdr_offset += 2; + proto_tree_add_item(xot_tree, hf_xot_pvc_send_inc_window, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); + hdr_offset += 1; + proto_tree_add_item(xot_tree, hf_xot_pvc_send_out_window, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); + hdr_offset += 1; + pkt_size = 1 << tvb_get_guint8(tvb, hdr_offset); + proto_tree_add_uint(xot_tree, hf_xot_pvc_send_inc_pkt_size, tvb, hdr_offset, 1, pkt_size); + hdr_offset += 1; + pkt_size = 1 << tvb_get_guint8(tvb, hdr_offset); + proto_tree_add_uint(xot_tree, hf_xot_pvc_send_out_pkt_size, tvb, hdr_offset, 1, pkt_size); + hdr_offset += 1; + proto_tree_add_item(xot_tree, hf_xot_pvc_init_itf_name, tvb, hdr_offset, init_itf_name_len, ENC_ASCII|ENC_NA); + hdr_offset += init_itf_name_len; + proto_tree_add_item(xot_tree, hf_xot_pvc_resp_itf_name, tvb, hdr_offset, resp_itf_name_len, ENC_ASCII|ENC_NA); + } else { + next_tvb = tvb_new_subset(tvb, offset, + MIN(plen, tvb_length_remaining(tvb, offset)), plen); + call_dissector(x25_handle, next_tvb, pinfo, tree); + } + } + + return tvb_length(tvb); } static int dissect_xot_mult(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) @@ -350,105 +350,118 @@ static int dissect_xot_tcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t void proto_register_xot(void) { - static hf_register_info hf[] = { - { &hf_xot_version, - { "Version", "xot.version", FT_UINT16, BASE_DEC, - NULL, 0, "Version of X.25 over TCP protocol", HFILL }}, - - { &hf_xot_length, - { "Length", "xot.length", FT_UINT16, BASE_DEC, - NULL, 0, "Length of X.25 over TCP packet", HFILL }}, - /* These fields are in overlay with packet-x25.c */ - { &hf_x25_gfi, - { "GFI", "x25.gfi", FT_UINT16, BASE_DEC, - NULL, 0xF000, "General Format Identifier", HFILL }}, - - { &hf_x25_lcn, - { "Logical Channel", "x25.lcn", FT_UINT16, BASE_DEC, - NULL, 0x0FFF, "Logical Channel Number", HFILL }}, - - { &hf_x25_type, - { "Packet Type", "x25.type", FT_UINT8, BASE_HEX, - VALS(vals_x25_type), 0x0, NULL, HFILL }}, - - { &hf_xot_pvc_version, - { "Version", "xot.pvc.version", FT_UINT8, BASE_HEX, - NULL, 0, NULL, HFILL }}, - - { &hf_xot_pvc_status, - { "Status", "xot.pvc.status", FT_UINT8, BASE_HEX, - VALS(xot_pvc_status_vals), 0, NULL, HFILL }}, - - { &hf_xot_pvc_init_itf_name_len, - { "Initiator interface name length", "xot.pvc.init_itf_name_len", FT_UINT8, BASE_DEC, - NULL, 0, NULL, HFILL }}, - - { &hf_xot_pvc_init_lcn, - { "Initiator LCN", "xot.pvc.init_lcn", FT_UINT8, BASE_DEC, - NULL, 0, "Initiator Logical Channel Number", HFILL }}, - - { &hf_xot_pvc_resp_itf_name_len, - { "Responder interface name length", "xot.pvc.resp_itf_name_len", FT_UINT8, BASE_DEC, - NULL, 0, NULL, HFILL }}, - - { &hf_xot_pvc_resp_lcn, - { "Responder LCN", "xot.pvc.resp_lcn", FT_UINT16, BASE_DEC, - NULL, 0, "Responder Logical Channel Number", HFILL }}, - - { &hf_xot_pvc_send_inc_window, - { "Sender incoming window", "xot.pvc.send_inc_window", FT_UINT8, BASE_DEC, - NULL, 0, NULL, HFILL }}, - - { &hf_xot_pvc_send_out_window, - { "Sender outgoing window", "xot.pvc.send_out_window", FT_UINT8, BASE_DEC, - NULL, 0, NULL, HFILL }}, - - { &hf_xot_pvc_send_inc_pkt_size, - { "Sender incoming packet size", "xot.pvc.send_inc_pkt_size", FT_UINT8, BASE_DEC, - NULL, 0, NULL, HFILL }}, - - { &hf_xot_pvc_send_out_pkt_size, - { "Sender outgoing packet size", "xot.pvc.send_out_pkt_size", FT_UINT8, BASE_DEC, - NULL, 0, NULL, HFILL }}, - - { &hf_xot_pvc_init_itf_name, - { "Initiator interface name", "xot.pvc.init_itf_name", FT_STRING, BASE_NONE, - NULL, 0, NULL, HFILL }}, - - { &hf_xot_pvc_resp_itf_name, - { "Responder interface name", "xot.pvc.resp_itf_name", FT_STRING, BASE_NONE, - NULL, 0, NULL, HFILL }} - }; - - static gint *ett[] = { - &ett_xot - }; - module_t *xot_module; - - proto_xot = proto_register_protocol("X.25 over TCP", "XOT", "xot"); - proto_register_field_array(proto_xot, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - xot_handle = new_register_dissector("xot", dissect_xot_tcp_heur, proto_xot); - xot_module = prefs_register_protocol(proto_xot, NULL); - - prefs_register_bool_preference(xot_module, "desegment", - "Reassemble X.25-over-TCP messages spanning multiple TCP segments", - "Whether the X.25-over-TCP 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", - &xot_desegment); - prefs_register_bool_preference(xot_module, "x25_desegment", - "Reassemble X.25 packets with More flag to enable safe X.25 reassembly", - "Whether the X.25-over-TCP dissector should reassemble all X.25 packets before calling the X25 dissector. " - "If the TCP packets arrive out-of-order, the X.25 reassembly can otherwise fail. " - "To use this option, you should also enable \"Reassemble X.25-over-TCP messages spanning multiple TCP segments\", \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings and \"Reassemble fragmented X.25 packets\" in the X.25 protocol settings.", - &x25_desegment); + static hf_register_info hf[] = { + { &hf_xot_version, + { "Version", "xot.version", FT_UINT16, BASE_DEC, + NULL, 0, "Version of X.25 over TCP protocol", HFILL }}, + + { &hf_xot_length, + { "Length", "xot.length", FT_UINT16, BASE_DEC, + NULL, 0, "Length of X.25 over TCP packet", HFILL }}, + /* These fields are in overlay with packet-x25.c */ + { &hf_x25_gfi, + { "GFI", "x25.gfi", FT_UINT16, BASE_DEC, + NULL, 0xF000, "General Format Identifier", HFILL }}, + + { &hf_x25_lcn, + { "Logical Channel", "x25.lcn", FT_UINT16, BASE_DEC, + NULL, 0x0FFF, "Logical Channel Number", HFILL }}, + + { &hf_x25_type, + { "Packet Type", "x25.type", FT_UINT8, BASE_HEX, + VALS(vals_x25_type), 0x0, NULL, HFILL }}, + + { &hf_xot_pvc_version, + { "Version", "xot.pvc.version", FT_UINT8, BASE_HEX, + NULL, 0, NULL, HFILL }}, + + { &hf_xot_pvc_status, + { "Status", "xot.pvc.status", FT_UINT8, BASE_HEX, + VALS(xot_pvc_status_vals), 0, NULL, HFILL }}, + + { &hf_xot_pvc_init_itf_name_len, + { "Initiator interface name length", "xot.pvc.init_itf_name_len", FT_UINT8, BASE_DEC, + NULL, 0, NULL, HFILL }}, + + { &hf_xot_pvc_init_lcn, + { "Initiator LCN", "xot.pvc.init_lcn", FT_UINT8, BASE_DEC, + NULL, 0, "Initiator Logical Channel Number", HFILL }}, + + { &hf_xot_pvc_resp_itf_name_len, + { "Responder interface name length", "xot.pvc.resp_itf_name_len", FT_UINT8, BASE_DEC, + NULL, 0, NULL, HFILL }}, + + { &hf_xot_pvc_resp_lcn, + { "Responder LCN", "xot.pvc.resp_lcn", FT_UINT16, BASE_DEC, + NULL, 0, "Responder Logical Channel Number", HFILL }}, + + { &hf_xot_pvc_send_inc_window, + { "Sender incoming window", "xot.pvc.send_inc_window", FT_UINT8, BASE_DEC, + NULL, 0, NULL, HFILL }}, + + { &hf_xot_pvc_send_out_window, + { "Sender outgoing window", "xot.pvc.send_out_window", FT_UINT8, BASE_DEC, + NULL, 0, NULL, HFILL }}, + + { &hf_xot_pvc_send_inc_pkt_size, + { "Sender incoming packet size", "xot.pvc.send_inc_pkt_size", FT_UINT8, BASE_DEC, + NULL, 0, NULL, HFILL }}, + + { &hf_xot_pvc_send_out_pkt_size, + { "Sender outgoing packet size", "xot.pvc.send_out_pkt_size", FT_UINT8, BASE_DEC, + NULL, 0, NULL, HFILL }}, + + { &hf_xot_pvc_init_itf_name, + { "Initiator interface name", "xot.pvc.init_itf_name", FT_STRING, BASE_NONE, + NULL, 0, NULL, HFILL }}, + + { &hf_xot_pvc_resp_itf_name, + { "Responder interface name", "xot.pvc.resp_itf_name", FT_STRING, BASE_NONE, + NULL, 0, NULL, HFILL }} + }; + + static gint *ett[] = { + &ett_xot + }; + module_t *xot_module; + + proto_xot = proto_register_protocol("X.25 over TCP", "XOT", "xot"); + proto_register_field_array(proto_xot, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + xot_handle = new_register_dissector("xot", dissect_xot_tcp_heur, proto_xot); + xot_module = prefs_register_protocol(proto_xot, NULL); + + prefs_register_bool_preference(xot_module, "desegment", + "Reassemble X.25-over-TCP messages spanning multiple TCP segments", + "Whether the X.25-over-TCP 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", + &xot_desegment); + prefs_register_bool_preference(xot_module, "x25_desegment", + "Reassemble X.25 packets with More flag to enable safe X.25 reassembly", + "Whether the X.25-over-TCP dissector should reassemble all X.25 packets before calling the X25 dissector. " + "If the TCP packets arrive out-of-order, the X.25 reassembly can otherwise fail. " + "To use this option, you should also enable \"Reassemble X.25-over-TCP messages spanning multiple TCP segments\", \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings and \"Reassemble fragmented X.25 packets\" in the X.25 protocol settings.", + &x25_desegment); } void proto_reg_handoff_xot(void) { - dissector_add_uint("tcp.port", TCP_PORT_XOT, xot_handle); + dissector_add_uint("tcp.port", TCP_PORT_XOT, xot_handle); - x25_handle = find_dissector("x.25"); + x25_handle = find_dissector("x.25"); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 3 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=3 tabstop=8 expandtab: + * :indentSize=3:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-ypbind.c b/epan/dissectors/packet-ypbind.c index 4c333cec5c..0aa4ea4022 100644 --- a/epan/dissectors/packet-ypbind.c +++ b/epan/dissectors/packet-ypbind.c @@ -136,10 +136,10 @@ dissect_ypbind_setdomain_v2_request(tvbuff_t *tvb, int offset, packet_info *pinf /* proc number, "proc name", dissect_request, dissect_reply */ /* NULL as function pointer means: type of arguments is "void". */ static const vsff ypbind1_proc[] = { - { YPBINDPROC_NULL, "NULL", NULL, NULL }, - { YPBINDPROC_DOMAIN, "DOMAIN", NULL, NULL }, - { YPBINDPROC_SETDOM, "SETDOMAIN", NULL, NULL }, - { 0, NULL, NULL, NULL } + { YPBINDPROC_NULL, "NULL", NULL, NULL }, + { YPBINDPROC_DOMAIN, "DOMAIN", NULL, NULL }, + { YPBINDPROC_SETDOM, "SETDOMAIN", NULL, NULL }, + { 0, NULL, NULL, NULL } }; static const value_string ypbind1_proc_vals[] = { { YPBINDPROC_NULL, "NULL" }, @@ -150,12 +150,12 @@ static const value_string ypbind1_proc_vals[] = { /* end of YPBind version 1 */ static const vsff ypbind2_proc[] = { - { YPBINDPROC_NULL, "NULL", NULL, NULL }, + { YPBINDPROC_NULL, "NULL", NULL, NULL }, { YPBINDPROC_DOMAIN, "DOMAIN", dissect_ypbind_domain_v2_request, dissect_ypbind_domain_v2_reply}, { YPBINDPROC_SETDOM, "SETDOMAIN", dissect_ypbind_setdomain_v2_request, NULL}, - { 0, NULL, NULL, NULL } + { 0, NULL, NULL, NULL } }; static const value_string ypbind2_proc_vals[] = { { YPBINDPROC_NULL, "NULL" }, @@ -222,3 +222,16 @@ proto_reg_handoff_ypbind(void) rpc_init_proc_table(YPBIND_PROGRAM, 1, ypbind1_proc, hf_ypbind_procedure_v1); rpc_init_proc_table(YPBIND_PROGRAM, 2, ypbind2_proc, hf_ypbind_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: + */ -- cgit v1.2.3