Exemple #1
0
void
proto_register_docsis_dccrsp (void)
{
/* Setup list of header fields  See Section 1.6.1 for details*/
  static hf_register_info hf[] = {
    {&hf_docsis_dccrsp_tran_id ,
      {
      "Transaction ID", 
      "docsis_dccrsp.tran_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dccrsp_conf_code ,
      {
      "Confirmation Code", 
      "docsis_dccrsp.conf_code",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dccrsp_cm_jump_time_length ,
      {
      "Jump Time Length", 
      "docsis_dccrsp.cm_jump_time_length",
      FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dccrsp_cm_jump_time_start ,
      {
      "Jump Time Start", 
      "docsis_dccrsp.cm_jump_time_start",
      FT_UINT64, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dccrsp_key_seq_num ,
      {
      "Auth Key Sequence Number",
      "docsis_dccrsp.key_seq_num",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL,
      HFILL
      }
    },
    {&hf_docsis_dccrsp_hmac_digest ,
      {
      "HMAC-DigestNumber",
      "docsis_dccrsp.hmac_digest",
      FT_BYTES, BASE_NONE, NULL, 0x0,
      NULL,
      HFILL
      }
    },

  };

/* Setup protocol subtree array */
  static gint *ett[] = {
    &ett_docsis_dccrsp,
    &ett_docsis_dccrsp_cm_jump_time,
  };

/* Register the protocol name and description */
  proto_docsis_dccrsp =
    proto_register_protocol ("DOCSIS Downstream Channel Change Response",
			     "DOCSIS DCC-RSP", "docsis_dccrsp");

/* Required function calls to register the header fields and subtrees used */
  proto_register_field_array (proto_docsis_dccrsp, hf, array_length (hf));
  proto_register_subtree_array (ett, array_length (ett));

  register_dissector ("docsis_dccrsp", dissect_dccrsp, proto_docsis_dccrsp);
}
void
proto_register_gssapi(void)
{
	static hf_register_info hf[] = {
	{ &hf_gssapi_oid,
		{ "OID", "gss-api.OID", FT_STRING, BASE_NONE,
		  NULL, 0, "This is a GSS-API Object Identifier", HFILL }},
	{ &hf_gssapi_token_object,
		{ "Token object", "gss-api.token_object", FT_BYTES, BASE_NONE,
		  NULL, 0, NULL, HFILL }},
	{ &hf_gssapi_auth_verifier,
		{ "Authentication verifier", "gss-api.auth_verifier", FT_BYTES, BASE_NONE,
		  NULL, 0, NULL, HFILL }},
	{ &hf_gssapi_auth_credentials,
		{ "Authentication credentials", "gss-api.auth_credentials", FT_BYTES, BASE_NONE,
		  NULL, 0, NULL, HFILL }},
	{ &hf_gssapi_segment,
		{ "GSSAPI Segment", "gss-api.segment", FT_FRAMENUM, BASE_NONE,
		  NULL, 0x0, NULL, HFILL }},
	{ &hf_gssapi_segments,
		{ "GSSAPI Segments", "gss-api.segment.segments", FT_NONE, BASE_NONE,
		  NULL, 0x0, NULL, HFILL }},
	{ &hf_gssapi_segment_overlap,
		{ "Fragment overlap",	"gss-api.segment.overlap", FT_BOOLEAN, BASE_NONE,
		   NULL, 0x0, "Fragment overlaps with other fragments", HFILL }},
	{ &hf_gssapi_segment_overlap_conflict,
		{ "Conflicting data in fragment overlap",	"gss-api.segment.overlap.conflict", FT_BOOLEAN, BASE_NONE,
		  NULL, 0x0, "Overlapping fragments contained conflicting data", HFILL }},
	{ &hf_gssapi_segment_multiple_tails,
		{ "Multiple tail fragments found",	"gss-api.segment.multipletails", FT_BOOLEAN, BASE_NONE,
		  NULL, 0x0, "Several tails were found when defragmenting the packet", HFILL }},
	{ &hf_gssapi_segment_too_long_fragment,
		{ "Fragment too long",	"gss-api.segment.toolongfragment", FT_BOOLEAN, BASE_NONE,
		  NULL, 0x0, "Fragment contained data past end of packet", HFILL }},
	{ &hf_gssapi_segment_error,
		{ "Defragmentation error", "gss-api.segment.error", FT_FRAMENUM, BASE_NONE,
		  NULL, 0x0, "Defragmentation error due to illegal fragments", HFILL }},
	{ &hf_gssapi_segment_count,
		{ "Fragment count", "gss-api.segment.count", FT_UINT32, BASE_DEC,
		  NULL, 0x0, NULL, HFILL }},
	{ &hf_gssapi_reassembled_in,
		{ "Reassembled In", "gss-api.reassembled_in", FT_FRAMENUM, BASE_NONE,
		  NULL, 0x0, "The frame where this pdu is reassembled", HFILL }},
	{ &hf_gssapi_reassembled_length,
		{ "Reassembled GSSAPI length", "gss-api.reassembled.length", FT_UINT32, BASE_DEC,
		  NULL, 0x0, "The total length of the reassembled payload", HFILL }},
	};

	static gint *ett[] = {
		&ett_gssapi,
		&ett_gssapi_segment,
		&ett_gssapi_segments,
	};

	static ei_register_info ei[] = {
		{ &ei_gssapi_unknown_header, { "gssapi.unknown_header", PI_PROTOCOL, PI_WARN, "Unknown header", EXPFILL }},
	};

	module_t *gssapi_module;
	expert_module_t *expert_gssapi;

	proto_gssapi = proto_register_protocol(
		"GSS-API Generic Security Service Application Program Interface",
		"GSS-API", "gss-api");

	gssapi_module = prefs_register_protocol(proto_gssapi, NULL);
	prefs_register_bool_preference(gssapi_module, "gssapi_reassembly",
		"Reassemble fragmented GSSAPI blobs",
		"Whether or not to try reassembling GSSAPI blobs spanning multiple (SMB/SessionSetup) PDUs",
		&gssapi_reassembly);
	proto_register_field_array(proto_gssapi, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_gssapi = expert_register_protocol(proto_gssapi);
	expert_register_field_array(expert_gssapi, ei, array_length(ei));

	gssapi_handle = register_dissector("gssapi", dissect_gssapi, proto_gssapi);
	register_dissector("gssapi_verf", dissect_gssapi_verf, proto_gssapi);

	gssapi_oids = g_hash_table_new_full(gssapi_oid_hash, gssapi_oid_equal, g_free, g_free);

	reassembly_table_register(&gssapi_reassembly_table,
	                      &addresses_reassembly_table_functions);

	register_shutdown_routine(gssapi_shutdown);
}
void
proto_register_pflog(void)
{
  static hf_register_info hf[] = {
    { &hf_pflog_length,
      { "Header Length", "pflog.length", FT_UINT8, BASE_DEC, NULL, 0x0,
        "Length of Header", HFILL }},
    { &hf_pflog_af,
      { "Address Family", "pflog.af", FT_UINT32, BASE_DEC, VALS(pflog_af_vals), 0x0,
        "Protocol (IPv4 vs IPv6)", HFILL }},
    { &hf_pflog_action,
      { "Action", "pflog.action", FT_UINT8, BASE_DEC, VALS(pflog_action_vals), 0x0,
        "Action taken by PF on the packet", HFILL }},
    { &hf_pflog_reason,
      { "Reason", "pflog.reason", FT_UINT8, BASE_DEC, VALS(pflog_reason_vals), 0x0,
        "Reason for logging the packet", HFILL }},
    { &hf_pflog_ifname,
      { "Interface", "pflog.ifname", FT_STRING, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_ruleset,
      { "Ruleset", "pflog.ruleset", FT_STRING, BASE_NONE, NULL, 0x0,
        "Ruleset name in anchor", HFILL }},
    { &hf_pflog_rulenr,
      { "Rule Number", "pflog.rulenr", FT_INT32, BASE_DEC, NULL, 0x0,
        "Last matched firewall main ruleset rule number", HFILL }},
    { &hf_pflog_subrulenr,
      { "Sub Rule Number", "pflog.subrulenr", FT_INT32, BASE_DEC, NULL, 0x0,
        "Last matched firewall anchored ruleset rule number", HFILL }},
    { &hf_pflog_uid,
      { "UID", "pflog.uid", FT_INT32, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_pid,
      { "PID", "pflog.pid", FT_INT32, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_rule_uid,
      { "Rule UID", "pflog.rule_uid", FT_INT32, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_rule_pid,
      { "Rule PID", "pflog.rule_pid", FT_INT32, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_rewritten,
      { "Rewritten", "pflog.rewritten", FT_UINT8, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_pad,
      { "Padding", "pflog.pad", FT_BYTES, BASE_NONE, NULL, 0x0,
        "Must be Zero", HFILL }},
    { &hf_pflog_saddr_ipv4,
      { "Source Address", "pflog.saddr", FT_IPv4, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_daddr_ipv4,
      { "Destination Address", "pflog.daddr", FT_IPv4, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_saddr_ipv6,
      { "Source Address", "pflog.saddr", FT_IPv6, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_daddr_ipv6,
      { "Destination Address", "pflog.daddr", FT_IPv6, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_saddr,
      { "Source Address", "pflog.saddr", FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_daddr,
      { "Destination Address", "pflog.daddr", FT_BYTES, BASE_NONE, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_sport,
      { "Source Port", "pflog.sport", FT_UINT16, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_dport,
      { "Destination Port", "pflog.dport", FT_UINT16, BASE_DEC, NULL, 0x0,
        NULL, HFILL }},
    { &hf_pflog_dir,
      { "Direction", "pflog.dir", FT_UINT8, BASE_DEC, VALS(pflog_dir_vals), 0x0,
        "Direction of packet in stack (inbound versus outbound)", HFILL }},
  };
  static gint *ett[] = { &ett_pflog };

  static ei_register_info ei[] = {
     { &ei_pflog_invalid_header_length, { "pflog.invalid_header_length", PI_MALFORMED, PI_ERROR, "Invalid header length ", EXPFILL }},
  };

  expert_module_t* expert_pflog;

  proto_pflog = proto_register_protocol("OpenBSD Packet Filter log file",
                                        "PFLOG", "pflog");
  proto_register_field_array(proto_pflog, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_pflog = expert_register_protocol(proto_pflog);
  expert_register_field_array(expert_pflog, ei, array_length(ei));
}
Exemple #4
0
void
proto_register_irc(void)
{
    static hf_register_info hf[] = {
        { &hf_irc_response, { "Response", "irc.response", FT_STRING, BASE_NONE,
          NULL, 0x0, "Line of response message", HFILL }},

        { &hf_irc_request, { "Request", "irc.request", FT_STRING, BASE_NONE,
          NULL, 0x0, "Line of request message", HFILL }},

        { &hf_irc_request_prefix, { "Prefix", "irc.request.prefix", FT_STRING, BASE_NONE,
          NULL, 0x0, "Request prefix", HFILL }},

        { &hf_irc_request_command, { "Command", "irc.request.command", FT_STRING, BASE_NONE,
          NULL, 0x0, "Request command", HFILL }},

        { &hf_irc_request_command_param, { "Parameter", "irc.request.command_parameter", FT_STRING, BASE_NONE,
          NULL, 0x0, "Request command parameter", HFILL }},

        { &hf_irc_request_trailer, { "Trailer", "irc.request.trailer", FT_STRING, BASE_NONE,
          NULL, 0x0, "Request trailer", HFILL }},

        { &hf_irc_response_prefix, { "Prefix", "irc.response.prefix", FT_STRING, BASE_NONE,
          NULL, 0x0, "Response prefix", HFILL }},

        { &hf_irc_response_command, { "Command", "irc.response.command", FT_STRING, BASE_NONE,
          NULL, 0x0, "Response command", HFILL }},

        { &hf_irc_response_num_command, { "Command", "irc.response.num_command", FT_UINT16, BASE_DEC,
          NULL, 0x0, "Response (numeric) command", HFILL }},

        { &hf_irc_response_command_param, { "Parameter", "irc.response.command_parameter", FT_STRING, BASE_NONE,
          NULL, 0x0, "Response command parameter", HFILL }},

        { &hf_irc_response_trailer, { "Trailer", "irc.response.trailer", FT_STRING, BASE_NONE,
          NULL, 0x0, "Response trailer", HFILL }},

        { &hf_irc_ctcp, { "CTCP Data", "irc.ctcp", FT_STRING, BASE_NONE,
          NULL, 0x0, "Placeholder to dissect CTCP data", HFILL }}
    };

    static gint *ett[] = {
        &ett_irc,
        &ett_irc_request,
        &ett_irc_request_command,
        &ett_irc_response,
        &ett_irc_response_command
    };

    static ei_register_info ei[] = {
        { &ei_irc_missing_end_delimiter, { "irc.missing_end_delimiter", PI_MALFORMED, PI_ERROR, "Missing ending tag delimiter (0x01)", EXPFILL }},
        { &ei_irc_tag_data_invalid, { "irc.tag_data_invalid", PI_PROTOCOL, PI_WARN, "Tag data outside of NOTICE or PRIVMSG command", EXPFILL }},
        { &ei_irc_prefix_missing_ending_space, { "irc.prefix_missing_ending_space", PI_MALFORMED, PI_ERROR, "Prefix missing ending <space>", EXPFILL }},
        { &ei_irc_request_command, { "irc.request.command.missing", PI_MALFORMED, PI_ERROR, "Request has no command", EXPFILL }},
        { &ei_irc_numeric_request_command, { "irc.request.command.numeric", PI_PROTOCOL, PI_WARN, "Numeric command not allowed in request", EXPFILL }},
        { &ei_irc_response_command, { "irc.response.command.missing", PI_MALFORMED, PI_ERROR, "Response has no command", EXPFILL }},
    };

    expert_module_t* expert_irc;

    proto_irc = proto_register_protocol("Internet Relay Chat", "IRC", "irc");
    proto_register_field_array(proto_irc, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
    expert_irc = expert_register_protocol(proto_irc);
    expert_register_field_array(expert_irc, ei, array_length(ei));
}
Exemple #5
0
void
proto_register_trmac(void)
{
        static hf_register_info hf[] = {
                { &hf_trmac_mv,
                { "Major Vector",			"trmac.mvec", FT_UINT8, BASE_HEX, major_vector_vs, 0x0,
			NULL, HFILL }},

                { &hf_trmac_length,
                { "Total Length",			"trmac.length", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

                { &hf_trmac_srcclass,
                { "Source Class",			"trmac.srcclass", FT_UINT8, BASE_HEX, classes_vs, 0x0,
			NULL, HFILL }},

                { &hf_trmac_dstclass,
                { "Destination Class",			"trmac.dstclass", FT_UINT8, BASE_HEX, classes_vs, 0x0,
			NULL, HFILL }},

                { &hf_trmac_sv,
                { "Sub-Vector",				"trmac.svec", FT_UINT8, BASE_HEX, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_iso,
		{ "Isolating Errors",			"trmac.errors.iso", FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_line,
		{ "Line Errors",			"trmac.errors.line", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_internal,
		{ "Internal Errors",			"trmac.errors.internal", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_burst,
		{ "Burst Errors",			"trmac.errors.burst", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_ac,
		{ "A/C Errors",				"trmac.errors.ac", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_abort,
		{ "Abort Delimiter Transmitted Errors",	"trmac.errors.abort", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_noniso,
		{ "Non-Isolating Errors",		"trmac.errors.noniso", FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_lost,
		{ "Lost Frame Errors",			"trmac.errors.lost", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_congestion,
		{ "Receiver Congestion Errors",		"trmac.errors.congestion", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_fc,
		{ "Frame-Copied Errors",		"trmac.errors.fc", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_freq,
		{ "Frequency Errors",			"trmac.errors.freq", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_token,
		{ "Token Errors",			"trmac.errors.token", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_naun,
		{ "NAUN",				"trmac.naun", FT_ETHER, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},
        };
	static gint *ett[] = {
		&ett_tr_mac,
		&ett_tr_ierr_cnt,
		&ett_tr_nerr_cnt,
	};

        proto_trmac = proto_register_protocol("Token-Ring Media Access Control",
	    "TR MAC", "trmac");
	proto_register_field_array(proto_trmac, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	register_dissector("trmac", dissect_trmac, proto_trmac);
}
/* Register the protocol with Wireshark */
void
proto_register_gsm_sms_ud(void)
{
    module_t *gsm_sms_ud_module; /* Preferences for GSM SMS UD */

    /* Setup list of header fields  */
    static hf_register_info hf[] = {
        /*
         * User Data Header
         */
        {   &hf_gsm_sms_udh_iei,
            {   "IE Id", "gsm_sms_ud.udh.iei",
                FT_UINT8, BASE_HEX, VALS(vals_udh_iei), 0x00,
                "Name of the User Data Header Information Element.",
                HFILL
            }
        },
        {   &hf_gsm_sms_udh_length,
            {   "UDH Length", "gsm_sms_ud.udh.len",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "Length of the User Data Header (bytes)",
                HFILL
            }
        },
#if 0
        {   &hf_gsm_sms_udh_multiple_messages,
            {   "Multiple messages UDH", "gsm_sms_ud.udh.mm",
                FT_NONE, BASE_NONE, NULL, 0x00,
                "Multiple messages User Data Header",
                HFILL
            }
        },
#endif
        {   &hf_gsm_sms_udh_multiple_messages_msg_id,
            {   "Message identifier", "gsm_sms_ud.udh.mm.msg_id",
                FT_UINT16, BASE_DEC, NULL, 0x00,
                "Identification of the message",
                HFILL
            }
        },
        {   &hf_gsm_sms_udh_multiple_messages_msg_parts,
            {   "Message parts", "gsm_sms_ud.udh.mm.msg_parts",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "Total number of message parts (fragments)",
                HFILL
            }
        },
        {   &hf_gsm_sms_udh_multiple_messages_msg_part,
            {   "Message part number", "gsm_sms_ud.udh.mm.msg_part",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                "Message part (fragment) sequence number",
                HFILL
            }
        },
#if 0
        {   &hf_gsm_sms_udh_ports,
            {   "Port number UDH", "gsm_sms_ud.udh.ports",
                FT_NONE, BASE_NONE, NULL, 0x00,
                "Port number User Data Header",
                HFILL
            }
        },
#endif
        {   &hf_gsm_sms_udh_ports_src,
            {   "Source port", "gsm_sms_ud.udh.ports.src",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                NULL,
                HFILL
            }
        },
        {   &hf_gsm_sms_udh_ports_dst,
            {   "Destination port", "gsm_sms_ud.udh.ports.dst",
                FT_UINT8, BASE_DEC, NULL, 0x00,
                NULL,
                HFILL
            }
        },
        /*
         * Short Message fragment reassembly
         */
        {   &hf_gsm_sms_ud_fragments,
            {   "Short Message fragments", "gsm_sms_ud.fragments",
                FT_NONE, BASE_NONE, NULL, 0x00,
                "GSM Short Message fragments",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment,
            {   "Short Message fragment", "gsm_sms_ud.fragment",
                FT_FRAMENUM, BASE_NONE, NULL, 0x00,
                "GSM Short Message fragment",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_overlap,
            {   "Short Message fragment overlap", "gsm_sms_ud.fragment.overlap",
                FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "GSM Short Message fragment overlaps with other fragment(s)",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_overlap_conflicts,
            {   "Short Message fragment overlapping with conflicting data",
                "gsm_sms_ud.fragment.overlap.conflicts",
                FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "GSM Short Message fragment overlaps with conflicting data",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_multiple_tails,
            {   "Short Message has multiple tail fragments",
                "gsm_sms_ud.fragment.multiple_tails",
                FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "GSM Short Message fragment has multiple tail fragments",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_too_long_fragment,
            {   "Short Message fragment too long",
                "gsm_sms_ud.fragment.too_long_fragment",
                FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "GSM Short Message fragment data goes beyond the packet end",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_error,
            {   "Short Message defragmentation error", "gsm_sms_ud.fragment.error",
                FT_FRAMENUM, BASE_NONE, NULL, 0x00,
                "GSM Short Message defragmentation error due to illegal fragments",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_fragment_count,
            {   "Short Message fragment count", "gsm_sms_ud.fragment.count",
                FT_UINT32, BASE_DEC, NULL, 0x00,
                NULL,
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_reassembled_in,
            {   "Reassembled in",
                "gsm_sms_ud.reassembled.in",
                FT_FRAMENUM, BASE_NONE, NULL, 0x00,
                "GSM Short Message has been reassembled in this packet.",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_reassembled_length,
            {   "Reassembled Short Message length",
                "gsm_sms_ud.reassembled.length",
                FT_UINT32, BASE_DEC, NULL, 0x00,
                "The total length of the reassembled payload",
                HFILL
            }
        },
        {   &hf_gsm_sms_ud_short_msg,
            {   "Short Message body",
                "gsm_sms_ud.short_msg",
                FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
            }
        },
    };

    static gint *ett[] = {
        &ett_gsm_sms,
        &ett_udh,
        &ett_udh_ie,
        &ett_gsm_sms_ud_fragment,
        &ett_gsm_sms_ud_fragments,
    };
    /* Register the protocol name and description */
    proto_gsm_sms_ud = proto_register_protocol(
                           "GSM Short Message Service User Data",  /* Name */
                           "GSM SMS UD",           /* Short name */
                           "gsm_sms_ud");          /* Filter name */

    /* Required function calls to register header fields and subtrees used */
    proto_register_field_array(proto_gsm_sms_ud, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    /* Subdissector code */
    gsm_sms_dissector_table = register_dissector_table("gsm_sms_ud.udh.port",
                              "GSM SMS port IE in UDH", FT_UINT16, BASE_DEC);

    /* Preferences for GSM SMS UD */
    gsm_sms_ud_module = prefs_register_protocol(proto_gsm_sms_ud, NULL);
    prefs_register_bool_preference(gsm_sms_ud_module,
                                   "port_number_udh_means_wsp",
                                   "Port Number IE in UDH always triggers CL-WSP dissection",
                                   "Always decode a GSM Short Message as Connectionless WSP "
                                   "if a Port Number Information Element is present "
                                   "in the SMS User Data Header.",
                                   &port_number_udh_means_wsp);
    prefs_register_bool_preference(gsm_sms_ud_module, "try_dissect_1st_fragment",
                                   "Always try subdissection of 1st Short Message fragment",
                                   "Always try subdissection of the 1st fragment of a fragmented "
                                   "GSM Short Message. If reassembly is possible, the Short Message "
                                   "may be dissected twice (once as a short frame, once in its "
                                   "entirety).",
                                   &try_dissect_1st_frag);
    prefs_register_bool_preference(gsm_sms_ud_module, "prevent_dissectors_chg_cols",
                                   "Prevent sub-dissectors from changing column data",
                                   "Prevent sub-dissectors from replacing column data with their "
                                   "own. Eg. Prevent WSP dissector overwriting SMPP information.",
                                   &prevent_subdissectors_changing_columns);

    register_dissector("gsm_sms_ud", dissect_gsm_sms_ud, proto_gsm_sms_ud);

    /* GSM SMS UD dissector initialization routines */
    register_init_routine(gsm_sms_ud_defragment_init);
}
Exemple #7
0
void
proto_register_trmac(void)
{
	static hf_register_info hf[] = {
		{ &hf_trmac_mv,
		{ "Major Vector",			"trmac.mvec", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &major_vector_vs_ext, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_length,
		{ "Total Length",			"trmac.length", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_srcclass,
		{ "Source Class",			"trmac.srcclass", FT_UINT8, BASE_HEX, VALS(classes_vs), 0x0,
			NULL, HFILL }},

		{ &hf_trmac_dstclass,
		{ "Destination Class",			"trmac.dstclass", FT_UINT8, BASE_HEX, VALS(classes_vs), 0x0,
			NULL, HFILL }},

		{ &hf_trmac_sv_len,
		{ "Subvector Length",			"trmac.svec.len", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_sv_id,
		{ "Subvector Identifier",		"trmac.svec.id", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &subvector_vs_ext, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_iso,
		{ "Isolating Errors",			"trmac.errors.iso", FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_line,
		{ "Line Errors",			"trmac.errors.line", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_internal,
		{ "Internal Errors",			"trmac.errors.internal", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_burst,
		{ "Burst Errors",			"trmac.errors.burst", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_ac,
		{ "A/C Errors",				"trmac.errors.ac", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_abort,
		{ "Abort Delimiter Transmitted Errors",	"trmac.errors.abort", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_noniso,
		{ "Non-Isolating Errors",		"trmac.errors.noniso", FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_lost,
		{ "Lost Frame Errors",			"trmac.errors.lost", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_congestion,
		{ "Receiver Congestion Errors",		"trmac.errors.congestion", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_fc,
		{ "Frame-Copied Errors",		"trmac.errors.fc", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_freq,
		{ "Frequency Errors",			"trmac.errors.freq", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_errors_token,
		{ "Token Errors",			"trmac.errors.token", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_naun,
		{ "Upstream Neighbor's Address",	"trmac.naun", FT_ETHER, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_trmac_beacon_type,
		{ "Beacon Type",			"trmac.beacon_type", FT_UINT16, BASE_DEC, VALS(beacon_vs), 0x0,
			NULL, HFILL }},

		/* Generated from convert_proto_tree_add_text.pl */
		{ &hf_trmac_local_ring_number, { "Local Ring Number", "trmac.local_ring_number", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_assign_physical_drop_number, { "Assign Physical Drop Number", "trmac.assign_physical_drop_number", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_error_report_timer_value, { "Error Report Timer Value", "trmac.error_report_timer_value", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_authorized_function_classes, { "Authorized Function Classes", "trmac.authorized_function_classes", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_authorized_access_priority, { "Authorized Access Priority", "trmac.authorized_access_priority", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_correlator, { "Correlator", "trmac.correlator", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_sa_of_last_amp_or_smp_frame, { "SA of Last AMP or SMP Frame", "trmac.sa_of_last_amp_or_smp_frame", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_physical_drop_number, { "Physical Drop Number", "trmac.physical_drop_number", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_individual_address_count, { "Individual Address Count", "trmac.individual_address_count", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_station_identifier, { "Station Identifier", "trmac.station_identifier", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_transmit_status_code, { "Transmit Status Code", "trmac.transmit_status_code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_group_address32, { "Group Address", "trmac.group_address", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_group_address_ether, { "Group Address", "trmac.group_address", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_functional_addresses, { "Functional Addresses", "trmac.functional_addresses", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
		{ &hf_trmac_error_code, { "Error Code", "trmac.error_code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},

		};
	static gint *ett[] = {
		&ett_tr_mac,
		&ett_tr_sv,
		&ett_tr_ierr_cnt,
		&ett_tr_nerr_cnt,
	};

	static ei_register_info ei[] = {
		{ &ei_trmac_sv_len, { "trmac.svec.len.invalid", PI_MALFORMED, PI_ERROR, "Invalid length", EXPFILL }},
	};

	expert_module_t* expert_trmac;

	proto_trmac = proto_register_protocol("Token-Ring Media Access Control", "TR MAC", "trmac");
	proto_register_field_array(proto_trmac, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_trmac = expert_register_protocol(proto_trmac);
	expert_register_field_array(expert_trmac, ei, array_length(ei));

	register_dissector("trmac", dissect_trmac, proto_trmac);
}
void proto_register_netdump(void)
{
	module_t *netdump_module;

	/* Setup protocol subtree array */
	static gint *ett[] = {
		&ett_netdump
	};

	static hf_register_info hf[] = {
		{ &hf_netdump_magic_number,
			{ "Netdump Magic Number", "netdump.magic",
			FT_UINT64, BASE_HEX,
			NULL, 0x0,
			NULL, HFILL }
		},
		{ &hf_netdump_seq_nr,
			{"Netdump seq number", "netdump.seq_nr",
			FT_UINT32, BASE_HEX,
			NULL, 0x0,
			NULL, HFILL}
		},
		{ &hf_netdump_command,
			{"Netdump command", "netdump.command",
			FT_UINT32, BASE_DEC,
			VALS(command_names), 0x0,
			NULL, HFILL}
		},
		{ &hf_netdump_from,
			{"Netdump from val", "netdump.from",
			FT_UINT32, BASE_HEX,
			NULL, 0x0,
			NULL, HFILL}
		},
		{ &hf_netdump_to,
			{"Netdump to val", "netdump.to",
			FT_UINT32, BASE_HEX,
			NULL, 0x0,
			NULL, HFILL}
		},
		{ &hf_netdump_code,
			{"Netdump code", "netdump.code",
			FT_UINT32, BASE_DEC,
			VALS(reply_code_names), 0x0,
			NULL, HFILL}
		},
		{ &hf_netdump_info,
			{"Netdump info", "netdump.info",
			FT_UINT32, BASE_HEX,
			NULL, 0x0,
			NULL, HFILL}
		},
		{ &hf_netdump_payload,
			{"Netdump payload", "netdump.payload",
			FT_BYTES, BASE_NONE,
			NULL, 0x0,
			NULL, HFILL}
		},
		{ &hf_netdump_version,
			{"Netdump version", "netdump.version",
			FT_UINT8, BASE_HEX,
			NULL, 0x0,
			NULL, HFILL}
		}
	};

	proto_netdump = proto_register_protocol (
		"Netdump Protocol",	/* name */
		"Netdump",		/* short name */
		"netdump"		/* abbrev */
		);
	proto_register_field_array(proto_netdump, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	netdump_module = prefs_register_protocol(proto_netdump,
		proto_reg_handoff_netdump);

	/* Register a sample port preference   */
	prefs_register_uint_preference(netdump_module, "udp.port",
		"Netdump UDP port",
		"port if other than the default",
		10, &gPORT_PREF);
}
void proto_register_uaudp(void)
{
    module_t *uaudp_module;
    int       i;

    /* Setup list of header fields. See Section 1.6.1 for details */
    static hf_register_info hf_uaudp[] = {
        {
            &hf_uaudp_opcode,
            {
                "Opcode",
                "uaudp.opcode",
                FT_UINT8,
                BASE_DEC | BASE_EXT_STRING,
                &uaudp_opcode_str_ext,
                0x0,
                "UA/UDP Opcode",
                HFILL
            }
        },
        {
            &hf_uaudp_version,
            {
                "Version",
                "uaudp.version",
                FT_UINT8,
                BASE_DEC,
                NULL, 0x0,
                "UA/UDP Version",
                HFILL
            }
        },
        {
            &hf_uaudp_window_size,
            {
                "Window Size",
                "uaudp.window_size",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP Window Size",
                HFILL
            }
        },
        {
            &hf_uaudp_mtu,
            {
                "MTU",
                "uaudp.mtu",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP MTU",
                HFILL
            }
        },
        {
            &hf_uaudp_udp_lost,
            {
                "UDP Lost",
                "uaudp.udp_lost",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP Lost",
                HFILL
            }
        },
        {
            &hf_uaudp_udp_lost_reinit,
            {
                "UDP lost reinit",
                "uaudp.udp_lost_reinit",
                FT_UINT8,
                BASE_DEC,
                NULL, 0x0,
                "UA/UDP Lost Re-Init",
                HFILL
            }
        },
        {
            &hf_uaudp_keepalive,
            {
                "Keepalive",
                "uaudp.keepalive",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP Keepalive",
                HFILL
            }
        },
        {
            &hf_uaudp_qos_ip_tos,
            {
                "QoS IP TOS",
                "uaudp.qos_ip_tos",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP QoS IP TOS",
                HFILL
            }
        },
        {
            &hf_uaudp_qos_8021_vlid,
            {
                "QoS 802.1 VLID",
                "uaudp.qos_8021_vlid",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP QoS 802.1 VLID",
                HFILL
            }
        },
        {
            &hf_uaudp_qos_8021_pri,
            {
                "QoS 802.1 PRI",
                "uaudp.qos_8021_pri",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP QoS 802.1 PRI",
                HFILL
            }
        },
        {
            &hf_uaudp_expseq,
            {
                "Sequence Number (expected)",
                "uaudp.expseq",
                FT_UINT16,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP Expected Sequence Number",
                HFILL
            }
        },
        {
            &hf_uaudp_sntseq,
            {
                "Sequence Number (sent)",
                "uaudp.sntseq",
                FT_UINT16,
                BASE_DEC,
                NULL,
                0x0,
                "UA/UDP Sent Sequence Number",
                HFILL
            }
        },
    };

    /* Setup protocol subtree array */
    static gint *ett[] =
        {
            &ett_uaudp,
        };

    /* Register the protocol name and description */
    proto_uaudp = proto_register_protocol("UA/UDP Encapsulation Protocol",
                          "UAUDP",
                          "uaudp");

    uaudp_handle = register_dissector("uaudp", dissect_uaudp, proto_uaudp);
#if 0 /* XXX: Not used ?? */
    register_dissector("uaudp_dir_unknown",  dissect_uaudp_dir_unknown,  proto_uaudp);
    register_dissector("uaudp_term_to_serv", dissect_uaudp_term_to_serv, proto_uaudp);
    register_dissector("uaudp_serv_to_term", dissect_uaudp_serv_to_term, proto_uaudp);
#endif

    proto_register_field_array(proto_uaudp, hf_uaudp, array_length(hf_uaudp));
    proto_register_subtree_array(ett, array_length(ett));

    /* Register preferences */
    uaudp_module = prefs_register_protocol(proto_uaudp, proto_reg_handoff_uaudp);

#if 0
    prefs_register_bool_preference(uaudp_module, "enable",
                       "Enable UA/UDP decoding based on preferences",
                       "Enable UA/UDP decoding based on preferences",
                       &decode_ua);
#endif
    for (i=0; i<MAX_TERMINAL_PORTS; i++) {
        prefs_register_uint_preference(uaudp_module,
                           ports[i].name,
                           ports[i].text,
                           ports[i].text,
                           10,
                           &ports[i].port);
    }
    prefs_register_string_preference(uaudp_module, "system_ip",
                     "System IP Address (optional)",
                     "IPv4 address of the DHS3 system."
                     " (Used only in case of identical source and destination ports)",
                     &pref_sys_ip_s);

#if 0
    /* Register tap  */
    uaudp_tap = register_tap("uaudp");*/
#endif
}
void
proto_register_cups(void)
{
    static hf_register_info hf[] = {
        { &hf_cups_ptype,
            { "Type",     "cups.ptype", FT_UINT32, BASE_HEX,
              NULL, 0x0, NULL, HFILL }},
        { &hf_cups_ptype_default,
            { "Default printer on network", "cups.ptype.default", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_DEFAULT, NULL, HFILL }},
        { &hf_cups_ptype_implicit,
            { "Class", "cups.ptype.implicit", FT_BOOLEAN, 32,
                TFS(&tfs_implicit_explicit), CUPS_PRINTER_IMPLICIT, NULL, HFILL }},
        { &hf_cups_ptype_variable,
            { "Can print variable sizes", "cups.ptype.variable", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_VARIABLE, NULL, HFILL }},
        { &hf_cups_ptype_large,
            { "Can print up to 36x48 inches", "cups.ptype.large", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_LARGE, NULL, HFILL }},
        { &hf_cups_ptype_medium,
            { "Can print up to 18x24 inches", "cups.ptype.medium", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_MEDIUM, NULL, HFILL }},
        { &hf_cups_ptype_small,
            { "Can print up to 9x14 inches", "cups.ptype.small", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_SMALL, NULL, HFILL }},
        { &hf_cups_ptype_sort,
            { "Can sort", "cups.ptype.sort", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_SORT, NULL, HFILL }},
        { &hf_cups_ptype_bind,
            { "Can bind", "cups.ptype.bind", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_BIND, NULL, HFILL }},
        { &hf_cups_ptype_cover,
            { "Can cover", "cups.ptype.cover", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_COVER, NULL, HFILL }},
        { &hf_cups_ptype_punch,
            { "Can punch holes", "cups.ptype.punch", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_PUNCH, NULL, HFILL }},
        { &hf_cups_ptype_collate,
            { "Can do fast collating", "cups.ptype.collate", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_COLLATE, NULL, HFILL }},
        { &hf_cups_ptype_copies,
            { "Can do fast copies", "cups.ptype.copies", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_COPIES, NULL, HFILL }},
        { &hf_cups_ptype_staple,
            { "Can staple", "cups.ptype.staple", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_STAPLE, NULL, HFILL }},
        { &hf_cups_ptype_duplex,
            { "Can duplex", "cups.ptype.duplex", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_DUPLEX, NULL, HFILL }},
        { &hf_cups_ptype_color,
            { "Can print color", "cups.ptype.color", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_COLOR, NULL, HFILL }},
        { &hf_cups_ptype_bw,
            { "Can print black", "cups.ptype.bw", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_BW, NULL, HFILL }},
        { &hf_cups_ptype_remote,
            { "Remote", "cups.ptype.remote", FT_BOOLEAN, 32,
                TFS(&tfs_yes_no), CUPS_PRINTER_REMOTE, NULL, HFILL }},
        { &hf_cups_ptype_class,
            { "Class", "cups.ptype.class", FT_BOOLEAN, 32,
                TFS(&tfs_printer_class), CUPS_PRINTER_CLASS, NULL, HFILL }},
        { &hf_cups_state,
            { "State",    "cups.state", FT_UINT8, BASE_HEX,
                VALS(cups_state_values), 0x0, NULL, HFILL }}
    };

    static gint *ett[] = {
        &ett_cups,
        &ett_cups_ptype
    };

    proto_cups = proto_register_protocol(
            "Common Unix Printing System (CUPS) Browsing Protocol",
            "CUPS", "cups");
    proto_register_field_array(proto_cups, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
}
/* Register all the bits needed with the filtering engine */
void proto_register_actrace(void)
{
	static hf_register_info hf[] =
		{
			/* CAS */
			{ &hf_actrace_cas_time,
			  { "Time", "actrace.cas.time", FT_INT32, BASE_DEC, NULL, 0x0,
			    "Capture Time", HFILL }},
			{ &hf_actrace_cas_source,
			  { "Source", "actrace.cas.source", FT_INT32, BASE_DEC, VALS(actrace_cas_source_vals), 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_current_state,
			  { "Current State", "actrace.cas.curr_state", FT_INT32, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_event,
			  { "Event", "actrace.cas.event", FT_INT32, BASE_DEC, VALS(actrace_cas_event_vals), 0x0,
			    "New Event", HFILL }},
			{ &hf_actrace_cas_next_state,
			  { "Next State", "actrace.cas.next_state", FT_INT32, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_function,
			  { "Function", "actrace.cas.function", FT_INT32, BASE_DEC, VALS(actrace_cas_function_vals), 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_par0,
			  { "Parameter 0", "actrace.cas.par0", FT_INT32, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_par1,
			  { "Parameter 1", "actrace.cas.par1", FT_INT32, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_par2,
			  { "Parameter 2", "actrace.cas.par2", FT_INT32, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_trunk,
			  { "Trunk Number", "actrace.cas.trunk", FT_INT32, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_bchannel,
			  { "BChannel", "actrace.cas.bchannel", FT_INT32, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_cas_connection_id,
			  { "Connection ID", "actrace.cas.conn_id", FT_INT32, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},

			/* ISDN */
			{ &hf_actrace_isdn_trunk,
			  { "Trunk Number", "actrace.isdn.trunk", FT_INT16, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_isdn_direction,
			  { "Direction", "actrace.isdn.dir", FT_INT32, BASE_DEC, VALS(actrace_isdn_direction_vals), 0x0,
			    NULL, HFILL }},
			{ &hf_actrace_isdn_length,
			  { "Length", "actrace.isdn.length", FT_INT16, BASE_DEC, NULL, 0x0,
			    NULL, HFILL }},
		};

	static gint *ett[] =
		{
			&ett_actrace,
		};

	module_t *actrace_module;

	/* Register protocol */
	proto_actrace = proto_register_protocol("AudioCodes Trunk Trace", "ACtrace", "actrace");
	proto_register_field_array(proto_actrace, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

	/* Register our configuration options */
	actrace_module = prefs_register_protocol(proto_actrace, proto_reg_handoff_actrace);

	prefs_register_uint_preference(actrace_module, "udp_port",
				       "AudioCodes Trunk Trace UDP port",
				       "Set the UDP port for AudioCodes Trunk Traces."
				       "Use http://x.x.x.x/TrunkTraces to enable the traces in the Blade",
				       10, &global_actrace_udp_port);

	prefs_register_obsolete_preference(actrace_module, "display_dissect_tree");

	actrace_tap = register_tap("actrace");
}
Exemple #12
0
void
proto_register_nflog(void)
{
	static hf_register_info hf[] = {
	/* Header */
		{ &hf_nflog_family,
			{ "Family", "nflog.family", FT_UINT8, BASE_DEC, VALS(_linux_family_vals), 0x00, NULL, HFILL }
		},
		{ &hf_nflog_version,
			{ "Version", "nflog.version", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL }
		},
		{ &hf_nflog_resid,
			{ "Resource id", "nflog.res_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }
		},

		{ &hf_nflog_encoding,
			{ "Encoding", "nflog.encoding", FT_UINT32, BASE_HEX, VALS(_encoding_vals), 0x00, NULL, HFILL }
		},

	/* TLV */
		{ &hf_nflog_tlv,
			{ "TLV", "nflog.tlv", FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }
		},
		{ &hf_nflog_tlv_length,
			{ "Length", "nflog.tlv_length", FT_UINT16, BASE_DEC, NULL, 0x00, "TLV Length", HFILL }
		},
		{ &hf_nflog_tlv_type,
			{ "Type", "nflog.tlv_type", FT_UINT16, BASE_DEC, VALS(nflog_tlv_vals), 0x7fff, "TLV Type", HFILL }
		},
	/* TLV values */
		{ &hf_nflog_tlv_prefix,
			{ "Prefix", "nflog.prefix", FT_STRINGZ, BASE_NONE, NULL, 0x00, "TLV Prefix Value", HFILL }
		},
		{ &hf_nflog_tlv_uid,
			{ "UID", "nflog.uid", FT_INT32, BASE_DEC, NULL, 0x00, "TLV UID Value", HFILL }
		},
		{ &hf_nflog_tlv_gid,
			{ "GID", "nflog.gid", FT_INT32, BASE_DEC, NULL, 0x00, "TLV GID Value", HFILL }
		},
		{ &hf_nflog_tlv_timestamp,
			{ "Timestamp", "nflog.timestamp", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, "TLV Timestamp Value", HFILL }
		},
		{ &hf_nflog_tlv_unknown,
			{ "Value", "nflog.tlv_value", FT_BYTES, BASE_NONE, NULL, 0x00, "TLV Value", HFILL }
		},
	};

	static gint *ett[] = {
		&ett_nflog,
		&ett_nflog_tlv
	};

	module_t *pref;

	proto_nflog = proto_register_protocol("Linux Netfilter NFLOG", "NFLOG", "nflog");

	pref = prefs_register_protocol(proto_nflog, NULL);
	prefs_register_enum_preference(pref, "byte_order_type", "Byte Order", "Byte Order",
				       &nflog_byte_order, byte_order_types, FALSE);

	register_dissector("nflog", dissect_nflog, proto_nflog);

	proto_register_field_array(proto_nflog, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

}
Exemple #13
0
void
proto_register_msdp(void)
{
        static hf_register_info hf[] = {
                { &hf_msdp_type,
                        { "Type",           "msdp.type",
                        FT_UINT8, BASE_DEC, VALS(msdp_types), 0,
                        "MSDP TLV type", HFILL }
                },
                { &hf_msdp_length,
                        { "Length",           "msdp.length",
                        FT_UINT16, BASE_DEC, NULL, 0,
                        "MSDP TLV Length", HFILL }
                },
                { &hf_msdp_sa_entry_count,
                        { "Entry Count",           "msdp.sa.entry_count",
                        FT_UINT8, BASE_DEC, NULL, 0,
                        "MSDP SA Entry Count", HFILL }
                },
                { &hf_msdp_sa_rp_addr,
                        { "RP Address",           "msdp.sa.rp_addr",
                        FT_IPv4, BASE_NONE, NULL, 0,
                        "Active source's RP address", HFILL }
                },
                { &hf_msdp_sa_reserved,
                        { "Reserved",           "msdp.sa.reserved",
                        FT_UINT24, BASE_HEX, NULL, 0,
                        "Transmitted as zeros and ignored by a receiver", HFILL }
                },
                { &hf_msdp_sa_sprefix_len,
                        { "Sprefix len",           "msdp.sa.sprefix_len",
                        FT_UINT8, BASE_DEC, NULL, 0,
                        "The route prefix length associated with source address", HFILL }
                },
                { &hf_msdp_sa_group_addr,
                        { "Group Address",           "msdp.sa.group_addr",
                        FT_IPv4, BASE_NONE, NULL, 0,
                        "The group address the active source has sent data to", HFILL }
                },
                { &hf_msdp_sa_src_addr,
                        { "Source Address",           "msdp.sa.src_addr",
                        FT_IPv4, BASE_NONE, NULL, 0,
                        "The IP address of the active source", HFILL }
                },
                { &hf_msdp_sa_req_res,
                        { "Reserved",           "msdp.sa_req.res",
                        FT_UINT8, BASE_HEX, NULL, 0,
                        "Transmitted as zeros and ignored by a receiver", HFILL }
                },
                { &hf_msdp_sa_req_group,
                        { "Group Address",           "msdp.sa_req.group_addr",
                        FT_IPv4, BASE_NONE, NULL, 0,
                        "The group address the MSDP peer is requesting", HFILL }
                },
                { &hf_msdp_not_o,
                        { "Open-bit",           "msdp.not.o",
                        FT_UINT8, BASE_HEX, NULL, 0x80,
                        "If clear, the connection will be closed", HFILL }
                },
                { &hf_msdp_not_error,
                        { "Error Code",           "msdp.not.error",
                        FT_UINT8, BASE_DEC, VALS(error_vals), 0x7F,
                        "Indicates the type of Notification", HFILL }
                },
                { &hf_msdp_not_error_sub,
                        { "Error subode",           "msdp.not.error_sub",
                        FT_UINT8, BASE_DEC, NULL, 0,
                        "Error subcode", HFILL }
                },
                { &hf_msdp_not_ipv4,
                        { "IPv4 address",           "msdp.not.ipv4",
                        FT_IPv4, BASE_NONE, NULL, 0,
                        "Group/RP/Source address in Notification messages", HFILL }
                },
                { &hf_msdp_not_res,
                        { "Reserved",           "msdp.not.res",
                        FT_UINT24, BASE_HEX, NULL, 0,
                        "Reserved field in Notification messages", HFILL }
                },
                { &hf_msdp_not_entry_count,
                        { "Entry Count",           "msdp.not.entry_count",
                        FT_UINT24, BASE_HEX, NULL, 0,
                        "Entry Count in Notification messages", HFILL }
                },
                { &hf_msdp_not_sprefix_len,
                        { "Sprefix len",           "msdp.not.sprefix_len",
                        FT_UINT8, BASE_DEC, NULL, 0,
                        "Source prefix length in Notification messages", HFILL }
                },
        };

        static gint *ett[] = {
                &ett_msdp,
                &ett_msdp_sa_entry,
                &ett_msdp_sa_enc_data,
                &ett_msdp_not_data,
        };

        proto_msdp = proto_register_protocol("Multicast Source Discovery Protocol",
            "MSDP", "msdp");

        proto_register_field_array(proto_msdp, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
}
Exemple #14
0
/* protocol register function */
void
proto_register_tfp(void)
{
    /* defining header formats */
    static hf_register_info hf_tfp[] = {
        {   &hf_tfp_uid,
            {   "UID (String)",
                "tfp.uid",
                FT_STRINGZ,
                BASE_NONE,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_uid_numeric,
            {   "UID (Numeric)",
                "tfp.uid_numeric",
                FT_UINT32,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_len,
            {   "Length",
                "tfp.len",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_fid,
            {   "Function ID",
                "tfp.fid",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_seq,
            {   "Sequence Number",
                "tfp.seq",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_r,
            {   "Response Expected",
                "tfp.r",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_a,
            {   "Authentication",
                "tfp.a",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_oo,
            {   "Other Options",
                "tfp.oo",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_e,
            {   "Error Code",
                "tfp.e",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_future_use,
            {   "Future Use",
                "tfp.future_use",
                FT_UINT8,
                BASE_DEC,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        },
        {   &hf_tfp_payload,
            {   "Payload",
                "tfp.payload",
                FT_BYTES,
                BASE_NONE,
                NULL,
                0x0,
                NULL,
                HFILL
            }
        }
    };

    /* setup protocol subtree array */
    static gint *ett[] = {
        &ett_tfp
    };

    /* defining the protocol and its names */
    proto_tfp = proto_register_protocol (
                    "Tinkerforge Protocol",
                    "TFP",
                    "tfp"
                );

    proto_register_field_array(proto_tfp, hf_tfp, array_length(hf_tfp));
    proto_register_subtree_array(ett, array_length(ett));
}
Exemple #15
0
void
proto_register_docsis_dcd (void)
{
/* Setup list of header fields  See Section 1.6.1 for details*/
  static hf_register_info hf[] = {
    {&hf_docsis_dcd_config_ch_cnt,
      {
      "Configuration Change Count", 
      "docsis_dcd.config_ch_cnt",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_num_of_frag,
      {
      "Number of Fragments", 
      "docsis_dcd.num_of_frag",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_frag_sequence_num,
      {
      "Fragment Sequence Number", 
      "docsis_dcd.frag_sequence_num",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_id,
      {
      "Downstream Classifier Id", 
      "docsis_dcd.cfr_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_rule_pri,
      {
      "Downstream Classifier Rule Priority", 
      "docsis_dcd.cfr_rule_pri",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_ip_source_addr,
      {
      "Downstream Classifier IP Source Address", 
      "docsis_dcd.cfr_ip_source_addr",
      FT_IPv4, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_ip_source_mask,
      {
      "Downstream Classifier IP Source Mask", 
      "docsis_dcd.cfr_ip_source_mask",
      FT_IPv4, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_ip_dest_addr,
      {
      "Downstream Classifier IP Destination Address", 
      "docsis_dcd.cfr_ip_dest_addr",
      FT_IPv4, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_ip_dest_mask,
      {
      "Downstream Classifier IP Destination Mask", 
      "docsis_dcd.cfr_ip_dest_mask",
      FT_IPv4, BASE_NONE, NULL, 0x0,
      "Downstream Classifier IP Destination Address", 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_tcpudp_srcport_start,
      {
      "Downstream Classifier IP TCP/UDP Source Port Start", 
      "docsis_dcd.cfr_ip_tcpudp_srcport_start",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_tcpudp_srcport_end,
      {
      "Downstream Classifier IP TCP/UDP Source Port End", 
      "docsis_dcd.cfr_ip_tcpudp_srcport_end",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_tcpudp_dstport_start,
      {
      "Downstream Classifier IP TCP/UDP Destination Port Start", 
      "docsis_dcd.cfr_ip_tcpudp_dstport_start",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfr_tcpudp_dstport_end,
      {
      "Downstream Classifier IP TCP/UDP Destination Port End", 
      "docsis_dcd.cfr_ip_tcpudp_dstport_end",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_id,
      {
      "DSG Rule Id", 
      "docsis_dcd.rule_id",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_pri,
      {
      "DSG Rule Priority", 
      "docsis_dcd.rule_pri",
      FT_UINT8, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_ucid_list,
      {
      "DSG Rule UCID Range", 
      "docsis_dcd.rule_ucid_list",
      FT_BYTES, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
	{&hf_docsis_dcd_clid_bcast_id,
		{
			"DSG Rule Client ID Broadcast ID",
			"docsis_dcd.clid_bcast_id",
			FT_UINT16, BASE_DEC, NULL, 0x0,
			NULL,
			HFILL
		}
	},
    {&hf_docsis_dcd_clid_known_mac_addr,
      {
      "DSG Rule Client ID Known MAC Address", 
      "docsis_dcd.clid_known_mac_addr",
      FT_ETHER, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_clid_ca_sys_id,
      {
      "DSG Rule Client ID CA System ID", 
      "docsis_dcd.clid_ca_sys_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_clid_app_id,
      {
      "DSG Rule Client ID Application ID", 
      "docsis_dcd.clid_app_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_tunl_addr,
      {
      "DSG Rule Tunnel MAC Address", 
      "docsis_dcd.rule_tunl_addr",
      FT_ETHER, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_cfr_id,
      {
      "DSG Rule Classifier ID", 
      "docsis_dcd.rule_cfr_id",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_rule_vendor_spec,
      {
      "DSG Rule Vendor Specific Parameters", 
      "docsis_dcd.rule_vendor_spec",
      FT_BYTES, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_chan,
      {
      "DSG Configuration Channel", 
      "docsis_dcd.cfg_chan",
      FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_tdsg1,
      {
      "DSG Initialization Timeout (Tdsg1)", 
      "docsis_dcd.cfg_tdsg1",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_tdsg2,
      {
      "DSG Operational Timeout (Tdsg2)", 
      "docsis_dcd.cfg_tdsg2",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_tdsg3,
      {
      "DSG Two-Way Retry Timer (Tdsg3)", 
      "docsis_dcd.cfg_tdsg3",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_tdsg4,
      {
      "DSG One-Way Retry Timer (Tdsg4)", 
      "docsis_dcd.cfg_tdsg4",
      FT_UINT16, BASE_DEC, NULL, 0x0,
      NULL, 
      HFILL
      }
    },
    {&hf_docsis_dcd_cfg_vendor_spec,
      {
      "DSG Configuration Vendor Specific Parameters", 
      "docsis_dcd.cfg_vendor_spec",
      FT_BYTES, BASE_NONE, NULL, 0x0,
      NULL, 
      HFILL
      }
    },

  };

/* Setup protocol subtree array */
  static gint *ett[] = {
    &ett_docsis_dcd,
    &ett_docsis_dcd_cfr,
    &ett_docsis_dcd_cfr_ip,
    &ett_docsis_dcd_rule,
    &ett_docsis_dcd_clid,
    &ett_docsis_dcd_cfg,
  };

/* Register the protocol name and description */
  proto_docsis_dcd =
    proto_register_protocol ("DOCSIS Downstream Channel Descriptor",
			     "DOCSIS DCD", "docsis_dcd");

/* Required function calls to register the header fields and subtrees used */
  proto_register_field_array (proto_docsis_dcd, hf, array_length (hf));
  proto_register_subtree_array (ett, array_length (ett));

  register_dissector ("docsis_dcd", dissect_dcd, proto_docsis_dcd);
}
Exemple #16
0
void
proto_register_ax25_nol3(void)
{
	module_t *ax25_nol3_module;

	/* Setup list of header fields */
#if 0 /* not used ? */
	static hf_register_info hf[] = {
		{ &hf_text,
			{ "Text",			"ax25_nol3.text",
			FT_STRING, BASE_NONE, NULL, 0x0,
			NULL, HFILL }
		},
	};
#endif

	static hf_register_info hf_dx[] = {
		{ &hf_dx_report,
			{ "DX",				"ax25_nol3.dx",
			FT_STRING, BASE_NONE, NULL, 0x0,
			"DX cluster", HFILL }
		},
	};

	/* Setup protocol subtree array */
	static gint *ett[] = {
		&ett_ax25_nol3,
		&ett_dx,
	};

	/* Register the protocol name and description */
	proto_ax25_nol3 = proto_register_protocol("AX.25 no Layer 3", "AX.25 no L3", "ax25_nol3");

	/* Required function calls to register the header fields and subtrees used */
	/* proto_register_field_array( proto_ax25_nol3, hf, array_length(hf ) ); */
	proto_register_subtree_array( ett, array_length( ett ) );

	/* Register preferences module */
	ax25_nol3_module = prefs_register_protocol( proto_ax25_nol3, NULL);

	/* Register any preference */
	prefs_register_bool_preference(ax25_nol3_module, "showaprs",
	     "Decode the APRS info field",
	     "Enable decoding of the payload as APRS.",
	     &gPREF_APRS );

	prefs_register_bool_preference(ax25_nol3_module, "showcluster",
	     "Decode DX cluster info field",
	     "Enable decoding of the payload as DX cluster info.",
	     &gPREF_DX );

	/* Register the sub-protocol name and description */
	proto_dx = proto_register_protocol("DX cluster", "DX", "dx");

	/* Register the dissector */
	register_dissector( "dx", dissect_dx, proto_dx);

	/* Register the header fields */
	proto_register_field_array( proto_dx, hf_dx, array_length( hf_dx ) );

	/* Register the subtrees used */
	/* proto_register_subtree_array( ett_dx, array_length( ett_dx ) ); */
}
Exemple #17
0
void proto_register_ppcap(void)
{

	static hf_register_info hf[] = {
	{ &hf_ppcap_length,
	{ "Length",         "ppcap.length",
		FT_UINT16, BASE_DEC, NULL,   0x00, NULL, HFILL}},
	{ &hf_ppcap_payload_type,
	{ "Payload Type" , "ppcap.payload_type", FT_STRING,
		BASE_NONE, 	NULL, 	0x0    , NULL,    HFILL}},
	{ &hf_ppcap_reserved,
	{ "Reserved",         "ppcap.reserved",    FT_UINT16,
		BASE_DEC,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_address_type,
	{ "Address Type",         "ppcap.address_type",    FT_UINT16,
		BASE_DEC,    VALS(address_type_values),         0x00 , NULL, HFILL}},
#if 0
	{ &hf_ppcap_source_address_type,
	{ "Source Address Type",         "ppcap.source_address_type",    FT_UINT16,
		BASE_DEC,    VALS(address_type_values),         0x00 , NULL, HFILL}},
#endif
	{ &hf_ppcap_ssn,
	{ "SSN",     "ppcap.ssn",   FT_UINT16,
		BASE_DEC,       NULL,   0x00,   NULL,     HFILL}},
       	{ &hf_ppcap_spc,
	{"OPC",     "ppcap.spc",   FT_UINT16,
		BASE_DEC,       NULL,   0x00,   NULL,     HFILL}},
       	{ &hf_ppcap_opc,
	{ "OPC",     "ppcap.opc",   FT_UINT16,
		BASE_DEC,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_source_ip_address1,
	{ "Source IP Addresss",     "ppcap.source_ip_address1",   FT_IPv4,
		BASE_NONE,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_source_ip_address2,
	{ "Source IP Address",     "ppcap.source_ip_address2",   FT_IPv6,
		BASE_NONE,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_destreserved,
	{ "Reserved",         "ppcap.destreserved",    FT_UINT16,
		BASE_DEC,       NULL,   0x00,   NULL,     HFILL}},
#if 0
	{ &hf_ppcap_destination_address_type,
	{ "Destination Address Type",         "ppcap.destination_address_type",    FT_UINT16,
		BASE_DEC,      VALS(address_type_values),   0x00,   NULL,     HFILL}},
#endif
	{ &hf_ppcap_ssn1,
	{ "SSN",     "ppcap.ssn1",   FT_UINT8,
		BASE_DEC,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_spc1,
	{ "DPC",     "ppcap.spc1",   FT_UINT24,
		BASE_DEC,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_dpc,
	{ "DPC",     "ppcap.dpc",   FT_UINT32,
		BASE_DEC,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_destination_ip_address1,
	{ "Destination IP Address",     "ppcap.destination_ip_address1",   FT_IPv4,
		BASE_NONE,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_destination_ip_address2,
	{ "Destination IP Address",     "ppcap.destination_ip_address2",   FT_IPv6,
		BASE_NONE,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_source_nodeid,
	{ "Source Node ID",         "ppcap.source_nodeid",    FT_STRING,
		BASE_NONE,       NULL,   0x00,   NULL,     HFILL}},
	{ &hf_ppcap_destination_nodeid,
	{ "Destination Node ID",         "ppcap.destination_address_value",    FT_STRING,
		BASE_NONE,       NULL,   0x00,   NULL,     HFILL}},
        { &hf_ppcap_info,
	{ "Info",         "ppcap.info",    FT_STRING,
		BASE_NONE,       NULL,   0x0000,   NULL,     HFILL}},
	{ &hf_ppcap_payload_data,
	{ "Payload Data",         "ppcap.payload_data",    FT_BYTES,
		BASE_NONE,       NULL,   0x0000,   NULL,     HFILL}},
	};

	static gint *ett[]= {
		&ett_ppcap,
		&ett_ppcap1,
		&ett_ppcap_new,
	};
	proto_ppcap = proto_register_protocol("Proprietary PCAP", "PPCAP", "ppcap");
	proto_register_field_array(proto_ppcap , hf , array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	register_dissector("ppcap", dissect_ppcap, proto_ppcap);
}
Exemple #18
0
/* Register Wimax Mac Payload Protocol and Dissector */
void proto_register_mac_mgmt_msg_dcd(void)
{
	/* DCD display */
	static hf_register_info hf[] =
	{
		{
			&hf_dcd_message_type,
			{
				"MAC Management Message Type", "wmx.macmgtmsgtype.dcd",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_33_asr,
			{
				"ASR (Anchor Switch Report) Slot Length (M) and Switching Period (L)", "wmx.dcd.asr",
				FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_33_asr_l,
			{
				"ASR Switching Period (L)", "wmx.dcd.asr.l",
				FT_UINT8, BASE_DEC, NULL, 0x0f, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_33_asr_m,
			{
				"ASR Slot Length (M)", "wmx.dcd.asr.m",
				FT_UINT8, BASE_DEC, NULL, 0xf0, NULL, HFILL
			}
		},
		{
			&hf_dcd_bs_eirp,
			{
				"BS EIRP", "wmx.dcd.bs_eirp",
				FT_INT16, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_bs_id,
			{
				"Base Station ID", "wmx.dcd.bs_id",
				FT_ETHER, BASE_NONE, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_restart_count,
			{
				"BS Restart Count", "wmx.dcd.bs_restart_count",
				FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dl_burst_diuc,
			{
				"DIUC", "wmx.dcd.burst.diuc",
				FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL
			}
		},
		{
			&hf_dcd_burst_diuc_entry_threshold,
			{
				"DIUC Minimum Entry Threshold (in 0.25 dB units)", "wmx.dcd.burst.diuc_entry_threshold",
				FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_burst_diuc_exit_threshold,
			{
				"DIUC Mandatory Exit Threshold (in 0.25 dB units)", "wmx.dcd.burst.diuc_exit_threshold",
				FT_FLOAT, BASE_NONE, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_burst_fec,
			{
				"FEC Code Type", "wmx.dcd.burst.fec",
				FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_fec_ofdma), 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_burst_freq,
			{
				"Frequency", "wmx.dcd.burst.freq",
				FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dl_burst_reserved,
			{
				"Reserved", "wmx.dcd.burst.reserved",
				FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL
			}
		},
		{
			&hf_dcd_burst_tcs,
			{
				"TCS", "wmx.dcd.burst.tcs",
				FT_UINT8, BASE_DEC, VALS(vals_dcd_burst_tcs), 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_channel_nr,
			{
				"Channel Nr", "wmx.dcd.channel_nr",
				FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_config_change_count,
			{
				"Configuration Change Count", "wmx.dcd.config_change_count",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements,
			{
				"Default Averaging Parameter for Physical CINR Measurements (in multiples of 1/16)", "wmx.dcd.default_physical_cinr_meas_averaging_parameter",
				FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter,
			{
				"Default RSSI and CINR Averaging Parameter", "wmx.dcd.default_rssi_and_cinr_averaging_parameter",
				FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements,
			{
				"Default Averaging Parameter for RSSI Measurements (in multiples of 1/16)", "wmx.dcd.default_rssi_meas_averaging_parameter",
				FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap,
			{
				"DL AMC Allocated Physical Bands Bitmap", "wmx.dcd.dl_amc_allocated_phy_bands_bitmap",
				FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
			}
		},
		{
			&hf_dcd_dl_burst_profile_diuc,
			{
				"DIUC", "wmx.dcd.dl_burst_profile_diuc",
				FT_UINT8, BASE_DEC, VALS(diuc_msgs), 0x0F, NULL, HFILL
			}
		},
		{
			&hf_dcd_dl_burst_profile_rsv,
			{
				"Reserved", "wmx.dcd.dl_burst_profile_rsv",
				FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL
			}
		},
		{
			&hf_dcd_downlink_channel_id,
			{
				"Reserved", "wmx.dcd.dl_channel_id",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types,
			{
				"Downlink Burst Profile for Multiple FEC Types","wimax.dcd.dl_burst_profile_multiple_fec_types",
				FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_34_dl_region_definition,
			{
				"DL Region Definition", "wmx.dcd.dl_region_definition",
				FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_34_dl_region_definition_num_region,
			{
				"Number of Regions", "wmx.dcd.dl_region_definition.num_region",
				FT_UINT8, BASE_DEC, NULL, 0xFC, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_34_dl_region_definition_num_subchannels,
			{
				"Number of Subchannels", "wmx.dcd.dl_region_definition.num_subchannels",
				FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_34_dl_region_definition_num_symbols,
			{
				"Number of OFDMA Symbols", "wmx.dcd.dl_region_definition.num_symbols",
				FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_34_dl_region_definition_reserved,
			{
				"Reserved", "wmx.dcd.dl_region_definition.reserved",
				FT_UINT8, BASE_DEC, NULL, 0x03, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset,
			{
				"Subchannel Offset", "wmx.dcd.dl_region_definition.subchannel_offset",
				FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_34_dl_region_definition_symbol_offset,
			{
				"OFDMA Symbol Offset", "wmx.dcd.dl_region_definition.symbol_offset",
				FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
#ifndef WIMAX_16D_2004
			{
			&hf_dcd_eirxp,
			{
				"EIRXP (IR, max)", "wmx.dcd.eirxp",
				FT_INT16, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
#endif
		{
			&hf_dcd_frame_duration,
			{
				"Frame Duration", "wmx.dcd.frame_duration",
				FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_frame_duration_code,
			{
				"Frame Duration Code", "wmx.dcd.frame_duration_code",
				FT_UINT8, BASE_HEX, VALS(vals_dcd_frame_duration), 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_frame_nr,
			{
				"Frame Number", "wmx.dcd.frame_nr",
				FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_frequency,
			{
				"Downlink Center Frequency", "wmx.dcd.frequency",
				FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_31_h_add_threshold,
			{
				"H_add Threshold", "wmx.dcd.h_add_threshold",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
#ifdef WIMAX_16D_2004
		{
			&hf_dcd_h_arq_ack_delay,
			{
				"H-ARQ ACK Delay for DL Burst", "wmx.dcd.h_arq_ack_delay_dl_burst",
				FT_UINT8, BASE_DEC, NULL, 0x00, "", HFILL
			}
		},
#else
			{
			&hf_dcd_h_arq_ack_delay,
			{
				"H-ARQ ACK Delay for UL Burst", "wmx.dcd.h_arq_ack_delay_ul_burst",
				FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
#endif
			{
			&hf_dcd_tlv_t_32_h_delete_threshold,
			{
				"H_delete Threshold", "wmx.dcd.h_delete_threshold",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_50_ho_type_support,
			{
				"HO Type Support", "wmx.dcd.ho_type_support",
				FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_50_ho_type_support_fbss_ho,
			{
				"FBSS HO", "wmx.dcd.ho_type_support.fbss_ho",
				FT_UINT8, BASE_HEX, VALS(tfs_support), 0x20, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_50_ho_type_support_ho,
			{
				"HO", "wmx.dcd.ho_type_support.ho",
				FT_UINT8, BASE_HEX, VALS(tfs_support), 0x80, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_50_ho_type_support_mdho,
			{
				"MDHO", "wmx.dcd.ho_type_support.mdho",
				FT_UINT8, BASE_HEX, VALS(tfs_support), 0x40, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_50_ho_type_support_reserved,
			{
				"Reserved", "wmx.dcd.ho_type_support.reserved",
				FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_51_hysteresis_margin,
			{
				"Hysteresis Margin", "wmx.dcd.hysteresis_margin",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
		{
			&hf_dcd_invalid_tlv,
			{
				"Invalid TLV", "wmx.dcd.invalid_tlv",
				FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL
			}
		},
		{
			&hf_dcd_mac_version,
			{
				"MAC Version", "wmx.dcd.mac_version",
				FT_UINT8, BASE_DEC, VALS(vals_dcd_mac_version), 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_20_maximum_retransmission,
			{
				"Maximum Retransmission", "wmx.dcd.maximum_retransmission",
				FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_60_noise_interference,
			{
				"Noise and Interference", "wmx.dcd.noise_interference",
				FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_35_paging_group_id,
			{
				"Paging Group ID", "wmx.dcd.paging_group_id",
				FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL
			}
		},
		{
			&hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap,
			{
				"TUSC1 permutation active subchannels bitmap", "wmx.dcd.tusc1",
				FT_UINT16, BASE_HEX, NULL, 0xFF80, NULL, HFILL
			}
		},
		{
			&hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap,
			{
				"TUSC2 permutation active subchannels bitmap", "wmx.dcd.tusc2",
				FT_UINT16, BASE_HEX, NULL, 0xFFF8, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_45_paging_interval_length,
			{
				"Paging Interval Length", "wmx.dcd.paging_interval_length",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone,
			{
				"Permutation Type for Broadcast Region in HARQ Zone", "wmx.dcd.permutation_type_broadcast_region_in_harq_zone",
				FT_UINT8, BASE_DEC, VALS(vals_dcd_permutation_type), 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_phy_type,
			{
				"PHY Type", "wmx.dcd.phy_type",
				FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
		{
			&hf_dcd_power_adjustment,
			{
				"Power Adjustment Rule", "wmx.dcd.power_adjustment",
				FT_UINT8, BASE_HEX, VALS(vals_dcd_power_adjustmnt), 0x00, NULL, HFILL
			}
		},
#ifdef WIMAX_16D_2004
		{
			&hf_dcd_rss,
			{
				"RSS (IR, max)", "wmx.dcd.rss",
				FT_INT16, BASE_DEC, NULL, 0x00, "", HFILL
			}
		},
#endif
		{
			&hf_dcd_rtg,
			{
				"RTG", "wmx.dcd.rtg",
				FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
#ifdef WIMAX_16D_2004
		{
			&hf_dcd_size_cqich_id,
			{
				"Size of CQICH-ID Field", "wmx.dcd.size_cqich_id",
				FT_UINT8, BASE_DEC, VALS(vals_dcd_size_of_cqich_id), 0x00, "", HFILL
			}
		},
#endif
		{
			&hf_dcd_channel_switch_frame_nr,
			{
				"Channel Switch Frame Number", "wmx.dcd.switch_frame",
				FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_52_time_to_trigger_duration,
			{
				"Time to Trigger Duration", "wmx.dcd.time_trigger_duration",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_543_trigger_averaging_duration,
			{
				"Trigger Averaging Duration", "wmx.dcd.trigger_averaging_duration",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_542_trigger_value,
			{
				"Trigger Value", "wmx.dcd.trigger_value",
				FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
			}
		},
		{
			&hf_dcd_ttg,
			{
				"TTG", "wmx.dcd.ttg",
				FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_541_type_function_action,
			{
				"Type/Function/Action", "wmx.dcd.type_function_action",
				FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_541_action,
			{
				"Action", "wmx.dcd.type_function_action.action",
				FT_UINT8, BASE_HEX, VALS(vals_dcd_action), 0x7, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_541_function,
			{
				"Function", "wmx.dcd.type_function_action.function",
				FT_UINT8, BASE_HEX, VALS(vals_dcd_function), 0x38, NULL, HFILL
			}
		},
			{
			&hf_dcd_tlv_t_541_type,
			{
				"Type", "wmx.dcd.type_function_action.type",
				FT_UINT8, BASE_HEX, VALS(vals_dcd_type), 0xC0, NULL, HFILL
			}
		},
		{
			&hf_dcd_unknown_type,
			{
				"Unknown DCD Type", "wmx.dcd.unknown_tlv_value",
				FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
			}
		}
	};

	/* Setup protocol subtree array */
	static gint *ett[] =
		{
			&ett_mac_mgmt_msg_dcd_decoder,
		};

	proto_mac_mgmt_msg_dcd_decoder = proto_register_protocol (
		"WiMax DCD/UCD Messages", /* name       */
		"WiMax DCD/UCD (cd)",     /* short name */
		"wmx.cd"                  /* abbrev     */
		);

	proto_register_field_array(proto_mac_mgmt_msg_dcd_decoder, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
}
void
proto_register_openais_a(void)
{
    /* Setup list of fields */
    static hf_register_info hf[] = {
        {   &hf_openais_a_header,
            {   "Header", "openais_a.header",
                FT_NONE, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_header_size,
            {   "Size", "openais_a.header.size",
                FT_INT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_header_size_padding,
            {   "Padding", "openais_a.header.size_padding",
                FT_INT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_header_id,
            {   "Id", "openais_a.header.id",
                FT_NONE, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_header_id_service,
            {   "Service", "openais_a.header.id.service",
                FT_INT16, BASE_DEC, VALS(vals_openais_a_service), 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_header_id_fn_id,
            {   "Function index", "openais_a.header.id.fn_id",
                FT_INT16, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_header_id_padding,
            {   "Padding", "openais_a.header.id_padding",
                FT_INT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_mar_message_source,
            {   "Message source", "openais_a.mar_message_source",
                FT_NONE, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_mar_message_source_nodeid,
            {   "Node id", "openais_a.mar_message_source.nodeid",
                FT_UINT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_mar_message_source_nodeid_padding,
            {   "Padding", "openais_a.mar_message_source.nodeid_padding",
                FT_UINT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_mar_message_source_conn,
            {   "Pointer to connection object", "openais_a.mar_message_source.conn",
                FT_UINT64, BASE_HEX, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_openais_a_mar_name,
            {   "Mar name", "openais_a.mar_name",
                FT_NONE, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_mar_name_length,
            {   "Mar name length", "openais_a.mar_name.length",
                FT_UINT16, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_mar_name_length_padding,
            {   "Padding", "openais_a.mar_name.length_padding",
                FT_UINT64, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_mar_name_value,
            {   "Mar name value", "openais_a.mar_name.value",
                FT_STRING, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },
        {   &hf_openais_a_mar_name_value_padding,
            {   "Padding", "openais_a.mar_name.value_padding",
                FT_BYTES, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },
    };

    static gint *ett[] = {
        &ett_openais_a,
        &ett_openais_a_header,
        &ett_openais_a_header_id,
        &ett_openais_a_mar_message_source,
        &ett_openais_a_mar_name,
    };

    proto_openais_a
        = proto_register_protocol("Protocol used in \"a\" group running on OpenAIS",
                                  "OPENAIS/A", "openais_a");

    proto_register_field_array(proto_openais_a, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));


    subdissector_table = register_dissector_table("openais_a.header.id.service",
                         "The service id",
                         FT_UINT16, BASE_DEC);
}
void
proto_register_fcsp(void)
{
    /* Setup list of header fields  See Section 1.6.1 for details*/
    static hf_register_info hf[] = {
        { &hf_auth_proto_ver,
          { "Protocol Version", "fcsp.version",
            FT_UINT8, BASE_HEX, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_msg_code,
          { "Message Code", "fcsp.opcode",
            FT_UINT8, BASE_HEX, VALS(fcauth_msgcode_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_flags,
          { "Flags", "fcsp.flags",
            FT_UINT8, BASE_HEX, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_len,
          { "Packet Length", "fcsp.len",
            FT_UINT32, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_tid,
          { "Transaction Identifier", "fcsp.tid",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_initiator_wwn,
          { "Initiator Name (WWN)", "fcsp.initwwn",
            FT_STRING, BASE_NONE, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_initiator_name,
          { "Initiator Name (Unknown Type)", "fcsp.initname",
            FT_BYTES, BASE_NONE, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_initiator_name_type,
          { "Initiator Name Type", "fcsp.initnametype",
            FT_UINT16, BASE_HEX, VALS(fcauth_name_type_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_initiator_name_len,
          { "Initiator Name Length", "fcsp.initnamelen",
            FT_UINT16, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_usable_proto,
          { "Number of Usable Protocols", "fcsp.usableproto",
            FT_UINT32, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_rjt_code,
          { "Reason Code", "fcsp.rjtcode",
            FT_UINT8, BASE_DEC, VALS(fcauth_rjtcode_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_rjt_codedet,
          { "Reason Code Explanation", "fcsp.rjtcodet",
            FT_UINT8, BASE_DEC, VALS(fcauth_rjtcode_detail_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_responder_wwn,
          { "Responder Name (WWN)", "fcsp.rspwwn",
            FT_STRING, BASE_NONE, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_responder_name,
          { "Responder Name (Unknown Type)", "fcsp.rspname",
            FT_BYTES, BASE_NONE, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_responder_name_type,
          { "Responder Name Type", "fcsp.rspnametype",
            FT_UINT16, BASE_HEX, VALS(fcauth_name_type_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_responder_name_len,
          { "Responder Name Type", "fcsp.rspnamelen",
            FT_UINT16, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

#if 0
        { &hf_auth_dhchap_hashid,
          { "Hash Identifier", "fcsp.dhchap.hashid",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            NULL, HFILL}},
#endif

#if 0
        { &hf_auth_dhchap_groupid,
          { "DH Group Identifier", "fcsp.dhchap.groupid",
            FT_UINT32, BASE_HEX, NULL, 0x0,
            NULL, HFILL}},
#endif

        { &hf_auth_dhchap_chal_len,
          { "Challenge Value Length", "fcsp.dhchap.challen",
            FT_UINT32, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_val_len,
          { "DH Value Length", "fcsp.dhchap.vallen",
            FT_UINT32, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_rsp_len,
          { "Response Value Length", "fcsp.dhchap.rsplen",
            FT_UINT32, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_proto_type,
          { "Authentication Protocol Type", "fcsp.proto",
            FT_UINT32, BASE_DEC, VALS(fcauth_proto_type_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_proto_param_len,
          { "Protocol Parameters Length", "fcsp.protoparamlen",
            FT_UINT32, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_param_tag,
          { "Parameter Tag", "fcsp.dhchap.paramtype",
            FT_UINT16, BASE_HEX, VALS(fcauth_dhchap_param_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_param_len,
          { "Parameter Length", "fcsp.dhchap.paramlen",
            FT_UINT16, BASE_DEC, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_hash_type,
          { "Hash Algorithm", "fcsp.dhchap.hashtype",
            FT_UINT32, BASE_DEC, VALS(fcauth_dhchap_hash_algo_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_group_type,
          { "DH Group", "fcsp.dhchap.dhgid",
            FT_UINT32, BASE_DEC, VALS(fcauth_dhchap_dhgid_vals), 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_chal_value,
          { "Challenge Value", "fcsp.dhchap.chalval",
            FT_BYTES, BASE_NONE, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_dhvalue,
          { "DH Value", "fcsp.dhchap.dhvalue",
            FT_BYTES, BASE_NONE, NULL, 0x0,
            NULL, HFILL}},

        { &hf_auth_dhchap_rsp_value,
          { "Response Value", "fcsp.dhchap.rspval",
            FT_BYTES, BASE_NONE, NULL, 0x0,
            NULL, HFILL}},
    };


    /* Setup protocol subtree array */
    static gint *ett[] = {
        &ett_fcsp,
    };

    /* Register the protocol name and description */
    proto_fcsp = proto_register_protocol("Fibre Channel Security Protocol",
                                           "FC-SP", "fcsp");

    register_dissector("fcsp", dissect_fcsp, proto_fcsp);

    proto_register_field_array(proto_fcsp, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
}
Exemple #21
0
void
proto_register_who(void)
{
	static hf_register_info hf[] = {
		{ &hf_who_vers,
		{ "Version",	"who.vers", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_type,
		{ "Type",	"who.type", FT_UINT8, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_sendtime,
		{ "Send Time",	"who.sendtime", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_recvtime,
		{ "Receive Time", "who.recvtime", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_hostname,
		{ "Hostname", "who.hostname", FT_STRING, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_loadav_5,
		{ "Load Average Over Past  5 Minutes", "who.loadav_5", FT_DOUBLE, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_loadav_10,
		{ "Load Average Over Past 10 Minutes", "who.loadav_10", FT_DOUBLE, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_loadav_15,
		{ "Load Average Over Past 15 Minutes", "who.loadav_15", FT_DOUBLE, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_boottime,
		{ "Boot Time", "who.boottime", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_whoent,
		{ "Who utmp Entry", "who.entry", FT_NONE, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_tty,
		{ "TTY Name", "who.tty", FT_STRING, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_uid,
		{ "User ID", "who.uid", FT_STRING, BASE_NONE, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_timeon,
		{ "Time On", "who.timeon", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
			NULL, HFILL }},

		{ &hf_who_idle,
		{ "Time Idle", "who.idle", FT_UINT32, BASE_DEC, NULL, 0x0,
			NULL, HFILL }},
	};

	static gint *ett[] = {
		&ett_who,
		&ett_whoent,
	};

	proto_who = proto_register_protocol("Who", "WHO", "who");
	proto_register_field_array(proto_who, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
}
void proto_register_auto_rp(void)
{
    static hf_register_info hf[] = {
        {   &hf_auto_rp_version,
            {   "Protocol version", "auto_rp.version",
                FT_UINT8, BASE_DEC, VALS(auto_rp_ver_vals), AUTO_RP_VERSION_MASK,
                "Auto-RP protocol version", HFILL
            }
        },

        {   &hf_auto_rp_type,
            {   "Packet type", "auto_rp.type",
                FT_UINT8, BASE_DEC, VALS(auto_rp_type_vals), AUTO_RP_TYPE_MASK,
                "Auto-RP packet type", HFILL
            }
        },

        {   &hf_auto_rp_count,
            {   "RP count", "auto_rp.rp_count",
                FT_UINT8, BASE_DEC, NULL, 0,
                "The number of RP addresses contained in this message", HFILL
            }
        },

        {   &hf_auto_rp_group_num,
            {   "Number of groups this RP maps to", "auto_rp.group_num",
                FT_UINT8, BASE_DEC, NULL, 0,
                NULL, HFILL
            }
        },

        {   &hf_auto_rp_holdtime,
            {   "Holdtime", "auto_rp.holdtime",
                FT_UINT16, BASE_DEC, NULL, 0,
                "The amount of time in seconds this announcement is valid", HFILL
            }
        },

        {   &hf_auto_rp_pim_ver,
            {   "Version", "auto_rp.pim_ver",
                FT_UINT8, BASE_DEC, VALS(auto_rp_pim_ver_vals), AUTO_RP_PIM_VER_MASK,
                "RP's highest PIM version", HFILL
            }
        },

        {   &hf_auto_rp_rp_addr,
            {   "RP address", "auto_rp.rp_addr",
                FT_IPv4, BASE_NONE, NULL, 0,
                "The unicast IP address of the RP", HFILL
            }
        },

        {   &hf_auto_rp_prefix_sgn,
            {   "Sign", "auto_rp.prefix_sign",
                FT_UINT8, BASE_DEC, VALS(auto_rp_mask_sign_vals), AUTO_RP_SIGN_MASK,
                "Group prefix sign", HFILL
            }
        },

        {   &hf_auto_rp_mask_len,
            {   "Mask length", "auto_rp.mask_len",
                FT_UINT8, BASE_DEC, NULL, 0x0,
                "Length of group prefix", HFILL
            }
        },

        {   &hf_auto_rp_group_prefix,
            {   "Prefix", "auto_rp.group_prefix",
                FT_IPv4, BASE_NONE, NULL, 0,
                "Group prefix", HFILL
            }
        },

        {   &hf_auto_rp_reserved,
            {   "Reserved", "auto_rp.reserved",
                FT_UINT32, BASE_HEX, NULL, 0,
                NULL, HFILL
            }
        },

        {   &hf_auto_rp_trailing_junk,
            {   "Trailing junk", "auto_rp.trailing_junk",
                FT_BYTES, BASE_NONE, NULL, 0,
                NULL, HFILL
            }
        },
    };

    static gint *ett[] = {
        &ett_auto_rp,
        &ett_auto_rp_ver_type,
        &ett_auto_rp_map,
        &ett_auto_rp_group
    };

    proto_auto_rp = proto_register_protocol("Cisco Auto-RP",
                                            "Auto-RP", "auto_rp");
    proto_register_field_array(proto_auto_rp, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    return;
}
Exemple #23
0
/* Register the protocol with Wireshark */
void
proto_register_mrp_mvrp(void)
{
    static hf_register_info hf[] = {
        { &hf_mvrp_proto_id,
            { "Protocol Version",      "mrp-mvrp.protocol_version",
              FT_UINT8,  BASE_DEC, NULL, 0x0, NULL, HFILL }
        },
        { &hf_mvrp_message, /* Message is a group of fields */
            { "Message",               "mrp-mvrp.message",
              FT_NONE,  BASE_NONE, NULL, 0x0, NULL, HFILL }
        },
        { &hf_mvrp_attribute_type,
            { "Attribute Type",        "mrp-mvrp.attribute_type",
              FT_UINT8,  BASE_DEC, VALS(attribute_type_vals), 0x0, NULL, HFILL }
        },
        { &hf_mvrp_attribute_length,
            { "Attribute Length",      "mrp-mvrp.attribute_length",
              FT_UINT8,  BASE_DEC, NULL, 0x0, NULL, HFILL }
        },
        { &hf_mvrp_attribute_list, /* AttributeList is a group of fields */
            { "Attribute List",        "mrp-mvrp.attribute_list",
              FT_NONE,  BASE_NONE, NULL, 0x0, NULL, HFILL }
        },
        { &hf_mvrp_vector_attribute, /* VectorAttribute is a group of fields */
            { "Vector Attribute",      "mrp-mvrp.vector_attribute",
              FT_NONE,  BASE_NONE, NULL, 0x0, NULL, HFILL }
        },
        { &hf_mvrp_vector_header,
            { "Vector Header",         "mrp-mvrp.vector_header",
              FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
        },
        { &hf_mvrp_leave_all_event,
            { "Leave All Event",       "mrp-mvrp.leave_all_event",
              FT_UINT16, BASE_DEC, VALS(leave_all_vals), MVRP_LEAVE_ALL_EVENT_MASK, NULL, HFILL }
        },
        { &hf_mvrp_number_of_values,
            { "Number of Values",      "mrp-mvrp.number_of_values",
              FT_UINT16, BASE_DEC, NULL, MVRP_NUMBER_OF_VALUES_MASK, NULL, HFILL }
        },
        { &hf_mvrp_first_value, /* FirstValue is a group of fields */
            { "First Value",           "mrp-mvrp.first_value",
              FT_NONE,  BASE_NONE, NULL, 0x0, NULL, HFILL }
        },
        { &hf_mvrp_vid,
            { "VLAN ID",               "mrp-mvrp.vid",
              FT_UINT16, BASE_DEC,  NULL, 0x0, NULL, HFILL }
        },
        { &hf_mvrp_three_packed_event,
            { "Attribute Event",       "mrp-mvrp.three_packed_event",
              FT_UINT8, BASE_DEC,  VALS(three_packed_vals), 0x0, NULL, HFILL }
        },
        { &hf_mvrp_end_mark,
            { "End Mark",              "mrp-mvrp.end_mark",
              FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }
        },
    };

    /* Setup protocol subtree array */
    static gint *ett[] = {
        &ett_mvrp,
        &ett_msg,
        &ett_attr_list,
        &ett_vect_attr,
        &ett_vector_header,
        &ett_first_value
    };

    /* Register the protocol name and description */
    proto_mvrp = proto_register_protocol("Multiple VLAN Registration Protocol",
                                         "MRP-MVRP", "mrp-mvrp");

    /* Required function calls to register the header fields and subtrees used */
    proto_register_field_array(proto_mvrp, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
}
Exemple #24
0
void
proto_register_sdh(void)
{
  static hf_register_info hf[] = {
    { &hf_sdh_a1,
    { "A1", "sdh.a1", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_a2,
    { "A2", "sdh.a2", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_j0,
    { "J0", "sdh.j0", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_b1,
    { "B1", "sdh.b1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_e1,
    { "E1", "sdh.e1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_f1,
    { "F1", "sdh.f1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d1,
    { "D1", "sdh.d1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d2,
    { "D2", "sdh.d2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d3,
    { "D3", "sdh.d3", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_au,
    { "AU", "sdh.au", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_b2,
    { "B2", "sdh.b2", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_k1,
    { "K1", "sdh.k1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_k2,
    { "K2", "sdh.k2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d4,
    { "D4", "sdh.d4", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d5,
    { "D5", "sdh.d5", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d6,
    { "D6", "sdh.d6", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d7,
    { "D7", "sdh.d7", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d8,
    { "D8", "sdh.d8", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d9,
    { "D9", "sdh.d9", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d10,
    { "D10", "sdh.d10", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d11,
    { "D11", "sdh.d11", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_d12,
    { "D12", "sdh.d12", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_s1,
    { "S1", "sdh.s1", FT_UINT8, BASE_HEX, VALS(sdh_s1_vals), 0x0, NULL, HFILL }},
    { &hf_sdh_m1,
    { "M1", "sdh.m1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_e2,
    { "E2", "sdh.e2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_j1,
    { "J1", "sdh.j1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_h1,
    { "H1", "sdh.h1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
    { &hf_sdh_h2,
    { "H2", "sdh.h2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},

  };
  static gint *ett[] = {
    &ett_sdh,
  };

  module_t *sdh_module;


  proto_sdh = proto_register_protocol("SDH/SONET Protocol", "SDH", "sdh");
  proto_register_field_array(proto_sdh, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  sdh_module = prefs_register_protocol(proto_sdh, NULL);
  prefs_register_enum_preference(sdh_module, "data.rate",
    "Data rate",
    "Data rate",
    &sdh_data_rate, data_rates, ENC_BIG_ENDIAN);

  register_dissector("sdh", dissect_sdh, proto_sdh);
}
Exemple #25
0
void
proto_register_udp(void)
{
    module_t *udp_module;
    module_t *udplite_module;

    static hf_register_info hf[] = {
        {   &hf_udp_srcport,
            {   "Source Port",	"udp.srcport", FT_UINT16, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_dstport,
            {   "Destination Port",	"udp.dstport", FT_UINT16, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_port,
            {   "Source or Destination Port",	"udp.port", FT_UINT16, BASE_DEC,  NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_length,
            {   "Length",		"udp.length", FT_UINT16, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_checksum,
            {   "Checksum",		"udp.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
                "Details at: http://www.wireshark.org/docs/wsug_html_chunked/ChAdvChecksums.html", HFILL
            }
        },

        {   &hf_udp_checksum_good,
            {   "Good Checksum",	"udp.checksum_good", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "True: checksum matches packet content; False: doesn't match content or not checked", HFILL
            }
        },

        {   &hf_udp_checksum_bad,
            {   "Bad Checksum",	"udp.checksum_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                "True: checksum doesn't match packet content; False: matches content or not checked", HFILL
            }
        },

        {   &hf_udp_proc_src_uid,
            {   "Source process user ID", "udp.proc.srcuid", FT_UINT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_proc_src_pid,
            {   "Source process ID", "udp.proc.srcpid", FT_UINT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_proc_src_uname,
            {   "Source process user name", "udp.proc.srcuname", FT_STRING, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_proc_src_cmd,
            {   "Source process name", "udp.proc.srccmd", FT_STRING, BASE_NONE, NULL, 0x0,
                "Source process command name", HFILL
            }
        },

        {   &hf_udp_proc_dst_uid,
            {   "Destination process user ID", "udp.proc.dstuid", FT_UINT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_proc_dst_pid,
            {   "Destination process ID", "udp.proc.dstpid", FT_UINT32, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_proc_dst_uname,
            {   "Destination process user name", "udp.proc.dstuname", FT_STRING, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udp_proc_dst_cmd,
            {   "Destination process name", "udp.proc.dstcmd", FT_STRING, BASE_NONE, NULL, 0x0,
                "Destination process command name", HFILL
            }
        }
    };

    static hf_register_info hf_lite[] = {
        {   &hf_udplite_checksum_coverage_bad,
            {   "Bad Checksum coverage",	"udp.checksum_coverage_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
                NULL, HFILL
            }
        },

        {   &hf_udplite_checksum_coverage,
            {   "Checksum coverage",	"udp.checksum_coverage", FT_UINT16, BASE_DEC, NULL, 0x0,
                NULL, HFILL
            }
        }
    };

    static gint *ett[] = {
        &ett_udp,
        &ett_udp_checksum,
        &ett_udp_process_info
    };

    proto_udp = proto_register_protocol("User Datagram Protocol",
                                        "UDP", "udp");
    register_dissector("udp", dissect_udp, proto_udp);
    proto_udplite = proto_register_protocol("Lightweight User Datagram Protocol",
                                            "UDPlite", "udplite");
    proto_register_field_array(proto_udp, hf, array_length(hf));
    proto_register_field_array(proto_udplite, hf_lite, array_length(hf_lite));
    proto_register_subtree_array(ett, array_length(ett));

    /* subdissector code */
    udp_dissector_table = register_dissector_table("udp.port",
                          "UDP port", FT_UINT16, BASE_DEC);
    register_heur_dissector_list("udp", &heur_subdissector_list);
    register_heur_dissector_list("udplite", &heur_subdissector_list);

    /* Register configuration preferences */
    udp_module = prefs_register_protocol(proto_udp, NULL);
    prefs_register_bool_preference(udp_module, "summary_in_tree",
                                   "Show UDP summary in protocol tree",
                                   "Whether the UDP summary line should be shown in the protocol tree",
                                   &udp_summary_in_tree);
    prefs_register_bool_preference(udp_module, "try_heuristic_first",
                                   "Try heuristic sub-dissectors first",
                                   "Try to decode a packet using an heuristic sub-dissector before using a sub-dissector registered to a specific port",
                                   &try_heuristic_first);
    prefs_register_bool_preference(udp_module, "check_checksum",
                                   "Validate the UDP checksum if possible",
                                   "Whether to validate the UDP checksum",
                                   &udp_check_checksum);
    prefs_register_bool_preference(udp_module, "process_info",
                                   "Collect process flow information",
                                   "Collect process flow information from IPFIX",
                                   &udp_process_info);

    udplite_module = prefs_register_protocol(proto_udplite, NULL);
    prefs_register_bool_preference(udplite_module, "ignore_checksum_coverage",
                                   "Ignore UDPlite checksum coverage",
                                   "Ignore an invalid checksum coverage field and continue dissection",
                                   &udplite_ignore_checksum_coverage);
    prefs_register_bool_preference(udplite_module, "check_checksum",
                                   "Validate the UDPlite checksum if possible",
                                   "Whether to validate the UDPlite checksum",
                                   &udplite_check_checksum);
}
/*--- proto_register_rtse -------------------------------------------*/
void proto_register_rtse(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
    /* Fragment entries */
    { &hf_rtse_segment_data,
      { "RTSE segment data", "rtse.segment", FT_NONE, BASE_NONE,
	NULL, 0x00, NULL, HFILL } },
    { &hf_rtse_fragments,
      { "RTSE fragments", "rtse.fragments", FT_NONE, BASE_NONE,
	NULL, 0x00, NULL, HFILL } },
    { &hf_rtse_fragment,
      { "RTSE fragment", "rtse.fragment", FT_FRAMENUM, BASE_NONE,
	NULL, 0x00, NULL, HFILL } },
    { &hf_rtse_fragment_overlap,
      { "RTSE fragment overlap", "rtse.fragment.overlap", FT_BOOLEAN,
	BASE_NONE, NULL, 0x0, NULL, HFILL } },
    { &hf_rtse_fragment_overlap_conflicts,
      { "RTSE fragment overlapping with conflicting data",
	"rtse.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE,
	NULL, 0x0, NULL, HFILL } },
    { &hf_rtse_fragment_multiple_tails,
      { "RTSE has multiple tail fragments",
	"rtse.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE,
	NULL, 0x0, NULL, HFILL } },
    { &hf_rtse_fragment_too_long_fragment,
      { "RTSE fragment too long", "rtse.fragment.too_long_fragment",
	FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
    { &hf_rtse_fragment_error,
      { "RTSE defragmentation error", "rtse.fragment.error", FT_FRAMENUM,
	BASE_NONE, NULL, 0x00, NULL, HFILL } },
    { &hf_rtse_fragment_count,
      { "RTSE fragment count", "rtse.fragment.count", FT_UINT32, BASE_DEC,
	NULL, 0x00, NULL, HFILL } },
    { &hf_rtse_reassembled_in,
      { "Reassembled RTSE in frame", "rtse.reassembled.in", FT_FRAMENUM, BASE_NONE,
	NULL, 0x00, "This RTSE packet is reassembled in this frame", HFILL } },
    { &hf_rtse_reassembled_length,
      { "Reassembled RTSE length", "rtse.reassembled.length", FT_UINT32, BASE_DEC,
	NULL, 0x00, "The total length of the reassembled payload", HFILL } },

#include "packet-rtse-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_rtse,
    &ett_rtse_unknown,
    &ett_rtse_fragment,
    &ett_rtse_fragments,
#include "packet-rtse-ettarr.c"
  };

  static ei_register_info ei[] = {
     { &ei_rtse_dissector_oid_not_implemented, { "rtse.dissector_oid_not_implemented", PI_UNDECODED, PI_WARN, "RTSE: Dissector for OID not implemented", EXPFILL }},
     { &ei_rtse_unknown_rtse_pdu, { "rtse.unknown_rtse_pdu", PI_UNDECODED, PI_WARN, "Unknown RTSE PDU", EXPFILL }},
  };

  expert_module_t* expert_rtse;
  module_t *rtse_module;

  /* Register protocol */
  proto_rtse = proto_register_protocol(PNAME, PSNAME, PFNAME);
  new_register_dissector("rtse", dissect_rtse, proto_rtse);
  /* Register fields and subtrees */
  proto_register_field_array(proto_rtse, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
  expert_rtse = expert_register_protocol(proto_rtse);
  expert_register_field_array(expert_rtse, ei, array_length(ei));
  register_init_routine (&rtse_reassemble_init);
  rtse_module = prefs_register_protocol_subtree("OSI", proto_rtse, NULL);

  prefs_register_bool_preference(rtse_module, "reassemble",
				 "Reassemble segmented RTSE datagrams",
				 "Whether segmented RTSE datagrams should be reassembled."
				 " To use this option, you must also enable"
				 " \"Allow subdissectors to reassemble TCP streams\""
				 " in the TCP protocol settings.", &rtse_reassemble);

  rtse_oid_dissector_table = register_dissector_table("rtse.oid", "RTSE OID Dissectors", FT_STRING, BASE_NONE);
  oid_table=g_hash_table_new(g_str_hash, g_str_equal);


}
Exemple #27
0
void
proto_register_eiss(void)
{

	static hf_register_info hf[] = {
		{ &hf_eiss_reserved2, {
			"Reserved", "eiss.reserved",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_section_number, {
			"Section Number", "eiss.sect_num",
			FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_last_section_number, {
			"Last Section Number", "eiss.last_sect_num",
			FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_protocol_version_major, {
			"Major Version Number", "eiss.version_major",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_protocol_version_minor, {
			"Minor Version Number", "eiss.version_minor",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_application_type, {
			"Application Type", "eiss.app_type",
			FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_organisation_id, {
			"Organisation Id", "eiss.org_id",
			FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_application_id, {
			"Application Id", "eiss.app_id",
			FT_UINT16, BASE_HEX|BASE_RANGE_STRING, RVALS(application_id_values), 0, NULL, HFILL
		} },

		{ &hf_eiss_platform_id_length, {
			"Platform Id Length", "eiss.platform_id_length",
			FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtHWManufacturer, {
			"Platform Hardware Manufacturer", "eiss.plat_hw_man",
			FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtHWModel, {
			"Platform Hardware Model", "eiss.plat_hw_model",
			FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtHWVersionMajor, {
			"Platform Hardware Major Version", "eiss.plat_hw_major",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtHWVersionMinor, {
			"Platform Hardware Minor Version", "eiss.plat_hw_minor",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtSWManufacturer, {
			"Platform Software Manufacturer", "eiss.plat_sw_man",
			FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtSWModel, {
			"Platform Software Model", "eiss.plat_sw_model",
			FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtSWVersionMajor, {
			"Platform Software Major Version", "eiss.plat_sw_major",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtSWVersionMinor, {
			"Platform Software Minor Version", "eiss.plat_sw_minor",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_pdtProfile, {
			"Platform Profile", "eiss.plat_profile",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_descriptor_tag, {
			"EISS Descriptor Tag", "eiss.desc.tag",
			FT_UINT8, BASE_HEX, VALS(eiss_descriptor_values), 0, NULL, HFILL
		} },

		{ &hf_eiss_descriptor_length, {
			"Descriptor Length", "eiss.desc.length",
			FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_aid_app_control_code, {
			"Application Control Code", "eiss.aid.app_control_code",
			FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(aid_control_code_values), 0, NULL, HFILL
		} },

		{ &hf_eiss_aid_app_version_major, {
			"Application Version Major", "eiss.aid.app_version_major",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_aid_app_version_minor, {
			"Application Version Minor", "eiss.aid.app_version_minor",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_aid_max_proto_version_major, {
			"Max Protocol Version Major", "eiss.aid.max_proto_version_major",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_aid_max_proto_version_minor, {
			"Max Protocol Version Minor", "eiss.aid.max_proto_version_minor",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_aid_test_flag, {
			"Application Test Flag", "eiss.aid.test_flag",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_aid_reserved, {
			"Reserved", "eiss.aid.reserved",
			FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_aid_priority, {
			"Application Priority", "eiss.aid.priority",
			FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_irl_type, {
			"Initial Resource Locator Type", "eiss.aid.irl.type",
			FT_UINT16, BASE_HEX, NULL, 0xfc00, NULL, HFILL
		} },

		{ &hf_eiss_irl_length, {
			"Initial Resource Locator Length", "eiss.aid.irl.length",
			FT_UINT16, BASE_DEC, NULL, 0x03ff, NULL, HFILL
		} },

		{ &hf_eiss_irl_string, {
			"Initial Resource Locator String", "eiss.aid.irl.string",
			FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_mtd_time_value, {
			"Time Value (ms)", "eiss.mtd.time_value",
			FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
		} },

		{ &hf_eiss_sed_reserved, {
			"Reserved", "eiss.sed.reserved",
			FT_UINT16, BASE_DEC, NULL, 0xf000, NULL, HFILL
		} },

		{ &hf_eiss_sed_descriptor_length, {
			"Descriptor Length", "eiss.desc.length",
			FT_UINT16, BASE_DEC, NULL, 0x0fff, NULL, HFILL
		} },

		{ &hf_eiss_sed_time_value, {
			"Time Value (ms)", "eiss.sed.time_value",
			FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
		} }
	};

	static gint *ett[] = {
		&ett_eiss,
		&ett_eiss_platform_id,
		&ett_eiss_desc,
	};

	static ei_register_info ei[] = {
		{ &ei_eiss_unknown_descriptor, { "eiss.unknown_descriptor", PI_MALFORMED, PI_ERROR, "Unknown Descriptor", EXPFILL }},
		{ &ei_eiss_invalid_section_syntax_indicator, { "eiss.invalid_section_syntax_indicator", PI_MALFORMED, PI_ERROR, "Invalid section_syntax_indicator (should be 0)", EXPFILL }},
		{ &ei_eiss_invalid_reserved_bits, { "eiss.invalid_reserved_bits", PI_MALFORMED, PI_ERROR, "Invalid reserved bits", EXPFILL }},
		{ &ei_eiss_invalid_section_length, { "eiss.invalid_section_length", PI_MALFORMED, PI_ERROR, "Invalid section_length (must not exceed 1021)", EXPFILL }},
		{ &ei_eiss_section_number, { "eiss.sect_num.invalid", PI_MALFORMED, PI_ERROR, "Invalid section_number (must be <= last_section_number)", EXPFILL }},
		{ &ei_eiss_application_type, { "eiss.app_type.invalid", PI_MALFORMED, PI_ERROR, "Invalid application_type (must be 0x0008)", EXPFILL }},
		{ &ei_eiss_platform_id_length, { "eiss.platform_id_length.invalid", PI_MALFORMED, PI_ERROR, "Invalid platform_id_length (must be a multiple of sizeof(etv_bif_platform_ids) == 15)", EXPFILL }},
	};

	expert_module_t* expert_eiss;

	proto_eiss = proto_register_protocol("ETV-AM EISS Section", "ETV-AM EISS", "eiss");

	proto_register_field_array(proto_eiss, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_eiss = expert_register_protocol(proto_eiss);
	expert_register_field_array(expert_eiss, ei, array_length(ei));
}
Exemple #28
0
/* Register the protocol with Wireshark */
void
proto_register_wtp(void)
{

    /* Setup list of header fields */
    static hf_register_info hf[] = {
	{ &hf_wtp_header_sub_pdu_size,
	    { 	"Sub PDU size",
		"wtp.sub_pdu_size",
		FT_UINT16, BASE_DEC, NULL, 0x0,
		"Size of Sub-PDU (bytes)", HFILL
	    }
	},
	{ &hf_wtp_header_flag_continue,
	    { 	"Continue Flag",
		"wtp.continue_flag",
		FT_BOOLEAN, 8, TFS( &continue_truth ), 0x80,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_pdu_type,
	    { 	"PDU Type",
		"wtp.pdu_type",
		FT_UINT8, BASE_HEX, VALS( vals_wtp_pdu_type ), 0x78,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_flag_Trailer,
	    { 	"Trailer Flags",
		"wtp.trailer_flags",
		FT_UINT8, BASE_HEX, VALS( vals_transaction_trailer ), 0x06,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_flag_RID,
	    { 	"Re-transmission Indicator",
		"wtp.RID",
		FT_BOOLEAN, 8, TFS( &RID_truth ), 0x01,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_flag_TID_response,
	    { 	"TID Response",
		"wtp.TID.response",
		FT_BOOLEAN, 16, TFS( &tid_response_truth ), 0x8000,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_flag_TID,
	    { 	"Transaction ID",
		"wtp.TID",
		FT_UINT16, BASE_HEX, NULL, 0x7FFF,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_Inv_version,
	    { 	"Version",
		"wtp.header.version",
		FT_UINT8, BASE_HEX, VALS( vals_version ), 0xC0,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_Inv_flag_TIDNew,
	    { 	"TIDNew",
		"wtp.header.TIDNew",
		FT_BOOLEAN, 8, TFS( &TIDNew_truth ), 0x20,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_Inv_flag_UP,
	    { 	"U/P flag",
		"wtp.header.UP",
		FT_BOOLEAN, 8, TFS( &UP_truth ), 0x10,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_Inv_Reserved,
	    { 	"Reserved",
		"wtp.inv.reserved",
		FT_UINT8, BASE_HEX, NULL, 0x0C,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_Inv_TransactionClass,
	    { 	"Transaction Class",
		"wtp.inv.transaction_class",
		FT_UINT8, BASE_HEX, VALS( vals_transaction_classes ), 0x03,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_Ack_flag_TVETOK,
	    { 	"Tve/Tok flag",
		"wtp.ack.tvetok",
		FT_BOOLEAN, 8, TFS( &TVETOK_truth ), 0x04,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_Abort_type,
	    { 	"Abort Type",
		"wtp.abort.type",
		FT_UINT8, BASE_HEX, VALS ( vals_abort_type ), 0x07,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_Abort_reason_provider,
	    { 	"Abort Reason",
		"wtp.abort.reason.provider",
		FT_UINT8, BASE_HEX, VALS ( vals_abort_reason_provider ), 0x00,
		NULL, HFILL
	    }
	},
	/* Assume WSP is the user and use its reason codes */
	{ &hf_wtp_header_Abort_reason_user,
	    { 	"Abort Reason",
		"wtp.abort.reason.user",
		FT_UINT8, BASE_HEX|BASE_EXT_STRING, &vals_wsp_reason_codes_ext, 0x00,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_sequence_number,
	    { 	"Packet Sequence Number",
		"wtp.header.sequence",
		FT_UINT8, BASE_DEC, NULL, 0x00,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_missing_packets,
	    { 	"Missing Packets",
		"wtp.header.missing_packets",
		FT_UINT8, BASE_DEC, NULL, 0x00,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_header_variable_part,
	    { 	"Header: Variable part",
		"wtp.header_variable_part",
		FT_BYTES, BASE_NONE, NULL, 0x0,
		"Variable part of the header", HFILL
	    }
	},
	{ &hf_wtp_data,
	    { 	"Data",
		"wtp.header_data",
		FT_BYTES, BASE_NONE, NULL, 0x0,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_tpi_type,
	    { 	"TPI",
		"wtp.tpi",
		FT_UINT8, BASE_HEX, VALS(vals_tpi_type), 0x00,
		"Identification of the Transport Information Item", HFILL
	    }
	},
	{ &hf_wtp_tpi_psn,
	    { 	"Packet sequence number",
		"wtp.tpi.psn",
		FT_UINT8, BASE_DEC, NULL, 0x00,
		"Sequence number of this packet", HFILL
	    }
	},
	{ &hf_wtp_tpi_opt,
	    { 	"Option",
		"wtp.tpi.opt",
		FT_UINT8, BASE_HEX, VALS(vals_tpi_opt), 0x00,
		"The given option for this TPI", HFILL
	    }
	},
	{ &hf_wtp_tpi_optval,
	    { 	"Option Value",
		"wtp.tpi.opt.val",
		FT_NONE, BASE_NONE, NULL, 0x00,
		"The value that is supplied with this option", HFILL
	    }
	},
	{ &hf_wtp_tpi_info,
	    { 	"Information",
		"wtp.tpi.info",
		FT_NONE, BASE_NONE, NULL, 0x00,
		"The information being send by this TPI", HFILL
	    }
	},

	/* Fragment fields */
	{ &hf_wtp_fragment_overlap,
	    {	"Fragment overlap",
		"wtp.fragment.overlap",
		FT_BOOLEAN, BASE_NONE, NULL, 0x0,
		"Fragment overlaps with other fragments", HFILL
	    }
	},
	{ &hf_wtp_fragment_overlap_conflict,
	    {	"Conflicting data in fragment overlap",
		"wtp.fragment.overlap.conflict",
		FT_BOOLEAN, BASE_NONE, NULL, 0x0,
		"Overlapping fragments contained conflicting data", HFILL
	    }
	},
	{ &hf_wtp_fragment_multiple_tails,
	    {	"Multiple tail fragments found",
		"wtp.fragment.multipletails",
		FT_BOOLEAN, BASE_NONE, NULL, 0x0,
		"Several tails were found when defragmenting the packet", HFILL
	    }
	},
	{ &hf_wtp_fragment_too_long_fragment,
	    {	"Fragment too long",
		"wtp.fragment.toolongfragment",
		FT_BOOLEAN, BASE_NONE, NULL, 0x0,
		"Fragment contained data past end of packet", HFILL
	    }
	},
	{ &hf_wtp_fragment_error,
	    {	"Defragmentation error",
		"wtp.fragment.error",
		FT_FRAMENUM, BASE_NONE, NULL, 0x0,
		"Defragmentation error due to illegal fragments", HFILL
	    }
	},
	{ &hf_wtp_fragment_count,
	    {	"Fragment count",
		"wtp.fragment.count",
		FT_UINT32, BASE_DEC, NULL, 0x0,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_reassembled_in,
	    {	"Reassembled in",
		"wtp.reassembled.in",
		FT_FRAMENUM, BASE_NONE, NULL, 0x0,
		"WTP fragments are reassembled in the given packet", HFILL
	    }
	},
	{ &hf_wtp_reassembled_length,
	    {	"Reassembled WTP length",
		"wtp.reassembled.length",
		FT_UINT32, BASE_DEC, NULL, 0x0,
		"The total length of the reassembled payload", HFILL
	    }
	},
	{ &hf_wtp_fragment,
	    {	"WTP Fragment",
		"wtp.fragment",
		FT_FRAMENUM, BASE_NONE, NULL, 0x0,
		NULL, HFILL
	    }
	},
	{ &hf_wtp_fragments,
	    {	"WTP Fragments",
		"wtp.fragments",
		FT_NONE, BASE_NONE, NULL, 0x0,
		NULL, HFILL
	    }
	},
    };

    /* Setup protocol subtree array */
    static gint *ett[] = {
	&ett_wtp,
	&ett_wtp_sub_pdu_tree,
	&ett_header,
	&ett_tpilist,
	&ett_wsp_fragments,
	&ett_wtp_fragment,
    };

    /* Register the protocol name and description */
    proto_wtp = proto_register_protocol(
	"Wireless Transaction Protocol",   /* protocol name for use by wireshark */
	"WTP",                             /* short version of name */
	"wtp"                      /* Abbreviated protocol name, should Match IANA
					    < URL:http://www.iana.org/assignments/port-numbers/ >
					    */
    );

    /* Required calls to register the header fields and subtrees used */
    proto_register_field_array(proto_wtp, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));

    register_dissector("wtp-wtls", dissect_wtp_fromwtls, proto_wtp);
    register_dissector("wtp-udp", dissect_wtp_fromudp, proto_wtp);
    register_init_routine(wtp_defragment_init);
}
Exemple #29
0
void
proto_register_ftp(void)
{
    static hf_register_info hf[] = {
        { &hf_ftp_response,
          { "Response",           "ftp.response",
            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "TRUE if FTP response", HFILL }},

        { &hf_ftp_request,
          { "Request",            "ftp.request",
            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "TRUE if FTP request", HFILL }},

        { &hf_ftp_request_command,
          { "Request command",    "ftp.request.command",
            FT_STRING,  BASE_NONE, NULL, 0x0,
            NULL, HFILL }},

        { &hf_ftp_request_arg,
          { "Request arg",        "ftp.request.arg",
            FT_STRING,  BASE_NONE, NULL, 0x0,
            NULL, HFILL }},

        { &hf_ftp_response_code,
          { "Response code",      "ftp.response.code",
            FT_UINT32,   BASE_DEC|BASE_EXT_STRING, &response_table_ext, 0x0,
            NULL, HFILL }},

        { &hf_ftp_response_arg,
          { "Response arg",      "ftp.response.arg",
            FT_STRING,  BASE_NONE, NULL, 0x0,
            NULL, HFILL }},

        { &hf_ftp_pasv_ip,
          { "Passive IP address", "ftp.passive.ip",
            FT_IPv4, BASE_NONE, NULL,0x0,
            "Passive IP address (check NAT)", HFILL}},

        { &hf_ftp_pasv_port,
          { "Passive port", "ftp.passive.port",
            FT_UINT16, BASE_DEC, NULL,0x0,
            "Passive FTP server port", HFILL }},

        { &hf_ftp_pasv_nat,
          {"Passive IP NAT", "ftp.passive.nat",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           "NAT is active SIP and passive IP different", HFILL }},

        { &hf_ftp_active_ip,
          { "Active IP address", "ftp.active.cip",
            FT_IPv4, BASE_NONE, NULL, 0x0,
            "Active FTP client IP address", HFILL }},

        { &hf_ftp_active_port,
          {"Active port", "ftp.active.port",
           FT_UINT16, BASE_DEC, NULL, 0x0,
           "Active FTP client port", HFILL }},

        { &hf_ftp_active_nat,
          { "Active IP NAT", "ftp.active.nat",
            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
            "NAT is active", HFILL}},

        { &hf_ftp_eprt_af,
          { "Extended active address family", "ftp.eprt.af",
            FT_UINT8, BASE_DEC, VALS(eprt_af_vals), 0,
            NULL, HFILL }},

        { &hf_ftp_eprt_ip,
          { "Extended active IP address", "ftp.eprt.ip",
            FT_IPv4, BASE_NONE, NULL, 0,
            "Extended active FTP client IPv4 address", HFILL }},

        { &hf_ftp_eprt_ipv6,
          { "Extended active IPv6 address", "ftp.eprt.ipv6",
            FT_IPv6, BASE_NONE, NULL, 0,
            "Extended active FTP client IPv6 address", HFILL }},

        { &hf_ftp_eprt_port,
          { "Extended active port", "ftp.eprt.port",
            FT_UINT16, BASE_DEC, NULL, 0,
            "Extended active FTP client listener port", HFILL }},

        { &hf_ftp_epsv_ip,
          { "Extended passive IPv4 address", "ftp.epsv.ip",
            FT_IPv4, BASE_NONE, NULL, 0,
            "Extended passive FTP server IPv4 address", HFILL }},

        { &hf_ftp_epsv_ipv6,
          { "Extended passive IPv6 address", "ftp.epsv.ipv6",
            FT_IPv6, BASE_NONE, NULL, 0,
            "Extended passive FTP server IPv6 address", HFILL }},

        { &hf_ftp_epsv_port,
          { "Extended passive port", "ftp.epsv.port",
            FT_UINT16, BASE_DEC, NULL, 0,
            "Extended passive FTP server port", HFILL }}

    };
    static gint *ett[] = {
        &ett_ftp,
        &ett_ftp_reqresp
    };

    static ei_register_info ei[] = {
        { &ei_ftp_eprt_args_invalid, { "ftp.eprt.args_invalid", PI_MALFORMED, PI_WARN, "EPRT arguments must have the form: |<family>|<addr>|<port>|", EXPFILL }},
        { &ei_ftp_epsv_args_invalid, { "ftp.epsv.args_invalid", PI_MALFORMED, PI_WARN, "EPSV arguments must have the form (|||<port>|)", EXPFILL }},
    };

    expert_module_t* expert_ftp;

    proto_ftp = proto_register_protocol("File Transfer Protocol (FTP)", "FTP", "ftp");

    register_dissector("ftp", dissect_ftp, proto_ftp);
    proto_ftp_data = proto_register_protocol("FTP Data", "FTP-DATA", "ftp-data");
    register_dissector("ftp-data", dissect_ftpdata, proto_ftp_data);
    proto_register_field_array(proto_ftp, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
    expert_ftp = expert_register_protocol(proto_ftp);
    expert_register_field_array(expert_ftp, ei, array_length(ei));
}
Exemple #30
0
/* Register the protocol with Wireshark */
void proto_register_lanforge(void)
{
    /* Setup list of header fields */

    static hf_register_info hf[] = {

        { &hf_lanforge_crc,
          {
              "CRC", "lanforge.CRC",
              FT_UINT32, BASE_HEX, NULL, 0x0,
              "The LANforge CRC number", HFILL
          }
        },

        { &hf_lanforge_magic,
          {
              "Magic number", "lanforge.magic",
              FT_UINT32, BASE_HEX, NULL, 0x0,
              "The LANforge magic number", HFILL
          }
        },

        { &hf_lanforge_src_session,
          {
              "Source session ID", "lanforge.source-session-id",
              FT_UINT16, BASE_DEC, NULL, 0x0,
              "The LANforge source session ID", HFILL
          }
        },

        { &hf_lanforge_dst_session,
          {
              "Dest session ID", "lanforge.dest-session-id",
              FT_UINT16, BASE_DEC, NULL, 0x0,
              "The LANforge dest session ID", HFILL
          }
        },

        { &hf_lanforge_pld_len_l,
          {
              "Payload Length(L)", "lanforge.pld-len-L",
              FT_UINT16, BASE_DEC, NULL, 0x0,
              "The LANforge payload length (low bytes)", HFILL
          }
        },

        { &hf_lanforge_pld_len_h,
          {
              "Payload Length(H)", "lanforge.pld-len-H",
              FT_UINT8, BASE_DEC, NULL, 0x0,
              "The LANforge payload length (high byte)", HFILL
          }
        },

        { &hf_lanforge_pld_len,
          {
              "Payload Length", "lanforge.pld-length",
              FT_UINT32, BASE_DEC, NULL, 0x0,
              "The LANforge payload length", HFILL
          }
        },

        { &hf_lanforge_pld_pattern,
          {
              "Payload Pattern", "lanforge.pld-pattern",
              FT_UINT16, BASE_DEC, NULL, 0x0,
              "The LANforge payload pattern", HFILL
          }
        },

        { &hf_lanforge_seq,
          {
              "Sequence Number", "lanforge.seqno",
              FT_UINT32, BASE_DEC, NULL, 0x0,
              "The LANforge Sequence Number", HFILL
          }
        },

        { &hf_lanforge_tx_time_s,
          {
              "Timestamp Secs", "lanforge.ts-secs",
              FT_UINT32, BASE_DEC, NULL, 0x0,
              NULL, HFILL
          }
        },

        { &hf_lanforge_tx_time_ns,
          {
              "Timestamp nsecs", "lanforge.ts-nsecs",
              FT_UINT32, BASE_DEC, NULL, 0x0,
              NULL, HFILL
          }
        },

        { &hf_lanforge_timestamp,
          {
              "Timestamp", "lanforge.timestamp",
              FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0,
              NULL, HFILL
          }
        }
    };

    /* Setup protocol subtree array */

    static gint *ett[] = {
        &ett_lanforge
    };

    /* Register the protocol name and description */

    proto_lanforge = proto_register_protocol("LANforge Traffic Generator", "LANforge", "lanforge");

    /* Required function calls to register the header fields and subtrees used */

    proto_register_field_array(proto_lanforge, hf, array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
}