本文整理汇总了C++中register_init_routine函数的典型用法代码示例。如果您正苦于以下问题:C++ register_init_routine函数的具体用法?C++ register_init_routine怎么用?C++ register_init_routine使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了register_init_routine函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: proto_register_rrc
/*--- proto_register_rrc -------------------------------------------*/
void proto_register_rrc(void) {
/* List of fields */
static hf_register_info hf[] = {
#include "packet-rrc-hfarr.c"
{ &hf_test,
{ "RAB Test", "rrc.RAB.test",
FT_UINT8, BASE_DEC, NULL, 0,
"rrc.RAB_Info_r6", HFILL }},
{ &hf_rrc_eutra_feat_group_ind_1,
{ "Indicator 1", "rrc.eutra_feat_group_ind_1",
FT_BOOLEAN, BASE_NONE, TFS(&rrc_eutra_feat_group_ind_1_val), 0,
"EUTRA Feature Group Indicator 1", HFILL }},
{ &hf_rrc_eutra_feat_group_ind_2,
{ "Indicator 2", "rrc.eutra_feat_group_ind_2",
FT_BOOLEAN, BASE_NONE, TFS(&rrc_eutra_feat_group_ind_2_val), 0,
"EUTRA Feature Group Indicator 2", HFILL }},
{ &hf_rrc_eutra_feat_group_ind_3,
{ "Indicator 3", "rrc.eutra_feat_group_ind_3",
FT_BOOLEAN, BASE_NONE, TFS(&rrc_eutra_feat_group_ind_3_val), 0,
"EUTRA Feature Group Indicator 3", HFILL }},
{ &hf_rrc_eutra_feat_group_ind_4,
{ "Indicator 4", "rrc.eutra_feat_group_ind_4",
FT_BOOLEAN, BASE_NONE, TFS(&rrc_eutra_feat_group_ind_4_val), 0,
"EUTRA Feature Group Indicator 4", HFILL }},
};
/* List of subtrees */
static gint *ett[] = {
&ett_rrc,
#include "packet-rrc-ettarr.c"
&ett_rrc_eutraFeatureGroupIndicators,
&ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
};
static ei_register_info ei[] = {
{ &ei_rrc_no_hrnti, { "rrc.no_hrnti", PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI", EXPFILL }},
};
expert_module_t* expert_rrc;
/* Register protocol */
proto_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
/* Register fields and subtrees */
proto_register_field_array(proto_rrc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_rrc = expert_register_protocol(proto_rrc);
expert_register_field_array(expert_rrc, ei, array_length(ei));
register_dissector("rrc", dissect_rrc, proto_rrc);
#include "packet-rrc-dis-reg.c"
register_init_routine(rrc_init);
}
示例2: proto_register_mime_encap
void
proto_register_mime_encap(void)
{
proto_mime_encap = proto_register_protocol("MIME file", "MIME_FILE", "mime_dlt");
register_dissector("mime_dlt", dissect_mime_encap, proto_mime_encap);
register_init_routine(mime_encap_init);
register_heur_dissector_list("wtap_file", &heur_subdissector_list);
}
示例3: proto_register_ros
/*--- proto_register_ros -------------------------------------------*/
void proto_register_ros(void) {
/* List of fields */
static hf_register_info hf[] =
{
{ &hf_ros_response_in,
{ "Response In", "ros.response_in",
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
"The response to this remote operation invocation is in this frame", HFILL }},
{ &hf_ros_response_to,
{ "Response To", "ros.response_to",
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
"This is a response to the remote operation invocation in this frame", HFILL }},
{ &hf_ros_time,
{ "Time", "ros.time",
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
"The time between the Invoke and the Response", HFILL }},
#include "packet-ros-hfarr.c"
};
/* List of subtrees */
static gint *ett[] = {
&ett_ros,
&ett_ros_unknown,
#include "packet-ros-ettarr.c"
};
static ei_register_info ei[] = {
{ &ei_ros_dissector_oid_not_implemented, { "ros.dissector_oid_not_implemented", PI_UNDECODED, PI_WARN, "ROS: Dissector for OID not implemented", EXPFILL }},
{ &ei_ros_unknown_ros_pdu, { "ros.unknown_ros_pdu", PI_UNDECODED, PI_WARN, "Unknown ROS PDU", EXPFILL }},
};
expert_module_t* expert_ros;
/* Register protocol */
proto_ros = proto_register_protocol(PNAME, PSNAME, PFNAME);
new_register_dissector("ros", dissect_ros, proto_ros);
/* Register fields and subtrees */
proto_register_field_array(proto_ros, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_ros = expert_register_protocol(proto_ros);
expert_register_field_array(expert_ros, ei, array_length(ei));
ros_oid_dissector_table = register_dissector_table("ros.oid", "ROS OID Dissectors", FT_STRING, BASE_NONE);
oid_table=g_hash_table_new(g_str_hash, g_str_equal);
protocol_table=g_hash_table_new(g_str_hash, g_str_equal);
ros_handle = find_dissector("ros");
register_init_routine(ros_reinit);
}
示例4: proto_register_pop
void
proto_register_pop(void)
{
static hf_register_info hf[] = {
{ &hf_pop_response,
{ "Response", "pop.response",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_pop_response_indicator,
{ "Response indicator", "pop.response.indicator",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_pop_response_description,
{ "Response description", "pop.response.description",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_pop_response_data,
{ "Data", "pop.response.data",
FT_STRING, BASE_NONE, NULL, 0x0, "Response Data", HFILL }},
{ &hf_pop_request,
{ "Request", "pop.request",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_pop_request_command,
{ "Request command", "pop.request.command",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_pop_request_parameter,
{ "Request parameter", "pop.request.parameter",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_pop_request_data,
{ "Data", "pop.request.data",
FT_STRING, BASE_NONE, NULL, 0x0, "Request data", HFILL }},
/* Fragment entries */
{ &hf_pop_data_fragments,
{ "DATA fragments", "pop.data.fragments", FT_NONE, BASE_NONE,
NULL, 0x00, "Message fragments", HFILL } },
{ &hf_pop_data_fragment,
{ "DATA fragment", "pop.data.fragment", FT_FRAMENUM, BASE_NONE,
NULL, 0x00, "Message fragment", HFILL } },
{ &hf_pop_data_fragment_overlap,
{ "DATA fragment overlap", "pop.data.fragment.overlap", FT_BOOLEAN,
BASE_NONE, NULL, 0x0, "Message fragment overlap", HFILL } },
{ &hf_pop_data_fragment_overlap_conflicts,
{ "DATA fragment overlapping with conflicting data",
"pop.data.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL,
0x0, "Message fragment overlapping with conflicting data", HFILL } },
{ &hf_pop_data_fragment_multiple_tails,
{ "DATA has multiple tail fragments",
"pop.data.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE,
NULL, 0x0, "Message has multiple tail fragments", HFILL } },
{ &hf_pop_data_fragment_too_long_fragment,
{ "DATA fragment too long", "pop.data.fragment.too_long_fragment",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Message fragment too long",
HFILL } },
{ &hf_pop_data_fragment_error,
{ "DATA defragmentation error", "pop.data.fragment.error", FT_FRAMENUM,
BASE_NONE, NULL, 0x00, "Message defragmentation error", HFILL } },
{ &hf_pop_data_reassembled_in,
{ "Reassembled DATA in frame", "pop.data.reassembled.in", FT_FRAMENUM, BASE_NONE,
NULL, 0x00, "This DATA fragment is reassembled in this frame", HFILL } },
{ &hf_pop_data_reassembled_length,
{ "Reassembled DATA length", "pop.data.reassembled.length", FT_UINT32, BASE_DEC,
NULL, 0x00, "The total length of the reassembled payload", HFILL } },
};
static gint *ett[] = {
&ett_pop,
&ett_pop_reqresp,
&ett_pop_data_fragment,
&ett_pop_data_fragments
};
module_t *pop_module;
proto_pop = proto_register_protocol("Post Office Protocol", "POP", "pop");
register_dissector("pop", dissect_pop, proto_pop);
proto_register_field_array(proto_pop, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_init_routine (&pop_data_reassemble_init);
/* Preferences */
pop_module = prefs_register_protocol(proto_pop, NULL);
prefs_register_bool_preference(pop_module, "desegment_data",
"Reassemble POP RETR and TOP responses spanning multiple TCP segments",
"Whether the POP dissector should reassemble RETR and TOP responses and spanning multiple TCP segments."
" To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
&pop_data_desegment);
}
示例5: proto_register_ipx
//.........这里部分代码省略.........
NULL, HFILL }},
{ &hf_spx_all_nr,
{ "Allocation Number", "spx.alloc",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_spx_rexmt_frame,
{ "Retransmitted Frame Number", "spx.rexmt_frame",
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
};
static hf_register_info hf_ipxrip[] = {
{ &hf_ipxrip_request,
{ "Request", "ipxrip.request",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if IPX RIP request", HFILL }},
{ &hf_ipxrip_response,
{ "Response", "ipxrip.response",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if IPX RIP response", HFILL }}
};
static hf_register_info hf_sap[] = {
{ &hf_sap_request,
{ "Request", "ipxsap.request",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if SAP request", HFILL }},
{ &hf_sap_response,
{ "Response", "ipxsap.response",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if SAP response", HFILL }}
};
static hf_register_info hf_ipxmsg[] = {
{ &hf_msg_conn,
{ "Connection Number", "ipxmsg.conn",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_msg_sigchar,
{ "Signature Char", "ipxmsg.sigchar",
FT_UINT8, BASE_DEC, VALS(ipxmsg_sigchar_vals), 0x0,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_ipx,
&ett_spx,
&ett_spx_connctrl,
&ett_ipxmsg,
&ett_ipxrip,
&ett_serialization,
&ett_ipxsap,
&ett_ipxsap_server,
};
proto_ipx = proto_register_protocol("Internetwork Packet eXchange",
"IPX", "ipx");
proto_register_field_array(proto_ipx, hf_ipx, array_length(hf_ipx));
register_dissector("ipx", dissect_ipx, proto_ipx);
proto_spx = proto_register_protocol("Sequenced Packet eXchange",
"SPX", "spx");
proto_register_field_array(proto_spx, hf_spx, array_length(hf_spx));
proto_ipxrip = proto_register_protocol("IPX Routing Information Protocol",
"IPX RIP", "ipxrip");
proto_register_field_array(proto_ipxrip, hf_ipxrip, array_length(hf_ipxrip));
proto_serialization = proto_register_protocol("NetWare Serialization Protocol",
"NW_SERIAL", "nw_serial");
proto_ipxmsg = proto_register_protocol("IPX Message", "IPX MSG",
"ipxmsg");
proto_register_field_array(proto_ipxmsg, hf_ipxmsg, array_length(hf_ipxmsg));
proto_sap = proto_register_protocol("Service Advertisement Protocol",
"IPX SAP", "ipxsap");
register_dissector("ipxsap", dissect_ipxsap, proto_sap);
proto_register_field_array(proto_sap, hf_sap, array_length(hf_sap));
proto_register_subtree_array(ett, array_length(ett));
ipx_type_dissector_table = register_dissector_table("ipx.packet_type",
"IPX packet type", FT_UINT8, BASE_HEX);
ipx_socket_dissector_table = register_dissector_table("ipx.socket",
"IPX socket", FT_UINT16, BASE_HEX);
spx_socket_dissector_table = register_dissector_table("spx.socket",
"SPX socket", FT_UINT16, BASE_HEX);
register_init_routine(&spx_init_protocol);
register_postseq_cleanup_routine(&spx_postseq_cleanup);
ipx_tap=register_tap("ipx");
}
示例6: proto_register_gsm_sms_ud
//.........这里部分代码省略.........
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"GSM Short Message fragment overlaps with other fragment(s)",
HFILL
}
},
{ &hf_gsm_sms_ud_fragment_overlap_conflicts,
{ "Short Message fragment overlapping with conflicting data",
"gsm-sms-ud.fragment.overlap.conflicts",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"GSM Short Message fragment overlaps with conflicting data",
HFILL
}
},
{ &hf_gsm_sms_ud_fragment_multiple_tails,
{ "Short Message has multiple tail fragments",
"gsm-sms-ud.fragment.multiple_tails",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"GSM Short Message fragment has multiple tail fragments",
HFILL
}
},
{ &hf_gsm_sms_ud_fragment_too_long_fragment,
{ "Short Message fragment too long",
"gsm-sms-ud.fragment.too_long_fragment",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"GSM Short Message fragment data goes beyond the packet end",
HFILL
}
},
{ &hf_gsm_sms_ud_fragment_error,
{ "Short Message defragmentation error", "gsm-sms-ud.fragment.error",
FT_FRAMENUM, BASE_NONE, NULL, 0x00,
"GSM Short Message defragmentation error due to illegal fragments",
HFILL
}
},
{ &hf_gsm_sms_ud_reassembled_in,
{ "Reassembled in",
"gsm-sms-ud.reassembled.in",
FT_FRAMENUM, BASE_NONE, NULL, 0x00,
"GSM Short Message has been reassembled in this packet.", HFILL
}
},
{ &hf_gsm_sms_ud_reassembled_length,
{ "Reassembled Short Message length",
"gsm-sms-ud.reassembled.length",
FT_UINT32, BASE_DEC, NULL, 0x00,
"The total length of the reassembled payload", HFILL
}
},
};
static gint *ett[] = {
&ett_gsm_sms,
&ett_udh,
&ett_udh_ie,
&ett_gsm_sms_ud_fragment,
&ett_gsm_sms_ud_fragments,
};
/* Register the protocol name and description */
proto_gsm_sms_ud = proto_register_protocol(
"GSM Short Message Service User Data", /* Name */
"GSM SMS UD", /* Short name */
"gsm-sms-ud"); /* Filter name */
/* Required function calls to register header fields and subtrees used */
proto_register_field_array(proto_gsm_sms_ud, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
/* Subdissector code */
gsm_sms_dissector_table = register_dissector_table("gsm-sms-ud.udh.port",
"GSM SMS port IE in UDH", FT_UINT16, BASE_DEC);
/* Preferences for GSM SMS UD */
gsm_sms_ud_module = prefs_register_protocol (proto_gsm_sms_ud, NULL);
prefs_register_bool_preference (gsm_sms_ud_module,
"port_number_udh_means_wsp",
"Port Number IE in UDH always triggers CL-WSP dissection",
"Always decode a GSM Short Message as Connectionless WSP "
"if a Port Number Information Element is present "
"in the SMS User Data Header.",
&port_number_udh_means_wsp);
prefs_register_bool_preference (gsm_sms_ud_module, "try_dissect_1st_fragment",
"Always try subdissection of 1st Short Message fragment",
"Always try subdissection of the 1st fragment of a fragmented "
"GSM Short Message. If reassembly is possible, the Short Message "
"may be dissected twice (once as a short frame, once in its "
"entirety).",
&try_dissect_1st_frag);
prefs_register_bool_preference (gsm_sms_ud_module, "prevent_dissectors_chg_cols",
"Prevent sub-dissectors from changing column data",
"Prevent sub-dissectors from replacing column data with their "
"own. Eg. Prevent WSP dissector overwriting SMPP information.",
&prevent_subdissectors_changing_columns);
register_dissector("gsm-sms-ud", dissect_gsm_sms_ud, proto_gsm_sms_ud);
/* GSM SMS UD dissector initialization routines */
register_init_routine (gsm_sms_ud_defragment_init);
}
示例7: 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);
}
示例8: proto_register_dcp_etsi
//.........这里部分代码省略.........
FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL}},
{&hf_edcp_fragment_overlap,
{"Message fragment overlap", "dcp-pft.fragment.overlap",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{&hf_edcp_fragment_overlap_conflicts,
{"Message fragment overlapping with conflicting data",
"dcp-pft.fragment.overlap.conflicts",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{&hf_edcp_fragment_multiple_tails,
{"Message has multiple tail fragments",
"dcp-pft.fragment.multiple_tails",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{&hf_edcp_fragment_too_long_fragment,
{"Message fragment too long", "dcp-pft.fragment.too_long_fragment",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{&hf_edcp_fragment_error,
{"Message defragmentation error", "dcp-pft.fragment.error",
FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL}},
{&hf_edcp_reassembled_in,
{"Reassembled in", "dcp-pft.reassembled.in",
FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL}},
{&hf_edcp_reassembled_length,
{"Reassembled DCP (ETSI) length", "dcp-pft.reassembled.length",
FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL}},
{&hf_edcp_c_max,
{"C max", "dcp-pft.cmax",
FT_UINT16, BASE_DEC, NULL, 0,
"Maximum number of RS chunks sent", HFILL}
},
{&hf_edcp_rx_min,
{"Rx min", "dcp-pft.rxmin",
FT_UINT16, BASE_DEC, NULL, 0,
"Minimum number of fragments needed for RS decode", HFILL}
},
{&hf_edcp_rs_corrected,
{"RS Symbols Corrected", "dcp-pft.rs_corrected",
FT_INT16, BASE_DEC, NULL, 0,
"Number of symbols corrected by RS decode or -1 for failure", HFILL}
},
{&hf_edcp_rs_ok,
{"RS decode OK", "dcp-pft.rs_ok",
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"successfully decoded RS blocks", HFILL}
},
{&hf_edcp_pft_payload,
{"payload", "dcp-pft.payload",
FT_BYTES, BASE_NONE, NULL, 0,
"PFT Payload", HFILL}
}
};
static hf_register_info hf_tpl[] = {
{&hf_tpl_tlv,
{"tag", "dcp-tpl.tlv",
FT_BYTES, BASE_NONE, NULL, 0,
"Tag Packet", HFILL}
},
{&hf_tpl_ptr,
{"Type", "dcp-tpl.ptr",
FT_STRING, BASE_NONE, NULL, 0,
"Protocol Type & Revision", HFILL}
}
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_edcp,
&ett_af,
&ett_pft,
&ett_tpl,
&ett_edcp_fragment,
&ett_edcp_fragments
};
proto_dcp_etsi = proto_register_protocol ("ETSI Distribution & Communication Protocol (for DRM)", /* name */
"DCP (ETSI)", /* short name */
"dcp-etsi" /* abbrev */
);
proto_af = proto_register_protocol ("DCP Application Framing Layer", "DCP-AF", "dcp-af");
proto_pft = proto_register_protocol ("DCP Protection, Fragmentation & Transport Layer", "DCP-PFT", "dcp-pft");
proto_tpl = proto_register_protocol ("DCP Tag Packet Layer", "DCP-TPL", "dcp-tpl");
proto_register_field_array (proto_dcp_etsi, hf_edcp, array_length (hf_edcp));
proto_register_field_array (proto_af, hf_af, array_length (hf_af));
proto_register_field_array (proto_pft, hf_pft, array_length (hf_pft));
proto_register_field_array (proto_tpl, hf_tpl, array_length (hf_tpl));
proto_register_subtree_array (ett, array_length (ett));
/* subdissector code */
dcp_dissector_table = register_dissector_table("dcp-etsi.sync",
"DCP Sync", FT_STRING, BASE_NONE);
af_dissector_table = register_dissector_table("dcp-af.pt",
"AF Payload Type", FT_UINT8, BASE_DEC);
tpl_dissector_table = register_dissector_table("dcp-tpl.ptr",
"AF Payload Type", FT_STRING, BASE_NONE);
register_init_routine(dcp_init_protocol);
}
示例9: proto_register_tcap
//.........这里部分代码省略.........
"tcap.srt.end",
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
"SRT End of Session", HFILL }
},
{ &hf_tcapsrt_SessionTime,
{ "Session duration",
"tcap.srt.sessiontime",
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
"Duration of the TCAP session", HFILL }
},
{ &hf_tcapsrt_Duplicate,
{ "Session Duplicate",
"tcap.srt.duplicate",
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
"SRT Duplicated with Session", HFILL }
},
#include "packet-tcap-hfarr.c"
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_tcap,
&ett_param,
&ett_otid,
&ett_dtid,
&ett_tcap_stat,
#include "packet-tcap-ettarr.c"
};
/*static enum_val_t tcap_options[] = {
{ "itu", "ITU", ITU_TCAP_STANDARD },
{ "ansi", "ANSI", ANSI_TCAP_STANDARD },
{ NULL, NULL, 0 }
};*/
module_t *tcap_module;
/* Register the protocol name and description */
proto_tcap = proto_register_protocol(PNAME, PSNAME, PFNAME);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_tcap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
tcap_module = prefs_register_protocol(proto_tcap, NULL);
#if 0
prefs_register_enum_preference(tcap_module, "standard", "ITU TCAP standard",
"The SS7 standard used in ITU TCAP packets",
&tcap_standard, tcap_options, FALSE);
#else
prefs_register_obsolete_preference(tcap_module, "standard");
#endif
#if 0
prefs_register_bool_preference(tcap_module, "lock_info_col", "Lock Info column",
"Always show TCAP in Info column",
&lock_info_col);
#else
prefs_register_obsolete_preference(tcap_module, "lock_info_col");
#endif
/* Set default SSNs */
range_convert_str(&global_ssn_range, "", MAX_SSN);
ssn_range = range_empty();
prefs_register_range_preference(tcap_module, "ssn", "SCCP SSNs",
"SCCP (and SUA) SSNs to decode as TCAP",
&global_ssn_range, MAX_SSN);
prefs_register_bool_preference(tcap_module, "srt",
"Service Response Time Analyse",
"Activate the analyse for Response Time",
>cap_HandleSRT);
prefs_register_bool_preference(tcap_module, "persistentsrt",
"Persistent stats for SRT",
"Statistics for Response Time",
>cap_PersistentSRT);
prefs_register_uint_preference(tcap_module, "repetitiontimeout",
"Repetition timeout",
"Maximal delay for message repetion",
10, >cap_RepetitionTimeout);
prefs_register_uint_preference(tcap_module, "losttimeout",
"lost timeout",
"Maximal delay for message lost",
10, >cap_LostTimeout);
ansi_sub_dissectors = g_hash_table_new(g_direct_hash,g_direct_equal);
itu_sub_dissectors = g_hash_table_new(g_direct_hash,g_direct_equal);
/* 'globally' register dissector */
register_dissector("tcap", dissect_tcap, proto_tcap);
tcap_handle = create_dissector_handle(dissect_tcap, proto_tcap);
register_init_routine(&init_tcap);
}
示例10: proto_register_wai
//.........这里部分代码省略.........
NULL, HFILL }},
{ &hf_wai_identity_list,
{"ASU List trusted by ASUE", "wai.identity_list",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Identity list", HFILL }},
{ &hf_wai_reserved_byte,
{"Reserved", "wai.reserved.byte",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_wai_no_of_ids,
{"Number of Identities", "wai.no.of.ids",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_wai_access_res,
{"Access result", "wai.access_result",
FT_UINT8, BASE_HEX, VALS(wai_access_res_names), 0x0,
NULL, HFILL }},
{ &hf_wai_fragments,
{"Message fragments", "wai.fragments",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_fragment,
{"Message fragment", "wai.fragment",
FT_FRAMENUM, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_fragment_overlap,
{"Message fragment overlap", "wai.fragment.overlap",
FT_BOOLEAN, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_fragment_overlap_conflicts,
{"Message fragment overlapping with conflicting data", "wai.fragment.overlap.conflicts",
FT_BOOLEAN, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_fragment_multiple_tails,
{"Message has multiple tail fragments", "wai.fragment.multiple_tails",
FT_BOOLEAN, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_fragment_too_long_fragment,
{"Message fragment too long", "wai.fragment.too_long_fragment",
FT_BOOLEAN, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_fragment_error,
{"Message defragmentation error", "wai.fragment.error",
FT_FRAMENUM, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_fragment_count,
{"Message fragment count", "wai.fragment.count",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_reassembled_in,
{"Reassembled in", "wai.reassembled.in",
FT_FRAMENUM, BASE_NONE, NULL, 0x00,
NULL, HFILL }},
{ &hf_wai_reassembled_length,
{"Reassembled length", "wai.reassembled.length",
FT_UINT32, BASE_DEC, NULL, 0x00,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_wai,
&ett_wai_data,
&ett_wai_flags,
&ett_wai_certificate,
&ett_wai_mac,
&ett_wai_identity,
&ett_wai_key_data,
&ett_wai_ecdh_param,
&ett_wai_certificate_verification,
&ett_wai_identity_list,
&ett_wai_sign,
&ett_wai_sign_alg,
&ett_wai_sign_val,
&ett_wai_parameter,
&ett_wai_fragment,
&ett_wai_fragments
};
proto_wai = proto_register_protocol("WAI Protocol", "WAI", "wai");
register_init_routine(&wai_reassemble_init);
register_cleanup_routine(&wai_reassemble_cleanup);
proto_register_field_array(proto_wai, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
wai_handle = register_dissector("wai", dissect_wai, proto_wai);
}
示例11: proto_register_smtp
void
proto_register_smtp(void)
{
static hf_register_info hf[] = {
{ &hf_smtp_req,
{ "Request", "smtp.req",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_smtp_rsp,
{ "Response", "smtp.rsp",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_smtp_message,
{ "Message", "smtp.message",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_smtp_command_line,
{ "Command Line", "smtp.command_line",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_smtp_req_command,
{ "Command", "smtp.req.command",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_smtp_req_parameter,
{ "Request parameter", "smtp.req.parameter",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_smtp_response,
{ "Response", "smtp.response",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_smtp_rsp_code,
{ "Response code", "smtp.response.code",
FT_UINT32, BASE_DEC, VALS(response_codes_vs), 0x0, NULL, HFILL }},
{ &hf_smtp_rsp_parameter,
{ "Response parameter", "smtp.rsp.parameter",
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
/* Fragment entries */
{ &hf_smtp_data_fragments,
{ "DATA fragments", "smtp.data.fragments",
FT_NONE, BASE_NONE, NULL, 0x00, "Message fragments", HFILL } },
{ &hf_smtp_data_fragment,
{ "DATA fragment", "smtp.data.fragment",
FT_FRAMENUM, BASE_NONE, NULL, 0x00, "Message fragment", HFILL } },
{ &hf_smtp_data_fragment_overlap,
{ "DATA fragment overlap", "smtp.data.fragment.overlap", FT_BOOLEAN,
BASE_NONE, NULL, 0x0, "Message fragment overlap", HFILL } },
{ &hf_smtp_data_fragment_overlap_conflicts,
{ "DATA fragment overlapping with conflicting data",
"smtp.data.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL,
0x0, "Message fragment overlapping with conflicting data", HFILL } },
{ &hf_smtp_data_fragment_multiple_tails,
{ "DATA has multiple tail fragments", "smtp.data.fragment.multiple_tails",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Message has multiple tail fragments", HFILL } },
{ &hf_smtp_data_fragment_too_long_fragment,
{ "DATA fragment too long", "smtp.data.fragment.too_long_fragment",
FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Message fragment too long", HFILL } },
{ &hf_smtp_data_fragment_error,
{ "DATA defragmentation error", "smtp.data.fragment.error",
FT_FRAMENUM, BASE_NONE, NULL, 0x00, "Message defragmentation error", HFILL } },
{ &hf_smtp_data_fragment_count,
{ "DATA fragment count", "smtp.data.fragment.count",
FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } },
{ &hf_smtp_data_reassembled_in,
{ "Reassembled DATA in frame", "smtp.data.reassembled.in",
FT_FRAMENUM, BASE_NONE, NULL, 0x00, "This DATA fragment is reassembled in this frame", HFILL } },
{ &hf_smtp_data_reassembled_length,
{ "Reassembled DATA length", "smtp.data.reassembled.length",
FT_UINT32, BASE_DEC, NULL, 0x00, "The total length of the reassembled payload", HFILL } },
};
static gint *ett[] = {
&ett_smtp,
&ett_smtp_cmdresp,
&ett_smtp_data_fragment,
&ett_smtp_data_fragments,
};
module_t *smtp_module;
proto_smtp = proto_register_protocol("Simple Mail Transfer Protocol",
"SMTP", "smtp");
proto_register_field_array(proto_smtp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_init_routine (&smtp_data_reassemble_init);
/* Allow dissector to find be found by name. */
register_dissector("smtp", dissect_smtp, proto_smtp);
//.........这里部分代码省略.........
示例12: proto_register_ts2
//.........这里部分代码省略.........
},
{ &hf_msg_fragment_multiple_tails,
{"Message has multiple tail fragments",
"ts2.fragment.multiple_tails",
FT_BOOLEAN, BASE_NONE,
NULL, 0x0,
NULL, HFILL }
},
{ &hf_msg_fragment_too_long_fragment,
{"Message fragment too long", "ts2.fragment.too_long_fragment",
FT_BOOLEAN, BASE_NONE,
NULL, 0x0,
NULL, HFILL }
},
{ &hf_msg_fragment_error,
{"Message defragmentation error", "ts2.fragment.error",
FT_FRAMENUM, BASE_NONE,
NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_fragment_count,
{"Message fragment count", "ts2.fragment.count",
FT_UINT32, BASE_DEC,
NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_reassembled_in,
{"Reassembled in", "ts2.reassembled.in",
FT_FRAMENUM, BASE_NONE,
NULL, 0x00,
NULL, HFILL }
},
{ &hf_msg_reassembled_length,
{"Reassembled TeamSpeak2 length", "ts2.reassembled.length",
FT_UINT32, BASE_DEC,
NULL, 0x00,
NULL, HFILL }
},
{ &hf_ts2_channel_unregistered,
{ "Unregistered", "ts2.channelflags.unregistered",
FT_BOOLEAN, 8,
NULL, 0x01,
NULL, HFILL }
},
{ &hf_ts2_channel_moderated,
{ "Moderated", "ts2.channelflags.moderated",
FT_BOOLEAN, 8,
NULL, 0x02,
NULL, HFILL }
},
{ &hf_ts2_channel_password,
{ "Has password", "ts2.channelflags.has_password",
FT_BOOLEAN, 8,
NULL, 0x04,
NULL, HFILL }
},
{ &hf_ts2_channel_subchannels,
{ "Has subchannels", "ts2.channelflags.has_subchannels",
FT_BOOLEAN, 8,
NULL, 0x08,
NULL, HFILL }
},
{ &hf_ts2_channel_default,
{ "Default", "ts2.channelflags.default",
FT_BOOLEAN, 8,
NULL, 0x10,
NULL, HFILL }
},
{ &hf_ts2_channel_order,
{ "Channel order", "ts2.channelorder",
FT_UINT16, BASE_DEC,
NULL, 0x00,
NULL, HFILL }
},
{ &hf_ts2_max_users,
{ "Max users", "ts2.maxusers",
FT_UINT16, BASE_DEC,
NULL, 0x00,
NULL, HFILL }
}
};
static gint *ett[] = {
&ett_ts2,
&ett_msg_fragment,
&ett_msg_fragments,
&ett_ts2_channel_flags
};
/* Setup protocol subtree array */
proto_ts2 = proto_register_protocol (
"Teamspeak2 Protocol", /* name */
"TeamSpeak2", /* short name */
"ts2" /* abbrev */
);
proto_register_field_array(proto_ts2, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_init_routine(ts2_init);
}
示例13: zbee_security_register
/*FUNCTION:------------------------------------------------------
* NAME
* zbee_security_register
* DESCRIPTION
* Called by proto_register_zbee_nwk() to initialize the security
* dissectors.
* PARAMETERS
* module_t zbee_prefs - Prefs module to load preferences under.
* RETURNS
* none
*---------------------------------------------------------------
*/
void zbee_security_register(module_t *zbee_prefs, int proto)
{
static hf_register_info hf[] = {
{ &hf_zbee_sec_key_id,
{ "Key Id", "zbee.sec.key", FT_UINT8, BASE_HEX, VALS(zbee_sec_key_names),
ZBEE_SEC_CONTROL_KEY, NULL, HFILL }},
{ &hf_zbee_sec_nonce,
{ "Extended Nonce", "zbee.sec.ext_nonce", FT_BOOLEAN, 8, NULL, ZBEE_SEC_CONTROL_NONCE,
NULL, HFILL }},
{ &hf_zbee_sec_counter,
{ "Frame Counter", "zbee.sec.counter", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_zbee_sec_src64,
{ "Extended Source", "zbee.sec.src64", FT_EUI64, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_zbee_sec_key_seqno,
{ "Key Sequence Number", "zbee.sec.key_seqno", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_zbee_sec_mic,
{ "Message Integrity Code", "zbee.sec.mic", FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_zbee_sec_key_origin,
{ "Key Origin", "zbee.sec.key.origin", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_zbee_sec,
&ett_zbee_sec_control
};
static uat_field_t key_uat_fields[] = {
UAT_FLD_CSTRING(uat_key_records, string, "Key",
"A 16-byte key in hexadecimal with optional dash-,\n"
"colon-, or space-separator characters, or a\n"
"a 16-character string in double-quotes."),
UAT_FLD_VS(uat_key_records, byte_order, "Byte Order", byte_order_vals,
"Byte order of key."),
UAT_FLD_LSTRING(uat_key_records, label, "Label", "User label for key."),
UAT_END_FIELDS
};
/* If no prefs module was supplied, register our own. */
if (zbee_prefs == NULL) {
zbee_prefs = prefs_register_protocol(proto, NULL);
}
/* Register preferences */
prefs_register_enum_preference(zbee_prefs, "seclevel", "Security Level",
"Specifies the security level to use in the\n"
"decryption process. This value is ignored\n"
"for ZigBee 2004 and unsecured networks.",
&gPREF_zbee_sec_level, zbee_sec_level_enums, FALSE);
zbee_sec_key_table_uat = uat_new("Pre-configured Keys",
sizeof(uat_key_record_t),
"zigbee_pc_keys",
TRUE,
(void*) &uat_key_records,
&num_uat_key_records,
UAT_CAT_FFMT,
NULL, /* TODO: ptr to help manual? */
uat_key_record_copy_cb,
uat_key_record_update_cb,
uat_key_record_free_cb,
NULL, /* TODO: post_update */
key_uat_fields );
prefs_register_uat_preference(zbee_prefs,
"key_table",
"Pre-configured Keys",
"Pre-configured link or network keys.",
zbee_sec_key_table_uat);
proto_register_field_array(proto, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
/* Register the init routine. */
register_init_routine(proto_init_zbee_security);
} /* zbee_security_register */
示例14: proto_register_brdwlk
void
proto_register_brdwlk (void)
{
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_brdwlk_sof,
{"SOF", "brdwlk.sof", FT_UINT8, BASE_HEX, VALS (brdwlk_sof_vals),
0xF0, NULL, HFILL}},
{ &hf_brdwlk_eof,
{"EOF", "brdwlk.eof", FT_UINT8, BASE_HEX, VALS (brdwlk_eof_vals),
0x0F, NULL, HFILL}},
{ &hf_brdwlk_error,
{"Error", "brdwlk.error", FT_UINT8, BASE_HEX, NULL, 0x0, NULL,
HFILL}},
{ &hf_brdwlk_pktcnt,
{"Packet Count", "brdwlk.pktcnt", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}},
{ &hf_brdwlk_drop,
{"Packet Dropped", "brdwlk.drop", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL}},
{ &hf_brdwlk_vsan,
{"VSAN", "brdwlk.vsan", FT_UINT16, BASE_DEC, NULL, 0xFFF, NULL,
HFILL}},
{ &hf_brdwlk_plen,
{"Original Packet Length", "brdwlk.plen", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
HFILL}},
{ &hf_brdwlk_error_plp,
{"Packet Length Present", "brdwlk.error.plp", FT_BOOLEAN, 8, TFS(&tfs_error_plp), 0x01, NULL,
HFILL}},
{ &hf_brdwlk_error_ef,
{"Empty Frame", "brdwlk.error.ef", FT_BOOLEAN, 8, TFS(&tfs_error_ef), 0x02, NULL,
HFILL}},
{ &hf_brdwlk_error_nd,
{"No Data", "brdwlk.error.nd", FT_BOOLEAN, 8, TFS(&tfs_error_nd), 0x04, NULL,
HFILL}},
{ &hf_brdwlk_error_tr,
{"Truncated", "brdwlk.error.tr", FT_BOOLEAN, 8, TFS(&tfs_error_tr), 0x08, NULL,
HFILL}},
{ &hf_brdwlk_error_badcrc,
{"CRC", "brdwlk.error.crc", FT_BOOLEAN, 8, TFS(&tfs_error_crc), 0x10, NULL,
HFILL}},
{ &hf_brdwlk_error_ff,
{"Fifo Full", "brdwlk.error.ff", FT_BOOLEAN, 8, TFS(&tfs_error_ff), 0x20, NULL,
HFILL}},
{ &hf_brdwlk_error_jumbo,
{"Jumbo FC Frame", "brdwlk.error.jumbo", FT_BOOLEAN, 8, TFS(&tfs_error_jumbo), 0x40, NULL,
HFILL}},
{ &hf_brdwlk_error_ctrl,
{"Ctrl Char Inside Frame", "brdwlk.error.ctrl", FT_BOOLEAN, 8, TFS(&tfs_error_ctrl), 0x80, NULL,
HFILL}},
};
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_brdwlk,
&ett_brdwlk_error,
};
/* Register the protocol name and description */
proto_brdwlk = proto_register_protocol("Boardwalk",
"Boardwalk", "brdwlk");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_brdwlk, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_init_routine(&brdwlk_init);
}
示例15: 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));
register_dissector("aoe", dissect_aoe, proto_aoe);
register_init_routine(ata_init);
}