本文整理汇总了C++中prefs_register_protocol函数的典型用法代码示例。如果您正苦于以下问题:C++ prefs_register_protocol函数的具体用法?C++ prefs_register_protocol怎么用?C++ prefs_register_protocol使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了prefs_register_protocol函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: proto_register_hci_usb
//.........这里部分代码省略.........
{ "Message fragment overlap", "hci_usb.msg.fragment.overlap",
FT_BOOLEAN, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_fragment_overlap_conflicts,
{ "Message fragment overlapping with conflicting data", "hci_usb.msg.fragment.overlap.conflicts",
FT_BOOLEAN, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_fragment_multiple_tails,
{ "Message has multiple tail fragments", "hci_usb.msg.fragment.multiple_tails",
FT_BOOLEAN, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_fragment_too_long_fragment,
{ "Message fragment too long", "hci_usb.msg.fragment.too_long_fragment",
FT_BOOLEAN, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_fragment_error,
{ "Message defragmentation error", "hci_usb.msg.fragment.error",
FT_FRAMENUM, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_fragment_count,
{ "Message fragment count", "hci_usb.msg.fragment.count",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_reassembled_in,
{ "Reassembled in", "hci_usb.msg.reassembled.in",
FT_FRAMENUM, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_reassembled_length,
{ "Reassembled MP2T length", "hci_usb.msg.reassembled.length",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthci_usb_packet_fragment,
{ "Packet Fragment", "hci_usb.packet.fragment",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthci_usb_packet_complete,
{ "Packet Complete", "hci_usb.packet.complete",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthci_usb_packet_unknown_fragment,
{ "Unknown Packet Fragment", "hci_usb.packet.unknown_fragment",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthci_usb_setup_request,
{ "bRequest", "hci_usb.setup.bRequest",
FT_UINT8, BASE_DEC | BASE_EXT_STRING, &request_vals_ext, 0x0,
NULL, HFILL }},
{ &hf_bthci_usb_setup_value,
{ "wValue", "hci_usb.setup.wValue",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_bthci_usb_setup_adapter_id,
{ "Adapter ID", "hci_usb.setup.adapter_id",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_bthci_usb_setup_length,
{ "wLength", "hci_usb.setup.wLength",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_bthci_usb_data,
{ "Unknown Data", "hci_usb.data",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL }
}
};
static gint *ett[] = {
&ett_hci_usb,
&ett_hci_usb_msg_fragment,
&ett_hci_usb_msg_fragments,
};
reassembly_table_init(&hci_usb_reassembly_table,
&addresses_reassembly_table_functions);
fragment_info_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
proto_hci_usb = proto_register_protocol("Bluetooth HCI USB Transport", "HCI_USB", "hci_usb");
proto_register_field_array(proto_hci_usb, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
hci_usb_handle = register_dissector("hci_usb", dissect_hci_usb, proto_hci_usb);
module = prefs_register_protocol(proto_hci_usb, NULL);
prefs_register_static_text_preference(module, "bthci_usb.version",
"Bluetooth HCI USB Transport from Core 4.0",
"Version of protocol supported by this dissector.");
}
示例2: proto_register_bvlc
void
proto_register_bvlc(void)
{
static hf_register_info hf[] = {
{ &hf_bvlc_type,
{ "Type", "bvlc.type",
FT_UINT8, BASE_HEX, VALS(bvlc_types), 0,
NULL, HFILL }
},
{ &hf_bvlc_function,
{ "Function", "bvlc.function",
FT_UINT8, BASE_HEX, VALS(bvlc_function_names), 0,
"BVLC Function", HFILL }
},
{ &hf_bvlc_length,
{ "BVLC-Length", "bvlc.length",
FT_UINT16, BASE_DEC, NULL, 0,
"Length of BVLC", HFILL }
},
/* We should bitmask the result correctly when we have a
* packet to dissect */
{ &hf_bvlc_result,
{ "Result", "bvlc.result",
FT_UINT16, BASE_HEX, NULL, 0,
"Result Code", HFILL }
},
{ &hf_bvlc_bdt_ip,
{ "IP", "bvlc.bdt_ip",
FT_IPv4, BASE_NONE, NULL, 0,
"BDT IP", HFILL }
},
{ &hf_bvlc_bdt_port,
{ "Port", "bvlc.bdt_port",
FT_UINT16, BASE_DEC, NULL, 0,
"BDT Port", HFILL }
},
{ &hf_bvlc_bdt_mask,
{ "Mask", "bvlc.bdt_mask",
FT_BYTES, BASE_NONE, NULL, 0,
"BDT Broadcast Distribution Mask", HFILL }
},
{ &hf_bvlc_reg_ttl,
{ "TTL", "bvlc.reg_ttl",
FT_UINT16, BASE_DEC, NULL, 0,
"Foreign Device Time To Live", HFILL }
},
{ &hf_bvlc_fdt_ip,
{ "IP", "bvlc.fdt_ip",
FT_IPv4, BASE_NONE, NULL, 0,
"FDT IP", HFILL }
},
{ &hf_bvlc_fdt_port,
{ "Port", "bvlc.fdt_port",
FT_UINT16, BASE_DEC, NULL, 0,
"FDT Port", HFILL }
},
{ &hf_bvlc_fdt_ttl,
{ "TTL", "bvlc.fdt_ttl",
FT_UINT16, BASE_DEC, NULL, 0,
"Foreign Device Time To Live", HFILL }
},
{ &hf_bvlc_fdt_timeout,
{ "Timeout", "bvlc.fdt_timeout",
FT_UINT16, BASE_DEC, NULL, 0,
"Foreign Device Timeout (seconds)", HFILL }
},
{ &hf_bvlc_fwd_ip,
{ "IP", "bvlc.fwd_ip",
FT_IPv4, BASE_NONE, NULL, 0,
"FWD IP", HFILL }
},
{ &hf_bvlc_fwd_port,
{ "Port", "bvlc.fwd_port",
FT_UINT16, BASE_DEC, NULL, 0,
"FWD Port", HFILL }
},
};
static gint *ett[] = {
&ett_bvlc,
&ett_bdt,
&ett_fdt,
};
module_t *bvlc_module;
proto_bvlc = proto_register_protocol("BACnet Virtual Link Control",
"BVLC", "bvlc");
proto_register_field_array(proto_bvlc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
bvlc_module = prefs_register_protocol(proto_bvlc, proto_reg_handoff_bvlc);
prefs_register_uint_preference(bvlc_module, "additional_udp_port",
"Additional UDP port", "Set an additional UDP port, "
"besides the standard X'BAC0' (47808) port.",
10, &global_additional_bvlc_udp_port);
new_register_dissector("bvlc", dissect_bvlc, proto_bvlc);
//.........这里部分代码省略.........
示例3: proto_register_ismacryp
//.........这里部分代码省略.........
{ "Unused bits", "ismacryp.unused", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }}
};
static gint *ett[] =
{
&ett_ismacryp,
&ett_ismacryp_header,
&ett_ismacryp_header_byte,
&ett_ismacryp_message
};
static enum_val_t version_types[] = {
{PROTO_TAG_ISMACRYP_11, "ISMACryp v1.1", V11},
{PROTO_TAG_ISMACRYP_20, "ISMACryp v2.0", V20},
{NULL, NULL, -1}
};
static enum_val_t mode_types[] = {
{"aac-hbr", "aac-hbr", AAC_HBR_MODE},
{"mpeg4-video", "mpeg4-video", MPEG4_VIDEO_MODE},
{"avc-video", "avc-video", AVC_VIDEO_MODE},
{NULL, NULL, -1}
};
module_t *ismacryp_module;
proto_ismacryp = proto_register_protocol ("ISMACryp Protocol", "ISMACRYP", "ismacryp");
proto_register_field_array (proto_ismacryp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
/* Register our configuration options for ismacryp */
/* this registers our preferences, function proto_reg_handoff_ismacryp is called when preferences are applied */
ismacryp_module = prefs_register_protocol(proto_ismacryp, proto_reg_handoff_ismacryp);
prefs_register_uint_preference(ismacryp_module, "dynamic.payload.type",
"ISMACryp dynamic payload type",
"The dynamic payload type which will be interpreted as ISMACryp",
10,
&pref_dynamic_payload_type);
prefs_register_enum_preference(ismacryp_module, "version",
"ISMACryp version",
"ISMACryp version",
&version_type, version_types, TRUE);
prefs_register_static_text_preference(ismacryp_module, "text_override",
"The following option allows the version to be set manually"
" and to override the version if detected from RTP payload type:",
"The following option allows the version to be set manually"
" and to override the version if detected from RTP payload type:");
prefs_register_bool_preference(ismacryp_module,
"override_rtp_pt","Override RTP payload type for version",
"Indicates whether or not the ISMACryp version deduced"
" from RTP payload type, if present, is used or whether the"
" version above is used",
&override_flag);
/* ISMACryp v11 parameters */
prefs_register_static_text_preference(ismacryp_module,
"v11_parameters",
"ISMACryp v1.1 parameters:",
"ISMACryp v1.1 parameters declared in SDP");
prefs_register_uint_preference(ismacryp_module,
示例4: proto_register_eth
void
proto_register_eth(void)
{
static hf_register_info hf[] = {
{ &hf_eth_dst,
{ "Destination", "eth.dst", FT_ETHER, BASE_NONE, NULL, 0x0,
"Destination Hardware Address", HFILL }},
{ &hf_eth_src,
{ "Source", "eth.src", FT_ETHER, BASE_NONE, NULL, 0x0,
"Source Hardware Address", HFILL }},
{ &hf_eth_len,
{ "Length", "eth.len", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
/* registered here but handled in packet-ethertype.c */
{ &hf_eth_type,
{ "Type", "eth.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
NULL, HFILL }},
{ &hf_eth_invalid_lentype,
{ "Invalid length/type", "eth.invalid_lentype", FT_UINT16, BASE_HEX_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_eth_addr,
{ "Address", "eth.addr", FT_ETHER, BASE_NONE, NULL, 0x0,
"Source or Destination Hardware Address", HFILL }},
{ &hf_eth_padding,
{ "Padding", "eth.padding", FT_BYTES, BASE_NONE, NULL, 0x0,
"Ethernet Padding", HFILL }},
{ &hf_eth_trailer,
{ "Trailer", "eth.trailer", FT_BYTES, BASE_NONE, NULL, 0x0,
"Ethernet Trailer or Checksum", HFILL }},
{ &hf_eth_fcs,
{ "Frame check sequence", "eth.fcs", FT_UINT32, BASE_HEX, NULL, 0x0,
"Ethernet checksum", HFILL }},
{ &hf_eth_fcs_good,
{ "FCS Good", "eth.fcs_good", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"True: checksum matches packet content; False: doesn't match content or not checked", HFILL }},
{ &hf_eth_fcs_bad,
{ "FCS Bad", "eth.fcs_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"True: checksum doesn't matche packet content; False: does match content or not checked", HFILL }},
{ &hf_eth_lg,
{ "LG bit", "eth.lg", FT_BOOLEAN, 24,
TFS(&lg_tfs), 0x020000,
"Specifies if this is a locally administered or globally unique (IEEE assigned) address", HFILL }},
{ &hf_eth_ig,
{ "IG bit", "eth.ig", FT_BOOLEAN, 24,
TFS(&ig_tfs), 0x010000,
"Specifies if this is an individual (unicast) or group (broadcast/multicast) address", HFILL }}
};
static gint *ett[] = {
&ett_ieee8023,
&ett_ether2,
&ett_ether,
&ett_addr,
&ett_eth_fcs
};
static ei_register_info ei[] = {
{ &ei_eth_invalid_lentype, { "eth.invalid_lentype", PI_PROTOCOL, PI_WARN, "Invalid length/type", EXPFILL }},
{ &ei_eth_src_not_group, { "eth.src_not_group", PI_PROTOCOL, PI_WARN, "Source MAC must not be a group address: IEEE 802.3-2002, Section 3.2.3(b)", EXPFILL }},
{ &ei_eth_fcs_bad, { "eth.fcs_bad.expert", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }},
};
module_t *eth_module;
expert_module_t* expert_eth;
proto_eth = proto_register_protocol("Ethernet", "Ethernet", "eth");
proto_register_field_array(proto_eth, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_eth = expert_register_protocol(proto_eth);
expert_register_field_array(expert_eth, ei, array_length(ei));
/* subdissector code */
register_heur_dissector_list("eth", &heur_subdissector_list);
register_heur_dissector_list("eth.trailer", ð_trailer_subdissector_list);
/* Register configuration preferences */
eth_module = prefs_register_protocol(proto_eth, NULL);
prefs_register_bool_preference(eth_module, "assume_padding",
"Assume short frames which include a trailer contain padding",
"Some devices add trailing data to frames. When this setting is checked "
"the Ethernet dissector will assume there has been added padding to the "
"frame before the trailer was added. Uncheck if a device added a trailer "
"before the frame was padded.",
ð_assume_padding);
prefs_register_uint_preference(eth_module, "trailer_length",
"Fixed ethernet trailer length",
//.........这里部分代码省略.........
示例5: proto_register_t38
/* Wireshark Protocol Registration */
void
proto_register_t38(void)
{
static hf_register_info hf[] =
{
#include "packet-t38-hfarr.c"
{ &hf_t38_setup,
{ "Stream setup", "t38.setup", FT_STRING, BASE_NONE,
NULL, 0x0, "Stream setup, method and frame number", HFILL }},
{ &hf_t38_setup_frame,
{ "Stream frame", "t38.setup-frame", FT_FRAMENUM, BASE_NONE,
NULL, 0x0, "Frame that set up this stream", HFILL }},
{ &hf_t38_setup_method,
{ "Stream Method", "t38.setup-method", FT_STRING, BASE_NONE,
NULL, 0x0, "Method used to set up this stream", HFILL }},
{&hf_t38_fragments,
{"Message fragments", "t38.fragments",
FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } },
{&hf_t38_fragment,
{"Message fragment", "t38.fragment",
FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
{&hf_t38_fragment_overlap,
{"Message fragment overlap", "t38.fragment.overlap",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{&hf_t38_fragment_overlap_conflicts,
{"Message fragment overlapping with conflicting data",
"t38.fragment.overlap.conflicts",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{&hf_t38_fragment_multiple_tails,
{"Message has multiple tail fragments",
"t38.fragment.multiple_tails",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{&hf_t38_fragment_too_long_fragment,
{"Message fragment too long", "t38.fragment.too_long_fragment",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{&hf_t38_fragment_error,
{"Message defragmentation error", "t38.fragment.error",
FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
{&hf_t38_fragment_count,
{"Message fragment count", "t38.fragment.count",
FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } },
{&hf_t38_reassembled_in,
{"Reassembled in", "t38.reassembled.in",
FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
{&hf_t38_reassembled_length,
{"Reassembled T38 length", "t38.reassembled.length",
FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } },
};
static gint *ett[] =
{
&ett_t38,
#include "packet-t38-ettarr.c"
&ett_t38_setup,
&ett_data_fragment,
&ett_data_fragments
};
module_t *t38_module;
proto_t38 = proto_register_protocol("T.38", "T.38", "t38");
proto_register_field_array(proto_t38, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("t38", dissect_t38, proto_t38);
/* Init reassemble tables for HDLC */
register_init_routine(t38_defragment_init);
t38_tap = register_tap("t38");
t38_module = prefs_register_protocol(proto_t38, proto_reg_handoff_t38);
prefs_register_bool_preference(t38_module, "use_pre_corrigendum_asn1_specification",
"Use the Pre-Corrigendum ASN.1 specification",
"Whether the T.38 dissector should decode using the Pre-Corrigendum T.38 "
"ASN.1 specification (1998).",
&use_pre_corrigendum_asn1_specification);
prefs_register_bool_preference(t38_module, "dissect_possible_rtpv2_packets_as_rtp",
"Dissect possible RTP version 2 packets with RTP dissector",
"Whether a UDP packet that looks like RTP version 2 packet will "
"be dissected as RTP packet or T.38 packet. If enabled there is a risk that T.38 UDPTL "
"packets with sequence number higher than 32767 may be dissected as RTP.",
&dissect_possible_rtpv2_packets_as_rtp);
prefs_register_uint_preference(t38_module, "tcp.port",
"T.38 TCP Port",
"Set the TCP port for T.38 messages",
10, &global_t38_tcp_port);
prefs_register_uint_preference(t38_module, "udp.port",
"T.38 UDP Port",
"Set the UDP port for T.38 messages",
10, &global_t38_udp_port);
prefs_register_bool_preference(t38_module, "reassembly",
"Reassemble T.38 PDUs over TPKT over TCP",
"Whether the dissector should reassemble T.38 PDUs spanning multiple TCP segments "
"when TPKT is used over TCP. "
"To use this option, you must also enable \"Allow subdissectors to reassemble "
"TCP streams\" in the TCP protocol settings.",
&t38_tpkt_reassembly);
prefs_register_enum_preference(t38_module, "tpkt_usage",
"TPKT used over TCP",
//.........这里部分代码省略.........
示例6: proto_register_bthcrp
//.........这里部分代码省略.........
FT_UINT16, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthcrp_control_client_credit_granted,
{ "Client Credit Granted", "bthcrp.client_credit_granted",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthcrp_control_server_credit_granted,
{ "Server Credit Granted", "bthcrp.server_credit_granted",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthcrp_control_client_credit_return,
{ "Client Credit Return", "bthcrp.client_credit_return",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthcrp_control_server_credit_return,
{ "Server Credit Return", "bthcrp.server_credit_return",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthcrp_control_client_credit_query,
{ "Client Credit Query", "bthcrp.client_credit_query",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthcrp_control_server_credit_query,
{ "Server Credit Query", "bthcrp.server_credit_query",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_bthcrp_control_status_reserved_76,
{ "Reserved", "bthcrp.status.reserved76",
FT_UINT8, BASE_DEC, NULL, 0xC0,
NULL, HFILL }
},
{ &hf_bthcrp_control_status_paper_empty,
{ "Paper Empty", "bthcrp.status.paper_empty",
FT_BOOLEAN, 8, NULL, 0x20,
NULL, HFILL }
},
{ &hf_bthcrp_control_status_select,
{ "Select", "bthcrp.status.select",
FT_BOOLEAN, 8, NULL, 0x10,
NULL, HFILL }
},
{ &hf_bthcrp_control_status_not_error,
{ "Not Error", "bthcrp.status.not_error",
FT_BOOLEAN, 8, NULL, 0x08,
NULL, HFILL }
},
{ &hf_bthcrp_control_status_reserved_20,
{ "Reserved", "bthcrp.status.reserved210",
FT_UINT8, BASE_HEX, NULL, 0x07,
NULL, HFILL }
},
{ &hf_bthcrp_data,
{ "Data", "bthcrp.data",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL }
}
};
static gint *ett[] = {
&ett_bthcrp
};
static ei_register_info ei[] = {
{ &ei_bthcrp_control_parameter_length, { "bthcrp.control_parameter_length.bad", PI_PROTOCOL, PI_WARN, "Length bad", EXPFILL }},
{ &ei_bthcrp_unexpected_data, { "bthcrp.unexpected_data", PI_PROTOCOL, PI_WARN, "Unexpected data", EXPFILL }},
};
proto_bthcrp = proto_register_protocol("Bluetooth HCRP Profile", "BT HCRP", "bthcrp");
register_dissector("bthcrp", dissect_bthcrp, proto_bthcrp);
proto_register_field_array(proto_bthcrp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_bthcrp = expert_register_protocol(proto_bthcrp);
expert_register_field_array(expert_bthcrp, ei, array_length(ei));
module = prefs_register_protocol(proto_bthcrp, NULL);
prefs_register_static_text_preference(module, "hcrp.version",
"Bluetooth Profile HCRP version: 1.2",
"Version of profile supported by this dissector.");
prefs_register_bool_preference(module, "hcrp.is_client", "Client Source?",
"If \"true\" logs should be treat as from Client side, otherwise as from Server side",
&is_client);
prefs_register_uint_preference(module, "hcrp.control.psm", "L2CAP PSM for Control",
"L2CAP PSM for Control",
10, &psm_control);
prefs_register_uint_preference(module, "hcrp.data.psm", "L2CAP PSM for Data",
"L2CAP PSM for Data",
10, &psm_data_stream);
prefs_register_uint_preference(module, "hcrp.notification.psm", "L2CAP PSM for Notification",
"L2CAP PSM for Notification",
10, &psm_notification);
}
示例7: proto_register_dmx_chan
void
proto_register_dmx_chan(void)
{
static hf_register_info hf[] = {
{ &hf_dmx_chan_output_data_filter,
{ "DMX data filter",
"dmx_chan.data_filter",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_dmx_chan_output_dmx_data,
{ "DMX data",
"dmx_chan.dmx_data",
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
};
static gint *ett[] = {
&ett_dmx_chan
};
module_t *dmx_chan_module;
static enum_val_t disp_chan_val_types[] = {
{ "pro", "Percent", 0 },
{ "hex", "Hexadecimal", 1 },
{ "dec", "Decimal", 2 },
{ NULL, NULL, 0 }
};
static enum_val_t disp_chan_nr_types[] = {
{ "hex", "Hexadecimal", 0 },
{ "dec", "Decimal", 1 },
{ NULL, NULL, 0 }
};
static enum_val_t col_count[] = {
{ "6", "6", 6 },
{ "10", "10", 10 },
{ "12", "12", 12 },
{ "16", "16", 16 },
{ "24", "24", 24 },
{ NULL, NULL, 0 }
};
proto_dmx_chan = proto_register_protocol("DMX Channels","DMX Channels", "dmx-chan");
proto_register_field_array(proto_dmx_chan, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("dmx-chan", dissect_dmx_chan, proto_dmx_chan);
dmx_chan_module = prefs_register_protocol(proto_dmx_chan, NULL);
prefs_register_enum_preference(dmx_chan_module, "dmx_disp_chan_val_type",
"DMX Display channel value type",
"The way DMX values are displayed",
&global_disp_chan_val_type,
disp_chan_val_types, FALSE);
prefs_register_enum_preference(dmx_chan_module, "dmx_disp_chan_nr_type",
"DMX Display channel nr. type",
"The way DMX channel numbers are displayed",
&global_disp_chan_nr_type,
disp_chan_nr_types, FALSE);
prefs_register_enum_preference(dmx_chan_module, "dmx_disp_col_count",
"DMX Display Column Count",
"The number of columns for the DMX display",
&global_disp_col_count,
col_count, FALSE);
}
示例8: proto_register_lapdm
//.........这里部分代码省略.........
{ "Command", "lapdm.control.u_modifier_cmd", FT_UINT8, BASE_HEX,
VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }},
{ &hf_lapdm_u_modifier_resp,
{ "Response", "lapdm.control.u_modifier_resp", FT_UINT8, BASE_HEX,
VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }},
{ &hf_lapdm_ftype_i,
{ "Frame type", "lapdm.control.ftype", FT_UINT8, BASE_HEX,
VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }},
{ &hf_lapdm_ftype_s_u,
{ "Frame type", "lapdm.control.ftype", FT_UINT8, BASE_HEX,
VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }},
{ &hf_lapdm_length,
{ "Length Field", "lapdm.length_field", FT_UINT8, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_lapdm_el,
{ "EL", "lapdm.el", FT_UINT8, BASE_DEC,
VALS(lapdm_el_vals), LAPDM_EL, "Length indicator field extension bit", HFILL }},
{ &hf_lapdm_m,
{ "M", "lapdm.m", FT_UINT8, BASE_DEC,
VALS(lapdm_m_vals), LAPDM_M, "More data bit", HFILL }},
{ &hf_lapdm_len,
{ "Length", "lapdm.length", FT_UINT8, BASE_DEC,
NULL, LAPDM_LEN, "Length indicator", HFILL }},
/* Fragment reassembly
*/
{ &hf_lapdm_fragments,
{ "Message fragments", "lapdm.fragments", FT_NONE, BASE_NONE,
NULL, 0x00, "LAPDm Message fragments", HFILL }},
{ &hf_lapdm_fragment,
{ "Message fragment", "lapdm.fragment", FT_FRAMENUM, BASE_NONE,
NULL, 0x00, "LAPDm Message fragment", HFILL }},
{ &hf_lapdm_fragment_overlap,
{ "Message fragment overlap", "lapdm.fragment.overlap", FT_BOOLEAN, BASE_NONE,
NULL, 0x0, "LAPDm Message fragment overlaps with other fragment(s)", HFILL }},
{ &hf_lapdm_fragment_overlap_conflicts,
{ "Message fragment overlapping with conflicting data", "lapdm.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE,
NULL, 0x0, "LAPDm Message fragment overlaps with conflicting data", HFILL }},
{ &hf_lapdm_fragment_multiple_tails,
{ "Message has multiple tail fragments", "lapdm.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE,
NULL, 0x0, "LAPDm Message fragment has multiple tail fragments", HFILL }},
{ &hf_lapdm_fragment_too_long_fragment,
{ "Message fragment too long", "lapdm.fragment.too_long_fragment", FT_BOOLEAN, BASE_NONE,
NULL, 0x0, "LAPDm Message fragment data goes beyond the packet end", HFILL }},
{ &hf_lapdm_fragment_error,
{ "Message defragmentation error", "lapdm.fragment.error", FT_FRAMENUM, BASE_NONE,
NULL, 0x00, "LAPDm Message defragmentation error due to illegal fragments", HFILL }},
{ &hf_lapdm_fragment_count,
{ "Message fragment count", "lapdm.fragment.count", FT_UINT32, BASE_DEC,
NULL, 0x00, NULL, HFILL }},
{ &hf_lapdm_reassembled_in,
{ "Reassembled in", "lapdm.reassembled.in", FT_FRAMENUM, BASE_NONE,
NULL, 0x00, "LAPDm Message has been reassembled in this packet.", HFILL }},
{ &hf_lapdm_reassembled_length,
{ "Reassembled LAPDm length", "lapdm.reassembled.length", FT_UINT32, BASE_DEC,
NULL, 0x00, "The total length of the reassembled payload", HFILL }}
};
static gint *ett[] = {
&ett_lapdm,
&ett_lapdm_address,
&ett_lapdm_control,
&ett_lapdm_length,
&ett_lapdm_fragment,
&ett_lapdm_fragments
};
module_t *lapdm_module;
proto_lapdm = proto_register_protocol("Link Access Procedure, Channel Dm (LAPDm)", "LAPDm", "lapdm");
proto_register_field_array (proto_lapdm, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("lapdm", dissect_lapdm, proto_lapdm);
lapdm_sapi_dissector_table = register_dissector_table("lapdm.sapi", "LAPDm SAPI", FT_UINT8, BASE_DEC);
lapdm_module = prefs_register_protocol(proto_lapdm, NULL);
prefs_register_bool_preference(lapdm_module, "reassemble",
"Reassemble fragmented LAPDm packets",
"Whether the dissector should defragment LAPDm messages spanning multiple packets.",
&reassemble_lapdm);
register_init_routine (lapdm_defragment_init);
}
示例9: proto_register_pgm
//.........这里部分代码省略.........
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_opt_redirect_res,
{ "Reserved", "pgm.opts.redirect.res", FT_UINT8, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_opt_redirect_afi,
{ "DLR AFI", "pgm.opts.redirect.afi", FT_UINT16, BASE_DEC,
VALS(afn_vals), 0x0, NULL, HFILL }},
{ &hf_pgm_opt_redirect_res2,
{ "Reserved", "pgm.opts.redirect.res2", FT_UINT16, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_opt_redirect_dlr,
{ "DLR", "pgm.opts.redirect.dlr", FT_IPv4, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_opt_redirect_dlr6,
{ "DLR", "pgm.opts.redirect.dlr", FT_IPv6, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_opt_fragment_res,
{ "Reserved", "pgm.opts.fragment.res", FT_UINT8, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_opt_fragment_first_sqn,
{ "First Sequence Number", "pgm.opts.fragment.first_sqn", FT_UINT32, BASE_HEX,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_opt_fragment_offset,
{ "Fragment Offset", "pgm.opts.fragment.fragment_offset", FT_UINT32, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_pgm_opt_fragment_total_length,
{ "Total Length", "pgm.opts.fragment.total_length", FT_UINT32, BASE_DEC,
NULL, 0x0, NULL, HFILL }}
};
static gint *ett[] = {
&ett_pgm,
&ett_pgm_optbits,
&ett_pgm_spm,
&ett_pgm_data,
&ett_pgm_nak,
&ett_pgm_poll,
&ett_pgm_polr,
&ett_pgm_ack,
&ett_pgm_opts,
&ett_pgm_opts_join,
&ett_pgm_opts_parityprm,
&ett_pgm_opts_paritygrp,
&ett_pgm_opts_naklist,
&ett_pgm_opts_ccdata,
&ett_pgm_opts_nak_bo_ivl,
&ett_pgm_opts_nak_bo_rng,
&ett_pgm_opts_redirect,
&ett_pgm_opts_fragment
};
static ei_register_info ei[] = {
{ &ei_pgm_opt_type, { "pgm.opts.type.invalid", PI_PROTOCOL, PI_WARN, "Invalid option", EXPFILL }},
{ &ei_pgm_opt_tlen, { "pgm.opts.tlen.invalid", PI_PROTOCOL, PI_WARN, "Total Length invalid", EXPFILL }},
{ &ei_pgm_genopt_len, { "pgm.genopts.len.invalid", PI_PROTOCOL, PI_WARN, "Option length invalid", EXPFILL }},
{ &ei_address_format_invalid, { "pgm.address_format_invalid", PI_PROTOCOL, PI_WARN, "Can't handle this address format", EXPFILL }},
};
module_t *pgm_module;
expert_module_t* expert_pgm;
proto_pgm = proto_register_protocol("Pragmatic General Multicast",
"PGM", "pgm");
proto_register_field_array(proto_pgm, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_pgm = expert_register_protocol(proto_pgm);
expert_register_field_array(expert_pgm, ei, array_length(ei));
/* subdissector code */
subdissector_table = register_dissector_table("pgm.port",
"PGM port", FT_UINT16, BASE_DEC);
heur_subdissector_list = register_heur_dissector_list("pgm");
/*
* Register configuration preferences for UDP encapsulation
* (Note: Initially the ports are set to zero and the ports
* are not registered so the dissecting of PGM
* encapsulated in UDP packets is off by default;
* dissector_add_for_decode_as is called so that pgm
* is available for 'decode-as'
*/
pgm_module = prefs_register_protocol(proto_pgm, proto_reg_handoff_pgm);
prefs_register_bool_preference(pgm_module, "check_checksum",
"Check the validity of the PGM checksum when possible",
"Whether to check the validity of the PGM checksum",
&pgm_check_checksum);
prefs_register_uint_preference(pgm_module, "udp.encap_ucast_port",
"PGM Encap Unicast Port (standard is 3055)",
"PGM Encap is PGM packets encapsulated in UDP packets"
" (Note: This option is off, i.e. port is 0, by default)",
10, &udp_encap_ucast_port);
prefs_register_uint_preference(pgm_module, "udp.encap_mcast_port",
"PGM Encap Multicast Port (standard is 3056)",
"PGM Encap is PGM packets encapsulated in UDP packets"
" (Note: This option is off, i.e. port is 0, by default)",
10, &udp_encap_mcast_port);
}
示例10: proto_register_btbnep
//.........这里部分代码省略.........
NULL, HFILL }
},
{ &hf_btbnep_source_service_uuid,
{ "Source Service UUID", "btbnep.source_service_uuid",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_btbnep_setup_connection_response_message,
{ "Response Message", "btbnep.setup_connection_response_message",
FT_UINT16, BASE_HEX, VALS(setup_connection_response_message_vals), 0x00,
NULL, HFILL }
},
{ &hf_btbnep_filter_net_type_response_message,
{ "Response Message", "btbnep.filter_net_type_response_message",
FT_UINT16, BASE_HEX, VALS(filter_net_type_response_message_vals), 0x00,
NULL, HFILL }
},
{ &hf_btbnep_filter_multi_addr_response_message,
{ "Response Message", "btbnep.filter_multi_addr_response_message",
FT_UINT16, BASE_HEX, VALS(filter_multi_addr_response_message_vals), 0x00,
NULL, HFILL }
},
{ &hf_btbnep_list_length,
{ "List Length", "btbnep.list_length",
FT_UINT16, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
/* http://www.iana.org/assignments/ethernet-numbers */
{ &hf_btbnep_network_type_start,
{ "Network Protocol Type Range Start", "btbnep.network_type_start",
FT_UINT16, BASE_HEX, VALS(etype_vals), 0x00,
NULL, HFILL }
},
{ &hf_btbnep_network_type_end,
{ "Network Protocol Type Range End", "btbnep.network_type_end",
FT_UINT16, BASE_HEX, VALS(etype_vals), 0x00,
NULL, HFILL }
},
{ &hf_btbnep_multicast_address_start,
{ "Multicast Address Start", "btbnep.multicast_address_start",
FT_ETHER, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_btbnep_multicast_address_end,
{ "Multicast Address End", "btbnep.multicast_address_end",
FT_ETHER, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_btbnep_dst,
{ "Destination", "btbnep.dst",
FT_ETHER, BASE_NONE, NULL, 0x0,
"Destination Hardware Address", HFILL }
},
{ &hf_btbnep_src,
{ "Source", "btbnep.src",
FT_ETHER, BASE_NONE, NULL, 0x0,
"Source Hardware Address", HFILL }
},
{ &hf_btbnep_type,
{ "Type", "btbnep.type",
FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0,
NULL, HFILL }
},
{ &hf_btbnep_addr,
{ "Address", "btbnep.addr",
FT_ETHER, BASE_NONE, NULL, 0x0,
"Source or Destination Hardware Address", HFILL }
},
{ &hf_btbnep_lg,
{ "LG bit", "btbnep.lg",
FT_BOOLEAN, 24, TFS(&lg_tfs), 0x020000,
"Specifies if this is a locally administered or globally unique (IEEE assigned) address", HFILL }
},
{ &hf_btbnep_ig,
{ "IG bit", "btbnep.ig",
FT_BOOLEAN, 24, TFS(&ig_tfs), 0x010000,
"Specifies if this is an individual (unicast) or group (broadcast/multicast) address", HFILL }
}
};
static gint *ett[] = {
&ett_btbnep,
&ett_addr
};
proto_btbnep = proto_register_protocol("Bluetooth BNEP Protocol", "BT BNEP", "btbnep");
register_dissector("btbnep", dissect_btbnep, proto_btbnep);
proto_register_field_array(proto_btbnep, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
module = prefs_register_protocol(proto_btbnep, NULL);
prefs_register_static_text_preference(module, "bnep.version",
"Bluetooth Protocol BNEP version: 1.0",
"Version of protocol supported by this dissector.");
prefs_register_bool_preference(module, "bnep.top_dissect",
"Dissecting the top protocols", "Dissecting the top protocols",
&top_dissect);
}
示例11: proto_register_tacplus
void
proto_register_tacplus(void)
{
static hf_register_info hf[] = {
{ &hf_tacplus_response,
{ "Response", "tacplus.response",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if TACACS+ response", HFILL }},
{ &hf_tacplus_request,
{ "Request", "tacplus.request",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if TACACS+ request", HFILL }},
{ &hf_tacplus_majvers,
{ "Major version", "tacplus.majvers",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Major version number", HFILL }},
{ &hf_tacplus_minvers,
{ "Minor version", "tacplus.minvers",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Minor version number", HFILL }},
{ &hf_tacplus_type,
{ "Type", "tacplus.type",
FT_UINT8, BASE_DEC, VALS(tacplus_type_vals), 0x0,
NULL, HFILL }},
{ &hf_tacplus_seqno,
{ "Sequence number", "tacplus.seqno",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_tacplus_flags,
{ "Flags", "tacplus.flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_tacplus_flags_payload_type,
{ "Unencrypted", "tacplus.flags.unencrypted",
FT_BOOLEAN, 8, TFS(&tfs_set_notset), FLAGS_UNENCRYPTED,
"Is payload unencrypted?", HFILL }},
{ &hf_tacplus_flags_connection_type,
{ "Single Connection", "tacplus.flags.singleconn",
FT_BOOLEAN, 8, TFS(&tfs_set_notset), FLAGS_SINGLE,
"Is this a single connection?", HFILL }},
{ &hf_tacplus_acct_flags,
{ "Flags", "tacplus.acct.flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_tacplus_session_id,
{ "Session ID", "tacplus.session_id",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_tacplus_packet_len,
{ "Packet length", "tacplus.packet_len",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_tacplus,
&ett_tacplus_flags,
&ett_tacplus_acct_flags,
&ett_tacplus_body,
&ett_tacplus_body_chap,
};
module_t *tacplus_module;
proto_tacplus = proto_register_protocol("TACACS+", "TACACS+", "tacplus");
proto_register_field_array(proto_tacplus, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
tacplus_module = prefs_register_protocol (proto_tacplus, tacplus_pref_cb );
prefs_register_bool_preference(tacplus_module, "desegment", "Reassemble TACACS+ messages spanning multiple TCP segments.", "Whether the TACACS+ dissector should reassemble messages spanning multiple TCP segments. To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &tacplus_preference_desegment);
prefs_register_string_preference ( tacplus_module, "key",
"TACACS+ Encryption Key", "TACACS+ Encryption Key", &tacplus_opt_key );
}
示例12: proto_register_adb_service
//.........这里部分代码省略.........
{ "Unused", "adb_service.framebuffer.pixel.unused",
FT_UINT8, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_devices,
{ "Devices", "adb_service.devices",
FT_STRING, STR_ASCII, NULL, 0x00,
NULL, HFILL }
},
{ &hf_stdin,
{ "Stdin", "adb_service.stdin",
FT_STRING, STR_ASCII, NULL, 0x00,
NULL, HFILL }
},
{ &hf_stdout,
{ "Stdout", "adb_service.stdout",
FT_STRING, STR_ASCII, NULL, 0x00,
NULL, HFILL }
},
{ &hf_result,
{ "Result", "adb_service.result",
FT_STRING, STR_ASCII, NULL, 0x00,
NULL, HFILL }
},
{ &hf_pids,
{ "PIDs", "adb_service.pids",
FT_STRING, STR_ASCII, NULL, 0x00,
NULL, HFILL }
},
{ &hf_sync_id,
{ "Id", "adb_service.sync.id",
FT_STRING, STR_ASCII, NULL, 0x00,
NULL, HFILL }
},
{ &hf_sync_length,
{ "Length", "adb_service.sync.length",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_sync_mode,
{ "Mode", "adb_service.sync.mode",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_sync_size,
{ "Size", "adb_service.sync.size",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_sync_time,
{ "Last Modification Time", "adb_service.sync.time",
FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
NULL, HFILL }
},
{ &hf_sync_unused,
{ "Unused", "adb_service.sync.unused",
FT_BYTES, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
{ &hf_sync_data,
{ "Sync Data", "adb_service.sync.data",
FT_BYTES, BASE_NONE, NULL, 0x00,
NULL, HFILL }
},
};
static gint *ett[] = {
&ett_adb_service,
&ett_length,
&ett_version,
&ett_pixel,
&ett_data
};
static ei_register_info ei[] = {
{ &ei_incomplete_message, { "adb_service.expert.incomplete_message", PI_PROTOCOL, PI_WARN, "Incomplete message", EXPFILL }},
};
fragments = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
framebuffer_infos = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
continuation_infos = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
proto_adb_service = proto_register_protocol("Android Debug Bridge Service", "ADB Service", "adb_service");
adb_service_handle = register_dissector("adb_service", dissect_adb_service, proto_adb_service);
proto_register_field_array(proto_adb_service, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_module = expert_register_protocol(proto_adb_service);
expert_register_field_array(expert_module, ei, array_length(ei));
module = prefs_register_protocol(proto_adb_service, NULL);
prefs_register_static_text_preference(module, "version",
"ADB Service protocol version is compatible prior to: adb 1.0.31",
"Version of protocol supported by this dissector.");
prefs_register_bool_preference(module, "framebuffer_more_details",
"Dissect more detail for framebuffer service",
"Dissect more detail for framebuffer service",
&pref_dissect_more_detail_framebuffer);
}
示例13: proto_register_clnp
//.........这里部分代码省略.........
{ &hf_clnp_dest_length,
{ "DAL", "clnp.dsap.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_clnp_dest,
{ "DA", "clnp.dsap", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_clnp_src_length,
{ "SAL", "clnp.ssap.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_clnp_src,
{ "SA", "clnp.ssap", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_clnp_atntt,
{ "ATN traffic type", "clnp.atn.tt", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_clnp_atnsc,
{ "ATN security classification", "clnp.atn.sc", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_clnp_segment_overlap,
{ "Segment overlap", "clnp.segment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"Segment overlaps with other segments", HFILL }},
{ &hf_clnp_segment_overlap_conflict,
{ "Conflicting data in segment overlap", "clnp.segment.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"Overlapping segments contained conflicting data", HFILL }},
{ &hf_clnp_segment_multiple_tails,
{ "Multiple tail segments found", "clnp.segment.multipletails", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"Several tails were found when reassembling the packet", HFILL }},
{ &hf_clnp_segment_too_long_segment,
{ "Segment too long", "clnp.segment.toolongsegment", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"Segment contained data past end of packet", HFILL }},
{ &hf_clnp_segment_error,
{ "Reassembly error", "clnp.segment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
"Reassembly error due to illegal segments", HFILL }},
{ &hf_clnp_segment_count,
{ "Segment count", "clnp.segment.count", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_clnp_segment,
{ "CLNP Segment", "clnp.segment", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_clnp_segments,
{ "CLNP Segments", "clnp.segments", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_clnp_reassembled_in,
{ "Reassembled CLNP in frame", "clnp.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
"This CLNP packet is reassembled in this frame", HFILL }},
{ &hf_clnp_reassembled_length,
{ "Reassembled CLNP length", "clnp.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0,
"The total length of the reassembled payload", HFILL }}
};
static gint *ett[] = {
&ett_clnp,
&ett_clnp_type,
&ett_clnp_segments,
&ett_clnp_segment,
&ett_clnp_disc_pdu,
};
static ei_register_info ei[] = {
{ &ei_clnp_length, { "clnp.len.bad", PI_MALFORMED, PI_ERROR, "Header length value bad", EXPFILL }},
};
module_t *clnp_module;
expert_module_t* expert_clnp;
proto_clnp = proto_register_protocol(PROTO_STRING_CLNP, "CLNP", "clnp");
proto_register_field_array(proto_clnp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_clnp = expert_register_protocol(proto_clnp);
expert_register_field_array(expert_clnp, ei, array_length(ei));
register_dissector("clnp", dissect_clnp, proto_clnp);
register_heur_dissector_list("clnp", &clnp_heur_subdissector_list);
register_init_routine(clnp_reassemble_init);
clnp_module = prefs_register_protocol(proto_clnp, NULL);
prefs_register_uint_preference(clnp_module, "tp_nsap_selector",
"NSAP selector for Transport Protocol (last byte in hex)",
"NSAP selector for Transport Protocol (last byte in hex)",
16, &tp_nsap_selector);
prefs_register_bool_preference(clnp_module, "always_decode_transport",
"Always try to decode NSDU as transport PDUs",
"Always try to decode NSDU as transport PDUs",
&always_decode_transport);
prefs_register_bool_preference(clnp_module, "reassemble",
"Reassemble segmented CLNP datagrams",
"Whether segmented CLNP datagrams should be reassembled",
&clnp_reassemble);
prefs_register_bool_preference(clnp_module, "decode_atn_options",
"Decode ATN security label",
"Whether ATN security label should be decoded",
&clnp_decode_atn_options);
}
示例14: proto_register_udp
//.........这里部分代码省略.........
{ "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);
}
示例15: 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);
}