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


C++ prefs_register_uint_preference函数代码示例

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


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

示例1: proto_register_cc2420

/* Register the protocol with Wireshark */
void proto_register_cc2420(void)
{                 
  module_t *module_cc2420;

  /* 802.15.4 Header */
  static hf_register_info hf[] = {
    /* cc2420 specific phy header */
    { &hf_cc2420_length,	{ "Length", "cc2420.length", FT_UINT8, BASE_DEC, NULL, 0x0, "", HFILL } },
    /* cc2420 specific FCS */
    { &hf_cc2420_fcs,	{ "FCS", "cc2420.fcs", FT_NONE, FT_NONE, NULL, 0x0, "", HFILL } },
    { &hf_cc2420_crc,	{ "Crc", "cc2420.crc", FT_BOOLEAN, 16, TFS(&cc2420_crc_string), 0x80, "", HFILL } },
    /* cc2420 specific FCS fields containing rssi & lqi & crc_pass*/
    { &hf_cc2420_lqi,	{ "Lqi", "cc2420.lqi", FT_UINT16, BASE_HEX, NULL, 0x7f, "", HFILL } },
    { &hf_cc2420_rssi,	{ "Rssi", "cc2420.rssi", FT_UINT16, BASE_HEX, NULL, 0xff00, "", HFILL } }
  };
  
  /* Setup protocol subtree array */
  static gint *ett[] = {
    &ett_cc2420
  };

  /* Register the protocol name and description */
  proto_cc2420 = proto_register_protocol("CC2420 Frame Format", "CC2420", "cc2420");

  /* Required function calls to register the header fields and subtrees used */
  proto_register_field_array(proto_cc2420, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));
        
  /* Register preferences module (See Section 2.6 for more on preferences) */
  module_cc2420 = prefs_register_protocol(proto_cc2420, proto_reg_handoff_cc2420);
     
  /* subdissector code */
  register_heur_dissector_list("cc2420", &heur_subdissector_list);
  
  /* Register prefs */
  prefs_register_uint_preference(module_cc2420, "am_type",
				 "Serial type ",
				 "The type of Serial T2  messgaes which "
				 "contain CC2420 "
				 "packets as payload",
				 10, &global_serial_type_cc2420);
  
  prefs_register_uint_preference(module_cc2420, "channel",
				 "Standard Channel ",
				 "The channel on which "
				 "the CC2420 radio"
				 "receives",
				 10, &global_channel_cc2420);
}
开发者ID:Habib2014,项目名称:tinyos-2.x-contrib,代码行数:50,代码来源:packet-cc2420.c

示例2: proto_register_s1ap

