From 01b093c24d53c8304b4e36741a0df00125105795 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Tue, 30 Sep 2014 19:12:26 -0400 Subject: Add editor modelines; Adjust whitespace as needed. Change-Id: I434da226c842298f4fb2a4335d06d51e164af2af Reviewed-on: https://code.wireshark.org/review/4394 Reviewed-by: Bill Meier --- epan/dissectors/packet-3com-xns.c | 13 + epan/dissectors/packet-aastra-aasp.c | 27 +- epan/dissectors/packet-aim-admin.c | 13 + epan/dissectors/packet-aim-adverts.c | 15 +- epan/dissectors/packet-aim-chatnav.c | 15 +- epan/dissectors/packet-aim-directory.c | 37 +- epan/dissectors/packet-aim-invitation.c | 13 + epan/dissectors/packet-aim-oft.c | 15 +- epan/dissectors/packet-aim-popup.c | 13 + epan/dissectors/packet-aim-userlookup.c | 13 + epan/dissectors/packet-ajp13.c | 31 +- epan/dissectors/packet-aoe.c | 41 +- epan/dissectors/packet-ap1394.c | 29 +- epan/dissectors/packet-app-pkix-cert.c | 17 +- epan/dissectors/packet-cdp.c | 15 +- epan/dissectors/packet-cell_broadcast.c | 535 ++++----- epan/dissectors/packet-cigi.c | 43 +- epan/dissectors/packet-clearcase.c | 13 + epan/dissectors/packet-clip.c | 15 +- epan/dissectors/packet-daytime.c | 29 +- epan/dissectors/packet-dcerpc-bossvr.c | 13 + epan/dissectors/packet-dcerpc-cds_clerkserver.c | 13 + epan/dissectors/packet-dcerpc-cds_solicit.c | 13 + epan/dissectors/packet-dcerpc-cprpc_server.c | 13 + epan/dissectors/packet-dcerpc-dtsprovider.c | 13 + epan/dissectors/packet-dcerpc-dtsstime_req.c | 13 + epan/dissectors/packet-dcerpc-frsapi.c | 23 +- epan/dissectors/packet-dcerpc-ftserver.c | 13 + epan/dissectors/packet-dcerpc-icl_rpc.c | 13 + epan/dissectors/packet-dcerpc-krb5rpc.c | 35 +- epan/dissectors/packet-dcerpc-llb.c | 19 +- epan/dissectors/packet-dcerpc-messenger.c | 57 +- epan/dissectors/packet-dcerpc-mgmt.c | 21 +- epan/dissectors/packet-dcerpc-rdaclif.c | 19 +- epan/dissectors/packet-dcerpc-rep_proc.c | 13 + epan/dissectors/packet-dcerpc-roverride.c | 13 + epan/dissectors/packet-dcerpc-rs_attr.c | 13 + epan/dissectors/packet-dcerpc-rs_misc.c | 13 + epan/dissectors/packet-dcerpc-rs_plcy.c | 39 +- epan/dissectors/packet-dcerpc-rs_prop_acct.c | 13 + epan/dissectors/packet-dcerpc-rs_prop_attr.c | 21 +- epan/dissectors/packet-dcerpc-rs_prop_pgo.c | 19 +- epan/dissectors/packet-dcerpc-rs_prop_plcy.c | 19 +- epan/dissectors/packet-dcerpc-rs_pwd_mgmt.c | 21 +- epan/dissectors/packet-dcerpc-rs_repadm.c | 13 + epan/dissectors/packet-dcerpc-rs_replist.c | 13 + epan/dissectors/packet-dcerpc-rs_repmgr.c | 17 +- epan/dissectors/packet-dcerpc-rs_unix.c | 13 + epan/dissectors/packet-dcerpc-rsec_login.c | 13 + epan/dissectors/packet-dcerpc-secidmap.c | 29 +- epan/dissectors/packet-dcerpc-tkn4int.c | 13 + epan/dissectors/packet-dcerpc-ubikdisk.c | 15 +- epan/dissectors/packet-dcerpc-ubikvote.c | 15 +- epan/dissectors/packet-dcerpc-update.c | 19 +- epan/dissectors/packet-dec-dnart.c | 15 +- epan/dissectors/packet-dlsw.c | 137 ++- epan/dissectors/packet-dtls.c | 17 +- epan/dissectors/packet-erf.c | 32 +- epan/dissectors/packet-git.c | 87 +- epan/dissectors/packet-hpteam.c | 13 + epan/dissectors/packet-hyperscsi.c | 23 +- epan/dissectors/packet-iana-oui.c | 13 + epan/dissectors/packet-ieee8023.c | 31 +- epan/dissectors/packet-igrp.c | 99 +- epan/dissectors/packet-infiniband_sdp.c | 60 +- epan/dissectors/packet-ipmi-bridge.c | 17 +- epan/dissectors/packet-ipnet.c | 29 +- epan/dissectors/packet-l2tp.c | 17 +- epan/dissectors/packet-lapbether.c | 29 +- epan/dissectors/packet-ldp.c | 63 +- epan/dissectors/packet-loop.c | 41 +- epan/dissectors/packet-lsc.c | 19 +- epan/dissectors/packet-m2pa.c | 17 +- epan/dissectors/packet-m2tp.c | 69 +- epan/dissectors/packet-m2ua.c | 17 +- epan/dissectors/packet-mime-encap.c | 13 + epan/dissectors/packet-msn-messenger.c | 151 +-- epan/dissectors/packet-mtp2.c | 31 +- epan/dissectors/packet-ncs.c | 39 +- epan/dissectors/packet-newmail.c | 13 + epan/dissectors/packet-nfsauth.c | 13 + epan/dissectors/packet-nt-oui.c | 13 + epan/dissectors/packet-omapi.c | 119 +- epan/dissectors/packet-pana.c | 1377 ++++++++++++----------- epan/dissectors/packet-pptp.c | 85 +- epan/dissectors/packet-qllc.c | 63 +- epan/dissectors/packet-rgmp.c | 67 +- epan/dissectors/packet-roofnet.c | 63 +- epan/dissectors/packet-sadmind.c | 13 + epan/dissectors/packet-sap.c | 15 +- epan/dissectors/packet-snaeth.c | 13 + epan/dissectors/packet-sscf-nni.c | 47 +- epan/dissectors/packet-stat-notify.c | 27 +- epan/dissectors/packet-teimanagement.c | 65 +- epan/dissectors/packet-telkonet.c | 13 + epan/dissectors/packet-tuxedo.c | 89 +- epan/dissectors/packet-ua3g.c | 19 +- epan/dissectors/packet-xml.c | 29 +- epan/dissectors/packet-ypxfr.c | 13 + 99 files changed, 3044 insertions(+), 1755 deletions(-) (limited to 'epan') diff --git a/epan/dissectors/packet-3com-xns.c b/epan/dissectors/packet-3com-xns.c index ae3f6a2822..07f458b635 100644 --- a/epan/dissectors/packet-3com-xns.c +++ b/epan/dissectors/packet-3com-xns.c @@ -127,3 +127,16 @@ proto_reg_handoff_3com_xns(void) our_xns_handle = create_dissector_handle(dissect_3com_xns, proto_3com_xns); dissector_add_uint("llc.dsap", 0x80, our_xns_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-aastra-aasp.c b/epan/dissectors/packet-aastra-aasp.c index 4a8f9f60f7..f5f70d8a01 100644 --- a/epan/dissectors/packet-aastra-aasp.c +++ b/epan/dissectors/packet-aastra-aasp.c @@ -22,8 +22,8 @@ */ /* - * AASP over SIP - * Content-Type: message/x-aasp-signalling + * AASP over SIP + * Content-Type: message/x-aasp-signalling */ #include "config.h" @@ -134,7 +134,7 @@ static const value_string szCmdID[] = }; /** - * Dissect single command + * Dissect single command */ static void dissect_a_binary_command(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) @@ -365,7 +365,7 @@ dissect_a_binary_command(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree } /** - * Searching for the next command when the variable or unknown length. + * Searching for the next command when the variable or unknown length. */ static guint searchNext(tvbuff_t *tvb, guint begin, guint end) { @@ -425,13 +425,15 @@ dissect_aasp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ /* 86:02:00:00:01:03:02 */ switch(tvb_get_guint8(tvb, i+2)) { - case 0x00: i += 11; break; + case 0x00: i += 11; break; case 0x02: i += 8; break; } break; } #endif - default: i = searchNext(tvb, i+1, n); break; + default: + i = searchNext(tvb, i+1, n); + break; } dissect_a_binary_command(tvb_new_subset_length(tvb, prev, i-prev), pinfo, aasp_tree); prev = i; @@ -525,3 +527,16 @@ proto_reg_handoff_aasp(void) aasp_handle = new_create_dissector_handle(dissect_aasp, proto_aasp); dissector_add_string("media_type", "message/x-aasp-signalling", aasp_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-aim-admin.c b/epan/dissectors/packet-aim-admin.c index 30c6a182c1..79e58276c0 100644 --- a/epan/dissectors/packet-aim-admin.c +++ b/epan/dissectors/packet-aim-admin.c @@ -133,3 +133,16 @@ proto_reg_handoff_aim_admin(void) { aim_init_family(proto_aim_admin, ett_aim_admin, FAMILY_ADMIN, aim_fnac_family_admin); } + +/* + * 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-adverts.c b/epan/dissectors/packet-aim-adverts.c index 4d807974d8..297ccdfbb6 100644 --- a/epan/dissectors/packet-aim-adverts.c +++ b/epan/dissectors/packet-aim-adverts.c @@ -73,7 +73,7 @@ proto_register_aim_adverts(void) /* Required function calls to register the header fields and subtrees used */ /*FIXME - proto_register_field_array(proto_aim_adverts, hf, array_length(hf));*/ + proto_register_field_array(proto_aim_adverts, hf, array_length(hf));*/ proto_register_subtree_array(ett, array_length(ett)); } @@ -82,3 +82,16 @@ proto_reg_handoff_aim_adverts(void) { aim_init_family(proto_aim_adverts, ett_aim_adverts, FAMILY_ADVERTS, aim_fnac_family_adverts); } + +/* + * 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-chatnav.c b/epan/dissectors/packet-aim-chatnav.c index 4339f8b7c0..de8c0b9033 100644 --- a/epan/dissectors/packet-aim-chatnav.c +++ b/epan/dissectors/packet-aim-chatnav.c @@ -73,7 +73,7 @@ proto_register_aim_chatnav(void) /* Required function calls to register the header fields and subtrees used */ /*FIXME - proto_register_field_array(proto_aim_chatnav, hf, array_length(hf));*/ + proto_register_field_array(proto_aim_chatnav, hf, array_length(hf));*/ proto_register_subtree_array(ett, array_length(ett)); } @@ -82,3 +82,16 @@ proto_reg_handoff_aim_chatnav(void) { aim_init_family(proto_aim_chatnav, ett_aim_chatnav, FAMILY_CHAT_NAV, aim_fnac_family_chatnav); } + +/* + * 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-directory.c b/epan/dissectors/packet-aim-directory.c index 84433c61f0..523aec0331 100644 --- a/epan/dissectors/packet-aim-directory.c +++ b/epan/dissectors/packet-aim-directory.c @@ -40,20 +40,20 @@ static int ett_aim_directory = -1; static int dissect_aim_directory_user_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - int offset = 0; - while (tvb_length_remaining(tvb, offset) > 0) { - offset = dissect_aim_tlv(tvb, pinfo, offset, tree, aim_client_tlvs); - } - return offset; + int offset = 0; + while (tvb_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_tlv(tvb, pinfo, offset, tree, aim_client_tlvs); + } + return offset; } static const aim_subtype aim_fnac_family_directory[] = { - { 0x0001, "Error", dissect_aim_snac_error }, - { 0x0002, "Client search for user request", NULL }, - { 0x0003, "Server reply for search request (found users)", dissect_aim_directory_user_repl }, - { 0x0004, "Request interests list from server", NULL }, - { 0x0005, "Interests list", NULL }, - { 0, NULL, NULL }, + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Client search for user request", NULL }, + { 0x0003, "Server reply for search request (found users)", dissect_aim_directory_user_repl }, + { 0x0004, "Request interests list from server", NULL }, + { 0x0005, "Interests list", NULL }, + { 0, NULL, NULL }, }; @@ -69,7 +69,7 @@ proto_register_aim_directory(void) /* Setup protocol subtree array */ static gint *ett[] = { - &ett_aim_directory + &ett_aim_directory }; /* Register the protocol name and description */ proto_aim_directory = proto_register_protocol("AIM Directory Search", "AIM Directory", "aim_dir"); @@ -85,3 +85,16 @@ proto_reg_handoff_aim_directory(void) { aim_init_family(proto_aim_directory, ett_aim_directory, FAMILY_DIRECTORY, aim_fnac_family_directory); } + +/* + * 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-invitation.c b/epan/dissectors/packet-aim-invitation.c index 067c83956a..1381cbc748 100644 --- a/epan/dissectors/packet-aim-invitation.c +++ b/epan/dissectors/packet-aim-invitation.c @@ -75,3 +75,16 @@ proto_reg_handoff_aim_invitation(void) { aim_init_family(proto_aim_invitation, ett_aim_invitation, FAMILY_INVITATION, aim_fnac_family_invitation); } + +/* + * 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-oft.c b/epan/dissectors/packet-aim-oft.c index d6f4c469e7..1aeb65afd3 100644 --- a/epan/dissectors/packet-aim-oft.c +++ b/epan/dissectors/packet-aim-oft.c @@ -92,7 +92,7 @@ proto_register_aim_oft(void) /* Required function calls to register the header fields and subtrees used */ /* proto_register_field_array(proto_aim_oft, hf, array_length(hf));*/ -/* proto_register_subtree_array(ett, array_length(ett));*/ +/* proto_register_subtree_array(ett, array_length(ett));*/ } void @@ -104,3 +104,16 @@ proto_reg_handoff_aim_oft(void) aim_handle = new_create_dissector_handle(dissect_aim, proto_aim); dissector_add_uint("tcp.port", TCP_PORT_AIM, aim_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-popup.c b/epan/dissectors/packet-aim-popup.c index d04cb43029..fd20afa7af 100644 --- a/epan/dissectors/packet-aim-popup.c +++ b/epan/dissectors/packet-aim-popup.c @@ -92,3 +92,16 @@ proto_reg_handoff_aim_popup(void) { aim_init_family(proto_aim_popup, ett_aim_popup, FAMILY_POPUP, aim_fnac_family_popup); } + +/* + * 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-userlookup.c b/epan/dissectors/packet-aim-userlookup.c index 3b72c2d2c8..111d82ead0 100644 --- a/epan/dissectors/packet-aim-userlookup.c +++ b/epan/dissectors/packet-aim-userlookup.c @@ -90,3 +90,16 @@ proto_reg_handoff_aim_userlookup(void) { aim_init_family(proto_aim_userlookup, ett_aim_userlookup, FAMILY_USERLOOKUP, aim_fnac_family_userlookup); } + +/* + * 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-ajp13.c b/epan/dissectors/packet-ajp13.c index f9bcb1adc5..95e1accd78 100644 --- a/epan/dissectors/packet-ajp13.c +++ b/epan/dissectors/packet-ajp13.c @@ -40,7 +40,7 @@ void proto_reg_handoff_ajp13(void); * * You need to be looking at: * - * http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html + * http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html * * If you're a wireshark dissector guru, then you can skip the rest of * this. I'm writing it all down because I've written 3 dissectors so @@ -116,14 +116,14 @@ void proto_reg_handoff_ajp13(void); -#define MTYPE_FORWARD_REQUEST 2 -#define MTYPE_SEND_BODY_CHUNK 3 -#define MTYPE_SEND_HEADERS 4 -#define MTYPE_END_RESPONSE 5 -#define MTYPE_GET_BODY_CHUNK 6 -#define MTYPE_SHUTDOWN 7 -#define MTYPE_CPONG 9 -#define MTYPE_CPING 10 +#define MTYPE_FORWARD_REQUEST 2 +#define MTYPE_SEND_BODY_CHUNK 3 +#define MTYPE_SEND_HEADERS 4 +#define MTYPE_END_RESPONSE 5 +#define MTYPE_GET_BODY_CHUNK 6 +#define MTYPE_SHUTDOWN 7 +#define MTYPE_CPONG 9 +#define MTYPE_CPING 10 static const value_string mtype_codes[] = { { MTYPE_FORWARD_REQUEST, "FORWARD REQUEST" }, @@ -1123,3 +1123,16 @@ proto_reg_handoff_ajp13(void) ajp13_handle = new_create_dissector_handle(dissect_ajp13, proto_ajp13); dissector_add_uint("tcp.port", 8009, ajp13_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-aoe.c b/epan/dissectors/packet-aoe.c index f6046e76cb..d10299c07f 100644 --- a/epan/dissectors/packet-aoe.c +++ b/epan/dissectors/packet-aoe.c @@ -263,11 +263,11 @@ dissect_ata_pdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, if(ata_info){ if(response){ if(ata_info->request_frame){ - nstime_t delta_ts; + nstime_t delta_ts; tmp_item=proto_tree_add_uint(tree, hf_aoe_response_to, tvb, 0, 0, ata_info->request_frame); PROTO_ITEM_SET_GENERATED(tmp_item); - nstime_delta(&delta_ts, &pinfo->fd->abs_ts, &ata_info->req_time); - tmp_item=proto_tree_add_time(tree, hf_aoe_time, tvb, offset, 0, &delta_ts); + nstime_delta(&delta_ts, &pinfo->fd->abs_ts, &ata_info->req_time); + tmp_item=proto_tree_add_time(tree, hf_aoe_time, tvb, offset, 0, &delta_ts); PROTO_ITEM_SET_GENERATED(tmp_item); } } else { @@ -345,7 +345,7 @@ dissect_aoe_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* error */ if(flags&AOE_FLAGS_ERROR){ proto_tree_add_item(tree, hf_aoe_error, tvb, 1, 1, ENC_BIG_ENDIAN); - col_append_fstr(pinfo->cinfo, COL_INFO, "Error:%s ", val_to_str(tvb_get_guint8(tvb, 1), error_vals, "Unknown error<%d>")); + col_append_fstr(pinfo->cinfo, COL_INFO, "Error:%s ", val_to_str(tvb_get_guint8(tvb, 1), error_vals, "Unknown error<%d>")); } /* major/minor address */ @@ -421,38 +421,38 @@ proto_register_aoe(void) static hf_register_info hf[] = { { &hf_aoe_cmd, { "Command", "aoe.cmd", FT_UINT8, BASE_DEC, VALS(cmd_vals), 0x0, - "AOE Command", HFILL}}, + "AOE Command", HFILL}}, { &hf_aoe_version, { "Version", "aoe.version", FT_UINT8, BASE_DEC, NULL, 0x0, - "Version of the AOE protocol", HFILL}}, + "Version of the AOE protocol", HFILL}}, { &hf_aoe_error, { "Error", "aoe.error", FT_UINT8, BASE_DEC, VALS(error_vals), 0x0, - "Error code", HFILL}}, + "Error code", HFILL}}, { &hf_aoe_err_feature, { "Err/Feature", "aoe.err_feature", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL}}, + NULL, HFILL}}, { &hf_aoe_sector_count, { "Sector Count", "aoe.sector_count", FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL}}, + NULL, HFILL}}, { &hf_aoe_flags_response, { "Response flag", "aoe.response", FT_BOOLEAN, 8, TFS(&tfs_response), AOE_FLAGS_RESPONSE, "Whether this is a response PDU or not", HFILL}}, { &hf_aoe_flags_error, { "Error flag", "aoe.flags_error", FT_BOOLEAN, 8, TFS(&tfs_error), AOE_FLAGS_ERROR, "Whether this is an error PDU or not", HFILL}}, { &hf_aoe_major, { "Major", "aoe.major", FT_UINT16, BASE_HEX, NULL, 0x0, - "Major address", HFILL}}, + "Major address", HFILL}}, { &hf_aoe_minor, { "Minor", "aoe.minor", FT_UINT8, BASE_HEX, NULL, 0x0, - "Minor address", HFILL}}, + "Minor address", HFILL}}, { &hf_aoe_acmd, { "ATA Cmd", "aoe.ata.cmd", FT_UINT8, BASE_HEX, VALS(ata_cmd_vals), 0x0, - "ATA command opcode", HFILL}}, + "ATA command opcode", HFILL}}, { &hf_aoe_astatus, { "ATA Status", "aoe.ata.status", FT_UINT8, BASE_HEX, NULL, 0x0, - "ATA status bits", HFILL}}, + "ATA status bits", HFILL}}, { &hf_aoe_tag, { "Tag", "aoe.tag", FT_UINT32, BASE_HEX, NULL, 0x0, - "Command Tag", HFILL}}, + "Command Tag", HFILL}}, { &hf_aoe_aflags_e, { "E", "aoe.aflags.e", FT_BOOLEAN, 8, TFS(&tfs_aflags_e), AOE_AFLAGS_E, "Whether this is a normal or LBA48 command", HFILL}}, { &hf_aoe_aflags_d, @@ -490,3 +490,16 @@ proto_reg_handoff_aoe(void) { dissector_add_uint("ethertype", ETHERTYPE_AOE, aoe_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-ap1394.c b/epan/dissectors/packet-ap1394.c index 96088c7f09..cc6e81e390 100644 --- a/epan/dissectors/packet-ap1394.c +++ b/epan/dissectors/packet-ap1394.c @@ -76,16 +76,16 @@ dissect_ap1394(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); src_addr=tvb_get_ptr(tvb, 8, 8); - SET_ADDRESS(&pinfo->dl_src, AT_EUI64, 8, src_addr); - SET_ADDRESS(&pinfo->src, AT_EUI64, 8, src_addr); + SET_ADDRESS(&pinfo->dl_src, AT_EUI64, 8, src_addr); + SET_ADDRESS(&pinfo->src, AT_EUI64, 8, src_addr); dst_addr=tvb_get_ptr(tvb, 0, 8); - SET_ADDRESS(&pinfo->dl_dst, AT_EUI64, 8, dst_addr); - SET_ADDRESS(&pinfo->dst, AT_EUI64, 8, dst_addr); + SET_ADDRESS(&pinfo->dl_dst, AT_EUI64, 8, dst_addr); + SET_ADDRESS(&pinfo->dst, AT_EUI64, 8, dst_addr); if (tree) { ti = proto_tree_add_protocol_format(tree, proto_ap1394, tvb, 0, 18, - "Apple IP-over-IEEE 1394, Src: %s, Dst: %s", - bytes_to_ep_str(src_addr, 8), bytes_to_ep_str(dst_addr, 8)); + "Apple IP-over-IEEE 1394, Src: %s, Dst: %s", + bytes_to_ep_str(src_addr, 8), bytes_to_ep_str(dst_addr, 8)); fh_tree = proto_item_add_subtree(ti, ett_ap1394); proto_tree_add_bytes(fh_tree, hf_ap1394_dst, tvb, 0, 8, dst_addr); proto_tree_add_bytes(fh_tree, hf_ap1394_src, tvb, 8, 8, src_addr); @@ -95,7 +95,7 @@ dissect_ap1394(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(fh_tree, hf_ap1394_type, tvb, 16, 2, etype); next_tvb = tvb_new_subset_remaining(tvb, 18); if (!dissector_try_uint(ethertype_subdissector_table, etype, next_tvb, - pinfo, tree)) + pinfo, tree)) call_dissector(data_handle, next_tvb, pinfo, tree); } @@ -111,7 +111,7 @@ proto_register_ap1394(void) NULL, 0x0, "Source address", HFILL }}, /* registered here but handled in ethertype.c */ { &hf_ap1394_type, - { "Type", "ap1394.type", FT_UINT16, BASE_HEX, + { "Type", "ap1394.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, NULL, HFILL }}, }; static gint *ett[] = { @@ -135,3 +135,16 @@ proto_reg_handoff_ap1394(void) ap1394_handle = create_dissector_handle(dissect_ap1394, proto_ap1394); dissector_add_uint("wtap_encap", WTAP_ENCAP_APPLE_IP_OVER_IEEE1394, ap1394_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-app-pkix-cert.c b/epan/dissectors/packet-app-pkix-cert.c index a4f01ca1e2..42c17842b2 100644 --- a/epan/dissectors/packet-app-pkix-cert.c +++ b/epan/dissectors/packet-app-pkix-cert.c @@ -52,8 +52,8 @@ dissect_cert(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { proto_tree *subtree = NULL; proto_item *ti; - asn1_ctx_t asn1_ctx; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "(application/pkix-cert)"); @@ -115,3 +115,16 @@ proto_reg_handoff_cert(void) /* Register the PKIX-CERT media type */ dissector_add_string("media_type", "application/pkix-cert", cert_handle); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=8 tabstop=8 expandtab: + * :indentSize=8:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c index 43b9cda33e..9be72c7217 100644 --- a/epan/dissectors/packet-cdp.c +++ b/epan/dissectors/packet-cdp.c @@ -38,7 +38,7 @@ /* * See * - * http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/cdp/configuration/15-mt/cdp-15-mt-book/nm-cdp-discover.html#GUID-84FBA50B-677C-4D90-AF56-2FB96F2DC085 + * http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/cdp/configuration/15-mt/cdp-15-mt-book/nm-cdp-discover.html#GUID-84FBA50B-677C-4D90-AF56-2FB96F2DC085 * * and * @@ -1491,3 +1491,16 @@ proto_reg_handoff_cdp(void) dissector_add_uint("chdlc.protocol", 0x2000, cdp_handle); dissector_add_uint("ppp.protocol", 0x0207, cdp_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-cell_broadcast.c b/epan/dissectors/packet-cell_broadcast.c index 7ae7ed6232..b4a7afaa66 100644 --- a/epan/dissectors/packet-cell_broadcast.c +++ b/epan/dissectors/packet-cell_broadcast.c @@ -44,124 +44,124 @@ void proto_register_cbs(void); #define GSM_CBS_PAGE_SIZE 88 const value_string message_id_values[] = { - { 0, "Index"}, - { 10, "Flashes"}, - { 20, "Hospitals"}, - { 22, "Doctors"}, - { 24, "Pharmacy"}, - { 30, "Long Distance Road Reports"}, - { 32, "Local Road Reports"}, - { 34, "Taxis"}, - { 40, "Weather"}, - { 50, "Regional Services (local phone prefixes) / District (Base Station Identity)"}, - { 52, "Network Information"}, - { 54, "Operator Service"}, - { 56, "Directory Enquiries (national)"}, - { 57, "Directory Enquiries (international)"}, - { 58, "Customer Care (national)"}, - { 59, "Customer Care (international)"}, - { 60, "Local Date/Time Group incl. Time Zone"}, - { 100, "Regional Services (local phone prefixes)"}, - { 101, "planned for news, events, whether, traffic, TV station and News of the day"}, - { 102, "planned for news, events, whether, traffic, TV station and News of the day"}, - { 103, "planned for news, events, whether, traffic, TV station and News of the day"}, - { 104, "planned for news, events, whether, traffic, TV station and News of the day"}, - { 105, "planned for news, events, whether, traffic, TV station and News of the day"}, - { 106, "planned for news, events, whether, traffic, TV station and News of the day"}, - { 107, "planned for news, events, whether, traffic, TV station and News of the day"}, - { 123, "Mobile Auction"}, - { 140, "Handelsblatt (latest info from stock exchange)"}, - { 666, "PASSO Traffic Alert (brief teaser information for IVR)"}, - { 1000, "LCS CBS Message Identifier for E-OTD Assistance Data message"}, - { 1001, "LCS CBS Message Identifier for DGPS Correction Data message"}, - { 1002, "LCS CBS Message Identifier for GPS Ephemeris and Clock Correction Data message"}, - { 1003, "LCS CBS Message Identifier for GPS Almanac and Other Data message"}, - { 4352, "ETWS CBS Message Identifier for earthquake warning message"}, - { 4353, "ETWS CBS Message Identifier for tsunami warning message"}, - { 4354, "ETWS CBS Message Identifier for earthquake and tsunami combined warning message"}, - { 4355, "ETWS CBS Message Identifier for test message"}, - { 4356, "ETWS CBS Message Identifier for messages related to other emergency types"}, - { 4370, "CMAS CBS Message Identifier for CMAS Presidential Level Alerts"}, - { 4371, "CMAS CBS Message Identifier for CMAS Extreme Alerts with Severity of Extreme, Urgency of Immediate, and Certainty of Observed"}, - { 4372, "CMAS CBS Message Identifier for CMAS Extreme Alerts with Severity of Extreme, Urgency of Immediate, and Certainty of Likely"}, - { 4373, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Extreme, Urgency of Expected, and Certainty of Observed"}, - { 4374, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Extreme, Urgency of Expected, and Certainty of Likely"}, - { 4375, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Severe, Urgency of Immediate, and Certainty of Observed"}, - { 4376, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Severe, Urgency of Immediate, and Certainty of Likely"}, - { 4377, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Severe, Urgency of Expected, and Certainty of Observed"}, - { 4378, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Severe, Urgency of Expected, and Certainty of Likely"}, - { 4379, "CMAS CBS Message Identifier for Child Abduction Emergency (or Amber Alert)"}, - { 4380, "CMAS CBS Message Identifier for the Required Monthly Test"}, - { 4381, "CMAS CBS Message Identifier for CMAS Exercise"}, - { 4382, "CMAS CBS Message Identifier for operator defined use"}, - { 65535, "Message Identifier Reserved, and should not be used for new services"}, - { 0, NULL } + { 0, "Index"}, + { 10, "Flashes"}, + { 20, "Hospitals"}, + { 22, "Doctors"}, + { 24, "Pharmacy"}, + { 30, "Long Distance Road Reports"}, + { 32, "Local Road Reports"}, + { 34, "Taxis"}, + { 40, "Weather"}, + { 50, "Regional Services (local phone prefixes) / District (Base Station Identity)"}, + { 52, "Network Information"}, + { 54, "Operator Service"}, + { 56, "Directory Enquiries (national)"}, + { 57, "Directory Enquiries (international)"}, + { 58, "Customer Care (national)"}, + { 59, "Customer Care (international)"}, + { 60, "Local Date/Time Group incl. Time Zone"}, + { 100, "Regional Services (local phone prefixes)"}, + { 101, "planned for news, events, whether, traffic, TV station and News of the day"}, + { 102, "planned for news, events, whether, traffic, TV station and News of the day"}, + { 103, "planned for news, events, whether, traffic, TV station and News of the day"}, + { 104, "planned for news, events, whether, traffic, TV station and News of the day"}, + { 105, "planned for news, events, whether, traffic, TV station and News of the day"}, + { 106, "planned for news, events, whether, traffic, TV station and News of the day"}, + { 107, "planned for news, events, whether, traffic, TV station and News of the day"}, + { 123, "Mobile Auction"}, + { 140, "Handelsblatt (latest info from stock exchange)"}, + { 666, "PASSO Traffic Alert (brief teaser information for IVR)"}, + { 1000, "LCS CBS Message Identifier for E-OTD Assistance Data message"}, + { 1001, "LCS CBS Message Identifier for DGPS Correction Data message"}, + { 1002, "LCS CBS Message Identifier for GPS Ephemeris and Clock Correction Data message"}, + { 1003, "LCS CBS Message Identifier for GPS Almanac and Other Data message"}, + { 4352, "ETWS CBS Message Identifier for earthquake warning message"}, + { 4353, "ETWS CBS Message Identifier for tsunami warning message"}, + { 4354, "ETWS CBS Message Identifier for earthquake and tsunami combined warning message"}, + { 4355, "ETWS CBS Message Identifier for test message"}, + { 4356, "ETWS CBS Message Identifier for messages related to other emergency types"}, + { 4370, "CMAS CBS Message Identifier for CMAS Presidential Level Alerts"}, + { 4371, "CMAS CBS Message Identifier for CMAS Extreme Alerts with Severity of Extreme, Urgency of Immediate, and Certainty of Observed"}, + { 4372, "CMAS CBS Message Identifier for CMAS Extreme Alerts with Severity of Extreme, Urgency of Immediate, and Certainty of Likely"}, + { 4373, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Extreme, Urgency of Expected, and Certainty of Observed"}, + { 4374, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Extreme, Urgency of Expected, and Certainty of Likely"}, + { 4375, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Severe, Urgency of Immediate, and Certainty of Observed"}, + { 4376, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Severe, Urgency of Immediate, and Certainty of Likely"}, + { 4377, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Severe, Urgency of Expected, and Certainty of Observed"}, + { 4378, "CMAS CBS Message Identifier for CMAS Severe Alerts with Severity of Severe, Urgency of Expected, and Certainty of Likely"}, + { 4379, "CMAS CBS Message Identifier for Child Abduction Emergency (or Amber Alert)"}, + { 4380, "CMAS CBS Message Identifier for the Required Monthly Test"}, + { 4381, "CMAS CBS Message Identifier for CMAS Exercise"}, + { 4382, "CMAS CBS Message Identifier for operator defined use"}, + { 65535, "Message Identifier Reserved, and should not be used for new services"}, + { 0, NULL } }; const value_string geographic_scope_values[] = { - { 0x00, "Cell-wide (immediate display)" }, - { 0x01, "PLMN-wide" }, - { 0x02, "Location Area-wide (GSM) or Service Area-wide (UMTS)" }, - { 0x03, "Cell-wide (normal display)" }, - { 0, NULL } + { 0x00, "Cell-wide (immediate display)" }, + { 0x01, "PLMN-wide" }, + { 0x02, "Location Area-wide (GSM) or Service Area-wide (UMTS)" }, + { 0x03, "Cell-wide (normal display)" }, + { 0, NULL } }; /* Initialize the protocol and registered fields */ static int proto_cell_broadcast = -1; -static int hf_gsm_cbs_serial_number = -1; -static int hf_gsm_cbs_geographic_scope = -1; -static int hf_gsm_cbs_message_code = -1; -static int hf_gsm_cbs_update_number = -1; -static int hf_gsm_cbs_message_identifier = -1; -static int hf_gsm_cbs_total_pages = -1; -static int hf_gsm_cbs_current_page = -1; +static int hf_gsm_cbs_serial_number = -1; +static int hf_gsm_cbs_geographic_scope = -1; +static int hf_gsm_cbs_message_code = -1; +static int hf_gsm_cbs_update_number = -1; +static int hf_gsm_cbs_message_identifier = -1; +static int hf_gsm_cbs_total_pages = -1; +static int hf_gsm_cbs_current_page = -1; /* These fields are used when reassembling multi-page gsm cbs messages */ -static int hf_gsm_cbs_pages = -1; -static int hf_gsm_cbs_page_num = -1; -static int hf_gsm_cbs_page_overlap = -1; -static int hf_gsm_cbs_page_overlap_conflict = -1; -static int hf_gsm_cbs_page_multiple_tails = -1; -static int hf_gsm_cbs_page_too_long_fragment = -1; -static int hf_gsm_cbs_page_error = -1; -static int hf_gsm_cbs_page_count = -1; -static int hf_gsm_cbs_message_reassembled_in = -1; -static int hf_gsm_cbs_message_reassembled_length = -1; -static int hf_gsm_cbs_page_content = -1; -static int hf_gsm_cbs_page_content_padding = -1; -static int hf_gsm_cbs_message_content = -1; +static int hf_gsm_cbs_pages = -1; +static int hf_gsm_cbs_page_num = -1; +static int hf_gsm_cbs_page_overlap = -1; +static int hf_gsm_cbs_page_overlap_conflict = -1; +static int hf_gsm_cbs_page_multiple_tails = -1; +static int hf_gsm_cbs_page_too_long_fragment = -1; +static int hf_gsm_cbs_page_error = -1; +static int hf_gsm_cbs_page_count = -1; +static int hf_gsm_cbs_message_reassembled_in = -1; +static int hf_gsm_cbs_message_reassembled_length = -1; +static int hf_gsm_cbs_page_content = -1; +static int hf_gsm_cbs_page_content_padding = -1; +static int hf_gsm_cbs_message_content = -1; /* Initialize the subtree pointers */ -static gint ett_cbs_msg = -1; -static gint ett_cbs_serial_no = -1; -static gint ett_cbs_coding = -1; -static gint ett_gsm_cbs_page = -1; -static gint ett_gsm_cbs_page_content = -1; -static gint ett_gsm_cbs_pages = -1; +static gint ett_cbs_msg = -1; +static gint ett_cbs_serial_no = -1; +static gint ett_cbs_coding = -1; +static gint ett_gsm_cbs_page = -1; +static gint ett_gsm_cbs_page_content = -1; +static gint ett_gsm_cbs_pages = -1; static expert_field ei_gsm_cbs_unhandled_encoding = EI_INIT; /* reassembly of GSM multi-page messages */ -static reassembly_table gsm_cbs_reassembly_table; +static reassembly_table gsm_cbs_reassembly_table; /* Structure needed for the fragmentation routines in reassemble.c */ static const fragment_items gsm_page_items = { - &ett_gsm_cbs_page, - &ett_gsm_cbs_pages, - &hf_gsm_cbs_pages, - &hf_gsm_cbs_page_num, - &hf_gsm_cbs_page_overlap, - &hf_gsm_cbs_page_overlap_conflict, - &hf_gsm_cbs_page_multiple_tails, - &hf_gsm_cbs_page_too_long_fragment, - &hf_gsm_cbs_page_error, - &hf_gsm_cbs_page_count, - &hf_gsm_cbs_message_reassembled_in, - &hf_gsm_cbs_message_reassembled_length, - /* Reassembled data field */ - NULL, - "pages" + &ett_gsm_cbs_page, + &ett_gsm_cbs_pages, + &hf_gsm_cbs_pages, + &hf_gsm_cbs_page_num, + &hf_gsm_cbs_page_overlap, + &hf_gsm_cbs_page_overlap_conflict, + &hf_gsm_cbs_page_multiple_tails, + &hf_gsm_cbs_page_too_long_fragment, + &hf_gsm_cbs_page_error, + &hf_gsm_cbs_page_count, + &hf_gsm_cbs_message_reassembled_in, + &hf_gsm_cbs_message_reassembled_length, + /* Reassembled data field */ + NULL, + "pages" }; @@ -423,166 +423,179 @@ void dissect_umts_cell_broadcast_message(tvbuff_t *tvb, packet_info *pinfo, prot void proto_register_cbs(void) { - /* Setup list of header fields */ - static hf_register_info hf_cbs[] = - { - { &hf_gsm_cbs_serial_number, - { "GSM CBS Serial Number", "gsm_cbs.serial_number", - FT_UINT16, BASE_HEX_DEC, NULL, 0x00, - NULL, HFILL } - }, - { &hf_gsm_cbs_message_code, - { "GSM CBS Message Code", "gsm_cbs.message_code", - FT_UINT16, BASE_DEC_HEX, NULL, 0x3FF0, - NULL, HFILL } - }, - { &hf_gsm_cbs_geographic_scope, - { "GSM CBS Geographic Scope", "gsm_cbs.geographic_scope", - FT_UINT16, BASE_DEC, VALS(geographic_scope_values), 0xC000, - NULL, HFILL } - }, - { &hf_gsm_cbs_update_number, - { "GSM CBS Update Number", "gsm_cbs.update_number", - FT_UINT16, BASE_DEC, NULL, 0x000F, - NULL, HFILL } - }, - { &hf_gsm_cbs_message_identifier, - { "GSM CBS Message Identifier", "gsm_cbs.message-identifier", - FT_UINT16, BASE_DEC_HEX, NULL, 0x00, - NULL, HFILL } - }, - { &hf_gsm_cbs_total_pages, - { "GSM CBS Total Pages", "gsm_cbs.total_pages", - FT_UINT8, BASE_DEC, NULL, 0x0F, - NULL, HFILL } - }, - { &hf_gsm_cbs_current_page, - { "GSM CBS Current Page", "gsm_cbs.current_page", - FT_UINT8, BASE_DEC, NULL, 0xF0, - NULL, HFILL } - }, - /* Fragment fields - */ - { &hf_gsm_cbs_page_overlap, - { "page overlap", - "gsm_cbs.page.overlap", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "GSM CBS page overlaps with other fragments", HFILL - } - }, - { &hf_gsm_cbs_page_overlap_conflict, - { "Conflicting data in page overlap", - "gsm_cbs.page.overlap.conflict", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "Overlapping pages contained conflicting data", HFILL - } - }, - { &hf_gsm_cbs_page_multiple_tails, - { "Multiple final pages found", - "gsm_cbs.page.multipletails", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "Several copies of the final page were found when reassembling the message", HFILL - } - }, - { &hf_gsm_cbs_page_too_long_fragment, - { "Page too long", - "gsm_cbs.page.toolongfragment", - FT_BOOLEAN, BASE_NONE, NULL, 0x0, - "Page contained data past end of packet", HFILL - } - }, - { &hf_gsm_cbs_page_error, - { "Reassembly error", - "gsm_cbs.fragment.error", - FT_FRAMENUM, BASE_NONE, NULL, 0x0, - "Reassembly error due to illegal fragments", HFILL - } - }, - { &hf_gsm_cbs_page_count, - { "Fragment count", - "gsm_cbs.fragment.count", - FT_UINT32, BASE_DEC, NULL, 0x0, - "Count of Page Fragment", HFILL - } - }, - { &hf_gsm_cbs_message_reassembled_in, - { "Reassembled in", - "gsm_cbs.reassembled.in", - FT_FRAMENUM, BASE_NONE, NULL, 0x0, - "CBS pages are reassembled in the given packet", HFILL - } - }, - { &hf_gsm_cbs_message_reassembled_length, - { "Reassembled message length", - "gsm_cbs.reassembled.length", - FT_UINT32, BASE_DEC, NULL, 0x0, - "The total length of the reassembled message", HFILL - } - }, - { &hf_gsm_cbs_page_num, - { "CBS Page Number", - "gsm_cbs.page_number", - FT_FRAMENUM, BASE_NONE, NULL, 0x0, - NULL, HFILL - } - }, - { &hf_gsm_cbs_pages, - { "CBS Pages", - "gsm_cbs.pages", - FT_NONE, BASE_NONE, NULL, 0x0, - NULL, HFILL - } - }, - { &hf_gsm_cbs_page_content, - { "CBS Page Content", - "gsm_cbs.page_content", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL - } - }, - { &hf_gsm_cbs_page_content_padding, - { "CBS Page Content Padding", - "gsm_cbs.page_content_padding", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL - } - }, - { &hf_gsm_cbs_message_content, - { "CBS Message Content", - "gsm_cbs.message_content", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL - } - } - }; - - /* Setup protocol subtree array */ - static gint *ett[] = { - &ett_cbs_msg, - &ett_cbs_serial_no, - &ett_cbs_coding, - &ett_gsm_cbs_page, - &ett_gsm_cbs_page_content, - &ett_gsm_cbs_pages, - }; - - static ei_register_info ei[] = { - { &ei_gsm_cbs_unhandled_encoding, { "gsm_cbs.unhandled_encoding", PI_PROTOCOL, PI_WARN, "Unhandled encoding", EXPFILL }}, - }; - expert_module_t* expert_cell_broadcast; - - /* Register the protocol name and description */ - proto_cell_broadcast = proto_register_protocol("GSM Cell Broadcast Service", "GSM Cell Broadcast Service", "gsm_cbs"); - - proto_register_field_array(proto_cell_broadcast, hf_cbs, array_length(hf_cbs)); - register_init_routine(gsm_cbs_message_reassembly_init); - - /* subdissector code */ - register_dissector("gsm_cbs", dissect_gsm_cell_broadcast, proto_cell_broadcast); - register_dissector("umts_cell_broadcast", dissect_umts_cell_broadcast_message, proto_cell_broadcast); - - /* subtree array */ - proto_register_subtree_array(ett, array_length(ett)); - expert_cell_broadcast = expert_register_protocol(proto_cell_broadcast); - expert_register_field_array(expert_cell_broadcast, ei, array_length(ei)); + /* Setup list of header fields */ + static hf_register_info hf_cbs[] = + { + { &hf_gsm_cbs_serial_number, + { "GSM CBS Serial Number", "gsm_cbs.serial_number", + FT_UINT16, BASE_HEX_DEC, NULL, 0x00, + NULL, HFILL } + }, + { &hf_gsm_cbs_message_code, + { "GSM CBS Message Code", "gsm_cbs.message_code", + FT_UINT16, BASE_DEC_HEX, NULL, 0x3FF0, + NULL, HFILL } + }, + { &hf_gsm_cbs_geographic_scope, + { "GSM CBS Geographic Scope", "gsm_cbs.geographic_scope", + FT_UINT16, BASE_DEC, VALS(geographic_scope_values), 0xC000, + NULL, HFILL } + }, + { &hf_gsm_cbs_update_number, + { "GSM CBS Update Number", "gsm_cbs.update_number", + FT_UINT16, BASE_DEC, NULL, 0x000F, + NULL, HFILL } + }, + { &hf_gsm_cbs_message_identifier, + { "GSM CBS Message Identifier", "gsm_cbs.message-identifier", + FT_UINT16, BASE_DEC_HEX, NULL, 0x00, + NULL, HFILL } + }, + { &hf_gsm_cbs_total_pages, + { "GSM CBS Total Pages", "gsm_cbs.total_pages", + FT_UINT8, BASE_DEC, NULL, 0x0F, + NULL, HFILL } + }, + { &hf_gsm_cbs_current_page, + { "GSM CBS Current Page", "gsm_cbs.current_page", + FT_UINT8, BASE_DEC, NULL, 0xF0, + NULL, HFILL } + }, + /* Fragment fields + */ + { &hf_gsm_cbs_page_overlap, + { "page overlap", + "gsm_cbs.page.overlap", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "GSM CBS page overlaps with other fragments", HFILL + } + }, + { &hf_gsm_cbs_page_overlap_conflict, + { "Conflicting data in page overlap", + "gsm_cbs.page.overlap.conflict", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "Overlapping pages contained conflicting data", HFILL + } + }, + { &hf_gsm_cbs_page_multiple_tails, + { "Multiple final pages found", + "gsm_cbs.page.multipletails", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "Several copies of the final page were found when reassembling the message", HFILL + } + }, + { &hf_gsm_cbs_page_too_long_fragment, + { "Page too long", + "gsm_cbs.page.toolongfragment", + FT_BOOLEAN, BASE_NONE, NULL, 0x0, + "Page contained data past end of packet", HFILL + } + }, + { &hf_gsm_cbs_page_error, + { "Reassembly error", + "gsm_cbs.fragment.error", + FT_FRAMENUM, BASE_NONE, NULL, 0x0, + "Reassembly error due to illegal fragments", HFILL + } + }, + { &hf_gsm_cbs_page_count, + { "Fragment count", + "gsm_cbs.fragment.count", + FT_UINT32, BASE_DEC, NULL, 0x0, + "Count of Page Fragment", HFILL + } + }, + { &hf_gsm_cbs_message_reassembled_in, + { "Reassembled in", + "gsm_cbs.reassembled.in", + FT_FRAMENUM, BASE_NONE, NULL, 0x0, + "CBS pages are reassembled in the given packet", HFILL + } + }, + { &hf_gsm_cbs_message_reassembled_length, + { "Reassembled message length", + "gsm_cbs.reassembled.length", + FT_UINT32, BASE_DEC, NULL, 0x0, + "The total length of the reassembled message", HFILL + } + }, + { &hf_gsm_cbs_page_num, + { "CBS Page Number", + "gsm_cbs.page_number", + FT_FRAMENUM, BASE_NONE, NULL, 0x0, + NULL, HFILL + } + }, + { &hf_gsm_cbs_pages, + { "CBS Pages", + "gsm_cbs.pages", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL + } + }, + { &hf_gsm_cbs_page_content, + { "CBS Page Content", + "gsm_cbs.page_content", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL + } + }, + { &hf_gsm_cbs_page_content_padding, + { "CBS Page Content Padding", + "gsm_cbs.page_content_padding", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL + } + }, + { &hf_gsm_cbs_message_content, + { "CBS Message Content", + "gsm_cbs.message_content", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL + } + } + }; + + /* Setup protocol subtree array */ + static gint *ett[] = { + &ett_cbs_msg, + &ett_cbs_serial_no, + &ett_cbs_coding, + &ett_gsm_cbs_page, + &ett_gsm_cbs_page_content, + &ett_gsm_cbs_pages, + }; + + static ei_register_info ei[] = { + { &ei_gsm_cbs_unhandled_encoding, { "gsm_cbs.unhandled_encoding", PI_PROTOCOL, PI_WARN, "Unhandled encoding", EXPFILL }}, + }; + expert_module_t* expert_cell_broadcast; + + /* Register the protocol name and description */ + proto_cell_broadcast = proto_register_protocol("GSM Cell Broadcast Service", "GSM Cell Broadcast Service", "gsm_cbs"); + + proto_register_field_array(proto_cell_broadcast, hf_cbs, array_length(hf_cbs)); + register_init_routine(gsm_cbs_message_reassembly_init); + + /* subdissector code */ + register_dissector("gsm_cbs", dissect_gsm_cell_broadcast, proto_cell_broadcast); + register_dissector("umts_cell_broadcast", dissect_umts_cell_broadcast_message, proto_cell_broadcast); + + /* subtree array */ + proto_register_subtree_array(ett, array_length(ett)); + expert_cell_broadcast = expert_register_protocol(proto_cell_broadcast); + expert_register_field_array(expert_cell_broadcast, ei, array_length(ei)); } + +/* + * 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-cigi.c b/epan/dissectors/packet-cigi.c index b7e1208e30..674653afca 100644 --- a/epan/dissectors/packet-cigi.c +++ b/epan/dissectors/packet-cigi.c @@ -2534,10 +2534,10 @@ packet_is_cigi(tvbuff_t *tvb) /* CIGI 3 requires that the first packet is always the IG Control or SOF */ switch ( packet_id ) { case CIGI3_PACKET_ID_IG_CONTROL: - if ( packet_size != CIGI3_PACKET_SIZE_IG_CONTROL ) { - if ( packet_size != CIGI3_2_PACKET_SIZE_IG_CONTROL ) { - return FALSE; - } + if ( packet_size != CIGI3_PACKET_SIZE_IG_CONTROL ) { + if ( packet_size != CIGI3_2_PACKET_SIZE_IG_CONTROL ) { + return FALSE; + } } if (!tvb_bytes_exist(tvb, 4, 2)) { @@ -2552,10 +2552,10 @@ packet_is_cigi(tvbuff_t *tvb) break; case CIGI3_PACKET_ID_START_OF_FRAME: - if ( packet_size != CIGI3_PACKET_SIZE_START_OF_FRAME ) { - if ( packet_size != CIGI3_2_PACKET_SIZE_START_OF_FRAME) { - return FALSE; - } + if ( packet_size != CIGI3_PACKET_SIZE_START_OF_FRAME ) { + if ( packet_size != CIGI3_2_PACKET_SIZE_START_OF_FRAME) { + return FALSE; + } } if (!tvb_bytes_exist(tvb, 5, 1)) { @@ -2563,7 +2563,7 @@ packet_is_cigi(tvbuff_t *tvb) return FALSE; } - break; + break; default: return FALSE; } @@ -2666,17 +2666,17 @@ dissect_cigi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Ports */ hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_src_port, tvb, 0, 0, pinfo->srcport); - PROTO_ITEM_SET_HIDDEN(hidden_item); + PROTO_ITEM_SET_HIDDEN(hidden_item); hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_dest_port, tvb, 0, 0, pinfo->destport); - PROTO_ITEM_SET_HIDDEN(hidden_item); + PROTO_ITEM_SET_HIDDEN(hidden_item); hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_port, tvb, 0, 0, pinfo->srcport); - PROTO_ITEM_SET_HIDDEN(hidden_item); + PROTO_ITEM_SET_HIDDEN(hidden_item); hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_port, tvb, 0, 0, pinfo->destport); - PROTO_ITEM_SET_HIDDEN(hidden_item); + PROTO_ITEM_SET_HIDDEN(hidden_item); /* Frame Size */ hidden_item = proto_tree_add_uint(cigi_tree, hf_cigi_frame_size, tvb, 0, 0, tvb_reported_length(tvb)); - PROTO_ITEM_SET_HIDDEN(hidden_item); + PROTO_ITEM_SET_HIDDEN(hidden_item); /* Since the versions of CIGI are not backwards compatible, * dissection is different for each version. @@ -12039,7 +12039,7 @@ proto_reg_handoff_cigi(void) cigi_byte_order = ENC_LITTLE_ENDIAN; break; - default: /* includes CIGI_BYTE_ORDER_FROM_PACKET */ + default: /* includes CIGI_BYTE_ORDER_FROM_PACKET */ /* Leave it alone. */ break; } @@ -12054,3 +12054,16 @@ proto_reg_handoff_cigi(void) inited = TRUE; } } + +/* + * 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-clearcase.c b/epan/dissectors/packet-clearcase.c index 3676eff5ca..00f216e422 100644 --- a/epan/dissectors/packet-clearcase.c +++ b/epan/dissectors/packet-clearcase.c @@ -76,3 +76,16 @@ proto_reg_handoff_clearcase(void) /* Register the procedure tables */ rpc_init_proc_table(CLEARCASE_PROGRAM, 3, clearcase3_proc, hf_clearcase_procedure_v3); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-clip.c b/epan/dissectors/packet-clip.c index 8dd493cabb..6b0da27d39 100644 --- a/epan/dissectors/packet-clip.c +++ b/epan/dissectors/packet-clip.c @@ -54,7 +54,7 @@ capture_clip( const guchar *pd, int len, packet_counts *ld ) { static void dissect_clip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *fh_item; + proto_item *fh_item; pinfo->current_proto = "CLIP"; @@ -128,3 +128,16 @@ proto_reg_handoff_clip(void) /* XXX - no protocol, can't be disabled */ dissector_add_uint("wtap_encap", WTAP_ENCAP_LINUX_ATM_CLIP, clip_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-daytime.c b/epan/dissectors/packet-daytime.c index d3b09f4763..e8cad91e46 100644 --- a/epan/dissectors/packet-daytime.c +++ b/epan/dissectors/packet-daytime.c @@ -41,14 +41,14 @@ static header_field_info *hfi_daytime = NULL; #define DAYTIME_HFI_INIT HFI_INIT(proto_daytime) static header_field_info hfi_daytime_string DAYTIME_HFI_INIT = - { "Daytime", "daytime.string", - FT_STRING, BASE_NONE, NULL, 0x0, - "String containing time and date", HFILL }; +{ "Daytime", "daytime.string", + FT_STRING, BASE_NONE, NULL, 0x0, + "String containing time and date", HFILL }; static header_field_info hfi_response_request DAYTIME_HFI_INIT = - { "Type", "daytime.string", - FT_BOOLEAN, 8, TFS(&tfs_response_request), 0x0, - NULL, HFILL }; +{ "Type", "daytime.string", + FT_BOOLEAN, 8, TFS(&tfs_response_request), 0x0, + NULL, HFILL }; static gint ett_daytime = -1; @@ -58,8 +58,8 @@ static gint ett_daytime = -1; static void dissect_daytime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *daytime_tree; - proto_item *ti; + proto_tree *daytime_tree; + proto_item *ti; col_set_str(pinfo->cinfo, COL_PROTOCOL, "DAYTIME"); @@ -109,3 +109,16 @@ proto_reg_handoff_daytime(void) dissector_add_uint("udp.port", DAYTIME_PORT, daytime_handle); dissector_add_uint("tcp.port", DAYTIME_PORT, daytime_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-dcerpc-bossvr.c b/epan/dissectors/packet-dcerpc-bossvr.c index 45f6af0e79..8d78996bf8 100644 --- a/epan/dissectors/packet-dcerpc-bossvr.c +++ b/epan/dissectors/packet-dcerpc-bossvr.c @@ -107,3 +107,16 @@ proto_reg_handoff_dcerpc_bossvr (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_bossvr, ett_bossvr, &uuid_bossvr, ver_bossvr, bossvr_dissectors, hf_bossvr_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-cds_clerkserver.c b/epan/dissectors/packet-dcerpc-cds_clerkserver.c index f788a60dab..40e2fa0b94 100644 --- a/epan/dissectors/packet-dcerpc-cds_clerkserver.c +++ b/epan/dissectors/packet-dcerpc-cds_clerkserver.c @@ -101,3 +101,16 @@ proto_reg_handoff_cds_clerkserver (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_cds_clerkserver, ett_cds_clerkserver, &uuid_cds_clerkserver, ver_cds_clerkserver, cds_clerkserver_dissectors, hf_cds_clerkserver_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-cds_solicit.c b/epan/dissectors/packet-dcerpc-cds_solicit.c index c010b457af..78d2483591 100644 --- a/epan/dissectors/packet-dcerpc-cds_solicit.c +++ b/epan/dissectors/packet-dcerpc-cds_solicit.c @@ -73,3 +73,16 @@ proto_reg_handoff_cds_solicit (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_cds_solicit, ett_cds_solicit, &uuid_cds_solicit, ver_cds_solicit, cds_solicit_dissectors, hf_cds_solicit_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-cprpc_server.c b/epan/dissectors/packet-dcerpc-cprpc_server.c index e3ad78d92c..6df11e00e5 100644 --- a/epan/dissectors/packet-dcerpc-cprpc_server.c +++ b/epan/dissectors/packet-dcerpc-cprpc_server.c @@ -72,3 +72,16 @@ proto_reg_handoff_cprpc_server (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_cprpc_server, ett_cprpc_server, &uuid_cprpc_server, ver_cprpc_server, cprpc_server_dissectors, hf_cprpc_server_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-dtsprovider.c b/epan/dissectors/packet-dcerpc-dtsprovider.c index 9df1761190..ffc1056e7d 100644 --- a/epan/dissectors/packet-dcerpc-dtsprovider.c +++ b/epan/dissectors/packet-dcerpc-dtsprovider.c @@ -80,3 +80,16 @@ proto_reg_handoff_dtsprovider (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_dtsprovider, ett_dtsprovider, &uuid_dtsprovider, ver_dtsprovider, dtsprovider_dissectors, hf_dtsprovider_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-dtsstime_req.c b/epan/dissectors/packet-dcerpc-dtsstime_req.c index 7822acaa18..758636d95b 100644 --- a/epan/dissectors/packet-dcerpc-dtsstime_req.c +++ b/epan/dissectors/packet-dcerpc-dtsstime_req.c @@ -72,3 +72,16 @@ proto_reg_handoff_dtsstime_req (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_dtsstime_req, ett_dtsstime_req, &uuid_dtsstime_req, ver_dtsstime_req, dtsstime_req_dissectors, hf_dtsstime_req_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-frsapi.c b/epan/dissectors/packet-dcerpc-frsapi.c index 221bc382ba..9281327031 100644 --- a/epan/dissectors/packet-dcerpc-frsapi.c +++ b/epan/dissectors/packet-dcerpc-frsapi.c @@ -71,7 +71,7 @@ void proto_register_dcerpc_frsapi(void) { - static hf_register_info hf[] = { + static hf_register_info hf[] = { { &hf_frsapi_opnum, { "Operation", "frsapi.opnum", FT_UINT16, BASE_DEC, @@ -79,9 +79,9 @@ proto_register_dcerpc_frsapi(void) }; - static gint *ett[] = { - &ett_dcerpc_frsapi, - }; + static gint *ett[] = { + &ett_dcerpc_frsapi, + }; proto_dcerpc_frsapi = proto_register_protocol( @@ -89,7 +89,7 @@ proto_register_dcerpc_frsapi(void) proto_register_field_array(proto_dcerpc_frsapi, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + proto_register_subtree_array(ett, array_length(ett)); } @@ -103,3 +103,16 @@ proto_reg_handoff_dcerpc_frsapi(void) proto_dcerpc_frsapi, ett_dcerpc_frsapi, &uuid_dcerpc_frsapi, ver_dcerpc_frsapi, dcerpc_frsapi_dissectors, hf_frsapi_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-ftserver.c b/epan/dissectors/packet-dcerpc-ftserver.c index d361655946..3f18a588c5 100644 --- a/epan/dissectors/packet-dcerpc-ftserver.c +++ b/epan/dissectors/packet-dcerpc-ftserver.c @@ -94,3 +94,16 @@ proto_reg_handoff_ftserver (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_ftserver, ett_ftserver, &uuid_ftserver, ver_ftserver, ftserver_dissectors, hf_ftserver_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-icl_rpc.c b/epan/dissectors/packet-dcerpc-icl_rpc.c index 7ed8c45873..0f5147206a 100644 --- a/epan/dissectors/packet-dcerpc-icl_rpc.c +++ b/epan/dissectors/packet-dcerpc-icl_rpc.c @@ -77,3 +77,16 @@ proto_reg_handoff_icl_rpc (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_icl_rpc, ett_icl_rpc, &uuid_icl_rpc, ver_icl_rpc, icl_rpc_dissectors, hf_icl_rpc_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-krb5rpc.c b/epan/dissectors/packet-dcerpc-krb5rpc.c index 06592c1e0f..8f9625d7ac 100644 --- a/epan/dissectors/packet-dcerpc-krb5rpc.c +++ b/epan/dissectors/packet-dcerpc-krb5rpc.c @@ -44,7 +44,7 @@ static gint ett_krb5rpc = -1; static e_uuid_t uuid_krb5rpc = { 0x8f73de50, 0x768c, 0x11ca, {0xbf, 0xfc, 0x08, 0x00, 0x1e, 0x03, 0x94, - 0x31} + 0x31} }; static guint16 ver_krb5rpc = 1; static int hf_krb5rpc_opnum = -1; @@ -60,8 +60,8 @@ static gint ett_krb5rpc_krb5 = -1; static int krb5rpc_dissect_sendto_kdc_rqst (tvbuff_t * tvb, int offset, - packet_info * pinfo, proto_tree * tree, - dcerpc_info *di, guint8 *drep) + packet_info * pinfo, proto_tree * tree, + dcerpc_info *di, guint8 *drep) { guint32 keysize, spare1, remain; proto_item *item; @@ -79,10 +79,10 @@ krb5rpc_dissect_sendto_kdc_rqst (tvbuff_t * tvb, int offset, offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, - hf_krb5rpc_sendto_kdc_rqst_keysize, &keysize); + hf_krb5rpc_sendto_kdc_rqst_keysize, &keysize); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, - hf_krb5rpc_sendto_kdc_rqst_spare1, &spare1); + hf_krb5rpc_sendto_kdc_rqst_spare1, &spare1); item = proto_tree_add_item (tree, hf_krb5rpc_krb5, tvb, offset, -1, ENC_NA); subtree = proto_item_add_subtree (item, ett_krb5rpc_krb5); @@ -97,8 +97,8 @@ krb5rpc_dissect_sendto_kdc_rqst (tvbuff_t * tvb, int offset, static int krb5rpc_dissect_sendto_kdc_resp (tvbuff_t * tvb, int offset, - packet_info * pinfo, proto_tree * tree, - dcerpc_info *di, guint8 *drep) + packet_info * pinfo, proto_tree * tree, + dcerpc_info *di, guint8 *drep) { guint32 resp_len, maxsize, spare1, keysize, remain; proto_item *item; @@ -120,13 +120,13 @@ krb5rpc_dissect_sendto_kdc_resp (tvbuff_t * tvb, int offset, hf_krb5rpc_sendto_kdc_resp_len, &resp_len); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, - hf_krb5rpc_sendto_kdc_resp_max, &maxsize); + hf_krb5rpc_sendto_kdc_resp_max, &maxsize); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, - hf_krb5rpc_sendto_kdc_resp_spare1, &spare1); + hf_krb5rpc_sendto_kdc_resp_spare1, &spare1); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, - hf_krb5rpc_sendto_kdc_resp_keysize, &keysize); + hf_krb5rpc_sendto_kdc_resp_keysize, &keysize); item = proto_tree_add_item (tree, hf_krb5rpc_krb5, tvb, offset, -1, ENC_NA); @@ -203,5 +203,18 @@ proto_reg_handoff_krb5rpc (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_krb5rpc, ett_krb5rpc, &uuid_krb5rpc, ver_krb5rpc, - krb5rpc_dissectors, hf_krb5rpc_opnum); + krb5rpc_dissectors, hf_krb5rpc_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dcerpc-llb.c b/epan/dissectors/packet-dcerpc-llb.c index 0988bde5b7..b0e49079df 100644 --- a/epan/dissectors/packet-dcerpc-llb.c +++ b/epan/dissectors/packet-dcerpc-llb.c @@ -43,7 +43,7 @@ static gint ett_llb = -1; static e_uuid_t uuid_llb = { 0x333b33c3, 0x0000, 0x0000, {0x0d, 0x00, 0x00, 0x87, 0x84, 0x00, 0x00, - 0x00} }; + 0x00} }; static guint16 ver_llb = 4; @@ -68,7 +68,7 @@ proto_register_llb (void) }; proto_llb = proto_register_protocol ("DCE/RPC NCS 1.5.1 Local Location Broker", "llb", - "llb"); + "llb"); proto_register_field_array (proto_llb, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); } @@ -78,5 +78,18 @@ proto_reg_handoff_llb (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_llb, ett_llb, &uuid_llb, ver_llb, llb_dissectors, - hf_llb_opnum); + hf_llb_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dcerpc-messenger.c b/epan/dissectors/packet-dcerpc-messenger.c index 4cd1afa871..b7ece7523d 100644 --- a/epan/dissectors/packet-dcerpc-messenger.c +++ b/epan/dissectors/packet-dcerpc-messenger.c @@ -47,8 +47,8 @@ static gint ett_dcerpc_messenger = -1; */ static e_uuid_t uuid_dcerpc_messenger = { - 0x5a7b91f8, 0xff00, 0x11d0, - { 0xa9, 0xb2, 0x00, 0xc0, 0x4f, 0xb6, 0xe6, 0xfc} + 0x5a7b91f8, 0xff00, 0x11d0, + { 0xa9, 0xb2, 0x00, 0xc0, 0x4f, 0xb6, 0xe6, 0xfc} }; static guint16 ver_dcerpc_messenger = 1; @@ -64,13 +64,13 @@ static int messenger_dissect_send_message_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) { - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep, + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep, dissect_ndr_char_cvstring, NDR_POINTER_REF, "Server", hf_messenger_server); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep, + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep, dissect_ndr_char_cvstring, NDR_POINTER_REF, "Client", hf_messenger_client); - offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep, + offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, di, drep, dissect_ndr_char_cvstring, NDR_POINTER_REF, "Message", hf_messenger_message); @@ -81,7 +81,7 @@ static int messenger_dissect_send_message_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di _U_, guint8 *drep) { - offset = dissect_ntstatus(tvb, offset, pinfo, tree, di, drep, + offset = dissect_ntstatus(tvb, offset, pinfo, tree, di, drep, hf_messenger_rc, NULL); return offset; @@ -90,23 +90,23 @@ messenger_dissect_send_message_reply(tvbuff_t *tvb, int offset, packet_info *pin static dcerpc_sub_dissector dcerpc_messenger_dissectors[] = { - {0, "NetrSendMessage", + {0, "NetrSendMessage", messenger_dissect_send_message_rqst, messenger_dissect_send_message_reply }, - {0, NULL, NULL, NULL } + {0, NULL, NULL, NULL } }; void proto_register_dcerpc_messenger(void) { - static hf_register_info hf[] = { + static hf_register_info hf[] = { { &hf_messenger_opnum, { "Operation", "messenger.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_messenger_rc, - { "Return code", "messenger.rc", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &NT_errors_ext, 0x0, NULL, HFILL }}, + { &hf_messenger_rc, + { "Return code", "messenger.rc", FT_UINT32, BASE_HEX | BASE_EXT_STRING, &NT_errors_ext, 0x0, NULL, HFILL }}, { &hf_messenger_server, { "Server", "messenger.server", @@ -120,25 +120,38 @@ proto_register_dcerpc_messenger(void) "Message", "messenger.message", FT_STRING, BASE_NONE, NULL, 0, "The message being sent", HFILL }} - }; + }; - static gint *ett[] = { - &ett_dcerpc_messenger - }; + static gint *ett[] = { + &ett_dcerpc_messenger + }; - proto_dcerpc_messenger = proto_register_protocol( - "Microsoft Messenger Service", "Messenger", "messenger"); + proto_dcerpc_messenger = proto_register_protocol( + "Microsoft Messenger Service", "Messenger", "messenger"); - proto_register_field_array (proto_dcerpc_messenger, hf, array_length (hf)); - proto_register_subtree_array(ett, array_length(ett)); + proto_register_field_array (proto_dcerpc_messenger, hf, array_length (hf)); + proto_register_subtree_array(ett, array_length(ett)); } void proto_reg_handoff_dcerpc_messenger(void) { - /* Register protocol as dcerpc */ + /* Register protocol as dcerpc */ - dcerpc_init_uuid(proto_dcerpc_messenger, ett_dcerpc_messenger, &uuid_dcerpc_messenger, - ver_dcerpc_messenger, dcerpc_messenger_dissectors, hf_messenger_opnum); + dcerpc_init_uuid(proto_dcerpc_messenger, ett_dcerpc_messenger, &uuid_dcerpc_messenger, + ver_dcerpc_messenger, dcerpc_messenger_dissectors, hf_messenger_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-mgmt.c b/epan/dissectors/packet-dcerpc-mgmt.c index ba692352fa..792059fd33 100644 --- a/epan/dissectors/packet-dcerpc-mgmt.c +++ b/epan/dissectors/packet-dcerpc-mgmt.c @@ -84,16 +84,16 @@ proto_register_mgmt (void) NULL, 0x0, NULL, HFILL }}, { &hf_mgmt_proto, {"Authn Proto", "mgmt.proto", FT_UINT32, BASE_HEX, - NULL, 0x0, NULL, HFILL }}, + NULL, 0x0, NULL, HFILL }}, { &hf_mgmt_princ_name, {"Principal name", "mgmt.princ_name", FT_STRING, BASE_NONE, - NULL, 0, NULL, HFILL }}, + NULL, 0, NULL, HFILL }}, { &hf_mgmt_princ_size, {"Principal size", "mgmt.princ_size", FT_UINT32, BASE_DEC, - NULL, 0x0, "Size of principal", HFILL }}, + NULL, 0x0, "Size of principal", HFILL }}, { &hf_mgmt_rc, {"Status", "mgmt.rc", FT_UINT32, BASE_HEX, - NULL, 0x0, NULL, HFILL }}, + NULL, 0x0, NULL, HFILL }}, }; static gint *ett[] = { @@ -110,3 +110,16 @@ proto_reg_handoff_mgmt (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_mgmt, ett_mgmt, &uuid_mgmt, ver_mgmt, mgmt_dissectors, hf_mgmt_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-rdaclif.c b/epan/dissectors/packet-dcerpc-rdaclif.c index a01fd52025..d91c0ece8b 100644 --- a/epan/dissectors/packet-dcerpc-rdaclif.c +++ b/epan/dissectors/packet-dcerpc-rdaclif.c @@ -41,7 +41,7 @@ static int hf_rdaclif_opnum = -1; static gint ett_rdaclif = -1; static e_uuid_t uuid_rdaclif = { 0x47b33331, 0x8000, 0x0000, {0x0d, 0x00, 0x01, 0xdc, 0x6c, 0x00, 0x00, - 0x00} }; + 0x00} }; static guint16 ver_rdaclif = 1; @@ -73,7 +73,7 @@ proto_register_rdaclif (void) }; proto_rdaclif = proto_register_protocol ("DCE/RPC Directory Acl Interface", "rdaclif", - "rdaclif"); + "rdaclif"); proto_register_field_array (proto_rdaclif, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); } @@ -83,5 +83,18 @@ proto_reg_handoff_rdaclif (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rdaclif, ett_rdaclif, &uuid_rdaclif, ver_rdaclif, - rdaclif_dissectors, hf_rdaclif_opnum); + rdaclif_dissectors, hf_rdaclif_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dcerpc-rep_proc.c b/epan/dissectors/packet-dcerpc-rep_proc.c index 50663eba74..00228da27b 100644 --- a/epan/dissectors/packet-dcerpc-rep_proc.c +++ b/epan/dissectors/packet-dcerpc-rep_proc.c @@ -83,3 +83,16 @@ proto_reg_handoff_rep_proc (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rep_proc, ett_rep_proc, &uuid_rep_proc, ver_rep_proc, rep_proc_dissectors, hf_rep_proc_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-roverride.c b/epan/dissectors/packet-dcerpc-roverride.c index a87471b029..051e488875 100644 --- a/epan/dissectors/packet-dcerpc-roverride.c +++ b/epan/dissectors/packet-dcerpc-roverride.c @@ -78,3 +78,16 @@ proto_reg_handoff_roverride (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_roverride, ett_roverride, &uuid_roverride, ver_roverride, roverride_dissectors, hf_roverride_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_attr.c b/epan/dissectors/packet-dcerpc-rs_attr.c index 1b452da9f8..65f363432f 100644 --- a/epan/dissectors/packet-dcerpc-rs_attr.c +++ b/epan/dissectors/packet-dcerpc-rs_attr.c @@ -80,3 +80,16 @@ proto_reg_handoff_rs_attr (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_attr, ett_rs_attr, &uuid_rs_attr, ver_rs_attr, rs_attr_dissectors, hf_rs_attr_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_misc.c b/epan/dissectors/packet-dcerpc-rs_misc.c index df3bdd8b10..bdcb592101 100644 --- a/epan/dissectors/packet-dcerpc-rs_misc.c +++ b/epan/dissectors/packet-dcerpc-rs_misc.c @@ -117,3 +117,16 @@ proto_reg_handoff_rs_misc (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_misc, ett_rs_misc, &uuid_rs_misc, ver_rs_misc, rs_misc_dissectors, hf_rs_misc_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_plcy.c b/epan/dissectors/packet-dcerpc-rs_plcy.c index b88a5307a5..daf072adb9 100644 --- a/epan/dissectors/packet-dcerpc-rs_plcy.c +++ b/epan/dissectors/packet-dcerpc-rs_plcy.c @@ -40,8 +40,8 @@ static int hf_rs_plcy_opnum = -1; static gint ett_dcerpc_rs_plcy = -1; static e_uuid_t uuid_dcerpc_rs_plcy = { - 0x4c878280, 0x4000, 0x0000, - { 0x0D, 0x00, 0x02, 0x87, 0x14, 0x00, 0x00, 0x00 } + 0x4c878280, 0x4000, 0x0000, + { 0x0D, 0x00, 0x02, 0x87, 0x14, 0x00, 0x00, 0x00 } }; static guint16 ver_dcerpc_rs_plcy = 1; @@ -57,7 +57,7 @@ static dcerpc_sub_dissector dcerpc_rs_plcy_dissectors[] = { { 7, "rs_auth_policy_get_info", NULL, NULL }, { 8, "rs_auth_policy_get_effective", NULL, NULL }, { 9, "rs_auth_policy_set_info", NULL, NULL }, - { 0, NULL, NULL, NULL } + { 0, NULL, NULL, NULL } }; void @@ -74,25 +74,38 @@ proto_register_dcerpc_rs_plcy(void) }; - static gint *ett[] = { - &ett_dcerpc_rs_plcy - }; + static gint *ett[] = { + &ett_dcerpc_rs_plcy + }; - proto_dcerpc_rs_plcy = proto_register_protocol( - "RS Interface properties", "RS_PLCY", "rs_plcy"); + proto_dcerpc_rs_plcy = proto_register_protocol( + "RS Interface properties", "RS_PLCY", "rs_plcy"); proto_register_field_array(proto_dcerpc_rs_plcy, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + proto_register_subtree_array(ett, array_length(ett)); } void proto_reg_handoff_dcerpc_rs_plcy(void) { - /* Register protocol as dcerpc */ + /* Register protocol as dcerpc */ - dcerpc_init_uuid(proto_dcerpc_rs_plcy, ett_dcerpc_rs_plcy, - &uuid_dcerpc_rs_plcy, ver_dcerpc_rs_plcy, - dcerpc_rs_plcy_dissectors, hf_rs_plcy_opnum); + dcerpc_init_uuid(proto_dcerpc_rs_plcy, ett_dcerpc_rs_plcy, + &uuid_dcerpc_rs_plcy, ver_dcerpc_rs_plcy, + dcerpc_rs_plcy_dissectors, hf_rs_plcy_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_prop_acct.c b/epan/dissectors/packet-dcerpc-rs_prop_acct.c index 2212a17c86..43641daf05 100644 --- a/epan/dissectors/packet-dcerpc-rs_prop_acct.c +++ b/epan/dissectors/packet-dcerpc-rs_prop_acct.c @@ -74,3 +74,16 @@ proto_reg_handoff_rs_prop_acct (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_prop_acct, ett_rs_prop_acct, &uuid_rs_prop_acct, ver_rs_prop_acct, rs_prop_acct_dissectors, hf_rs_prop_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-dcerpc-rs_prop_attr.c b/epan/dissectors/packet-dcerpc-rs_prop_attr.c index 4a7ee138b2..59d91f8ce6 100644 --- a/epan/dissectors/packet-dcerpc-rs_prop_attr.c +++ b/epan/dissectors/packet-dcerpc-rs_prop_attr.c @@ -41,7 +41,7 @@ static int hf_rs_prop_attr_opnum = -1; static gint ett_rs_prop_attr = -1; static e_uuid_t uuid_rs_prop_attr = { 0x0eff23e6, 0x555a, 0x11cd, {0x95, 0xbf, 0x08, 0x00, 0x09, 0x27, 0x84, - 0xc3} }; + 0xc3} }; static guint16 ver_rs_prop_attr = 1; @@ -66,7 +66,7 @@ proto_register_rs_prop_attr (void) }; proto_rs_prop_attr = proto_register_protocol ("DCE/RPC Prop Attr", "rs_prop_attr", - "rs_prop_attr"); + "rs_prop_attr"); proto_register_field_array (proto_rs_prop_attr, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); } @@ -76,6 +76,19 @@ proto_reg_handoff_rs_prop_attr (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_prop_attr, ett_rs_prop_attr, &uuid_rs_prop_attr, - ver_rs_prop_attr, rs_prop_attr_dissectors, - hf_rs_prop_attr_opnum); + ver_rs_prop_attr, rs_prop_attr_dissectors, + hf_rs_prop_attr_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dcerpc-rs_prop_pgo.c b/epan/dissectors/packet-dcerpc-rs_prop_pgo.c index e2e309db99..ba89d23692 100644 --- a/epan/dissectors/packet-dcerpc-rs_prop_pgo.c +++ b/epan/dissectors/packet-dcerpc-rs_prop_pgo.c @@ -41,7 +41,7 @@ static int hf_rs_prop_pgo_opnum = -1; static gint ett_rs_prop_pgo = -1; static e_uuid_t uuid_rs_prop_pgo = { 0xc23626e8, 0xde34, 0x11ca, {0x8c, 0xbc, 0x08, 0x00, 0x1e, 0x03, 0x94, - 0xc7} }; + 0xc7} }; static guint16 ver_rs_prop_pgo = 1; @@ -81,6 +81,19 @@ proto_reg_handoff_rs_prop_pgo (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_prop_pgo, ett_rs_prop_pgo, &uuid_rs_prop_pgo, - ver_rs_prop_pgo, rs_prop_pgo_dissectors, - hf_rs_prop_pgo_opnum); + ver_rs_prop_pgo, rs_prop_pgo_dissectors, + hf_rs_prop_pgo_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dcerpc-rs_prop_plcy.c b/epan/dissectors/packet-dcerpc-rs_prop_plcy.c index 63b6c46161..95dd85ce28 100644 --- a/epan/dissectors/packet-dcerpc-rs_prop_plcy.c +++ b/epan/dissectors/packet-dcerpc-rs_prop_plcy.c @@ -41,7 +41,7 @@ static int hf_rs_prop_plcy_opnum = -1; static gint ett_rs_prop_plcy = -1; static e_uuid_t uuid_rs_prop_plcy = { 0xe6ac5cb8, 0xde3e, 0x11ca, {0x93, 0x76, 0x08, 0x00, 0x1e, 0x03, 0x94, - 0xc7} }; + 0xc7} }; static guint16 ver_rs_prop_plcy = 1; @@ -79,6 +79,19 @@ proto_reg_handoff_rs_prop_plcy (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_prop_plcy, ett_rs_prop_plcy, &uuid_rs_prop_plcy, - ver_rs_prop_plcy, rs_prop_plcy_dissectors, - hf_rs_prop_plcy_opnum); + ver_rs_prop_plcy, rs_prop_plcy_dissectors, + hf_rs_prop_plcy_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dcerpc-rs_pwd_mgmt.c b/epan/dissectors/packet-dcerpc-rs_pwd_mgmt.c index bcb230925d..27d380a0cd 100644 --- a/epan/dissectors/packet-dcerpc-rs_pwd_mgmt.c +++ b/epan/dissectors/packet-dcerpc-rs_pwd_mgmt.c @@ -41,7 +41,7 @@ static int hf_rs_pwd_mgmt_opnum = -1; static gint ett_rs_pwd_mgmt = -1; static e_uuid_t uuid_rs_pwd_mgmt = { 0x3139a0e2, 0x68da, 0x11cd, {0x91, 0xc7, 0x08, 0x00, 0x09, 0x24, 0x24, - 0x44} }; + 0x44} }; static guint16 ver_rs_pwd_mgmt = 1; @@ -73,7 +73,7 @@ proto_register_rs_pwd_mgmt (void) }; proto_rs_pwd_mgmt = proto_register_protocol ("DCE/RPC Registry Password Management", - "rs_pwd_mgmt", "rs_pwd_mgmt"); + "rs_pwd_mgmt", "rs_pwd_mgmt"); proto_register_field_array (proto_rs_pwd_mgmt, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); } @@ -83,6 +83,19 @@ proto_reg_handoff_rs_pwd_mgmt (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_pwd_mgmt, ett_rs_pwd_mgmt, &uuid_rs_pwd_mgmt, - ver_rs_pwd_mgmt, rs_pwd_mgmt_dissectors, - hf_rs_pwd_mgmt_opnum); + ver_rs_pwd_mgmt, rs_pwd_mgmt_dissectors, + hf_rs_pwd_mgmt_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dcerpc-rs_repadm.c b/epan/dissectors/packet-dcerpc-rs_repadm.c index d66ef1389a..f0904c9782 100644 --- a/epan/dissectors/packet-dcerpc-rs_repadm.c +++ b/epan/dissectors/packet-dcerpc-rs_repadm.c @@ -86,3 +86,16 @@ proto_reg_handoff_rs_repadm (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_repadm, ett_rs_repadm, &uuid_rs_repadm, ver_rs_repadm, rs_repadm_dissectors, hf_rs_repadm_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_replist.c b/epan/dissectors/packet-dcerpc-rs_replist.c index e9b764f2f8..85dde52516 100644 --- a/epan/dissectors/packet-dcerpc-rs_replist.c +++ b/epan/dissectors/packet-dcerpc-rs_replist.c @@ -82,3 +82,16 @@ proto_reg_handoff_rs_replist (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_replist, ett_rs_replist, &uuid_rs_replist, ver_rs_replist, rs_replist_dissectors, hf_rs_replist_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_repmgr.c b/epan/dissectors/packet-dcerpc-rs_repmgr.c index 1b68f654a8..1fb386cdf9 100644 --- a/epan/dissectors/packet-dcerpc-rs_repmgr.c +++ b/epan/dissectors/packet-dcerpc-rs_repmgr.c @@ -41,7 +41,7 @@ static int hf_rs_repmgr_opnum = -1; static gint ett_rs_repmgr = -1; static e_uuid_t uuid_rs_repmgr = { 0xb62dc198, 0xdfd4, 0x11ca, {0x94, 0x8f, 0x08, 0x00, 0x1e, 0x02, 0x59, - 0x4c} }; + 0x4c} }; static guint16 ver_rs_repmgr = 2; @@ -84,5 +84,18 @@ proto_reg_handoff_rs_repmgr (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_repmgr, ett_rs_repmgr, &uuid_rs_repmgr, - ver_rs_repmgr, rs_repmgr_dissectors, hf_rs_repmgr_opnum); + ver_rs_repmgr, rs_repmgr_dissectors, hf_rs_repmgr_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dcerpc-rs_unix.c b/epan/dissectors/packet-dcerpc-rs_unix.c index a3040beee4..0cba6f1ebe 100644 --- a/epan/dissectors/packet-dcerpc-rs_unix.c +++ b/epan/dissectors/packet-dcerpc-rs_unix.c @@ -72,3 +72,16 @@ proto_reg_handoff_rs_unix (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rs_unix, ett_rs_unix, &uuid_rs_unix, ver_rs_unix, rs_unix_dissectors, hf_rs_unix_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-rsec_login.c b/epan/dissectors/packet-dcerpc-rsec_login.c index 2f0e9746c9..20db8b1af1 100644 --- a/epan/dissectors/packet-dcerpc-rsec_login.c +++ b/epan/dissectors/packet-dcerpc-rsec_login.c @@ -71,3 +71,16 @@ proto_reg_handoff_rsec_login (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_rsec_login, ett_rsec_login, &uuid_rsec_login, ver_rsec_login, rsec_login_dissectors, hf_rsec_login_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-secidmap.c b/epan/dissectors/packet-dcerpc-secidmap.c index 228dc0672a..804c882097 100644 --- a/epan/dissectors/packet-dcerpc-secidmap.c +++ b/epan/dissectors/packet-dcerpc-secidmap.c @@ -46,13 +46,13 @@ static guint16 ver_secidmap = 1; static dcerpc_sub_dissector secidmap_dissectors[] = { - { 0, "parse_name", NULL, NULL}, - { 1, "gen_name", NULL, NULL}, - { 2, "avoid_cn_bug", NULL, NULL}, - { 3, "parse_name_cache", NULL, NULL}, - { 4, "gen_name_cache", NULL, NULL}, + { 0, "parse_name", NULL, NULL}, + { 1, "gen_name", NULL, NULL}, + { 2, "avoid_cn_bug", NULL, NULL}, + { 3, "parse_name_cache", NULL, NULL}, + { 4, "gen_name_cache", NULL, NULL}, - { 0, NULL, NULL, NULL }, + { 0, NULL, NULL, NULL }, }; void @@ -75,6 +75,19 @@ proto_register_secidmap (void) void proto_reg_handoff_secidmap (void) { - /* Register the protocol as dcerpc */ - dcerpc_init_uuid (proto_secidmap, ett_secidmap, &uuid_secidmap, ver_secidmap, secidmap_dissectors, hf_secidmap_opnum); + /* Register the protocol as dcerpc */ + dcerpc_init_uuid (proto_secidmap, ett_secidmap, &uuid_secidmap, ver_secidmap, secidmap_dissectors, hf_secidmap_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-tkn4int.c b/epan/dissectors/packet-dcerpc-tkn4int.c index a6b01f2305..ddeceeb108 100644 --- a/epan/dissectors/packet-dcerpc-tkn4int.c +++ b/epan/dissectors/packet-dcerpc-tkn4int.c @@ -82,3 +82,16 @@ proto_reg_handoff_tkn4int (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_tkn4int, ett_tkn4int, &uuid_tkn4int, ver_tkn4int, tkn4int_dissectors, hf_tkn4int_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-ubikdisk.c b/epan/dissectors/packet-dcerpc-ubikdisk.c index 28a9c3c0c7..d44a29bf08 100644 --- a/epan/dissectors/packet-dcerpc-ubikdisk.c +++ b/epan/dissectors/packet-dcerpc-ubikdisk.c @@ -59,7 +59,7 @@ static dcerpc_sub_dissector ubikdisk_dissectors[] = { { 10, "Probe", NULL, NULL}, { 11, "GetServerInterfaces", NULL, NULL}, { 12, "BulkUpdate", NULL, NULL}, - { 0, NULL, NULL, NULL } + { 0, NULL, NULL, NULL } }; void @@ -85,3 +85,16 @@ proto_reg_handoff_ubikdisk (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_ubikdisk, ett_ubikdisk, &uuid_ubikdisk, ver_ubikdisk, ubikdisk_dissectors, hf_ubikdisk_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-ubikvote.c b/epan/dissectors/packet-dcerpc-ubikvote.c index 2510d21813..bfd346b12c 100644 --- a/epan/dissectors/packet-dcerpc-ubikvote.c +++ b/epan/dissectors/packet-dcerpc-ubikvote.c @@ -54,7 +54,7 @@ static dcerpc_sub_dissector ubikvote_dissectors[] = { { 5, "DebugV2", NULL, NULL}, { 6, "SDebugV2", NULL, NULL}, { 7, "GetSyncSiteIdentity", NULL, NULL}, - { 0, NULL, NULL, NULL } + { 0, NULL, NULL, NULL } }; void @@ -80,3 +80,16 @@ proto_reg_handoff_ubikvote (void) /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_ubikvote, ett_ubikvote, &uuid_ubikvote, ver_ubikvote, ubikvote_dissectors, hf_ubikvote_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-update.c b/epan/dissectors/packet-dcerpc-update.c index 8de3ebbc78..f3afee9c23 100644 --- a/epan/dissectors/packet-dcerpc-update.c +++ b/epan/dissectors/packet-dcerpc-update.c @@ -42,7 +42,7 @@ static gint ett_dce_update = -1; static e_uuid_t uuid_dce_update = { 0x4d37f2dd, 0xed43, 0x0000, {0x02, 0xc0, 0x37, 0xcf, 0x1e, 0x00, 0x10, - 0x00} + 0x00} }; static guint16 ver_dce_update = 4; @@ -79,6 +79,19 @@ proto_reg_handoff_dce_update (void) { /* Register the protocol as dcerpc */ dcerpc_init_uuid (proto_dce_update, ett_dce_update, &uuid_dce_update, - ver_dce_update, dce_update_dissectors, - hf_dce_update_opnum); + ver_dce_update, dce_update_dissectors, + hf_dce_update_opnum); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c index bd8761ed51..6600d64061 100644 --- a/epan/dissectors/packet-dec-dnart.c +++ b/epan/dissectors/packet-dec-dnart.c @@ -22,7 +22,7 @@ * * See * - * http://h71000.www7.hp.com/wizard/decnet/ + * http://h71000.www7.hp.com/wizard/decnet/ * * for some DECnet specifications. * @@ -1493,3 +1493,16 @@ proto_reg_handoff_dec_rt(void) dissector_add_uint("ppp.protocol", PPP_DEC4, dec_rt_handle); /* dissector_add_uint("ppp.protocol", PPP_DECNETCP, dec_rt_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-dlsw.c b/epan/dissectors/packet-dlsw.c index 8065339d4f..67806d9754 100644 --- a/epan/dissectors/packet-dlsw.c +++ b/epan/dissectors/packet-dlsw.c @@ -550,70 +550,70 @@ void proto_register_dlsw(void) { static hf_register_info hf[] = { - {&hf_dlsw_flow_control_indication, - {"Flow Control Indication", "dlsw.flow_control_indication", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80, - NULL, HFILL}}, - {&hf_dlsw_flow_control_ack, - {"Flow Control Acknowledgment", "dlsw.flow_control_ack", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40, - NULL, HFILL}}, - {&hf_dlsw_flow_control_operator, + {&hf_dlsw_flow_control_indication, + {"Flow Control Indication", "dlsw.flow_control_indication", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80, + NULL, HFILL}}, + {&hf_dlsw_flow_control_ack, + {"Flow Control Acknowledgment", "dlsw.flow_control_ack", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40, + NULL, HFILL}}, + {&hf_dlsw_flow_control_operator, {"Flow Control Operator", "dlsw.flow_control_operator", FT_UINT8, BASE_DEC, VALS(dlsw_fc_cmd_vals), 0x07, - NULL, HFILL}}, - {&hf_dlsw_flags_explorer_msg, + NULL, HFILL}}, + {&hf_dlsw_flags_explorer_msg, {"Explorer message", "dlsw.flags.explorer_msg", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80, - NULL, HFILL}}, - /* Generated from convert_proto_tree_add_text.pl */ - { &hf_dlsw_version, { "Version", "dlsw.version", FT_UINT8, BASE_DEC, VALS(dlsw_version_vals), 0x0, NULL, HFILL }}, - { &hf_dlsw_header_length, { "Header Length", "dlsw.header_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_message_length, { "Message Length", "dlsw.message_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_remote_dlc, { "Remote DLC", "dlsw.remote_dlc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_remote_dlc_pid, { "Remote DLC PID", "dlsw.remote_dlc_pid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_message_type, { "Message Type", "dlsw.message_type", FT_UINT8, BASE_HEX, VALS(dlsw_type_vals), 0x0, NULL, HFILL }}, - { &hf_dlsw_flow_ctrl_byte, { "Flow ctrl byte", "dlsw.flow_ctrl_byte", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_protocol_id, { "Protocol ID", "dlsw.protocol_id", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_header_number, { "Header Number", "dlsw.header_number", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_old_message_type, { "Old message type", "dlsw.old_message_type", FT_UINT8, BASE_HEX, VALS(dlsw_type_vals), 0x0, NULL, HFILL }}, - { &hf_dlsw_capex_type, { "Capability exchange type", "dlsw.capex_type", FT_UINT8, BASE_HEX, VALS(dlsw_capex_type_vals), 0x0, NULL, HFILL }}, - { &hf_dlsw_largest_frame_size, { "Largest Frame size", "dlsw.largest_frame_size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_ssp_flags, { "SSP Flags", "dlsw.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_circuit_priority, { "Circuit priority", "dlsw.circuit_priority", FT_UINT8, BASE_DEC, VALS(dlsw_pri_vals), 0x7, NULL, HFILL }}, - { &hf_dlsw_target_mac_address, { "Target MAC Address", "dlsw.target_mac_address", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_origin_mac_address, { "Origin MAC Address", "dlsw.origin_mac_address", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_origin_link_sap, { "Origin Link SAP", "dlsw.origin_link_sap", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_target_link_sap, { "Target Link SAP", "dlsw.target_link_sap", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_frame_direction, { "Frame direction", "dlsw.frame_direction", FT_UINT8, BASE_HEX, VALS(dlsw_frame_direction_vals), 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_length, { "DLC Header Length", "dlsw.dlc_header_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_origin_dlc_port_id, { "Origin DLC Port ID", "dlsw.origin_dlc_port_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_origin_dlc, { "Origin DLC", "dlsw.origin_dlc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_origin_transport_id, { "Origin Transport ID", "dlsw.origin_transport_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_target_dlc_port_id, { "Target DLC Port ID", "dlsw.target_dlc_port_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_target_dlc, { "Target DLC", "dlsw.target_dlc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_target_transport_id, { "Target Transport ID", "dlsw.target_transport_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_ac_byte, { "DLC Header - AC byte", "dlsw.dlc_header.ac_byte", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_fc_byte, { "DLC Header - FC byte", "dlsw.dlc_header.fc_byte", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_da, { "DLC Header - DA", "dlsw.dlc_header.da", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_sa, { "DLC Header - SA", "dlsw.dlc_header.sa", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_rif, { "DLC Header - RIF", "dlsw.dlc_header.rif", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_dsap, { "DLC Header - DSAP", "dlsw.dlc_header.dsap", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_ssap, { "DLC Header - SSAP", "dlsw.dlc_header.ssap", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_dlc_header_ctrl, { "DLC Header - Ctrl", "dlsw.dlc_header.ctrl", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_capabilities_length, { "Capabilities Length", "dlsw.capabilities_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_error_pointer, { "Error pointer", "dlsw.error_pointer", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_error_cause, { "Error cause", "dlsw.error_cause", FT_UINT16, BASE_HEX, VALS(dlsw_refuse_vals), 0x0, NULL, HFILL }}, - { &hf_dlsw_vector_length, { "Vector Length", "dlsw.vector_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_vector_type, { "Vector Type", "dlsw.vector_type", FT_UINT8, BASE_HEX, VALS(dlsw_vector_vals), 0x0, NULL, HFILL }}, - { &hf_dlsw_oui, { "OUI", "dlsw.oui", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_initial_pacing_window, { "Initial Pacing Window", "dlsw.initial_pacing_window", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_version_string, { "Version String", "dlsw.version_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_tcp_connections, { "TCP connections", "dlsw.tcp_connections", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_mac_address_list, { "MAC Address List", "dlsw.mac_address_list", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_netbios_name, { "NetBIOS name", "dlsw.netbios_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_vendor_oui, { "Vendor OUI", "dlsw.vendor_oui", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_multicast_version_number, { "Multicast Version Number", "dlsw.multicast_version_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_reserved, { "Reserved", "dlsw.reserved", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_data, { "Data", "dlsw.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_vector_data, { "Data", "dlsw.vector_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_dlsw_unknown_data, { "Data", "dlsw.unknown_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + NULL, HFILL}}, + /* Generated from convert_proto_tree_add_text.pl */ + { &hf_dlsw_version, { "Version", "dlsw.version", FT_UINT8, BASE_DEC, VALS(dlsw_version_vals), 0x0, NULL, HFILL }}, + { &hf_dlsw_header_length, { "Header Length", "dlsw.header_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_message_length, { "Message Length", "dlsw.message_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_remote_dlc, { "Remote DLC", "dlsw.remote_dlc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_remote_dlc_pid, { "Remote DLC PID", "dlsw.remote_dlc_pid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_message_type, { "Message Type", "dlsw.message_type", FT_UINT8, BASE_HEX, VALS(dlsw_type_vals), 0x0, NULL, HFILL }}, + { &hf_dlsw_flow_ctrl_byte, { "Flow ctrl byte", "dlsw.flow_ctrl_byte", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_protocol_id, { "Protocol ID", "dlsw.protocol_id", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_header_number, { "Header Number", "dlsw.header_number", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_old_message_type, { "Old message type", "dlsw.old_message_type", FT_UINT8, BASE_HEX, VALS(dlsw_type_vals), 0x0, NULL, HFILL }}, + { &hf_dlsw_capex_type, { "Capability exchange type", "dlsw.capex_type", FT_UINT8, BASE_HEX, VALS(dlsw_capex_type_vals), 0x0, NULL, HFILL }}, + { &hf_dlsw_largest_frame_size, { "Largest Frame size", "dlsw.largest_frame_size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_ssp_flags, { "SSP Flags", "dlsw.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_circuit_priority, { "Circuit priority", "dlsw.circuit_priority", FT_UINT8, BASE_DEC, VALS(dlsw_pri_vals), 0x7, NULL, HFILL }}, + { &hf_dlsw_target_mac_address, { "Target MAC Address", "dlsw.target_mac_address", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_origin_mac_address, { "Origin MAC Address", "dlsw.origin_mac_address", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_origin_link_sap, { "Origin Link SAP", "dlsw.origin_link_sap", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_target_link_sap, { "Target Link SAP", "dlsw.target_link_sap", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_frame_direction, { "Frame direction", "dlsw.frame_direction", FT_UINT8, BASE_HEX, VALS(dlsw_frame_direction_vals), 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_length, { "DLC Header Length", "dlsw.dlc_header_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_origin_dlc_port_id, { "Origin DLC Port ID", "dlsw.origin_dlc_port_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_origin_dlc, { "Origin DLC", "dlsw.origin_dlc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_origin_transport_id, { "Origin Transport ID", "dlsw.origin_transport_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_target_dlc_port_id, { "Target DLC Port ID", "dlsw.target_dlc_port_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_target_dlc, { "Target DLC", "dlsw.target_dlc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_target_transport_id, { "Target Transport ID", "dlsw.target_transport_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_ac_byte, { "DLC Header - AC byte", "dlsw.dlc_header.ac_byte", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_fc_byte, { "DLC Header - FC byte", "dlsw.dlc_header.fc_byte", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_da, { "DLC Header - DA", "dlsw.dlc_header.da", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_sa, { "DLC Header - SA", "dlsw.dlc_header.sa", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_rif, { "DLC Header - RIF", "dlsw.dlc_header.rif", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_dsap, { "DLC Header - DSAP", "dlsw.dlc_header.dsap", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_ssap, { "DLC Header - SSAP", "dlsw.dlc_header.ssap", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_dlc_header_ctrl, { "DLC Header - Ctrl", "dlsw.dlc_header.ctrl", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_capabilities_length, { "Capabilities Length", "dlsw.capabilities_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_error_pointer, { "Error pointer", "dlsw.error_pointer", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_error_cause, { "Error cause", "dlsw.error_cause", FT_UINT16, BASE_HEX, VALS(dlsw_refuse_vals), 0x0, NULL, HFILL }}, + { &hf_dlsw_vector_length, { "Vector Length", "dlsw.vector_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_vector_type, { "Vector Type", "dlsw.vector_type", FT_UINT8, BASE_HEX, VALS(dlsw_vector_vals), 0x0, NULL, HFILL }}, + { &hf_dlsw_oui, { "OUI", "dlsw.oui", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_initial_pacing_window, { "Initial Pacing Window", "dlsw.initial_pacing_window", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_version_string, { "Version String", "dlsw.version_string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_tcp_connections, { "TCP connections", "dlsw.tcp_connections", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_mac_address_list, { "MAC Address List", "dlsw.mac_address_list", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_netbios_name, { "NetBIOS name", "dlsw.netbios_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_vendor_oui, { "Vendor OUI", "dlsw.vendor_oui", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_multicast_version_number, { "Multicast Version Number", "dlsw.multicast_version_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_reserved, { "Reserved", "dlsw.reserved", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_data, { "Data", "dlsw.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_vector_data, { "Data", "dlsw.vector_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_dlsw_unknown_data, { "Data", "dlsw.unknown_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, }; static gint *ett[] = { @@ -651,3 +651,16 @@ proto_reg_handoff_dlsw(void) dlsw_tcp_handle = new_create_dissector_handle(dissect_dlsw_tcp, proto_dlsw); dissector_add_uint("tcp.port", TCP_PORT_DLSW, dlsw_tcp_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-dtls.c b/epan/dissectors/packet-dtls.c index 0a7b8baaff..a4119c85ee 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -1025,7 +1025,7 @@ dissect_dtls_alert(tvbuff_t *tvb, packet_info *pinfo, desc = try_val_to_str(byte, ssl_31_alert_description); /* now set the text in the record layer line */ - if (level && desc) + if (level && desc) { col_append_fstr(pinfo->cinfo, COL_INFO, "Alert (Level: %s, Description: %s)", @@ -1239,7 +1239,7 @@ dissect_dtls_handshake(tvbuff_t *tvb, packet_info *pinfo, if (reassembled_length != length) { expert_add_info(pinfo, length_item, &ei_dtls_msg_len_diff_fragment); - } + } } if (frag_msg && (fragment_length + fragment_offset) == reassembled_length) @@ -1938,3 +1938,16 @@ proto_reg_handoff_dtls(void) initialized = TRUE; } + +/* + * 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-erf.c b/epan/dissectors/packet-erf.c index 10e3430eed..1438d33e36 100644 --- a/epan/dissectors/packet-erf.c +++ b/epan/dissectors/packet-erf.c @@ -1064,12 +1064,13 @@ dissect_erf_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint64(tree, hf_erf_ts, tvb, 0, 0, pinfo->pseudo_header->erf.phdr.ts); rectype_item = proto_tree_add_uint_format_value(tree, hf_erf_rectype, tvb, 0, 0, pinfo->pseudo_header->erf.phdr.type, - "0x%02x (Type %d: %s)", - pinfo->pseudo_header->erf.phdr.type, - pinfo->pseudo_header->erf.phdr.type & ERF_HDR_TYPE_MASK, - val_to_str_const(pinfo->pseudo_header->erf.phdr.type & ERF_HDR_TYPE_MASK, - erf_type_vals, - "Unknown Type")); + "0x%02x (Type %d: %s)", + pinfo->pseudo_header->erf.phdr.type, + pinfo->pseudo_header->erf.phdr.type & ERF_HDR_TYPE_MASK, + val_to_str_const( + pinfo->pseudo_header->erf.phdr.type & ERF_HDR_TYPE_MASK, + erf_type_vals, + "Unknown Type")); rectype_tree = proto_item_add_subtree(rectype_item, ett_erf_rectype); proto_tree_add_uint(rectype_tree, hf_erf_type, tvb, 0, 0, pinfo->pseudo_header->erf.phdr.type); @@ -1122,10 +1123,10 @@ dissect_erf_pseudo_extension_header(tvbuff_t *tvb, packet_info *pinfo, proto_tre int max = sizeof(pinfo->pseudo_header->erf.ehdr_list)/sizeof(struct erf_ehdr); while(has_more && (i < max)) { - type = (guint8) (pinfo->pseudo_header->erf.ehdr_list[i].ehdr >> 56); + type = (guint8) (pinfo->pseudo_header->erf.ehdr_list[i].ehdr >> 56); - pi = proto_tree_add_uint(tree, hf_erf_ehdr_t, tvb, 0, 0, (type & 0x7f)); - ehdr_tree = proto_item_add_subtree(pi, ett_erf_pseudo_hdr); + pi = proto_tree_add_uint(tree, hf_erf_ehdr_t, tvb, 0, 0, (type & 0x7f)); + ehdr_tree = proto_item_add_subtree(pi, ett_erf_pseudo_hdr); switch (type & 0x7f) { case EXT_HDR_TYPE_CLASSIFICATION: @@ -1955,3 +1956,16 @@ proto_reg_handoff_erf(void) sdh_handle = find_dissector("sdh"); } + +/* + * 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-git.c b/epan/dissectors/packet-git.c index 9158900676..b41aa5dc01 100644 --- a/epan/dissectors/packet-git.c +++ b/epan/dissectors/packet-git.c @@ -47,35 +47,35 @@ static gint hf_git_packet_len = -1; static gint hf_git_packet_data = -1; static gint hf_git_packet_terminator = -1; -#define TCP_PORT_GIT 9418 +#define TCP_PORT_GIT 9418 /* desegmentation of Git over TCP */ static gboolean git_desegment = TRUE; static gboolean get_packet_length(tvbuff_t *tvb, int offset, - guint16 *length) + guint16 *length) { - guint8 *lenstr; + guint8 *lenstr; - lenstr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 4, ENC_ASCII); + lenstr = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, 4, ENC_ASCII); - return (sscanf(lenstr, "%hx", length) == 1); + return (sscanf(lenstr, "%hx", length) == 1); } static guint get_git_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { - guint16 plen; + guint16 plen; - if (!get_packet_length(tvb, offset, &plen)) - return 0; /* No idea what this is */ + if (!get_packet_length(tvb, offset, &plen)) + return 0; /* No idea what this is */ - if (plen == 0) { - /* Terminator packet */ - return 4; - } + if (plen == 0) { + /* Terminator packet */ + return 4; + } - return plen; + return plen; } static int @@ -94,21 +94,21 @@ dissect_git_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data git_tree = proto_item_add_subtree(ti, ett_git); if (!get_packet_length(tvb, 0, &plen)) - return 0; + return 0; if (plen == 0) { - proto_tree_add_uint(git_tree, hf_git_packet_terminator, tvb, offset, - 4, plen); - return 4; + proto_tree_add_uint(git_tree, hf_git_packet_terminator, tvb, offset, + 4, plen); + return 4; } if (git_tree) { - proto_tree_add_uint(git_tree, hf_git_packet_len, tvb, offset, - 4, plen); + proto_tree_add_uint(git_tree, hf_git_packet_len, tvb, offset, + 4, plen); - proto_tree_add_item(git_tree, hf_git_packet_data, tvb, offset+4, - plen-4, ENC_NA); + proto_tree_add_item(git_tree, hf_git_packet_data, tvb, offset+4, + plen-4, ENC_NA); } return tvb_length(tvb); @@ -117,24 +117,24 @@ dissect_git_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data static int dissect_git(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { - tcp_dissect_pdus(tvb, pinfo, tree, git_desegment, 4, get_git_pdu_len, - dissect_git_pdu, data); - return tvb_length(tvb); + tcp_dissect_pdus(tvb, pinfo, tree, git_desegment, 4, get_git_pdu_len, + dissect_git_pdu, data); + return tvb_length(tvb); } void proto_register_git(void) { static hf_register_info hf[] = { - { &hf_git_packet_len, - { "Packet length", "git.length", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, - }, - { &hf_git_packet_data, - { "Packet data", "git.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }, - }, - { &hf_git_packet_terminator, - { "Terminator packet", "git.terminator", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, - }, + { &hf_git_packet_len, + { "Packet length", "git.length", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_git_packet_data, + { "Packet data", "git.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }, + }, + { &hf_git_packet_terminator, + { "Terminator packet", "git.terminator", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, }; static gint *ett[] = { @@ -152,10 +152,10 @@ proto_register_git(void) git_module = prefs_register_protocol(proto_git, NULL); prefs_register_bool_preference(git_module, "desegment", - "Reassemble GIT messages spanning multiple TCP segments", - "Whether the GIT 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.", - &git_desegment); + "Reassemble GIT messages spanning multiple TCP segments", + "Whether the GIT 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.", + &git_desegment); } void @@ -163,3 +163,16 @@ proto_reg_handoff_git(void) { dissector_add_uint("tcp.port", TCP_PORT_GIT, git_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-hpteam.c b/epan/dissectors/packet-hpteam.c index 219e5cb0f2..a39aaf644e 100644 --- a/epan/dissectors/packet-hpteam.c +++ b/epan/dissectors/packet-hpteam.c @@ -140,3 +140,16 @@ void proto_reg_handoff_hpteam(void) /* Register dissector to key off of known PID / OUI combination */ dissector_add_uint("llc.hpteam_pid", 0x0002, hpteam_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-hyperscsi.c b/epan/dissectors/packet-hyperscsi.c index 1f3413e0ac..fc8bfdd731 100644 --- a/epan/dissectors/packet-hyperscsi.c +++ b/epan/dissectors/packet-hyperscsi.c @@ -155,26 +155,26 @@ proto_register_hyperscsi(void) static hf_register_info hf[] = { { &hf_hs_res, { "Reserved", "hyperscsi.reserved", FT_UINT8, BASE_DEC, NULL, 0x0, - NULL, HFILL}}, + NULL, HFILL}}, { &hf_hs_tagno, { "Tag No", "hyperscsi.tagno", FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + NULL, HFILL }}, { &hf_hs_lastfrag, { "Last Fragment", "hyperscsi.lastfrag", FT_BOOLEAN, 8, TFS(&tfs_lastfrag), 0x04, NULL, HFILL}}, { &hf_hs_fragno, { "Fragment No", "hyperscsi.fragno", FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL}}, + NULL, HFILL}}, { &hf_hs_ver, { "HyperSCSI Version", "hyperscsi.version", FT_UINT8, BASE_DEC, NULL, - 0x0, NULL, HFILL}}, + 0x0, NULL, HFILL}}, { &hf_hs_cmd, { "HyperSCSI Command", "hyperscsi.cmd", FT_UINT8, BASE_DEC, VALS(hscsi_opcodes), 0x0, - NULL, HFILL}}, + NULL, HFILL}}, }; static gint *ett[] = { @@ -202,3 +202,16 @@ proto_reg_handoff_hyperscsi(void) dissector_add_uint("ethertype", ETHERTYPE_HYPERSCSI, hs_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-iana-oui.c b/epan/dissectors/packet-iana-oui.c index c3eaf6a467..162f454115 100644 --- a/epan/dissectors/packet-iana-oui.c +++ b/epan/dissectors/packet-iana-oui.c @@ -60,3 +60,16 @@ proto_register_iana_oui(void) llc_add_oui(OUI_IANA, "llc.iana_pid", "LLC IANA OUI PID", hf); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-ieee8023.c b/epan/dissectors/packet-ieee8023.c index c5aac88891..6747f18c4b 100644 --- a/epan/dissectors/packet-ieee8023.c +++ b/epan/dissectors/packet-ieee8023.c @@ -38,16 +38,16 @@ static dissector_handle_t ccsds_handle; void dissect_802_3(volatile int length, gboolean is_802_2, tvbuff_t *tvb, - int offset_after_length, packet_info *pinfo, proto_tree *tree, - proto_tree *fh_tree, int length_id, int trailer_id, expert_field* ei_len, - int fcs_len) + int offset_after_length, packet_info *pinfo, proto_tree *tree, + proto_tree *fh_tree, int length_id, int trailer_id, expert_field* ei_len, + int fcs_len) { - proto_item *length_it; - tvbuff_t *volatile next_tvb = NULL; - tvbuff_t *trailer_tvb = NULL; - const char *saved_proto; - gint captured_length, reported_length; - void *pd_save; + proto_item *length_it; + tvbuff_t *volatile next_tvb = NULL; + tvbuff_t *trailer_tvb = NULL; + const char *saved_proto; + gint captured_length, reported_length; + void *pd_save; length_it = proto_tree_add_uint(fh_tree, length_id, tvb, offset_after_length - 2, 2, length); @@ -135,3 +135,16 @@ proto_reg_handoff_ieee802_3(void) llc_handle = find_dissector("llc"); ccsds_handle = find_dissector("ccsds"); } + +/* + * 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-igrp.c b/epan/dissectors/packet-igrp.c index 9a30dc012e..1c7b158d0f 100644 --- a/epan/dissectors/packet-igrp.c +++ b/epan/dissectors/packet-igrp.c @@ -4,7 +4,7 @@ * * See * - * http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a00800c8ae1.shtml + * http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a00800c8ae1.shtml * * Wireshark - Network traffic analyzer * By Gerald Combs @@ -69,13 +69,13 @@ static void dissect_igrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (ver_and_opcode) { case 0x11: - col_set_str(pinfo->cinfo, COL_INFO, "Response" ); - break; + col_set_str(pinfo->cinfo, COL_INFO, "Response" ); + break; case 0x12: - col_set_str(pinfo->cinfo, COL_INFO, "Request" ); - break; + col_set_str(pinfo->cinfo, COL_INFO, "Request" ); + break; default: - col_set_str(pinfo->cinfo, COL_INFO, "Unknown version or opcode"); + col_set_str(pinfo->cinfo, COL_INFO, "Unknown version or opcode"); } @@ -136,26 +136,26 @@ static void dissect_igrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void dissect_vektor_igrp (tvbuff_t *tvb, proto_tree *igrp_vektor_tree, guint8 network) { - guint8 *ptr_addr,addr[5]; - - addr[0]=network; - addr[1]=tvb_get_guint8(tvb,0); - addr[2]=tvb_get_guint8(tvb,1); - addr[3]=tvb_get_guint8(tvb,2); - addr[4]=0; - - ptr_addr=addr; - if (network==0) ptr_addr=&addr[1]; - - igrp_vektor_tree = proto_tree_add_subtree_format(igrp_vektor_tree, tvb, 0 ,14, - ett_igrp_net, NULL, "Entry for network %s", ip_to_str(ptr_addr)) ; - proto_tree_add_text (igrp_vektor_tree, tvb, 0 ,3,"Network = %s",ip_to_str(ptr_addr)) ; - proto_tree_add_text (igrp_vektor_tree, tvb, 3 ,3,"Delay = %d",tvb_get_ntoh24(tvb,3)) ; - proto_tree_add_text (igrp_vektor_tree, tvb, 6 ,3,"Bandwidth = %d",tvb_get_ntoh24(tvb,6)) ; - proto_tree_add_text (igrp_vektor_tree, tvb, 9 ,2,"MTU = %d bytes",tvb_get_ntohs(tvb,9)) ; - proto_tree_add_text (igrp_vektor_tree, tvb, 11,1,"Reliability = %d",tvb_get_guint8(tvb,11)) ; - proto_tree_add_text (igrp_vektor_tree, tvb, 12,1,"Load = %d",tvb_get_guint8(tvb,12)) ; - proto_tree_add_text (igrp_vektor_tree, tvb, 13,1,"Hop count = %d hops",tvb_get_guint8(tvb,13)) ; + guint8 *ptr_addr,addr[5]; + + addr[0]=network; + addr[1]=tvb_get_guint8(tvb,0); + addr[2]=tvb_get_guint8(tvb,1); + addr[3]=tvb_get_guint8(tvb,2); + addr[4]=0; + + ptr_addr=addr; + if (network==0) ptr_addr=&addr[1]; + + igrp_vektor_tree = proto_tree_add_subtree_format(igrp_vektor_tree, tvb, 0 ,14, + ett_igrp_net, NULL, "Entry for network %s", ip_to_str(ptr_addr)) ; + proto_tree_add_text (igrp_vektor_tree, tvb, 0 ,3,"Network = %s",ip_to_str(ptr_addr)) ; + proto_tree_add_text (igrp_vektor_tree, tvb, 3 ,3,"Delay = %d",tvb_get_ntoh24(tvb,3)) ; + proto_tree_add_text (igrp_vektor_tree, tvb, 6 ,3,"Bandwidth = %d",tvb_get_ntoh24(tvb,6)) ; + proto_tree_add_text (igrp_vektor_tree, tvb, 9 ,2,"MTU = %d bytes",tvb_get_ntohs(tvb,9)) ; + proto_tree_add_text (igrp_vektor_tree, tvb, 11,1,"Reliability = %d",tvb_get_guint8(tvb,11)) ; + proto_tree_add_text (igrp_vektor_tree, tvb, 12,1,"Load = %d",tvb_get_guint8(tvb,12)) ; + proto_tree_add_text (igrp_vektor_tree, tvb, 13,1,"Hop count = %d hops",tvb_get_guint8(tvb,13)) ; } @@ -187,7 +187,7 @@ void proto_register_igrp(void) /* Register the protocol name and description */ proto_igrp = proto_register_protocol("Cisco Interior Gateway Routing Protocol", - "IGRP", "igrp"); + "IGRP", "igrp"); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_igrp, hf, array_length(hf)); @@ -203,32 +203,32 @@ proto_reg_handoff_igrp(void) dissector_add_uint("ip.proto", IP_PROTO_IGRP, igrp_handle); } -/* IGRP Packet structure: +/* IGRP Packet structure: HEADER structure + k * VECTOR structure where: k = (Number of Interior routes) + (Number of System routes) + (Number of Exterior routes) HEADER structure is 12 bytes as follows : -4 bits Version (only version 1 is defined) -4 bits Opcode (1=Replay, 2=Request) -8 bits Update Release -16 bits Autonomous system number -16 bits Number of Interior routes -16 bits Number of System routes -16 bits Number of Exterior routes -16 bits Checksum +4 bits Version (only version 1 is defined) +4 bits Opcode (1=Replay, 2=Request) +8 bits Update Release +16 bits Autonomous system number +16 bits Number of Interior routes +16 bits Number of System routes +16 bits Number of Exterior routes +16 bits Checksum ------- 12 bytes in header VECTOR structure is 14 bytes as follows : -24 bits Network -24 bits Delay -24 bits Bandwidth -16 bits MTU -8 bits Reliability -8 bits Load -8 bits Hop count +24 bits Network +24 bits Delay +24 bits Bandwidth +16 bits MTU +8 bits Reliability +8 bits Load +8 bits Hop count ------- 14 bytes in 1 vector @@ -239,3 +239,16 @@ If it is a system route or a exterior route then this 3 bytes are the first thre If the Delay is 0xFFFFFF then the network is unreachable */ + +/* + * 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-infiniband_sdp.c b/epan/dissectors/packet-infiniband_sdp.c index 98d8fb47d1..9121294047 100644 --- a/epan/dissectors/packet-infiniband_sdp.c +++ b/epan/dissectors/packet-infiniband_sdp.c @@ -132,28 +132,28 @@ typedef enum { } message_by_mid_t; static const range_string mid_meanings[] = { - { Hello, Hello, "Hello" }, - { HelloAck, HelloAck, "HelloAck" }, - { DisConn, DisConn, "DisConn" }, - { AbortConn, AbortConn, "AbortConn" }, - { SendSm, SendSm, "SendSm" }, - { RdmaWrCompl, RdmaWrCompl, "RdmaWrCompl" }, - { RdmaRdCompl, RdmaRdCompl, "RdmaRdCompl" }, - { ModeChange, ModeChange, "ModeChange" }, - { SrcAvailCancel, SrcAvailCancel, "SrcAvailCancel" }, - { SinkAvailCancel, SinkAvailCancel, "SinkAvailCancel" }, - { SinkCancelAck, SinkCancelAck, "SinkCancelAck" }, - { ChRcvBuf, ChRcvBuf, "ChRcvBuf" }, - { ChRcvBufAck, ChRcvBufAck, "ChRcvBufAck" }, - { SuspComm, SuspComm, "SuspComm" }, - { SuspCommAck, SuspCommAck, "SuspCommAck" }, - { SinkAvail, SinkAvail, "SinkAvail" }, - { SrcAvail, SrcAvail, "SrcAvail" }, - { Data, Data, "Data" }, - { 0x00001111, 0x00111111, "Reserved" }, - { 0x01000000, 0x01111111, "Experimental" }, - { 0x10000000, 0x11111100, "Reserved" }, - { 0, 0, NULL } + { Hello, Hello, "Hello" }, + { HelloAck, HelloAck, "HelloAck" }, + { DisConn, DisConn, "DisConn" }, + { AbortConn, AbortConn, "AbortConn" }, + { SendSm, SendSm, "SendSm" }, + { RdmaWrCompl, RdmaWrCompl, "RdmaWrCompl" }, + { RdmaRdCompl, RdmaRdCompl, "RdmaRdCompl" }, + { ModeChange, ModeChange, "ModeChange" }, + { SrcAvailCancel, SrcAvailCancel, "SrcAvailCancel" }, + { SinkAvailCancel, SinkAvailCancel, "SinkAvailCancel" }, + { SinkCancelAck, SinkCancelAck, "SinkCancelAck" }, + { ChRcvBuf, ChRcvBuf, "ChRcvBuf" }, + { ChRcvBufAck, ChRcvBufAck, "ChRcvBufAck" }, + { SuspComm, SuspComm, "SuspComm" }, + { SuspCommAck, SuspCommAck, "SuspCommAck" }, + { SinkAvail, SinkAvail, "SinkAvail" }, + { SrcAvail, SrcAvail, "SrcAvail" }, + { Data, Data, "Data" }, + { 0x00001111, 0x00111111, "Reserved" }, + { 0x01000000, 0x01111111, "Experimental" }, + { 0x10000000, 0x11111100, "Reserved" }, + { 0, 0, NULL } }; /* Code to actually dissect the packets */ @@ -215,7 +215,7 @@ dissect_ib_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ convo_data = (conversation_infiniband_data *)conversation_get_proto_data(conv, proto_infiniband); if (!convo_data) - return 0; + return 0; if (!(convo_data->service_id & SERVICE_ID_MASK)) return 0; /* the service id doesn't match that of SDP - nothing for us to do here */ @@ -554,6 +554,18 @@ proto_reg_handoff_ib_sdp(void) break; } } - } } + +/* + * 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-ipmi-bridge.c b/epan/dissectors/packet-ipmi-bridge.c index de723556ee..43de8f66e0 100644 --- a/epan/dissectors/packet-ipmi-bridge.c +++ b/epan/dissectors/packet-ipmi-bridge.c @@ -138,6 +138,19 @@ static ipmi_cmd_t cmd_bridge[] = { void proto_register_ipmi_bridge(void) { - ipmi_register_netfn_cmdtab(IPMI_BRIDGE_REQ, IPMI_OEM_NONE, NULL, 0, NULL, - cmd_bridge, array_length(cmd_bridge)); + ipmi_register_netfn_cmdtab(IPMI_BRIDGE_REQ, IPMI_OEM_NONE, NULL, 0, NULL, + cmd_bridge, array_length(cmd_bridge)); } + +/* + * 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-ipnet.c b/epan/dissectors/packet-ipnet.c index 3c8513ac58..dc992d7e1b 100644 --- a/epan/dissectors/packet-ipnet.c +++ b/epan/dissectors/packet-ipnet.c @@ -108,28 +108,28 @@ void proto_register_ipnet(void) { static hf_register_info hf[] = { - { &hf_version, { "Header version", "ipnet.version", + { &hf_version, { "Header version", "ipnet.version", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_family, { "Address family", "ipnet.family", + { &hf_family, { "Address family", "ipnet.family", FT_UINT8, BASE_DEC, VALS(solaris_family_vals), 0x0, NULL, HFILL }}, - { &hf_htype, { "Hook type", "ipnet.htype", + { &hf_htype, { "Hook type", "ipnet.htype", FT_UINT16, BASE_DEC, VALS(htype_vals), 0x0, NULL, HFILL }}, - { &hf_pktlen, { "Data length", "ipnet.pktlen", + { &hf_pktlen, { "Data length", "ipnet.pktlen", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_ifindex, { "Interface index", "ipnet.ifindex", + { &hf_ifindex, { "Interface index", "ipnet.ifindex", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_grifindex, { "Group interface index", "ipnet.grifindex", + { &hf_grifindex, { "Group interface index", "ipnet.grifindex", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_zsrc, { "Source Zone ID", "ipnet.zsrc", + { &hf_zsrc, { "Source Zone ID", "ipnet.zsrc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - { &hf_zdst, { "Destination Zone ID", "ipnet.zdst", + { &hf_zdst, { "Destination Zone ID", "ipnet.zdst", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, }; static gint *ett[] = { @@ -155,3 +155,16 @@ proto_reg_handoff_ipnet(void) ipnet_handle = create_dissector_handle(dissect_ipnet, proto_ipnet); dissector_add_uint("wtap_encap", WTAP_ENCAP_IPNET, ipnet_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-l2tp.c b/epan/dissectors/packet-l2tp.c index d8cfb47306..de3009b944 100644 --- a/epan/dissectors/packet-l2tp.c +++ b/epan/dissectors/packet-l2tp.c @@ -1491,7 +1491,7 @@ static void process_control_avps(tvbuff_t *tvb, proto_tree *l2tp_tree, int idx, int length, - guint32 ccid, + guint32 ccid, l2tpv3_tunnel_t *tunnel) { proto_tree *l2tp_lcp_avp_tree, *l2tp_avp_tree = NULL, *l2tp_avp_tree_sub; @@ -1511,7 +1511,7 @@ static void process_control_avps(tvbuff_t *tvb, l2tpv3_session_t *session = NULL; - l2tp_cntrl_data->ccid = ccid; + l2tp_cntrl_data->ccid = ccid; while (idx < length) { /* Process AVP's */ ver_len_hidden = tvb_get_ntohs(tvb, idx); @@ -3110,3 +3110,16 @@ proto_reg_handoff_l2tp(void) ehdlc_handle = find_dissector("ehdlc"); data_handle = find_dissector("data"); } + +/* + * 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-lapbether.c b/epan/dissectors/packet-lapbether.c index 611d460d45..766435e049 100644 --- a/epan/dissectors/packet-lapbether.c +++ b/epan/dissectors/packet-lapbether.c @@ -42,9 +42,9 @@ static dissector_handle_t lapb_handle; static void dissect_lapbether(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *lapbether_tree, *ti; - int len; - tvbuff_t *next_tvb; + proto_tree *lapbether_tree, *ti; + int len; + tvbuff_t *next_tvb; col_set_str(pinfo->cinfo, COL_PROTOCOL, "LAPBETHER"); col_clear(pinfo->cinfo, COL_INFO); @@ -54,11 +54,11 @@ dissect_lapbether(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { ti = proto_tree_add_protocol_format(tree, proto_lapbether, tvb, 0, 2, - "LAPBETHER"); + "LAPBETHER"); lapbether_tree = proto_item_add_subtree(ti, ett_lapbether); proto_tree_add_uint_format(lapbether_tree, hf_lapbether_length, tvb, 0, 2, - len, "Length: %u", len); + len, "Length: %u", len); } @@ -72,8 +72,8 @@ proto_register_lapbether(void) { static hf_register_info hf[] = { { &hf_lapbether_length, - { "Length Field", "lapbether.length", FT_UINT16, BASE_DEC, NULL, 0x0, - "LAPBEther Length Field", HFILL }}, + { "Length Field", "lapbether.length", FT_UINT16, BASE_DEC, NULL, 0x0, + "LAPBEther Length Field", HFILL }}, }; static gint *ett[] = { @@ -98,7 +98,20 @@ proto_reg_handoff_lapbether(void) lapb_handle = find_dissector("lapb"); lapbether_handle = create_dissector_handle(dissect_lapbether, - proto_lapbether); + proto_lapbether); dissector_add_uint("ethertype", ETHERTYPE_DEC, lapbether_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-ldp.c b/epan/dissectors/packet-ldp.c index b7f47750e3..b0f213d8e2 100644 --- a/epan/dissectors/packet-ldp.c +++ b/epan/dissectors/packet-ldp.c @@ -573,19 +573,19 @@ static const value_string tlv_unknown_vals[] = { #define VC_FEC 0x80 /* draft-martini-l2circuit-trans-mpls */ #define GEN_FEC 0x81 #define P2MP_FEC 0x06 -#define MP2MP_FEC_UP 0x07 -#define MP2MP_FEC_DOWN 0x08 +#define MP2MP_FEC_UP 0x07 +#define MP2MP_FEC_DOWN 0x08 const value_string fec_types_vals[] = { - {WILDCARD_FEC, "Wildcard FEC"}, - {PREFIX_FEC, "Prefix FEC"}, - {HOST_FEC, "Host Address FEC"}, - {CRLSP_FEC, "CR LSP FEC"}, - {VC_FEC, "Virtual Circuit FEC"}, - {GEN_FEC, "Generalized PWid FEC"}, - {P2MP_FEC, "P2MP FEC"}, - {MP2MP_FEC_UP, "MP2MP FEC upstream"}, - {MP2MP_FEC_DOWN, "MP2MP FEC Downstream"}, + {WILDCARD_FEC, "Wildcard FEC"}, + {PREFIX_FEC, "Prefix FEC"}, + {HOST_FEC, "Host Address FEC"}, + {CRLSP_FEC, "CR LSP FEC"}, + {VC_FEC, "Virtual Circuit FEC"}, + {GEN_FEC, "Generalized PWid FEC"}, + {P2MP_FEC, "P2MP FEC"}, + {MP2MP_FEC_UP, "MP2MP FEC upstream"}, + {MP2MP_FEC_DOWN, "MP2MP FEC Downstream"}, {0, NULL} }; @@ -2248,21 +2248,21 @@ dissect_tlv_ipv4_interface_id(tvbuff_t *tvb, packet_info *pinfo, guint offset, p sub_tree = proto_tree_add_subtree(val_tree, tvb, offset + 8, rem, ett_ldp_sub_tlv, NULL, "Sub TLV"); if(rem != 20 && rem != 24 && rem != 28 && rem != 29) - { - /*rem = 20 >> Length of IP Multicast Tunnel TLV - rem = 29 >> Length of LDP P2MP LSV TLV - rem = 24 >> Length of RSVP-TE P2MP LSP TLV - rem = 28 >> Length of MPLS Context Label TLV*/ - - proto_item* inv_length; - inv_length = proto_tree_add_item(val_tree, hf_ldp_tlv_inv_length, tvb, offset, rem, ENC_BIG_ENDIAN); - expert_add_info(pinfo, inv_length, &ei_ldp_inv_length); - } + { + /*rem = 20 >> Length of IP Multicast Tunnel TLV + rem = 29 >> Length of LDP P2MP LSV TLV + rem = 24 >> Length of RSVP-TE P2MP LSP TLV + rem = 28 >> Length of MPLS Context Label TLV*/ + + proto_item* inv_length; + inv_length = proto_tree_add_item(val_tree, hf_ldp_tlv_inv_length, tvb, offset, rem, ENC_BIG_ENDIAN); + expert_add_info(pinfo, inv_length, &ei_ldp_inv_length); + } else - { - rem = rem - 8; - dissect_tlv(tvb, pinfo, offset + 8, sub_tree, rem); - } + { + rem = rem - 8; + dissect_tlv(tvb, pinfo, offset + 8, sub_tree, rem); + } } /*Dissect IP Multicast Tunnel TLV*/ static void @@ -4329,3 +4329,16 @@ proto_reg_handoff_ldp(void) dissector_add_uint("udp.port", global_ldp_udp_port, ldp_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-loop.c b/epan/dissectors/packet-loop.c index f78ba68cd4..77f52e3fbc 100644 --- a/epan/dissectors/packet-loop.c +++ b/epan/dissectors/packet-loop.c @@ -3,7 +3,7 @@ * * See * - * http://stuff.mit.edu/people/jhawk/ctp.html + * http://stuff.mit.edu/people/jhawk/ctp.html * * Wireshark - Network traffic analyzer * By Gerald Combs @@ -44,8 +44,8 @@ static gint ett_loop = -1; static dissector_handle_t data_handle; -#define FUNC_REPLY 1 -#define FUNC_FORWARD_DATA 2 +#define FUNC_REPLY 1 +#define FUNC_FORWARD_DATA 2 static const value_string function_vals[] = { { FUNC_REPLY, "Reply" }, @@ -126,28 +126,28 @@ proto_register_loop(void) { static hf_register_info hf[] = { { &hf_loop_skipcount, - { "skipCount", "loop.skipcount", - FT_UINT16, BASE_DEC, NULL, 0x0, + { "skipCount", "loop.skipcount", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_loop_function, - { "Function", "loop.function", - FT_UINT16, BASE_DEC, VALS(function_vals), 0x0, + { "Function", "loop.function", + FT_UINT16, BASE_DEC, VALS(function_vals), 0x0, NULL, HFILL }}, { &hf_loop_relevant_function, - { "Relevant function", "loop.relevant_function", - FT_UINT16, BASE_DEC, VALS(function_vals), 0x0, + { "Relevant function", "loop.relevant_function", + FT_UINT16, BASE_DEC, VALS(function_vals), 0x0, NULL, HFILL }}, { &hf_loop_receipt_number, - { "Receipt number", "loop.receipt_number", - FT_UINT16, BASE_DEC, NULL, 0x0, + { "Receipt number", "loop.receipt_number", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_loop_forwarding_address, - { "Forwarding address", "loop.forwarding_address", - FT_ETHER, BASE_NONE, NULL, 0x0, + { "Forwarding address", "loop.forwarding_address", + FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, }; static gint *ett[] = { @@ -155,7 +155,7 @@ proto_register_loop(void) }; proto_loop = proto_register_protocol("Configuration Test Protocol (loopback)", - "LOOP", "loop"); + "LOOP", "loop"); proto_register_field_array(proto_loop, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } @@ -171,3 +171,16 @@ proto_reg_handoff_loop(void) data_handle = find_dissector("data"); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=8 expandtab: + * :indentSize=2:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-lsc.c b/epan/dissectors/packet-lsc.c index a82fc50e89..ed0759a99b 100644 --- a/epan/dissectors/packet-lsc.c +++ b/epan/dissectors/packet-lsc.c @@ -421,9 +421,9 @@ proto_register_lsc(void) /* Register preferences */ prefs_register_uint_preference(lsc_module, "port", - "LSC Port", - "Set the TCP or UDP port for Pegasus LSC messages", - 10, &global_lsc_port); + "LSC Port", + "Set the TCP or UDP port for Pegasus LSC messages", + 10, &global_lsc_port); } void @@ -454,3 +454,16 @@ proto_reg_handoff_lsc(void) } saved_lsc_port = global_lsc_port; } + +/* + * 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-m2pa.c b/epan/dissectors/packet-m2pa.c index 74bfc90c9e..69b4c23d7c 100644 --- a/epan/dissectors/packet-m2pa.c +++ b/epan/dissectors/packet-m2pa.c @@ -476,8 +476,8 @@ dissect_message_data(tvbuff_t *message_tvb, packet_info *pinfo, proto_item *m2pa pi = proto_tree_add_item(m2pa_tree, hf_undecode_data, message_tvb, length, (actual_length - length), ENC_NA); expert_add_info_format(pinfo, pi, &ei_undecode_data, - "There are %d bytes of data which is greater than M2PA's length parameter (%d)", - actual_length, length); + "There are %d bytes of data which is greater than M2PA's length parameter (%d)", + actual_length, length); } } @@ -626,3 +626,16 @@ proto_reg_handoff_m2pa(void) dissector_add_uint("sctp.port", sctp_port, m2pa_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-m2tp.c b/epan/dissectors/packet-m2tp.c index 719bf0318f..848a5547be 100644 --- a/epan/dissectors/packet-m2tp.c +++ b/epan/dissectors/packet-m2tp.c @@ -174,18 +174,18 @@ static const value_string m2tp_message_class_type_acro_values[] = { #define M2TP_USER_FRAME_RELAY 3 static const value_string m2tp_user_identifier_values[] = { - { M2TP_USER_MTP2, "MTP2" }, - { M2TP_USER_Q921, "Q.921" }, - { M2TP_USER_FRAME_RELAY, "Frame Relay" }, - { 0, NULL }}; + { M2TP_USER_MTP2, "MTP2" }, + { M2TP_USER_Q921, "Q.921" }, + { M2TP_USER_FRAME_RELAY, "Frame Relay" }, + { 0, NULL }}; #define M2TP_MODE_MASTER 1 #define M2TP_MODE_SLAVE 2 static const value_string m2tp_mode_values[] = { - { M2TP_MODE_MASTER, "Master" }, - { M2TP_MODE_SLAVE, "Slave" }, - { 0, NULL}}; + { M2TP_MODE_MASTER, "Master" }, + { M2TP_MODE_SLAVE, "Slave" }, + { 0, NULL}}; #define M2TP_ERROR_CODE_INVALID_VERSION 1 #define M2TP_ERROR_CODE_INVALID_INTERFACE_IDENTIFIER 2 @@ -198,24 +198,24 @@ static const value_string m2tp_mode_values[] = { #define M2TP_ERROR_CODE_INCOMPATIBLE_MASTER_SLAVE_CONFIGURATION 9 static const value_string m2tp_error_code_values[] = { - { M2TP_ERROR_CODE_INVALID_VERSION, "Invalid Version" }, - { M2TP_ERROR_CODE_INVALID_INTERFACE_IDENTIFIER, "Invalid Interface Identifier" }, - { M2TP_ERROR_CODE_INVALID_ADAPTATION_LAYER_IDENTIFIER, "Invalid Adaptation Layer Identifier" }, - { M2TP_ERROR_CODE_INVALID_MESSAGE_TYPE, "Invalid Message Type" }, - { M2TP_ERROR_CODE_INVALID_TRAFFIC_HANDLING_MODE, "Invalid Traffic Handling Mode" }, - { M2TP_ERROR_CODE_UNEXPECTED_MESSAGE, "Unexpected Message" }, - { M2TP_ERROR_CODE_PROTOCOL_ERROR, "Protocol Error" }, - { M2TP_ERROR_CODE_INVALID_STREAM_IDENTIFIER, "Invalid Stream Identified" }, - { M2TP_ERROR_CODE_INCOMPATIBLE_MASTER_SLAVE_CONFIGURATION,"Incompatible Master Slave Configuration" }, - { 0, NULL } }; + { M2TP_ERROR_CODE_INVALID_VERSION, "Invalid Version" }, + { M2TP_ERROR_CODE_INVALID_INTERFACE_IDENTIFIER, "Invalid Interface Identifier" }, + { M2TP_ERROR_CODE_INVALID_ADAPTATION_LAYER_IDENTIFIER, "Invalid Adaptation Layer Identifier" }, + { M2TP_ERROR_CODE_INVALID_MESSAGE_TYPE, "Invalid Message Type" }, + { M2TP_ERROR_CODE_INVALID_TRAFFIC_HANDLING_MODE, "Invalid Traffic Handling Mode" }, + { M2TP_ERROR_CODE_UNEXPECTED_MESSAGE, "Unexpected Message" }, + { M2TP_ERROR_CODE_PROTOCOL_ERROR, "Protocol Error" }, + { M2TP_ERROR_CODE_INVALID_STREAM_IDENTIFIER, "Invalid Stream Identified" }, + { M2TP_ERROR_CODE_INCOMPATIBLE_MASTER_SLAVE_CONFIGURATION,"Incompatible Master Slave Configuration" }, + { 0, NULL } }; #define MANAGEMENT_ORDER_REASON_CODE 1 #define MTP_RELEASE_REASON_CODE 2 static const value_string m2tp_reason_code_values[] = { - { MANAGEMENT_ORDER_REASON_CODE, "Management Order" }, - { MTP_RELEASE_REASON_CODE, "MTP Release" }, - { 0, NULL } }; + { MANAGEMENT_ORDER_REASON_CODE, "Management Order" }, + { MTP_RELEASE_REASON_CODE, "MTP Release" }, + { 0, NULL } }; /* Initialize the protocol and registered fields */ @@ -586,13 +586,13 @@ proto_register_m2tp(void) }, { &hf_m2tp_parameter_value, { "Parameter Value", "m2tp.parameter_value", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL } + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } }, { &hf_m2tp_parameter_padding, { "Padding", "m2tp.parameter_padding", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL } + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } }, { &hf_m2tp_interface_identifier, { "Interface Identifier", "m2tp.interface_identifier", @@ -616,13 +616,13 @@ proto_register_m2tp(void) }, { &hf_m2tp_diagnostic_info, { "Diagnostic information", "m2tp.diagnostic_info", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL } + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } }, { &hf_m2tp_heartbeat_data, { "Heartbeat data", "m2tp.heartbeat_data", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL } + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } }, { &hf_m2tp_error_code, { "Error code", "m2tp.error_code", @@ -659,3 +659,16 @@ proto_reg_handoff_m2tp(void) dissector_add_uint("sctp.ppi", M2TP_PAYLOAD_PROTOCOL_ID, m2tp_handle); dissector_add_uint("sctp.port", SCTP_PORT_M2TP, m2tp_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-m2ua.c b/epan/dissectors/packet-m2ua.c index a488e4a8bd..51b91fbb46 100644 --- a/epan/dissectors/packet-m2ua.c +++ b/epan/dissectors/packet-m2ua.c @@ -870,7 +870,7 @@ static const value_string parameter_tag_values[] = { * * The other option is the old Draft 7 value defined below. */ -#define PROTOCOL_DATA_1_DRAFT_7 0x000e +#define PROTOCOL_DATA_1_DRAFT_7 0x000e static gint protocol_data_1_global = PROTOCOL_DATA_1_PARAMETER_TAG; static void @@ -900,7 +900,7 @@ dissect_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *tree, /* add tag and length to the m2ua tree */ proto_tree_add_uint_format_value(parameter_tree, hf_parameter_tag, parameter_tvb, PARAMETER_TAG_OFFSET, PARAMETER_TAG_LENGTH, - tag, "Protocol data 1 (0x000e)"); + tag, "Protocol data 1 (0x000e)"); proto_tree_add_item(parameter_tree, hf_parameter_length, parameter_tvb, PARAMETER_LENGTH_OFFSET, PARAMETER_LENGTH_LENGTH, ENC_BIG_ENDIAN); tag = PROTOCOL_DATA_1_PARAMETER_TAG; @@ -1144,3 +1144,16 @@ proto_reg_handoff_m2ua(void) dissector_add_uint("sctp.ppi", M2UA_PAYLOAD_PROTOCOL_ID, m2ua_handle); dissector_add_uint("sctp.port", SCTP_PORT_M2UA, m2ua_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-mime-encap.c b/epan/dissectors/packet-mime-encap.c index 069e790ad1..85f97a1765 100644 --- a/epan/dissectors/packet-mime-encap.c +++ b/epan/dissectors/packet-mime-encap.c @@ -70,3 +70,16 @@ proto_reg_handoff_mime_encap(void) mime_encap_handle = find_dissector("mime_dlt"); dissector_add_uint("wtap_encap", WTAP_ENCAP_MIME, mime_encap_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-msn-messenger.c b/epan/dissectors/packet-msn-messenger.c index b9cd203990..d0057fbcc0 100644 --- a/epan/dissectors/packet-msn-messenger.c +++ b/epan/dissectors/packet-msn-messenger.c @@ -36,13 +36,13 @@ void proto_reg_handoff_msnms(void); * The now-expired Internet-Draft for the MSN Messenger 1.0 protocol * can, as of the time of the writing of this comment, be found at: * - * http://praya.sourceforge.net/draft-movva-msn-messenger-protocol-00.txt + * http://praya.sourceforge.net/draft-movva-msn-messenger-protocol-00.txt * - * http://mono.es.gnome.org/imsharp/tutoriales/msn/appendixa.html + * http://mono.es.gnome.org/imsharp/tutoriales/msn/appendixa.html * - * http://www.hypothetic.org/docs/msn/ietf_draft.php + * http://www.hypothetic.org/docs/msn/ietf_draft.php * - * http://babble.wundsam.net/docs/protocol-msn-im.txt + * http://babble.wundsam.net/docs/protocol-msn-im.txt * * Note that it's Yet Another FTP-Like Command/Response Protocol, * so it arguably should be dissected as such, although you do have @@ -58,84 +58,97 @@ static int proto_msnms = -1; static gint ett_msnms = -1; -#define TCP_PORT_MSNMS 1863 +#define TCP_PORT_MSNMS 1863 static void dissect_msnms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *msnms_tree; - proto_item *ti; - gint offset = 0; - const guchar *line; - gint next_offset; - int linelen; - /* int tokenlen; */ - /* const guchar *next_token; */ - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "MSNMS"); - - /* - * Find the end of the first line. - * - * Note that "tvb_find_line_end()" will return a value that is - * not longer than what's in the buffer, so the "tvb_get_ptr()" - * call won't throw an exception. - */ - linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE); - line = tvb_get_ptr(tvb, offset, linelen); - - - /* - * Put the first line from the buffer into the summary. - */ - col_add_str(pinfo->cinfo, COL_INFO, - format_text(line, linelen)); - - if (tree) { - ti = proto_tree_add_item(tree, proto_msnms, tvb, offset, -1, - ENC_NA); - msnms_tree = proto_item_add_subtree(ti, ett_msnms); - - /* - * Show the rest of the packet as text, - * a line at a time. - */ - while (tvb_offset_exists(tvb, offset)) { - /* - * Find the end of the line. - */ - tvb_find_line_end(tvb, offset, -1, - &next_offset, FALSE); - - /* - * Put this line. - */ - proto_tree_add_format_text(msnms_tree, tvb, offset, next_offset - offset); - offset = next_offset; - } - } + proto_tree *msnms_tree; + proto_item *ti; + gint offset = 0; + const guchar *line; + gint next_offset; + int linelen; + /* int tokenlen; */ + /* const guchar *next_token; */ + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MSNMS"); + + /* + * Find the end of the first line. + * + * Note that "tvb_find_line_end()" will return a value that is + * not longer than what's in the buffer, so the "tvb_get_ptr()" + * call won't throw an exception. + */ + linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE); + line = tvb_get_ptr(tvb, offset, linelen); + + + /* + * Put the first line from the buffer into the summary. + */ + col_add_str(pinfo->cinfo, COL_INFO, + format_text(line, linelen)); + + if (tree) { + ti = proto_tree_add_item(tree, proto_msnms, tvb, offset, -1, + ENC_NA); + msnms_tree = proto_item_add_subtree(ti, ett_msnms); + + /* + * Show the rest of the packet as text, + * a line at a time. + */ + while (tvb_offset_exists(tvb, offset)) { + /* + * Find the end of the line. + */ + tvb_find_line_end(tvb, offset, -1, + &next_offset, FALSE); + + /* + * Put this line. + */ + proto_tree_add_format_text(msnms_tree, tvb, offset, next_offset - offset); + offset = next_offset; + } + } } void proto_register_msnms(void) { - static gint *ett[] = { - &ett_msnms, - }; + static gint *ett[] = { + &ett_msnms, + }; - proto_msnms = proto_register_protocol("MSN Messenger Service", "MSNMS", "msnms"); - proto_register_subtree_array(ett, array_length(ett)); + proto_msnms = proto_register_protocol("MSN Messenger Service", "MSNMS", "msnms"); + proto_register_subtree_array(ett, array_length(ett)); } void proto_reg_handoff_msnms(void) { - dissector_handle_t msnms_handle; - - msnms_handle = create_dissector_handle(dissect_msnms, proto_msnms); - dissector_add_uint("tcp.port", TCP_PORT_MSNMS, msnms_handle); - /* - * For MSN Messenger Protocol over HTTP - */ - dissector_add_string("media_type", "application/x-msn-messenger", msnms_handle); + dissector_handle_t msnms_handle; + + msnms_handle = create_dissector_handle(dissect_msnms, proto_msnms); + dissector_add_uint("tcp.port", TCP_PORT_MSNMS, msnms_handle); + /* + * For MSN Messenger Protocol over HTTP + */ + dissector_add_string("media_type", "application/x-msn-messenger", msnms_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-mtp2.c b/epan/dissectors/packet-mtp2.c index 15a883cb3e..77ecf0e0c2 100644 --- a/epan/dissectors/packet-mtp2.c +++ b/epan/dissectors/packet-mtp2.c @@ -135,12 +135,12 @@ dissect_mtp2_header(tvbuff_t *su_tvb, proto_item *mtp2_tree) static guint16 mtp2_fcs16(tvbuff_t * tvbuff) { - guint len = tvb_length(tvbuff)-2; + guint len = tvb_length(tvbuff)-2; - /* Check for Invalid Length */ - if (len == 0) - return (0x0000); - return crc16_ccitt_tvb(tvbuff, len); + /* Check for Invalid Length */ + if (len == 0) + return (0x0000); + return crc16_ccitt_tvb(tvbuff, len); } /* @@ -239,10 +239,10 @@ static const value_string status_field_acro_vals[] = { #define SF_OFFSET (LI_OFFSET + LI_LENGTH) #define EXTENDED_SF_OFFSET (EXTENDED_LI_OFFSET + EXTENDED_LI_LENGTH) -#define SF_LENGTH 1 -#define SF_EXTRA_OFFSET (SF_OFFSET + SF_LENGTH) -#define EXTENDED_SF_EXTRA_OFFSET (EXTENDED_SF_OFFSET + SF_LENGTH) -#define SF_EXTRA_LENGTH 1 +#define SF_LENGTH 1 +#define SF_EXTRA_OFFSET (SF_OFFSET + SF_LENGTH) +#define EXTENDED_SF_EXTRA_OFFSET (EXTENDED_SF_OFFSET + SF_LENGTH) +#define SF_EXTRA_LENGTH 1 static void dissect_mtp2_lssu(tvbuff_t *su_tvb, packet_info *pinfo, proto_item *mtp2_tree) @@ -424,3 +424,16 @@ proto_reg_handoff_mtp2(void) mtp3_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-ncs.c b/epan/dissectors/packet-ncs.c index 208935255e..5017edca65 100644 --- a/epan/dissectors/packet-ncs.c +++ b/epan/dissectors/packet-ncs.c @@ -41,17 +41,17 @@ static int hf_incarnation = -1; static void dissect_ncs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *ncs_tree; - proto_item *ti; + proto_tree *ncs_tree; + proto_item *ti; - ti = proto_tree_add_item(tree, proto_ncs, tvb, 0, -1, ENC_NA); - ncs_tree = proto_item_add_subtree(ti, ett_ncs); + ti = proto_tree_add_item(tree, proto_ncs, tvb, 0, -1, ENC_NA); + ncs_tree = proto_item_add_subtree(ti, ett_ncs); - col_set_str(pinfo->cinfo, COL_PROTOCOL, "NCS"); - col_set_str(pinfo->cinfo, COL_INFO, "Novell Cluster Services Heartbeat"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "NCS"); + col_set_str(pinfo->cinfo, COL_INFO, "Novell Cluster Services Heartbeat"); - proto_tree_add_item(ncs_tree, hf_panning_id, tvb, 4, 4, ENC_BIG_ENDIAN); - proto_tree_add_item(ncs_tree, hf_incarnation, tvb, 8, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(ncs_tree, hf_panning_id, tvb, 4, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(ncs_tree, hf_incarnation, tvb, 8, 4, ENC_BIG_ENDIAN); } void @@ -60,12 +60,12 @@ proto_register_ncs(void) static hf_register_info hf[] = { { &hf_panning_id, - { "Panning ID", "ncs.pan_id", FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, + { "Panning ID", "ncs.pan_id", FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, { &hf_incarnation, - { "Incarnation", "ncs.incarnation", FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, + { "Incarnation", "ncs.incarnation", FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, }; static gint *ett[] = { @@ -73,7 +73,7 @@ proto_register_ncs(void) }; proto_ncs = proto_register_protocol("Novell Cluster Services", - "NCS", "ncs"); + "NCS", "ncs"); proto_register_field_array(proto_ncs, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } @@ -88,3 +88,16 @@ proto_reg_handoff_ncs(void) ncs_handle = create_dissector_handle(dissect_ncs, proto_ncs); dissector_add_uint("ip.proto", IP_PROTO_NCS_HEARTBEAT, ncs_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-newmail.c b/epan/dissectors/packet-newmail.c index 27ac90445f..972ede12b4 100644 --- a/epan/dissectors/packet-newmail.c +++ b/epan/dissectors/packet-newmail.c @@ -128,3 +128,16 @@ proto_reg_handoff_newmail(void) } preference_default_port_last = preference_default_port; } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-nfsauth.c b/epan/dissectors/packet-nfsauth.c index a3e04a0863..b93ea718a1 100644 --- a/epan/dissectors/packet-nfsauth.c +++ b/epan/dissectors/packet-nfsauth.c @@ -80,3 +80,16 @@ proto_reg_handoff_nfsauth(void) /* Register the procedure tables */ rpc_init_proc_table(NFSAUTH_PROGRAM, 1, nfsauth1_proc, hf_nfsauth_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-nt-oui.c b/epan/dissectors/packet-nt-oui.c index f831366820..36208f9174 100644 --- a/epan/dissectors/packet-nt-oui.c +++ b/epan/dissectors/packet-nt-oui.c @@ -53,3 +53,16 @@ proto_register_nortel_oui(void) llc_add_oui(OUI_NORTEL, "llc.nortel_pid", "LLC Nortel OUI PID", hf); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-omapi.c b/epan/dissectors/packet-omapi.c index 71d36417fa..a47f35ed90 100644 --- a/epan/dissectors/packet-omapi.c +++ b/epan/dissectors/packet-omapi.c @@ -74,33 +74,33 @@ static gint ett_omapi = -1; #define OMAPI_PORT 7911 -#define OP_OPEN 1 -#define OP_REFRESH 2 -#define OP_UPDATE 3 -#define OP_NOTIFY 4 -#define OP_ERROR 5 -#define OP_DELETE 6 -#define OP_NOTIFY_CANCEL 7 -#define OP_NOTIFY_CANCELLED 8 +#define OP_OPEN 1 +#define OP_REFRESH 2 +#define OP_UPDATE 3 +#define OP_NOTIFY 4 +#define OP_ERROR 5 +#define OP_DELETE 6 +#define OP_NOTIFY_CANCEL 7 +#define OP_NOTIFY_CANCELLED 8 static const value_string omapi_opcode_vals[] = { - { OP_OPEN, "Open" }, - { OP_REFRESH, "Refresh" }, - { OP_UPDATE, "Update" }, - { OP_NOTIFY, "Notify" }, - { OP_ERROR, "Error" }, - { OP_DELETE, "Delete" }, - { OP_NOTIFY_CANCEL, "Notify cancel" }, - { OP_NOTIFY_CANCELLED,"Notify cancelled" }, + { OP_OPEN, "Open" }, + { OP_REFRESH, "Refresh" }, + { OP_UPDATE, "Update" }, + { OP_NOTIFY, "Notify" }, + { OP_ERROR, "Error" }, + { OP_DELETE, "Delete" }, + { OP_NOTIFY_CANCEL, "Notify cancel" }, + { OP_NOTIFY_CANCELLED, "Notify cancelled" }, { 0, NULL } }; static void dissect_omapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_item *ti; - proto_tree *omapi_tree; - ptvcursor_t* cursor; + proto_item *ti; + proto_tree *omapi_tree; + ptvcursor_t *cursor; guint32 authlength; guint32 msglength; @@ -226,72 +226,72 @@ proto_register_omapi(void) static hf_register_info hf[] = { { &hf_omapi_version, { "Version", "omapi.version", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_hlength, { "Header length", "omapi.hlength", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_auth_id, { "Authentication ID", "omapi.authid", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_auth_len, { "Authentication length", "omapi.authlength", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_opcode, { "Opcode", "omapi.opcode", - FT_UINT32, BASE_DEC, VALS(omapi_opcode_vals), 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, VALS(omapi_opcode_vals), 0x0, + NULL, HFILL }}, { &hf_omapi_handle, { "Handle", "omapi.handle", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_id, { "ID", "omapi.id", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_rid, { "Response ID", "omapi.rid", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_msg_name_len, { "Message name length", "omapi.msg_name_length", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_msg_name, { "Message name", "omapi.msg_name", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_msg_value_len, { "Message value length", "omapi.msg_value_length", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_msg_value, { "Message value", "omapi.msg_value", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_obj_name_len, { "Object name length", "omapi.obj_name_length", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_obj_name, { "Object name", "omapi.obj_name", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_obj_value_len, { "Object value length", "omapi.object_value_length", - FT_UINT32, BASE_DEC, NULL, 0x0, - NULL, HFILL }}, + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_obj_value, { "Object value", "omapi.obj_value", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }}, + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, { &hf_omapi_signature, { "Signature", "omapi.signature", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL }} + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }} }; static gint *ett[] = { @@ -311,3 +311,16 @@ proto_reg_handoff_omapi(void) omapi_handle = create_dissector_handle(dissect_omapi, proto_omapi); dissector_add_uint("tcp.port", OMAPI_PORT, omapi_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-pana.c b/epan/dissectors/packet-pana.c index b67ebdecfe..7ad698424f 100644 --- a/epan/dissectors/packet-pana.c +++ b/epan/dissectors/packet-pana.c @@ -120,80 +120,80 @@ static int hf_pana_avp_data_enumerated = -1; #define MSG_TYPE_MAX 5 static const value_string msg_type_names[] = { - { 1, "PANA-Client-Initiation" }, - { 2, "PANA-Auth" }, - { 3, "PANA-Termination" }, - { 4, "PANA-Notification" }, - { 5, "PANA-Relay" }, - { 0, NULL } + { 1, "PANA-Client-Initiation" }, + { 2, "PANA-Auth" }, + { 3, "PANA-Termination" }, + { 4, "PANA-Notification" }, + { 5, "PANA-Relay" }, + { 0, NULL } }; static const value_string msg_subtype_names[] = { - { 0x0000, "Answer" }, - { 0x8000, "Request" }, - { 0, NULL } + { 0x0000, "Answer" }, + { 0x8000, "Request" }, + { 0, NULL } }; #define AVP_CODE_MAX 13 static const value_string avp_code_names[] = { - { 1, "AUTH AVP" }, - { 2, "EAP-Payload AVP" }, - { 3, "Integrity-Algorithm AVP" }, - { 4, "Key-Id AVP" }, - { 5, "Nonce AVP" }, - { 6, "PRF-Algorithm AVP" }, - { 7, "Result-Code" }, - { 8, "Session-Lifetime" }, - { 9, "Termination-Cause" }, - { 10, "PaC-Information" }, - { 11, "Relayed-Message" }, - { 12, "Encryption-Encap" }, - { 13, "Encryption-Algorithm" }, - { 0, NULL } + { 1, "AUTH AVP" }, + { 2, "EAP-Payload AVP" }, + { 3, "Integrity-Algorithm AVP" }, + { 4, "Key-Id AVP" }, + { 5, "Nonce AVP" }, + { 6, "PRF-Algorithm AVP" }, + { 7, "Result-Code" }, + { 8, "Session-Lifetime" }, + { 9, "Termination-Cause" }, + { 10, "PaC-Information" }, + { 11, "Relayed-Message" }, + { 12, "Encryption-Encap" }, + { 13, "Encryption-Algorithm" }, + { 0, NULL } }; #if 0 static const value_string avp_resultcode_names[] = { - { 0, "PANA_SUCCESS" }, - { 1, "PANA_AUTHENTICATION_REJECTED" }, - { 2, "PANA_AUTHORIZATION_REJECTED" }, - { 0, NULL } + { 0, "PANA_SUCCESS" }, + { 1, "PANA_AUTHENTICATION_REJECTED" }, + { 2, "PANA_AUTHORIZATION_REJECTED" }, + { 0, NULL } }; #endif typedef enum { - PANA_OCTET_STRING = 1, - PANA_INTEGER32, - PANA_INTEGER64, - PANA_UNSIGNED32, - PANA_UNSIGNED64, - PANA_FLOAT32, - PANA_FLOAT64, - PANA_FLOAT128, - PANA_GROUPED, - PANA_ENUMERATED, - PANA_UTF8STRING, - PANA_EAP, - PANA_RESULT_CODE, - PANA_ENCAPSULATED + PANA_OCTET_STRING = 1, + PANA_INTEGER32, + PANA_INTEGER64, + PANA_UNSIGNED32, + PANA_UNSIGNED64, + PANA_FLOAT32, + PANA_FLOAT64, + PANA_FLOAT128, + PANA_GROUPED, + PANA_ENUMERATED, + PANA_UTF8STRING, + PANA_EAP, + PANA_RESULT_CODE, + PANA_ENCAPSULATED } pana_avp_types; static const value_string avp_type_names[]={ - { PANA_OCTET_STRING, "OctetString" }, - { PANA_INTEGER32, "Integer32" }, - { PANA_INTEGER64, "Integer64" }, - { PANA_UNSIGNED32, "Unsigned32" }, - { PANA_UNSIGNED64, "Unsigned64" }, - { PANA_FLOAT32, "Float32" }, - { PANA_FLOAT64, "Float64" }, - { PANA_FLOAT128, "Float128" }, - { PANA_GROUPED, "Grouped" }, - { PANA_ENUMERATED, "Enumerated" }, - { PANA_UTF8STRING, "UTF8String" }, - { PANA_EAP, "OctetString" }, - { PANA_RESULT_CODE, "Unsigned32" }, - { PANA_ENCAPSULATED, "Encapsulated" }, - { 0, NULL } + { PANA_OCTET_STRING, "OctetString" }, + { PANA_INTEGER32, "Integer32" }, + { PANA_INTEGER64, "Integer64" }, + { PANA_UNSIGNED32, "Unsigned32" }, + { PANA_UNSIGNED64, "Unsigned64" }, + { PANA_FLOAT32, "Float32" }, + { PANA_FLOAT64, "Float64" }, + { PANA_FLOAT128, "Float128" }, + { PANA_GROUPED, "Grouped" }, + { PANA_ENUMERATED, "Enumerated" }, + { PANA_UTF8STRING, "UTF8String" }, + { PANA_EAP, "OctetString" }, + { PANA_RESULT_CODE, "Unsigned32" }, + { PANA_ENCAPSULATED, "Encapsulated" }, + { 0, NULL } }; @@ -225,36 +225,36 @@ static void dissect_pana_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags) { - proto_item *flags_item; - proto_tree *flags_tree; - - if(parent_tree == NULL) - return; - - flags_item = proto_tree_add_uint(parent_tree, hf_pana_flags, tvb, - offset, 2, flags); - flags_tree = proto_item_add_subtree(flags_item, ett_pana_flags); - - proto_tree_add_boolean(flags_tree, hf_pana_flag_r, tvb, offset, 2, flags); - if (flags & PANA_FLAG_R) - proto_item_append_text(flags_item, ", Request"); - else - proto_item_append_text(flags_item, ", Answer"); - proto_tree_add_boolean(flags_tree, hf_pana_flag_s, tvb, offset, 2, flags); - if (flags & PANA_FLAG_S) - proto_item_append_text(flags_item, ", S flag set"); - proto_tree_add_boolean(flags_tree, hf_pana_flag_c, tvb, offset, 2, flags); - if (flags & PANA_FLAG_C) - proto_item_append_text(flags_item, ", C flag set"); - proto_tree_add_boolean(flags_tree, hf_pana_flag_a, tvb, offset, 2, flags); - if (flags & PANA_FLAG_A) - proto_item_append_text(flags_item, ", A flag set"); - proto_tree_add_boolean(flags_tree, hf_pana_flag_p, tvb, offset, 2, flags); - if (flags & PANA_FLAG_P) - proto_item_append_text(flags_item, ", P flag set"); - proto_tree_add_boolean(flags_tree, hf_pana_flag_i, tvb, offset, 2, flags); - if (flags & PANA_FLAG_I) - proto_item_append_text(flags_item, ", I flag set"); + proto_item *flags_item; + proto_tree *flags_tree; + + if(parent_tree == NULL) + return; + + flags_item = proto_tree_add_uint(parent_tree, hf_pana_flags, tvb, + offset, 2, flags); + flags_tree = proto_item_add_subtree(flags_item, ett_pana_flags); + + proto_tree_add_boolean(flags_tree, hf_pana_flag_r, tvb, offset, 2, flags); + if (flags & PANA_FLAG_R) + proto_item_append_text(flags_item, ", Request"); + else + proto_item_append_text(flags_item, ", Answer"); + proto_tree_add_boolean(flags_tree, hf_pana_flag_s, tvb, offset, 2, flags); + if (flags & PANA_FLAG_S) + proto_item_append_text(flags_item, ", S flag set"); + proto_tree_add_boolean(flags_tree, hf_pana_flag_c, tvb, offset, 2, flags); + if (flags & PANA_FLAG_C) + proto_item_append_text(flags_item, ", C flag set"); + proto_tree_add_boolean(flags_tree, hf_pana_flag_a, tvb, offset, 2, flags); + if (flags & PANA_FLAG_A) + proto_item_append_text(flags_item, ", A flag set"); + proto_tree_add_boolean(flags_tree, hf_pana_flag_p, tvb, offset, 2, flags); + if (flags & PANA_FLAG_P) + proto_item_append_text(flags_item, ", P flag set"); + proto_tree_add_boolean(flags_tree, hf_pana_flag_i, tvb, offset, 2, flags); + if (flags & PANA_FLAG_I) + proto_item_append_text(flags_item, ", I flag set"); } @@ -266,20 +266,20 @@ static void dissect_pana_avp_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags) { - proto_item *avp_flags_item; - proto_tree *avp_flags_tree; + proto_item *avp_flags_item; + proto_tree *avp_flags_tree; - if(parent_tree == NULL) { - return; - } - avp_flags_item = proto_tree_add_uint(parent_tree, hf_pana_avp_flags, tvb, - offset, 2, flags); - avp_flags_tree = proto_item_add_subtree(avp_flags_item, ett_pana_avp_flags); + if(parent_tree == NULL) { + return; + } + avp_flags_item = proto_tree_add_uint(parent_tree, hf_pana_avp_flags, tvb, + offset, 2, flags); + avp_flags_tree = proto_item_add_subtree(avp_flags_item, ett_pana_avp_flags); - proto_tree_add_boolean(avp_flags_tree, hf_pana_avp_flag_v, tvb, offset, 2, flags); - if (flags & PANA_AVP_FLAG_V) { - proto_item_append_text(avp_flags_item, ", Vendor"); - } + proto_tree_add_boolean(avp_flags_tree, hf_pana_avp_flag_v, tvb, offset, 2, flags); + if (flags & PANA_AVP_FLAG_V) { + proto_item_append_text(avp_flags_item, ", Vendor"); + } } @@ -291,26 +291,26 @@ static pana_avp_types pana_avp_get_type(guint16 avp_code, guint32 vendor_id) { - if(vendor_id == 0) { - switch(avp_code) { - case 1: return PANA_OCTET_STRING; /* AUTH AVP */ - case 2: return PANA_EAP; /* EAP-Payload AVP */ - case 3: return PANA_UNSIGNED32; /* Integrity-Algorithm AVP */ - case 4: return PANA_INTEGER32; /* Key-Id AVP */ - case 5: return PANA_OCTET_STRING; /* Nonce AVP */ - case 6: return PANA_UNSIGNED32; /* PRF-Algorithm AVP */ - case 7: return PANA_RESULT_CODE; /* Result-Code AVP */ - case 8: return PANA_UNSIGNED32; /* Session-Lifetime AVP */ - case 9: return PANA_ENUMERATED; /* Termination-Cause AVP */ - case 10: return PANA_OCTET_STRING; /* PaC-Information AVP */ - case 11: return PANA_ENCAPSULATED; /* Relayed-Message AVP */ - case 12: return PANA_OCTET_STRING; /* Encryption-Encap AVP */ - case 13: return PANA_UNSIGNED32; /* Encryption-Algorithm AVP */ - default: return PANA_OCTET_STRING; - } - } else { - return PANA_OCTET_STRING; - } + if(vendor_id == 0) { + switch(avp_code) { + case 1: return PANA_OCTET_STRING; /* AUTH AVP */ + case 2: return PANA_EAP; /* EAP-Payload AVP */ + case 3: return PANA_UNSIGNED32; /* Integrity-Algorithm AVP */ + case 4: return PANA_INTEGER32; /* Key-Id AVP */ + case 5: return PANA_OCTET_STRING; /* Nonce AVP */ + case 6: return PANA_UNSIGNED32; /* PRF-Algorithm AVP */ + case 7: return PANA_RESULT_CODE; /* Result-Code AVP */ + case 8: return PANA_UNSIGNED32; /* Session-Lifetime AVP */ + case 9: return PANA_ENUMERATED; /* Termination-Cause AVP */ + case 10: return PANA_OCTET_STRING; /* PaC-Information AVP */ + case 11: return PANA_ENCAPSULATED; /* Relayed-Message AVP */ + case 12: return PANA_OCTET_STRING; /* Encryption-Encap AVP */ + case 13: return PANA_UNSIGNED32; /* Encryption-Algorithm AVP */ + default: return PANA_OCTET_STRING; + } + } else { + return PANA_OCTET_STRING; + } } @@ -322,169 +322,169 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree) { - gint offset; - guint16 avp_code; - guint16 avp_flags; - guint32 avp_length; - guint16 avp_type; - guint32 vendor_id; - guint32 avp_hdr_length; - guint32 avp_data_length, result_code; - guint32 padding; - - gint32 buffer_length; - - tvbuff_t *group_tvb; - tvbuff_t *eap_tvb; - tvbuff_t *encap_tvb; - proto_tree *single_avp_tree; - proto_tree *avp_eap_tree; - proto_tree *avp_encap_tree; - - offset = 0; - buffer_length = tvb_reported_length(tvb); - - /* Go through all AVPs */ - while (buffer_length > 0) { - avp_code = tvb_get_ntohs(tvb, offset); - avp_flags = tvb_get_ntohs(tvb, offset + 2); - avp_data_length = tvb_get_ntohs(tvb, offset + 4); - - /* Check AVP flags for vendor specific AVP */ - if (avp_flags & PANA_AVP_FLAG_V) { - vendor_id = tvb_get_ntohl(tvb, 8); - avp_hdr_length = 12; - } else { - vendor_id = 0; - avp_hdr_length = 8; - } - - avp_length = avp_hdr_length + avp_data_length; - - /* Check AVP type */ - avp_type = pana_avp_get_type(avp_code, vendor_id); - - - /* Check padding */ - padding = (4 - (avp_length % 4)) % 4; - - single_avp_tree = proto_tree_add_subtree_format(avp_tree, tvb, offset, avp_length + padding, - ett_pana_avp_info, NULL, "%s (%s) length: %d bytes (%d padded bytes)", - val_to_str(avp_code, avp_code_names, "Unknown (%d)"), - val_to_str(avp_type, avp_type_names, "Unknown (%d)"), - avp_length, - avp_length + padding); - - /* AVP Code */ - proto_tree_add_uint_format_value(single_avp_tree, hf_pana_avp_code, tvb, - offset, 2, avp_code, "%s (%u)", - val_to_str(avp_code, avp_code_names, "Unknown (%d)"), - avp_code); - offset += 2; - - /* AVP Flags */ - dissect_pana_avp_flags(single_avp_tree, tvb, offset, avp_flags); - offset += 2; - - /* AVP Length */ - proto_tree_add_item(single_avp_tree, hf_pana_avp_data_length, tvb, offset, 2, ENC_BIG_ENDIAN); - offset += 2; - - /* Reserved */ - proto_tree_add_item(single_avp_tree, hf_pana_avp_reserved, tvb, offset, 2, ENC_NA); - offset += 2; - - if (avp_flags & PANA_AVP_FLAG_V) { - /* Vendor ID */ - proto_tree_add_item(single_avp_tree, hf_pana_avp_vendorid, tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; - } - if (! (avp_flags & PANA_AVP_FLAG_V)) { - /* AVP Value */ - switch(avp_type) { - case PANA_GROUPED: { - proto_tree *avp_group_tree; - avp_group_tree = proto_tree_add_subtree(single_avp_tree, - tvb, offset, avp_data_length, - ett_pana_avp, NULL, "Grouped AVP"); - group_tvb = tvb_new_subset(tvb, offset, - MIN(avp_data_length, tvb_reported_length(tvb)-offset), - avp_data_length); - dissect_avps(group_tvb, pinfo, avp_group_tree); - break; - } - case PANA_UTF8STRING: { - const guint8 *data; - data = tvb_get_ptr(tvb, offset, avp_data_length); - proto_tree_add_string_format(single_avp_tree, hf_pana_avp_data_string, tvb, - offset, avp_data_length, data, - "UTF8String: %*.*s", - avp_data_length, avp_data_length, data); - break; - } - case PANA_OCTET_STRING: { - proto_tree_add_item(single_avp_tree, hf_pana_avp_data_bytes, tvb, - offset, avp_data_length, ENC_NA); - break; - } - case PANA_INTEGER32: { - proto_tree_add_item(single_avp_tree, hf_pana_avp_data_int32, tvb, - offset, 4, ENC_BIG_ENDIAN); - break; - } - case PANA_UNSIGNED32: { - proto_tree_add_item(single_avp_tree, hf_pana_avp_data_uint32, tvb, - offset, 4, ENC_BIG_ENDIAN); - break; - } - case PANA_INTEGER64: { - proto_tree_add_item(single_avp_tree, hf_pana_avp_data_int64, tvb, - offset, 8, ENC_BIG_ENDIAN); - break; - } - case PANA_UNSIGNED64: { - proto_tree_add_item(single_avp_tree, hf_pana_avp_data_uint64, tvb, - offset, 8, ENC_BIG_ENDIAN); - break; - } - case PANA_ENUMERATED: { - proto_tree_add_item(single_avp_tree, hf_pana_avp_data_enumerated, tvb, - offset, 4, ENC_BIG_ENDIAN); - break; - } - case PANA_RESULT_CODE: { - result_code = tvb_get_ntohl(tvb, offset); - proto_tree_add_uint_format(single_avp_tree, hf_pana_avp_code, tvb, offset, avp_data_length, - result_code, "Value: %d (%s)", - result_code, - val_to_str(result_code, avp_code_names, "Unknown (%d)")); - break; - } - case PANA_EAP: { - avp_eap_tree = proto_tree_add_subtree(single_avp_tree, - tvb, offset, avp_data_length, - ett_pana_avp, NULL, "AVP Value (EAP packet)"); - eap_tvb = tvb_new_subset_length(tvb, offset, avp_data_length); - if (eap_handle != NULL) { - call_dissector(eap_handle, eap_tvb, pinfo, avp_eap_tree); - } - break; - } - case PANA_ENCAPSULATED: { - avp_encap_tree = proto_tree_add_subtree(single_avp_tree, - tvb, offset, avp_data_length, - ett_pana_avp, NULL, "AVP Value (PANA packet)"); - encap_tvb = tvb_new_subset_length(tvb, offset, avp_data_length); - dissect_pana_pdu(encap_tvb, pinfo, avp_encap_tree); - break; - } - } - } - offset += avp_data_length + padding; - - /* Update the buffer length */ - buffer_length -= avp_length + padding; - } + gint offset; + guint16 avp_code; + guint16 avp_flags; + guint32 avp_length; + guint16 avp_type; + guint32 vendor_id; + guint32 avp_hdr_length; + guint32 avp_data_length, result_code; + guint32 padding; + + gint32 buffer_length; + + tvbuff_t *group_tvb; + tvbuff_t *eap_tvb; + tvbuff_t *encap_tvb; + proto_tree *single_avp_tree; + proto_tree *avp_eap_tree; + proto_tree *avp_encap_tree; + + offset = 0; + buffer_length = tvb_reported_length(tvb); + + /* Go through all AVPs */ + while (buffer_length > 0) { + avp_code = tvb_get_ntohs(tvb, offset); + avp_flags = tvb_get_ntohs(tvb, offset + 2); + avp_data_length = tvb_get_ntohs(tvb, offset + 4); + + /* Check AVP flags for vendor specific AVP */ + if (avp_flags & PANA_AVP_FLAG_V) { + vendor_id = tvb_get_ntohl(tvb, 8); + avp_hdr_length = 12; + } else { + vendor_id = 0; + avp_hdr_length = 8; + } + + avp_length = avp_hdr_length + avp_data_length; + + /* Check AVP type */ + avp_type = pana_avp_get_type(avp_code, vendor_id); + + + /* Check padding */ + padding = (4 - (avp_length % 4)) % 4; + + single_avp_tree = proto_tree_add_subtree_format(avp_tree, tvb, offset, avp_length + padding, + ett_pana_avp_info, NULL, "%s (%s) length: %d bytes (%d padded bytes)", + val_to_str(avp_code, avp_code_names, "Unknown (%d)"), + val_to_str(avp_type, avp_type_names, "Unknown (%d)"), + avp_length, + avp_length + padding); + + /* AVP Code */ + proto_tree_add_uint_format_value(single_avp_tree, hf_pana_avp_code, tvb, + offset, 2, avp_code, "%s (%u)", + val_to_str(avp_code, avp_code_names, "Unknown (%d)"), + avp_code); + offset += 2; + + /* AVP Flags */ + dissect_pana_avp_flags(single_avp_tree, tvb, offset, avp_flags); + offset += 2; + + /* AVP Length */ + proto_tree_add_item(single_avp_tree, hf_pana_avp_data_length, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Reserved */ + proto_tree_add_item(single_avp_tree, hf_pana_avp_reserved, tvb, offset, 2, ENC_NA); + offset += 2; + + if (avp_flags & PANA_AVP_FLAG_V) { + /* Vendor ID */ + proto_tree_add_item(single_avp_tree, hf_pana_avp_vendorid, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + } + if (! (avp_flags & PANA_AVP_FLAG_V)) { + /* AVP Value */ + switch(avp_type) { + case PANA_GROUPED: { + proto_tree *avp_group_tree; + avp_group_tree = proto_tree_add_subtree(single_avp_tree, + tvb, offset, avp_data_length, + ett_pana_avp, NULL, "Grouped AVP"); + group_tvb = tvb_new_subset(tvb, offset, + MIN(avp_data_length, tvb_reported_length(tvb)-offset), + avp_data_length); + dissect_avps(group_tvb, pinfo, avp_group_tree); + break; + } + case PANA_UTF8STRING: { + const guint8 *data; + data = tvb_get_ptr(tvb, offset, avp_data_length); + proto_tree_add_string_format(single_avp_tree, hf_pana_avp_data_string, tvb, + offset, avp_data_length, data, + "UTF8String: %*.*s", + avp_data_length, avp_data_length, data); + break; + } + case PANA_OCTET_STRING: { + proto_tree_add_item(single_avp_tree, hf_pana_avp_data_bytes, tvb, + offset, avp_data_length, ENC_NA); + break; + } + case PANA_INTEGER32: { + proto_tree_add_item(single_avp_tree, hf_pana_avp_data_int32, tvb, + offset, 4, ENC_BIG_ENDIAN); + break; + } + case PANA_UNSIGNED32: { + proto_tree_add_item(single_avp_tree, hf_pana_avp_data_uint32, tvb, + offset, 4, ENC_BIG_ENDIAN); + break; + } + case PANA_INTEGER64: { + proto_tree_add_item(single_avp_tree, hf_pana_avp_data_int64, tvb, + offset, 8, ENC_BIG_ENDIAN); + break; + } + case PANA_UNSIGNED64: { + proto_tree_add_item(single_avp_tree, hf_pana_avp_data_uint64, tvb, + offset, 8, ENC_BIG_ENDIAN); + break; + } + case PANA_ENUMERATED: { + proto_tree_add_item(single_avp_tree, hf_pana_avp_data_enumerated, tvb, + offset, 4, ENC_BIG_ENDIAN); + break; + } + case PANA_RESULT_CODE: { + result_code = tvb_get_ntohl(tvb, offset); + proto_tree_add_uint_format(single_avp_tree, hf_pana_avp_code, tvb, offset, avp_data_length, + result_code, "Value: %d (%s)", + result_code, + val_to_str(result_code, avp_code_names, "Unknown (%d)")); + break; + } + case PANA_EAP: { + avp_eap_tree = proto_tree_add_subtree(single_avp_tree, + tvb, offset, avp_data_length, + ett_pana_avp, NULL, "AVP Value (EAP packet)"); + eap_tvb = tvb_new_subset_length(tvb, offset, avp_data_length); + if (eap_handle != NULL) { + call_dissector(eap_handle, eap_tvb, pinfo, avp_eap_tree); + } + break; + } + case PANA_ENCAPSULATED: { + avp_encap_tree = proto_tree_add_subtree(single_avp_tree, + tvb, offset, avp_data_length, + ett_pana_avp, NULL, "AVP Value (PANA packet)"); + encap_tvb = tvb_new_subset_length(tvb, offset, avp_data_length); + dissect_pana_pdu(encap_tvb, pinfo, avp_encap_tree); + break; + } + } + } + offset += avp_data_length + padding; + + /* Update the buffer length */ + buffer_length -= avp_length + padding; + } } @@ -496,147 +496,147 @@ static void dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *pana_tree = NULL; - guint16 flags; - guint16 msg_type; - guint32 msg_length; - guint32 avp_length; - guint32 seq_num; - conversation_t *conversation; - pana_conv_info_t *pana_info; - pana_transaction_t *pana_trans; - int offset = 0; - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "PANA"); - col_clear(pinfo->cinfo, COL_INFO); - - /* Get message length, type and flags */ - msg_length = tvb_get_ntohs(tvb, 2); - flags = tvb_get_ntohs(tvb, 4); - msg_type = tvb_get_ntohs(tvb, 6); - seq_num = tvb_get_ntohl(tvb, 12); - avp_length = msg_length - 16; - - col_add_fstr(pinfo->cinfo, COL_INFO, "Type %s-%s", - val_to_str(msg_type, msg_type_names, "Unknown (%d)"), - val_to_str(flags & PANA_FLAG_R, msg_subtype_names, "Unknown (%d)")); - - /* Make the protocol tree */ - if (tree) { - proto_item *ti; - ti = proto_tree_add_item(tree, proto_pana, tvb, 0, -1, ENC_NA); - pana_tree = proto_item_add_subtree(ti, ett_pana); - } - - - /* - * We need to track some state for this protocol on a per conversation - * basis so we can do neat things like request/response tracking - */ - conversation = find_or_create_conversation(pinfo); - - /* - * Do we already have a state structure for this conv - */ - pana_info = (pana_conv_info_t *)conversation_get_proto_data(conversation, proto_pana); - if (!pana_info) { - /* No. Attach that information to the conversation, and add - * it to the list of information structures. - */ - pana_info = wmem_new(wmem_file_scope(), pana_conv_info_t); - pana_info->pdus=wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal); - - conversation_add_proto_data(conversation, proto_pana, pana_info); - } - - if(!pinfo->fd->flags.visited){ - if(flags&PANA_FLAG_R){ - /* This is a request */ - pana_trans=wmem_new(wmem_file_scope(), pana_transaction_t); - pana_trans->req_frame=pinfo->fd->num; - pana_trans->rep_frame=0; - pana_trans->req_time=pinfo->fd->abs_ts; - wmem_map_insert(pana_info->pdus, GUINT_TO_POINTER(seq_num), (void *)pana_trans); - } else { - pana_trans=(pana_transaction_t *)wmem_map_lookup(pana_info->pdus, GUINT_TO_POINTER(seq_num)); - if(pana_trans){ - pana_trans->rep_frame=pinfo->fd->num; - } - } - } else { - pana_trans=(pana_transaction_t *)wmem_map_lookup(pana_info->pdus, GUINT_TO_POINTER(seq_num)); - } - - if(!pana_trans){ - /* create a "fake" pana_trans structure */ - pana_trans=wmem_new(wmem_packet_scope(), pana_transaction_t); - pana_trans->req_frame=0; - pana_trans->rep_frame=0; - pana_trans->req_time=pinfo->fd->abs_ts; - } - - /* print state tracking in the tree */ - if(flags&PANA_FLAG_R){ - /* This is a request */ - if(pana_trans->rep_frame){ - proto_item *it; - - it=proto_tree_add_uint(pana_tree, hf_pana_response_in, tvb, 0, 0, pana_trans->rep_frame); - PROTO_ITEM_SET_GENERATED(it); - } - } else { - /* This is a reply */ - if(pana_trans->req_frame){ - proto_item *it; - nstime_t ns; - - it=proto_tree_add_uint(pana_tree, hf_pana_response_to, tvb, 0, 0, pana_trans->req_frame); - PROTO_ITEM_SET_GENERATED(it); - - nstime_delta(&ns, &pinfo->fd->abs_ts, &pana_trans->req_time); - it=proto_tree_add_time(pana_tree, hf_pana_response_time, tvb, 0, 0, &ns); - PROTO_ITEM_SET_GENERATED(it); - } - } - - /* Reserved field */ - proto_tree_add_item(pana_tree, hf_pana_reserved_type, tvb, offset, 2, ENC_NA); - offset += 2; - - /* Length */ - proto_tree_add_item(pana_tree, hf_pana_length_type, tvb, offset, 2, ENC_BIG_ENDIAN); - offset += 2; - - /* Flags */ - dissect_pana_flags(pana_tree, tvb, offset, flags); - offset += 2; - - /* Message Type */ - proto_tree_add_uint_format_value(pana_tree, hf_pana_msg_type, tvb, - offset, 2, msg_type, "%s-%s (%d)", - val_to_str(msg_type, msg_type_names, "Unknown (%d)"), - val_to_str(flags & PANA_FLAG_R, msg_subtype_names, "Unknown (%d)"), - msg_type); - offset += 2; - - /* Session ID */ - proto_tree_add_item(pana_tree, hf_pana_session_id, tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; - - /* Sequence Number */ - proto_tree_add_item(pana_tree, hf_pana_seqnumber, tvb, offset, 4, ENC_BIG_ENDIAN); - offset += 4; - - /* AVPs */ - if(avp_length != 0){ - tvbuff_t *avp_tvb; - proto_tree *avp_tree; - avp_tvb = tvb_new_subset_length(tvb, offset, avp_length); - avp_tree = proto_tree_add_subtree(pana_tree, tvb, offset, avp_length, ett_pana_avp, NULL, "Attribute Value Pairs"); - - if (avp_tree != NULL) { - dissect_avps(avp_tvb, pinfo, avp_tree); - } + proto_tree *pana_tree = NULL; + guint16 flags; + guint16 msg_type; + guint32 msg_length; + guint32 avp_length; + guint32 seq_num; + conversation_t *conversation; + pana_conv_info_t *pana_info; + pana_transaction_t *pana_trans; + int offset = 0; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "PANA"); + col_clear(pinfo->cinfo, COL_INFO); + + /* Get message length, type and flags */ + msg_length = tvb_get_ntohs(tvb, 2); + flags = tvb_get_ntohs(tvb, 4); + msg_type = tvb_get_ntohs(tvb, 6); + seq_num = tvb_get_ntohl(tvb, 12); + avp_length = msg_length - 16; + + col_add_fstr(pinfo->cinfo, COL_INFO, "Type %s-%s", + val_to_str(msg_type, msg_type_names, "Unknown (%d)"), + val_to_str(flags & PANA_FLAG_R, msg_subtype_names, "Unknown (%d)")); + + /* Make the protocol tree */ + if (tree) { + proto_item *ti; + ti = proto_tree_add_item(tree, proto_pana, tvb, 0, -1, ENC_NA); + pana_tree = proto_item_add_subtree(ti, ett_pana); + } + + + /* + * We need to track some state for this protocol on a per conversation + * basis so we can do neat things like request/response tracking + */ + conversation = find_or_create_conversation(pinfo); + + /* + * Do we already have a state structure for this conv + */ + pana_info = (pana_conv_info_t *)conversation_get_proto_data(conversation, proto_pana); + if (!pana_info) { + /* No. Attach that information to the conversation, and add + * it to the list of information structures. + */ + pana_info = wmem_new(wmem_file_scope(), pana_conv_info_t); + pana_info->pdus=wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal); + + conversation_add_proto_data(conversation, proto_pana, pana_info); + } + + if(!pinfo->fd->flags.visited){ + if(flags&PANA_FLAG_R){ + /* This is a request */ + pana_trans=wmem_new(wmem_file_scope(), pana_transaction_t); + pana_trans->req_frame=pinfo->fd->num; + pana_trans->rep_frame=0; + pana_trans->req_time=pinfo->fd->abs_ts; + wmem_map_insert(pana_info->pdus, GUINT_TO_POINTER(seq_num), (void *)pana_trans); + } else { + pana_trans=(pana_transaction_t *)wmem_map_lookup(pana_info->pdus, GUINT_TO_POINTER(seq_num)); + if(pana_trans){ + pana_trans->rep_frame=pinfo->fd->num; + } + } + } else { + pana_trans=(pana_transaction_t *)wmem_map_lookup(pana_info->pdus, GUINT_TO_POINTER(seq_num)); + } + + if(!pana_trans){ + /* create a "fake" pana_trans structure */ + pana_trans=wmem_new(wmem_packet_scope(), pana_transaction_t); + pana_trans->req_frame=0; + pana_trans->rep_frame=0; + pana_trans->req_time=pinfo->fd->abs_ts; + } + + /* print state tracking in the tree */ + if(flags&PANA_FLAG_R){ + /* This is a request */ + if(pana_trans->rep_frame){ + proto_item *it; + + it=proto_tree_add_uint(pana_tree, hf_pana_response_in, tvb, 0, 0, pana_trans->rep_frame); + PROTO_ITEM_SET_GENERATED(it); + } + } else { + /* This is a reply */ + if(pana_trans->req_frame){ + proto_item *it; + nstime_t ns; + + it=proto_tree_add_uint(pana_tree, hf_pana_response_to, tvb, 0, 0, pana_trans->req_frame); + PROTO_ITEM_SET_GENERATED(it); + + nstime_delta(&ns, &pinfo->fd->abs_ts, &pana_trans->req_time); + it=proto_tree_add_time(pana_tree, hf_pana_response_time, tvb, 0, 0, &ns); + PROTO_ITEM_SET_GENERATED(it); + } + } + + /* Reserved field */ + proto_tree_add_item(pana_tree, hf_pana_reserved_type, tvb, offset, 2, ENC_NA); + offset += 2; + + /* Length */ + proto_tree_add_item(pana_tree, hf_pana_length_type, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Flags */ + dissect_pana_flags(pana_tree, tvb, offset, flags); + offset += 2; + + /* Message Type */ + proto_tree_add_uint_format_value(pana_tree, hf_pana_msg_type, tvb, + offset, 2, msg_type, "%s-%s (%d)", + val_to_str(msg_type, msg_type_names, "Unknown (%d)"), + val_to_str(flags & PANA_FLAG_R, msg_subtype_names, "Unknown (%d)"), + msg_type); + offset += 2; + + /* Session ID */ + proto_tree_add_item(pana_tree, hf_pana_session_id, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + + /* Sequence Number */ + proto_tree_add_item(pana_tree, hf_pana_seqnumber, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + + /* AVPs */ + if(avp_length != 0){ + tvbuff_t *avp_tvb; + proto_tree *avp_tree; + avp_tvb = tvb_new_subset_length(tvb, offset, avp_length); + avp_tree = proto_tree_add_subtree(pana_tree, tvb, offset, avp_length, ett_pana_avp, NULL, "Attribute Value Pairs"); + + if (avp_tree != NULL) { + dissect_avps(avp_tvb, pinfo, avp_tree); + } } } @@ -650,93 +650,93 @@ static int dissect_pana(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - guint16 pana_res; - guint32 msg_length; - guint16 flags; - guint32 buffer_length; - guint16 msg_type; - guint32 avp_length; - - /* Get actual buffer length */ - buffer_length = tvb_length(tvb); - - /* Check minimum buffer length */ - if(buffer_length < 12) { - return 0; - } - - /* Check minimum packet length */ - msg_length = tvb_get_ntohs(tvb, 2); - if(msg_length < 16) { - return 0; - } - - /* Check the packet length */ - if(msg_length != tvb_reported_length(tvb)) { - return 0; - } - - /* check that the reserved field is zero */ - pana_res = tvb_get_ntohs(tvb, 0); - if (pana_res != 0) { - return 0; - } - - /* verify that none of the reserved bits are set */ - flags = tvb_get_ntohs(tvb, 4); - if (flags & PANA_FLAG_RESERVED) { - return 0; - } - - /* verify that we recognize the message type */ - msg_type = tvb_get_ntohs(tvb, 6); - if ((msg_type > MSG_TYPE_MAX) || (msg_type == 0)) { - return 0; - } - - avp_length = msg_length - 16; - - /* For bug 1908: check the length of the first AVP, too */ - - if (avp_length != 0) { - guint32 avp_offset; - guint16 avp_code; - guint32 first_avp_length; - guint16 avp_flags; - - if (avp_length < MIN_AVP_SIZE) { - return 0; - } - avp_offset = 16; - /* Make sure no exceptions since we're just doing a preliminary heuristic check */ - if ((avp_offset + 8) > buffer_length ) { - return 0; - } - avp_code = tvb_get_ntohs(tvb, avp_offset); - if ((avp_code == 0) || (avp_code > AVP_CODE_MAX)) { - return 0; - } - avp_flags = tvb_get_ntohs(tvb, avp_offset + 2); - if (avp_flags & PANA_AVP_FLAG_RESERVED) { - return 0; - } - /* check whether is the V (vendor) flag on or not */ - if (avp_flags & PANA_AVP_FLAG_V) { - first_avp_length = 12; - } else { - first_avp_length = 8; - } - - first_avp_length += tvb_get_ntohs(tvb, avp_offset + 4); - - if (first_avp_length > avp_length) { - return 0; - } - } - - dissect_pana_pdu(tvb, pinfo, tree); - - return tvb_reported_length(tvb); + guint16 pana_res; + guint32 msg_length; + guint16 flags; + guint32 buffer_length; + guint16 msg_type; + guint32 avp_length; + + /* Get actual buffer length */ + buffer_length = tvb_length(tvb); + + /* Check minimum buffer length */ + if(buffer_length < 12) { + return 0; + } + + /* Check minimum packet length */ + msg_length = tvb_get_ntohs(tvb, 2); + if(msg_length < 16) { + return 0; + } + + /* Check the packet length */ + if(msg_length != tvb_reported_length(tvb)) { + return 0; + } + + /* check that the reserved field is zero */ + pana_res = tvb_get_ntohs(tvb, 0); + if (pana_res != 0) { + return 0; + } + + /* verify that none of the reserved bits are set */ + flags = tvb_get_ntohs(tvb, 4); + if (flags & PANA_FLAG_RESERVED) { + return 0; + } + + /* verify that we recognize the message type */ + msg_type = tvb_get_ntohs(tvb, 6); + if ((msg_type > MSG_TYPE_MAX) || (msg_type == 0)) { + return 0; + } + + avp_length = msg_length - 16; + + /* For bug 1908: check the length of the first AVP, too */ + + if (avp_length != 0) { + guint32 avp_offset; + guint16 avp_code; + guint32 first_avp_length; + guint16 avp_flags; + + if (avp_length < MIN_AVP_SIZE) { + return 0; + } + avp_offset = 16; + /* Make sure no exceptions since we're just doing a preliminary heuristic check */ + if ((avp_offset + 8) > buffer_length ) { + return 0; + } + avp_code = tvb_get_ntohs(tvb, avp_offset); + if ((avp_code == 0) || (avp_code > AVP_CODE_MAX)) { + return 0; + } + avp_flags = tvb_get_ntohs(tvb, avp_offset + 2); + if (avp_flags & PANA_AVP_FLAG_RESERVED) { + return 0; + } + /* check whether is the V (vendor) flag on or not */ + if (avp_flags & PANA_AVP_FLAG_V) { + first_avp_length = 12; + } else { + first_avp_length = 8; + } + + first_avp_length += tvb_get_ntohs(tvb, avp_offset + 4); + + if (first_avp_length > avp_length) { + return 0; + } + } + + dissect_pana_pdu(tvb, pinfo, tree); + + return tvb_reported_length(tvb); } @@ -748,173 +748,173 @@ void proto_register_pana(void) { - static hf_register_info hf[] = { - { &hf_pana_response_in, - { "Response In", "pana.response_in", - FT_FRAMENUM, BASE_NONE, NULL, 0x0, - "The response to this PANA request is in this frame", HFILL } - }, - { &hf_pana_response_to, - { "Request In", "pana.response_to", - FT_FRAMENUM, BASE_NONE, NULL, 0x0, - "This is a response to the PANA request in this frame", HFILL } - }, - { &hf_pana_response_time, - { "Response Time", "pana.response_time", - FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, - "The time between the Call and the Reply", HFILL } - }, - { &hf_pana_reserved_type, - { "PANA Reserved", "pana.reserved", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_length_type, - { "PANA Message Length", "pana.length", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - - - { &hf_pana_flags, - { "Flags", "pana.flags", - FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_flag_r, - { "Request", "pana.flags.r", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_R, - NULL, HFILL } - }, - { &hf_pana_flag_s, - { "Start", "pana.flags.s", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_S, - NULL, HFILL } - }, - { &hf_pana_flag_c, - { "Complete","pana.flags.c", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_C, - NULL, HFILL } - }, - { &hf_pana_flag_a, - { "Auth","pana.flags.a", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_A, - NULL, HFILL } - }, - { &hf_pana_flag_p, - { "Ping","pana.flags.p", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_P, - NULL, HFILL } - }, - { &hf_pana_flag_i, - { "IP Reconfig","pana.flags.i", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_I, - NULL, HFILL } - }, - - { &hf_pana_msg_type, - { "PANA Message Type", "pana.type", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_session_id, - { "PANA Session ID", "pana.sid", - FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_seqnumber, - { "PANA Sequence Number", "pana.seq", - FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - - - { &hf_pana_avp_code, - { "AVP Code", "pana.avp.code", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_data_length, - { "AVP Data Length", "pana.avp.data_length", - FT_UINT16, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_flags, - { "AVP Flags", "pana.avp.flags", - FT_UINT16, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_flag_v, - { "Vendor", "pana.avp.flags.v", - FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_AVP_FLAG_V, - NULL, HFILL } - }, - { &hf_pana_avp_reserved, - { "AVP Reserved", "pana.avp.reserved", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_vendorid, - { "AVP Vendor ID", "pana.avp.vendorid", - FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - - - { &hf_pana_avp_data_uint64, - { "Value", "pana.avp.data.uint64", - FT_UINT64, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_data_int64, - { "Value", "pana.avp.data.int64", - FT_INT64, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_data_uint32, - { "Value", "pana.avp.data.uint32", - FT_UINT32, BASE_HEX, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_data_int32, - { "Value", "pana.avp.data.int32", - FT_INT32, BASE_DEC, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_data_bytes, - { "Value", "pana.avp.data.bytes", - FT_BYTES, BASE_NONE, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_data_string, - { "Value", "pana.avp.data.string", - FT_STRING, BASE_NONE, NULL, 0x0, - NULL, HFILL } - }, - { &hf_pana_avp_data_enumerated, - { "Value", "pana.avp.data.enum", - FT_INT32, BASE_DEC, NULL, 0x0, - NULL, HFILL } - } - - }; - - /* Setup protocol subtree array */ - static gint *ett[] = { - &ett_pana, - &ett_pana_flags, - &ett_pana_avp, - &ett_pana_avp_info, - &ett_pana_avp_flags - }; - - /* Register the protocol name and description */ - proto_pana = proto_register_protocol("Protocol for carrying Authentication for Network Access", - "PANA", "pana"); - - /* Required function calls to register the header fields and subtrees used */ - proto_register_field_array(proto_pana, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + static hf_register_info hf[] = { + { &hf_pana_response_in, + { "Response In", "pana.response_in", + FT_FRAMENUM, BASE_NONE, NULL, 0x0, + "The response to this PANA request is in this frame", HFILL } + }, + { &hf_pana_response_to, + { "Request In", "pana.response_to", + FT_FRAMENUM, BASE_NONE, NULL, 0x0, + "This is a response to the PANA request in this frame", HFILL } + }, + { &hf_pana_response_time, + { "Response Time", "pana.response_time", + FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0, + "The time between the Call and the Reply", HFILL } + }, + { &hf_pana_reserved_type, + { "PANA Reserved", "pana.reserved", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_length_type, + { "PANA Message Length", "pana.length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + + + { &hf_pana_flags, + { "Flags", "pana.flags", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_flag_r, + { "Request", "pana.flags.r", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_R, + NULL, HFILL } + }, + { &hf_pana_flag_s, + { "Start", "pana.flags.s", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_S, + NULL, HFILL } + }, + { &hf_pana_flag_c, + { "Complete","pana.flags.c", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_C, + NULL, HFILL } + }, + { &hf_pana_flag_a, + { "Auth","pana.flags.a", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_A, + NULL, HFILL } + }, + { &hf_pana_flag_p, + { "Ping","pana.flags.p", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_P, + NULL, HFILL } + }, + { &hf_pana_flag_i, + { "IP Reconfig","pana.flags.i", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_FLAG_I, + NULL, HFILL } + }, + + { &hf_pana_msg_type, + { "PANA Message Type", "pana.type", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_session_id, + { "PANA Session ID", "pana.sid", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_seqnumber, + { "PANA Sequence Number", "pana.seq", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + + + { &hf_pana_avp_code, + { "AVP Code", "pana.avp.code", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_data_length, + { "AVP Data Length", "pana.avp.data_length", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_flags, + { "AVP Flags", "pana.avp.flags", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_flag_v, + { "Vendor", "pana.avp.flags.v", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), PANA_AVP_FLAG_V, + NULL, HFILL } + }, + { &hf_pana_avp_reserved, + { "AVP Reserved", "pana.avp.reserved", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_vendorid, + { "AVP Vendor ID", "pana.avp.vendorid", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + + + { &hf_pana_avp_data_uint64, + { "Value", "pana.avp.data.uint64", + FT_UINT64, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_data_int64, + { "Value", "pana.avp.data.int64", + FT_INT64, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_data_uint32, + { "Value", "pana.avp.data.uint32", + FT_UINT32, BASE_HEX, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_data_int32, + { "Value", "pana.avp.data.int32", + FT_INT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_data_bytes, + { "Value", "pana.avp.data.bytes", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_data_string, + { "Value", "pana.avp.data.string", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL } + }, + { &hf_pana_avp_data_enumerated, + { "Value", "pana.avp.data.enum", + FT_INT32, BASE_DEC, NULL, 0x0, + NULL, HFILL } + } + + }; + + /* Setup protocol subtree array */ + static gint *ett[] = { + &ett_pana, + &ett_pana_flags, + &ett_pana_avp, + &ett_pana_avp_info, + &ett_pana_avp_flags + }; + + /* Register the protocol name and description */ + proto_pana = proto_register_protocol("Protocol for carrying Authentication for Network Access", + "PANA", "pana"); + + /* Required function calls to register the header fields and subtrees used */ + proto_register_field_array(proto_pana, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); } @@ -923,14 +923,27 @@ void proto_reg_handoff_pana(void) { - dissector_handle_t pana_handle; + dissector_handle_t pana_handle; - heur_dissector_add("udp", dissect_pana, proto_pana); + heur_dissector_add("udp", dissect_pana, proto_pana); - pana_handle = new_create_dissector_handle(dissect_pana, proto_pana); - dissector_add_for_decode_as("udp.port", pana_handle); + pana_handle = new_create_dissector_handle(dissect_pana, proto_pana); + dissector_add_for_decode_as("udp.port", pana_handle); - eap_handle = find_dissector("eap"); -/** if(!eap_handle) fprintf(stderr,"PANA warning: EAP dissector not found\n"); **/ + eap_handle = find_dissector("eap"); +/** if(!eap_handle) fprintf(stderr,"PANA warning: EAP dissector not found\n"); **/ } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=8 tabstop=8 expandtab: + * :indentSize=8:tabSize=8:noTabs=true: + */ diff --git a/epan/dissectors/packet-pptp.c b/epan/dissectors/packet-pptp.c index e056d281e8..62ab6c4469 100644 --- a/epan/dissectors/packet-pptp.c +++ b/epan/dissectors/packet-pptp.c @@ -90,43 +90,43 @@ static expert_field ei_pptp_incorrect_magic_cookie = EI_INIT; static dissector_handle_t data_handle; -#define TCP_PORT_PPTP 1723 - -#define MAGIC_COOKIE 0x1A2B3C4D - -#define CNTRL_REQ 0x01 -#define CNTRL_REPLY 0x02 -#define STOP_REQ 0x03 -#define STOP_REPLY 0x04 -#define ECHO_REQ 0x05 -#define ECHO_REPLY 0x06 -#define OUT_REQ 0x07 -#define OUT_REPLY 0x08 -#define IN_REQ 0x09 -#define IN_REPLY 0x0A -#define IN_CONNECTED 0x0B -#define CLEAR_REQ 0x0C -#define DISC_NOTIFY 0x0D -#define ERROR_NOTIFY 0x0E -#define SET_LINK 0x0F +#define TCP_PORT_PPTP 1723 + +#define MAGIC_COOKIE 0x1A2B3C4D + +#define CNTRL_REQ 0x01 +#define CNTRL_REPLY 0x02 +#define STOP_REQ 0x03 +#define STOP_REPLY 0x04 +#define ECHO_REQ 0x05 +#define ECHO_REPLY 0x06 +#define OUT_REQ 0x07 +#define OUT_REPLY 0x08 +#define IN_REQ 0x09 +#define IN_REPLY 0x0A +#define IN_CONNECTED 0x0B +#define CLEAR_REQ 0x0C +#define DISC_NOTIFY 0x0D +#define ERROR_NOTIFY 0x0E +#define SET_LINK 0x0F static const value_string control_message_type_vals[] = { - { CNTRL_REQ, "Start-Control-Connection-Request" }, + { CNTRL_REQ, "Start-Control-Connection-Request" }, { CNTRL_REPLY, "Start-Control-Connection-Reply" }, - { STOP_REQ, "Stop-Control-Connection-Request" }, - { STOP_REPLY, "Stop-Control-Connection-Reply" }, - { ECHO_REQ, "Echo-Request" }, - { ECHO_REPLY, "Echo-Reply" }, - { OUT_REQ, "Outgoing-Call-Request" }, - { OUT_REPLY, "Outgoing-Call-Reply" }, - { IN_REQ, "Incoming-Call-Request" }, - { IN_REPLY, "Incoming-Call-Reply" }, + { STOP_REQ, "Stop-Control-Connection-Request" }, + { STOP_REPLY, "Stop-Control-Connection-Reply" }, + { ECHO_REQ, "Echo-Request" }, + { ECHO_REPLY, "Echo-Reply" }, + { OUT_REQ, "Outgoing-Call-Request" }, + { OUT_REPLY, "Outgoing-Call-Reply" }, + { IN_REQ, "Incoming-Call-Request" }, + { IN_REPLY, "Incoming-Call-Reply" }, { IN_CONNECTED, "Incoming-Call-Connected" }, - { CLEAR_REQ, "Call-Clear-Request" }, + { CLEAR_REQ, "Call-Clear-Request" }, { DISC_NOTIFY, "Call-Disconnect-Notify" }, { ERROR_NOTIFY, "WAN-Error-Notify" }, { SET_LINK, "Set-Link-Info" }, - { 0, NULL }, + { 0, NULL }, }; static const value_string msgtype_vals[] = { { 1, "Control Message" }, @@ -346,7 +346,7 @@ dissect_echo_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree } static void -dissect_out_req(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_out_req(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { if (!tree) return; @@ -593,19 +593,19 @@ dissect_pptp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree *pptp_tree = NULL; proto_item *item = NULL; - int offset = 0; + int offset = 0; guint16 len; guint16 control_message_type; col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPTP"); col_clear(pinfo->cinfo, COL_INFO); - len = tvb_get_ntohs(tvb, offset); + len = tvb_get_ntohs(tvb, offset); control_message_type = tvb_get_ntohs(tvb, offset + 8); col_add_str(pinfo->cinfo, COL_INFO, - val_to_str(control_message_type, control_message_type_vals, - "Unknown control type (%d)")); + val_to_str(control_message_type, control_message_type_vals, + "Unknown control type (%d)")); if (tree) { proto_item *ti; @@ -950,7 +950,7 @@ proto_register_pptp(void) expert_module_t* expert_pptp; proto_pptp = proto_register_protocol("Point-to-Point Tunnelling Protocol", - "PPTP", "pptp"); + "PPTP", "pptp"); proto_register_field_array(proto_pptp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_pptp = expert_register_protocol(proto_pptp); @@ -966,3 +966,16 @@ proto_reg_handoff_pptp(void) dissector_add_uint("tcp.port", TCP_PORT_PPTP, pptp_handle); 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-qllc.c b/epan/dissectors/packet-qllc.c index 72bfc267f7..9d6248be31 100644 --- a/epan/dissectors/packet-qllc.c +++ b/epan/dissectors/packet-qllc.c @@ -75,11 +75,11 @@ static const value_string qllc_control_vals[] = { static int dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { - proto_tree *qllc_tree; - proto_item *qllc_ti; - gboolean *q_bit_set; - guint8 addr, ctrl; - gboolean command = FALSE; + proto_tree *qllc_tree; + proto_item *qllc_ti; + gboolean *q_bit_set; + guint8 addr, ctrl; + gboolean command = FALSE; /* Reject the packet if data is NULL */ if (data == NULL) @@ -104,7 +104,7 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) /* Get the address; we need it to determine if this is a * COMMAND or a RESPONSE */ addr = tvb_get_guint8(tvb, 0); - proto_tree_add_item(qllc_tree, hf_qllc_address, tvb, 0, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(qllc_tree, hf_qllc_address, tvb, 0, 1, ENC_BIG_ENDIAN); /* The address field equals X'FF' in commands (except QRR) * and anything in responses. */ @@ -151,28 +151,41 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) void proto_register_qllc(void) { - static hf_register_info hf[] = { - { &hf_qllc_address, - { "Address Field", "qllc.address", FT_UINT8, BASE_HEX, NULL, 0x0, - NULL, HFILL }}, - - { &hf_qllc_control, - { "Control Field", "qllc.control", FT_UINT8, BASE_HEX, - VALS(qllc_control_vals), 0x0, NULL, HFILL }}, - }; - - static gint *ett[] = { - &ett_qllc, - }; - - proto_qllc = proto_register_protocol("Qualified Logical Link Control", "QLLC", "qllc"); - proto_register_field_array(proto_qllc, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - new_register_dissector("qllc", dissect_qllc, proto_qllc); + static hf_register_info hf[] = { + { &hf_qllc_address, + { "Address Field", "qllc.address", FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL }}, + + { &hf_qllc_control, + { "Control Field", "qllc.control", FT_UINT8, BASE_HEX, + VALS(qllc_control_vals), 0x0, NULL, HFILL }}, + }; + + static gint *ett[] = { + &ett_qllc, + }; + + proto_qllc = proto_register_protocol("Qualified Logical Link Control", "QLLC", "qllc"); + proto_register_field_array(proto_qllc, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + new_register_dissector("qllc", dissect_qllc, proto_qllc); } void proto_reg_handoff_qllc(void) { - sna_handle = find_dissector("sna"); + sna_handle = find_dissector("sna"); } + +/* + * 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-rgmp.c b/epan/dissectors/packet-rgmp.c index c1c925ba0f..34b413d6d1 100644 --- a/epan/dissectors/packet-rgmp.c +++ b/epan/dissectors/packet-rgmp.c @@ -65,10 +65,10 @@ dissect_rgmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int off guint8 type; if (!proto_is_protocol_enabled(find_protocol_by_id(proto_rgmp))) { - /* we are not enabled, skip entire packet to be nice - to the igmp layer. (so clicking on IGMP will display the data) - */ - return offset + tvb_length_remaining(tvb, offset); + /* we are not enabled, skip entire packet to be nice + to the igmp layer. (so clicking on IGMP will display the data) + */ + return offset + tvb_length_remaining(tvb, offset); } item = proto_tree_add_item(parent_tree, proto_rgmp, tvb, offset, -1, ENC_NA); @@ -78,8 +78,8 @@ dissect_rgmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int off col_clear(pinfo->cinfo, COL_INFO); type = tvb_get_guint8(tvb, offset); - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str(type, rgmp_types, "Unknown Type: 0x%02x")); + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str(type, rgmp_types, "Unknown Type: 0x%02x")); proto_tree_add_uint(tree, hf_type, tvb, offset, 1, type); offset += 1; @@ -101,33 +101,46 @@ void proto_register_rgmp(void) { static hf_register_info hf[] = { - { &hf_type, - { "Type", "rgmp.type", FT_UINT8, BASE_HEX, - VALS(rgmp_types), 0, "RGMP Packet Type", HFILL } - }, - - { &hf_checksum, - { "Checksum", "rgmp.checksum", FT_UINT16, BASE_HEX, - NULL, 0, NULL, HFILL } - }, - - { &hf_checksum_bad, - { "Bad Checksum", "rgmp.checksum_bad", FT_BOOLEAN, BASE_NONE, - NULL, 0x0, NULL, HFILL } - }, - - { &hf_maddr, - { "Multicast group address", "rgmp.maddr", FT_IPv4, BASE_NONE, - NULL, 0, NULL, HFILL } - } + { &hf_type, + { "Type", "rgmp.type", FT_UINT8, BASE_HEX, + VALS(rgmp_types), 0, "RGMP Packet Type", HFILL } + }, + + { &hf_checksum, + { "Checksum", "rgmp.checksum", FT_UINT16, BASE_HEX, + NULL, 0, NULL, HFILL } + }, + + { &hf_checksum_bad, + { "Bad Checksum", "rgmp.checksum_bad", FT_BOOLEAN, BASE_NONE, + NULL, 0x0, NULL, HFILL } + }, + + { &hf_maddr, + { "Multicast group address", "rgmp.maddr", FT_IPv4, BASE_NONE, + NULL, 0, NULL, HFILL } + } }; static gint *ett[] = { - &ett_rgmp + &ett_rgmp }; proto_rgmp = proto_register_protocol - ("Router-port Group Management Protocol", "RGMP", "rgmp"); + ("Router-port Group Management Protocol", "RGMP", "rgmp"); proto_register_field_array(proto_rgmp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 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-roofnet.c b/epan/dissectors/packet-roofnet.c index aed70325b3..3bfe4bdc9e 100644 --- a/epan/dissectors/packet-roofnet.c +++ b/epan/dissectors/packet-roofnet.c @@ -144,10 +144,10 @@ static void dissect_roofnet_link(proto_tree *tree, tvbuff_t *tvb, guint *offset, addr_dst= tvb_get_ipv4(tvb, *offset + ROOFNET_LINK_OFFSET_DST); subtree = proto_tree_add_subtree_format(tree, tvb, *offset, ROOFNET_LINK_LEN, - ett_roofnet_link, NULL, "link: %u, src: %s, dst: %s", - link, - get_hostname(addr_src), - get_hostname(addr_dst)); + ett_roofnet_link, NULL, "link: %u, src: %s, dst: %s", + link, + get_hostname(addr_src), + get_hostname(addr_dst)); proto_tree_add_ipv4(subtree, hf_roofnet_link_src, tvb, *offset, 4, addr_src); *offset += 4; @@ -181,8 +181,8 @@ static void dissect_roofnet_data(proto_tree *tree, tvbuff_t *tvb, packet_info * /* dissect on remaining_datalen */ if (roofnet_datalen < remaining_datalen) proto_tree_add_expert_format(tree, pinfo, &ei_roofnet_too_much_data, tvb, offset, roofnet_datalen, - "[More payload data (%u) than told by Roofnet (%u)]", - remaining_datalen, roofnet_datalen); + "[More payload data (%u) than told by Roofnet (%u)]", + remaining_datalen, roofnet_datalen); if (roofnet_datalen == 0) return; @@ -210,7 +210,7 @@ static void dissect_roofnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) roofnet_msg_type = tvb_get_guint8(tvb, ROOFNET_OFFSET_TYPE); /* Clear out stuff in the info column */ col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %s", - val_to_str(roofnet_msg_type, roofnet_pt_vals, "Unknown (%d)")); + val_to_str(roofnet_msg_type, roofnet_pt_vals, "Unknown (%d)")); it = proto_tree_add_item(tree, proto_roofnet, tvb, offset, -1, ENC_NA); roofnet_tree = proto_item_add_subtree(it, ett_roofnet); @@ -245,47 +245,47 @@ void proto_register_roofnet(void) { &hf_roofnet_type, { "Type", "roofnet.type", - FT_UINT8, BASE_DEC, VALS(roofnet_pt_vals), 0x0, "Roofnet Message Type", HFILL } + FT_UINT8, BASE_DEC, VALS(roofnet_pt_vals), 0x0, "Roofnet Message Type", HFILL } }, { &hf_roofnet_nlinks, { "Number of Links", "roofnet.nlinks", - FT_UINT8, BASE_DEC, NULL, 0x0, "Roofnet Number of Links", HFILL } + FT_UINT8, BASE_DEC, NULL, 0x0, "Roofnet Number of Links", HFILL } }, { &hf_roofnet_next, { "Next Link", "roofnet.next", - FT_UINT8, BASE_DEC, NULL, 0x0, "Roofnet Next Link to Use", HFILL } + FT_UINT8, BASE_DEC, NULL, 0x0, "Roofnet Next Link to Use", HFILL } }, { &hf_roofnet_ttl, { "Time To Live", "roofnet.ttl", - FT_UINT16, BASE_DEC, NULL, 0x0, "Roofnet Time to Live", HFILL } + FT_UINT16, BASE_DEC, NULL, 0x0, "Roofnet Time to Live", HFILL } }, { &hf_roofnet_cksum, { "Checksum", "roofnet.cksum", - FT_UINT16, BASE_DEC, NULL, 0x0, "Roofnet Header Checksum", HFILL } + FT_UINT16, BASE_DEC, NULL, 0x0, "Roofnet Header Checksum", HFILL } }, { &hf_roofnet_flags, { "Flags", "roofnet.flags", - FT_UINT16, BASE_DEC, VALS(roofnet_flags_vals), 0x0, "Roofnet Flags", HFILL } + FT_UINT16, BASE_DEC, VALS(roofnet_flags_vals), 0x0, "Roofnet Flags", HFILL } }, { &hf_roofnet_data_length, { "Data Length", "roofnet.datalength", - FT_UINT16, BASE_DEC, NULL, 0x0, "Data Payload Length", HFILL } + FT_UINT16, BASE_DEC, NULL, 0x0, "Data Payload Length", HFILL } }, { &hf_roofnet_query_dst, { "Query Dst", "roofnet.querydst", - FT_IPv4, BASE_NONE, NULL, 0x0, "Roofnet Query Destination", HFILL } + FT_IPv4, BASE_NONE, NULL, 0x0, "Roofnet Query Destination", HFILL } }, { &hf_roofnet_seq, { "Seq", "roofnet.seq", - FT_UINT32, BASE_DEC, NULL, 0x0, "Roofnet Sequential Number", HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, "Roofnet Sequential Number", HFILL } }, #if 0 @@ -302,27 +302,27 @@ void proto_register_roofnet(void) { &hf_roofnet_link_forward, { "Forward", "roofnet.link.forward", - FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_roofnet_link_rev, { "Rev", "roofnet.link.rev", - FT_UINT32, BASE_DEC, NULL, 0x0, "Revision Number", HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, "Revision Number", HFILL } }, { &hf_roofnet_link_seq, { "Seq", "roofnet.link.seq", - FT_UINT32, BASE_DEC, NULL, 0x0, "Link Sequential Number", HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, "Link Sequential Number", HFILL } }, { &hf_roofnet_link_age, { "Age", "roofnet.link.age", - FT_UINT32, BASE_DEC, NULL, 0x0, "Information Age", HFILL } + FT_UINT32, BASE_DEC, NULL, 0x0, "Information Age", HFILL } }, { &hf_roofnet_link_dst, { "Dst IP", "roofnet.link.dst", - FT_IPv4, BASE_NONE, NULL, 0x0, "Roofnet Message Destination", HFILL } + FT_IPv4, BASE_NONE, NULL, 0x0, "Roofnet Message Destination", HFILL } } }; @@ -340,10 +340,10 @@ void proto_register_roofnet(void) expert_module_t* expert_roofnet; proto_roofnet = proto_register_protocol( - "Roofnet Protocol", /* Name */ - "Roofnet", /* Short Name */ - "roofnet" /* Abbrev */ - ); + "Roofnet Protocol", /* Name */ + "Roofnet", /* Short Name */ + "roofnet" /* Abbrev */ + ); proto_register_field_array(proto_roofnet, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -367,3 +367,16 @@ void proto_reg_handoff_roofnet(void) dissector_add_uint("ethertype", 0x0644, roofnet_handle); dissector_add_uint("ethertype", 0x0645, roofnet_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-sadmind.c b/epan/dissectors/packet-sadmind.c index bcec506e75..851609a8b2 100644 --- a/epan/dissectors/packet-sadmind.c +++ b/epan/dissectors/packet-sadmind.c @@ -108,3 +108,16 @@ proto_reg_handoff_sadmind(void) rpc_init_proc_table(SADMIND_PROGRAM, 2, sadmind2_proc, hf_sadmind_procedure_v2); rpc_init_proc_table(SADMIND_PROGRAM, 3, sadmind3_proc, hf_sadmind_procedure_v3); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 8 + * tab-width: 8 + * indent-tabs-mode: t + * End: + * + * vi: set shiftwidth=8 tabstop=8 noexpandtab: + * :indentSize=8:tabSize=8:noTabs=false: + */ diff --git a/epan/dissectors/packet-sap.c b/epan/dissectors/packet-sap.c index 7d791b0c88..86fc326f4d 100644 --- a/epan/dissectors/packet-sap.c +++ b/epan/dissectors/packet-sap.c @@ -31,7 +31,7 @@ #include #include -#define UDP_PORT_SAP 9875 +#define UDP_PORT_SAP 9875 #define MCAST_SAP_VERSION_MASK 0xE0 /* 3 bits for SAP version*/ #define MCAST_SAP_VERSION_SHIFT 5 /* Right shift 5 bits to get the version */ @@ -390,3 +390,16 @@ proto_reg_handoff_sap(void) */ sdp_handle = find_dissector("sdp"); } + +/* + * 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-snaeth.c b/epan/dissectors/packet-snaeth.c index 6dfc7ab528..64ae2179e7 100644 --- a/epan/dissectors/packet-snaeth.c +++ b/epan/dissectors/packet-snaeth.c @@ -111,3 +111,16 @@ proto_reg_handoff_snaeth(void) snaeth_handle = create_dissector_handle(dissect_snaeth, proto_snaeth); dissector_add_uint("ethertype", ETHERTYPE_SNA, snaeth_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-sscf-nni.c b/epan/dissectors/packet-sscf-nni.c index cec72571bf..c25f35d682 100644 --- a/epan/dissectors/packet-sscf-nni.c +++ b/epan/dissectors/packet-sscf-nni.c @@ -46,7 +46,7 @@ static dissector_handle_t mtp3_handle; static int hf_status = -1; static int hf_spare = -1; -#define SSCF_STATUS_OOS 0x01 +#define SSCF_STATUS_OOS 0x01 #define SSCF_STATUS_PO 0x02 #define SSCF_STATUS_IS 0x03 #define SSCF_STATUS_NORMAL 0x04 @@ -57,16 +57,16 @@ static int hf_spare = -1; #define SSCF_STATUS_PROVING_NOT_SUCCESSFUL 0x0a static const value_string sscf_status_vals[] = { - { SSCF_STATUS_OOS, "Out of Service" }, - { SSCF_STATUS_PO, "Processor Outage" }, - { SSCF_STATUS_IS, "In Service" }, - { SSCF_STATUS_NORMAL, "Normal" }, - { SSCF_STATUS_EMERGENCY, "Emergency" }, - { SSCF_STATUS_ALIGNMENT_NOT_SUCCESSFUL, "Alignment Not Successful" }, - { SSCF_STATUS_MANAGEMENT_INITIATED, "Management Initiated" }, - { SSCF_STATUS_PROTOCOL_ERROR, "Protocol Error" }, - { SSCF_STATUS_PROVING_NOT_SUCCESSFUL, "Proving Not Successful" }, - { 0, NULL } + { SSCF_STATUS_OOS, "Out of Service" }, + { SSCF_STATUS_PO, "Processor Outage" }, + { SSCF_STATUS_IS, "In Service" }, + { SSCF_STATUS_NORMAL, "Normal" }, + { SSCF_STATUS_EMERGENCY, "Emergency" }, + { SSCF_STATUS_ALIGNMENT_NOT_SUCCESSFUL, "Alignment Not Successful" }, + { SSCF_STATUS_MANAGEMENT_INITIATED, "Management Initiated" }, + { SSCF_STATUS_PROTOCOL_ERROR, "Protocol Error" }, + { SSCF_STATUS_PROVING_NOT_SUCCESSFUL, "Proving Not Successful" }, + { 0, NULL } }; static void @@ -77,7 +77,7 @@ dissect_sscf_nni(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree *sscf_tree = NULL; guint8 sscf_status; - reported_length = tvb_reported_length(tvb); /* frame length */ + reported_length = tvb_reported_length(tvb); /* frame length */ if (tree) { sscf_item = proto_tree_add_item(tree, proto_sscf, tvb, 0, -1, ENC_NA); @@ -94,13 +94,13 @@ dissect_sscf_nni(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "SSCF-NNI"); col_add_fstr(pinfo->cinfo, COL_INFO, "STATUS (%s) ", - val_to_str_const(sscf_status, sscf_status_vals, "Unknown")); + val_to_str_const(sscf_status, sscf_status_vals, "Unknown")); proto_tree_add_item(sscf_tree, hf_status, tvb, SSCF_STATUS_OFFSET, - SSCF_STATUS_LENGTH, ENC_BIG_ENDIAN); + SSCF_STATUS_LENGTH, ENC_BIG_ENDIAN); proto_tree_add_item(sscf_tree, hf_spare, tvb, SSCF_SPARE_OFFSET, - SSCF_SPARE_LENGTH, ENC_BIG_ENDIAN); + SSCF_SPARE_LENGTH, ENC_BIG_ENDIAN); } } @@ -110,9 +110,9 @@ proto_register_sscf(void) { static hf_register_info hf[] = { { &hf_status, { "Status", "sscf-nni.status", FT_UINT8, BASE_HEX, - VALS(sscf_status_vals), 0x0, NULL, HFILL} }, + VALS(sscf_status_vals), 0x0, NULL, HFILL} }, { &hf_spare, { "Spare", "sscf-nni.spare", FT_UINT24, BASE_HEX, - NULL, 0x0, NULL, HFILL} } + NULL, 0x0, NULL, HFILL} } }; static gint *ett[] = { @@ -133,3 +133,16 @@ proto_reg_handoff_sscf(void) { mtp3_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-stat-notify.c b/epan/dissectors/packet-stat-notify.c index 5de7ff8919..35d9467bbd 100644 --- a/epan/dissectors/packet-stat-notify.c +++ b/epan/dissectors/packet-stat-notify.c @@ -57,15 +57,15 @@ dissect_statnotify_mon(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_ /* NULL as function pointer means: type of arguments is "void". */ static const vsff statnotify1_proc[] = { - { 0, "NULL", NULL, NULL }, - { STATNOTIFYPROC_MON, "MON-CALLBACK", - dissect_statnotify_mon, NULL }, - { 0, NULL, NULL, NULL } + { 0, "NULL", NULL, NULL }, + { STATNOTIFYPROC_MON, "MON-CALLBACK", + dissect_statnotify_mon, NULL }, + { 0, NULL, NULL, NULL } }; static const value_string statnotify1_proc_vals[] = { - { 0, "NULL" }, - { STATNOTIFYPROC_MON, "MON-CALLBACK" }, - { 0, NULL } + { 0, "NULL" }, + { STATNOTIFYPROC_MON, "MON-CALLBACK" }, + { 0, NULL } }; /* end of stat-notify version 1 */ @@ -105,3 +105,16 @@ proto_reg_handoff_statnotify(void) /* Register the procedure tables */ rpc_init_proc_table(STATNOTIFY_PROGRAM, 1, statnotify1_proc, hf_statnotify_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-teimanagement.c b/epan/dissectors/packet-teimanagement.c index e7fe0d8fc8..536125f676 100644 --- a/epan/dissectors/packet-teimanagement.c +++ b/epan/dissectors/packet-teimanagement.c @@ -77,20 +77,20 @@ dissect_teimanagement(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); if (tree) { - tei_ti = proto_tree_add_item(tree, proto_tei, tvb, 0, 5, ENC_NA); - tei_tree = proto_item_add_subtree(tei_ti, lm_subtree); + tei_ti = proto_tree_add_item(tree, proto_tei, tvb, 0, 5, ENC_NA); + tei_tree = proto_item_add_subtree(tei_ti, lm_subtree); - proto_tree_add_item(tei_tree, lm_entity_id, tvb, 0, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(tei_tree, lm_reference, tvb, 1, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(tei_tree, lm_entity_id, tvb, 0, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tei_tree, lm_reference, tvb, 1, 2, ENC_BIG_ENDIAN); } message = tvb_get_guint8(tvb, 3); - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str(message, tei_msg_vals, "Unknown message type (0x%04x)")); + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str(message, tei_msg_vals, "Unknown message type (0x%04x)")); if (tree) { - proto_tree_add_uint(tei_tree, lm_message, tvb, 3, 1, message); - proto_tree_add_item(tei_tree, lm_action, tvb, 4, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(tei_tree, lm_extend, tvb, 4, 1, ENC_BIG_ENDIAN); + proto_tree_add_uint(tei_tree, lm_message, tvb, 3, 1, message); + proto_tree_add_item(tei_tree, lm_action, tvb, 4, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(tei_tree, lm_extend, tvb, 4, 1, ENC_BIG_ENDIAN); } } @@ -98,33 +98,33 @@ void proto_register_teimanagement(void) { static gint *subtree[]={ - &lm_subtree + &lm_subtree }; static hf_register_info hf[] = { - { &lm_entity_id, - { "Entity", "tei.entity", FT_UINT8, BASE_HEX, NULL, 0x0, - "Layer Management Entity Identifier", HFILL }}, + { &lm_entity_id, + { "Entity", "tei.entity", FT_UINT8, BASE_HEX, NULL, 0x0, + "Layer Management Entity Identifier", HFILL }}, - { &lm_reference, - { "Reference", "tei.reference", FT_UINT16, BASE_DEC, NULL, 0x0, - "Reference Number", HFILL }}, + { &lm_reference, + { "Reference", "tei.reference", FT_UINT16, BASE_DEC, NULL, 0x0, + "Reference Number", HFILL }}, - { &lm_message, - { "Msg", "tei.msg", FT_UINT8, BASE_DEC, VALS(tei_msg_vals), 0x0, - "Message Type", HFILL }}, + { &lm_message, + { "Msg", "tei.msg", FT_UINT8, BASE_DEC, VALS(tei_msg_vals), 0x0, + "Message Type", HFILL }}, - { &lm_action, - { "Action", "tei.action", FT_UINT8, BASE_DEC, NULL, 0xfe, - "Action Indicator", HFILL }}, + { &lm_action, + { "Action", "tei.action", FT_UINT8, BASE_DEC, NULL, 0xfe, + "Action Indicator", HFILL }}, - { &lm_extend, - { "Extend", "tei.extend", FT_UINT8, BASE_DEC, NULL, 0x01, - "Extension Indicator", HFILL }} + { &lm_extend, + { "Extend", "tei.extend", FT_UINT8, BASE_DEC, NULL, 0x01, + "Extension Indicator", HFILL }} }; proto_tei = proto_register_protocol("TEI Management Procedure, Channel D (LAPD)", - "TEI_MANAGEMENT", "tei_management"); + "TEI_MANAGEMENT", "tei_management"); proto_register_field_array (proto_tei, hf, array_length(hf)); proto_register_subtree_array(subtree, array_length(subtree)); } @@ -138,3 +138,16 @@ proto_reg_handoff_teimanagement(void) proto_tei); dissector_add_uint("lapd.sapi", LAPD_SAPI_L2, teimanagement_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-telkonet.c b/epan/dissectors/packet-telkonet.c index c97b53e56f..7eca87ef20 100644 --- a/epan/dissectors/packet-telkonet.c +++ b/epan/dissectors/packet-telkonet.c @@ -107,3 +107,16 @@ proto_reg_handoff_telkonet(void) telkonet_handle = create_dissector_handle(dissect_telkonet, proto_telkonet); dissector_add_uint("ethertype", ETHERTYPE_TELKONET, telkonet_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-tuxedo.c b/epan/dissectors/packet-tuxedo.c index 3fe3882b75..8d4cda3a6f 100644 --- a/epan/dissectors/packet-tuxedo.c +++ b/epan/dissectors/packet-tuxedo.c @@ -70,32 +70,32 @@ static dissector_handle_t tuxedo_handle; static const value_string tuxedo_opcode_vals[] = { - { TUXEDO_ATMI_CALL, "CALL" }, - { TUXEDO_ATMI_REPLY, "REPLY" }, - { TUXEDO_ATMI_FAILURE, "FAILURE" }, - { TUXEDO_ATMI_CONNECT, "CONNECT" }, - { TUXEDO_ATMI_DATA, "DATA" }, - { TUXEDO_ATMI_DISCON, "DISCON" }, - { TUXEDO_ATMI_PREPARE, "PREPARE" }, - { TUXEDO_ATMI_READY, "READY" }, - { TUXEDO_ATMI_COMMIT, "COMMIT" }, - { TUXEDO_ATMI_DONE, "DONE" }, - { TUXEDO_ATMI_COMPLETE, "COMPLETE" }, - { TUXEDO_ATMI_ROLLBACK, "ROLLBACK" }, - { TUXEDO_ATMI_HEURISTIC, "HEURISTIC" }, - { TUXEDO_ATMI_PRE_NW_ACALL1, "ACALL1" }, - { TUXEDO_ATMI_PRE_NW_ACALL1_RPLY, "ACALL1_REPLY" }, - { TUXEDO_ATMI_PRE_NW_ACALL2, "ACALL2" }, - { TUXEDO_ATMI_PRE_NW_ACALL2_RPLY, "ACALL2_REPLY" }, - { TUXEDO_ATMI_PRE_NW_ACALL3, "ACALL3" }, - { TUXEDO_ATMI_PRE_NW_ACALL3_RPLY, "ACALL3_REPLY" }, - { TUXEDO_ATMI_PRE_NW_LLE, "LLE" }, - { TUXEDO_ATMI_PRE_NW_LLE_RPLY, "LLE_REPLY" }, - { TUXEDO_ATMI_SEC_EXCHG_RQST, "SEC_EXCHANGE" }, - { TUXEDO_ATMI_SEC_EXCHG_RPLY, "SEC_EXCHANGE_REPLY" }, - { TUXEDO_ATMI_SEC_NW_ACALL3, "SEC_ACALL3" }, - { TUXEDO_ATMI_SEC_NW_ACALL3_RPLY, "SEC_ACALL3_REPLY" }, - { 0, NULL } + { TUXEDO_ATMI_CALL, "CALL" }, + { TUXEDO_ATMI_REPLY, "REPLY" }, + { TUXEDO_ATMI_FAILURE, "FAILURE" }, + { TUXEDO_ATMI_CONNECT, "CONNECT" }, + { TUXEDO_ATMI_DATA, "DATA" }, + { TUXEDO_ATMI_DISCON, "DISCON" }, + { TUXEDO_ATMI_PREPARE, "PREPARE" }, + { TUXEDO_ATMI_READY, "READY" }, + { TUXEDO_ATMI_COMMIT, "COMMIT" }, + { TUXEDO_ATMI_DONE, "DONE" }, + { TUXEDO_ATMI_COMPLETE, "COMPLETE" }, + { TUXEDO_ATMI_ROLLBACK, "ROLLBACK" }, + { TUXEDO_ATMI_HEURISTIC, "HEURISTIC" }, + { TUXEDO_ATMI_PRE_NW_ACALL1, "ACALL1" }, + { TUXEDO_ATMI_PRE_NW_ACALL1_RPLY, "ACALL1_REPLY" }, + { TUXEDO_ATMI_PRE_NW_ACALL2, "ACALL2" }, + { TUXEDO_ATMI_PRE_NW_ACALL2_RPLY, "ACALL2_REPLY" }, + { TUXEDO_ATMI_PRE_NW_ACALL3, "ACALL3" }, + { TUXEDO_ATMI_PRE_NW_ACALL3_RPLY, "ACALL3_REPLY" }, + { TUXEDO_ATMI_PRE_NW_LLE, "LLE" }, + { TUXEDO_ATMI_PRE_NW_LLE_RPLY, "LLE_REPLY" }, + { TUXEDO_ATMI_SEC_EXCHG_RQST, "SEC_EXCHANGE" }, + { TUXEDO_ATMI_SEC_EXCHG_RPLY, "SEC_EXCHANGE_REPLY" }, + { TUXEDO_ATMI_SEC_NW_ACALL3, "SEC_ACALL3" }, + { TUXEDO_ATMI_SEC_NW_ACALL3_RPLY, "SEC_ACALL3_REPLY" }, + { 0, NULL } }; @@ -163,21 +163,21 @@ dissect_tuxedo_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d void proto_register_tuxedo(void) { - static hf_register_info hf[] = { - { &hf_tuxedo_magic, - { "Magic", "tuxedo.magic", FT_UINT32, BASE_HEX, NULL, 0x0, "TUXEDO magic", HFILL }}, + static hf_register_info hf[] = { + { &hf_tuxedo_magic, + { "Magic", "tuxedo.magic", FT_UINT32, BASE_HEX, NULL, 0x0, "TUXEDO magic", HFILL }}, - { &hf_tuxedo_opcode, - { "Opcode", "tuxedo.opcode", FT_UINT32, BASE_HEX, VALS(tuxedo_opcode_vals), 0x0, "TUXEDO opcode", HFILL }} + { &hf_tuxedo_opcode, + { "Opcode", "tuxedo.opcode", FT_UINT32, BASE_HEX, VALS(tuxedo_opcode_vals), 0x0, "TUXEDO opcode", HFILL }} - }; - static gint *ett[] = { - &ett_tuxedo, - }; + }; + static gint *ett[] = { + &ett_tuxedo, + }; - proto_tuxedo = proto_register_protocol("BEA Tuxedo", "TUXEDO", "tuxedo"); - proto_register_field_array(proto_tuxedo, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); + proto_tuxedo = proto_register_protocol("BEA Tuxedo", "TUXEDO", "tuxedo"); + proto_register_field_array(proto_tuxedo, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); } @@ -189,3 +189,16 @@ proto_reg_handoff_tuxedo(void) dissector_add_for_decode_as("tcp.port", tuxedo_handle); heur_dissector_add("tcp", dissect_tuxedo_heur, proto_tuxedo); } + +/* + * 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-ua3g.c b/epan/dissectors/packet-ua3g.c index dbe1bf48d8..e2af5dd394 100644 --- a/epan/dissectors/packet-ua3g.c +++ b/epan/dissectors/packet-ua3g.c @@ -4533,10 +4533,23 @@ proto_register_ua3g(void) void proto_reg_handoff_ua3g(void) { #if 0 /* Future */ - dissector_handle_t handle_ua3g = find_dissector("ua3g"); + dissector_handle_t handle_ua3g = find_dissector("ua3g"); - /* hooking of UA3G on UA */ + /* hooking of UA3G on UA */ - dissector_add_uint("ua.opcode", 0x15, handle_ua3g); + dissector_add_uint("ua.opcode", 0x15, handle_ua3g); #endif } + +/* + * 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-xml.c b/epan/dissectors/packet-xml.c index 75874af441..e6a298dae5 100644 --- a/epan/dissectors/packet-xml.c +++ b/epan/dissectors/packet-xml.c @@ -1055,13 +1055,13 @@ static void register_dtd(dtd_build_data_t *dtd_data, GString *errors) if (root_name == NULL) root_name = g_strdup(nl->name); - element->name = nl->name; + element->name = nl->name; element->element_names = nl->list; - element->hf_tag = -1; - element->hf_cdata = -1; - element->ett = -1; - element->attributes = g_hash_table_new(g_str_hash, g_str_equal); - element->elements = g_hash_table_new(g_str_hash, g_str_equal); + element->hf_tag = -1; + element->hf_cdata = -1; + element->ett = -1; + element->attributes = g_hash_table_new(g_str_hash, g_str_equal); + element->elements = g_hash_table_new(g_str_hash, g_str_equal); if( g_hash_table_lookup(elements, element->name) ) { g_string_append_printf(errors, "element %s defined more than once\n", element->name); @@ -1388,10 +1388,10 @@ static void apply_prefs(void) } } - dissector_delete_uint_range("tcp.port", xml_tcp_range, xml_handle); + dissector_delete_uint_range("tcp.port", xml_tcp_range, xml_handle); g_free(xml_tcp_range); xml_tcp_range = range_copy(global_xml_tcp_range); - dissector_add_uint_range("tcp.port", xml_tcp_range, xml_handle); + dissector_add_uint_range("tcp.port", xml_tcp_range, xml_handle); } void @@ -1505,3 +1505,16 @@ proto_reg_handoff_xml(void) heur_dissector_add("wtap_file", dissect_xml_heur, xml_ns.hf_tag); } + +/* + * 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-ypxfr.c b/epan/dissectors/packet-ypxfr.c index 6efdd734aa..978e236a4d 100644 --- a/epan/dissectors/packet-ypxfr.c +++ b/epan/dissectors/packet-ypxfr.c @@ -78,3 +78,16 @@ proto_reg_handoff_ypxfr(void) /* Register the procedure tables */ rpc_init_proc_table(YPXFR_PROGRAM, 1, ypxfr1_proc, hf_ypxfr_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: + */ -- cgit v1.2.3