本文整理汇总了C++中proto_register_field_array函数的典型用法代码示例。如果您正苦于以下问题:C++ proto_register_field_array函数的具体用法?C++ proto_register_field_array怎么用?C++ proto_register_field_array使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了proto_register_field_array函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: proto_register_btsmp
//.........这里部分代码省略.........
},
{&hf_btsmp_random,
{"Random Value", "btsmp.random_value",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{&hf_btsmp_long_term_key,
{"Long Term Key", "btsmp.long_term_key",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{&hf_btsmp_id_resolving_key,
{"Identity Resolving Key", "btsmp.id_resolving_key",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{&hf_btsmp_signature_key,
{"Signature Key", "btsmp.signature_key",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{&hf_btsmp_bonding_flags,
{"Bonding Flags", "btsmp.bonding_flags",
FT_UINT8, BASE_HEX, VALS(bonding_flag_vals), 0x03,
NULL, HFILL}
},
{&hf_btsmp_mitm_flag,
{"MITM Flag", "btsmp.mitm_flag",
FT_UINT8, BASE_DEC, NULL, 0x04,
NULL, HFILL}
},
{&hf_btsmp_max_enc_key_size,
{"Max Encryption Key Size", "btsmp.max_enc_key_size",
FT_UINT8, BASE_DEC, NULL, 0x00,
NULL, HFILL}
},
{&hf_btsmp_key_dist_enc,
{"Encryption Key (LTK)", "btsmp.key_dist_enc",
FT_UINT8, BASE_DEC, NULL, 0x01,
NULL, HFILL}
},
{&hf_btsmp_key_dist_id,
{"Id Key (IRK)", "btsmp.key_dist_id",
FT_UINT8, BASE_DEC, NULL, 0x02,
NULL, HFILL}
},
{&hf_btsmp_key_dist_sign,
{"Signature Key (CSRK)", "btsmp.key_dist_sign",
FT_UINT8, BASE_DEC, NULL, 0x04,
NULL, HFILL}
},
{&hf_btsmp_ediv,
{"Encrypted Diversifier (EDIV)", "btsmp.ediv",
FT_UINT16, BASE_HEX, NULL, 0x00,
NULL, HFILL}
},
{&hf_btsmp_authreq,
{"AuthReq", "btsmp.authreq",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL}
},
{&hf_btsmp_initiator_key_distribution,
{"Initiator Key Distribution", "btsmp.initiator_key_distribution",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL}
},
{&hf_btsmp_responder_key_distribution,
{"Responder Key Distribution", "btsmp.responder_key_distribution",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL}
},
{&hf_bd_addr,
{ "BD_ADDR", "btsmp.bd_addr",
FT_ETHER, BASE_NONE, NULL, 0x0,
"Bluetooth Device Address", HFILL}
},
{ &hf_address_type,
{ "Address Type", "btsmp.address_type",
FT_UINT8, BASE_HEX, VALS(bluetooth_address_type_vals), 0x0,
NULL, HFILL }
}
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_btsmp,
&ett_btsmp_auth_req,
&ett_btsmp_key_dist
};
/* Register the protocol name and description */
proto_btsmp = proto_register_protocol("Bluetooth Security Manager Protocol",
"BT SMP", "btsmp");
btsmp_handle = new_register_dissector("btsmp", dissect_btsmp, proto_btsmp);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_btsmp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
示例2: proto_register_nlsp
//.........这里部分代码省略.........
{ &hf_nlsp_type,
{ "Packet Type", "nlsp.type", FT_UINT8, BASE_DEC,
VALS(nlsp_packet_type_vals), PACKET_TYPE_MASK, NULL, HFILL }},
{ &hf_nlsp_major_version,
{ "Major Version", "nlsp.major_version", FT_UINT8,
BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_nlsp_packet_length,
{ "Packet Length", "nlsp.packet_length",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_nlsp_hello_state,
{ "State", "nlsp.hello.state", FT_UINT8, BASE_DEC,
VALS(nlsp_hello_state_vals), NLSP_HELLO_STATE_MASK,
NULL, HFILL }},
{ &hf_nlsp_hello_multicast,
{ "Multicast Routing", "nlsp.hello.multicast", FT_BOOLEAN, 8,
TFS(&tfs_supported_not_supported), NLSP_HELLO_MULTICAST_MASK,
"If set, this router supports multicast routing", HFILL }},
{ &hf_nlsp_hello_circuit_type,
{ "Circuit Type", "nlsp.hello.circuit_type", FT_UINT8, BASE_DEC,
VALS(nlsp_hello_circuit_type_vals), NLSP_HELLO_CTYPE_MASK,
NULL, HFILL }},
{ &hf_nlsp_hello_holding_timer,
{ "Holding Timer", "nlsp.hello.holding_timer", FT_UINT8, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{ &hf_nlsp_hello_priority,
{ "Priority", "nlsp.hello.priority", FT_UINT8, BASE_DEC,
NULL, NLSP_HELLO_PRIORITY_MASK,
NULL, HFILL }},
{ &hf_nlsp_lsp_sequence_number,
{ "Sequence Number", "nlsp.sequence_number",
FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_nlsp_lsp_checksum,
{ "Checksum", "nlsp.lsp.checksum",
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_nlsp_lsp_p,
{ "Partition Repair", "nlsp.lsp.partition_repair", FT_BOOLEAN, 8,
TFS(&tfs_supported_not_supported), NLSP_LSP_PARTITION_MASK,
"If set, this router supports the optional Partition Repair function", HFILL }},
{ &hf_nlsp_lsp_attached_flag,
{ "Attached Flag", "nlsp.lsp.attached_flag", FT_UINT8, BASE_DEC,
VALS(nlsp_attached_flag_vals), NLSP_LSP_ATT_MASK, NULL, HFILL }},
{ &hf_nlsp_lsp_lspdbol,
{ "LSP Database Overloaded", "nlsp.lsp.lspdbol", FT_BOOLEAN, 8,
NULL, NLSP_LSP_OVERFLOW_MASK, NULL, HFILL }},
{ &hf_nlsp_lsp_router_type,
{ "Router Type", "nlsp.lsp.router_type", FT_UINT8, BASE_DEC,
VALS(nlsp_router_type_vals), NLSP_LSP_ROUTER_TYPE_MASK,
NULL, HFILL }},
{ &hf_nlsp_lsp_link_info_clv_flags_cost_present,
{ "Cost present", "nlsp.lsp.link_info_clv.flags.cost_present", FT_BOOLEAN, 8,
TFS(&tfs_no_yes), 0x80, NULL, HFILL }},
{ &hf_nlsp_lsp_link_info_clv_flags_cost_metric,
{ "Cost metric", "nlsp.lsp.link_info_clv.flags.cost_metric", FT_BOOLEAN, 8,
TFS(&tfs_internal_external), 0x40, NULL, HFILL }},
{ &hf_nlsp_lsp_link_info_clv_flags_cost,
{ "Cost", "nlsp.lsp.link_info_clv.flags.cost", FT_UINT8, BASE_DEC,
NULL, 0x3F, NULL, HFILL }},
};
static gint *ett[] = {
&ett_nlsp,
&ett_nlsp_hello_clv_area_addr,
&ett_nlsp_hello_clv_neighbors,
&ett_nlsp_hello_local_mtu,
&ett_nlsp_hello_clv_unknown,
&ett_nlsp_lsp_info,
&ett_nlsp_lsp_clv_area_addr,
&ett_nlsp_lsp_clv_mgt_info,
&ett_nlsp_lsp_clv_link_info,
&ett_nlsp_lsp_clv_svcs_info,
&ett_nlsp_lsp_clv_ext_routes,
&ett_nlsp_lsp_clv_unknown,
&ett_nlsp_csnp_lsp_entries,
&ett_nlsp_csnp_lsp_entry,
&ett_nlsp_csnp_clv_unknown,
&ett_nlsp_psnp_lsp_entries,
&ett_nlsp_psnp_lsp_entry,
&ett_nlsp_psnp_clv_unknown,
};
proto_nlsp = proto_register_protocol("NetWare Link Services Protocol",
"NLSP", "nlsp");
proto_register_field_array(proto_nlsp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
示例3: 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);
}
示例4: proto_register_ayiya
void
proto_register_ayiya(void)
{
static hf_register_info hf[] = {
{ &hf_id_len,
{ "Identity field length", "ayiya.idlen", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_id_type,
{ "Identity field type", "ayiya.idtype", FT_UINT8,
BASE_HEX, VALS(identity_types), 0x0, NULL, HFILL
}
},
{ &hf_sig_len,
{ "Signature Length", "ayiya.siglen", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_hash_method,
{ "Hash method", "ayiya.hashmethod", FT_UINT8,
BASE_HEX, VALS(hash_methods), 0x0, NULL, HFILL
}
},
{ &hf_auth_method,
{ "Authentication method", "ayiya.authmethod", FT_UINT8,
BASE_HEX, VALS(auth_methods), 0x0, NULL, HFILL
}
},
{ &hf_opcode,
{ "Operation Code", "ayiya.opcode", FT_UINT8,
BASE_HEX, VALS(opcodes), 0x0, NULL, HFILL
}
},
{ &hf_next_header,
{ "Next Header", "ayiya.nextheader", FT_UINT8,
BASE_HEX, NULL, 0x0, NULL, HFILL
}
},
{ &hf_epoch,
{ "Epoch", "ayiya.epoch", FT_ABSOLUTE_TIME,
ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL
}
},
{ &hf_identity,
{ "Identity", "ayiya.identity", FT_BYTES,
BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
{ &hf_signature,
{ "Signature", "ayiya.signature", FT_BYTES,
BASE_NONE, NULL, 0x0, NULL, HFILL
}
},
};
static gint *ett[] = {
&ett_ayiya,
};
proto_ayiya = proto_register_protocol("Anything in Anything Protocol",
"AYIYA", "ayiya");
register_dissector("ayiya", dissect_ayiya, proto_ayiya);
proto_register_field_array(proto_ayiya, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
示例5: proto_register_isis
void
proto_register_isis(void)
{
static hf_register_info hf[] = {
{ &hf_isis_irpd,
{ "Intra Domain Routing Protocol Discriminator", "isis.irpd",
FT_UINT8, BASE_HEX, VALS(nlpid_vals), 0x0, NULL, HFILL }},
{ &hf_isis_header_length,
{ "PDU Header Length", "isis.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_isis_version,
{ "Version", "isis.version", FT_UINT8,
BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_isis_system_id_length,
{ "System ID Length", "isis.sysid_len",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_isis_type,
{ "PDU Type", "isis.type", FT_UINT8, BASE_DEC,
VALS(isis_vals), ISIS_TYPE_MASK, NULL, HFILL }},
{ &hf_isis_type_reserved,
{ "Reserved", "isis.reserved", FT_UINT8, BASE_HEX,
NULL, ISIS_TYPE_RESERVED_MASK, NULL, HFILL }},
{ &hf_isis_version2,
{ "Version2 (==1)", "isis.version2", FT_UINT8, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_isis_reserved,
{ "Reserved (==0)", "isis.reserved", FT_UINT8, BASE_DEC, NULL,
0x0, NULL, HFILL }},
{ &hf_isis_max_area_adr,
{ "Max.AREAs: (0==3)", "isis.max_area_adr", FT_UINT8, BASE_DEC, NULL,
0x0, NULL, HFILL }},
};
/*
* Note, we pull in the unknown CLV handler here, since it
* is used by all ISIS packet types.
*/
static gint *ett[] = {
&ett_isis,
};
static ei_register_info ei[] = {
{ &ei_isis_version, { "isis.version.unknown", PI_PROTOCOL, PI_WARN, "Unknown ISIS version", EXPFILL }},
{ &ei_isis_type, { "isis.type.unknown", PI_PROTOCOL, PI_WARN, "Unknown ISIS packet type", EXPFILL }},
};
expert_module_t* expert_isis;
proto_isis = proto_register_protocol(PROTO_STRING_ISIS, "ISIS", "isis");
proto_register_field_array(proto_isis, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_isis = expert_register_protocol(proto_isis);
expert_register_field_array(expert_isis, ei, array_length(ei));
isis_handle = register_dissector("isis", dissect_isis, proto_isis);
isis_dissector_table = register_dissector_table("isis.type",
"ISIS Type", FT_UINT8, BASE_DEC);
}
示例6: proto_register_ipxwan
//.........这里部分代码省略.........
{ &hf_ipxwan_num_options,
{ "Number of Options", "ipxwan.num_options", FT_UINT8,
BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_option_num,
{ "Option Number", "ipxwan.option_num", FT_UINT8,
BASE_HEX, VALS(ipxwan_option_num_vals), 0x0, NULL, HFILL }},
{ &hf_ipxwan_accept_option,
{ "Accept Option", "ipxwan.accept_option", FT_UINT8,
BASE_DEC, VALS(ipxwan_accept_option_vals), 0x0, NULL, HFILL }},
{ &hf_ipxwan_option_data_len,
{ "Option Data Length", "ipxwan.option_data_len", FT_UINT16,
BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_routing_type,
{ "Routing Type", "ipxwan.routing_type", FT_UINT8,
BASE_DEC, VALS(ipxwan_routing_type_vals), 0x0, NULL, HFILL }},
{ &hf_ipxwan_wan_link_delay,
{ "WAN Link Delay", "ipxwan.rip_sap_info_exchange.wan_link_delay",
FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_common_network_number,
{ "Common Network Number", "ipxwan.rip_sap_info_exchange.common_network_number",
FT_IPXNET, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_router_name,
{ "Router Name", "ipxwan.rip_sap_info_exchange.router_name",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_delay,
{ "Delay", "ipxwan.nlsp_information.delay",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_throughput,
{ "Throughput", "ipxwan.nlsp_information.throughput",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_request_size,
{ "Request Size", "ipxwan.nlsp_raw_throughput_data.request_size",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_delta_time,
{ "Delta Time", "ipxwan.nlsp_raw_throughput_data.delta_time",
FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_extended_node_id,
{ "Extended Node ID", "ipxwan.extended_node_id",
FT_IPXNET, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_node_number,
{ "Node Number", "ipxwan.node_number",
FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_compression_type,
{ "Compression Type", "ipxwan.compression.type",
FT_UINT8, BASE_DEC, VALS(ipxwan_compression_type_vals), 0x0,
NULL, HFILL }},
{ &hf_ipxwan_compression_options,
{ "Compression options", "ipxwan.compression.options",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipxwan_compression_slots,
{ "Number of compression slots", "ipxwan.compression.slots",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_ipxwan_compression_parameters,
{ "Option parameters", "ipxwan.compression.parameters",
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_padding,
{ "Padding", "ipxwan.padding",
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_ipxwan_option_value,
{ "Option value", "ipxwan.option_value",
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {
&ett_ipxwan,
&ett_ipxwan_option,
};
static ei_register_info ei[] = {
{ &ei_ipxwan_option_data_len, { "ipxwan.option_data_len.invalid", PI_MALFORMED, PI_ERROR, "Wrong length", EXPFILL }},
};
expert_module_t* expert_ipxwan;
proto_ipxwan = proto_register_protocol("IPX WAN", "IPX WAN", "ipxwan");
proto_register_field_array(proto_ipxwan, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_ipxwan = expert_register_protocol(proto_ipxwan);
expert_register_field_array(expert_ipxwan, ei, array_length(ei));
}
示例7: proto_register_multipart
//.........这里部分代码省略.........
FT_STRING, BASE_NONE, NULL, 0x0,
"Content-Length Header", HFILL
}
},
{ &hf_header_array[POS_CONTENT_TRANSFER_ENCODING],
{ "Content-Transfer-Encoding",
"mime_multipart.header.content-transfer-encoding",
FT_STRING, BASE_NONE, NULL, 0x00,
"RFC 2045: Content-Transfer-Encoding Header", HFILL
}
},
{ &hf_header_array[POS_CONTENT_TYPE],
{ "Content-Type",
"mime_multipart.header.content-type",
FT_STRING, BASE_NONE,NULL,0x0,
"Content-Type Header", HFILL
}
},
{ &hf_header_array[POS_ORIGINALCONTENT],
{ "OriginalContent",
"mime_multipart.header.originalcontent",
FT_STRING, BASE_NONE,NULL,0x0,
"Original Content-Type Header", HFILL
}
},
/* Generated from convert_proto_tree_add_text.pl */
{ &hf_multipart_first_boundary, { "First boundary", "mime_multipart.first_boundary", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_multipart_preamble, { "Preamble", "mime_multipart.preamble", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_multipart_last_boundary, { "Last boundary", "mime_multipart.last_boundary", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_multipart_boundary, { "Boundary", "mime_multipart.boundary", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_multipart_trailer, { "Trailer", "mime_multipart.trailer", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
/*
* Preferences
*/
module_t *multipart_module;
expert_module_t* expert_multipart;
/*
* Setup protocol subtree array
*/
static gint *ett[] = {
&ett_multipart,
&ett_multipart_main,
&ett_multipart_body,
};
static ei_register_info ei[] = {
{ &ei_multipart_no_required_parameter, { "mime_multipart.no_required_parameter", PI_PROTOCOL, PI_ERROR, "The multipart dissector could not find a required parameter.", EXPFILL }},
{ &ei_multipart_decryption_not_possible, { "mime_multipart.decryption_not_possible", PI_UNDECODED, PI_WARN, "The multipart dissector could not decrypt the message.", EXPFILL }},
};
/*
* Register the protocol name and description
*/
proto_multipart = proto_register_protocol(
"MIME Multipart Media Encapsulation",
"MIME multipart",
"mime_multipart");
/*
* Required function calls to register
* the header fields and subtrees used.
*/
proto_register_field_array(proto_multipart, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_multipart = expert_register_protocol(proto_multipart);
expert_register_field_array(expert_multipart, ei, array_length(ei));
multipart_module = prefs_register_protocol(proto_multipart, NULL);
prefs_register_bool_preference(multipart_module,
"display_unknown_body_as_text",
"Display bodies without media type as text",
"Display multipart bodies with no media type dissector"
" as raw text (may cause problems with binary data).",
&display_unknown_body_as_text);
prefs_register_bool_preference(multipart_module,
"remove_base64_encoding",
"Remove base64 encoding from bodies",
"Remove any base64 content-transfer encoding from bodies. "
"This supports export of the body and its further dissection.",
&remove_base64_encoding);
/*
* Dissectors requiring different behavior in cases where the media
* is contained in a multipart entity should register their multipart
* dissector in the dissector table below, which is similar to the
* "media_type" dissector table defined in the HTTP dissector code.
*/
multipart_media_subdissector_table = register_dissector_table(
"multipart_media_type",
"Internet media type (for multipart processing)",
FT_STRING, BASE_NONE, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
}
示例8: proto_register_nv
void proto_register_nv(void)
{
static hf_register_info hf[] =
{
#if 0
{ &hf_nv_summary,
{ "Summary of the Nv Packet", "tc_nv.summary",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
#endif
{ &hf_nv_header, { "Header", "tc_nv.header",
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_publisher, { "Publisher", "tc_nv.publisher",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_count, { "Count", "tc_nv.count",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_cycleindex, { "CycleIndex", "tc_nv.cycleindex",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_variable, { "Variable", "tc_nv.variable",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_varheader, { "VarHeader", "tc_nv.varheader",
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_id, { "Id", "tc_nv.id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_hash, { "Hash", "tc_nv.hash",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_length, { "Length", "tc_nv.length",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_quality, { "Quality", "tc_nv.quality",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_nv_data, { "Data", "tc_nv.data",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
};
static gint *ett[] =
{
&ett_nv,
&ett_nv_header,
&ett_nv_var,
&ett_nv_varheader
};
proto_nv = proto_register_protocol("TwinCAT NV",
"TC-NV","tc_nv");
proto_register_field_array(proto_nv,hf,array_length(hf));
proto_register_subtree_array(ett,array_length(ett));
}
示例9: proto_register_ax4000
void
proto_register_ax4000(void)
{
static hf_register_info hf[] = {
{ &hf_ax4000_port,
{ "Port Number", "ax4000.port",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL
}
},
{ &hf_ax4000_chassis,
{ "Chassis Number", "ax4000.chassis",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL
}
},
{ &hf_ax4000_fill,
{ "Fill Type", "ax4000.fill",
FT_UINT8, BASE_DEC, NULL, 0xc0,
NULL, HFILL
}
},
{ &hf_ax4000_index,
{ "Index", "ax4000.index",
FT_UINT16, BASE_DEC, NULL, 0x0FFF,
NULL, HFILL
}
},
{ &hf_ax4000_timestamp,
{ "Timestamp", "ax4000.timestamp",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL
}
},
{ &hf_ax4000_seq,
{ "Sequence Number", "ax4000.seq",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL
}
},
{ &hf_ax4000_crc,
{ "CRC (unchecked)", "ax4000.crc",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL
}
}
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_ax4000
};
/* Register the protocol name and description */
proto_ax4000 = proto_register_protocol("AX/4000 Test Block",
"AX4000", "ax4000");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_ax4000, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
示例10: proto_register_docsis_dpvreq
void
proto_register_docsis_dpvreq (void)
{
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dpvreq_tranid,
{"Transaction Id", "docsis_dpvreq.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_docsis_dpvreq_dschan,
{"Downstream Channel ID", "docsis_dpvreq.dschan",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_docsis_dpvreq_flags,
{"Flags", "docsis_dpvreq.flags",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_docsis_dpvreq_us_sf,
{"Upstream Service Flow ID", "docsis_dpvreq.us_sf",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_docsis_dpvreq_n,
{"N (Measurement avaraging factor)", "docsis_dpvreq.n",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_docsis_dpvreq_start,
{"Start Reference Point", "docsis_dpvreq.start",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_docsis_dpvreq_end,
{"End Reference Point", "docsis_dpvreq.end",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_docsis_dpvreq_ts_start,
{"Timestamp Start", "docsis_dpvreq.ts_start",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{&hf_docsis_dpvreq_ts_end,
{"Timestamp End", "docsis_dpvreq.ts_end",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dpvreq,
};
/* Register the protocol name and description */
proto_docsis_dpvreq =
proto_register_protocol ("DOCSIS Path Verify Request",
"DOCSIS DPV-REQ", "docsis_dpvreq");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dpvreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dpvreq", dissect_dpvreq, proto_docsis_dpvreq);
}
示例11: 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);
}
示例12: proto_register_aoe
void
proto_register_aoe(void)
{
static hf_register_info hf[] = {
{ &hf_aoe_cmd,
{ "Command", "aoe.cmd", FT_UINT8, BASE_DEC, VALS(cmd_vals), 0x0,
"AOE Command", HFILL}},
{ &hf_aoe_version,
{ "Version", "aoe.version", FT_UINT8, BASE_DEC, NULL, 0x0,
"Version of the AOE protocol", HFILL}},
{ &hf_aoe_error,
{ "Error", "aoe.error", FT_UINT8, BASE_DEC, VALS(error_vals), 0x0,
"Error code", HFILL}},
{ &hf_aoe_err_feature,
{ "Err/Feature", "aoe.err_feature", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}},
{ &hf_aoe_sector_count,
{ "Sector Count", "aoe.sector_count", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}},
{ &hf_aoe_flags_response,
{ "Response flag", "aoe.response", FT_BOOLEAN, 8, TFS(&tfs_response), AOE_FLAGS_RESPONSE, "Whether this is a response PDU or not", HFILL}},
{ &hf_aoe_flags_error,
{ "Error flag", "aoe.flags_error", FT_BOOLEAN, 8, TFS(&tfs_error), AOE_FLAGS_ERROR, "Whether this is an error PDU or not", HFILL}},
{ &hf_aoe_major,
{ "Major", "aoe.major", FT_UINT16, BASE_HEX, NULL, 0x0,
"Major address", HFILL}},
{ &hf_aoe_minor,
{ "Minor", "aoe.minor", FT_UINT8, BASE_HEX, NULL, 0x0,
"Minor address", HFILL}},
{ &hf_aoe_acmd,
{ "ATA Cmd", "aoe.ata.cmd", FT_UINT8, BASE_HEX, VALS(ata_cmd_vals), 0x0,
"ATA command opcode", HFILL}},
{ &hf_aoe_astatus,
{ "ATA Status", "aoe.ata.status", FT_UINT8, BASE_HEX, NULL, 0x0,
"ATA status bits", HFILL}},
{ &hf_aoe_tag,
{ "Tag", "aoe.tag", FT_UINT32, BASE_HEX, NULL, 0x0,
"Command Tag", HFILL}},
{ &hf_aoe_aflags_e,
{ "E", "aoe.aflags.e", FT_BOOLEAN, 8, TFS(&tfs_aflags_e), AOE_AFLAGS_E, "Whether this is a normal or LBA48 command", HFILL}},
{ &hf_aoe_aflags_d,
{ "D", "aoe.aflags.d", FT_BOOLEAN, 8, TFS(&tfs_aflags_d), AOE_AFLAGS_D, NULL, HFILL}},
{ &hf_aoe_aflags_a,
{ "A", "aoe.aflags.a", FT_BOOLEAN, 8, TFS(&tfs_aflags_a), AOE_AFLAGS_A, "Whether this is an asynchronous write or not", HFILL}},
{ &hf_aoe_aflags_w,
{ "W", "aoe.aflags.w", FT_BOOLEAN, 8, TFS(&tfs_aflags_w), AOE_AFLAGS_W, "Is this a command writing data to the device or not", HFILL}},
{ &hf_aoe_lba,
{ "Lba", "aoe.lba", FT_UINT64, BASE_HEX, NULL, 0x00, "Lba address", HFILL}},
{ &hf_aoe_response_in,
{ "Response In", "aoe.response_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "The response to this packet is in this frame", HFILL }},
{ &hf_aoe_response_to,
{ "Response To", "aoe.response_to", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "This is a response to the ATA command in this frame", HFILL }},
{ &hf_aoe_time,
{ "Time from request", "aoe.time", FT_RELATIVE_TIME, BASE_NONE, NULL, 0, "Time between Request and Reply for ATA calls", HFILL }},
};
static gint *ett[] = {
&ett_aoe,
&ett_aoe_flags,
};
proto_aoe = proto_register_protocol("ATAoverEthernet", "AOE", "aoe");
proto_register_field_array(proto_aoe, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
aoe_handle = register_dissector("aoe", dissect_aoe, proto_aoe);
register_init_routine(ata_init);
}
示例13: proto_register_dvmrp
//.........这里部分代码省略.........
{&hf_cap_mtrace,
{ "Mtrace", "dvmrp.cap.mtrace", FT_BOOLEAN, 8,
TFS(&tfs_cap_mtrace), DVMRP_V3_CAP_MTRACE, "Mtrace capability", HFILL }},
{&hf_cap_snmp,
{ "SNMP", "dvmrp.cap.snmp", FT_BOOLEAN, 8,
TFS(&tfs_cap_snmp), DVMRP_V3_CAP_SNMP, "SNMP capability", HFILL }},
{&hf_cap_netmask,
{ "Netmask", "dvmrp.cap.netmask", FT_BOOLEAN, 8,
TFS(&tfs_cap_netmask), DVMRP_V3_CAP_NETMASK, "Netmask capability", HFILL }},
{ &hf_min_ver,
{ "Minor Version", "dvmrp.min_ver", FT_UINT8, BASE_HEX,
NULL, 0, "DVMRP Minor Version", HFILL }},
{ &hf_maj_ver,
{ "Major Version", "dvmrp.maj_ver", FT_UINT8, BASE_HEX,
NULL, 0, "DVMRP Major Version", HFILL }},
{ &hf_genid,
{ "Generation ID", "dvmrp.genid", FT_UINT32, BASE_DEC,
NULL, 0, "DVMRP Generation ID", HFILL }},
{ &hf_route,
{ "Route", "dvmrp.route", FT_NONE, BASE_NONE,
NULL, 0, "DVMRP V3 Route Report", HFILL }},
{ &hf_saddr,
{ "Source Addr", "dvmrp.saddr", FT_IPv4, BASE_NONE,
NULL, 0, "DVMRP Source Address", HFILL }},
{ &hf_life,
{ "Prune lifetime", "dvmrp.lifetime", FT_UINT32, BASE_DEC,
NULL, 0, "DVMRP Prune Lifetime", HFILL }},
{ &hf_local,
{ "Local Addr", "dvmrp.local", FT_IPv4, BASE_NONE,
NULL, 0, "DVMRP Local Address", HFILL }},
{ &hf_threshold,
{ "Threshold", "dvmrp.threshold", FT_UINT8, BASE_DEC,
NULL, 0, "DVMRP Interface Threshold", HFILL }},
{ &hf_flags,
{ "Flags", "dvmrp.flags", FT_NONE, BASE_NONE,
NULL, 0, "DVMRP Interface Flags", HFILL }},
{ &hf_flag_tunnel,
{ "Tunnel", "dvmrp.flag.tunnel", FT_BOOLEAN, 8,
NULL, DVMRP_V3_FLAG_TUNNEL, "Neighbor reached via tunnel", HFILL }},
{ &hf_flag_srcroute,
{ "Source Route", "dvmrp.flag.srcroute", FT_BOOLEAN, 8,
NULL, DVMRP_V3_FLAG_SRCROUTE, "Tunnel uses IP source routing", HFILL }},
{ &hf_flag_down,
{ "Down", "dvmrp.flag.down", FT_BOOLEAN, 8,
NULL, DVMRP_V3_FLAG_DOWN, "Operational status down", HFILL }},
{ &hf_flag_disabled,
{ "Disabled", "dvmrp.flag.disabled", FT_BOOLEAN, 8,
NULL, DVMRP_V3_FLAG_DISABLED, "Administrative status down", HFILL }},
{ &hf_flag_querier,
{ "Querier", "dvmrp.flag.querier", FT_BOOLEAN, 8,
NULL, DVMRP_V3_FLAG_QUERIER, "Querier for interface", HFILL }},
{ &hf_flag_leaf,
{ "Leaf", "dvmrp.flag.leaf", FT_BOOLEAN, 8,
NULL, DVMRP_V3_FLAG_LEAF, "No downstream neighbors on interface", HFILL }},
{ &hf_ncount,
{ "Neighbor Count", "dvmrp.ncount", FT_UINT8, BASE_DEC,
NULL, 0, "DVMRP Neighbor Count", HFILL }},
{ &hf_neighbor,
{ "Neighbor Addr", "dvmrp.neighbor", FT_IPv4, BASE_NONE,
NULL, 0, "DVMRP Neighbor Address", HFILL }}
};
static gint *ett[] = {
&ett_dvmrp,
&ett_commands,
&ett_capabilities,
&ett_flags,
&ett_route
};
module_t *module_dvmrp;
proto_dvmrp = proto_register_protocol("Distance Vector Multicast Routing Protocol",
"DVMRP", "dvmrp");
proto_register_field_array(proto_dvmrp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
module_dvmrp = prefs_register_protocol(proto_dvmrp, NULL);
prefs_register_bool_preference(module_dvmrp, "strict_v3", "Allow strict DVMRP V3 only",
"Allow only packets with Major=0x03//Minor=0xFF as DVMRP V3 packets",
&strict_v3);
}
示例14: proto_register_bacnet
//.........这里部分代码省略.........
},
{ &hf_bacnet_snet,
{ "Source Network Address", "bacnet.snet",
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_slen,
{ "Source MAC Layer Address Length", "bacnet.slen",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_sadr_eth,
{ "SADR", "bacnet.sadr_eth",
FT_ETHER, BASE_NONE, NULL, 0,
"Source ISO 8802-3 MAC Address", HFILL
}
},
{ &hf_bacnet_sadr_mstp,
{ "SADR", "bacnet.sadr_mstp",
FT_UINT8, BASE_DEC, NULL, 0,
"Source MS/TP or ARCNET MAC Address", HFILL
}
},
{ &hf_bacnet_sadr_tmp,
{ "Unknown Source MAC", "bacnet.sadr_tmp",
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_hopc,
{ "Hop Count", "bacnet.hopc",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_mesgtyp,
{ "Network Layer Message Type", "bacnet.mesgtyp",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_vendor,
{ "Vendor ID", "bacnet.vendor",
FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_perf,
{ "Performance Index", "bacnet.perf",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_rejectreason,
{ "Reject Reason", "bacnet.rejectreason",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_rportnum,
{ "Number of Port Mappings", "bacnet.rportnum",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_pinfolen,
{ "Port Info Length", "bacnet.pinfolen",
FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_portid,
{ "Port ID", "bacnet.portid",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL
}
},
{ &hf_bacnet_term_time_value,
{ "Termination Time Value (seconds)", "bacnet.term_time_value",
FT_UINT8, BASE_DEC, NULL, 0,
"Termination Time Value", HFILL
}
}
};
static gint *ett[] = {
&ett_bacnet,
&ett_bacnet_control,
};
proto_bacnet = proto_register_protocol("Building Automation and Control Network NPDU",
"BACnet", "bacnet");
proto_register_field_array(proto_bacnet, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("bacnet", dissect_bacnet, proto_bacnet);
}
示例15: proto_register_mqpcf
void proto_register_mqpcf(void)
{
expert_module_t *expert_mqpcf;
static hf_register_info hf[] =
{
{ &hf_mqpcf_cfh_type , { "Type.....", "mqpcf.cfh.type" , FT_UINT32, BASE_DEC, VALS(mq_mqcft_vals), 0x0, "CFH type", HFILL }},
{ &hf_mqpcf_cfh_length , { "Length...", "mqpcf.cfh.length" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH length", HFILL }},
{ &hf_mqpcf_cfh_version , { "Version..", "mqpcf.cfh.version" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH version", HFILL }},
{ &hf_mqpcf_cfh_command , { "Command..", "mqpcf.cfh.command" , FT_UINT32, BASE_DEC | BASE_EXT_STRING, &mq_mqcmd_xvals, 0x0, "CFH command", HFILL }},
{ &hf_mqpcf_cfh_MsgSeqNbr, { "MsgSeqNbr", "mqpcf.cfh.MsgSeqNbr" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH message sequence number", HFILL }},
{ &hf_mqpcf_cfh_control , { "Control..", "mqpcf.cfh.control" , FT_UINT32, BASE_DEC, VALS(mq_CtlOpt_vals), 0x0, "CFH control", HFILL }},
{ &hf_mqpcf_cfh_compcode , { "CompCode.", "mqpcf.cfh.compcode" , FT_UINT32, BASE_DEC, VALS(mq_mqcc_vals), 0x0, "CFH completion code", HFILL }},
{ &hf_mqpcf_cfh_reason , { "ReasCode.", "mqpcf.cfh.reasoncode", FT_UINT32, BASE_DEC | BASE_EXT_STRING, &mq_mqrc_xvals, 0x0, "CFH reason code", HFILL }},
{ &hf_mqpcf_cfh_ParmCount, { "ParmCount", "mqpcf.cfh.ParmCount" , FT_UINT32, BASE_DEC, NULL, 0x0, "CFH parameter count", HFILL }},
{ &hf_mq_pcf_prmtyp , { "ParmTyp..", "mqpcf.parm.type" , FT_UINT32 , BASE_DEC | BASE_EXT_STRING, &mq_PrmTyp_xvals, 0x0, "MQPCF parameter type", HFILL }},
{ &hf_mq_pcf_prmlen , { "ParmLen..", "mqpcf.parm.len" , FT_UINT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter length", HFILL }},
{ &hf_mq_pcf_prmid , { "ParmID...", "mqpcf.parm.id" , FT_UINT32 , BASE_DEC | BASE_EXT_STRING, &mq_PrmId_xvals, 0x0, "MQPCF parameter id", HFILL }},
{ &hf_mq_pcf_prmidnovals , { "ParmID...", "mqpcf.parm.idNoVals" , FT_UINT32 , BASE_HEX_DEC, NULL, 0x0, "MQPCF parameter id No Vals", HFILL }},
{ &hf_mq_pcf_filterop , { "FilterOP.", "mqpcf.filter.op" , FT_UINT32 , BASE_DEC, VALS(mq_FilterOP_vals), 0x0, "MQPCF Filter operator", HFILL }},
{ &hf_mq_pcf_prmccsid , { "ParmCCSID", "mqpcf.parm.ccsid" , FT_UINT32 , BASE_DEC | BASE_RANGE_STRING, RVALS(mq_ccsid_rvals), 0x0, "MQPCF parameter ccsid", HFILL }},
{ &hf_mq_pcf_prmstrlen , { "ParmStrLn", "mqpcf.parm.strlen" , FT_UINT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter strlen", HFILL }},
{ &hf_mq_pcf_prmcount , { "ParmCount", "mqpcf.parm.count" , FT_UINT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter count", HFILL }},
{ &hf_mq_pcf_prmunused , { "ParmUnuse", "mqpcf.parm.unused" , FT_UINT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter unused", HFILL }},
{ &hf_mq_pcf_string , { "String...", "mqpcf.parm.string" , FT_STRINGZ, BASE_NONE, NULL, 0x0, "MQPCF parameter string", HFILL }},
{ &hf_mq_pcf_stringlist , { "StrList..", "mqpcf.parm.stringlist", FT_STRINGZ, BASE_NONE, NULL, 0x0, "MQPCF parameter string list", HFILL }},
{ &hf_mq_pcf_int , { "Integer..", "mqpcf.parm.int" , FT_INT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter int", HFILL }},
{ &hf_mq_pcf_intlist , { "IntList..", "mqpcf.parm.intlist" , FT_INT32 , BASE_DEC, NULL, 0x0, "MQPCF parameter int list", HFILL }},
{ &hf_mq_pcf_bytestring , { "ByteStr..", "mqpcf.parm.bytestring", FT_BYTES , BASE_NONE, NULL, 0x0, "MQPCF parameter byte string", HFILL }},
{ &hf_mq_pcf_int64 , { "Int64....", "mqpcf.parm.int64" , FT_INT64 , BASE_DEC, NULL, 0x0, "MQPCF parameter int64", HFILL }},
{ &hf_mq_pcf_int64list , { "Int64List", "mqpcf.parm.int64list" , FT_INT64 , BASE_DEC, NULL, 0x0, "MQPCF parameter int64 list", HFILL }},
};
static gint *ett[] =
{
&ett_mqpcf,
&ett_mqpcf_prm,
&ett_mqpcf_cfh,
};
static ei_register_info ei[] =
{
{ &ei_mq_pcf_prmln0, { "mqpcf.parm.len0" , PI_MALFORMED, PI_ERROR, "MQPCF Parameter length is 0", EXPFILL }},
{ &ei_mq_pcf_MaxInt, { "mqpcf.parm.IntList" , PI_UNDECODED, PI_WARN , "MQPCF Parameter Integer list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxStr, { "mqpcf.parm.StrList" , PI_UNDECODED, PI_WARN , "MQPCF Parameter String list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxI64, { "mqpcf.parm.Int64List", PI_UNDECODED, PI_WARN , "MQPCF Parameter Int64 list exhausted", EXPFILL }},
{ &ei_mq_pcf_MaxPrm, { "mqpcf.parm.MaxPrm" , PI_UNDECODED, PI_WARN , "MQPCF Max number of parameter exhausted", EXPFILL }},
{ &ei_mq_pcf_PrmCnt, { "mqpcf.parm.PrmCnt" , PI_UNDECODED, PI_WARN , "MQPCF Unkn Parm Cnt Length invalid", EXPFILL }},
};
module_t *mq_pcf_module;
proto_mqpcf = proto_register_protocol("WebSphere MQ Programmable Command Formats", "MQ PCF", "mqpcf");
proto_register_field_array(proto_mqpcf, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_mqpcf = expert_register_protocol(proto_mqpcf);
expert_register_field_array(expert_mqpcf, ei, array_length(ei));
mq_pcf_module = prefs_register_protocol(proto_mqpcf, NULL);
prefs_register_uint_preference(mq_pcf_module, "maxprm",
"Set the maximun number of parameter in the PCF to decode",
"When dissecting PCF there can be a lot of parameters."
" You can limit the number of parameter decoded, before it continue with the next PCF.",
10, &mq_pcf_maxprm);
prefs_register_uint_preference(mq_pcf_module, "maxlst",
"Set the maximun number of Parameter List that are displayed",
"When dissecting a parameter of a PCFm, if it is a StringList, IntegerList or Integer64 List, "
" You can limit the number of element displayed, before it continue with the next Parameter.",
10, &mq_pcf_maxlst);
}