void proto_register_fw1(void) { static hf_register_info hf[] = { { &hf_fw1_direction, { "Direction", "fw1.direction", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_fw1_chain, { "Chain Position", "fw1.chain", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_fw1_interface, { "Interface", "fw1.interface", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_fw1_uuid, { "UUID", "fw1.uuid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, /* registered here but handled in ethertype.c */ { &hf_fw1_type, { "Type", "fw1.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, NULL, HFILL }}, }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_fw1, }; module_t *fw1_module; int i; /* Register the protocol name and description */ proto_fw1 = proto_register_protocol("Checkpoint FW-1", "FW-1", "fw1"); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_fw1, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); /* Register configuration preferences */ fw1_module = prefs_register_protocol(proto_fw1, NULL); prefs_register_bool_preference(fw1_module, "summary_in_tree", "Show FireWall-1 summary in protocol tree", "Whether the FireWall-1 summary line should be shown in the protocol tree", &fw1_summary_in_tree); prefs_register_bool_preference(fw1_module, "with_uuid", "Monitor file includes UUID", "Whether the Firewall-1 monitor file includes UUID information", &fw1_with_uuid); prefs_register_bool_preference(fw1_module, "iflist_with_chain", "Interface list includes chain position", "Whether the interface list includes the chain position", &fw1_iflist_with_chain); register_dissector("fw1", dissect_fw1, proto_fw1); for (i=0; i<interface_anzahl; i++) { p_interfaces[i] = NULL; } register_init_routine(fw1_init); }
/*--- 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); }
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); }
/*--- 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); }
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); }
void proto_register_ipx(void) { static hf_register_info hf_ipx[] = { { &hf_ipx_checksum, { "Checksum", "ipx.checksum", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_src, { "Source Address", "ipx.src", FT_STRING, BASE_NONE, NULL, 0x0, "Source IPX Address \"network.node\"", HFILL }}, { &hf_ipx_dst, { "Destination Address", "ipx.dst", FT_STRING, BASE_NONE, NULL, 0x0, "Destination IPX Address \"network.node\"", HFILL }}, { &hf_ipx_addr, { "Src/Dst Address", "ipx.addr", FT_STRING, BASE_NONE, NULL, 0x0, "Source or Destination IPX Address \"network.node\"", HFILL }}, { &hf_ipx_len, { "Length", "ipx.len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_hops, { "Transport Control (Hops)", "ipx.hops", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_packet_type, { "Packet Type", "ipx.packet_type", FT_UINT8, BASE_HEX, VALS(ipx_packet_type_vals), 0x0, NULL, HFILL }}, { &hf_ipx_dnet, { "Destination Network","ipx.dst.net", FT_IPXNET, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_dnode, { "Destination Node", "ipx.dst.node", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_dsocket, { "Destination Socket", "ipx.dst.socket", FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ipx_socket_vals_ext, 0x0, NULL, HFILL }}, { &hf_ipx_snet, { "Source Network","ipx.src.net", FT_IPXNET, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_snode, { "Source Node", "ipx.src.node", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_ssocket, { "Source Socket", "ipx.src.socket", FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ipx_socket_vals_ext, 0x0, NULL, HFILL }}, { &hf_ipx_net, { "Source or Destination Network","ipx.net", FT_IPXNET, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_node, { "Source or Destination Node", "ipx.node", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ipx_socket, { "Source or Destination Socket", "ipx.socket", FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ipx_socket_vals_ext, 0x0, NULL, HFILL }}, }; static hf_register_info hf_spx[] = { { &hf_spx_connection_control, { "Connection Control", "spx.ctl", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_spx_connection_control_sys, { "System Packet", "spx.ctl.sys", FT_BOOLEAN, 8, NULL, SPX_SYS_PACKET, NULL, HFILL }}, { &hf_spx_connection_control_send_ack, { "Send Ack", "spx.ctl.send_ack", FT_BOOLEAN, 8, NULL, SPX_SEND_ACK, NULL, HFILL }}, { &hf_spx_connection_control_attn, { "Attention", "spx.ctl.attn", FT_BOOLEAN, 8, NULL, SPX_ATTN, NULL, HFILL }}, { &hf_spx_connection_control_eom, { "End of Message", "spx.ctl.eom", FT_BOOLEAN, 8, NULL, SPX_EOM, NULL, HFILL }}, { &hf_spx_datastream_type, { "Datastream type", "spx.type", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_spx_src_id, { "Source Connection ID", "spx.src", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_spx_dst_id, { "Destination Connection ID", "spx.dst", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_spx_seq_nr, { "Sequence Number", "spx.seq", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_spx_ack_nr, { "Acknowledgment Number", "spx.ack", FT_UINT16, BASE_DEC, NULL, 0x0, 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"); }
void proto_register_usb_audio(void) { static hf_register_info hf[] = { { &hf_midi_cable_number, { "Cable Number", "usbaudio.midi.cable_number", FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL }}, { &hf_midi_code_index, { "Code Index", "usbaudio.midi.code_index", FT_UINT8, BASE_HEX, VALS(code_index_vals), 0x0F, NULL, HFILL }}, { &hf_midi_event, { "MIDI Event", "usbaudio.midi.event", FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL }}, { &hf_sysex_msg_fragments, { "Message fragments", "usbaudio.sysex.fragments", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_fragment, { "Message fragment", "usbaudio.sysex.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_fragment_overlap, { "Message fragment overlap", "usbaudio.sysex.fragment.overlap", FT_BOOLEAN, 0, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_fragment_overlap_conflicts, { "Message fragment overlapping with conflicting data", "usbaudio.sysex.fragment.overlap.conflicts", FT_BOOLEAN, 0, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_fragment_multiple_tails, { "Message has multiple tail fragments", "usbaudio.sysex.fragment.multiple_tails", FT_BOOLEAN, 0, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_fragment_too_long_fragment, { "Message fragment too long", "usbaudio.sysex.fragment.too_long_fragment", FT_BOOLEAN, 0, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_fragment_error, { "Message defragmentation error", "usbaudio.sysex.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_fragment_count, { "Message fragment count", "usbaudio.sysex.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_reassembled_in, { "Reassembled in", "usbaudio.sysex.reassembled.in", FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_reassembled_length, { "Reassembled length", "usbaudio.sysex.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }}, { &hf_sysex_msg_reassembled_data, { "Reassembled data", "usbaudio.sysex.reassembled.data", FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL }}, }; static gint *usb_audio_subtrees[] = { &ett_usb_audio, &ett_sysex_msg_fragment, &ett_sysex_msg_fragments }; proto_usb_audio = proto_register_protocol("USB Audio", "USBAUDIO", "usbaudio"); proto_register_field_array(proto_usb_audio, hf, array_length(hf)); proto_register_subtree_array(usb_audio_subtrees, array_length(usb_audio_subtrees)); register_init_routine(&midi_data_reassemble_init); register_dissector("usbaudio", dissect_usb_audio_bulk, proto_usb_audio); }
/* Register the protocol with Wireshark */ void proto_register_gsm_sms_ud(void) { module_t *gsm_sms_ud_module; /* Preferences for GSM SMS UD */ /* Setup list of header fields */ static hf_register_info hf[] = { /* * User Data Header */ { &hf_gsm_sms_udh_iei, { "IE Id", "gsm-sms-ud.udh.iei", FT_UINT8, BASE_HEX, VALS(vals_udh_iei), 0x00, "Name of the User Data Header Information Element.", HFILL } }, { &hf_gsm_sms_udh_length, { "UDH Length", "gsm-sms-ud.udh.len", FT_UINT8, BASE_DEC, NULL, 0x00, "Length of the User Data Header (bytes)", HFILL } }, { &hf_gsm_sms_udh_multiple_messages, { "Multiple messages UDH", "gsm-sms-ud.udh.mm", FT_NONE, BASE_NONE, NULL, 0x00, "Multiple messages User Data Header", HFILL } }, { &hf_gsm_sms_udh_multiple_messages_msg_id, { "Message identifier", "gsm-sms-ud.udh.mm.msg_id", FT_UINT16, BASE_DEC, NULL, 0x00, "Identification of the message", HFILL } }, { &hf_gsm_sms_udh_multiple_messages_msg_parts, { "Message parts", "gsm-sms-ud.udh.mm.msg_parts", FT_UINT8, BASE_DEC, NULL, 0x00, "Total number of message parts (fragments)", HFILL } }, { &hf_gsm_sms_udh_multiple_messages_msg_part, { "Message part number", "gsm-sms-ud.udh.mm.msg_part", FT_UINT8, BASE_DEC, NULL, 0x00, "Message part (fragment) sequence number", HFILL } }, { &hf_gsm_sms_udh_ports, { "Port number UDH", "gsm-sms-ud.udh.ports", FT_NONE, BASE_NONE, NULL, 0x00, "Port number User Data Header", HFILL } }, { &hf_gsm_sms_udh_ports_src, { "Source port", "gsm-sms-ud.udh.ports.src", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_gsm_sms_udh_ports_dst, { "Destination port", "gsm-sms-ud.udh.ports.dst", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL } }, /* * Short Message fragment reassembly */ { &hf_gsm_sms_ud_fragments, { "Short Message fragments", "gsm-sms-ud.fragments", FT_NONE, BASE_NONE, NULL, 0x00, "GSM Short Message fragments", HFILL } }, { &hf_gsm_sms_ud_fragment, { "Short Message fragment", "gsm-sms-ud.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x00, "GSM Short Message fragment", HFILL } }, { &hf_gsm_sms_ud_fragment_overlap, { "Short Message fragment overlap", "gsm-sms-ud.fragment.overlap", 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); }
void proto_register_clnp(void) { static hf_register_info hf[] = { { &hf_clnp_id, { "Network Layer Protocol Identifier", "clnp.nlpi", FT_UINT8, BASE_HEX, VALS(nlpid_vals), 0x0, NULL, HFILL }}, { &hf_clnp_length, { "HDR Length", "clnp.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_clnp_version, { "Version", "clnp.version", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_clnp_ttl, { "Holding Time", "clnp.ttl", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_clnp_type, { "PDU Type", "clnp.type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_clnp_cnf_segmentation, { "Segmentation permitted", "clnp.cnf.segmentation", FT_BOOLEAN, 8, TFS(&tfs_yes_no), CNF_SEG_OK, NULL, HFILL }}, { &hf_clnp_cnf_more_segments, { "More segments", "clnp.cnf.more_segments", FT_BOOLEAN, 8, TFS(&tfs_yes_no), CNF_MORE_SEGS, NULL, HFILL }}, { &hf_clnp_cnf_report_error, { "Report error if PDU discarded", "clnp.cnf.report_error", FT_BOOLEAN, 8, TFS(&tfs_yes_no), CNF_ERR_OK, NULL, HFILL }}, { &hf_clnp_cnf_type, { "Type", "clnp.cnf.type", FT_UINT8, BASE_DEC, VALS(npdu_type_vals), CNF_TYPE, NULL, HFILL }}, { &hf_clnp_pdu_length, { "PDU length", "clnp.pdu.len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_clnp_checksum, { "Checksum", "clnp.checksum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &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); }
void proto_register_ses(void) { static hf_register_info hf[] = { { &hf_ses_type, { "SPDU Type", "ses.type", FT_UINT8, BASE_DEC, VALS(ses_vals), 0x0, NULL, HFILL } }, { &hf_ses_type_0, { "SPDU Type", "ses.type", FT_UINT8, BASE_DEC, VALS(ses_category0_vals), 0x0, NULL, HFILL } }, { &hf_ses_length, { "Length", "ses.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, #if 0 { &hf_ses_version, { "Version", "ses.version", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, #endif #if 0 { &hf_ses_reserved, { "Reserved", "ses.reserved", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, #endif { &hf_called_ss_user_reference, { "Called SS User Reference", "ses.called_ss_user_reference", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_calling_ss_user_reference, { "Calling SS User Reference", "ses.calling_ss_user_reference", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_common_reference, { "Common Reference", "ses.common_reference", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_additional_reference_information, { "Additional Reference Information", "ses.additional_reference_information", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_release_token, { "release token", "ses.release_token", FT_BOOLEAN, 8, NULL, RELEASE_TOKEN, NULL, HFILL } }, { &hf_major_activity_token, { "major/activity token", "ses.major.token", FT_BOOLEAN, 8, NULL, MAJOR_ACTIVITY_TOKEN, NULL, HFILL } }, { &hf_synchronize_minor_token, { "synchronize minor token", "ses.synchronize_token", FT_BOOLEAN, 8, NULL, SYNCHRONIZE_MINOR_TOKEN, NULL, HFILL } }, { &hf_data_token, { "data token", "ses.data_token", FT_BOOLEAN, 8, NULL, DATA_TOKEN, "data token", HFILL } }, { &hf_able_to_receive_extended_concatenated_SPDU, { "Able to receive extended concatenated SPDU", "ses.connect.f1", FT_BOOLEAN, 8, NULL, SES_EXT_CONT, NULL, HFILL } }, { &hf_session_user_req_flags, { "Flags", "ses.req.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_session_exception_report, { "Session exception report", "ses.exception_report.", FT_BOOLEAN, 16, NULL, SES_EXCEPTION_REPORT, NULL, HFILL } }, { &hf_data_separation_function_unit, { "Data separation function unit", "ses.data_sep", FT_BOOLEAN, 16, NULL, DATA_SEPARATION_FUNCTION_UNIT, NULL, HFILL } }, { &hf_symmetric_synchronize_function_unit, { "Symmetric synchronize function unit", "ses.symm_sync", FT_BOOLEAN, 16, NULL, SYMMETRIC_SYNCHRONIZE_FUNCTION_UNIT, NULL, HFILL } }, { &hf_typed_data_function_unit, { "Typed data function unit", "ses.typed_data", FT_BOOLEAN, 16, NULL, TYPED_DATA_FUNCTION_UNIT, NULL, HFILL } }, { &hf_exception_function_unit, { "Exception function unit", "ses.exception_data", FT_BOOLEAN, 16, NULL, EXCEPTION_FUNCTION_UNIT, NULL, HFILL } }, { &hf_capability_function_unit, { "Capability function unit", "ses.capability_data", FT_BOOLEAN, 16, NULL, CAPABILITY_DATA_FUNCTION_UNIT, NULL, HFILL } }, { &hf_negotiated_release_function_unit, { "Negotiated release function unit", "ses.negotiated_release", FT_BOOLEAN, 16, NULL, NEGOTIATED_RELEASE_FUNCTION_UNIT, NULL, HFILL } }, { &hf_activity_management_function_unit, { "Activity management function unit", "ses.activity_management", FT_BOOLEAN, 16, NULL, ACTIVITY_MANAGEMENT_FUNCTION_UNIT, NULL, HFILL } }, { &hf_resynchronize_function_unit, { "Resynchronize function unit", "ses.resynchronize", FT_BOOLEAN, 16, NULL, RESYNCHRONIZE_FUNCTION_UNIT, NULL, HFILL } }, { &hf_major_resynchronize_function_unit, { "Major resynchronize function unit", "ses.major_resynchronize", FT_BOOLEAN, 16, NULL, MAJOR_SYNCHRONIZE_FUNCTION_UNIT, NULL, HFILL } }, { &hf_minor_resynchronize_function_unit, { "Minor resynchronize function unit", "ses.minor_resynchronize", FT_BOOLEAN, 16, NULL, MINOR_SYNCHRONIZE_FUNCTION_UNIT, NULL, HFILL } }, { &hf_expedited_data_resynchronize_function_unit, { "Expedited data function unit", "ses.expedited_data", FT_BOOLEAN, 16, NULL, EXPEDITED_DATA_FUNCTION_UNIT, NULL, HFILL } }, { &hf_duplex_function_unit, { "Duplex functional unit", "ses.duplex", FT_BOOLEAN, 16, NULL, DUPLEX_FUNCTION_UNIT, NULL, HFILL } }, { &hf_half_duplex_function_unit, { "Half-duplex functional unit", "ses.half_duplex", FT_BOOLEAN, 16, NULL, HALF_DUPLEX_FUNCTION_UNIT, NULL, HFILL } }, { &hf_proposed_tsdu_maximum_size_i2r, { "Proposed TSDU Maximum Size, Initiator to Responder", "ses.proposed_tsdu_maximum_size_i2r", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_proposed_tsdu_maximum_size_r2i, { "Proposed TSDU Maximum Size, Responder to Initiator", "ses.proposed_tsdu_maximum_size_r2i", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_protocol_version_1, { "Protocol Version 1", "ses.protocol_version1", FT_BOOLEAN, 8, NULL, PROTOCOL_VERSION_1, NULL, HFILL } }, { &hf_protocol_version_2, { "Protocol Version 2", "ses.protocol_version2", FT_BOOLEAN, 8, NULL, PROTOCOL_VERSION_2, NULL, HFILL } }, { &hf_initial_serial_number, { "Initial Serial Number", "ses.initial_serial_number", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_beginning_of_SSDU, { "beginning of SSDU", "ses.begininng_of_SSDU", FT_BOOLEAN, 8, NULL, BEGINNING_SPDU, NULL, HFILL } }, { &hf_end_of_SSDU, { "end of SSDU", "ses.end_of_SSDU", FT_BOOLEAN, 8, NULL, END_SPDU, NULL, HFILL } }, { &hf_release_token_setting, { "release token setting", "ses.release_token_setting", FT_UINT8, BASE_HEX, VALS(token_setting_vals), 0xC0, NULL, HFILL } }, { &hf_major_activity_token_setting, { "major/activity setting", "ses.major_activity_token_setting", FT_UINT8, BASE_HEX, VALS(token_setting_vals), 0x30, "major/activity token setting", HFILL } }, { &hf_synchronize_minor_token_setting, { "synchronize-minor token setting", "ses.synchronize_minor_token_setting", FT_UINT8, BASE_HEX, VALS(token_setting_vals), 0x0C, NULL, HFILL } }, { &hf_data_token_setting, { "data token setting", "ses.data_token_setting", FT_UINT8, BASE_HEX, VALS(token_setting_vals), 0x03, NULL, HFILL } }, { &hf_activity_identifier, { "Activity Identifier", "ses.activity_identifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_serial_number, { "Serial Number", "ses.serial_number", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_calling_session_selector, { "Calling Session Selector", "ses.calling_session_selector", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_called_session_selector, { "Called Session Selector", "ses.called_session_selector", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_second_serial_number, { "Second Serial Number", "ses.second_serial_number", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_second_initial_serial_number, { "Second Initial Serial Number", "ses.second_initial_serial_number", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_large_initial_serial_number, { "Large Initial Serial Number", "ses.large_initial_serial_number", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_large_second_initial_serial_number, { "Large Second Initial Serial Number", "ses.large_second_initial_serial_number", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_connect_protocol_options_flags, { "Flags", "ses.connect.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_version_number_options_flags, { "Flags", "ses.version.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_token_item_options_flags, { "Flags", "ses.tken_item.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_enclosure_item_options_flags, { "Flags", "ses.enclosure.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_ses_segment_data, { "SES segment data", "ses.segment.data", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_ses_segments, { "SES segments", "ses.segments", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_ses_segment, { "SES segment", "ses.segment", FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_ses_segment_overlap, { "SES segment overlap", "ses.segment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ses_segment_overlap_conflicts, { "SES segment overlapping with conflicting data", "ses.segment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ses_segment_multiple_tails, { "SES has multiple tail segments", "ses.segment.multiple_tails", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ses_segment_too_long_segment, { "SES segment too long", "ses.segment.too_long_segment", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ses_segment_error, { "SES desegmentation error", "ses.segment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_ses_segment_count, { "SES segment count", "ses.segment.count", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_ses_reassembled_in, { "Reassembled SES in frame", "ses.reassembled.in", FT_FRAMENUM, BASE_NONE, NULL, 0x00, "This SES packet is reassembled in this frame", HFILL } }, { &hf_ses_reassembled_length, { "Reassembled SES length", "ses.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x00, "The total length of the reassembled payload", HFILL } } }; static gint *ett[] = { &ett_ses, &ett_ses_param, &ett_connect_protocol_options_flags, &ett_protocol_version_flags, &ett_enclosure_item_flags, &ett_token_item_flags, &ett_ses_req_options_flags, &ett_ses_segment, &ett_ses_segments }; module_t *ses_module; proto_ses = proto_register_protocol(PROTO_STRING_SES, "SES", "ses"); proto_register_field_array(proto_ses, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_init_routine (&ses_reassemble_init); ses_module = prefs_register_protocol(proto_ses, NULL); prefs_register_bool_preference(ses_module, "desegment", "Reassemble session packets ", "Whether the session dissector should reassemble messages spanning multiple SES segments", &ses_desegment); /* * Register the dissector by name, so other dissectors can * grab it by name rather than just referring to it directly * (you can't refer to it directly from a plugin dissector * on Windows without stuffing it into the Big Transfer Vector). */ register_dissector("ses", dissect_ses, proto_ses); }
/*--- proto_register_rtse -------------------------------------------*/ void proto_register_rtse(void) { /* List of fields */ static hf_register_info hf[] = { /* Fragment entries */ { &hf_rtse_segment_data, { "RTSE segment data", "rtse.segment", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragments, { "RTSE fragments", "rtse.fragments", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment, { "RTSE fragment", "rtse.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment_overlap, { "RTSE fragment overlap", "rtse.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_overlap_conflicts, { "RTSE fragment overlapping with conflicting data", "rtse.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_multiple_tails, { "RTSE has multiple tail fragments", "rtse.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_too_long_fragment, { "RTSE fragment too long", "rtse.fragment.too_long_fragment", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_rtse_fragment_error, { "RTSE defragmentation error", "rtse.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_rtse_fragment_count, { "RTSE fragment count", "rtse.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_rtse_reassembled_in, { "Reassembled RTSE in frame", "rtse.reassembled.in", FT_FRAMENUM, BASE_NONE, NULL, 0x00, "This RTSE packet is reassembled in this frame", HFILL } }, { &hf_rtse_reassembled_length, { "Reassembled RTSE length", "rtse.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x00, "The total length of the reassembled payload", HFILL } }, #include "packet-rtse-hfarr.c" }; /* List of subtrees */ static gint *ett[] = { &ett_rtse, &ett_rtse_unknown, &ett_rtse_fragment, &ett_rtse_fragments, #include "packet-rtse-ettarr.c" }; module_t *rtse_module; /* Register protocol */ proto_rtse = proto_register_protocol(PNAME, PSNAME, PFNAME); register_dissector("rtse", dissect_rtse, proto_rtse); /* Register fields and subtrees */ proto_register_field_array(proto_rtse, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_init_routine (&rtse_reassemble_init); rtse_module = prefs_register_protocol_subtree("OSI", proto_rtse, NULL); prefs_register_bool_preference(rtse_module, "reassemble", "Reassemble segmented RTSE datagrams", "Whether segmented RTSE datagrams should be reassembled." " To use this option, you must also enable" " \"Allow subdissectors to reassemble TCP streams\"" " in the TCP protocol settings.", &rtse_reassemble); rtse_oid_dissector_table = register_dissector_table("rtse.oid", "RTSE OID Dissectors", FT_STRING, BASE_NONE); oid_table=g_hash_table_new(g_str_hash, g_str_equal); }
void proto_register_dcp_etsi (void) { static hf_register_info hf_edcp[] = { {&hf_edcp_sync, {"sync", "dcp-etsi.sync", FT_STRING, BASE_NONE, NULL, 0, "AF or PF", HFILL} } }; static hf_register_info hf_af[] = { {&hf_edcp_len, {"length", "dcp-af.len", FT_UINT32, BASE_DEC, NULL, 0, "length in bytes of the payload", HFILL} }, {&hf_edcp_seq, {"frame count", "dcp-af.seq", FT_UINT16, BASE_DEC, NULL, 0, "Logical Frame Number", HFILL} }, {&hf_edcp_crcflag, {"crc flag", "dcp-af.crcflag", FT_BOOLEAN, 8, NULL, 0x80, "Frame is protected by CRC", HFILL} }, {&hf_edcp_maj, {"Major Revision", "dcp-af.maj", FT_UINT8, BASE_DEC, NULL, 0x70, "Major Protocol Revision", HFILL} }, {&hf_edcp_min, {"Minor Revision", "dcp-af.min", FT_UINT8, BASE_DEC, NULL, 0x0f, "Minor Protocol Revision", HFILL} }, {&hf_edcp_pt, {"Payload Type", "dcp-af.pt", FT_STRING, BASE_NONE, NULL, 0, "T means Tag Packets, all other values reserved", HFILL} }, {&hf_edcp_crc, {"CRC", "dcp-af.crc", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL} }, {&hf_edcp_crc_ok, {"CRC OK", "dcp-af.crc_ok", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "AF CRC OK", HFILL} } }; static hf_register_info hf_pft[] = { {&hf_edcp_pft_pt, {"Sub-protocol", "dcp-pft.pt", FT_UINT8, BASE_DEC, NULL, 0, "Always AF", HFILL} }, {&hf_edcp_pseq, {"Sequence No", "dcp-pft.seq", FT_UINT16, BASE_DEC, NULL, 0, "PFT Sequence No", HFILL} }, {&hf_edcp_findex, {"Fragment Index", "dcp-pft.findex", FT_UINT24, BASE_DEC, NULL, 0, "Index of the fragment within one AF Packet", HFILL} }, {&hf_edcp_fcount, {"Fragment Count", "dcp-pft.fcount", FT_UINT24, BASE_DEC, NULL, 0, "Number of fragments produced from this AF Packet", HFILL} }, {&hf_edcp_fecflag, {"FEC", "dcp-pft.fec", FT_BOOLEAN, 16, NULL, 0x8000, "When set the optional RS header is present", HFILL} }, {&hf_edcp_addrflag, {"Addr", "dcp-pft.addr", FT_BOOLEAN, 16, NULL, 0x4000, "When set the optional transport header is present", HFILL} }, {&hf_edcp_plen, {"fragment length", "dcp-pft.len", FT_UINT16, BASE_DEC, NULL, 0x3fff, "length in bytes of the payload of this fragment", HFILL} }, {&hf_edcp_rsk, {"RSk", "dcp-pft.rsk", FT_UINT8, BASE_DEC, NULL, 0, "The length of the Reed Solomon data word", HFILL} }, {&hf_edcp_rsz, {"RSz", "dcp-pft.rsz", FT_UINT8, BASE_DEC, NULL, 0, "The number of padding bytes in the last Reed Solomon block", HFILL} }, {&hf_edcp_source, {"source addr", "dcp-pft.source", FT_UINT16, BASE_DEC, NULL, 0, "PFT source identifier", HFILL} }, {&hf_edcp_dest, {"dest addr", "dcp-pft.dest", FT_UINT16, BASE_DEC, NULL, 0, "PFT destination identifier", HFILL} }, {&hf_edcp_hcrc, {"header CRC", "dcp-pft.crc", FT_UINT16, BASE_HEX, NULL, 0, "PFT Header CRC", HFILL} }, {&hf_edcp_hcrc_ok, {"PFT CRC OK", "dcp-pft.crc_ok", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "PFT Header CRC OK", HFILL} }, {&hf_edcp_fragments, {"Message fragments", "dcp-pft.fragments", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL}}, {&hf_edcp_fragment, {"Message fragment", "dcp-pft.fragment", 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); }
void proto_register_tcap(void) { /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { { &hf_tcap_tag, { "Tag", "tcap.msgtype", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } }, { &hf_tcap_length, { "Length", "tcap.len", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } }, { &hf_tcap_data, { "Data", "tcap.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_tcap_tid, { "Transaction Id", "tcap.tid", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } }, /* Tcap Service Response Time */ { &hf_tcapsrt_SessionId, { "Session Id", "tcap.srt.session_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_tcapsrt_BeginSession, { "Begin Session", "tcap.srt.begin", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "SRT Begin of Session", HFILL } }, { &hf_tcapsrt_EndSession, { "End Session", "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); }
void proto_register_wai(void) { static hf_register_info hf[] = { { &hf_wai_version, { "Version", "wai.version", FT_UINT16, BASE_DEC, NULL, 0x0, "Version of authentication infrastructure", HFILL }}, { &hf_wai_type, { "Type", "wai.type", FT_UINT8, BASE_HEX, VALS(wai_type_names), 0x0, "Protocol type", HFILL }}, { &hf_wai_subtype, { "Subtype", "wai.subtype", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &wai_subtype_names_ext, 0x0, NULL, HFILL }}, { &hf_wai_reserved, { "Reserved", "wai.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_wai_length, { "Length", "wai.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_wai_seq, { "Sequence number", "wai.seq", FT_UINT16, BASE_DEC, NULL, 0x0, "Packet sequence number", HFILL }}, { &hf_wai_fragm_seq, { "Fragment sequence number", "wai.fragm.seq", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_wai_flag, { "Flag", "wai.flag", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_wai_data, { "Data", "wai.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_bk_rekeying_flag, {"BK rekeying", "wai.bk.rekeying.flag", FT_BOOLEAN, 8, TFS (&wai_bk_rekeying_flag), FLAG_BIT0, "BK rekeying flag", HFILL }}, { &hf_wai_preauthentication_flag, {"Pre-Authentication", "wai.preauthentication.flag", FT_BOOLEAN, 8, TFS (&wai_preauthentication_flag), FLAG_BIT1, "Pre-Authentication flag", HFILL }}, { &hf_wai_certificate_flag, {"Certificate", "wai.certificate.flag", FT_BOOLEAN, 8, TFS (&wai_certificate_flag), FLAG_BIT2, "Certificate flag", HFILL }}, { &hf_wai_optional_flag, {"Optional", "wai.optional.flag", FT_BOOLEAN, 8, TFS (&wai_optional_flag), FLAG_BIT3, "Optional flag", HFILL }}, { &hf_wai_usk_rekeying_flag, {"USK rekeying", "wai.usk.rekeying.flag", FT_BOOLEAN, 8, TFS (&wai_usk_rekeying_flag), FLAG_BIT4, "USK rekeying flag", HFILL }}, { &hf_wai_negotiation_flag, {"STA negotiation", "wai.negotiation.flag", FT_BOOLEAN, 8, TFS (&wai_negotiation_flag), FLAG_BIT5, "STA negotiation flag", HFILL }}, { &hf_wai_revoking_flag, {"STA revoking", "wai.revoking.flag", FT_BOOLEAN, 8, TFS (&wai_revoking_flag), FLAG_BIT6, "STA revoking flag", HFILL }}, { &hf_wai_reserved_flag, {"Reserved", "wai.reserved.flag", FT_BOOLEAN, 8, TFS (&wai_reserved_flag), FLAG_BIT7, "Reserved flag", HFILL }}, { &hf_wai_attr_type, { "Type", "wai.attrtype", FT_UINT8, BASE_HEX, VALS(wai_attr_type_names), 0x0, "Attribute type", HFILL }}, { &hf_wai_cert, {"Certificate", "wai.cert", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_cert_id, {"Id", "wai.cert.id", FT_UINT16, BASE_HEX, NULL, 0x0, "Certificate Id", HFILL }}, { &hf_wai_cert_data, {"Data", "wai.cert.data", FT_BYTES, BASE_NONE, NULL, 0x0, "Certificate data", HFILL }}, { &hf_wai_cert_len, {"Length", "wai.cert.len", FT_UINT16, BASE_DEC, NULL, 0x0, "Certificate length", HFILL }}, { &hf_wai_addid, {"ADDID", "wai.addid", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_ae_mac, {"AE MAC", "wai.ae.mac", FT_ETHER, BASE_NONE, NULL, 0x0, "AE MAC address", HFILL }}, { &hf_wai_asue_mac, {"ASUE MAC", "wai.asue.mac", FT_ETHER, BASE_NONE, NULL, 0x0, "ASUE MAC address", HFILL }}, { &hf_wai_bkid, {"BKID", "wai.bkid", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_uskid, {"USKID", "wai.uskid", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_wie, {"WIE from ASUE", "wai.wie", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_message_auth_code, {"Message Authentication Code", "wai.message.auth.code", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_mskid, {"MSKID/STAKeyID", "wai.mskid", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_data_pack_num, {"Data packet number", "wai.data.packet.num", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_key_data, {"Key Data", "wai.key.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_key_data_len, {"Length", "wai.key.data.len", FT_UINT8, BASE_DEC, NULL, 0x0, "Key data length", HFILL }}, { &hf_wai_key_data_content, {"Content", "wai.key.data.content", FT_BYTES, BASE_NONE, NULL, 0x0, "Key data content", HFILL }}, { &hf_wai_key_ann_id, {"Key Announcement Identifier", "wai.key.ann.id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_auth_id, {"Authentication Identifier", "wai.auth.id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_identity, {"Identifier", "wai.identity", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_identity_id, {"Id", "wai.identity.id", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_wai_identity_len, {"Length", "wai.identity.len", FT_UINT16, BASE_DEC, NULL, 0x0, "Identity length", HFILL }}, { &hf_wai_identity_data, {"Data", "wai.identity.data", FT_BYTES, BASE_NONE, NULL, 0x0, "Identity data", HFILL }}, { &hf_wai_ecdh, {"ECDH Parameter", "wai.ecdhp", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_ecdh_id, {"ID", "wai.edch.id", FT_UINT8, BASE_HEX, NULL, 0x0, "ECDH Parameter Identifier", HFILL }}, { &hf_wai_ecdh_len, {"Length", "wai.ecdh.len", FT_UINT16, BASE_DEC, NULL, 0x0, "ECDH Parameter Length", HFILL }}, { &hf_wai_ecdh_content, {"Content", "wai.ecdh.content", FT_BYTES, BASE_NONE, NULL, 0x0, "ECDH Parameter Content", HFILL }}, { &hf_wai_counter, {"Replay counter", "wai.counter", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_sta_key_id, {"STAKeyID", "wai.sta.key.id", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_wai_challenge, {"Challenge", "wai.challenge", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_cert_ver, {"Multiple Certificate Verification Result", "wai.cert.ver", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_nonce, {"Nonce", "wai.nonce", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_ver_res, {"Verification result", "wai.ver.res", FT_UINT8, BASE_HEX, VALS(wai_ver_res_names), 0x0, NULL, HFILL }}, { &hf_wai_sign_alg, {"Signature Algorithm", "wai.sign.alg", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_hash_alg_id, {"Hash Algorithm Identifier", "wai.hash.alg.id", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_wai_sign_alg_id, {"Signature Algorithm Identifier", "wai.sign.alg.id", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_wai_param, {"Parameter", "wai.param", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_param_id, {"Parameter Identifier", "wai.param.id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_param_content, {"Parameter Content", "wai.param.content", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_sign_val, {"Signature Value", "wai.sign.val", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_sign_content, {"Signature Content", "wai.sign.content", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_wai_sign, {"Signature", "wai.sign", FT_BYTES, BASE_NONE, NULL, 0x0, 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); }
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); /* Preferences */ smtp_module = prefs_register_protocol(proto_smtp, NULL); prefs_register_bool_preference(smtp_module, "desegment_lines", "Reassemble SMTP command and response lines\nspanning multiple TCP segments", "Whether the SMTP dissector should reassemble command and response lines" " spanning multiple TCP segments. To use this option, you must also enable " "\"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &smtp_desegment); prefs_register_bool_preference(smtp_module, "desegment_data", "Reassemble SMTP DATA commands spanning multiple TCP segments", "Whether the SMTP dissector should reassemble DATA command and lines" " spanning multiple TCP segments. To use this option, you must also enable " "\"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &smtp_data_desegment); }
void proto_register_sndcp(void) { /* Setup list of header fields */ static hf_register_info hf[] = { { &hf_sndcp_nsapi, { "NSAPI", "sndcp.nsapi", FT_UINT8, BASE_DEC, VALS(nsapi_abrv), 0x0, "Network Layer Service Access Point Identifier", HFILL } }, { &hf_sndcp_x, { "Spare bit", "sndcp.x", FT_BOOLEAN,8, TFS(&x_bit), MASK_X, "Spare bit (should be 0)", HFILL } }, { &hf_sndcp_f, { "First segment indicator bit", "sndcp.f", FT_BOOLEAN,8, TFS(&f_bit), MASK_F, NULL, HFILL } }, { &hf_sndcp_t, { "Type", "sndcp.t", FT_BOOLEAN,8, TFS(&t_bit), MASK_T, "SN-PDU Type", HFILL } }, { &hf_sndcp_m, { "More bit", "sndcp.m", FT_BOOLEAN,8, TFS(&m_bit), MASK_M, NULL, HFILL } }, { &hf_sndcp_dcomp, { "DCOMP", "sndcp.dcomp", FT_UINT8, BASE_DEC, VALS(compression_vals), 0xF0, "Data compression coding", HFILL } }, { &hf_sndcp_pcomp, { "PCOMP", "sndcp.pcomp", FT_UINT8, BASE_DEC, VALS(compression_vals), 0x0F, "Protocol compression coding", HFILL } }, { &hf_sndcp_nsapib, { "NSAPI", "sndcp.nsapib", FT_UINT8, BASE_DEC , VALS(nsapi_t), 0xf, "Network Layer Service Access Point Identifier",HFILL } }, { &hf_sndcp_segment, { "Segment", "sndcp.segment", FT_UINT16, BASE_DEC, NULL, 0xF000, "Segment number", HFILL } }, { &hf_sndcp_npdu1, { "N-PDU", "sndcp.npdu", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } }, { &hf_sndcp_npdu2, { "N-PDU", "sndcp.npdu", FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL } }, /* Fragment fields */ { &hf_npdu_fragment_overlap, { "Fragment overlap", "npdu.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Fragment overlaps with other fragments", HFILL } }, { &hf_npdu_fragment_overlap_conflict, { "Conflicting data in fragment overlap", "npdu.fragment.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Overlapping fragments contained conflicting data", HFILL } }, { &hf_npdu_fragment_multiple_tails, { "Multiple tail fragments found", "npdu.fragment.multipletails", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Several tails were found when defragmenting the packet", HFILL } }, { &hf_npdu_fragment_too_long_fragment, { "Fragment too long", "npdu.fragment.toolongfragment", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Fragment contained data past end of packet", HFILL } }, { &hf_npdu_fragment_error, { "Defragmentation error", "npdu.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "Defragmentation error due to illegal fragments", HFILL } }, { &hf_npdu_fragment_count, { "Fragment count", "npdu.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_npdu_reassembled_in, { "Reassembled in", "npdu.reassembled.in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "N-PDU fragments are reassembled in the given packet", HFILL } }, { &hf_npdu_reassembled_length, { "Reassembled N-PDU length", "npdu.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0, "The total length of the reassembled payload", HFILL } }, { &hf_npdu_fragment, { "N-PDU Fragment", "npdu.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_npdu_fragments, { "N-PDU Fragments", "npdu.fragments", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } } }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_sndcp , &ett_sndcp_address_field, &ett_sndcp_compression_field, &ett_sndcp_npdu_field, &ett_npdu_fragment, &ett_npdu_fragments, }; /* Register the protocol name and description */ proto_sndcp = proto_register_protocol("Subnetwork Dependent Convergence Protocol", "SNDCP", "sndcp"); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_sndcp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_dissector("sndcp", dissect_sndcp, proto_sndcp); register_init_routine(sndcp_defragment_init); }
/* * proto_register_ts2() * */ void proto_register_ts2(void) { static hf_register_info hf[] = { { &hf_ts2_class, { "Class", "ts2.class", FT_UINT16, BASE_HEX, VALS(classnames), 0x0, NULL, HFILL } }, { &hf_ts2_type, { "Type", "ts2.type", FT_UINT16, BASE_HEX, VALS(typenames), 0x0, NULL, HFILL } }, { &hf_ts2_clientid, { "Client id", "ts2.clientid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_sessionkey, { "Session Key", "ts2.sessionkey", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_ackto, { "Ping Reply To", "ts2.ping_ackto", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_crc32, { "CRC32 Checksum", "ts2.crc32", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_seqnum, { "Sequence Number", "ts2.sequencenum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_protocol_string, { "Protocol String", "ts2.protocolstring", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, #if 0 { &hf_ts2_string, { "String", "ts2.string", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, #endif { &hf_ts2_registeredlogin, { "Registered Login", "ts2.registeredlogin", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_name, { "Name", "ts2.name", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_password, { "Password", "ts2.password", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_nick, { "Nick", "ts2.nick", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_badlogin, { "Bad Login", "ts2.badlogin", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_unknown, { "Unknown", "ts2.unknown", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_channel, { "Channel", "ts2.channel", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_subchannel, { "Sub-Channel", "ts2.subchannel", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_channelpassword, { "Channel Password", "ts2.channelpassword", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_emptyspace, { "Empty Space", "ts2.emptyspace", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_fragmentnumber, { "Fragment Number", "ts2.fragmentnumber", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_platform_string, { "Platform String", "ts2.platformstring", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_server_name, { "Server Name", "ts2.servername", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_server_welcome_message, { "Server Welcome Message", "ts2.serverwelcomemessage", FT_UINT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_parent_channel_id, { "Parent Channel ID", "ts2.parentchannelid", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_codec, { "Codec", "ts2.codec", FT_UINT16, BASE_HEX, VALS(codecnames), 0x0, NULL, HFILL } }, { &hf_ts2_channel_flags, { "Channel Flags", "ts2.channelflags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_channel_id, { "Channel Id", "ts2.chanelid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_channel_name, { "Channel Name", "ts2.chanelname", FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_channel_topic, { "Channel Topic", "ts2.chaneltopic", FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_channel_description, { "Channel Description", "ts2.chaneldescription", FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_player_id, { "Player Id", "ts2.playerid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_player_status_flags, { "Player Status Flags", "ts2.playerstatusflags", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_number_of_players, { "Number Of Players", "ts2.numberofplayers", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_number_of_channels, { "Number Of Channels", "ts2.numberofchannels", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_resend_count, { "Resend Count", "ts2.resendcount", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_ts2_status_channelcommander, { "Channel Commander", "ts2.playerstatusflags.channelcommander", FT_BOOLEAN, 8, NULL, TS2_STATUS_CHANNELCOMMANDER, NULL, HFILL } }, { &hf_ts2_status_blockwhispers, { "Block Whispers", "ts2.playerstatusflags.blockwhispers", FT_BOOLEAN, 8, NULL, TS2_STATUS_BLOCKWHISPERS, NULL, HFILL } }, { &hf_ts2_status_away, { "Away", "ts2.playerstatusflags.away", FT_BOOLEAN, 8, NULL, TS2_STATUS_AWAY, NULL, HFILL } }, { &hf_ts2_status_mutemicrophone, { "Mute Microphone", "ts2.playerstatusflags.mutemicrophone", FT_BOOLEAN, 8, NULL, TS2_STATUS_MUTEMICROPHONE, NULL, HFILL } }, { &hf_ts2_status_mute, { "Mute", "ts2.playerstatusflags.mute", FT_BOOLEAN, 8, NULL, TS2_STATUS_MUTE, NULL, HFILL } }, { &hf_msg_fragments, {"Message fragments", "ts2.fragments", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_msg_fragment, {"Message fragment", "ts2.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_msg_fragment_overlap, {"Message fragment overlap", "ts2.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_msg_fragment_overlap_conflicts, {"Message fragment overlapping with conflicting data", "ts2.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &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); }
/*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 */
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); }
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); }
/* Register the protocol with Wireshark */ void proto_register_cbs(void) { /* Setup list of header fields */ static hf_register_info hf_cbs[] = { { &hf_gsm_cbs_serial_number, { "GSM CBS Serial Number", "gsm_cbs.serial_number", FT_UINT16, BASE_HEX_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_gsm_cbs_message_code, { "GSM CBS Message Code", "gsm_cbs.message_code", FT_UINT16, BASE_DEC_HEX, NULL, 0x3FF0, NULL, HFILL } }, { &hf_gsm_cbs_geographic_scope, { "GSM CBS Geographic Scope", "gsm_cbs.geographic_scope", FT_UINT16, BASE_DEC, VALS(geographic_scope_values), 0xC000, NULL, HFILL } }, { &hf_gsm_cbs_update_number, { "GSM CBS Update Number", "gsm_cbs.update_number", FT_UINT16, BASE_DEC, NULL, 0x000F, NULL, HFILL } }, { &hf_gsm_cbs_message_identifier, { "GSM CBS Message Identifier", "gsm_cbs.message-identifier", FT_UINT16, BASE_DEC_HEX, NULL, 0x00, NULL, HFILL } }, { &hf_gsm_cbs_total_pages, { "GSM CBS Total Pages", "gsm_cbs.total_pages", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL } }, { &hf_gsm_cbs_current_page, { "GSM CBS Current Page", "gsm_cbs.current_page", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL } }, /* Fragment fields */ { &hf_gsm_cbs_page_overlap, { "page overlap", "gsm_cbs.page.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "GSM CBS page overlaps with other fragments", HFILL } }, { &hf_gsm_cbs_page_overlap_conflict, { "Conflicting data in page overlap", "gsm_cbs.page.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Overlapping pages contained conflicting data", HFILL } }, { &hf_gsm_cbs_page_multiple_tails, { "Multiple final pages found", "gsm_cbs.page.multipletails", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Several copies of the final page were found when reassembling the message", HFILL } }, { &hf_gsm_cbs_page_too_long_fragment, { "Page too long", "gsm_cbs.page.toolongfragment", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Page contained data past end of packet", HFILL } }, { &hf_gsm_cbs_page_error, { "Reassembly error", "gsm_cbs.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "Reassembly error due to illegal fragments", HFILL } }, { &hf_gsm_cbs_page_count, { "Fragment count", "gsm_cbs.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x0, "Count of Page Fragment", HFILL } }, { &hf_gsm_cbs_message_reassembled_in, { "Reassembled in", "gsm_cbs.reassembled.in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "CBS pages are reassembled in the given packet", HFILL } }, { &hf_gsm_cbs_message_reassembled_length, { "Reassembled message length", "gsm_cbs.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0, "The total length of the reassembled message", HFILL } }, { &hf_gsm_cbs_page_num, { "CBS Page Number", "gsm_cbs.page_number", FT_FRAMENUM, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_gsm_cbs_pages, { "CBS Pages", "gsm_cbs.pages", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_gsm_cbs_page_content, { "CBS Page Content", "gsm_cbs.page_content", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_gsm_cbs_page_content_padding, { "CBS Page Content Padding", "gsm_cbs.page_content_padding", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_gsm_cbs_message_content, { "CBS Message Content", "gsm_cbs.message_content", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } } }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_cbs_msg, &ett_cbs_serial_no, &ett_cbs_coding, &ett_gsm_cbs_page, &ett_gsm_cbs_page_content, &ett_gsm_cbs_pages, }; static ei_register_info ei[] = { { &ei_gsm_cbs_unhandled_encoding, { "gsm_cbs.unhandled_encoding", PI_PROTOCOL, PI_WARN, "Unhandled encoding", EXPFILL }}, }; expert_module_t* expert_cell_broadcast; /* Register the protocol name and description */ proto_cell_broadcast = proto_register_protocol("GSM Cell Broadcast Service", "GSM Cell Broadcast Service", "gsm_cbs"); proto_register_field_array(proto_cell_broadcast, hf_cbs, array_length(hf_cbs)); register_init_routine(gsm_cbs_message_reassembly_init); /* subdissector code */ register_dissector("gsm_cbs", dissect_gsm_cell_broadcast, proto_cell_broadcast); register_dissector("umts_cell_broadcast", dissect_umts_cell_broadcast_message, proto_cell_broadcast); /* subtree array */ proto_register_subtree_array(ett, array_length(ett)); expert_cell_broadcast = expert_register_protocol(proto_cell_broadcast); expert_register_field_array(expert_cell_broadcast, ei, array_length(ei)); }
/* 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", "Whether T.38 is used with TPKT for TCP", (gint *)&t38_tpkt_usage,t38_tpkt_options,FALSE); prefs_register_bool_preference(t38_module, "show_setup_info", "Show stream setup information", "Where available, show which protocol and frame caused " "this T.38 stream to be created", &global_t38_show_setup_info); }
void proto_register_arp(void) { static struct true_false_string tfs_type_bit = { "E.164", "ATM Forum NSAPA" }; static hf_register_info hf[] = { { &hf_arp_hard_type, { "Hardware type", "arp.hw.type", FT_UINT16, BASE_DEC, VALS(hrd_vals), 0x0, NULL, HFILL }}, { &hf_arp_proto_type, { "Protocol type", "arp.proto.type", FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, NULL, HFILL }}, { &hf_arp_hard_size, { "Hardware size", "arp.hw.size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_atmarp_sht, { "Sender ATM number type", "arp.src.htype", FT_BOOLEAN, 8, TFS(&tfs_type_bit), ATMARP_IS_E164, NULL, HFILL }}, { &hf_atmarp_shl, { "Sender ATM number length", "arp.src.hlen", FT_UINT8, BASE_DEC, NULL, ATMARP_LEN_MASK, NULL, HFILL }}, { &hf_atmarp_sst, { "Sender ATM subaddress type", "arp.src.stype", FT_BOOLEAN, 8, TFS(&tfs_type_bit), ATMARP_IS_E164, NULL, HFILL }}, { &hf_atmarp_ssl, { "Sender ATM subaddress length", "arp.src.slen", FT_UINT8, BASE_DEC, NULL, ATMARP_LEN_MASK, NULL, HFILL }}, { &hf_arp_proto_size, { "Protocol size", "arp.proto.size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_arp_opcode, { "Opcode", "arp.opcode", FT_UINT16, BASE_DEC, VALS(op_vals), 0x0, NULL, HFILL }}, { &hf_arp_isgratuitous, { "Is gratuitous", "arp.isgratuitous", FT_BOOLEAN, BASE_NONE, TFS(&tfs_true_false), 0x0, NULL, HFILL }}, { &hf_atmarp_spln, { "Sender protocol size", "arp.src.pln", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_atmarp_tht, { "Target ATM number type", "arp.dst.htype", FT_BOOLEAN, 8, TFS(&tfs_type_bit), ATMARP_IS_E164, NULL, HFILL }}, { &hf_atmarp_thl, { "Target ATM number length", "arp.dst.hlen", FT_UINT8, BASE_DEC, NULL, ATMARP_LEN_MASK, NULL, HFILL }}, { &hf_atmarp_tst, { "Target ATM subaddress type", "arp.dst.stype", FT_BOOLEAN, 8, TFS(&tfs_type_bit), ATMARP_IS_E164, NULL, HFILL }}, { &hf_atmarp_tsl, { "Target ATM subaddress length", "arp.dst.slen", FT_UINT8, BASE_DEC, NULL, ATMARP_LEN_MASK, NULL, HFILL }}, { &hf_atmarp_tpln, { "Target protocol size", "arp.dst.pln", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_arp_src_hw, { "Sender hardware address", "arp.src.hw", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_src_hw_mac, { "Sender MAC address", "arp.src.hw_mac", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_atmarp_src_atm_num_e164, { "Sender ATM number (E.164)", "arp.src.atm_num_e164", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_atmarp_src_atm_num_nsap, { "Sender ATM number (NSAP)", "arp.src.atm_num_nsap", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_atmarp_src_atm_subaddr, { "Sender ATM subaddress", "arp.src.atm_subaddr", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_src_proto, { "Sender protocol address", "arp.src.proto", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_src_proto_ipv4, { "Sender IP address", "arp.src.proto_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_dst_hw, { "Target hardware address", "arp.dst.hw", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_dst_hw_mac, { "Target MAC address", "arp.dst.hw_mac", FT_ETHER, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_atmarp_dst_atm_num_e164, { "Target ATM number (E.164)", "arp.dst.atm_num_e164", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_atmarp_dst_atm_num_nsap, { "Target ATM number (NSAP)", "arp.dst.atm_num_nsap", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_atmarp_dst_atm_subaddr, { "Target ATM subaddress", "arp.dst.atm_subaddr", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_dst_proto, { "Target protocol address", "arp.dst.proto", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_dst_proto_ipv4, { "Target IP address", "arp.dst.proto_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_packet_storm, { "Packet storm detected", "arp.packet-storm-detected", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_duplicate_ip_address, { "Duplicate IP address detected", "arp.duplicate-address-detected", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_duplicate_ip_address_earlier_frame, { "Frame showing earlier use of IP address", "arp.duplicate-address-frame", FT_FRAMENUM, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_arp_duplicate_ip_address_seconds_since_earlier_frame, { "Seconds since earlier frame seen", "arp.seconds-since-duplicate-address-frame", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, }; static gint *ett[] = { &ett_arp, &ett_atmarp_nsap, &ett_atmarp_tl, &ett_arp_duplicate_address }; module_t *arp_module; proto_arp = proto_register_protocol("Address Resolution Protocol", "ARP/RARP", "arp"); proto_register_field_array(proto_arp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); atmarp_handle = create_dissector_handle(dissect_atmarp, proto_arp); register_dissector( "arp" , dissect_arp, proto_arp ); /* Preferences */ arp_module = prefs_register_protocol(proto_arp, NULL); prefs_register_bool_preference(arp_module, "detect_request_storms", "Detect ARP request storms", "Attempt to detect excessive rate of ARP requests", &global_arp_detect_request_storm); prefs_register_uint_preference(arp_module, "detect_storm_number_of_packets", "Number of requests to detect during period", "Number of requests needed within period to indicate a storm", 10, &global_arp_detect_request_storm_packets); prefs_register_uint_preference(arp_module, "detect_storm_period", "Detection period (in ms)", "Period in milliseconds during which a packet storm may be detected", 10, &global_arp_detect_request_storm_period); prefs_register_bool_preference(arp_module, "detect_duplicate_ips", "Detect duplicate IP address configuration", "Attempt to detect duplicate use of IP addresses", &global_arp_detect_duplicate_ip_addresses); /* TODO: define a minimum time between sightings that is worth reporting? */ register_init_routine(&arp_init_protocol); }
void proto_register_btobex(void) { static hf_register_info hf[] = { { &hf_opcode, { "Opcode", "btobex.opcode", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &code_vals_ext, BTOBEX_CODE_VALS_MASK, "Request Opcode", HFILL} }, { &hf_response_code, { "Response Code", "btobex.resp_code", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &code_vals_ext, BTOBEX_CODE_VALS_MASK, NULL, HFILL} }, { &hf_final_flag, { "Final Flag", "btobex.final_flag", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL} }, { &hf_length, { "Packet Length", "btobex.pkt_len", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL} }, { &hf_version, { "Version", "btobex.version", FT_UINT8, BASE_HEX, VALS(version_vals), 0x00, "Obex Protocol Version", HFILL} }, { &hf_flags, { "Flags", "btobex.flags", FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL} }, { &hf_constants, { "Constants", "btobex.constants", FT_UINT8, BASE_HEX, NULL, 0x00, NULL, HFILL} }, { &hf_max_pkt_len, { "Max. Packet Length", "btobex.max_pkt_len", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL} }, { &hf_set_path_flags_0, { "Go back one folder (../) first", "btobex.set_path_flags_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL} }, { &hf_set_path_flags_1, { "Do not create folder, if not existing", "btobex.set_path_flags_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL} }, { &hf_hdr_id, { "Header Id", "btobex.hdr_id", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &header_id_vals_ext, 0x00, NULL, HFILL} }, { &hf_hdr_length, { "Length", "btobex.pkt_hdr_len", FT_UINT16, BASE_DEC, NULL, 0, "Header Length", HFILL} }, { &hf_hdr_val_unicode, { "Value", "btobex.pkt_hdr_val_uc", FT_STRING, BASE_NONE, NULL, 0, "Unicode Value", HFILL } }, { &hf_hdr_val_byte_seq, { "Value", "btobex.hdr_val_byte_seq", FT_BYTES, BASE_NONE, NULL, 0, "Byte Value", HFILL} }, { &hf_hdr_val_byte, { "Value", "btobex.hdr_val_byte", FT_UINT8, BASE_HEX, NULL, 0, "Byte Sequence Value", HFILL} }, { &hf_hdr_val_long, { "Value", "btobex.hdr_val_long", FT_UINT32, BASE_DEC, NULL, 0, "4-byte Value", HFILL} }, /* for fragmentation */ { &hf_btobex_fragment_overlap, { "Fragment overlap", "btobex.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Fragment overlaps with other fragments", HFILL } }, { &hf_btobex_fragment_overlap_conflict, { "Conflicting data in fragment overlap", "btobex.fragment.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Overlapping fragments contained conflicting data", HFILL } }, { &hf_btobex_fragment_multiple_tails, { "Multiple tail fragments found", "btobex.fragment.multipletails", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Several tails were found when defragmenting the packet", HFILL } }, { &hf_btobex_fragment_too_long_fragment, { "Fragment too long", "btobex.fragment.toolongfragment", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Fragment contained data past end of packet", HFILL } }, { &hf_btobex_fragment_error, { "Defragmentation error", "btobex.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "Defragmentation error due to illegal fragments", HFILL } }, { &hf_btobex_fragment_count, { "Fragment count", "btobex.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_btobex_fragment, { "OBEX Fragment", "btobex.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "btobex Fragment", HFILL } }, { &hf_btobex_fragments, { "OBEX Fragments", "btobex.fragments", FT_NONE, BASE_NONE, NULL, 0x0, "btobex Fragments", HFILL } }, { &hf_btobex_reassembled_in, { "Reassembled OBEX in frame", "btobex.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "This OBEX frame is reassembled in this frame", HFILL } }, { &hf_btobex_reassembled_length, { "Reassembled OBEX length", "btobex.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0, "The total length of the reassembled payload", HFILL } } }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_btobex, &ett_btobex_hdrs, &ett_btobex_hdr, &ett_btobex_fragment, &ett_btobex_fragments }; proto_btobex = proto_register_protocol("Bluetooth OBEX Protocol", "OBEX", "btobex"); register_dissector("btobex", dissect_btobex, proto_btobex); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_btobex, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_init_routine(&defragment_init); }
/* Register Wimax Mac to Mac Protocol */ void proto_register_m2m(void) { /* M2M TLV display */ static hf_register_info hf[] = { { &hf_m2m_sequence_number, { "Packet Sequence Number", "m2m.seq_number", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_frame_number, { "Value", "m2m.frame_number", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_tlv_count, { "Number of TLVs in the packet", "m2m.tlv_count", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } } }; /* WiMax TLV display */ static hf_register_info hf_tlv[] = { { &hf_m2m_type, { "Type", "m2m.tlv_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_len, { "Length", "m2m.tlv_len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_len_size, { "Length Size", "m2m.tlv_len_size", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } }, #if 0 { &hf_m2m_value_bytes, { "Value (hex)", "m2m.multibyte_tlv_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, #endif { &hf_m2m_value_protocol_vers_uint8, { "Value", "m2m.protocol_vers_tlv_value", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_burst_num_uint8, { "Value", "m2m.burst_num_tlv_value", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_frag_type_uint8, { "Value", "m2m.frag_type_tlv_value", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_frag_num_uint8, { "Value", "m2m.frag_num_tlv_value", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_pdu_burst, { "Value (hex)", "m2m.pdu_burst_tlv_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_fast_fb, { "Value (hex)", "m2m.fast_fb_tlv_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_fch_burst_uint24, { "Value", "m2m.fch_burst_tlv_value", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_cdma_code_uint24, { "Value", "m2m.cdma_code_tlv_value", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_crc16_status_uint8, { "Value", "m2m.crc16_status_tlv_value", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_burst_power_uint16, { "Value", "m2m.burst_power_tlv_value", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_burst_cinr_uint16, { "Value", "m2m.burst_cinr_tlv_value", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_preamble_uint16, { "Value", "m2m.preamble_tlv_value", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_value_harq_ack_burst_bytes, { "Value (hex)", "m2m.harq_ack_burst_tlv_value", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_m2m_phy_attributes, { "Value (hex)", "m2m.phy_attributes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_wimax_invalid_tlv, { "Invalid TLV (hex)", "m2m.invalid_tlv", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } } }; static gint *ett[] = { &ett_m2m, &ett_m2m_tlv, &ett_m2m_fch, &ett_m2m_cdma, &ett_m2m_ffb, }; static ei_register_info ei[] = { { &ei_m2m_unexpected_length, { "m2m.unexpected_length", PI_MALFORMED, PI_ERROR, "Unexpected length", EXPFILL }}, }; expert_module_t* expert_m2m; proto_m2m = proto_register_protocol ( "WiMax Mac to Mac Packet", /* name */ "M2M (m2m)", /* short name */ "m2m" /* abbrev */ ); proto_register_field_array(proto_m2m, hf, array_length(hf)); proto_register_field_array(proto_m2m, hf_tlv, array_length(hf_tlv)); proto_register_subtree_array(ett, array_length(ett)); expert_m2m = expert_register_protocol(proto_m2m); expert_register_field_array(expert_m2m, ei, array_length(ei)); /* Register the PDU fragment table init routine */ register_init_routine(m2m_defragment_init); }
/*--- 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 }}, { &hf_rrc_ims_info_atgw_trans_det_cont_type, { "ATGW transfer details content type", "rrc.rsrvcc_info.ims_info_atgw_trans_det_cont", FT_UINT8, BASE_DEC, VALS(rrc_ims_info_atgw_trans_det_cont_type), 0x3, "rSR-VCC IMS information ATGW transfer details content type", HFILL }}, {&hf_rrc_ims_info_atgw_udp_port, {"ATGW UDP port","rrc.rsrvcc_info.ims_info_atgw_udp_port", FT_UINT16,BASE_DEC, NULL, 0x0, "rSR-VCC IMS information ATGW UDP port", HFILL }}, { &hf_rrc_ims_info_atgw_ipv4, {"ATGW IPv4", "rrc.rsrvcc_info.ims_info_atgw_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, "rSR-VCC IMS information ATGW IPv4", HFILL}}, { &hf_rrc_ims_info_atgw_ipv6, {"ATGW IPv6", "rrc.rsrvcc_info.ims_info_atgw_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, "rSR-VCC IMS information ATGW IPv6", HFILL}}, }; /* List of subtrees */ static gint *ett[] = { &ett_rrc, #include "packet-rrc-ettarr.c" &ett_rrc_eutraFeatureGroupIndicators, &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, &ett_rrc_ims_info, }; 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); register_cleanup_routine(rrc_cleanup); }
void proto_register_fcfcs (void) { static hf_register_info hf[] = { { &hf_fcs_opcode, {"Opcode", "fcs.opcode", FT_UINT16, BASE_HEX, VALS (fc_fcs_opcode_val), 0x0, NULL, HFILL}}, { &hf_fcs_iename, {"Interconnect Element Name", "fcs.ie.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_ietype, {"Interconnect Element Type", "fcs.ie.type", FT_UINT8, BASE_HEX, VALS (fc_fcs_ietype_val), 0x0, NULL, HFILL}}, { &hf_fcs_iedomainid, {"Interconnect Element Domain ID", "fcs.ie.domainid", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_mgmtid, {"Interconnect Element Mgmt. ID", "fcs.ie.mgmtid", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_fabricname, {"Interconnect Element Fabric Name", "fcs.ie.fname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_mgmtaddr, {"Interconnect Element Mgmt. Address", "fcs.ie.mgmtaddr", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_lname, {"Interconnect Element Logical Name", "fcs.ie.logname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_vendorname, {"Vendor Name", "fcs.vendorname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_modelname, {"Model Name/Number", "fcs.modelname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_portname, {"Port Name", "fcs.port.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_portmodtype, {"Port Module Type", "fcs.port.moduletype", FT_UINT8, BASE_HEX, VALS (fc_fcs_port_modtype_val), 0x0, NULL, HFILL}}, { &hf_fcs_porttxtype, {"Port TX Type", "fcs.port.txtype", FT_UINT8, BASE_HEX, VALS (fc_fcs_port_txtype_val), 0x0, NULL, HFILL}}, { &hf_fcs_porttype, {"Port Type", "fcs.port.type", FT_UINT8, BASE_HEX, VALS (fc_fcs_port_type_val), 0x0, NULL, HFILL}}, { &hf_fcs_physportnum, {"Physical Port Number", "fcs.port.physportnum", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_portflags, {"Port Flags", "fcs.port.flags", FT_BOOLEAN, BASE_NONE, TFS (&fc_fcs_portflags_tfs), 0x0, NULL, HFILL}}, { &hf_fcs_portstate, {"Port State", "fcs.port.state", FT_UINT8, BASE_HEX, VALS (fc_fcs_port_state_val), 0x0, NULL, HFILL}}, { &hf_fcs_platformname, {"Platform Name", "fcs.platform.name", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_platformnname, {"Platform Node Name", "fcs.platform.nodename", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_platformtype, {"Platform Type", "fcs.platform.type", FT_UINT8, BASE_HEX, VALS (fc_fcs_plat_type_val), 0x0, NULL, HFILL}}, { &hf_fcs_platformaddr, {"Management Address", "fcs.platform.mgmtaddr", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_reason, {"Reason Code", "fcs.reason", FT_UINT8, BASE_HEX, VALS (fc_ct_rjt_code_vals), 0x0, NULL, HFILL}}, { &hf_fcs_rjtdetail, {"Reason Code Explanantion", "fcs.reasondet", FT_UINT8, BASE_HEX, VALS (fc_fcs_rjt_code_val), 0x0, NULL, HFILL}}, { &hf_fcs_vendor, {"Vendor Unique Reject Code", "fcs.err.vendor", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_numcap, {"Number of Capabilities", "fcs.numcap", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_mgmt_subtype, {"Management GS Subtype", "fcs.gssubtype", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_vnd_capmask, {"Vendor Unique Capability Bitmask", "fcs.vbitmask", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_fcsmask, {"Subtype Capability Bitmask", "fcs.fcsmask", FT_UINT32, BASE_HEX, VALS (fc_fcs_fcsmask_val), 0x0, NULL, HFILL}}, { &hf_fcs_unsmask, {"Subtype Capability Bitmask", "fcs.unsmask", FT_UINT32, BASE_HEX, VALS (fc_fcs_unsmask_val), 0x0, NULL, HFILL}}, { &hf_fcs_maxres_size, {"Maximum/Residual Size", "fcs.maxres_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_fcs_releasecode, {"Release Code", "fcs.releasecode", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}}, }; static gint *ett[] = { &ett_fcfcs, }; proto_fcfcs = proto_register_protocol("FC Fabric Configuration Server", "FC-FCS", "fcs"); proto_register_field_array(proto_fcfcs, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_init_routine (&fcfcs_init_protocol); }
void proto_register_udp(void) { module_t *udp_module; module_t *udplite_module; expert_module_t* expert_udp; #ifndef HAVE_HFI_SECTION_INIT static header_field_info *hfi[] = { &hfi_udp_srcport, &hfi_udp_dstport, &hfi_udp_port, &hfi_udp_stream, &hfi_udp_length, &hfi_udp_checksum, &hfi_udp_checksum_calculated, &hfi_udp_checksum_good, &hfi_udp_checksum_bad, &hfi_udp_proc_src_uid, &hfi_udp_proc_src_pid, &hfi_udp_proc_src_uname, &hfi_udp_proc_src_cmd, &hfi_udp_proc_dst_uid, &hfi_udp_proc_dst_pid, &hfi_udp_proc_dst_uname, &hfi_udp_proc_dst_cmd, }; static header_field_info *hfi_lite[] = { &hfi_udplite_checksum_coverage_bad, &hfi_udplite_checksum_coverage, }; #endif static gint *ett[] = { &ett_udp, &ett_udp_checksum, &ett_udp_process_info }; static ei_register_info ei[] = { { &ei_udp_possible_traceroute, { "udp.possible_traceroute", PI_SEQUENCE, PI_CHAT, "Possible traceroute", EXPFILL }}, { &ei_udp_length, { "udp.length.bad", PI_MALFORMED, PI_ERROR, "Bad length value", EXPFILL }}, { &ei_udplite_checksum_coverage, { "udp.checksum_coverage.expert", PI_MALFORMED, PI_ERROR, "Bad checksum coverage length value", EXPFILL }}, { &ei_udp_checksum_zero, { "udp.checksum.zero", PI_CHECKSUM, PI_ERROR, "Illegal Checksum value (0)", EXPFILL }}, { &ei_udp_checksum_bad, { "udp.checksum_bad.expert", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }}, }; static build_valid_func udp_da_src_values[1] = {udp_src_value}; static build_valid_func udp_da_dst_values[1] = {udp_dst_value}; static build_valid_func udp_da_both_values[2] = {udp_src_value, udp_dst_value}; static decode_as_value_t udp_da_values[3] = {{udp_src_prompt, 1, udp_da_src_values}, {udp_dst_prompt, 1, udp_da_dst_values}, {udp_both_prompt, 2, udp_da_both_values}}; static decode_as_t udp_da = {"udp", "Transport", "udp.port", 3, 2, udp_da_values, "UDP", "port(s) as", decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL}; int proto_udp, proto_udplite; proto_udp = proto_register_protocol("User Datagram Protocol", "UDP", "udp"); hfi_udp = proto_registrar_get_nth(proto_udp); udp_handle = register_dissector("udp", dissect_udp, proto_udp); expert_udp = expert_register_protocol(proto_udp); proto_register_fields(proto_udp, hfi, array_length(hfi)); proto_udplite = proto_register_protocol("Lightweight User Datagram Protocol", "UDPlite", "udplite"); udplite_handle = create_dissector_handle(dissect_udplite, proto_udplite); hfi_udplite = proto_registrar_get_nth(proto_udplite); proto_register_fields(proto_udplite, hfi_lite, array_length(hfi_lite)); proto_register_subtree_array(ett, array_length(ett)); expert_register_field_array(expert_udp, ei, array_length(ei)); /* 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); register_decode_as(&udp_da); register_init_routine(udp_init); }
/* Register the protocol with Wireshark */ void proto_register_ltp(void) { module_t *ltp_module; static hf_register_info hf[] = { {&hf_ltp_version, {"LTP Version","ltp.version", FT_UINT8,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_type, {"LTP Type","ltp.type", FT_UINT8,BASE_HEX,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_session_id, {"Session ID","ltp.session", FT_NONE,BASE_NONE,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_session_orig, {"Session originator","ltp.session.orig", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_session_no, {"Session number","ltp.session.number", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_hdr_extn_cnt, {"Header Extension Count","ltp.hdr.extn.cnt", FT_UINT8,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_trl_extn_cnt, {"Trailer Extension Count","ltp.trl.extn.cnt", FT_UINT8,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_data_clid, {"Client service ID","ltp.data.client.id", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_data_offset, {"Offset","ltp.data.offset", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_data_length, {"Length","ltp.data.length", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_data_chkp, {"Checkpoint serial number","ltp.data.chkp", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_data_rpt, {"Report serial number","ltp.data.rpt", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_data_clidata, {"Client service data","ltp.data.data", FT_BYTES,BASE_NONE,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_rpt_sno, {"Report serial number","ltp.rpt.sno", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_rpt_chkp, {"Checkpoint serial number","ltp.rpt.chkp", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_rpt_ub, {"Upper bound","ltp.rpt.ub", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_rpt_lb, {"Lower bound","ltp.rpt.lb", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_rpt_clm_cnt, {"Reception claim count","ltp.rpt.clm.cnt", FT_UINT8,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_rpt_clm_off, {"Offset","ltp.rpt.clm.off", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_rpt_clm_len, {"Length","ltp.rpt.clm.len", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_rpt_ack_sno, {"Report serial number","ltp.rpt.ack.sno", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_cancel_code, {"Cancel code","ltp.cancel.code", FT_UINT8,BASE_HEX,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_hdr_extn_tag, {"Extension tag","ltp.hdr.extn.tag", FT_UINT8,BASE_HEX,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_hdr_extn_len, {"Length","ltp.hdr.extn.len", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_hdr_extn_val, {"Value","ltp.hdr.extn.val", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_trl_extn_tag, {"Extension tag","ltp.trl.extn.tag", FT_UINT8,BASE_HEX,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_trl_extn_len, {"Length","ltp.trl.extn.len", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_trl_extn_val, {"Value","ltp.trl.extn.val", FT_UINT64,BASE_DEC,NULL, 0x0, NULL, HFILL} }, {&hf_ltp_fragments, {"LTP Fragments", "ltp.fragments", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_fragment, {"LTP Fragment", "ltp.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_fragment_overlap, {"LTP fragment overlap", "ltp.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_fragment_overlap_conflicts, {"LTP fragment overlapping with conflicting data", "ltp.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_fragment_multiple_tails, {"LTP has multiple tails", "ltp.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_fragment_too_long_fragment, {"LTP fragment too long", "ltp.fragment.too_long_fragment", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_fragment_error, {"LTP defragmentation error", "ltp.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_fragment_count, {"LTP fragment count", "ltp.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_reassembled_in, {"LTP reassembled in", "ltp.reassembled.in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, NULL, HFILL} }, {&hf_ltp_reassembled_length, {"LTP reassembled length", "ltp.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} } }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_ltp, &ett_ltp_hdr, &ett_hdr_session, &ett_hdr_extn, &ett_data_segm, &ett_data_data_segm, &ett_rpt_segm, &ett_rpt_clm, &ett_rpt_ack_segm, &ett_session_mgmt, &ett_trl_extn, &ett_ltp_fragment, &ett_ltp_fragments }; /* Register the protocol name and description */ proto_ltp = proto_register_protocol("Licklider Transmission Protocol", "LTP", "ltp"); proto_register_field_array(proto_ltp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); ltp_module = prefs_register_protocol(proto_ltp, proto_reg_handoff_ltp); prefs_register_obsolete_preference(ltp_module, "udp.port"); prefs_register_uint_preference(ltp_module, "port", "LTP Port", "The UDP or DCCP port to accept LTP Connections", 10, <p_port); register_init_routine(ltp_defragment_init); }
/* Register the protocol with Wireshark */ void proto_register_wtp(void) { /* Setup list of header fields */ static hf_register_info hf[] = { { &hf_wtp_header_sub_pdu_size, { "Sub PDU size", "wtp.sub_pdu_size", FT_UINT16, BASE_DEC, NULL, 0x0, "Size of Sub-PDU (bytes)", HFILL } }, { &hf_wtp_header_flag_continue, { "Continue Flag", "wtp.continue_flag", FT_BOOLEAN, 8, TFS( &continue_truth ), 0x80, NULL, HFILL } }, { &hf_wtp_header_pdu_type, { "PDU Type", "wtp.pdu_type", FT_UINT8, BASE_HEX, VALS( vals_wtp_pdu_type ), 0x78, NULL, HFILL } }, { &hf_wtp_header_flag_Trailer, { "Trailer Flags", "wtp.trailer_flags", FT_UINT8, BASE_HEX, VALS( vals_transaction_trailer ), 0x06, NULL, HFILL } }, { &hf_wtp_header_flag_RID, { "Re-transmission Indicator", "wtp.RID", FT_BOOLEAN, 8, TFS( &RID_truth ), 0x01, NULL, HFILL } }, { &hf_wtp_header_flag_TID_response, { "TID Response", "wtp.TID.response", FT_BOOLEAN, 16, TFS( &tid_response_truth ), 0x8000, NULL, HFILL } }, { &hf_wtp_header_flag_TID, { "Transaction ID", "wtp.TID", FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL } }, { &hf_wtp_header_Inv_version, { "Version", "wtp.header.version", FT_UINT8, BASE_HEX, VALS( vals_version ), 0xC0, NULL, HFILL } }, { &hf_wtp_header_Inv_flag_TIDNew, { "TIDNew", "wtp.header.TIDNew", FT_BOOLEAN, 8, TFS( &TIDNew_truth ), 0x20, NULL, HFILL } }, { &hf_wtp_header_Inv_flag_UP, { "U/P flag", "wtp.header.UP", FT_BOOLEAN, 8, TFS( &UP_truth ), 0x10, NULL, HFILL } }, { &hf_wtp_header_Inv_Reserved, { "Reserved", "wtp.inv.reserved", FT_UINT8, BASE_HEX, NULL, 0x0C, NULL, HFILL } }, { &hf_wtp_header_Inv_TransactionClass, { "Transaction Class", "wtp.inv.transaction_class", FT_UINT8, BASE_HEX, VALS( vals_transaction_classes ), 0x03, NULL, HFILL } }, { &hf_wtp_header_Ack_flag_TVETOK, { "Tve/Tok flag", "wtp.ack.tvetok", FT_BOOLEAN, 8, TFS( &TVETOK_truth ), 0x04, NULL, HFILL } }, { &hf_wtp_header_Abort_type, { "Abort Type", "wtp.abort.type", FT_UINT8, BASE_HEX, VALS ( vals_abort_type ), 0x07, NULL, HFILL } }, { &hf_wtp_header_Abort_reason_provider, { "Abort Reason", "wtp.abort.reason.provider", FT_UINT8, BASE_HEX, VALS ( vals_abort_reason_provider ), 0x00, NULL, HFILL } }, /* Assume WSP is the user and use its reason codes */ { &hf_wtp_header_Abort_reason_user, { "Abort Reason", "wtp.abort.reason.user", FT_UINT8, BASE_HEX|BASE_EXT_STRING, &vals_wsp_reason_codes_ext, 0x00, NULL, HFILL } }, { &hf_wtp_header_sequence_number, { "Packet Sequence Number", "wtp.header.sequence", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_wtp_header_missing_packets, { "Missing Packets", "wtp.header.missing_packets", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_wtp_payload, { "Payload", "wtp.payload", FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL } }, #if 0 { &hf_wtp_header_variable_part, { "Header: Variable part", "wtp.header_variable_part", FT_BYTES, BASE_NONE, NULL, 0x0, "Variable part of the header", HFILL } }, { &hf_wtp_data, { "Data", "wtp.header_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, #endif { &hf_wtp_tpi_type, { "TPI", "wtp.tpi", FT_UINT8, BASE_HEX, VALS(vals_tpi_type), 0x00, "Identification of the Transport Information Item", HFILL } }, { &hf_wtp_tpi_psn, { "Packet sequence number", "wtp.tpi.psn", FT_UINT8, BASE_DEC, NULL, 0x00, "Sequence number of this packet", HFILL } }, { &hf_wtp_tpi_opt, { "Option", "wtp.tpi.opt", FT_UINT8, BASE_HEX, VALS(vals_tpi_opt), 0x00, "The given option for this TPI", HFILL } }, { &hf_wtp_tpi_optval, { "Option Value", "wtp.tpi.opt.val", FT_NONE, BASE_NONE, NULL, 0x00, "The value that is supplied with this option", HFILL } }, { &hf_wtp_tpi_info, { "Information", "wtp.tpi.info", FT_NONE, BASE_NONE, NULL, 0x00, "The information being send by this TPI", HFILL } }, /* Fragment fields */ { &hf_wtp_fragment_overlap, { "Fragment overlap", "wtp.fragment.overlap", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Fragment overlaps with other fragments", HFILL } }, { &hf_wtp_fragment_overlap_conflict, { "Conflicting data in fragment overlap", "wtp.fragment.overlap.conflict", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Overlapping fragments contained conflicting data", HFILL } }, { &hf_wtp_fragment_multiple_tails, { "Multiple tail fragments found", "wtp.fragment.multipletails", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Several tails were found when defragmenting the packet", HFILL } }, { &hf_wtp_fragment_too_long_fragment, { "Fragment too long", "wtp.fragment.toolongfragment", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Fragment contained data past end of packet", HFILL } }, { &hf_wtp_fragment_error, { "Defragmentation error", "wtp.fragment.error", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "Defragmentation error due to illegal fragments", HFILL } }, { &hf_wtp_fragment_count, { "Fragment count", "wtp.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_wtp_reassembled_in, { "Reassembled in", "wtp.reassembled.in", FT_FRAMENUM, BASE_NONE, NULL, 0x0, "WTP fragments are reassembled in the given packet", HFILL } }, { &hf_wtp_reassembled_length, { "Reassembled WTP length", "wtp.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0, "The total length of the reassembled payload", HFILL } }, { &hf_wtp_fragment, { "WTP Fragment", "wtp.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_wtp_fragments, { "WTP Fragments", "wtp.fragments", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } }, }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_wtp, &ett_wtp_sub_pdu_tree, &ett_header, &ett_tpilist, &ett_wsp_fragments, &ett_wtp_fragment, }; /* Register the protocol name and description */ proto_wtp = proto_register_protocol( "Wireless Transaction Protocol", /* protocol name for use by wireshark */ "WTP", /* short version of name */ "wtp" /* Abbreviated protocol name, should Match IANA < URL:http://www.iana.org/assignments/port-numbers/ > */ ); /* Required calls to register the header fields and subtrees used */ proto_register_field_array(proto_wtp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_dissector("wtp-wtls", dissect_wtp_fromwtls, proto_wtp); register_dissector("wtp-udp", dissect_wtp_fromudp, proto_wtp); register_init_routine(wtp_defragment_init); }