コード例 #1
0
ファイル: gcp.c プロジェクト: AkhilaAG/gluster-wireshark-1.4
void gcp_init(void) {
    static gboolean gcp_initialized = FALSE;

    if (gcp_initialized)
        return;

    msgs = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "gcp_msgs");
    trxs = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "gcp_trxs");
    ctxs_by_trx = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "gcp_ctxs_by_trx");
    ctxs = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "gcp_ctxs");
    gcp_initialized = TRUE;
}
コード例 #2
0
ファイル: packet-hci_h1.c プロジェクト: parc-wifi/wireshark
void
proto_register_hci_h1(void)
{
	static hf_register_info hf[] = {
	{ &hf_hci_h1_type,
		{ "HCI Packet Type",           "hci_h1.type",
		FT_UINT8, BASE_HEX, VALS(hci_h1_type_vals), 0x0,
		NULL, HFILL }},

	{ &hf_hci_h1_direction,
		{ "Direction",           "hci_h1.direction",
		FT_INT8, BASE_DEC, VALS(hci_h1_direction_vals), 0x0,
		"HCI Packet Direction Sent/Rcvd/Unknown", HFILL }},

	};

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

	proto_hci_h1 = proto_register_protocol("Bluetooth HCI",
	    "HCI_H1", "hci_h1");

	register_dissector("hci_h1", dissect_hci_h1, proto_hci_h1);

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

	hci_h1_table = register_dissector_table("hci_h1.type",
		"HCI h1 pdu type", FT_UINT8, BASE_HEX);

	chandle_to_bdaddr_table = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "hci adapter/chandle to bdaddr");
	bdaddr_to_name_table = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "hci bdaddr to name");
	localhost_bdaddr = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "hci adaper/frame to bdaddr");
	localhost_name = se_tree_create(EMEM_TREE_TYPE_RED_BLACK, "hci adaper/frame to name");
}