/*--- proto_register_s1ap -------------------------------------------*/
void proto_register_s1ap(void) {

  /* List of fields */

  static hf_register_info hf[] = {
    { &hf_s1ap_transportLayerAddressIPv4,
      { "transportLayerAddress(IPv4)", "s1ap.transportLayerAddressIPv4",
        FT_IPv4, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_s1ap_transportLayerAddressIPv6,
      { "transportLayerAddress(IPv6)", "s1ap.transportLayerAddressIPv6",
        FT_IPv6, BASE_NONE, NULL, 0,
        NULL, HFILL }},

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

  /* List of subtrees */
  static gint *ett[] = {
		  &ett_s1ap,
		  &ett_s1ap_TransportLayerAddress,
		  &ett_s1ap_ToTargetTransparentContainer,
		  &ett_s1ap_ToSourceTransparentContainer,
		  &ett_s1ap_RRCContainer,
		  &ett_s1ap_UERadioCapability,
		  &ett_s1ap_RIMInformation,
#include "packet-s1ap-ettarr.c"
  };

  module_t *s1ap_module;

  /* Register protocol */
  proto_s1ap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_s1ap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register dissector */
  register_dissector("s1ap", dissect_s1ap, proto_s1ap);

  /* Register dissector tables */
  s1ap_ies_dissector_table = register_dissector_table("s1ap.ies", "S1AP-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  s1ap_ies_p1_dissector_table = register_dissector_table("s1ap.ies.pair.first", "S1AP-PROTOCOL-IES-PAIR FirstValue", FT_UINT32, BASE_DEC);
  s1ap_ies_p2_dissector_table = register_dissector_table("s1ap.ies.pair.second", "S1AP-PROTOCOL-IES-PAIR SecondValue", FT_UINT32, BASE_DEC);
  s1ap_extension_dissector_table = register_dissector_table("s1ap.extension", "S1AP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  s1ap_proc_imsg_dissector_table = register_dissector_table("s1ap.proc.imsg", "S1AP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
  s1ap_proc_sout_dissector_table = register_dissector_table("s1ap.proc.sout", "S1AP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
  s1ap_proc_uout_dissector_table = register_dissector_table("s1ap.proc.uout", "S1AP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);

  /* Register configuration options for ports */
  s1ap_module = prefs_register_protocol(proto_s1ap, proto_reg_handoff_s1ap);

  prefs_register_uint_preference(s1ap_module, "sctp.port",
                                 "S1AP SCTP Port",
                                 "Set the SCTP port for S1AP messages",
                                 10,
                                 &gbl_s1apSctpPort);
  prefs_register_bool_preference(s1ap_module, "dissect_container", "Dissect TransparentContainer", "Dissect TransparentContainers that are opaque to S1AP", &g_s1ap_dissect_container);

}
开发者ID:AnkitKejriwal,项目名称:wireshark,代码行数:61,代码来源:packet-s1ap-template.c

示例3: proto_register_jmirror

/* Register Jmirror dissector with Wireshark */
void
proto_register_jmirror(void)
{
	module_t	*jmirror_module = NULL;

	/* Used by the Expression dialog and filter box */
	static hf_register_info jmirror_hf[] = {
		{ &hf_jmirror_mid,
		  { "Jmirror Identifier", "jmirror.mid", FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
		    "Unique identifier of the mirrored session", HFILL }
		},
		{ &hf_jmirror_sid,
		  { "Session Identifier", "jmirror.sid", FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
		    "Unique identifier of the user session", HFILL }
		}
	};
	static gint *jmirror_ett[] = {
		&ett_jmirror
	};

	/* Register the Jmirror protocol with Wireshark */
	proto_jmirror = proto_register_protocol("Juniper Packet Mirror", "Jmirror", "jmirror");

	/* Register the Jmirror preferences with Wireshark */
	jmirror_module = prefs_register_protocol(proto_jmirror, proto_reg_handoff_jmirror);

	/* Allow the user to set the UDP port for the decode under the Edit -> Preferences menu */
	prefs_register_uint_preference(jmirror_module, "udp.port", "JMirror UDP Port",
		"Set the port for JMirror Port (if other than the default of 30030)",
		10, &global_jmirror_udp_port);

	/* Register the Jmirror subfields for filters */
	proto_register_field_array(proto_jmirror, jmirror_hf, array_length(jmirror_hf));
	proto_register_subtree_array(jmirror_ett, array_length(jmirror_ett));
}
开发者ID:kailiu-bupt2005,项目名称:wireshark,代码行数:36,代码来源:packet-jmirror.c

示例4: proto_register_kismet

void
proto_register_kismet(void)
{
	static hf_register_info hf[] = {
		{&hf_kismet_response,
		{"Response", "kismet.response", FT_BOOLEAN, BASE_NONE, 
		NULL, 0x0, "TRUE if kismet response", HFILL}},

		{&hf_kismet_request,
		{"Request", "kismet.request", FT_BOOLEAN, BASE_NONE, 
		NULL, 0x0, "TRUE if kismet request", HFILL}}
	};

	static gint *ett[] = {
		&ett_kismet,
		&ett_kismet_reqresp,
	};
	module_t *kismet_module;

	proto_kismet = proto_register_protocol("Kismet Client/Server Protocol", "Kismet", "kismet");
	proto_register_field_array(proto_kismet, hf, array_length (hf));
	proto_register_subtree_array(ett, array_length (ett));

	/* Register our configuration options for Kismet, particularly our port */

	kismet_module = prefs_register_protocol(proto_kismet, proto_reg_handoff_kismet);

	prefs_register_uint_preference(kismet_module, "tcp.port",
			  "Kismet Server TCP Port",
			  "Set the port for Kismet Client/Server messages (if other"
			  " than the default of 2501)", 10,
			  &global_kismet_tcp_port);
}
开发者ID:AkhilaAG,项目名称:gluster-wireshark-1.4,代码行数:33,代码来源:packet-kismet.c

示例5: proto_register_disp

/*--- proto_register_disp -------------------------------------------*/
void proto_register_disp(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
#include "packet-disp-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_disp,
#include "packet-disp-ettarr.c"
  };
  module_t *disp_module;

  /* Register protocol */
  proto_disp = proto_register_protocol(PNAME, PSNAME, PFNAME);
  register_dissector("disp", dissect_disp, proto_disp);

  /* Register fields and subtrees */
  proto_register_field_array(proto_disp, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register our configuration options for DISP, particularly our port */

  disp_module = prefs_register_protocol_subtree("OSI/X.500", proto_disp, prefs_register_disp);

  prefs_register_uint_preference(disp_module, "tcp.port", "DISP TCP Port",
				 "Set the port for DISP operations (if other"
				 " than the default of 102)",
				 10, &global_disp_tcp_port);

}
开发者ID:AndresVelasco,项目名称:wireshark,代码行数:34,代码来源:packet-disp-template.c

示例6: proto_register_p7

/*--- proto_register_p7 -------------------------------------------*/
void proto_register_p7(void) {

  /* List of fields */
  static hf_register_info hf[] =
  {
#include "packet-p7-hfarr.c"
  };

  /* List of subtrees */
  static gint *ett[] = {
    &ett_p7,
#include "packet-p7-ettarr.c"
  };
  module_t *p7_module;

  /* Register protocol */
  proto_p7 = proto_register_protocol(PNAME, PSNAME, PFNAME);

  /* Register fields and subtrees */
  proto_register_field_array(proto_p7, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register our configuration options for P7, particularly our port */

  p7_module = prefs_register_protocol_subtree("OSI/X.400", proto_p7, prefs_register_p7);

  prefs_register_uint_preference(p7_module, "tcp.port", "P7 TCP Port",
				 "Set the port for P7 operations (if other"
				 " than the default of 102)",
				 10, &global_p7_tcp_port);

}
开发者ID:AndresVelasco,项目名称:wireshark,代码行数:33,代码来源:packet-p7-template.c

示例7: proto_register_pcli

void
proto_register_pcli(void) {
  static hf_register_info hf[] = {
    { &hf_pcli_cccid,
      { "CCCID", "pcli.cccid", FT_UINT32, BASE_DEC, NULL, 0x0,
	"Call Content Connection Identifier", HFILL }},
  };

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

  module_t *pcli_module;

  proto_pcli = proto_register_protocol("Packet Cable Lawful Intercept",
				       "PCLI","pcli");
  proto_register_field_array(proto_pcli,hf,array_length(hf));
  proto_register_subtree_array(ett,array_length(ett));

  pcli_module = prefs_register_protocol(proto_pcli,
					proto_reg_handoff_pcli);
  prefs_register_uint_preference(pcli_module, "udp_port",
				 "PCLI UDP Port",
				 "The UDP port on which "
				 "Packet Cable Lawful Intercept "
				 "packets will be sent",
				 10,&global_udp_port_pcli);

}
开发者ID:LucaBongiorni,项目名称:LTE_monitor_c2xx,代码行数:29,代码来源:packet-pcli.c

示例8: proto_register_moldudp

/* Register the protocol with Wireshark */
void
proto_register_moldudp(void)
{
    module_t *moldudp_module;

    /* Setup list of header fields */
    static hf_register_info hf[] = {

        { &hf_moldudp_session,
        { "Session",       "moldudp.session",  FT_STRING, BASE_NONE, NULL, 0,
          "The session to which this packet belongs.", HFILL }},

        { &hf_moldudp_sequence,
        { "Sequence",      "moldudp.sequence", FT_UINT32, BASE_DEC,  NULL, 0,
          "The sequence number of the first message in this packet.", HFILL }},

        { &hf_moldudp_count,
        { "Count",         "moldudp.count",    FT_UINT16, BASE_DEC,  NULL, 0,
          "The number of messages contained in this packet.", HFILL }},

        { &hf_moldudp_msgblk,
        { "Message Block", "moldudp.msgblock", FT_NONE,   BASE_NONE, NULL, 0,
          "A message.", HFILL }},

        { &hf_moldudp_msglen,
        { "Length",        "moldudp.msglen",   FT_UINT16, BASE_DEC,  NULL, 0,
          "The length of this message.", HFILL }},

        { &hf_moldudp_msgseq,
        { "Sequence",      "moldudp.msgseq",   FT_UINT32, BASE_DEC,  NULL, 0,
          "The sequence number of this message.", HFILL }},

        { &hf_moldudp_msgdata,
        { "Payload",       "moldudp.msgdata",  FT_BYTES,  BASE_NONE, NULL, 0,
          "The payload data of this message.", HFILL }}
    };

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

    /* Register the protocol name and description */
    proto_moldudp = proto_register_protocol("MoldUDP",
            "MoldUDP", "moldudp");

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

    /* Register preferences module */
    moldudp_module = prefs_register_protocol(proto_moldudp,
            proto_reg_handoff_moldudp);

    /* Register a sample port preference   */
    prefs_register_uint_preference(moldudp_module, "udp.port", "MoldUDP UDP Port",
            "MoldUDP UDP port to capture on.",
            10, &pf_moldudp_port);
}
开发者ID:hubolo,项目名称:wireshark-1.8.0,代码行数:61,代码来源:packet-moldudp.c

示例9: proto_register_osi

void
proto_register_osi(void)
{
  module_t *osi_module;

  /* There's no "OSI" protocol *per se*, but we do register a
     dissector table so various protocols running at the
     network layer can register themselves.
     all protocols that require inclusion of the NLPID
     should register here
  */
  osinl_incl_subdissector_table = register_dissector_table("osinl.incl",
                                                           "OSI incl NLPID", FT_UINT8, BASE_HEX);

  /* This dissector table is for those protocols whose PDUs
   * aren't* defined to begin with an NLPID.
   * (typically non OSI protocols like IP,IPv6,PPP */
  osinl_excl_subdissector_table = register_dissector_table("osinl.excl",
                                                           "OSI excl NLPID", FT_UINT8, BASE_HEX);

  proto_osi = proto_register_protocol("OSI", "OSI", "osi");
  /* Preferences how OSI protocols should be dissected */
  osi_module = prefs_register_protocol(proto_osi, proto_reg_handoff_osi);

  prefs_register_uint_preference(osi_module, "tpkt_port",
                                 "TCP port for OSI over TPKT",
                                 "TCP port for OSI over TPKT",
                                 10, &global_tcp_port_osi_over_tpkt);
  prefs_register_bool_preference(osi_module, "tpkt_reassemble",
                                 "Reassemble segmented TPKT datagrams",
                                 "Whether segmented TPKT datagrams should be reassembled",
                                 &tpkt_desegment);


}
开发者ID:dot-Sean,项目名称:wireshark-http2,代码行数:35,代码来源:packet-osi.c

示例10: proto_register_tcpencap

void
proto_register_tcpencap(void)
{
	static hf_register_info hf[] = {

		{ &hf_tcpencap_unknown,
		{ "Unknown trailer",      "tcpencap.unknown", FT_BYTES, BASE_NONE, NULL,
			0x0, NULL, HFILL }},

		{ &hf_tcpencap_zero,
		{ "All zero",      "tcpencap.zero", FT_BYTES, BASE_NONE, NULL,
			0x0, NULL, HFILL }},

		{ &hf_tcpencap_seq,
		{ "Sequence number",      "tcpencap.seq", FT_UINT16, BASE_HEX, NULL,
			0x0, NULL, HFILL }},

		{ &hf_tcpencap_esp_zero,
		{ "ESP zero",      "tcpencap.espzero", FT_UINT16, BASE_HEX, NULL,
			0x0, NULL, HFILL }},

		{ &hf_tcpencap_ike_direction,
		{ "ISAKMP traffic direction",      "tcpencap.ikedirection", FT_UINT16, BASE_HEX, VALS(tcpencap_ikedir_vals),
			0x0, NULL, HFILL }},

		{ &hf_tcpencap_magic,
		{ "Magic number",      "tcpencap.magic", FT_BYTES, BASE_NONE, NULL,
			0x0, NULL, HFILL }},

		{ &hf_tcpencap_proto,
		{ "Protocol",      "tcpencap.proto", FT_UINT8, BASE_HEX, VALS(tcpencap_proto_vals),
			0x0, NULL, HFILL }},

		{ &hf_tcpencap_magic2,
		{ "Magic 2",      "tcpencap.magic2", FT_BYTES, BASE_NONE, NULL,
			0x0, NULL, HFILL }},

	};

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

	module_t *tcpencap_module;

	void proto_reg_handoff_tcpencap(void);

	proto_tcpencap = proto_register_protocol(
		"TCP Encapsulation of IPsec Packets", "TCPENCAP", "tcpencap");
	proto_register_field_array(proto_tcpencap, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	tcpencap_module = prefs_register_protocol(proto_tcpencap, proto_reg_handoff_tcpencap);
	prefs_register_uint_preference(tcpencap_module, "tcp.port", "IPSEC TCP Port",
		"Set the port for IPSEC/ISAKMP messages"
		"If other than the default of 10000)",
		10, &global_tcpencap_tcp_port);
}
开发者ID:flaub,项目名称:HotFuzz,代码行数:58,代码来源:packet-ipsec-tcp.c

示例11: proto_register_uhd

void
proto_register_uhd(void)
{
	static hf_register_info hf[] = {
		{ &hf_uhd_version, { "VERSION", "uhd.version",
		  FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_id, { "ID", "uhd.id",
		  FT_UINT32, BASE_HEX, VALS(uhd_ids), 0, NULL, HFILL } },
		{ &hf_uhd_seq, { "SEQ", "uhd.seq",
		  FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_ip_addr, { "IP ADDR", "uhd.ip_addr",
		  FT_IPv4, BASE_NONE, NULL, 0x0,"", HFILL } },
		{ &hf_uhd_i2c_addr, { "I2C ADDR", "uhd.i2c_addr",
		  FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_i2c_bytes, { "I2C BYTES", "uhd.i2c_bytes",
		  FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_i2c_data, { "I2C DATA", "uhd.i2c_data",
		  FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_spi_dev, { "SPI DEV", "uhd.spi_dev",
		  FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_spi_data, { "SPI DATA", "uhd.spi_data",
		  FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_spi_miso_edge, { "SPI MISO EDGE", "uhd.spi_miso_edge",
		  FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_spi_mosi_edge, { "SPI MOSI EDGE", "uhd.spi_mosi_edge",
		  FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_spi_num_bits, { "SPI NUM BITS", "uhd.spi_num_bits",
		  FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_spi_readback, { "SPI READBACK", "uhd.spi_readback",
		  FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_reg_addr, { "REG ADDR", "uhd.reg_addr",
		  FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_reg_data, { "REG DATA", "uhd.reg_data",
		  FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } },
		{ &hf_uhd_reg_action, { "REG ACTION", "uhd.reg_action",
		  FT_UINT8, BASE_HEX, VALS(uhd_reg_actions), 0, NULL, HFILL } },
		{ &hf_uhd_echo_len, { "ECHO LEN", "uhd.echo_len",
		  FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } },
	};

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

    module_t *uhd_module;

	proto_uhd = proto_register_protocol("UHD", "UHD", "uhd");
	proto_register_field_array(proto_uhd, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));

    uhd_module = prefs_register_protocol(proto_uhd, proto_reg_handoff_uhd);
    prefs_register_uint_preference(uhd_module,
        "dissector_port",
        "Dissector UDP port",
        "The UDP port used by this dissector",
        10, &dissector_port_pref);
}
开发者ID:danielwhite84,项目名称:wireshark,代码行数:57,代码来源:packet-uhd.c

示例12: proto_register_cwids

void
proto_register_cwids(void)
{
	static hf_register_info hf[] = {
		{ &hf_cwids_version,
		{ "Capture Version", "cwids.version", FT_UINT16, BASE_DEC, NULL,
			0x0, "Version or format of record", HFILL }},

		{ &hf_cwids_unknown1,
		{ "Unknown1", "cwids.unknown1", FT_BYTES, BASE_NONE, NULL,
			0x0, "1st Unknown block - timestamp?", HFILL }},

		{ &hf_cwids_channel,
		{ "Channel", "cwids.channel", FT_UINT8, BASE_DEC, NULL,
			0x0, "Channel for this capture", HFILL }},

		{ &hf_cwids_unknown2,
		{ "Unknown2", "cwids.unknown2", FT_BYTES, BASE_NONE, NULL,
			0x0, "2nd Unknown block", HFILL }},

		{ &hf_cwids_reallength,
		{ "Original length", "cwids.reallen", FT_UINT16, BASE_DEC, NULL,
			0x0, "Original num bytes in frame", HFILL }},

		{ &hf_cwids_capturelen,
		{ "Capture length", "cwids.caplen", FT_UINT16, BASE_DEC, NULL,
			0x0, "Captured bytes in record", HFILL }},

		{ &hf_cwids_unknown3,
		{ "Unknown3", "cwids.unknown3", FT_BYTES, BASE_NONE, NULL,
			0x0, "3rd Unknown block", HFILL }},

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

	static ei_register_info ei[] = {
		{ &ie_ieee80211_subpacket, { "cwids.ieee80211_malformed", PI_MALFORMED, PI_ERROR, "Malformed or short IEEE80211 subpacket", EXPFILL }},
	};

	module_t *cwids_module;
	expert_module_t* expert_cwids;

	proto_cwids = proto_register_protocol("Cisco Wireless IDS Captures", "CWIDS", "cwids");
	proto_register_field_array(proto_cwids, hf, array_length(hf));
	proto_register_subtree_array(ett, array_length(ett));
	expert_cwids = expert_register_protocol(proto_cwids);
	expert_register_field_array(expert_cwids, ei, array_length(ei));

	cwids_module = prefs_register_protocol(proto_cwids, proto_reg_handoff_cwids);
	prefs_register_uint_preference(cwids_module, "udp.port",
		"CWIDS port",
		"Set the destination UDP port Cisco wireless IDS messages",
		10, &global_udp_port);

}
开发者ID:allenporter,项目名称:wireshark,代码行数:57,代码来源:packet-cisco-wids.c

示例13: proto_register_m2pa

void
proto_register_m2pa(void)
{
  static hf_register_info hf[] =
  { { &hf_version,      { "Version",        "m2pa.version",        FT_UINT8,  BASE_DEC,  VALS(protocol_version_values), 0x0,                 NULL, HFILL} },
    { &hf_spare,        { "Spare",          "m2pa.spare",          FT_UINT8,  BASE_HEX,  NULL,                          0x0,                 NULL, HFILL} },
    { &hf_v2_type,      { "Message Type",   "m2pa.type_v2",        FT_UINT16, BASE_HEX,  VALS(v2_message_type_values),  0x0,                 NULL, HFILL} },
    { &hf_v8_type,      { "Message Type",   "m2pa.type_v8",        FT_UINT8,  BASE_DEC,  VALS(v8_message_type_values),  0x0,                 NULL, HFILL} },
    { &hf_type,         { "Message Type",   "m2pa.type",           FT_UINT8,  BASE_DEC,  VALS(message_type_values),     0x0,                 NULL, HFILL} },
    { &hf_class,        { "Message Class",  "m2pa.class",          FT_UINT8,  BASE_DEC,  VALS(message_class_values),    0x0,                 NULL, HFILL} },
    { &hf_length,       { "Message length", "m2pa.length",         FT_UINT32, BASE_DEC,  NULL,                          0x0,                 NULL, HFILL} },
    { &hf_unused,       { "Unused",         "m2pa.unused",         FT_UINT8,  BASE_DEC,  NULL,                          0x0,                 NULL, HFILL} },
    { &hf_bsn,          { "BSN",            "m2pa.bsn",            FT_UINT24, BASE_DEC,  NULL,                          0x0,                 NULL, HFILL} },
    { &hf_fsn,          { "FSN",            "m2pa.fsn",            FT_UINT24, BASE_DEC,  NULL,                          0x0,                 NULL, HFILL} },
    { &hf_v2_li_spare,  { "Spare",          "m2pa.li_spare_v2",    FT_UINT8,  BASE_DEC,  NULL,                          V2_LI_SPARE_MASK,    NULL, HFILL} },
    { &hf_v8_li_spare,  { "Spare",          "m2pa.li_spare_v8",    FT_UINT8,  BASE_HEX,  NULL,                          V8_LI_SPARE_MASK,    NULL, HFILL} },
    { &hf_pri_spare,    { "Spare",          "m2pa.priority_spare", FT_UINT8,  BASE_HEX,  NULL,                          SPARE_MASK,          NULL, HFILL} },
    { &hf_v2_li_prio,   { "Priority",       "m2pa.li_priority_v2", FT_UINT8,  BASE_DEC,  NULL,                          V2_LI_PRIORITY_MASK, NULL, HFILL} },
    { &hf_v8_li_prio,   { "Priority",       "m2pa.li_priority_v8", FT_UINT8,  BASE_HEX,  NULL,                          V8_LI_PRIORITY_MASK, NULL, HFILL} },
    { &hf_pri_prio,     { "Priority",       "m2pa.priority",       FT_UINT8,  BASE_HEX,  NULL,                          PRIORITY_MASK,       NULL, HFILL} },
    { &hf_v2_status,    { "Link Status",    "m2pa.status_v2",      FT_UINT32, BASE_DEC,  VALS(v2_link_status_values),   0x0,                 NULL, HFILL} },
    { &hf_v8_status,    { "Link Status",    "m2pa.status_v8",      FT_UINT32, BASE_DEC,  VALS(v8_link_status_values),   0x0,                 NULL, HFILL} },
    { &hf_status,       { "Link Status",    "m2pa.status",         FT_UINT32, BASE_DEC,  VALS(link_status_values),      0x0,                 NULL, HFILL} },
    { &hf_filler,       { "Filler",         "m2pa.filler",         FT_BYTES,  BASE_NONE, NULL,                          0x0,                 NULL, HFILL} },
    { &hf_unknown_data, { "Unknown Data",   "m2pa.unknown_data",   FT_BYTES,  BASE_NONE, NULL,                          0x0,                 NULL, HFILL} },
    { &hf_undecode_data,{ "Undecoded data", "m2pa.undecoded_data", FT_BYTES,  BASE_NONE, NULL,                          0x0,                 NULL, HFILL} }
  };

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

  static const enum_val_t m2pa_version_options[] = {
    { "draft-2",  "Internet Draft version 2",  M2PA_V02     },
    { "draft-8",  "Internet Draft version 8",  M2PA_V08     },
    { "RFC4165",  "RFC 4165",                  M2PA_RFC4165 },
    { NULL, NULL, 0 }
  };

  proto_m2pa = proto_register_protocol("MTP2 Peer Adaptation Layer", "M2PA", "m2pa");

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

  /* Allow other dissectors to find this one by name. */
  register_dissector("m2pa", dissect_m2pa, proto_m2pa);

  m2pa_module = prefs_register_protocol(proto_m2pa, proto_reg_handoff_m2pa);

  prefs_register_enum_preference(m2pa_module, "version", "M2PA version", "Version used by Wireshark", &m2pa_version, m2pa_version_options, FALSE);
  prefs_register_uint_preference(m2pa_module, "port", "M2PA SCTP Port", "Set the port for M2PA messages (Default of 3565)", 10, &global_sctp_port);
}
开发者ID:akimac,项目名称:wireshark-1.10.0,代码行数:53,代码来源:packet-m2pa.c

示例14: proto_register_op_uavtalk

void proto_register_op_uavtalk(void)
{
    module_t *op_uavtalk_module;

    static hf_register_info hf[] = {
        { &hf_op_uavtalk_sync,
            { "Sync Byte",           "uavtalk.sync",   FT_UINT8,
            BASE_HEX, NULL, 0x0, NULL, HFILL }
        },
        { &hf_op_uavtalk_version,
            { "Version",             "uavtalk.ver",    FT_UINT8,
            BASE_DEC, NULL, 0xf8, NULL, HFILL }
        },
        { &hf_op_uavtalk_type,
            { "Type",                "uavtalk.type",   FT_UINT8,
            BASE_HEX, VALS(uavtalk_packet_types), 0x07, NULL, HFILL }
        },
        { &hf_op_uavtalk_len,
            { "Length",              "uavtalk.len",    FT_UINT16,
            BASE_DEC, NULL, 0x0, NULL, HFILL }
        },
        { &hf_op_uavtalk_objid,
            { "ObjID",               "uavtalk.objid",  FT_UINT32,
            BASE_HEX, NULL, 0x0, NULL, HFILL }
        },
        { &hf_op_uavtalk_crc8,
            { "Crc8",                "uavtalk.crc8",   FT_UINT8,
            BASE_HEX, NULL, 0x0, NULL, HFILL }
        },
    };

/* Setup protocol subtree array */

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

    proto_op_uavtalk = proto_register_protocol("OpenPilot UAVTalk Protocol",
                                               "UAVTALK",
                                               "uavtalk");

    /* Allow subdissectors for each objid to bind for decoding */
    uavtalk_subdissector_table = register_dissector_table("uavtalk.objid", "UAVObject ID", FT_UINT32, BASE_HEX);

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

    op_uavtalk_module = prefs_register_protocol(proto_op_uavtalk, proto_reg_handoff_op_uavtalk);

    prefs_register_uint_preference(op_uavtalk_module, "udp.port", "UAVTALK UDP port",
                                   "UAVTALK port (default 9000)", 10, &global_op_uavtalk_port);
}
开发者ID:Alex-Rongzhen-Huang,项目名称:OpenPilot,代码行数:52,代码来源:packet-op-uavtalk.c

示例15: proto_register_x2ap

/*--- proto_register_x2ap -------------------------------------------*/
void proto_register_x2ap(void) {

  /* List of fields */

  static hf_register_info hf[] = {
    { &hf_x2ap_transportLayerAddressIPv4,
      { "transportLayerAddress(IPv4)", "x2ap.transportLayerAddressIPv4",
        FT_IPv4, BASE_NONE, NULL, 0,
        NULL, HFILL }},
    { &hf_x2ap_transportLayerAddressIPv6,
      { "transportLayerAddress(IPv6)", "x2ap.transportLayerAddressIPv6",
        FT_IPv6, BASE_NONE, NULL, 0,
        NULL, HFILL }},

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

  /* List of subtrees */
  static gint *ett[] = {
		  &ett_x2ap,
		  &ett_x2ap_TransportLayerAddress,
#include "packet-x2ap-ettarr.c"
  };

  module_t *x2ap_module;

  /* Register protocol */
  proto_x2ap = proto_register_protocol(PNAME, PSNAME, PFNAME);
  /* Register fields and subtrees */
  proto_register_field_array(proto_x2ap, hf, array_length(hf));
  proto_register_subtree_array(ett, array_length(ett));

  /* Register dissector */
  register_dissector("x2ap", dissect_x2ap, proto_x2ap);

  /* Register dissector tables */
  x2ap_ies_dissector_table = register_dissector_table("x2ap.ies", "X2AP-PROTOCOL-IES", FT_UINT32, BASE_DEC);
  x2ap_extension_dissector_table = register_dissector_table("x2ap.extension", "X2AP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
  x2ap_proc_imsg_dissector_table = register_dissector_table("x2ap.proc.imsg", "X2AP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
  x2ap_proc_sout_dissector_table = register_dissector_table("x2ap.proc.sout", "X2AP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
  x2ap_proc_uout_dissector_table = register_dissector_table("x2ap.proc.uout", "X2AP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);

  /* Register configuration options for ports */
  x2ap_module = prefs_register_protocol(proto_x2ap, proto_reg_handoff_x2ap);

  prefs_register_uint_preference(x2ap_module, "sctp.port",
                                 "X2AP SCTP Port",
                                 "Set the SCTP port for X2AP messages",
                                 10,
                                 &gbl_x2apSctpPort);

}
开发者ID:Sherkyoung,项目名称:wireshark,代码行数:53,代码来源:packet-x2ap-template.c


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