From c4ace59928e1a14fb17d3989fd2e718ca9499ffd Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Sun, 27 Nov 2011 15:34:07 +0000 Subject: Various Minor cleanup: - Remove unneeded #includes; - Use val_to_str_const() in several places; - Reformat long lines; - Fix whitepace and indentation. svn path=/trunk/; revision=40016 --- epan/dissectors/packet-ua.c | 152 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 119 insertions(+), 33 deletions(-) (limited to 'epan/dissectors/packet-ua.c') diff --git a/epan/dissectors/packet-ua.c b/epan/dissectors/packet-ua.c index e36eb74785..132abb80e5 100644 --- a/epan/dissectors/packet-ua.c +++ b/epan/dissectors/packet-ua.c @@ -42,7 +42,6 @@ #endif #include -#include static void DissectNOE(tvbuff_t *pTvb, proto_tree *pRootUA); static void DissectNOE_type(tvbuff_t *pTvb, proto_tree *pNoeItem); @@ -681,38 +680,125 @@ void proto_register_ua(void) { static hf_register_info hf[] = { - { &hf_noe, { "NOE", "ua.noe", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_noe_length, { "Length", "ua.noe.length", FT_UINT16, BASE_DEC, NULL, 0x0, "NOE item length (without 2 bytes containing the length)", HFILL }}, - { &hf_noe_type, { "Type", "ua.noe.type", FT_UINT8, BASE_DEC, VALS(szNoeType), 0x0, "NOE item type", HFILL }}, - { &hf_noe_method, { "Method", "ua.noe.method", FT_UINT8, BASE_DEC, VALS(szCallServerMethod), 0x0, "Call Server method", HFILL }}, - { &hf_noe_class, { "Class", "ua.noe.class", FT_UINT8, BASE_DEC, VALS(szCallServerClass), 0x0, "Call Server class", HFILL }}, - { &hf_noe_objid, { "ObjectID", "ua.noe.objid", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, "Call Server object id", HFILL }}, - { &hf_noe_event, { "Event", "ua.noe.event", FT_UINT8, BASE_DEC, VALS(szCallServerEvent), 0x0, "Call Server event", HFILL }}, - { &hf_noe_keychar, { "KeyChar", "ua.noe.event.keychar", FT_BYTES, BASE_NONE, NULL, 0x0, "Event key char", HFILL }}, - { &hf_noe_voicemode, { "VoiceMode", "ua.noe.voicemode", FT_UINT8, BASE_DEC, VALS(szNoeVoiceMode), 0x0, NULL, HFILL }}, - - { &hf_noe_action, { "Action", "ua.noe.action", FT_UINT8, BASE_DEC, VALS(szNoeAction), 0x0, "IP action", HFILL }}, - { &hf_noe_reserved, { "Reserved", "ua.noe.action.startrtp.reserved", FT_UINT8, BASE_DEC, NULL, 0x0, "IP start rtp reserved", HFILL }}, - { &hf_noe_property, { "Property", "ua.noe.action.startrtp.property", FT_NONE, BASE_NONE, NULL, 0x0, "IP property", HFILL }}, - { &hf_noe_id, { "ID", "ua.noe.action.startrtp.property.id", FT_UINT8, BASE_DEC, VALS(szStartRtpPropID), 0x0, "IP property id", HFILL }}, - { &hf_noe_size, { "Size", "ua.noe.action.startrtp.property.size", FT_UINT8, BASE_DEC, NULL, 0x0, "IP property size", HFILL }}, - { &hf_noe_data, { "Data", "ua.noe.action.startrtp.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - - { &hf_noe_local_port, { "LocalPort", "ua.noe.action.startrtp.localport", FT_UINT16, BASE_DEC, NULL, 0x0, "IP start rtp property localport", HFILL }}, - { &hf_noe_remote_ip, { "RemoteIP", "ua.noe.action.startrtp.remoteip", FT_IPv4, BASE_NONE, NULL, 0x0, "IP start rtp property remote ipv4", HFILL }}, - { &hf_noe_remote_port, { "RemotePort", "ua.noe.action.startrtp.remoteport", FT_UINT16, BASE_DEC, NULL, 0x0, "IP start rtp property remoteport", HFILL }}, - { &hf_noe_compressor, { "Payload", "ua.noe.action.startrtp.payload", FT_UINT8, BASE_DEC, VALS(szStartRtpPayload), 0x0, "IP start rtp property payload", HFILL }}, - { &hf_noe_typeofservice,{ "TypeOfService", "ua.noe.action.startrtp.typeofservice", FT_UINT8, BASE_DEC, NULL, 0x0, "IP start rtp property type of service", HFILL }}, - { &hf_noe_payloadconcat,{ "Payld Concat", "ua.noe.action.startrtp.payldconcat", FT_UINT8, BASE_DEC, NULL, 0x0, "IP start rtp property payload concatenation (in ms)", HFILL }}, - - { &hf_tlv, { "TLV", "ua.noe.tlv", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - { &hf_tlv_property, { "Property", "ua.noe.tlv.property", FT_UINT8, BASE_DEC, VALS(szTlvProperty), 0x0, "TLV property", HFILL }}, - { &hf_tlv_arrindex, { "ArrIndex", "ua.noe.tlv.arrindex", FT_UINT8, BASE_DEC, NULL, 0x0, "TLV array index", HFILL }}, - { &hf_tlv_propsize, { "PropSize", "ua.noe.tlv.propsize", FT_UINT8, BASE_DEC, NULL, 0x0, "TLV property size", HFILL }}, - { &hf_tlv_data, { "Data", "ua.noe.tlv.data", FT_BYTES, BASE_NONE, NULL, 0x0, "TLV data", HFILL }}, - { &hf_tlv_label, { "Label", "ua.noe.tlv.label", FT_STRING, BASE_NONE, NULL, 0x0, "TLV label", HFILL }}, - { &hf_tlv_year, { "Year", "ua.noe.tlv.year", FT_UINT16, BASE_DEC, NULL, 0x0, "TLV year", HFILL }}, - { &hf_tlv_number, { "Number", "ua.noe.tlv.number", FT_STRING, BASE_NONE, NULL, 0x0, "TLV remote phone number", HFILL }}, + { &hf_noe, + { "NOE", "ua.noe", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_noe_length, + { "Length", "ua.noe.length", + FT_UINT16, BASE_DEC, NULL, 0x0, + "NOE item length (without 2 bytes containing the length)", HFILL }}, + { &hf_noe_type, + { "Type", "ua.noe.type", + FT_UINT8, BASE_DEC, VALS(szNoeType), 0x0, + "NOE item type", HFILL }}, + { &hf_noe_method, + { "Method", "ua.noe.method", + FT_UINT8, BASE_DEC, VALS(szCallServerMethod), 0x0, + "Call Server method", HFILL }}, + { &hf_noe_class, + { "Class", "ua.noe.class", + FT_UINT8, BASE_DEC, VALS(szCallServerClass), 0x0, + "Call Server class", HFILL }}, + { &hf_noe_objid, + { "ObjectID", "ua.noe.objid", + FT_UINT16, BASE_HEX_DEC, NULL, 0x0, + "Call Server object id", HFILL }}, + { &hf_noe_event, + { "Event", "ua.noe.event", + FT_UINT8, BASE_DEC, VALS(szCallServerEvent), 0x0, + "Call Server event", HFILL }}, + { &hf_noe_keychar, + { "KeyChar", "ua.noe.event.keychar", + FT_BYTES, BASE_NONE, NULL, 0x0, + "Event key char", HFILL }}, + { &hf_noe_voicemode, + { "VoiceMode", "ua.noe.voicemode", + FT_UINT8, BASE_DEC, VALS(szNoeVoiceMode), 0x0, + NULL, HFILL }}, + + { &hf_noe_action, + { "Action", "ua.noe.action", + FT_UINT8, BASE_DEC, VALS(szNoeAction), 0x0, + "IP action", HFILL }}, + { &hf_noe_reserved, + { "Reserved", "ua.noe.action.startrtp.reserved", + FT_UINT8, BASE_DEC, NULL, 0x0, + "IP start rtp reserved", HFILL }}, + { &hf_noe_property, + { "Property", "ua.noe.action.startrtp.property", + FT_NONE, BASE_NONE, NULL, 0x0, + "IP property", HFILL }}, + { &hf_noe_id, + { "ID", "ua.noe.action.startrtp.property.id", + FT_UINT8, BASE_DEC, VALS(szStartRtpPropID), 0x0, + "IP property id", HFILL }}, + { &hf_noe_size, + { "Size", "ua.noe.action.startrtp.property.size", + FT_UINT8, BASE_DEC, NULL, 0x0, + "IP property size", HFILL }}, + { &hf_noe_data, + { "Data", "ua.noe.action.startrtp.data", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + + { &hf_noe_local_port, + { "LocalPort", "ua.noe.action.startrtp.localport", + FT_UINT16, BASE_DEC, NULL, 0x0, + "IP start rtp property localport", HFILL }}, + { &hf_noe_remote_ip, + { "RemoteIP", "ua.noe.action.startrtp.remoteip", + FT_IPv4, BASE_NONE, NULL, 0x0, + "IP start rtp property remote ipv4", HFILL }}, + { &hf_noe_remote_port, + { "RemotePort", "ua.noe.action.startrtp.remoteport", + FT_UINT16, BASE_DEC, NULL, 0x0, + "IP start rtp property remoteport", HFILL }}, + { &hf_noe_compressor, + { "Payload", "ua.noe.action.startrtp.payload", + FT_UINT8, BASE_DEC, VALS(szStartRtpPayload), 0x0, + "IP start rtp property payload", HFILL }}, + { &hf_noe_typeofservice, + { "TypeOfService", "ua.noe.action.startrtp.typeofservice", + FT_UINT8, BASE_DEC, NULL, 0x0, + "IP start rtp property type of service", HFILL }}, + { &hf_noe_payloadconcat, + { "Payld Concat", "ua.noe.action.startrtp.payldconcat", + FT_UINT8, BASE_DEC, NULL, 0x0, + "IP start rtp property payload concatenation (in ms)", HFILL }}, + + { &hf_tlv, + { "TLV", "ua.noe.tlv", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL }}, + { &hf_tlv_property, + { "Property", "ua.noe.tlv.property", + FT_UINT8, BASE_DEC, VALS(szTlvProperty), 0x0, + "TLV property", HFILL }}, + { &hf_tlv_arrindex, + { "ArrIndex", "ua.noe.tlv.arrindex", + FT_UINT8, BASE_DEC, NULL, 0x0, + "TLV array index", HFILL }}, + { &hf_tlv_propsize, + { "PropSize", "ua.noe.tlv.propsize", + FT_UINT8, BASE_DEC, NULL, 0x0, + "TLV property size", HFILL }}, + { &hf_tlv_data, + { "Data", "ua.noe.tlv.data", + FT_BYTES, BASE_NONE, NULL, 0x0, + "TLV data", HFILL }}, + { &hf_tlv_label, + { "Label", "ua.noe.tlv.label", + FT_STRING, BASE_NONE, NULL, 0x0, + "TLV label", HFILL }}, + { &hf_tlv_year, + { "Year", "ua.noe.tlv.year", + FT_UINT16, BASE_DEC, NULL, 0x0, + "TLV year", HFILL }}, + { &hf_tlv_number, + { "Number", "ua.noe.tlv.number", + FT_STRING, BASE_NONE, NULL, 0x0, + "TLV remote phone number", HFILL }}, }; static gint *ett[] = { -- cgit v1.2.3