void proto_register_time(void) { static hf_register_info hf[] = { { &hf_time_time, { "Time", "time.time", FT_UINT32, BASE_DEC, NULL, 0x0, "Seconds since 00:00 (midnight) 1 January 1900 GMT", HFILL }} }; static gint *ett[] = { &ett_time, }; module_t *time_pref ; proto_time = proto_register_protocol("Time Protocol", "TIME", "time"); proto_register_field_array(proto_time, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); time_pref = prefs_register_protocol(proto_time, NULL); prefs_register_enum_preference(time_pref, "display_time_type", "Time Display", "Time display type", (gint *)&time_display_type, time_display_types, FALSE); }
/*FUNCTION:------------------------------------------------------ * NAME * zbee_security_register * DESCRIPTION * Called to initialize the security dissectors. Roughly the * equivalent of proto_register_* * PARAMETERS * module_t prefs - Prefs module to load preferences under. * RETURNS * none *--------------------------------------------------------------- */ void zbee_security_register(module_t *prefs, int proto) { static hf_register_info hf[] = { { &hf_zbee_sec_level, { "Level", "zbee.sec.level", FT_UINT8, BASE_HEX, VALS(zbee_sec_level_names), ZBEE_SEC_CONTROL_LEVEL, NULL, HFILL }}, { &hf_zbee_sec_key, { "Key", "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_src, { "Source", "zbee.sec.src", FT_UINT64, BASE_HEX, 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 }} }; static gint *ett[] = { &ett_zbee_sec, &ett_zbee_sec_control }; /* If no prefs module was supplied, register our own. */ if (prefs == NULL) { prefs = prefs_register_protocol(proto, zbee_security_parse_prefs); } /* Register preferences */ prefs_register_enum_preference(prefs, "seclevel", "Security Level", "Specifies the security level to use in the decryption process. This value is ignored for ZigBee 2004 and unsecured networks.", &gPREF_zbee_sec_level, zbee_sec_level_enums, FALSE); prefs_register_string_preference(prefs, "nwkkey", "Network Key", "Specifies the network key to use for decryption.", &gPREF_zbee_sec_nwk_key); prefs_register_string_preference(prefs, "tcaddr", "Trust Center Address", "The Extended address of the trust center.", &gPREF_zbee_sec_tcaddr); prefs_register_string_preference(prefs, "tclinkkey", "Trust Center Link Key", "Specifies the trust center link key to use for decryption.", &gPREF_zbee_sec_tclink_key); proto_register_field_array(proto, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } /* zbee_security_register */
void proto_register_m2pa(void) { static hf_register_info hf[] = { { &hf_version, { "Version", "m2pa.version", FT_UINT8, BASE_DEC, VALS(protocol_version_values), 0x0, NULL, HFILL} }, { &hf_spare, { "Spare", "m2pa.spare", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_v2_type, { "Message Type", "m2pa.type_v2", FT_UINT16, BASE_HEX, VALS(v2_message_type_values), 0x0, NULL, HFILL} }, { &hf_v8_type, { "Message Type", "m2pa.type_v8", FT_UINT8, BASE_DEC, VALS(v8_message_type_values), 0x0, NULL, HFILL} }, { &hf_type, { "Message Type", "m2pa.type", FT_UINT8, BASE_DEC, VALS(message_type_values), 0x0, NULL, HFILL} }, { &hf_class, { "Message Class", "m2pa.class", FT_UINT8, BASE_DEC, VALS(message_class_values), 0x0, NULL, HFILL} }, { &hf_length, { "Message length", "m2pa.length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} }, { &hf_unused, { "Unused", "m2pa.unused", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, { &hf_bsn, { "BSN", "m2pa.bsn", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL} }, { &hf_fsn, { "FSN", "m2pa.fsn", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL} }, { &hf_v2_li_spare, { "Spare", "m2pa.li_spare_v2", FT_UINT8, BASE_DEC, NULL, V2_LI_SPARE_MASK, NULL, HFILL} }, { &hf_v8_li_spare, { "Spare", "m2pa.li_spare_v8", FT_UINT8, BASE_HEX, NULL, V8_LI_SPARE_MASK, NULL, HFILL} }, { &hf_pri_spare, { "Spare", "m2pa.priority_spare", FT_UINT8, BASE_HEX, NULL, SPARE_MASK, NULL, HFILL} }, { &hf_v2_li_prio, { "Priority", "m2pa.li_priority_v2", FT_UINT8, BASE_DEC, NULL, V2_LI_PRIORITY_MASK, NULL, HFILL} }, { &hf_v8_li_prio, { "Priority", "m2pa.li_priority_v8", FT_UINT8, BASE_HEX, NULL, V8_LI_PRIORITY_MASK, NULL, HFILL} }, { &hf_pri_prio, { "Priority", "m2pa.priority", FT_UINT8, BASE_HEX, NULL, PRIORITY_MASK, NULL, HFILL} }, { &hf_v2_status, { "Link Status", "m2pa.status_v2", FT_UINT32, BASE_DEC, VALS(v2_link_status_values), 0x0, NULL, HFILL} }, { &hf_v8_status, { "Link Status", "m2pa.status_v8", FT_UINT32, BASE_DEC, VALS(v8_link_status_values), 0x0, NULL, HFILL} }, { &hf_status, { "Link Status", "m2pa.status", FT_UINT32, BASE_DEC, VALS(link_status_values), 0x0, NULL, HFILL} }, { &hf_filler, { "Filler", "m2pa.filler", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} }, { &hf_unknown_data, { "Unknown Data", "m2pa.unknown_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} }, { &hf_undecode_data,{ "Undecoded data", "m2pa.undecoded_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} } }; static gint *ett[] = { &ett_m2pa, &ett_m2pa_li }; static const enum_val_t m2pa_version_options[] = { { "draft-2", "Internet Draft version 2", M2PA_V02 }, { "draft-8", "Internet Draft version 8", M2PA_V08 }, { "RFC4165", "RFC 4165", M2PA_RFC4165 }, { NULL, NULL, 0 } }; proto_m2pa = proto_register_protocol("MTP2 Peer Adaptation Layer", "M2PA", "m2pa"); proto_register_field_array(proto_m2pa, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); /* Allow other dissectors to find this one by name. */ register_dissector("m2pa", dissect_m2pa, proto_m2pa); m2pa_module = prefs_register_protocol(proto_m2pa, proto_reg_handoff_m2pa); prefs_register_enum_preference(m2pa_module, "version", "M2PA version", "Version used by Wireshark", &m2pa_version, m2pa_version_options, FALSE); prefs_register_uint_preference(m2pa_module, "port", "M2PA SCTP Port", "Set the port for M2PA messages (Default of 3565)", 10, &global_sctp_port); }
void proto_register_nflog(void) { #ifndef HAVE_HFI_SECTION_INIT static header_field_info *hfi[] = { /* Header */ &hfi_nflog_family, &hfi_nflog_version, &hfi_nflog_resid, &hfi_nflog_encoding, /* TLV */ &hfi_nflog_tlv, &hfi_nflog_tlv_length, &hfi_nflog_tlv_type, /* TLV values */ &hfi_nflog_tlv_prefix, &hfi_nflog_tlv_uid, &hfi_nflog_tlv_gid, &hfi_nflog_tlv_timestamp, &hfi_nflog_tlv_unknown, }; #endif static gint *ett[] = { &ett_nflog, &ett_nflog_tlv }; module_t *pref; int proto_nflog; proto_nflog = proto_register_protocol("Linux Netfilter NFLOG", "NFLOG", "nflog"); hfi_nflog = proto_registrar_get_nth(proto_nflog); pref = prefs_register_protocol(proto_nflog, NULL); prefs_register_enum_preference(pref, "byte_order_type", "Byte Order", "Byte Order", &nflog_byte_order, byte_order_types, FALSE); register_dissector("nflog", dissect_nflog, proto_nflog); proto_register_fields(proto_nflog, hfi, array_length(hfi)); proto_register_subtree_array(ett, array_length(ett)); }
void proto_register_chdlc(void) { static hf_register_info hf[] = { { &hf_chdlc_addr, { "Address", "chdlc.address", FT_UINT8, BASE_HEX, VALS(chdlc_address_vals), 0x0, NULL, HFILL }}, { &hf_chdlc_proto, { "Protocol", "chdlc.protocol", FT_UINT16, BASE_HEX, VALS(chdlc_vals), 0x0, NULL, HFILL }}, }; static gint *ett[] = { &ett_chdlc, }; module_t *chdlc_module; proto_chdlc = proto_register_protocol("Cisco HDLC", "CHDLC", "chdlc"); proto_register_field_array(proto_chdlc, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); /* subdissector code */ subdissector_table = register_dissector_table("chdlctype", "Cisco HDLC frame type", FT_UINT16, BASE_HEX); register_dissector("chdlc", dissect_chdlc, proto_chdlc); /* Register the preferences for the chdlc protocol */ chdlc_module = prefs_register_protocol(proto_chdlc, NULL); prefs_register_enum_preference(chdlc_module, "fcs_type", "CHDLC Frame Checksum Type", "The type of CHDLC frame checksum (none, 16-bit, 32-bit)", &chdlc_fcs_decode, fcs_options, ENC_BIG_ENDIAN); }
void proto_register_isdn(void) { static hf_register_info hf[] = { { &hf_isdn_channel, { "Channel", "isdn.channel", FT_UINT8, BASE_DEC, VALS(channel_vals), 0x0, NULL, HFILL }}, }; static gint *ett[] = { &ett_isdn, }; module_t *isdn_module; proto_isdn = proto_register_protocol("ISDN", "ISDN", "isdn"); proto_register_field_array(proto_isdn, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); isdn_module = prefs_register_protocol(proto_isdn, NULL); prefs_register_enum_preference(isdn_module, "dchannel_protocol", "D-channel protocol", "The protocol running on the D channel", &dchannel_protocol, dchannel_protocol_options, FALSE); }
void proto_register_mtp3(void) { /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { { &hf_mtp3_service_indicator, { "Service indicator", "mtp3.service_indicator", FT_UINT8, BASE_HEX, VALS(mtp3_service_indicator_code_vals), SERVICE_INDICATOR_MASK, NULL, HFILL }}, { &hf_mtp3_network_indicator, { "Network indicator", "mtp3.network_indicator", FT_UINT8, BASE_HEX, VALS(network_indicator_vals), NETWORK_INDICATOR_MASK, NULL, HFILL }}, { &hf_mtp3_itu_spare, { "Spare", "mtp3.spare", FT_UINT8, BASE_HEX, NULL, SPARE_MASK, NULL, HFILL }}, { &hf_mtp3_itu_priority, { "ITU priority", "mtp3.priority", FT_UINT8, BASE_DEC, NULL, SPARE_MASK, NULL, HFILL }}, { &hf_mtp3_ansi_priority, { "ANSI Priority", "mtp3.priority", FT_UINT8, BASE_DEC, NULL, ANSI_PRIORITY_MASK, NULL, HFILL }}, { &hf_mtp3_itu_opc, { "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, ITU_OPC_MASK, NULL, HFILL }}, { &hf_mtp3_itu_pc, { "PC", "mtp3.pc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_mtp3_24bit_pc, { "PC", "mtp3.pc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, NULL, HFILL }}, { &hf_mtp3_24bit_opc, { "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, NULL, HFILL }}, { &hf_mtp3_ansi_opc, { "OPC", "mtp3.ansi_opc", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_mtp3_chinese_opc, { "OPC", "mtp3.chinese_opc", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_mtp3_opc_network, { "OPC Network", "mtp3.opc.network", FT_UINT24, BASE_DEC, NULL, ANSI_NETWORK_MASK, NULL, HFILL }}, { &hf_mtp3_opc_cluster, { "OPC Cluster", "mtp3.opc.cluster", FT_UINT24, BASE_DEC, NULL, ANSI_CLUSTER_MASK, NULL, HFILL }}, { &hf_mtp3_opc_member, { "OPC Member", "mtp3.opc.member", FT_UINT24, BASE_DEC, NULL, ANSI_MEMBER_MASK, NULL, HFILL }}, { &hf_mtp3_japan_opc, { "OPC", "mtp3.opc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, NULL, HFILL }}, { &hf_mtp3_japan_pc, { "PC", "mtp3.pc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, NULL, HFILL }}, { &hf_mtp3_itu_dpc, { "DPC", "mtp3.dpc", FT_UINT32, BASE_DEC, NULL, ITU_DPC_MASK, NULL, HFILL }}, { &hf_mtp3_24bit_dpc, { "DPC", "mtp3.dpc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, NULL, HFILL }}, { &hf_mtp3_ansi_dpc, { "DPC", "mtp3.ansi_dpc", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_mtp3_chinese_dpc, { "DPC", "mtp3.chinese_dpc", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_mtp3_dpc_network, { "DPC Network", "mtp3.dpc.network", FT_UINT24, BASE_DEC, NULL, ANSI_NETWORK_MASK, NULL, HFILL }}, { &hf_mtp3_dpc_cluster, { "DPC Cluster", "mtp3.dpc.cluster", FT_UINT24, BASE_DEC, NULL, ANSI_CLUSTER_MASK, NULL, HFILL }}, { &hf_mtp3_dpc_member, { "DPC Member", "mtp3.dpc.member", FT_UINT24, BASE_DEC, NULL, ANSI_MEMBER_MASK, NULL, HFILL }}, { &hf_mtp3_japan_dpc, { "DPC", "mtp3.dpc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, NULL, HFILL }}, { &hf_mtp3_itu_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT32, BASE_DEC, NULL, ITU_SLS_MASK, NULL, HFILL }}, { &hf_mtp3_japan_4_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, JAPAN_4_BIT_SLS_MASK, NULL, HFILL }}, { &hf_mtp3_japan_4_bit_sls_spare, { "SLS Spare", "mtp3.sls_spare", FT_UINT8, BASE_HEX, NULL, JAPAN_4_BIT_SLS_SPARE_MASK, NULL, HFILL }}, { &hf_mtp3_japan_5_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, JAPAN_5_BIT_SLS_MASK, NULL, HFILL }}, { &hf_mtp3_japan_5_bit_sls_spare, { "SLS Spare", "mtp3.sls_spare", FT_UINT8, BASE_HEX, NULL, JAPAN_5_BIT_SLS_SPARE_MASK, NULL, HFILL }}, { &hf_mtp3_ansi_5_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, ANSI_5BIT_SLS_MASK, NULL, HFILL }}, { &hf_mtp3_ansi_8_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, ANSI_8BIT_SLS_MASK, NULL, HFILL }}, { &hf_mtp3_chinese_itu_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, CHINESE_ITU_SLS_MASK, NULL, HFILL }} }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_mtp3, &ett_mtp3_sio, &ett_mtp3_label, &ett_mtp3_label_dpc, &ett_mtp3_label_opc }; static enum_val_t mtp3_options[] = { { "itu", "ITU", ITU_STANDARD }, { "ansi", "ANSI", ANSI_STANDARD }, { "chinese-itu", "Chinese ITU", CHINESE_ITU_STANDARD }, { "japan", "Japan", JAPAN_STANDARD }, { NULL, NULL, 0 } }; static enum_val_t mtp3_addr_fmt_str_e[] = { { "decimal", "Decimal", MTP3_ADDR_FMT_DEC }, { "hexadecimal", "Hexadecimal", MTP3_ADDR_FMT_HEX }, { "ni-decimal", "NI-Decimal", MTP3_ADDR_FMT_NI_DEC }, { "ni-hexadecimal", "NI-Hexadecimal", MTP3_ADDR_FMT_NI_HEX }, { "dashed", "Dashed", MTP3_ADDR_FMT_DASHED }, { NULL, NULL, 0 } }; static enum_val_t itu_pc_structures[] = { { "unstructured", "Unstructured", ITU_PC_STRUCTURE_NONE}, { "3-8-3", "3-8-3", ITU_PC_STRUCTURE_3_8_3 }, { "4-3-4-3", "4-3-4-3", ITU_PC_STRUCTURE_4_3_4_3 }, { NULL, NULL, 0 } }; static enum_val_t japan_pc_structures[] = { { "unstructured", "Unstructured", JAPAN_PC_STRUCTURE_NONE}, { "7-4-5", "7-4-5", JAPAN_PC_STRUCTURE_7_4_5 }, { "3-4-4-5", "3-4-4-5", JAPAN_PC_STRUCTURE_3_4_4_5 }, { NULL, NULL, 0 } }; /* Register the protocol name and description */ proto_mtp3 = proto_register_protocol("Message Transfer Part Level 3", "MTP3", "mtp3"); register_dissector("mtp3", dissect_mtp3, proto_mtp3); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_mtp3, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); mtp3_sio_dissector_table = register_dissector_table("mtp3.service_indicator", "MTP3 Service indicator", FT_UINT8, BASE_HEX); mtp3_tap = register_tap("mtp3"); mtp3_module = prefs_register_protocol(proto_mtp3, NULL); prefs_register_bool_preference(mtp3_module, "heuristic_standard", "Try to determine the MTP3 standard heuristically", "This only works for SCCP traffic for now", &mtp3_heuristic_standard); prefs_register_enum_preference(mtp3_module, "standard", "MTP3 standard", "The SS7 standard used in MTP3 packets", &mtp3_standard, mtp3_options, FALSE); prefs_register_enum_preference(mtp3_module, "itu_pc_structure", "ITU Pointcode structure", "The structure of the pointcodes in ITU networks", &itu_pc_structure, itu_pc_structures, FALSE); prefs_register_enum_preference(mtp3_module, "japan_pc_structure", "Japan Pointcode structure", "The structure of the pointcodes in Japan networks", &japan_pc_structure, japan_pc_structures, FALSE); prefs_register_bool_preference(mtp3_module, "ansi_5_bit_sls", "Use 5-bit SLS (ANSI only)", "Use 5-bit (instead of 8-bit) SLS in ANSI MTP3 packets", &mtp3_use_ansi_5_bit_sls); prefs_register_bool_preference(mtp3_module, "japan_5_bit_sls", "Use 5-bit SLS (Japan only)", "Use 5-bit (instead of 4-bit) SLS in Japan MTP3 packets", &mtp3_use_japan_5_bit_sls); prefs_register_enum_preference(mtp3_module, "addr_format", "Address Format", "Format for point code in the address columns", &mtp3_addr_fmt, mtp3_addr_fmt_str_e, FALSE); prefs_register_bool_preference(mtp3_module, "itu_priority", "Show MSU priority (national option, ITU and China ITU only)", "Decode the spare bits of the SIO as the MSU priority (a national option in ITU)", &mtp3_show_itu_priority); }
void proto_register_ppcap(void) { module_t *ppcap_module; static hf_register_info hf[] = { { &hf_ppcap_length, { "Length", "ppcap.length", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_payload_type, { "Payload Type" , "ppcap.payload_type", FT_STRING, BASE_NONE, NULL, 0x0 , NULL, HFILL}}, { &hf_ppcap_reserved, { "Reserved", "ppcap.reserved", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_address_type, { "Address Type", "ppcap.address_type", FT_UINT16, BASE_DEC, VALS(address_type_values), 0x00 , NULL, HFILL}}, #if 0 { &hf_ppcap_source_address_type, { "Source Address Type", "ppcap.source_address_type", FT_UINT16, BASE_DEC, VALS(address_type_values), 0x00 , NULL, HFILL}}, #endif { &hf_ppcap_ssn, { "SSN", "ppcap.ssn", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_spc, {"OPC", "ppcap.spc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_opc, { "OPC", "ppcap.opc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_source_ip_address1, { "Source IP Address", "ppcap.source_ip_address1", FT_IPv4, BASE_NONE, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_source_ip_address2, { "Source IP Address", "ppcap.source_ip_address2", FT_IPv6, BASE_NONE, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_destreserved, { "Reserved", "ppcap.destreserved", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}}, #if 0 { &hf_ppcap_destination_address_type, { "Destination Address Type", "ppcap.destination_address_type", FT_UINT16, BASE_DEC, VALS(address_type_values), 0x00, NULL, HFILL}}, #endif { &hf_ppcap_ssn1, { "SSN", "ppcap.ssn1", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_spc1, { "DPC", "ppcap.spc1", FT_UINT24, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_dpc, { "DPC", "ppcap.dpc", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_destination_ip_address1, { "Destination IP Address", "ppcap.destination_ip_address1", FT_IPv4, BASE_NONE, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_destination_ip_address2, { "Destination IP Address", "ppcap.destination_ip_address2", FT_IPv6, BASE_NONE, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_source_nodeid, { "Source Node ID", "ppcap.source_nodeid", FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_destination_nodeid, { "Destination Node ID", "ppcap.destination_address", FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_info, { "Info", "ppcap.info", FT_STRING, BASE_NONE, NULL, 0x0000, NULL, HFILL}}, { &hf_ppcap_payload_data, { "Payload Data", "ppcap.payload_data", FT_BYTES, BASE_NONE, NULL, 0x0000, NULL, HFILL}}, { &hf_ppcap_local_port, { "Local Port", "ppcap.local_port", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_remote_port, { "Remote Port", "ppcap.remote_port", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL}}, { &hf_ppcap_tcp_sip_type, { "Transport Protocol for SIP/SIP-I Message" , "ppcap.tcp_sip_type", FT_STRING, BASE_NONE, NULL, 0x0 , NULL, HFILL}}, }; static gint *ett[]= { &ett_ppcap, &ett_ppcap1, &ett_ppcap_new, }; proto_ppcap = proto_register_protocol("Proprietary PCAP", "PPCAP", "ppcap"); proto_register_field_array(proto_ppcap , hf , array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_dissector("ppcap", dissect_ppcap, proto_ppcap); ppcap_module = prefs_register_protocol(proto_ppcap, proto_reg_handoff_ppcap); prefs_register_enum_preference(ppcap_module,"rev_doc","PPCAP, Select the document","Select Document",&global_ppcap_rev_doc,rev_doc,TRUE); }
void proto_register_ismacryp (void) { /* A header field is something you can search/filter on. * * We create a structure to register our fields. It consists of an * array of hf_register_info structures, each of which are of the format * {&(field id), {name, abbrev, type, display, strings, bitmask, blurb, HFILL}}. */ static hf_register_info hf[] = { #if 0 { &hf_ismacryp, { "Data", "ismacryp.data", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, #endif #if 0 { &hf_ismacryp_length, { "Total Length", "ismacryp.len", FT_UINT16, BASE_DEC, NULL, 0x0, /* length 2 bytes, print as decimal value */ NULL, HFILL }}, #endif { &hf_ismacryp_header, { "AU Header", "ismacryp.header", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, #if 0 { &hf_ismacryp_header_length, { "Header Length", "ismacryp.header.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, #endif { &hf_ismacryp_au_headers_length, { "AU Headers Length", "ismacryp.au_headers.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_header_byte, { "Header Byte", "ismacryp.header.byte", FT_NONE, BASE_NONE, NULL, 0x0, /* 1 byte */ NULL, HFILL }}, #if 0 { &hf_ismacryp_version, { "Version", "ismacryp.version", FT_UINT8, BASE_HEX, NULL, 0x0, /* version 1 byte */ NULL, HFILL }}, #endif { &hf_ismacryp_message, { "Message", "ismacryp.message", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, #if 0 { &hf_ismacryp_message_length, { "Message Length", "ismacryp.message.len", FT_UINT16, BASE_DEC, NULL, 0x0, /* length 2 bytes, print as decimal value */ NULL, HFILL }}, #endif #if 0 { &hf_ismacryp_parameter, { "Parameter", "ismacryp.parameter", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, #endif #if 0 { &hf_ismacryp_parameter_length, { "Parameter Length", "ismacryp.parameter.len", FT_UINT16, BASE_DEC, NULL, 0x0, /* length 2 bytes, print as decimal value */ NULL, HFILL }}, #endif { &hf_ismacryp_iv, { "IV", "ismacryp.iv", FT_BYTES, BASE_NONE, NULL, 0x0, /* variable length */ NULL, HFILL }}, { &hf_ismacryp_delta_iv, { "Delta IV", "ismacryp.delta_iv", FT_BYTES, BASE_NONE, NULL, 0x0, /* variable length */ NULL, HFILL }}, { &hf_ismacryp_key_indicator, { "Key Indicator", "ismacryp.key_indicator", FT_BYTES, BASE_NONE, NULL, 0x0, /* variable length */ NULL, HFILL }}, #if 0 { &hf_ismacryp_parameter_value, { "Parameter Value", "ismacryp.parameter.value", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, #endif { &hf_ismacryp_au_size, { "AU size", "ismacryp.au.size", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_au_index, { "AU index", "ismacryp.au.index", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_au_index_delta, { "AU index delta", "ismacryp.au.index_delta", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_cts_delta, { "CTS delta", "ismacryp.cts_delta", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_cts_flag, { "CTS flag", "ismacryp.cts_flag", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_dts_delta, { "DTS delta", "ismacryp.dts_delta", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_dts_flag, { "DTS flag", "ismacryp.dts_flag", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_rap_flag, { "RAP flag", "ismacryp.rap_flag", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_stream_state, { "Stream state", "ismacryp.stream_state", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_au_is_encrypted, { "AU_is_encrypted flag", "ismacryp.au_is_encrypted", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_slice_start, { "Slice_start flag", "ismacryp.slice_start", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_slice_end, { "Slice_end flag", "ismacryp.slice_end", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_padding_bitcount, { "Padding_bitcount bits", "ismacryp.padding_bitcount", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_padding, { "Padding bits", "ismacryp.padding", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_reserved_bits, { "Reserved bits", "ismacryp.reserved", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_ismacryp_unused_bits, { "Unused bits", "ismacryp.unused", FT_BOOLEAN, BASE_NONE, NULL, 0x0, NULL, HFILL }} }; static gint *ett[] = { &ett_ismacryp, &ett_ismacryp_header, &ett_ismacryp_header_byte, &ett_ismacryp_message }; static const enum_val_t version_types[] = { {PROTO_TAG_ISMACRYP_11, "ISMACryp v1.1", V11}, {PROTO_TAG_ISMACRYP_20, "ISMACryp v2.0", V20}, {NULL, NULL, -1} }; static const enum_val_t mode_types[] = { {"aac-hbr", "aac-hbr", AAC_HBR_MODE}, {"mpeg4-video", "mpeg4-video", MPEG4_VIDEO_MODE}, {"avc-video", "avc-video", AVC_VIDEO_MODE}, {NULL, NULL, -1} }; module_t *ismacryp_module; proto_ismacryp = proto_register_protocol ("ISMACryp Protocol", "ISMACRYP", "ismacryp"); proto_register_field_array (proto_ismacryp, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); /* Register our configuration options for ismacryp */ /* this registers our preferences, function proto_reg_handoff_ismacryp is called when preferences are applied */ ismacryp_module = prefs_register_protocol(proto_ismacryp, proto_reg_handoff_ismacryp); prefs_register_uint_preference(ismacryp_module, "dynamic.payload.type", "ISMACryp dynamic payload type", "The dynamic payload type which will be interpreted as ISMACryp", 10, &pref_dynamic_payload_type); prefs_register_enum_preference(ismacryp_module, "version", "ISMACryp version", "ISMACryp version", &version_type, version_types, TRUE); prefs_register_static_text_preference(ismacryp_module, "text_override", "The following option allows the version to be set manually" " and to override the version if detected from RTP payload type:", "The following option allows the version to be set manually" " and to override the version if detected from RTP payload type:"); prefs_register_bool_preference(ismacryp_module, "override_rtp_pt","Override RTP payload type for version", "Indicates whether or not the ISMACryp version deduced" " from RTP payload type, if present, is used or whether the" " version above is used", &override_flag); /* ISMACryp v11 parameters */ prefs_register_static_text_preference(ismacryp_module, "v11_parameters", "ISMACryp v1.1 parameters:", "ISMACryp v1.1 parameters declared in SDP"); prefs_register_uint_preference(ismacryp_module, "iv_length","ISMACrypIVLength (bytes)", "Set the length of the IV in the ISMACryp AU Header in bytes", 10, &iv_length); prefs_register_uint_preference(ismacryp_module, "delta_iv_length","ISMACrypDeltaIVLength (bytes)", "Set the length of the Delta IV in the ISMACryp AU Header in bytes", 10, &delta_iv_length); prefs_register_uint_preference(ismacryp_module, "key_indicator_length","ISMACrypKeyIndicatorLength (bytes)", "Set the length of the Key Indicator in the ISMACryp AU Header in bytes", 10, &key_indicator_length); prefs_register_bool_preference(ismacryp_module, "key_indicator_per_au_flag","ISMACrypKeyIndicatorPerAU (T/F)", "Indicates whether or not the Key Indicator is present in all AU Headers (T/F)", &key_indicator_per_au_flag); prefs_register_bool_preference(ismacryp_module, "selective_encryption","ISMACrypSelectiveEncryption (T/F)", "Indicates whether or not selective encryption is enabled (T/F)", &selective_encryption); /* ISMACryp v20 parameters */ prefs_register_static_text_preference(ismacryp_module, "v20_parameters", "ISMACryp v2.0 parameters:", "ISMACryp v2.0 parameters declared in SDP"); prefs_register_bool_preference(ismacryp_module, "slice_indication","ISMACrypSliceIndication (T/F)", "Indicates whether or not slice start / end is present (T/F)", &slice_indication); prefs_register_bool_preference(ismacryp_module, "padding_indication","ISMACrypPaddingIndication (T/F)", "Indicates whether or not padding information is present (T/F)", &padding_indication); /* RFC3640 mode - ISMACryp v11 */ prefs_register_static_text_preference(ismacryp_module, "codec_modes", "Codec mode selection (RFC3640 for ISMACryp v1.1 only):", "AU parameters set according to RFC3640 mode or user defined"); prefs_register_enum_preference(ismacryp_module, "rfc3640_mode", "RFC3640 mode", "RFC3640 mode", &mode, mode_types, TRUE); /* User defined mode */ prefs_register_bool_preference(ismacryp_module, "user_mode","User mode (T/F)", "Indicates use of user mode instead of RFC3640 modes (T/F)", &pref_user_mode); /* following preference values only used if user mode is selected above */ prefs_register_static_text_preference(ismacryp_module, "user_defined_modes", "Following parameters only valid and used for user mode:", "AU parameters defined by the user"); /* ideally would grey this out or disable this if in user mode */ prefs_register_uint_preference(ismacryp_module, "au_size_length","User mode: SizeLength (bits)", "Set the length of the AU size in the AU Header in bits", 10, &pref_au_size_length); prefs_register_uint_preference(ismacryp_module, "au_index_length","User mode: IndexLength (bits)", "Set the length of the AU index in the AU Header in bits", 10, &pref_au_index_length); prefs_register_uint_preference(ismacryp_module, "au_index_delta_length","User mode: IndexDeltaLength (bits)", "Set the length of the AU delta index in the AU Header in bits", 10, &pref_au_index_delta_length); prefs_register_uint_preference(ismacryp_module, "cts_delta_length","User mode: CTSDeltaLength (bits)", "Set the length of the CTS delta field in the AU Header in bits", 10, &pref_cts_delta_length); prefs_register_uint_preference(ismacryp_module, "dts_delta_length","User mode: DTSDeltaLength (bits)", "Set the length of the DTS delta field in the AU Header in bits", 10, &pref_dts_delta_length); prefs_register_bool_preference(ismacryp_module, "random_access_indication","User mode: RandomAccessIndication (T/F)", "Indicates whether or not the RAP field is present in the AU Header (T/F)", &pref_random_access_indication); prefs_register_uint_preference(ismacryp_module, "stream_state_indication","User mode: StreamStateIndication (number of bits)", "Indicates the number of bits on which the stream state field is encoded" " in the AU Header (bits)", 10, &pref_stream_state_indication); }
void proto_register_pn532(void) { static hf_register_info hf[] = { {&hf_pn532_command, {"Command", "pn532.cmd", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &pn532_commands_ext, 0x0, NULL, HFILL}}, {&hf_pn532_direction, {"Direction", "pn532.tfi", FT_UINT8, BASE_HEX, VALS(pn532_directions), 0x0, NULL, HFILL}}, {&hf_pn532_error, {"Error Code", "pn532.error", FT_UINT8, BASE_HEX, VALS(pn532_errors), 0x0, NULL, HFILL}}, {&hf_pn532_BrTy, {"Baud Rate and Modulation", "pn532.BrTy", FT_UINT8, BASE_HEX, VALS(pn532_brtypes), 0x0, NULL, HFILL}}, {&hf_pn532_MaxTg, {"Maximum Number of Targets", "pn532.MaxTg", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_Tg, {"Logical Target Number", "pn532.Tg", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_NbTg, {"Number of Targets", "pn532.NbTg", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_payload_length, {"Payload Length", "pn532.payload.length", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_ic_version, {"Integrated Circuit Version", "pn532.ic.version", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_fw_version, {"Firmware Version", "pn532.fw.version", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_fw_revision, {"Firmware Revision", "pn532.fw.revision", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_fw_support, {"Firmware Support", "pn532.fw.support", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443a_sak, {"ISO/IEC 14443-A SAK", "pn532.iso.14443a.sak", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443a_atqa, {"ISO/IEC 14443-A ATQA", "pn532.iso.14443a.atqa", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443a_uid, {"ISO/IEC 14443-A UID", "pn532.iso.14443a.uid", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443a_uid_length, {"ISO/IEC 14443-A UID Length", "pn532.iso.14443a.uid.length", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443a_ats, {"ISO/IEC 14443-A ATS", "pn532.iso.14443a.ats", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443b_pupi, {"ISO/IEC 14443-B PUPI", "pn532.iso.14443b.pupi", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443b_app_data, {"ISO/IEC 14443-B Application Data", "pn532.iso.14443b.app.data", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_14443b_proto_info, {"ISO/IEC 14443-B Protocol Info", "pn532.iso.14443b.protocol.info", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}}, {&hf_pn532_sam_mode, {"SAM Mode", "pn532.sam.mode", FT_UINT8, BASE_HEX, VALS(pn532_sam_modes), 0x0, NULL, HFILL}}, }; static gint *ett[] = { &ett_pn532 }; module_t *pref_mod; static const enum_val_t sub_enum_vals[] = { { "data", "Data", SUB_DATA }, { "felica", "Sony FeliCa", SUB_FELICA }, { "mifare", "NXP MiFare", SUB_MIFARE }, { "iso7816", "ISO 7816", SUB_ISO7816 }, { NULL, NULL, 0 } }; proto_pn532 = proto_register_protocol("NXP PN532", "PN532", "pn532"); proto_register_field_array(proto_pn532, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); pref_mod = prefs_register_protocol(proto_pn532, NULL); prefs_register_enum_preference(pref_mod, "prtype532", "Payload Type", "Protocol payload type", &sub_selected, sub_enum_vals, FALSE); pn532_dissector_table = register_dissector_table("pn532.payload", "PN532 Payload", FT_UINT8, BASE_DEC); register_dissector("pn532", dissect_pn532, proto_pn532); }
/*! \brief Register the plugin with Wireshark. * This function is called by Wireshark */ void proto_register_fast () { /* Header fields which always exist. */ static hf_register_info hf[] = { { &hf_fast[FieldTypeUInt32], { "uInt32", "fast.uint32", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeUInt64], { "uInt64", "fast.uint64", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeInt32], { "int32", "fast.int32", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeInt64], { "int64", "fast.int64", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeDecimal], { "decimal", "fast.decimal", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeAsciiString], { "ascii", "fast.ascii", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeUnicodeString], { "unicode", "fast.unicode", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeByteVector], { "byteVector", "fast.bytevector", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeGroup], { "group", "fast.group", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeSequence], { "sequence", "fast.sequence", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } }, { &hf_fast[FieldTypeError], { "error", "fast.ERROR", FT_NONE, BASE_NONE, NULL, 0, "Dynamic error in packet", HFILL } }, { &hf_fast_tid, { "tid", "fast.tid", FT_NONE, BASE_NONE, NULL, 0, "", HFILL } } }; static enum_val_t radio_buttons[] = { { "Generic", "Generic", GenericImplem }, { "CME", "CME", CMEImplem }, { "UMDF", "UMDF", UMDFImplem }, { 0, 0, 0 } }; static enum_val_t protocol_buttons[] = { { "UDP", "UDP", UDPImplem }, { "TCP", "TCP", TCPImplem }, { 0, 0, 0 } }; /* Subtree array. */ static gint *ett[] = { &ett_fast }; module_t* module; if (proto_fast != -1) return; /* Register long, short, and abbreviated forms of the protocol name. */ proto_fast = proto_register_protocol("FAST (FIX Adapted for STreaming) Protocol", "FAST", "fast"); /* Register header fields and subtree. */ proto_register_field_array(proto_fast, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); /* registers our module's dissector registration hook */ module = prefs_register_protocol(proto_fast, proto_reg_handoff_fast); /*** register plugin preferences ***/ prefs_register_bool_preference(module, "enabled", "Plugin Enabled", "Check if you want the plugin to capture and dissect packets", &enabled); prefs_register_uint_preference(module, "port", "Listen port", "Enter a valid port number (1024-65535)", 10, &config_port_number); prefs_register_enum_preference(module, "protocol", "Protocol", "Network Protocol", &protocol, protocol_buttons, FALSE); prefs_register_string_preference(module, "template", "XML template file", "Enter a valid filesystem path", &config_template_xml_path); prefs_register_bool_preference(module, "show_empty", "Show empty optional fields", "Check if you want to see fields that are empty and were not sent in the packet", &show_empty_optional_fields); prefs_register_bool_preference(module, "sci_notation", "Show all decimals in scientific notation", "Check if you want to see all decimal fields in scientific notation", &sciNotation); prefs_register_enum_preference(module, "implementation", "FAST Implementation", "Select the specific implementation of FAST", &implementation, radio_buttons, FALSE); prefs_register_bool_preference(module, "show_field_dictionaries", "Show each field's dictionary", "Show each field's dictionary", &showFieldDictionaries); prefs_register_bool_preference(module, "show_field_keys", "Show each field's dictionary key", "Show each field's dictionary key", &showFieldKeys); prefs_register_bool_preference(module, "show_field_operators", "Show each field's operator (if any)", "Show each field's operator (if any)", &showFieldOperators); prefs_register_bool_preference(module, "show_field_mandatoriness", "Show if each field is mandatory", "Show if each field is mandatory", &showFieldMandatoriness); prefs_register_bool_preference(module, "enable_dialogs", "Enable error dialogs", "Shows global and static errors in dialog windows\ntshark WILL NOT function with this enabled", &showDialogWindows); prefs_register_bool_preference(module, "enable_logging", "Enable logging to file", "Logs all errors to error_log.txt", &logErrors); register_dissector("fast", &dissect_fast, proto_fast); }
void proto_register_sdh(void) { static hf_register_info hf[] = { { &hf_sdh_a1, { "A1", "sdh.a1", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_a2, { "A2", "sdh.a2", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_j0, { "J0", "sdh.j0", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_b1, { "B1", "sdh.b1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_e1, { "E1", "sdh.e1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_f1, { "F1", "sdh.f1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d1, { "D1", "sdh.d1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d2, { "D2", "sdh.d2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d3, { "D3", "sdh.d3", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_au, { "AU", "sdh.au", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_b2, { "B2", "sdh.b2", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_k1, { "K1", "sdh.k1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_k2, { "K2", "sdh.k2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d4, { "D4", "sdh.d4", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d5, { "D5", "sdh.d5", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d6, { "D6", "sdh.d6", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d7, { "D7", "sdh.d7", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d8, { "D8", "sdh.d8", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d9, { "D9", "sdh.d9", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d10, { "D10", "sdh.d10", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d11, { "D11", "sdh.d11", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_d12, { "D12", "sdh.d12", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_s1, { "S1", "sdh.s1", FT_UINT8, BASE_HEX, VALS(sdh_s1_vals), 0x0, NULL, HFILL }}, { &hf_sdh_m1, { "M1", "sdh.m1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_e2, { "E2", "sdh.e2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_j1, { "J1", "sdh.j1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_h1, { "H1", "sdh.h1", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_sdh_h2, { "H2", "sdh.h2", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, }; static gint *ett[] = { &ett_sdh, }; module_t *sdh_module; proto_sdh = proto_register_protocol("SDH/SONET Protocol", "SDH", "sdh"); proto_register_field_array(proto_sdh, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); sdh_module = prefs_register_protocol(proto_sdh, NULL); prefs_register_enum_preference(sdh_module, "data.rate", "Data rate", "Data rate", &sdh_data_rate, data_rates, ENC_BIG_ENDIAN); register_dissector("sdh", dissect_sdh, proto_sdh); }
void proto_register_dmx_chan(void) { static hf_register_info hf[] = { { &hf_dmx_chan_output_data_filter, { "DMX data filter", "dmx_chan.data_filter", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_dmx_chan_output_dmx_data, { "DMX data", "dmx_chan.dmx_data", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, }; static gint *ett[] = { &ett_dmx_chan }; module_t *dmx_chan_module; static const enum_val_t disp_chan_val_types[] = { { "pro", "Percent", 0 }, { "hex", "Hexadecimal", 1 }, { "dec", "Decimal", 2 }, { NULL, NULL, 0 } }; static const enum_val_t disp_chan_nr_types[] = { { "hex", "Hexadecimal", 0 }, { "dec", "Decimal", 1 }, { NULL, NULL, 0 } }; static const enum_val_t col_count[] = { { "6", "6", 6 }, { "10", "10", 10 }, { "12", "12", 12 }, { "16", "16", 16 }, { "24", "24", 24 }, { NULL, NULL, 0 } }; proto_dmx_chan = proto_register_protocol("DMX Channels","DMX Channels", "dmx-chan"); proto_register_field_array(proto_dmx_chan, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_dissector("dmx-chan", dissect_dmx_chan, proto_dmx_chan); dmx_chan_module = prefs_register_protocol(proto_dmx_chan, NULL); prefs_register_enum_preference(dmx_chan_module, "dmx_disp_chan_val_type", "DMX Display channel value type", "The way DMX values are displayed", &global_disp_chan_val_type, disp_chan_val_types, FALSE); prefs_register_enum_preference(dmx_chan_module, "dmx_disp_chan_nr_type", "DMX Display channel nr. type", "The way DMX channel numbers are displayed", &global_disp_chan_nr_type, disp_chan_nr_types, FALSE); prefs_register_enum_preference(dmx_chan_module, "dmx_disp_col_count", "DMX Display Column Count", "The number of columns for the DMX display", &global_disp_col_count, col_count, FALSE); }
/*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_field, { "Security Control Field", "zbee.sec.field", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_zbee_sec_key_id, { "Key Id", "zbee.sec.key_id", 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, { "Key", "zbee.sec.key", 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 }}, { &hf_zbee_sec_decryption_key, { "Key Label", "zbee.sec.decryption_key", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }} }; static gint *ett[] = { &ett_zbee_sec, &ett_zbee_sec_control }; static ei_register_info ei[] = { { &ei_zbee_sec_encrypted_payload, { "zbee_sec.encrypted_payload", PI_UNDECODED, PI_WARN, "Encrypted Payload", EXPFILL }}, { &ei_zbee_sec_encrypted_payload_sliced, { "zbee_sec.encrypted_payload_sliced", PI_UNDECODED, PI_WARN, "Encrypted payload, cut short when capturing - can't decrypt", EXPFILL }}, { &ei_zbee_sec_extended_source_unknown, { "zbee_sec.extended_source_unknown", PI_PROTOCOL, PI_NOTE, "Extended Source: Unknown", EXPFILL }}, }; expert_module_t* expert_zbee_sec; 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_CSTRING(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, &uat_key_records, &num_uat_key_records, UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */ NULL, /* TODO: ptr to help manual? */ uat_key_record_copy_cb, uat_key_record_update_cb, uat_key_record_free_cb, uat_key_record_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)); expert_zbee_sec = expert_register_protocol(proto); expert_register_field_array(expert_zbee_sec, ei, array_length(ei)); } /* zbee_security_register */
void proto_register_nflog(void) { static hf_register_info hf[] = { /* Header */ { &hf_nflog_family, { "Family", "nflog.family", FT_UINT8, BASE_DEC, VALS(_linux_family_vals), 0x00, NULL, HFILL } }, { &hf_nflog_version, { "Version", "nflog.version", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_nflog_resid, { "Resource id", "nflog.res_id", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_nflog_encoding, { "Encoding", "nflog.encoding", FT_UINT32, BASE_HEX, VALS(_encoding_vals), 0x00, NULL, HFILL } }, /* TLV */ { &hf_nflog_tlv, { "TLV", "nflog.tlv", FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_nflog_tlv_length, { "Length", "nflog.tlv_length", FT_UINT16, BASE_DEC, NULL, 0x00, "TLV Length", HFILL } }, { &hf_nflog_tlv_type, { "Type", "nflog.tlv_type", FT_UINT16, BASE_DEC, VALS(nflog_tlv_vals), 0x7fff, "TLV Type", HFILL } }, /* TLV values */ { &hf_nflog_tlv_prefix, { "Prefix", "nflog.prefix", FT_STRINGZ, BASE_NONE, NULL, 0x00, "TLV Prefix Value", HFILL } }, { &hf_nflog_tlv_uid, { "UID", "nflog.uid", FT_INT32, BASE_DEC, NULL, 0x00, "TLV UID Value", HFILL } }, { &hf_nflog_tlv_gid, { "GID", "nflog.gid", FT_INT32, BASE_DEC, NULL, 0x00, "TLV GID Value", HFILL } }, { &hf_nflog_tlv_timestamp, { "Timestamp", "nflog.timestamp", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00, "TLV Timestamp Value", HFILL } }, { &hf_nflog_tlv_unknown, { "Value", "nflog.tlv_value", FT_BYTES, BASE_NONE, NULL, 0x00, "TLV Value", HFILL } }, }; static gint *ett[] = { &ett_nflog, &ett_nflog_tlv }; module_t *pref; proto_nflog = proto_register_protocol("Linux Netfilter NFLOG", "NFLOG", "nflog"); pref = prefs_register_protocol(proto_nflog, NULL); prefs_register_enum_preference(pref, "byte_order_type", "Byte Order", "Byte Order", &nflog_byte_order, byte_order_types, FALSE); register_dissector("nflog", dissect_nflog, proto_nflog); proto_register_field_array(proto_nflog, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); }
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_socketcan(void) { static hf_register_info hf[] = { { &hf_can_ident, { "Identifier", "can.id", FT_UINT32, BASE_HEX, NULL, CAN_EFF_MASK, NULL, HFILL } }, { &hf_can_extflag, { "Extended Flag", "can.flags.xtd", FT_BOOLEAN, 32, NULL, CAN_EFF_FLAG, NULL, HFILL } }, { &hf_can_rtrflag, { "Remote Transmission Request Flag", "can.flags.rtr", FT_BOOLEAN, 32, NULL, CAN_RTR_FLAG, NULL, HFILL } }, { &hf_can_errflag, { "Error Flag", "can.flags.err", FT_BOOLEAN, 32, NULL, CAN_ERR_FLAG, NULL, HFILL } }, { &hf_can_len, { "Frame-Length", "can.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } } }; /* Setup protocol subtree array */ static gint *ett[] = { &ett_can }; proto_can = proto_register_protocol ( "Controller Area Network",/* name */ "CAN", /* short name */ "can" /* abbrev */ ); proto_register_field_array(proto_can, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); can_module = prefs_register_protocol(proto_can, proto_reg_handoff_socketcan); prefs_register_enum_preference(can_module, "protocol", "Next level protocol", "Next level protocol like CANopen etc.", (gint *)&can_high_level_protocol_dissector, can_high_level_protocol_dissector_options, FALSE); }
/*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 */
/* 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_bthcrp(void) { module_t *module; expert_module_t* expert_bthcrp; static hf_register_info hf[] = { { &hf_bthcrp_control_pdu_id, { "Control PDU ID", "bthcrp.control.pdu_id", FT_UINT16, BASE_HEX, VALS(control_pdu_id_vals), 0x00, NULL, HFILL } }, { &hf_bthcrp_control_transaction_id, { "Transaction ID", "bthcrp.control.transaction_id", FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_parameter_length, { "Parameter Length", "bthcrp.control.parameter_length", FT_UINT16, BASE_HEX, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_status, { "Status", "bthcrp.control.status", FT_UINT16, BASE_HEX, VALS(status_vals), 0x00, NULL, HFILL } }, { &hf_bthcrp_notification_pdu_id, { "Notification PDU ID", "bthcrp.notification.pdu_id", FT_UINT16, BASE_HEX, VALS(notification_pdu_id_vals), 0x00, NULL, HFILL } }, { &hf_bthcrp_callback_context_id, { "Callback Context ID", "bthcrp.callback.context_id", FT_UINT32, BASE_HEX, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_callback_timeout, { "Callback Timeout", "bthcrp.callback.timeout", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_timeout, { "Timeout", "bthcrp.timeout", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_register, { "Register", "bthcrp.register", FT_UINT8, BASE_HEX, VALS(register_vals), 0x00, NULL, HFILL } }, { &hf_bthcrp_control_1284_id, { "1284 ID", "bthcrp.1284_id", FT_STRING, BASE_NONE, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_start_byte, { "Start Byte", "bthcrp.start_byte", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_number_of_bytes, { "Number Of Bytes", "bthcrp.number_of_bytes", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_client_credit_granted, { "Client Credit Granted", "bthcrp.client_credit_granted", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_server_credit_granted, { "Server Credit Granted", "bthcrp.server_credit_granted", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_client_credit_return, { "Client Credit Return", "bthcrp.client_credit_return", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_server_credit_return, { "Server Credit Return", "bthcrp.server_credit_return", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_client_credit_query, { "Client Credit Query", "bthcrp.client_credit_query", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_server_credit_query, { "Server Credit Query", "bthcrp.server_credit_query", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, { &hf_bthcrp_control_status_reserved_76, { "Reserved", "bthcrp.status.reserved76", FT_UINT8, BASE_DEC, NULL, 0xC0, NULL, HFILL } }, { &hf_bthcrp_control_status_paper_empty, { "Paper Empty", "bthcrp.status.paper_empty", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL } }, { &hf_bthcrp_control_status_select, { "Select", "bthcrp.status.select", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL } }, { &hf_bthcrp_control_status_not_error, { "Not Error", "bthcrp.status.not_error", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL } }, { &hf_bthcrp_control_status_reserved_20, { "Reserved", "bthcrp.status.reserved210", FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL } }, { &hf_bthcrp_data, { "Data", "bthcrp.data", FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } } }; static gint *ett[] = { &ett_bthcrp }; static ei_register_info ei[] = { { &ei_bthcrp_control_parameter_length, { "bthcrp.control_parameter_length.bad", PI_PROTOCOL, PI_WARN, "Length bad", EXPFILL }}, { &ei_bthcrp_unexpected_data, { "bthcrp.unexpected_data", PI_PROTOCOL, PI_WARN, "Unexpected data", EXPFILL }}, }; proto_bthcrp = proto_register_protocol("Bluetooth HCRP Profile", "BT HCRP", "bthcrp"); bthcrp_handle = register_dissector("bthcrp", dissect_bthcrp, proto_bthcrp); proto_register_field_array(proto_bthcrp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_bthcrp = expert_register_protocol(proto_bthcrp); expert_register_field_array(expert_bthcrp, ei, array_length(ei)); module = prefs_register_protocol(proto_bthcrp, NULL); prefs_register_static_text_preference(module, "hcrp.version", "Bluetooth Profile HCRP version: 1.2", "Version of profile supported by this dissector."); prefs_register_obsolete_preference(module, "hcrp.is_client"); prefs_register_enum_preference(module, "hcrp.force_client", "Force Client", "If \"yes\" localhost will be treat as Client, \"no\" as Server", &force_client, force_client_enum, FALSE); prefs_register_uint_preference(module, "hcrp.control.psm", "L2CAP PSM for Control", "L2CAP PSM for Control", 10, &psm_control); prefs_register_uint_preference(module, "hcrp.data.psm", "L2CAP PSM for Data", "L2CAP PSM for Data", 10, &psm_data_stream); prefs_register_uint_preference(module, "hcrp.notification.psm", "L2CAP PSM for Notification", "L2CAP PSM for Notification", 10, &psm_notification); }