diff --git a/debian/libwireshark0.symbols b/debian/libwireshark0.symbols index 6c99067317..4006c056cc 100644 --- a/debian/libwireshark0.symbols +++ b/debian/libwireshark0.symbols @@ -1452,6 +1452,7 @@ libwireshark.so.0 libwireshark0 #MINVER# scsi_ssc_vals_ext@Base 1.12.0~rc1 scsistat_param@Base 2.5.0 sctp_port_to_display@Base 1.99.2 + sctpppid_val_ext@Base 3.5.0 secrets_get_available_keys@Base 2.9.1 secrets_rsa_decrypt@Base 2.9.0 secrets_verify_key@Base 2.9.1 diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 76ee746a6c..b5261a74d7 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -229,6 +229,7 @@ set(LIBWIRESHARK_NONGENERATED_FILES register.c req_resp_hdrs.c rtd_table.c + sctpppids.c secrets.c sequence_analysis.c show_exception.c diff --git a/epan/dissectors/packet-componentstatus.c b/epan/dissectors/packet-componentstatus.c index 382f30e770..1a407a9fe8 100644 --- a/epan/dissectors/packet-componentstatus.c +++ b/epan/dissectors/packet-componentstatus.c @@ -17,6 +17,8 @@ #include "config.h" #include +#include +#include #if 0 @@ -126,7 +128,7 @@ static const true_false_string message_flags_final_bit = { static const value_string message_type_values[] = { - { COMPONENTSTATUS_COMPONENTSTATUSREPORT_MESSAGE_TYPE, "ComponentStatus Report" }, + { COMPONENTSTATUS_COMPONENTSTATUSREPORT_MESSAGE_TYPE, "ComponentStatus Report" }, { 0, NULL } }; @@ -256,8 +258,8 @@ proto_register_componentstatusprotocol(void) { &hf_componentassociation_receiverid, { "ReceiverID", "componentstatusprotocol.componentassociation_receiverid", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_componentassociation_duration, { "Duration", "componentstatusprotocol.componentassociation_duration", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_componentassociation_flags, { "Flags", "componentstatusprotocol.componentassociation_flags", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_componentassociation_protocolid, { "ProtocolID", "componentstatusprotocol.componentassociation_protocolid", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_componentassociation_ppid, { "PPID", "componentstatusprotocol.componentassociation_ppid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, + { &hf_componentassociation_protocolid, { "ProtocolID", "componentstatusprotocol.componentassociation_protocolid", FT_UINT16, BASE_DEC|BASE_EXT_STRING, &ipproto_val_ext, 0x0, NULL, HFILL } }, + { &hf_componentassociation_ppid, { "PPID", "componentstatusprotocol.componentassociation_ppid", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sctpppid_val_ext, 0x0, NULL, HFILL } }, }; /* Setup protocol subtree array */ diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index a9c0cc9abc..9960ce3089 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -338,85 +338,6 @@ WS_DLL_PUBLIC_DEF const value_string chunk_type_values[] = { { SCTP_IETF_EXT, "IETF_EXTENSION" }, { 0, NULL } }; -/* - * Based on http://www.iana.org/assignments/sctp-parameters - * as of March 15th, 2012 - */ -static const value_string sctp_payload_proto_id_values[] = { - { NOT_SPECIFIED_PROTOCOL_ID, "not specified" }, - { IUA_PAYLOAD_PROTOCOL_ID, "IUA" }, - { M2UA_PAYLOAD_PROTOCOL_ID, "M2UA" }, - { M3UA_PAYLOAD_PROTOCOL_ID, "M3UA" }, - { SUA_PAYLOAD_PROTOCOL_ID, "SUA" }, - { M2PA_PAYLOAD_PROTOCOL_ID, "M2PA" }, - { V5UA_PAYLOAD_PROTOCOL_ID, "V5UA" }, - { H248_PAYLOAD_PROTOCOL_ID, "H.248/MEGACO" }, - { BICC_PAYLOAD_PROTOCOL_ID, "BICC/Q.2150.3" }, - { TALI_PAYLOAD_PROTOCOL_ID, "TALI" }, - { DUA_PAYLOAD_PROTOCOL_ID, "DUA" }, - { ASAP_PAYLOAD_PROTOCOL_ID, "ASAP" }, - { ENRP_PAYLOAD_PROTOCOL_ID, "ENRP" }, - { H323_PAYLOAD_PROTOCOL_ID, "H.323" }, - { QIPC_PAYLOAD_PROTOCOL_ID, "Q.IPC/Q.2150.3" }, - { SIMCO_PAYLOAD_PROTOCOL_ID, "SIMCO" }, - { DDP_SEG_CHUNK_PROTOCOL_ID, "DDP Segment Chunk" }, - { DDP_STREAM_SES_CTRL_PROTOCOL_ID, "DDP Stream Session Control" }, - { S1AP_PAYLOAD_PROTOCOL_ID, "S1 Application Protocol (S1AP)" }, - { RUA_PAYLOAD_PROTOCOL_ID, "RUA" }, - { HNBAP_PAYLOAD_PROTOCOL_ID, "HNBAP" }, - { FORCES_HP_PAYLOAD_PROTOCOL_ID, "ForCES-HP" }, - { FORCES_MP_PAYLOAD_PROTOCOL_ID, "ForCES-MP" }, - { FORCES_LP_PAYLOAD_PROTOCOL_ID, "ForCES-LP" }, - { SBC_AP_PAYLOAD_PROTOCOL_ID, "SBc-AP" }, - { NBAP_PAYLOAD_PROTOCOL_ID, "NBAP" }, - /* Unassigned 26 */ - { X2AP_PAYLOAD_PROTOCOL_ID, "X2AP" }, - { IRCP_PAYLOAD_PROTOCOL_ID, "IRCP" }, - { LCS_AP_PAYLOAD_PROTOCOL_ID, "LCS-AP" }, - { MPICH2_PAYLOAD_PROTOCOL_ID, "MPICH2" }, - { SABP_PAYLOAD_PROTOCOL_ID, "SABP" }, - { FGP_PAYLOAD_PROTOCOL_ID, "Fractal Generator Protocol" }, - { PPP_PAYLOAD_PROTOCOL_ID, "Ping Pong Protocol" }, - { CALCAPP_PAYLOAD_PROTOCOL_ID, "CalcApp Protocol" }, - { SSP_PAYLOAD_PROTOCOL_ID, "Scripting Service Protocol" }, - { NPMP_CTRL_PAYLOAD_PROTOCOL_ID, "NetPerfMeter Control" }, - { NPMP_DATA_PAYLOAD_PROTOCOL_ID, "NetPerfMeter Data" }, - { ECHO_PAYLOAD_PROTOCOL_ID, "Echo" }, - { DISCARD_PAYLOAD_PROTOCOL_ID, "Discard" }, - { DAYTIME_PAYLOAD_PROTOCOL_ID, "Daytime" }, - { CHARGEN_PAYLOAD_PROTOCOL_ID, "Character Generator" }, - { PROTO_3GPP_RNA_PROTOCOL_ID, "3GPP RNA" }, - { PROTO_3GPP_M2AP_PROTOCOL_ID, "3GPP M2AP" }, - { PROTO_3GPP_M3AP_PROTOCOL_ID, "3GPP M3AP" }, - { SSH_PAYLOAD_PROTOCOL_ID, "SSH" }, - { DIAMETER_PROTOCOL_ID, "DIAMETER" }, - { DIAMETER_DTLS_PROTOCOL_ID, "DIAMETER over DTLS" }, - { R14P_BER_PROTOCOL_ID, "R14P" }, - { WEBRTC_DCEP_PROTOCOL_ID, "WebRTC Control" }, - { WEBRTC_STRING_PAYLOAD_PROTOCOL_ID, "WebRTC String" }, - { WEBRTC_BINARY_PARTIAL_PAYLOAD_PROTOCOL_ID, "WebRTC Binary Partial (Deprecated)" }, - { WEBRTC_BINARY_PAYLOAD_PROTOCOL_ID, "WebRTC Binary" }, - { WEBRTC_STRING_PARTIAL_PAYLOAD_PROTOCOL_ID, "WebRTC String Partial (Deprecated)" }, - { PROTO_3GPP_PUA_PAYLOAD_PROTOCOL_ID, "3GPP PUA" }, - { WEBRTC_STRING_EMPTY_PAYLOAD_PROTOCOL_ID, "WebRTC String Empty" }, - { WEBRTC_BINARY_EMPTY_PAYLOAD_PROTOCOL_ID, "WebRTC Binary Empty" }, - { XWAP_PROTOCOL_ID, "XwAP" }, - { XW_CONTROL_PLANE_PROTOCOL_ID, "Xw - Control Plane" }, - { NGAP_PROTOCOL_ID, "NGAP" }, - { XNAP_PROTOCOL_ID, "XnAP" }, - { F1AP_PROTOCOL_ID, "F1 AP" }, - { ELE2_PROTOCOL_ID, "ELE2 Lawful Interception" }, - { NGAP_OVER_DTLS_PROTOCOL_ID, "NGAP over DTLS" }, - { XNAP_OVER_DTLS_PROTOCOL_ID, "XnAP over DTLS" }, - { F1AP_OVER_DTLS_PROTOCOL_ID, "F1AP over DTLS" }, - { E1AP_OVER_DTLS_PROTOCOL_ID, "E1AP over DTLS" }, - { E2_CP_PROTOCOL_ID, "E2-CP" }, - { E2_UP_PROTOCOL_ID, "E2-UP" }, - { E2_DU_PROTOCOL_ID, "E2-DU" }, - { W1AP_PROTOCOL_ID, "W1AP" }, - - { 0, NULL } }; - #define CHUNK_TYPE_LENGTH 1 #define CHUNK_FLAGS_LENGTH 1 @@ -4896,7 +4817,7 @@ proto_register_sctp(void) { &hf_data_chunk_tsn, { "Transmission sequence number", "sctp.data_tsn", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_data_chunk_stream_id, { "Stream identifier", "sctp.data_sid", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_data_chunk_stream_seq_number, { "Stream sequence number", "sctp.data_ssn", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - { &hf_data_chunk_payload_proto_id, { "Payload protocol identifier", "sctp.data_payload_proto_id", FT_UINT32, BASE_DEC, VALS(sctp_payload_proto_id_values), 0x0, NULL, HFILL } }, + { &hf_data_chunk_payload_proto_id, { "Payload protocol identifier", "sctp.data_payload_proto_id", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sctpppid_val_ext, 0x0, NULL, HFILL } }, { &hf_idata_chunk_reserved, { "Reserved", "sctp.data_reserved", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_idata_chunk_mid, { "Message identifier", "sctp.data_mid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_idata_chunk_fsn, { "Fragment sequence number", "sctp.data_fsn", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, diff --git a/epan/sctpppids.c b/epan/sctpppids.c new file mode 100644 index 0000000000..e0b01ac9f7 --- /dev/null +++ b/epan/sctpppids.c @@ -0,0 +1,116 @@ +/* sctpppids.h + * Declarations of SCTP payload protocol IDs. + * + * Copyright 2011-2021 by Thomas Dreibholz + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "config.h" + +#include + +#include +#include +#include +#include + +/* + * Based on https://www.iana.org/assignments/sctp-parameters/sctp-parameters.xhtml + * as of February 22, 2021 + */ +static const value_string sctp_payload_proto_id_values[] = { + { NOT_SPECIFIED_PROTOCOL_ID, "not specified" }, + { IUA_PAYLOAD_PROTOCOL_ID, "IUA" }, + { M2UA_PAYLOAD_PROTOCOL_ID, "M2UA" }, + { M3UA_PAYLOAD_PROTOCOL_ID, "M3UA" }, + { SUA_PAYLOAD_PROTOCOL_ID, "SUA" }, + { M2PA_PAYLOAD_PROTOCOL_ID, "M2PA" }, + { V5UA_PAYLOAD_PROTOCOL_ID, "V5UA" }, + { H248_PAYLOAD_PROTOCOL_ID, "H.248/MEGACO" }, + { BICC_PAYLOAD_PROTOCOL_ID, "BICC/Q.2150.3" }, + { TALI_PAYLOAD_PROTOCOL_ID, "TALI" }, + { DUA_PAYLOAD_PROTOCOL_ID, "DUA" }, + { ASAP_PAYLOAD_PROTOCOL_ID, "ASAP" }, + { ENRP_PAYLOAD_PROTOCOL_ID, "ENRP" }, + { H323_PAYLOAD_PROTOCOL_ID, "H.323" }, + { QIPC_PAYLOAD_PROTOCOL_ID, "Q.IPC/Q.2150.3" }, + { SIMCO_PAYLOAD_PROTOCOL_ID, "SIMCO" }, + { DDP_SEG_CHUNK_PROTOCOL_ID, "DDP Segment Chunk" }, + { DDP_STREAM_SES_CTRL_PROTOCOL_ID, "DDP Stream Session Control" }, + { S1AP_PAYLOAD_PROTOCOL_ID, "S1 Application Protocol (S1AP)" }, + { RUA_PAYLOAD_PROTOCOL_ID, "RUA" }, + { HNBAP_PAYLOAD_PROTOCOL_ID, "HNBAP" }, + { FORCES_HP_PAYLOAD_PROTOCOL_ID, "ForCES-HP" }, + { FORCES_MP_PAYLOAD_PROTOCOL_ID, "ForCES-MP" }, + { FORCES_LP_PAYLOAD_PROTOCOL_ID, "ForCES-LP" }, + { SBC_AP_PAYLOAD_PROTOCOL_ID, "SBc-AP" }, + { NBAP_PAYLOAD_PROTOCOL_ID, "NBAP" }, + { 26, "Unassigned" }, /* Unassigned 26 */ + { X2AP_PAYLOAD_PROTOCOL_ID, "X2AP" }, + { IRCP_PAYLOAD_PROTOCOL_ID, "IRCP" }, + { LCS_AP_PAYLOAD_PROTOCOL_ID, "LCS-AP" }, + { MPICH2_PAYLOAD_PROTOCOL_ID, "MPICH2" }, + { SABP_PAYLOAD_PROTOCOL_ID, "SABP" }, + { FGP_PAYLOAD_PROTOCOL_ID, "Fractal Generator Protocol" }, + { PPP_PAYLOAD_PROTOCOL_ID, "Ping Pong Protocol" }, + { CALCAPP_PAYLOAD_PROTOCOL_ID, "CalcApp Protocol" }, + { SSP_PAYLOAD_PROTOCOL_ID, "Scripting Service Protocol" }, + { NPMP_CTRL_PAYLOAD_PROTOCOL_ID, "NetPerfMeter Control" }, + { NPMP_DATA_PAYLOAD_PROTOCOL_ID, "NetPerfMeter Data" }, + { ECHO_PAYLOAD_PROTOCOL_ID, "Echo" }, + { DISCARD_PAYLOAD_PROTOCOL_ID, "Discard" }, + { DAYTIME_PAYLOAD_PROTOCOL_ID, "Daytime" }, + { CHARGEN_PAYLOAD_PROTOCOL_ID, "Character Generator" }, + { PROTO_3GPP_RNA_PROTOCOL_ID, "3GPP RNA" }, + { PROTO_3GPP_M2AP_PROTOCOL_ID, "3GPP M2AP" }, + { PROTO_3GPP_M3AP_PROTOCOL_ID, "3GPP M3AP" }, + { SSH_PAYLOAD_PROTOCOL_ID, "SSH" }, + { DIAMETER_PROTOCOL_ID, "DIAMETER" }, + { DIAMETER_DTLS_PROTOCOL_ID, "DIAMETER over DTLS" }, + { R14P_BER_PROTOCOL_ID, "R14P" }, + { 49, "Unassigned" }, /* Unassigned 49 */ + { WEBRTC_DCEP_PROTOCOL_ID, "WebRTC Control" }, + { WEBRTC_STRING_PAYLOAD_PROTOCOL_ID, "WebRTC String" }, + { WEBRTC_BINARY_PARTIAL_PAYLOAD_PROTOCOL_ID, "WebRTC Binary Partial (Deprecated)" }, + { WEBRTC_BINARY_PAYLOAD_PROTOCOL_ID, "WebRTC Binary" }, + { WEBRTC_STRING_PARTIAL_PAYLOAD_PROTOCOL_ID, "WebRTC String Partial (Deprecated)" }, + { PROTO_3GPP_PUA_PAYLOAD_PROTOCOL_ID, "3GPP PUA" }, + { WEBRTC_STRING_EMPTY_PAYLOAD_PROTOCOL_ID, "WebRTC String Empty" }, + { WEBRTC_BINARY_EMPTY_PAYLOAD_PROTOCOL_ID, "WebRTC Binary Empty" }, + { XWAP_PROTOCOL_ID, "XwAP" }, + { XW_CONTROL_PLANE_PROTOCOL_ID, "Xw - Control Plane" }, + { NGAP_PROTOCOL_ID, "NGAP" }, + { XNAP_PROTOCOL_ID, "XnAP" }, + { F1AP_PROTOCOL_ID, "F1 AP" }, + { ELE2_PROTOCOL_ID, "ELE2 Lawful Interception" }, + { NGAP_OVER_DTLS_PROTOCOL_ID, "NGAP over DTLS" }, + { XNAP_OVER_DTLS_PROTOCOL_ID, "XnAP over DTLS" }, + { F1AP_OVER_DTLS_PROTOCOL_ID, "F1AP over DTLS" }, + { E1AP_OVER_DTLS_PROTOCOL_ID, "E1AP over DTLS" }, + { E2_CP_PROTOCOL_ID, "E2-CP" }, + { E2_UP_PROTOCOL_ID, "E2-UP" }, + { E2_DU_PROTOCOL_ID, "E2-DU" }, + { W1AP_PROTOCOL_ID, "W1AP" }, + + { 0, NULL } }; + + +value_string_ext sctpppid_val_ext = VALUE_STRING_EXT_INIT(sctp_payload_proto_id_values); + +/* + * Editor modelines + * + * Local Variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/epan/sctpppids.h b/epan/sctpppids.h index 5554ee5040..0ea850cc48 100644 --- a/epan/sctpppids.h +++ b/epan/sctpppids.h @@ -1,6 +1,8 @@ /* sctpppids.h * Declarations of SCTP payload protocol IDs. * + * Copyright 2011-2021 by Thomas Dreibholz + * * Wireshark - Network traffic analyzer * By Gerald Combs * Copyright 1998 Gerald Combs @@ -94,4 +96,6 @@ #define E2_DU_PROTOCOL_ID 72 #define W1AP_PROTOCOL_ID 73 +WS_DLL_PUBLIC value_string_ext sctpppid_val_ext; + #endif /* sctpppids.h */