当前位置: 首页>>代码示例>>C++>>正文


C++ proto_register_subtree_array函数代码示例

本文整理汇总了C++中proto_register_subtree_array函数的典型用法代码示例。如果您正苦于以下问题:C++ proto_register_subtree_array函数的具体用法?C++ proto_register_subtree_array怎么用?C++ proto_register_subtree_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了proto_register_subtree_array函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: proto_register_gssapi

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);
}
开发者ID:acaceres2176,项目名称:wireshark,代码行数:85,代码来源:packet-gssapi.c

示例2: proto_register_pflog

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));
}
开发者ID:Biamp-Systems,项目名称:wireshark,代码行数:89,代码来源:packet-pflog.c

示例3: proto_register_irc

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));
}
开发者ID:pvons,项目名称:wireshark,代码行数:66,代码来源:packet-irc.c

示例4: proto_register_gsm_sms_ud


//.........这里部分代码省略.........
                "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);
}
开发者ID:jing-git,项目名称:wireshark,代码行数:101,代码来源:packet-gsm_sms_ud.c

示例5: proto_register_netdump

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);
}
开发者ID:LucaBongiorni,项目名称:LTE_monitor_c2xx,代码行数:83,代码来源:packet-netdump.c

示例6: proto_register_uaudp


//.........这里部分代码省略.........
                "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
}
开发者ID:dot-Sean,项目名称:wireshark-http2,代码行数:101,代码来源:packet-uaudp.c

示例7: proto_register_cups

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));
}
开发者ID:LucaBongiorni,项目名称:LTE_monitor_c2xx,代码行数:77,代码来源:packet-cups.c

示例8: proto_register_actrace

/* 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");
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:80,代码来源:packet-actrace.c

示例9: proto_register_nflog

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));

}
开发者ID:dogphilly,项目名称:wireshark,代码行数:66,代码来源:packet-nflog.c

示例10: proto_register_msdp


//.........这里部分代码省略.........
                { &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));
}
开发者ID:Biamp-Systems,项目名称:wireshark,代码行数:101,代码来源:packet-msdp.c

示例11: proto_register_tfp


//.........这里部分代码省略.........
                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));
}
开发者ID:nehaahir,项目名称:wireshark,代码行数:101,代码来源:packet-tfp.c

示例12: proto_register_docsis_dcd


//.........这里部分代码省略.........
      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);
}
开发者ID:hubolo,项目名称:wireshark-1.8.0,代码行数:101,代码来源:packet-dcd.c

示例13: proto_register_ax25_nol3

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 ) ); */
}
开发者ID:nehaahir,项目名称:wireshark,代码行数:63,代码来源:packet-ax25-nol3.c

示例14: proto_register_ppcap

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);
}
开发者ID:huzhiren,项目名称:wireshark,代码行数:83,代码来源:packet-ppcap.c

示例15: proto_register_openais_a


//.........这里部分代码省略.........
            {   "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);
}
开发者ID:masatake,项目名称:wireshark-plugin-rhcs,代码行数:101,代码来源:packet-openais-a.c


注:本文中的proto_register_subtree_array函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。