aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/.clang-tidy3
-rw-r--r--plugins/codecs/G711/CMakeLists.txt (renamed from plugins/codecs/g711/CMakeLists.txt)6
-rw-r--r--plugins/codecs/G711/G711decode.c (renamed from plugins/codecs/g711/G711decode.c)12
-rw-r--r--plugins/codecs/G722/CMakeLists.txt (renamed from plugins/codecs/g722/CMakeLists.txt)6
-rw-r--r--plugins/codecs/G722/G722decode.c (renamed from plugins/codecs/g722/G722decode.c)0
-rw-r--r--plugins/codecs/G726/CMakeLists.txt (renamed from plugins/codecs/g726/CMakeLists.txt)6
-rw-r--r--plugins/codecs/G726/G726decode.c (renamed from plugins/codecs/g726/G726decode.c)0
-rw-r--r--plugins/codecs/G729/CMakeLists.txt (renamed from plugins/codecs/g729/CMakeLists.txt)6
-rw-r--r--plugins/codecs/G729/G729decode.c (renamed from plugins/codecs/g729/G729decode.c)8
-rw-r--r--plugins/codecs/amrnb/CMakeLists.txt6
-rw-r--r--plugins/codecs/iLBC/CMakeLists.txt (renamed from plugins/codecs/ilbc/CMakeLists.txt)6
-rw-r--r--plugins/codecs/iLBC/iLBCdecode.c (renamed from plugins/codecs/ilbc/iLBCdecode.c)2
-rw-r--r--plugins/codecs/l16_mono/CMakeLists.txt6
-rw-r--r--plugins/codecs/l16_mono/l16decode.c10
-rw-r--r--plugins/codecs/opus_dec/CMakeLists.txt6
-rw-r--r--plugins/codecs/sbc/CMakeLists.txt6
-rw-r--r--plugins/codecs/sbc/sbc.c8
-rw-r--r--plugins/epan/dfilter/ipaddr/CMakeLists.txt2
-rw-r--r--plugins/epan/dfilter/ipaddr/ipaddr.c105
-rw-r--r--plugins/epan/ethercat/CMakeLists.txt3
-rw-r--r--plugins/epan/ethercat/packet-ams.c222
-rw-r--r--plugins/epan/ethercat/packet-ams.h132
-rw-r--r--plugins/epan/ethercat/packet-ecatmb.c76
-rw-r--r--plugins/epan/ethercat/packet-ecatmb.h258
-rw-r--r--plugins/epan/ethercat/packet-esl.c108
-rw-r--r--plugins/epan/ethercat/packet-ethercat-datagram.c90
-rw-r--r--plugins/epan/ethercat/packet-ethercat-datagram.h14
-rw-r--r--plugins/epan/ethercat/packet-ethercat-frame.c4
-rw-r--r--plugins/epan/ethercat/packet-ethercat-frame.h8
-rw-r--r--plugins/epan/ethercat/packet-ioraw.c6
-rw-r--r--plugins/epan/ethercat/packet-ioraw.h2
-rw-r--r--plugins/epan/ethercat/packet-nv.c70
-rw-r--r--plugins/epan/ethercat/packet-nv.h16
-rw-r--r--plugins/epan/falco_bridge/CMakeLists.txt11
-rw-r--r--plugins/epan/falco_bridge/README.md2
-rw-r--r--plugins/epan/falco_bridge/packet-falco-bridge.c281
-rw-r--r--plugins/epan/falco_bridge/sinsp-span.cpp119
-rw-r--r--plugins/epan/gryphon/CMakeLists.txt3
-rw-r--r--plugins/epan/gryphon/packet-gryphon.c375
-rw-r--r--plugins/epan/gryphon/packet-gryphon.h10
-rw-r--r--plugins/epan/irda/CMakeLists.txt3
-rw-r--r--plugins/epan/irda/irda-appl.h16
-rw-r--r--plugins/epan/irda/packet-ircomm.c80
-rw-r--r--plugins/epan/irda/packet-irda.c262
-rw-r--r--plugins/epan/irda/packet-sir.c34
-rw-r--r--plugins/epan/mate/CMakeLists.txt3
-rw-r--r--plugins/epan/mate/examples/tcp.mate14
-rw-r--r--plugins/epan/mate/mate.h168
-rw-r--r--plugins/epan/mate/mate_grammar.lemon109
-rw-r--r--plugins/epan/mate/mate_parser.l18
-rw-r--r--plugins/epan/mate/mate_runtime.c169
-rw-r--r--plugins/epan/mate/mate_setup.c102
-rw-r--r--plugins/epan/mate/mate_util.c206
-rw-r--r--plugins/epan/mate/mate_util.h62
-rw-r--r--plugins/epan/mate/packet-mate.c62
-rw-r--r--plugins/epan/opcua/CMakeLists.txt3
-rw-r--r--plugins/epan/opcua/README4
-rw-r--r--plugins/epan/opcua/opcua.c112
-rw-r--r--plugins/epan/opcua/opcua_application_layer.c22
-rw-r--r--plugins/epan/opcua/opcua_application_layer.h4
-rw-r--r--plugins/epan/opcua/opcua_complextypeparser.c842
-rw-r--r--plugins/epan/opcua/opcua_complextypeparser.h840
-rw-r--r--plugins/epan/opcua/opcua_enumparser.c114
-rw-r--r--plugins/epan/opcua/opcua_enumparser.h114
-rw-r--r--plugins/epan/opcua/opcua_extensionobjecttable.c13
-rw-r--r--plugins/epan/opcua/opcua_identifiers.h10
-rw-r--r--plugins/epan/opcua/opcua_keyset.h4
-rw-r--r--plugins/epan/opcua/opcua_security_layer.c8
-rw-r--r--plugins/epan/opcua/opcua_security_layer.h8
-rw-r--r--plugins/epan/opcua/opcua_serviceparser.c502
-rw-r--r--plugins/epan/opcua/opcua_serviceparser.h498
-rw-r--r--plugins/epan/opcua/opcua_servicetable.c7
-rw-r--r--plugins/epan/opcua/opcua_servicetable.h2
-rw-r--r--plugins/epan/opcua/opcua_simpletypes.c275
-rw-r--r--plugins/epan/opcua/opcua_simpletypes.h120
-rw-r--r--plugins/epan/opcua/opcua_statuscode.c187
-rw-r--r--plugins/epan/opcua/opcua_transport_layer.c38
-rw-r--r--plugins/epan/opcua/opcua_transport_layer.h18
-rw-r--r--plugins/epan/pluginifdemo/CMakeLists.txt3
-rw-r--r--plugins/epan/pluginifdemo/pluginifdemo.c48
-rw-r--r--plugins/epan/profinet/CMakeLists.txt3
-rw-r--r--plugins/epan/profinet/packet-dcerpc-pn-io.c3273
-rw-r--r--plugins/epan/profinet/packet-dcom-cba-acco.c1077
-rw-r--r--plugins/epan/profinet/packet-dcom-cba-acco.h6
-rw-r--r--plugins/epan/profinet/packet-dcom-cba.c320
-rw-r--r--plugins/epan/profinet/packet-pn-dcp.c235
-rw-r--r--plugins/epan/profinet/packet-pn-mrp.c84
-rw-r--r--plugins/epan/profinet/packet-pn-mrrt.c31
-rw-r--r--plugins/epan/profinet/packet-pn-ptcp.c127
-rw-r--r--plugins/epan/profinet/packet-pn-rsi.c116
-rw-r--r--plugins/epan/profinet/packet-pn-rt.c222
-rw-r--r--plugins/epan/profinet/packet-pn-rtc-one.c168
-rw-r--r--plugins/epan/profinet/packet-pn.c68
-rw-r--r--plugins/epan/profinet/packet-pn.h130
-rw-r--r--plugins/epan/stats_tree/CMakeLists.txt3
-rw-r--r--plugins/epan/stats_tree/pinfo_stats_tree.c153
-rw-r--r--plugins/epan/transum/CMakeLists.txt3
-rw-r--r--plugins/epan/transum/decoders.c72
-rw-r--r--plugins/epan/transum/extractors.c14
-rw-r--r--plugins/epan/transum/extractors.h8
-rw-r--r--plugins/epan/transum/packet-transum.c80
-rw-r--r--plugins/epan/transum/packet-transum.h82
-rw-r--r--plugins/epan/transum/preferences.h20
-rw-r--r--plugins/epan/unistim/CMakeLists.txt3
-rw-r--r--plugins/epan/unistim/packet-unistim.c321
-rw-r--r--plugins/epan/unistim/packet-unistim.h28
-rw-r--r--plugins/epan/wimax/CMakeLists.txt3
-rw-r--r--plugins/epan/wimax/README.wimax2
-rw-r--r--plugins/epan/wimax/crc.c40
-rw-r--r--plugins/epan/wimax/crc.h11
-rw-r--r--plugins/epan/wimax/crc_data.c8
-rw-r--r--plugins/epan/wimax/mac_hd_generic_decoder.c320
-rw-r--r--plugins/epan/wimax/mac_hd_type1_decoder.c16
-rw-r--r--plugins/epan/wimax/mac_hd_type2_decoder.c18
-rw-r--r--plugins/epan/wimax/mac_mgmt_msg_decoder.c16
-rw-r--r--plugins/epan/wimax/msg_aas_beam.c40
-rw-r--r--plugins/epan/wimax/msg_aas_fbck.c20
-rw-r--r--plugins/epan/wimax/msg_arq.c84
-rw-r--r--plugins/epan/wimax/msg_clk_cmp.c24
-rw-r--r--plugins/epan/wimax/msg_dcd.c197
-rw-r--r--plugins/epan/wimax/msg_dlmap.c621
-rw-r--r--plugins/epan/wimax/msg_dreg.c89
-rw-r--r--plugins/epan/wimax/msg_dsa.c20
-rw-r--r--plugins/epan/wimax/msg_dsc.c20
-rw-r--r--plugins/epan/wimax/msg_dsd.c38
-rw-r--r--plugins/epan/wimax/msg_dsx_rvd.c12
-rw-r--r--plugins/epan/wimax/msg_fpc.c32
-rw-r--r--plugins/epan/wimax/msg_pkm.c16
-rw-r--r--plugins/epan/wimax/msg_pmc.c41
-rw-r--r--plugins/epan/wimax/msg_prc_lt_ctrl.c14
-rw-r--r--plugins/epan/wimax/msg_reg_req.c257
-rw-r--r--plugins/epan/wimax/msg_reg_rsp.c53
-rw-r--r--plugins/epan/wimax/msg_rep.c234
-rw-r--r--plugins/epan/wimax/msg_res_cmd.c16
-rw-r--r--plugins/epan/wimax/msg_rng_req.c103
-rw-r--r--plugins/epan/wimax/msg_rng_rsp.c155
-rw-r--r--plugins/epan/wimax/msg_sbc.c537
-rw-r--r--plugins/epan/wimax/msg_ucd.c243
-rw-r--r--plugins/epan/wimax/msg_ulmap.c493
-rw-r--r--plugins/epan/wimax/packet-m2m.c120
-rw-r--r--plugins/epan/wimax/packet-wmx.c74
-rw-r--r--plugins/epan/wimax/wimax_bits.h22
-rw-r--r--plugins/epan/wimax/wimax_cdma_code_decoder.c6
-rw-r--r--plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c389
-rw-r--r--plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h2
-rw-r--r--plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c399
-rw-r--r--plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h2
-rw-r--r--plugins/epan/wimax/wimax_fch_decoder.c8
-rw-r--r--plugins/epan/wimax/wimax_ffb_decoder.c26
-rw-r--r--plugins/epan/wimax/wimax_hack_decoder.c26
-rw-r--r--plugins/epan/wimax/wimax_harq_map_decoder.c38
-rw-r--r--plugins/epan/wimax/wimax_pdu_decoder.c38
-rw-r--r--plugins/epan/wimax/wimax_phy_attributes_decoder.c32
-rw-r--r--plugins/epan/wimax/wimax_prefs.h20
-rw-r--r--plugins/epan/wimax/wimax_tlv.c58
-rw-r--r--plugins/epan/wimax/wimax_tlv.h32
-rw-r--r--plugins/epan/wimax/wimax_utils.c653
-rw-r--r--plugins/epan/wimax/wimax_utils.h32
-rw-r--r--plugins/epan/wimaxasncp/CMakeLists.txt3
-rw-r--r--plugins/epan/wimaxasncp/packet-wimaxasncp.c276
-rw-r--r--plugins/epan/wimaxasncp/wimaxasncp_dict.h24
-rw-r--r--plugins/epan/wimaxasncp/wimaxasncp_dict.l72
-rw-r--r--plugins/epan/wimaxmacphy/CMakeLists.txt3
-rw-r--r--plugins/epan/wimaxmacphy/packet-wimaxmacphy.c234
-rw-r--r--plugins/wiretap/usbdump/CMakeLists.txt3
-rw-r--r--plugins/wiretap/usbdump/usbdump.c102
166 files changed, 10819 insertions, 9433 deletions
diff --git a/plugins/.clang-tidy b/plugins/.clang-tidy
new file mode 100644
index 0000000000..6be356e4de
--- /dev/null
+++ b/plugins/.clang-tidy
@@ -0,0 +1,3 @@
+InheritParentConfig: true
+
+WarningsAsErrors: misc-no-recursion
diff --git a/plugins/codecs/g711/CMakeLists.txt b/plugins/codecs/G711/CMakeLists.txt
index 44e3050069..cc9ff0f191 100644
--- a/plugins/codecs/g711/CMakeLists.txt
+++ b/plugins/codecs/G711/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "A-law G.711"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(g711)
+add_wireshark_plugin_library(g711 codecs)
target_include_directories(g711 PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/g711/G711decode.c b/plugins/codecs/G711/G711decode.c
index e15c407646..c1eae265e6 100644
--- a/plugins/codecs/g711/G711decode.c
+++ b/plugins/codecs/G711/G711decode.c
@@ -15,7 +15,7 @@
#include "wsutil/codecs.h"
#include "ws_attributes.h"
-static gint16 ulaw_exp_table[256] = {
+static int16_t ulaw_exp_table[256] = {
-32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,
-23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,
-15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412,
@@ -50,7 +50,7 @@ static gint16 ulaw_exp_table[256] = {
56, 48, 40, 32, 24, 16, 8, 0
};
-static gint16 alaw_exp_table[256] = {
+static int16_t alaw_exp_table[256] = {
-5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736,
-7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784,
-2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368,
@@ -116,8 +116,8 @@ codec_g711u_decode(codec_context_t *ctx _U_,
const void *inputBytes, size_t inputBytesSize,
void *outputSamples, size_t *outputSamplesSize)
{
- const guint8 *dataIn = (const guint8 *) inputBytes;
- gint16 *dataOut = (gint16 *) outputSamples;
+ const uint8_t *dataIn = (const uint8_t *) inputBytes;
+ int16_t *dataOut = (int16_t *) outputSamples;
size_t i;
if (!outputSamples || !outputSamplesSize) {
@@ -162,8 +162,8 @@ codec_g711a_decode(codec_context_t *ctx _U_,
const void *inputBytes, size_t inputBytesSize,
void *outputSamples, size_t *outputSamplesSize)
{
- const guint8 *dataIn = (const guint8 *) inputBytes;
- gint16 *dataOut = (gint16 *) outputSamples;
+ const uint8_t *dataIn = (const uint8_t *) inputBytes;
+ int16_t *dataOut = (int16_t *) outputSamples;
size_t i;
if (!outputSamples || !outputSamplesSize) {
diff --git a/plugins/codecs/g722/CMakeLists.txt b/plugins/codecs/G722/CMakeLists.txt
index 72033422d1..37c08cd12e 100644
--- a/plugins/codecs/g722/CMakeLists.txt
+++ b/plugins/codecs/G722/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "G.722"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(g722)
+add_wireshark_plugin_library(g722 codecs)
target_include_directories(g722 PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/g722/G722decode.c b/plugins/codecs/G722/G722decode.c
index 30c461070e..30c461070e 100644
--- a/plugins/codecs/g722/G722decode.c
+++ b/plugins/codecs/G722/G722decode.c
diff --git a/plugins/codecs/g726/CMakeLists.txt b/plugins/codecs/G726/CMakeLists.txt
index 0ad71f3029..239b67f0e5 100644
--- a/plugins/codecs/g726/CMakeLists.txt
+++ b/plugins/codecs/G726/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "G.726"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(g726)
+add_wireshark_plugin_library(g726 codecs)
target_include_directories(g726 PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/g726/G726decode.c b/plugins/codecs/G726/G726decode.c
index 929652511e..929652511e 100644
--- a/plugins/codecs/g726/G726decode.c
+++ b/plugins/codecs/G726/G726decode.c
diff --git a/plugins/codecs/g729/CMakeLists.txt b/plugins/codecs/G729/CMakeLists.txt
index 4f07a6f5ab..6c5330021f 100644
--- a/plugins/codecs/g729/CMakeLists.txt
+++ b/plugins/codecs/G729/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "G.729"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(g729)
+add_wireshark_plugin_library(g729 codecs)
target_include_directories(g729 PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/g729/G729decode.c b/plugins/codecs/G729/G729decode.c
index 7bb564e613..fc65faba6c 100644
--- a/plugins/codecs/g729/G729decode.c
+++ b/plugins/codecs/G729/G729decode.c
@@ -48,8 +48,8 @@ codec_g729_decode(codec_context_t *ctx,
void *outputSamples, size_t *outputSamplesSize)
{
bcg729DecoderChannelContextStruct *state = (bcg729DecoderChannelContextStruct *)ctx->priv;
- const guint8 *dataIn = (const guint8 *) inputBytes;
- gint16 *dataOut = (gint16 *) outputSamples;
+ const uint8_t *dataIn = (const uint8_t *) inputBytes;
+ int16_t *dataOut = (int16_t *) outputSamples;
size_t i;
if (!ctx) {
@@ -78,11 +78,11 @@ codec_g729_decode(codec_context_t *ctx,
fixed to accept a const pointer.) Cast away the problem for now;
in the future we could check the version of the library.
*/
- bcg729Decoder(state, (guint8 *)dataIn + i*10, 10, 0, 0, 0, dataOut + i*80);
+ bcg729Decoder(state, (uint8_t *)dataIn + i*10, 10, 0, 0, 0, dataOut + i*80);
}
for (; i < full_frames + sid_frames; i++) {
- bcg729Decoder(state, (guint8 *)dataIn + full_frames*10 + (i - full_frames)*2, 2, 0, 1, 0, dataOut + i*80);
+ bcg729Decoder(state, (uint8_t *)dataIn + full_frames*10 + (i - full_frames)*2, 2, 0, 1, 0, dataOut + i*80);
}
*outputSamplesSize = 80*2*(full_frames + sid_frames);
return *outputSamplesSize;
diff --git a/plugins/codecs/amrnb/CMakeLists.txt b/plugins/codecs/amrnb/CMakeLists.txt
index ccdffe5acc..b49314689e 100644
--- a/plugins/codecs/amrnb/CMakeLists.txt
+++ b/plugins/codecs/amrnb/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "OpenCORE Adaptive Multi Rate (AMR)"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(amrnb)
+add_wireshark_plugin_library(amrnb codecs)
target_include_directories(amrnb PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/ilbc/CMakeLists.txt b/plugins/codecs/iLBC/CMakeLists.txt
index 0b6f41ff31..8929204301 100644
--- a/plugins/codecs/ilbc/CMakeLists.txt
+++ b/plugins/codecs/iLBC/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "Internet Low Bitrate Codec (iLBC)"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(ilbc)
+add_wireshark_plugin_library(ilbc codecs)
target_include_directories(ilbc PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/ilbc/iLBCdecode.c b/plugins/codecs/iLBC/iLBCdecode.c
index d127f1608d..f551e2e561 100644
--- a/plugins/codecs/ilbc/iLBCdecode.c
+++ b/plugins/codecs/iLBC/iLBCdecode.c
@@ -30,7 +30,7 @@ typedef struct {
#else
iLBC_decinst_t *ilbc_ctx; /* Real iLBC context */
#endif
- guint8 payload_len; /* Remember last payload_len */
+ uint8_t payload_len; /* Remember last payload_len */
} ilbc_ctx_t;
void codec_register_iLBC(void);
diff --git a/plugins/codecs/l16_mono/CMakeLists.txt b/plugins/codecs/l16_mono/CMakeLists.txt
index 686bf9bdf5..f90713b70b 100644
--- a/plugins/codecs/l16_mono/CMakeLists.txt
+++ b/plugins/codecs/l16_mono/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "16-bit audio, mono"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(l16mono)
+add_wireshark_plugin_library(l16mono codecs)
target_include_directories(l16mono PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/l16_mono/l16decode.c b/plugins/codecs/l16_mono/l16decode.c
index 12994cfc7d..6ef292f44c 100644
--- a/plugins/codecs/l16_mono/l16decode.c
+++ b/plugins/codecs/l16_mono/l16decode.c
@@ -70,8 +70,8 @@ codec_l16_decode(codec_context_t *ctx _U_,
const void *inputBytes, size_t inputBytesSize,
void *outputSamples, size_t *outputSamplesSize)
{
- const guint16 *dataIn = (const guint16 *)inputBytes;
- guint16 *dataOut = (gint16 *)outputSamples;
+ const uint16_t *dataIn = (const uint16_t *)inputBytes;
+ uint16_t *dataOut = (int16_t *)outputSamples;
size_t i;
unsigned channels = ctx->channels ? ctx->channels : 1;
if (!outputSamples || !outputSamplesSize)
@@ -82,11 +82,11 @@ codec_l16_decode(codec_context_t *ctx _U_,
/* Downmix to mono. No worries about overflow because tmp is 32 bit. */
for (i=0; i<inputBytesSize/(2 * channels); i++)
{
- gint32 tmp = 0;
+ int32_t tmp = 0;
for (unsigned j=0; j < channels; j++) {
- tmp += (gint16)g_ntohs(dataIn[channels*i + j]);
+ tmp += (int16_t)g_ntohs(dataIn[channels*i + j]);
}
- dataOut[i] = (gint16)(tmp / channels);
+ dataOut[i] = (int16_t)(tmp / channels);
}
*outputSamplesSize = inputBytesSize/channels;
diff --git a/plugins/codecs/opus_dec/CMakeLists.txt b/plugins/codecs/opus_dec/CMakeLists.txt
index 4ec19fc125..dc3bdc2180 100644
--- a/plugins/codecs/opus_dec/CMakeLists.txt
+++ b/plugins/codecs/opus_dec/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "Opus audio"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(opus_dec)
+add_wireshark_plugin_library(opus_dec codecs)
target_include_directories(opus_dec PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/sbc/CMakeLists.txt b/plugins/codecs/sbc/CMakeLists.txt
index f1ff7ae530..d12de70d59 100644
--- a/plugins/codecs/sbc/CMakeLists.txt
+++ b/plugins/codecs/sbc/CMakeLists.txt
@@ -27,12 +27,12 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-register_codec_files(plugin.c 1
- "Bluetooth SBC"
+register_plugin_files(plugin.c
+ plugin_codec
${CODEC_SRC}
)
-add_wireshark_codec_plugin_library(sbc)
+add_wireshark_plugin_library(sbc codecs)
target_include_directories(sbc PRIVATE ${CMAKE_SOURCE_DIR}/codecs)
diff --git a/plugins/codecs/sbc/sbc.c b/plugins/codecs/sbc/sbc.c
index 5ac31b9411..79f5b11f96 100644
--- a/plugins/codecs/sbc/sbc.c
+++ b/plugins/codecs/sbc/sbc.c
@@ -90,11 +90,11 @@ codec_sbc_decode(codec_context_t *ctx,
size_t len;
size_t framelen;
size_t xframe_pos = 0;
- const guint8 *data_in = (const guint8 *) input;
- guint8 *data_out = (guint8 *) output;
+ const uint8_t *data_in = (const uint8_t *) input;
+ uint8_t *data_out = (uint8_t *) output;
sbc_t *sbc = (sbc_t *) ctx->priv;
- guint8 *i_data;
- guint8 tmp;
+ uint8_t *i_data;
+ uint8_t tmp;
if (!output || !outputSizeBytes) {
return size_out;
diff --git a/plugins/epan/dfilter/ipaddr/CMakeLists.txt b/plugins/epan/dfilter/ipaddr/CMakeLists.txt
index f140b5aefc..967ef95c39 100644
--- a/plugins/epan/dfilter/ipaddr/CMakeLists.txt
+++ b/plugins/epan/dfilter/ipaddr/CMakeLists.txt
@@ -26,7 +26,7 @@ set_source_files_properties(
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
-add_wireshark_epan_plugin_library(ipaddr)
+add_wireshark_plugin_library(ipaddr epan)
target_link_libraries(ipaddr epan)
diff --git a/plugins/epan/dfilter/ipaddr/ipaddr.c b/plugins/epan/dfilter/ipaddr/ipaddr.c
index 53b7abc54b..b6e58c271d 100644
--- a/plugins/epan/dfilter/ipaddr/ipaddr.c
+++ b/plugins/epan/dfilter/ipaddr/ipaddr.c
@@ -14,11 +14,19 @@
#include <wsutil/plugins.h>
#include <epan/dfilter/dfilter-plugin.h>
#include <epan/iana-ip.h>
+#include <epan/exceptions.h>
#ifndef PLUGIN_VERSION
#define PLUGIN_VERSION "0.0.0"
#endif
+WS_DLL_PUBLIC_DEF const char plugin_version[] = PLUGIN_VERSION;
+WS_DLL_PUBLIC_DEF const int plugin_want_major = WIRESHARK_VERSION_MAJOR;
+WS_DLL_PUBLIC_DEF const int plugin_want_minor = WIRESHARK_VERSION_MINOR;
+
+WS_DLL_PUBLIC void plugin_register(void);
+WS_DLL_PUBLIC uint32_t plugin_describe(void);
+
typedef bool (*ip_is_func_t)(fvalue_t *);
static const struct ws_iana_ip_special_block *
@@ -227,20 +235,64 @@ print_which(int which)
}
static void
-check_ip_field(dfwork_t *dfw, const char *func_name, ftenum_t logical_ftype,
+check_ip_field(dfwork_t *dfw, const char *func_name, ftenum_t logical_ftype _U_,
GSList *param_list, df_loc_t func_loc, int which)
{
ws_assert(g_slist_length(param_list) == 1);
stnode_t *param = param_list->data;
- ftenum_t ftype;
+ volatile ftenum_t ftype;
+ volatile bool failed = false;
- if (stnode_type_id(param) == STTYPE_FIELD) {
- ftype = df_semcheck_param(dfw, func_name, logical_ftype, param, func_loc);
- if (check_which(ftype, which)) {
- return;
- }
+ /* logical_ftype as passed in is the return_ftype of the function.
+ * We want to coerce the parameters to IP addresses, if necessary.
+ */
+ switch (which) {
+ case IPv4:
+ ftype = df_semcheck_param(dfw, func_name, FT_IPv4, param, func_loc);
+ break;
+ case IPv6:
+ ftype = df_semcheck_param(dfw, func_name, FT_IPv6, param, func_loc);
+ break;
+ case Both:
+ /* df_semcheck_param only coerces literals and strings to one
+ * type, and throws a TypeError on failure. We need to test both.
+ */
+ TRY {
+ ftype = df_semcheck_param(dfw, func_name, FT_IPv4, param, func_loc);
+ } CATCH(TypeError) {
+ failed = true;
+ }
+ ENDTRY;
+ /* We can't nest TRY blocks due to variable shadowing */
+ if (failed) {
+ df_error_free(&dfw->error);
+ TRY {
+ ftype = df_semcheck_param(dfw, func_name, FT_IPv6, param, func_loc);
+ }
+ CATCH(TypeError) {
+ /* Replace the error message with one that mentions that
+ * both IPv4 and IPv6 are supported. We cannot THROW here,
+ * only RETHROW, so do not use dfunc_fail.
+ * XXX - The messages in ftype-ipv[46].c are cleverer in
+ * that they check for CIDR/prefix and only add the part
+ * up to but not including the first slash. We could do
+ * that here.
+ */
+ df_error_free(&dfw->error);
+ dfilter_fail(dfw, DF_ERROR_GENERIC, stnode_location(param), "\"%s\" is not a valid hostname or %s address.", stnode_todisplay(param), print_which(which));
+ RETHROW;
+ }
+ ENDTRY;
+ }
+ break;
+ default:
+ ws_assert_not_reached();
+ break;
+ }
+ if (check_which(ftype, which)) {
+ return;
}
- dfunc_fail(dfw, param, "Only %s fields can be used as parameter for %s()",
+ dfunc_fail(dfw, param, "Only %s fields can be used as a parameter for %s()",
print_which(which), func_name);
}
@@ -268,6 +320,22 @@ semcheck_is_ip_field(dfwork_t *dfw, const char *func_name, ftenum_t logical_ftyp
return FT_BOOLEAN;
}
+static ftenum_t
+semcheck_is_ipv4_field(dfwork_t *dfw, const char *func_name, ftenum_t logical_ftype,
+ GSList *param_list, df_loc_t func_loc)
+{
+ check_ip_field(dfw, func_name, logical_ftype, param_list, func_loc, IPv4);
+ return FT_BOOLEAN;
+}
+
+static ftenum_t
+semcheck_is_ipv6_field(dfwork_t *dfw, const char *func_name, ftenum_t logical_ftype,
+ GSList *param_list, df_loc_t func_loc)
+{
+ check_ip_field(dfw, func_name, logical_ftype, param_list, func_loc, IPv6);
+ return FT_BOOLEAN;
+}
+
static df_func_def_t func_ip_special_name = {
"ip_special_name",
df_func_ip_special_name,
@@ -305,7 +373,7 @@ static df_func_def_t func_ip_is_rfc1918 = {
df_func_ip_is_rfc1918,
1, 1,
FT_BOOLEAN,
- semcheck_is_ip_field,
+ semcheck_is_ipv4_field,
};
static df_func_def_t func_ip_is_ula = {
@@ -313,7 +381,7 @@ static df_func_def_t func_ip_is_ula = {
df_func_ip_is_ula,
1, 1,
FT_BOOLEAN,
- semcheck_is_ip_field,
+ semcheck_is_ipv6_field,
};
static void
@@ -338,7 +406,7 @@ cleanup(void)
df_func_deregister(&func_ip_is_ula);
}
-static void
+void
plugin_register(void)
{
static dfilter_plugin plug;
@@ -348,13 +416,8 @@ plugin_register(void)
dfilter_plugins_register(&plug);
}
-static struct ws_module module = {
- .flags = WS_PLUGIN_DESC_DFUNCTION,
- .version = PLUGIN_VERSION,
- .spdx_id = WS_PLUGIN_SPDX_GPLv2,
- .home_url = WS_PLUGIN_GITLAB_URL,
- .blurb = "Display filter functions to test IP addresses",
- .register_cb = &plugin_register,
-};
-
-WIRESHARK_PLUGIN_REGISTER_EPAN(&module, 0)
+uint32_t
+plugin_describe(void)
+{
+ return WS_PLUGIN_DESC_DFILTER;
+}
diff --git a/plugins/epan/ethercat/CMakeLists.txt b/plugins/epan/ethercat/CMakeLists.txt
index 3c38643733..afa46e8272 100644
--- a/plugins/epan/ethercat/CMakeLists.txt
+++ b/plugins/epan/ethercat/CMakeLists.txt
@@ -35,11 +35,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "EtherCAT (Ethernet for Control Automation Technology) dissection"
${DISSECTOR_SRC}
)
-add_wireshark_epan_plugin_library(ethercat)
+add_wireshark_plugin_library(ethercat epan)
target_link_libraries(ethercat epan)
diff --git a/plugins/epan/ethercat/packet-ams.c b/plugins/epan/ethercat/packet-ams.c
index 4372648b62..4c0aa8f7ab 100644
--- a/plugins/epan/ethercat/packet-ams.c
+++ b/plugins/epan/ethercat/packet-ams.c
@@ -15,6 +15,8 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "packet-ams.h"
@@ -372,28 +374,28 @@ static const value_string AMS_CommandId_vals[] =
};
-static void NetIdFormater(tvbuff_t *tvb, guint offset, char *szText, gint nMax)
+static void NetIdFormater(tvbuff_t *tvb, unsigned offset, char *szText, int nMax)
{
- snprintf ( szText, nMax, "%d.%d.%d.%d.%d.%d", tvb_get_guint8(tvb, offset),
- tvb_get_guint8(tvb, offset+1),
- tvb_get_guint8(tvb, offset+2),
- tvb_get_guint8(tvb, offset+3),
- tvb_get_guint8(tvb, offset+4),
- tvb_get_guint8(tvb, offset+5)
+ snprintf ( szText, nMax, "%d.%d.%d.%d.%d.%d", tvb_get_uint8(tvb, offset),
+ tvb_get_uint8(tvb, offset+1),
+ tvb_get_uint8(tvb, offset+2),
+ tvb_get_uint8(tvb, offset+3),
+ tvb_get_uint8(tvb, offset+4),
+ tvb_get_uint8(tvb, offset+5)
);
}
/*ams*/
-static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset)
+static int dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
proto_item *ti, *anItem;
proto_tree *ams_tree = NULL, *ams_adstree, *ams_statetree;
- guint ams_length = tvb_reported_length(tvb);
- guint16 stateflags = 0;
- guint16 cmdId = 0;
- guint32 cbdata = 0;
+ unsigned ams_length = tvb_reported_length(tvb);
+ uint16_t stateflags = 0;
+ uint16_t cmdId = 0;
+ uint32_t cbdata = 0;
char szText[200];
int nMax = sizeof(szText)-1;
@@ -414,43 +416,43 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_string(ams_tree, hf_ams_targetnetid, tvb, offset, AmsNetId_Len, szText);
offset += AmsNetId_Len;
- proto_tree_add_item(ams_tree, hf_ams_targetport, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- offset += (int)sizeof(guint16);
+ proto_tree_add_item(ams_tree, hf_ams_targetport, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ offset += (int)sizeof(uint16_t);
NetIdFormater(tvb, offset, szText, nMax);
proto_tree_add_string(ams_tree, hf_ams_sendernetid, tvb, offset, AmsNetId_Len, szText);
offset += AmsNetId_Len;
- proto_tree_add_item(ams_tree, hf_ams_senderport, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- offset += (int)sizeof(guint16);
+ proto_tree_add_item(ams_tree, hf_ams_senderport, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ offset += (int)sizeof(uint16_t);
- proto_tree_add_item(ams_tree, hf_ams_cmdid, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_tree, hf_ams_cmdid, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
cmdId = tvb_get_letohs(tvb, offset);
- offset+=(int)sizeof(guint16);
+ offset+=(int)sizeof(uint16_t);
- anItem = proto_tree_add_item(ams_tree, hf_ams_stateflags, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
+ anItem = proto_tree_add_item(ams_tree, hf_ams_stateflags, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
ams_statetree = proto_item_add_subtree(anItem, ett_ams_stateflags);
- proto_tree_add_item(ams_statetree, hf_ams_stateresponse,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_statetree, hf_ams_statenoreturn,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_statetree, hf_ams_stateadscmd,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_statetree, hf_ams_statesyscmd,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_statetree, hf_ams_statehighprio,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_statetree, hf_ams_statetimestampadded,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_statetree, hf_ams_stateudp,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_statetree, hf_ams_stateinitcmd,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_statetree, hf_ams_statebroadcast,tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_stateresponse,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_statenoreturn,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_stateadscmd,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_statesyscmd,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_statehighprio,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_statetimestampadded,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_stateudp,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_stateinitcmd,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_statetree, hf_ams_statebroadcast,tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
stateflags = tvb_get_letohs(tvb, offset);
- offset+=(int)sizeof(guint16);
+ offset+=(int)sizeof(uint16_t);
- proto_tree_add_item(ams_tree, hf_ams_cbdata, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_tree, hf_ams_cbdata, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
cbdata = tvb_get_letohl(tvb,offset);
- offset+=(int)sizeof(guint32);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_tree, hf_ams_errorcode, tvb, offset, (int)sizeof(guint32),ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_tree, hf_ams_errorcode, tvb, offset, (int)sizeof(uint32_t),ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_tree, hf_ams_invokeid, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_tree, hf_ams_invokeid, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
}
else
{
@@ -475,14 +477,14 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsReadReq_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsreadrequest);
- proto_tree_add_item(ams_adstree, hf_ams_adsindexgroup, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsindexgroup, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsindexoffset, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsindexoffset, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
}
}
}
@@ -494,17 +496,17 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( tree )
{
anItem = proto_tree_add_item(ams_tree, hf_ams_adswriterequest, tvb, offset, ams_length-offset, ENC_NA);
- if( ams_length-offset >= TAdsWriteReq_Len - (int)sizeof(guint16) )
+ if( ams_length-offset >= TAdsWriteReq_Len - (int)sizeof(uint16_t) )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adswriterequest);
proto_tree_add_item(ams_adstree, hf_ams_adsindexgroup, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ offset+=(int)sizeof(uint32_t);
proto_tree_add_item(ams_adstree, hf_ams_adsindexoffset, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ offset+=(int)sizeof(uint32_t);
proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, 4, ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ offset+=(int)sizeof(uint32_t);
proto_tree_add_item(ams_adstree, hf_ams_adsdata, tvb, offset, ams_length-offset, ENC_NA);
}
@@ -518,20 +520,20 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( tree )
{
anItem = proto_tree_add_item(ams_tree, hf_ams_adsreadwriterequest, tvb, offset, ams_length-offset, ENC_NA);
- if( ams_length-offset >= TAdsReadWriteReq_Len - (int)sizeof(guint16))
+ if( ams_length-offset >= TAdsReadWriteReq_Len - (int)sizeof(uint16_t))
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsreadwriterequest);
- proto_tree_add_item(ams_adstree, hf_ams_adsindexgroup, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsindexgroup, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsindexoffset, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsindexoffset, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adscbreadlength, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adscbreadlength, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adscbwritelength, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adscbwritelength, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
proto_tree_add_item(ams_adstree, hf_ams_adsdata, tvb, offset, ams_length-offset, ENC_NA);
}
@@ -548,7 +550,7 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsReadStateReq_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsreadstaterequest);
- proto_tree_add_item(ams_adstree, hf_ams_adsinvokeid, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsinvokeid, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
}
}
}
@@ -560,17 +562,17 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( tree )
{
anItem = proto_tree_add_item(ams_tree, hf_ams_adswritectrlrequest, tvb, offset, ams_length-offset, ENC_NA);
- if( ams_length-offset >= TAdsWriteControlReq_Len - (int)sizeof(guint16) )
+ if( ams_length-offset >= TAdsWriteControlReq_Len - (int)sizeof(uint16_t) )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adswritectrlrequest);
proto_tree_add_item(ams_adstree, hf_ams_adsstate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint16);
+ offset+=(int)sizeof(uint16_t);
proto_tree_add_item(ams_adstree, hf_ams_adsdevicestate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint16);
+ offset+=(int)sizeof(uint16_t);
- proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
proto_tree_add_item(ams_adstree, hf_ams_adsdata, tvb, offset, ams_length-offset, ENC_NA);
}
@@ -587,7 +589,7 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsReadDeviceInfoReq_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsreaddinforequest);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
}
}
}
@@ -602,23 +604,23 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsAddDeviceNotificationReq_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsadddnrequest);
- proto_tree_add_item(ams_adstree, hf_ams_adsindexgroup, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsindexgroup, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsindexoffset, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsindexoffset, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adstransmode, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adstransmode, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsmaxdelay, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsmaxdelay, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adscycletime, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adscycletime, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
}
}
}
@@ -633,7 +635,7 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsDelDeviceNotificationReq_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsdeldnrequest);
- proto_tree_add_item(ams_adstree, hf_ams_adsnotificationhandle, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsnotificationhandle, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
}
}
}
@@ -644,20 +646,20 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( tree )
{
- /*guint32 cbLength;
- guint32 nStamps;*/
+ /*uint32_t cbLength;
+ uint32_t nStamps;*/
anItem = proto_tree_add_item(ams_tree, hf_ams_adsdnrequest, tvb, offset, ams_length-offset, ENC_NA);
if( ams_length-offset >= TAdsDeviceNotificationReq_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsdnrequest);
- proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
/*cbLength = tvb_get_letohs(tvb, offset);*/
- offset+=(int)sizeof(guint32);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsnoteblocksstamps, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsnoteblocksstamps, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
/*nStamps = tvb_get_letohs(tvb, offset);*/
- offset+=(int)sizeof(guint32);
+ offset+=(int)sizeof(uint32_t);
/*ToDo: dissect noteblocks*/
}
@@ -678,14 +680,14 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( tree )
{
anItem = proto_tree_add_item(ams_tree, hf_ams_adsreadresponse, tvb, offset, ams_length-offset, ENC_NA);
- if( ams_length-offset >= TAdsReadRes_Len - (int)sizeof(guint16) )
+ if( ams_length-offset >= TAdsReadRes_Len - (int)sizeof(uint16_t) )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsreadresponse);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
proto_tree_add_item(ams_adstree, hf_ams_adsdata, tvb, offset, ams_length-offset, ENC_NA);
}
@@ -702,7 +704,7 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsWriteRes_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adswriteresponse);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
}
}
}
@@ -714,14 +716,14 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( tree )
{
anItem = proto_tree_add_item(ams_tree, hf_ams_adsreadwriteresponse, tvb, offset, ams_length-offset, ENC_NA);
- if( ams_length-offset >= TAdsReadWriteRes_Len - (int)sizeof(guint16) )
+ if( ams_length-offset >= TAdsReadWriteRes_Len - (int)sizeof(uint16_t) )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsreadwriteresponse);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adscblength, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
proto_tree_add_item(ams_adstree, hf_ams_adsdata, tvb, offset, ams_length-offset, ENC_NA);
}
@@ -738,13 +740,13 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsReadStateRes_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsreadstateresponse);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsstate, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint16);
+ proto_tree_add_item(ams_adstree, hf_ams_adsstate, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint16_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsdevicestate, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsdevicestate, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
}
}
}
@@ -759,7 +761,7 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsWriteControlRes_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adswritectrlresponse);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
}
}
}
@@ -774,13 +776,13 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsReadDeviceInfoRes_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsreaddinforesponse);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsversionversion, tvb, offset++, (int)sizeof(guint8), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_adstree, hf_ams_adsversionrevision, tvb, offset++, (int)sizeof(guint8), ENC_LITTLE_ENDIAN);
- proto_tree_add_item(ams_adstree, hf_ams_adsversionbuild, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint16);
+ proto_tree_add_item(ams_adstree, hf_ams_adsversionversion, tvb, offset++, (int)sizeof(uint8_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsversionrevision, tvb, offset++, (int)sizeof(uint8_t), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsversionbuild, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint16_t);
proto_tree_add_item(ams_adstree, hf_ams_adsdevicename, tvb, offset, ams_length-offset, ENC_ASCII|ENC_NA);
}
@@ -797,10 +799,10 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsAddDeviceNotificationRes_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsadddnresponse);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint32);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint32_t);
- proto_tree_add_item(ams_adstree, hf_ams_adsnotificationhandle, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsnotificationhandle, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
}
}
}
@@ -815,7 +817,7 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if( ams_length-offset >= TAdsDelDeviceNotificationRes_Len )
{
ams_adstree = proto_item_add_subtree(anItem, ett_ams_adsdeldnresponse);
- proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(guint32), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(ams_adstree, hf_ams_adsresult, tvb, offset, (int)sizeof(uint32_t), ENC_LITTLE_ENDIAN);
}
}
}
@@ -836,12 +838,12 @@ static gint dissect_ams_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
/*ams*/
-static gint dissect_ams(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+static int dissect_ams(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
return dissect_ams_pdu(tvb, pinfo, tree, 0);
}
-static gint dissect_amstcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+static int dissect_amstcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
if( TcpAdsParserHDR_Len > tvb_reported_length(tvb))
return 0;
@@ -1192,7 +1194,7 @@ void proto_register_ams(void)
#endif
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_ams,
&ett_ams_stateflags,
diff --git a/plugins/epan/ethercat/packet-ams.h b/plugins/epan/ethercat/packet-ams.h
index 199e1028af..006fc54812 100644
--- a/plugins/epan/ethercat/packet-ams.h
+++ b/plugins/epan/ethercat/packet-ams.h
@@ -659,29 +659,29 @@ typedef enum
typedef struct AmsNetId_
{
- guint8 b[6];
+ uint8_t b[6];
} AmsNetId;
#define AmsNetId_Len (int)sizeof(AmsNetId)
typedef struct AmsAddr_
{
AmsNetId netId;
- guint16 port;
+ uint16_t port;
} AmsAddr;
typedef union ErrCodeUnion
{
- gint32 errCode;
- gint32 hRcv;
+ int32_t errCode;
+ int32_t hRcv;
} ErrCodeUnion;
typedef union tUserUnion
{
- gint32 hUser;
+ int32_t hUser;
struct
{
- guint16 fragmentNo;
- guint16 packetNo;
+ uint16_t fragmentNo;
+ uint16_t packetNo;
} a;
} UserUnion;
@@ -689,9 +689,9 @@ typedef struct
{
AmsAddr target;
AmsAddr sender;
- guint16 cmdId;
- guint16 stateFlags;
- guint32 cbData;
+ uint16_t cmdId;
+ uint16_t stateFlags;
+ uint32_t cbData;
ErrCodeUnion anErrCodeUnion;
UserUnion aUserUnion;
@@ -780,9 +780,9 @@ typedef struct
#define ADSIGRP_SUMUP_READ 0xF080
#define ADSIGRP_SUMUP_WRITE 0xF081
-#define ADS_SUMUP_IGRP(p, i) (((guint32*)p)[(i)*3+0])
-#define ADS_SUMUP_IOFFS(p, i) (((guint32*)p)[(i)*3+1])
-#define ADS_SUMUP_LENGTH(p, i) (((guint32*)p)[(i)*3+2])
+#define ADS_SUMUP_IGRP(p, i) (((uint32_t*)p)[(i)*3+0])
+#define ADS_SUMUP_IOFFS(p, i) (((uint32_t*)p)[(i)*3+1])
+#define ADS_SUMUP_LENGTH(p, i) (((uint32_t*)p)[(i)*3+2])
#define ADSIGRP_DEVICE_DATA 0xF100
#define ADSIOFFS_DEVDATA_ADSSTATE 0x0000
@@ -968,109 +968,109 @@ typedef enum nAdsTransMode
/* ADS AMS command */
/*typedef struct
{
- guint32 hNotification;
- guint32 cbSampleSize;
- guint8 data[ANYSIZE_ARRAY];
+ uint32_t hNotification;
+ uint32_t cbSampleSize;
+ uint8_t data[ANYSIZE_ARRAY];
} AdsNotificationSample, *PAdsNotificationSample;*/
#define AdsNotificationSample_Min_Len 4
typedef struct
{
- guint32 invokeId;
+ uint32_t invokeId;
} TAdsReadDeviceInfoReq;
#define TAdsReadDeviceInfoReq_Len (int)sizeof(TAdsReadDeviceInfoReq)
/*typedef struct
{
- guint16 adsState;
- guint16 deviceState;
- guint32 cbLength;
- guint16 firstDataWord;
+ uint16_t adsState;
+ uint16_t deviceState;
+ uint32_t cbLength;
+ uint16_t firstDataWord;
} TAdsWriteControlReq, TAdsWriteControlInd;*/
#define TAdsWriteControlReq_Len 10
typedef struct
{
- guint32 invokeId;
+ uint32_t invokeId;
} TAdsReadStateReq;
#define TAdsReadStateReq_Len (int)sizeof(TAdsReadStateReq)
typedef struct
{
- guint32 indexGroup;
- guint32 indexOffset;
- guint32 cbLength;
+ uint32_t indexGroup;
+ uint32_t indexOffset;
+ uint32_t cbLength;
} TAdsReadReq;
#define TAdsReadReq_Len (int)sizeof(TAdsReadReq)
/*typedef struct
{
- guint32 indexGroup;
- guint32 indexOffset;
- guint32 cbLength;
- guint16 firstDataWord;
+ uint32_t indexGroup;
+ uint32_t indexOffset;
+ uint32_t cbLength;
+ uint16_t firstDataWord;
} TAdsWriteReq;*/
#define TAdsWriteReq_Len 14
/*
typedef struct
{
- guint32 indexGroup;
- guint32 indexOffset;
- guint32 cbReadLength;
- guint32 cbWriteLength;
- guint16 firstDataWord;
+ uint32_t indexGroup;
+ uint32_t indexOffset;
+ uint32_t cbReadLength;
+ uint32_t cbWriteLength;
+ uint16_t firstDataWord;
} TAdsReadWriteReq;*/
#define TAdsReadWriteReq_Len 18
typedef struct
{
- guint32 cbLength;
- guint32 nTransMode;
- guint32 nMaxDelay;
- guint32 nCycleTime;
- guint8 nCmpMax[sizeof(double)];
- guint8 nCmpMin[sizeof(double)];
+ uint32_t cbLength;
+ uint32_t nTransMode;
+ uint32_t nMaxDelay;
+ uint32_t nCycleTime;
+ uint8_t nCmpMax[sizeof(double)];
+ uint8_t nCmpMin[sizeof(double)];
} AdsNotificationAttrib;
typedef struct
{
- guint32 indexGroup;
- guint32 indexOffset;
+ uint32_t indexGroup;
+ uint32_t indexOffset;
AdsNotificationAttrib noteAttrib;
} TAdsAddDeviceNotificationReq;
#define TAdsAddDeviceNotificationReq_Len (int)sizeof(TAdsAddDeviceNotificationReq)
typedef struct
{
- guint32 hNotification;
+ uint32_t hNotification;
} TAdsDelDeviceNotificationReq;
#define TAdsDelDeviceNotificationReq_Len (int)sizeof(TAdsDelDeviceNotificationReq)
typedef struct
{
- guint32 cbLength;
- guint32 nStamps;
+ uint32_t cbLength;
+ uint32_t nStamps;
} TAdsDeviceNotificationReq;
#define TAdsDeviceNotificationReq_Len (int)sizeof(TAdsDeviceNotificationReq)
typedef struct
{
- guint32 result;
+ uint32_t result;
} TAdsRes;
#define TAdsRes_Len (int)sizeof(TAdsRes)
typedef struct
{
- guint8 version;
- guint8 revision;
- guint16 build;
+ uint8_t version;
+ uint8_t revision;
+ uint16_t build;
} AdsVersion, *PAdsVersion;
typedef struct
{
- guint32 result;
+ uint32_t result;
AdsVersion version;
char sName[ADS_FIXEDNAMESIZE];
} TAdsReadDeviceInfoRes;
@@ -1078,50 +1078,50 @@ typedef struct
typedef struct
{
- guint32 result;
+ uint32_t result;
} TAdsWriteControlRes;
#define TAdsWriteControlRes_Len (int)sizeof(TAdsWriteControlRes)
typedef struct
{
- guint32 result;
- guint16 adsState;
- guint16 deviceState;
+ uint32_t result;
+ uint16_t adsState;
+ uint16_t deviceState;
} TAdsReadStateRes;
#define TAdsReadStateRes_Len (int)sizeof(TAdsReadStateRes)
typedef struct
{
- guint32 result;
- guint32 cbLength;
- guint16 firstDataWord;
+ uint32_t result;
+ uint32_t cbLength;
+ uint16_t firstDataWord;
} TAdsReadRes;
#define TAdsReadRes_Len (int)sizeof(TAdsReadRes)
typedef struct
{
- guint32 result;
- guint32 cbLength;
- guint16 firstDataWord;
+ uint32_t result;
+ uint32_t cbLength;
+ uint16_t firstDataWord;
} TAdsReadWriteRes;
#define TAdsReadWriteRes_Len (int)sizeof(TAdsReadWriteRes)
typedef struct
{
- guint32 result;
+ uint32_t result;
} TAdsWriteRes;
#define TAdsWriteRes_Len (int)sizeof(TAdsWriteRes)
typedef struct
{
- guint32 result;
- guint32 handle;
+ uint32_t result;
+ uint32_t handle;
} TAdsAddDeviceNotificationRes;
#define TAdsAddDeviceNotificationRes_Len (int)sizeof(TAdsAddDeviceNotificationRes)
typedef struct
{
- guint32 result;
+ uint32_t result;
} TAdsDelDeviceNotificationRes;
#define TAdsDelDeviceNotificationRes_Len (int)sizeof(TAdsDelDeviceNotificationRes)
@@ -1129,8 +1129,8 @@ typedef struct
/* structure for decoding the header -----------------------------------------*/
/*typedef struct
{
- guint16 reserved;
- guint32 cbLength;
+ uint16_t reserved;
+ uint32_t cbLength;
} TcpAdsParserHDR;
typedef TcpAdsParserHDR;*/
#define TcpAdsParserHDR_Len 6
diff --git a/plugins/epan/ethercat/packet-ecatmb.c b/plugins/epan/ethercat/packet-ecatmb.c
index 183734b059..956a6b1426 100644
--- a/plugins/epan/ethercat/packet-ecatmb.c
+++ b/plugins/epan/ethercat/packet-ecatmb.c
@@ -14,10 +14,10 @@
#include "config.h"
-#include <string.h>
-
#include <epan/packet.h>
#include <epan/expert.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "packet-ecatmb.h"
@@ -287,54 +287,54 @@ static const true_false_string tfs_complete =
"Complete", "Legacy"
};
-void init_mbx_header(PETHERCAT_MBOX_HEADER pMbox, tvbuff_t *tvb, gint offset)
+void init_mbx_header(PETHERCAT_MBOX_HEADER pMbox, tvbuff_t *tvb, int offset)
{
pMbox->Length = tvb_get_letohs(tvb, offset); offset+=2;
pMbox->Address = tvb_get_letohs(tvb, offset); offset+=2;
pMbox->aControlUnion.Control = tvb_get_letohs(tvb, offset);
}
-static void init_eoe_header(PETHERCAT_EOE_HEADER pEoE, tvbuff_t *tvb, gint offset)
+static void init_eoe_header(PETHERCAT_EOE_HEADER pEoE, tvbuff_t *tvb, int offset)
{
pEoE->anEoeHeaderInfoUnion.Info = tvb_get_letohs(tvb, offset); offset+=2;
pEoE->anEoeHeaderDataUnion.Result = tvb_get_letohs(tvb, offset);
}
-static void init_foe_header(PETHERCAT_FOE_HEADER pFoE, tvbuff_t *tvb, gint offset)
+static void init_foe_header(PETHERCAT_FOE_HEADER pFoE, tvbuff_t *tvb, int offset)
{
- pFoE->OpMode = tvb_get_guint8(tvb, offset++);
- pFoE->Reserved1 = tvb_get_guint8(tvb, offset++);
+ pFoE->OpMode = tvb_get_uint8(tvb, offset++);
+ pFoE->Reserved1 = tvb_get_uint8(tvb, offset++);
pFoE->aFoeHeaderDataUnion.FileLength = tvb_get_letohl(tvb, offset);
}
-static void init_soe_header(PETHERCAT_SOE_HEADER pSoE, tvbuff_t *tvb, gint offset)
+static void init_soe_header(PETHERCAT_SOE_HEADER pSoE, tvbuff_t *tvb, int offset)
{
- pSoE->anSoeHeaderControlUnion.v2.Control = tvb_get_guint8(tvb, offset++);
- pSoE->anSoeHeaderControlUnion.v2.Element = tvb_get_guint8(tvb, offset++);
+ pSoE->anSoeHeaderControlUnion.v2.Control = tvb_get_uint8(tvb, offset++);
+ pSoE->anSoeHeaderControlUnion.v2.Element = tvb_get_uint8(tvb, offset++);
pSoE->anSoeHeaderDataUnion.FragmentsLeft = tvb_get_letohs(tvb, offset);
}
-static void init_coe_header(PETHERCAT_COE_HEADER pCoE, tvbuff_t *tvb, gint offset)
+static void init_coe_header(PETHERCAT_COE_HEADER pCoE, tvbuff_t *tvb, int offset)
{
pCoE->header = tvb_get_letohs(tvb, offset);
}
-static void init_sdo_header(PETHERCAT_SDO_HEADER pSdo, tvbuff_t *tvb, gint offset)
+static void init_sdo_header(PETHERCAT_SDO_HEADER pSdo, tvbuff_t *tvb, int offset)
{
- pSdo->anSdoHeaderUnion.CS = tvb_get_guint8(tvb, offset++);
+ pSdo->anSdoHeaderUnion.CS = tvb_get_uint8(tvb, offset++);
pSdo->Index = tvb_get_letohs(tvb, offset);offset+=2;
- pSdo->SubIndex = tvb_get_guint8(tvb, offset++);
+ pSdo->SubIndex = tvb_get_uint8(tvb, offset++);
pSdo->Data = tvb_get_letohl(tvb, offset);
}
-static void init_sdo_info_header(PETHERCAT_SDO_INFO_HEADER pInfo, tvbuff_t *tvb, gint offset)
+static void init_sdo_info_header(PETHERCAT_SDO_INFO_HEADER pInfo, tvbuff_t *tvb, int offset)
{
- pInfo->anSdoControlUnion.Control = tvb_get_guint8(tvb, offset++);
- pInfo->Reserved = tvb_get_guint8(tvb, offset);
+ pInfo->anSdoControlUnion.Control = tvb_get_uint8(tvb, offset++);
+ pInfo->Reserved = tvb_get_uint8(tvb, offset);
pInfo->FragmentsLeft = 2;
}
-static void CANopenSdoReqFormatter(PETHERCAT_SDO_HEADER pSdo, char *szText, gint nMax)
+static void CANopenSdoReqFormatter(PETHERCAT_SDO_HEADER pSdo, char *szText, int nMax)
{
switch ( pSdo->anSdoHeaderUnion.Idq.Ccs )
{
@@ -358,7 +358,7 @@ static void CANopenSdoReqFormatter(PETHERCAT_SDO_HEADER pSdo, char *szText, gint
}
}
-static void FoeFormatter(tvbuff_t *tvb, wmem_allocator_t *scope, gint offset, char *szText, gint nMax, guint foe_length)
+static void FoeFormatter(tvbuff_t *tvb, wmem_allocator_t *scope, int offset, char *szText, int nMax, unsigned foe_length)
{
ETHERCAT_FOE_HEADER foe;
char *tmp = NULL;
@@ -395,7 +395,7 @@ static void FoeFormatter(tvbuff_t *tvb, wmem_allocator_t *scope, gint offset, ch
break;
case ECAT_FOE_OPMODE_BUSY:
if ( foe.aFoeHeaderDataUnion.v2.Entire > 0 )
- snprintf ( szText, nMax, "FoE BUSY (%d%%)", ((guint32)foe.aFoeHeaderDataUnion.v2.Done*100)/foe.aFoeHeaderDataUnion.v2.Entire);
+ snprintf ( szText, nMax, "FoE BUSY (%d%%)", ((uint32_t)foe.aFoeHeaderDataUnion.v2.Done*100)/foe.aFoeHeaderDataUnion.v2.Entire);
else
snprintf ( szText, nMax, "FoE BUSY (%d/%d)", foe.aFoeHeaderDataUnion.v2.Done, foe.aFoeHeaderDataUnion.v2.Entire);
break;
@@ -404,7 +404,7 @@ static void FoeFormatter(tvbuff_t *tvb, wmem_allocator_t *scope, gint offset, ch
}
}
-static void SoEIdToString( char* txt, guint16 id, int nMax)
+static void SoEIdToString( char* txt, uint16_t id, int nMax)
{
if ( id & 0x8000 )
snprintf(txt, nMax, "P-%d-%04d", (id>>12) & 0x0007, id & 0x0FFF );
@@ -412,7 +412,7 @@ static void SoEIdToString( char* txt, guint16 id, int nMax)
snprintf(txt, nMax, "S-%d-%04d", id>>12, id & 0x0FFF );
}
-static void SoeFormatter(tvbuff_t *tvb, gint offset, char *szText, gint nMax, guint soe_length)
+static void SoeFormatter(tvbuff_t *tvb, int offset, char *szText, int nMax, unsigned soe_length)
{
ETHERCAT_SOE_HEADER soe;
char tmp[50];
@@ -448,16 +448,16 @@ static void SoeFormatter(tvbuff_t *tvb, gint offset, char *szText, gint nMax, gu
snprintf ( szText, nMax, "SoE: RRQ (%s, '%s')", tmp, elm);
break;
case ECAT_SOE_OPCODE_RRS:
- snprintf ( szText, nMax, "SoE: RRS (%s, '%s') : %u Bytes", tmp, elm, (guint)(soe_length-ETHERCAT_SOE_HEADER_LEN));
+ snprintf ( szText, nMax, "SoE: RRS (%s, '%s') : %u Bytes", tmp, elm, (unsigned)(soe_length-ETHERCAT_SOE_HEADER_LEN));
break;
case ECAT_SOE_OPCODE_WRS:
snprintf ( szText, nMax, "SoE: WRS (%s, '%s')", tmp, elm);
break;
case ECAT_SOE_OPCODE_WRQ:
- snprintf ( szText, nMax, "SoE: WRQ (%s, '%s') : %u Bytes", tmp, elm, (guint)(soe_length-ETHERCAT_SOE_HEADER_LEN));
+ snprintf ( szText, nMax, "SoE: WRQ (%s, '%s') : %u Bytes", tmp, elm, (unsigned)(soe_length-ETHERCAT_SOE_HEADER_LEN));
break;
case ECAT_SOE_OPCODE_NFC:
- snprintf ( szText, nMax, "SoE: NFC (%s, '%s') : %u Bytes", tmp, elm, (guint)(soe_length-ETHERCAT_SOE_HEADER_LEN));
+ snprintf ( szText, nMax, "SoE: NFC (%s, '%s') : %u Bytes", tmp, elm, (unsigned)(soe_length-ETHERCAT_SOE_HEADER_LEN));
break;
case 6:
snprintf ( szText, nMax, "SoE: EMGCY");
@@ -474,7 +474,7 @@ static void SoeFormatter(tvbuff_t *tvb, gint offset, char *szText, gint nMax, gu
}
/* ethercat mailbox */
-static void dissect_ecat_coe(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
+static void dissect_ecat_coe(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
proto_tree *ecat_coe_tree = NULL, *ecat_sdo_tree, *ecat_coe_sdoccs_tree, *ecat_coe_sdoscs_tree;
@@ -482,8 +482,8 @@ static void dissect_ecat_coe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
char szText[200];
int nMax = sizeof(szText)-1;
- guint coe_length = tvb_reported_length(tvb)-offset;
- guint16 len;
+ unsigned coe_length = tvb_reported_length(tvb)-offset;
+ uint16_t len;
if( tree )
{
@@ -745,7 +745,7 @@ static void dissect_ecat_coe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
break;
case ECAT_COE_INFO_OPCODE_ENTRY_S:
{
- guint16 objlen;
+ uint16_t objlen;
proto_tree_add_item(ecat_coe_tree, hf_ecat_mailbox_coe_sdoinfoindex, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset+=2;
@@ -806,7 +806,7 @@ static void dissect_ecat_coe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
}
}
-static void dissect_ecat_soe(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
+static void dissect_ecat_soe(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
proto_tree *ecat_soeflag_tree, *ecat_soe_tree;
@@ -814,7 +814,7 @@ static void dissect_ecat_soe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
char szText[200];
int nMax = sizeof(szText)-1;
- guint soe_length = tvb_reported_length(tvb)-offset;
+ unsigned soe_length = tvb_reported_length(tvb)-offset;
if( tree )
{
@@ -896,7 +896,7 @@ static void dissect_ecat_soe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
}
}
-static void dissect_ecat_eoe(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
+static void dissect_ecat_eoe(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
proto_tree *ecat_eoe_tree = 0, *ecat_fraghead_tree, *ecat_eoe_init_tree, *ecat_eoe_macfilter_tree,
*ecat_eoe_macfilter_filter_tree;
@@ -904,7 +904,7 @@ static void dissect_ecat_eoe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
proto_item *anItem = NULL, *aparent = NULL;
int nCnt;
- guint eoe_length = tvb_reported_length(tvb)-offset;
+ unsigned eoe_length = tvb_reported_length(tvb)-offset;
if( tree )
{
@@ -1078,7 +1078,7 @@ static void dissect_ecat_eoe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
}
}
-static void dissect_ecat_foe(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
+static void dissect_ecat_foe(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
proto_tree *ecat_foe_tree,*ecat_foe_efw_tree;
@@ -1086,7 +1086,7 @@ static void dissect_ecat_foe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
char szText[200];
int nMax = sizeof(szText)-1;
- guint foe_length = tvb_reported_length(tvb)-offset;
+ unsigned foe_length = tvb_reported_length(tvb)-offset;
if( tree )
{
@@ -1183,9 +1183,9 @@ static int dissect_ecat_mailbox(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
proto_tree *ecat_mailbox_header_tree = NULL;
tvbuff_t *next_tvb;
proto_item *anItem;
- gint offset = 0;
+ int offset = 0;
- gint mailbox_length = tvb_reported_length(tvb);
+ int mailbox_length = tvb_reported_length(tvb);
if( mailbox_length >= ETHERCAT_MBOX_HEADER_LEN )
{
@@ -1929,7 +1929,7 @@ void proto_register_ecat_mailbox(void)
}
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_ecat_mailbox,
&ett_ecat_mailbox_eoe,
diff --git a/plugins/epan/ethercat/packet-ecatmb.h b/plugins/epan/ethercat/packet-ecatmb.h
index 54dce708b6..6e9ad29b8e 100644
--- a/plugins/epan/ethercat/packet-ecatmb.h
+++ b/plugins/epan/ethercat/packet-ecatmb.h
@@ -18,7 +18,7 @@ DIAG_OFF_PEDANTIC
typedef struct TETHERNET_ADDRESS
{
- guint8 b[6];
+ uint8_t b[6];
} ETHERNET_ADDRESS, *PETHERNET_ADDRESS;
#define ETHERNET_ADDRESS_LEN ((int) sizeof(ETHERNET_ADDRESS))
@@ -31,21 +31,21 @@ typedef struct TETHERNET_ADDRESS
typedef union tMbxHeaderControlUnion
{
- guint16 Control;
+ uint16_t Control;
struct
{
- guint16 Channel : 6; /* optional communication channels (default = 0)*/
- guint16 Priority : 2; /* optional communication priority (default = 0)*/
- guint16 Type : 4; /* TETHERCAT_MBOX_TYPE_xxx*/
- guint16 Counter : 3; /* 0 = counter not used (old version)*/
- guint16 Unsupported : 1; /* unsupported protocol detected*/
+ uint16_t Channel : 6; /* optional communication channels (default = 0)*/
+ uint16_t Priority : 2; /* optional communication priority (default = 0)*/
+ uint16_t Type : 4; /* TETHERCAT_MBOX_TYPE_xxx*/
+ uint16_t Counter : 3; /* 0 = counter not used (old version)*/
+ uint16_t Unsupported : 1; /* unsupported protocol detected*/
} v;
} MbxHeaderControlUnion;
typedef struct TETHERCAT_MBOX_HEADER
{
- guint16 Length; /* following bytes*/
- guint16 Address; /* S->M: phys addr of destination; M->S: phys addr of source; 0 = master*/
+ uint16_t Length; /* following bytes*/
+ uint16_t Address; /* S->M: phys addr of destination; M->S: phys addr of source; 0 = master*/
MbxHeaderControlUnion aControlUnion;
} ETHERCAT_MBOX_HEADER, *PETHERCAT_MBOX_HEADER;
@@ -70,18 +70,18 @@ typedef struct TETHERCAT_MBOX_HEADER
/*typedef struct TETHERCAT_EOE_INIT
{
- guint32 ContainsMacAddr :1;
- guint32 ContainsIpAddr :1;
- guint32 ContainsSubnetMask :1;
- guint32 ContainsDefaultGateway :1;
- guint32 ContainsDnsServer :1;
- guint32 ContainsDnsName :1;
- guint32 Reserved :26;
+ uint32_t ContainsMacAddr :1;
+ uint32_t ContainsIpAddr :1;
+ uint32_t ContainsSubnetMask :1;
+ uint32_t ContainsDefaultGateway :1;
+ uint32_t ContainsDnsServer :1;
+ uint32_t ContainsDnsName :1;
+ uint32_t Reserved :26;
ETHERNET_ADDRESS MacAddr;
- guint32 IpAddr;
- guint32 SubnetMask;
- guint32 DefaultGateway;
- guint32 DnsServer;
+ uint32_t IpAddr;
+ uint32_t SubnetMask;
+ uint32_t DefaultGateway;
+ uint32_t DnsServer;
char DnsName[32];
} ETHERCAT_EOE_INIT, *PETHERCAT_EOE_INIT;*/
#define ETHERCAT_EOE_INIT_LEN 58 /*sizeof(ETHERCAT_EOE_INIT)*/
@@ -90,13 +90,13 @@ typedef union tEoeMacFilterOptionsUnion
{
struct
{
- guint16 MacFilterCount :4;
- guint16 MacFilterMaskCount :2;
- guint16 Reserved1 :1;
- guint16 NoBroadcasts :1;
- guint16 Reserved2 :8;
+ uint16_t MacFilterCount :4;
+ uint16_t MacFilterMaskCount :2;
+ uint16_t Reserved1 :1;
+ uint16_t NoBroadcasts :1;
+ uint16_t Reserved2 :8;
} v;
- guint16 Options;
+ uint16_t Options;
} EoeMacFilterOptionsUnion;
typedef struct TETHERCAT_EOE_MACFILTER
@@ -109,7 +109,7 @@ typedef struct TETHERCAT_EOE_MACFILTER
typedef struct TETHERCAT_EOE_TIMESTAMP
{
- guint32 TimeStamp; /* 32 bit time stamp */
+ uint32_t TimeStamp; /* 32 bit time stamp */
} ETHERCAT_EOE_TIMESTAMP;
#define ETHERCAT_EOE_TIMESTAMP_LEN ((int) sizeof(ETHERCAT_EOE_TIMESTAMP))
@@ -117,26 +117,26 @@ typedef union tEoeHeaderDataUnion
{
struct
{ /* EOE_TYPE_FRAME_FRAG and EOE_TYPE_TIMESTAMP_RES only */
- guint16 Fragment : 6; /* fragment number (EOE_TYPE_FRAME_FRAG only) */
- guint16 OffsetBuffer : 6; /* byte offset multiplied by 32 (if Fragment != 0) (EOE_TYPE_FRAME_FRAG only) */
+ uint16_t Fragment : 6; /* fragment number (EOE_TYPE_FRAME_FRAG only) */
+ uint16_t OffsetBuffer : 6; /* byte offset multiplied by 32 (if Fragment != 0) (EOE_TYPE_FRAME_FRAG only) */
/* buffer size multiplied by 32 (if Fragment == 0) (EOE_TYPE_FRAME_FRAG only) */
- guint16 FrameNo : 4; /* frame number (EOE_TYPE_FRAME_FRAG and EOE_TYPE_TIMESTAMP_RES only) */
+ uint16_t FrameNo : 4; /* frame number (EOE_TYPE_FRAME_FRAG and EOE_TYPE_TIMESTAMP_RES only) */
} v;
- guint16 Result; /* EOE_TYPE_INIT_RES and EOE_TYPE_MACFILTER_RES only */
+ uint16_t Result; /* EOE_TYPE_INIT_RES and EOE_TYPE_MACFILTER_RES only */
} EoeHeaderDataUnion;
typedef union tEoeHeaderInfoUnion
{
struct
{
- guint16 Type : 4; /* specifies following data */
- guint16 PortAssign : 4; /* 0 = unspecified, 1 = port 1 */
- guint16 LastFragment : 1; /* TRUE if last fragment (EOE_TYPE_FRAME_FRAG only) */
- guint16 TimeStampAppended : 1; /* 32 bit time stamp appended (EOE_TYPE_FRAME_FRAG with LastFragment=1 only) */
- guint16 TimeStampRequested : 1; /* time stamp response requested (EOE_TYPE_FRAME_FRAG only) */
- guint16 Reserved : 5;
+ uint16_t Type : 4; /* specifies following data */
+ uint16_t PortAssign : 4; /* 0 = unspecified, 1 = port 1 */
+ uint16_t LastFragment : 1; /* true if last fragment (EOE_TYPE_FRAME_FRAG only) */
+ uint16_t TimeStampAppended : 1; /* 32 bit time stamp appended (EOE_TYPE_FRAME_FRAG with LastFragment=1 only) */
+ uint16_t TimeStampRequested : 1; /* time stamp response requested (EOE_TYPE_FRAME_FRAG only) */
+ uint16_t Reserved : 5;
} v;
- guint16 Info;
+ uint16_t Info;
} EoeHeaderInfoUnion;
typedef struct TETHERCAT_EOE_HEADER
@@ -160,11 +160,11 @@ typedef union TETHERCAT_COE_HEADER
{
struct
{
- guint16 Number : 9; /* e.g. PDO number*/
- guint16 Reserved : 3; /* = 0*/
- guint16 Type : 4; /* CANopen type*/
+ uint16_t Number : 9; /* e.g. PDO number*/
+ uint16_t Reserved : 3; /* = 0*/
+ uint16_t Type : 4; /* CANopen type*/
} v;
- guint16 header;
+ uint16_t header;
} ETHERCAT_COE_HEADER, *PETHERCAT_COE_HEADER;
#define ETHERCAT_COE_HEADER_LEN ((int) sizeof(ETHERCAT_COE_HEADER))
@@ -173,72 +173,72 @@ typedef union tSdoHeaderUnion
{
struct
{ /* Initiate Download Request*/
- guint8 SizeInd : 1;
- guint8 Expedited : 1;
- guint8 Size : 2;
- guint8 Complete : 1;
- guint8 Ccs : 3; /* = 1*/
+ uint8_t SizeInd : 1;
+ uint8_t Expedited : 1;
+ uint8_t Size : 2;
+ uint8_t Complete : 1;
+ uint8_t Ccs : 3; /* = 1*/
} Idq;
struct
{ /* Initiate Download Response*/
- guint8 Reserved : 5;
- guint8 Scs : 3; /* = 3*/
+ uint8_t Reserved : 5;
+ uint8_t Scs : 3; /* = 3*/
} Ids;
struct
{ /* Download Segment Request*/
- guint8 LastSeg : 1;
- guint8 Size : 3;
- guint8 Toggle : 1;
- guint8 Ccs : 3; /* = 0*/
+ uint8_t LastSeg : 1;
+ uint8_t Size : 3;
+ uint8_t Toggle : 1;
+ uint8_t Ccs : 3; /* = 0*/
} Dsq;
struct
{ /* Download Segment Response*/
- guint8 Reserved : 4;
- guint8 Toggle : 1;
- guint8 Scs : 3; /* = 1*/
+ uint8_t Reserved : 4;
+ uint8_t Toggle : 1;
+ uint8_t Scs : 3; /* = 1*/
} Dss;
struct
{ /* Initiate Upload Request*/
- guint8 Reserved : 4;
- guint8 Complete : 1;
- guint8 Ccs : 3; /* = 2*/
+ uint8_t Reserved : 4;
+ uint8_t Complete : 1;
+ uint8_t Ccs : 3; /* = 2*/
} Iuq;
struct
{ /* Initiate Upload Response*/
- guint8 SizeInd : 1;
- guint8 Expedited : 1;
- guint8 Size : 2;
- guint8 Complete : 1;
- guint8 Scs : 3; /* = 2*/
+ uint8_t SizeInd : 1;
+ uint8_t Expedited : 1;
+ uint8_t Size : 2;
+ uint8_t Complete : 1;
+ uint8_t Scs : 3; /* = 2*/
} Ius;
struct
{ /* Upload Segment Request*/
- guint8 Reserved : 4;
- guint8 Toggle : 1;
- guint8 Ccs : 3; /* = 3*/
+ uint8_t Reserved : 4;
+ uint8_t Toggle : 1;
+ uint8_t Ccs : 3; /* = 3*/
} Usq;
struct
{ /* Upload Segment Response*/
- guint8 LastSeg : 1;
- guint8 Bytes : 3;
- guint8 Toggle : 1;
- guint8 Scs : 3; /* = 0*/
+ uint8_t LastSeg : 1;
+ uint8_t Bytes : 3;
+ uint8_t Toggle : 1;
+ uint8_t Scs : 3; /* = 0*/
} Uss;
struct
{ /* Abort Transfer*/
- guint8 Reserved : 5;
- guint8 Ccs : 3; /* = 4*/
+ uint8_t Reserved : 5;
+ uint8_t Ccs : 3; /* = 4*/
} Abt;
- guint8 CS;
+ uint8_t CS;
} SdoHeaderUnion;
typedef struct TETHERCAT_SDO_HEADER
{
SdoHeaderUnion anSdoHeaderUnion;
- guint16 Index;
- guint8 SubIndex;
- guint32 Data;
+ uint16_t Index;
+ uint8_t SubIndex;
+ uint32_t Data;
} ETHERCAT_SDO_HEADER, *PETHERCAT_SDO_HEADER;
#define ETHERCAT_SDO_HEADER_LEN 8 /* sizeof(ETHERCAT_SDO_HEADER)*/
@@ -284,42 +284,42 @@ typedef struct TETHERCAT_SDO_HEADER
typedef struct TETHERCAT_SDO_INFO_LIST
{
- guint16 ListType; /* == SDO_INFO_LIST_TYPE_XXX */
+ uint16_t ListType; /* == SDO_INFO_LIST_TYPE_XXX */
struct
{
- guint16 Index[1];
+ uint16_t Index[1];
} Res;
} ETHERCAT_SDO_INFO_LIST;
typedef struct TETHERCAT_SDO_INFO_OBJ
{
- guint16 Index;
+ uint16_t Index;
struct
{
- guint16 DataType; /* refer to data type index */
- guint8 MaxSubIndex; /* max subIndex */
- guint8 ObjCode; /* defined in DS 301 (Table 37)*/
+ uint16_t DataType; /* refer to data type index */
+ uint8_t MaxSubIndex; /* max subIndex */
+ uint8_t ObjCode; /* defined in DS 301 (Table 37)*/
char Name[1]; /* rest of mailbox data*/
} Res;
} ETHERCAT_SDO_INFO_OBJ;
typedef struct TETHERCAT_SDO_INFO_ENTRY
{
- guint16 Index;
- guint8 SubIdx;
- guint8 ValueInfo; /* bit0 = ObjAccess, bit1 = ObjCategory, bit2 = PdoMapping, bit3 = UnitType
+ uint16_t Index;
+ uint8_t SubIdx;
+ uint8_t ValueInfo; /* bit0 = ObjAccess, bit1 = ObjCategory, bit2 = PdoMapping, bit3 = UnitType
bit4 = DefaultValue, bit5 = MinValue, bit6 = MaxValue*/
struct
{
- guint16 DataType; /* refer to data type index */
- guint16 BitLen;
- guint16 ObjAccess; /* bit0 = read; bit1 = write; bit2 = const. bit3 = 'PRE-OP'; bit4 = 'SAFE-OP'; bit5 = 'OP'.*/
+ uint16_t DataType; /* refer to data type index */
+ uint16_t BitLen;
+ uint16_t ObjAccess; /* bit0 = read; bit1 = write; bit2 = const. bit3 = 'PRE-OP'; bit4 = 'SAFE-OP'; bit5 = 'OP'.*/
} Res;
} ETHERCAT_SDO_INFO_ENTRY;
typedef struct TETHERCAT_SDO_INFO_ERROR
{
- guint32 ErrorCode;
+ uint32_t ErrorCode;
char ErrorText[1]; /* rest of mailbox data */
} ETHERCAT_SDO_INFO_ERROR;
@@ -329,24 +329,24 @@ typedef union tSdoInfoUnion
ETHERCAT_SDO_INFO_OBJ Obj;
ETHERCAT_SDO_INFO_ENTRY Entry;
ETHERCAT_SDO_INFO_ERROR Error;
- guint8 Data[1];
+ uint8_t Data[1];
} SdoInfoUnion;
typedef union tSdoControlUnion
{
struct
{
- guint8 OpCode : 7; /* == SDO_INFO_TYPE_XXX */
- guint8 InComplete : 1;
+ uint8_t OpCode : 7; /* == SDO_INFO_TYPE_XXX */
+ uint8_t InComplete : 1;
} v;
- guint8 Control;
+ uint8_t Control;
} SdoControlUnion;
typedef struct TETHERCAT_SDO_INFO_HEADER
{
SdoControlUnion anSdoControlUnion;
- guint8 Reserved; /* == 0 */
- guint16 FragmentsLeft;
+ uint8_t Reserved; /* == 0 */
+ uint16_t FragmentsLeft;
SdoInfoUnion anSdoInfoUnion;
} ETHERCAT_SDO_INFO_HEADER, *PETHERCAT_SDO_INFO_HEADER;
@@ -373,30 +373,30 @@ typedef struct TETHERCAT_SDO_INFO_HEADER
typedef union tFoeHeaderDataUnion
{
- guint32 FileLength; /* (RRQ, WRQ) = 0 if unknown */
+ uint32_t FileLength; /* (RRQ, WRQ) = 0 if unknown */
struct
{
- guint16 PacketNo; /* (DATA, ACK)*/
- guint16 Reserved2; /* (DATA, ACK)*/
+ uint16_t PacketNo; /* (DATA, ACK)*/
+ uint16_t Reserved2; /* (DATA, ACK)*/
} v;
- guint32 ErrorCode; /* (ERR)*/
+ uint32_t ErrorCode; /* (ERR)*/
struct
{
- guint16 Done; /* (BUSY)*/
- guint16 Entire; /* (BUSY)*/
+ uint16_t Done; /* (BUSY)*/
+ uint16_t Entire; /* (BUSY)*/
} v2;
} FoeHeaderDataUnion;
typedef struct TETHERCAT_FOE_HEADER
{
- guint8 OpMode; /* = 1 (RRQ), = 2 (WRQ), = 3 (DATA), = 4 (ACK), = 5 (ERR), = 6 (BUSY) */
- guint8 Reserved1; /* = 0 */
+ uint8_t OpMode; /* = 1 (RRQ), = 2 (WRQ), = 3 (DATA), = 4 (ACK), = 5 (ERR), = 6 (BUSY) */
+ uint8_t Reserved1; /* = 0 */
FoeHeaderDataUnion aFoeHeaderDataUnion;
/* typedef union tMailBoxDataUnion
{
char Name[] (RRQ, WRQ) rest of mailbox data
- guint8 Data[] (DATA) rest of mailbox data (if OpMode = 3)
+ uint8_t Data[] (DATA) rest of mailbox data (if OpMode = 3)
char ErrorText[] (ERR) rest of mailbox data
} MailBoxDataUnion;*/
} ETHERCAT_FOE_HEADER, *PETHERCAT_FOE_HEADER;
@@ -404,10 +404,10 @@ typedef struct TETHERCAT_FOE_HEADER
typedef struct
{
- guint16 Cmd;
- guint16 Size;
- guint16 AddressLW;
- guint16 AddressHW;
+ uint16_t Cmd;
+ uint16_t Size;
+ uint16_t AddressLW;
+ uint16_t AddressHW;
} TEFWUPDATE_HEADER;
@@ -423,32 +423,32 @@ typedef union tSoeHeaderControlUnion
{
struct
{
- guint8 OpCode : 3; /* 0 = unused, 1 = readReq, 2 = readRes, 3 = writeReq, 4 = writeRes
+ uint8_t OpCode : 3; /* 0 = unused, 1 = readReq, 2 = readRes, 3 = writeReq, 4 = writeRes
5 = notification (command changed notification)*/
- guint8 InComplete : 1; /* more follows*/
- guint8 Error : 1; /* an error word follows */
- guint8 DriveNo : 3; /* drive number */
-
- guint8 DataState : 1; /* follows or requested */
- guint8 Name : 1; /* follows or requested */
- guint8 Attribute : 1; /* follows or requested */
- guint8 Unit : 1; /* follows or requested */
- guint8 Min : 1; /* follows or requested */
- guint8 Max : 1; /* follows or requested */
- guint8 Value : 1; /* follows or requested */
- guint8 Reserved : 1;
+ uint8_t InComplete : 1; /* more follows*/
+ uint8_t Error : 1; /* an error word follows */
+ uint8_t DriveNo : 3; /* drive number */
+
+ uint8_t DataState : 1; /* follows or requested */
+ uint8_t Name : 1; /* follows or requested */
+ uint8_t Attribute : 1; /* follows or requested */
+ uint8_t Unit : 1; /* follows or requested */
+ uint8_t Min : 1; /* follows or requested */
+ uint8_t Max : 1; /* follows or requested */
+ uint8_t Value : 1; /* follows or requested */
+ uint8_t Reserved : 1;
} v;
struct
{
- guint8 Control;
- guint8 Element;
+ uint8_t Control;
+ uint8_t Element;
} v2;
} SoeHeaderControlUnion;
typedef union tSoeHeaderDataUnion
{
- guint16 IDN; /* SOE IDN if (InComplete==0) */
- guint16 FragmentsLeft; /* Pending fragments if (InComplete==1) */
+ uint16_t IDN; /* SOE IDN if (InComplete==0) */
+ uint16_t FragmentsLeft; /* Pending fragments if (InComplete==1) */
} SoeHeaderDataUnion;
typedef struct TETHERCAT_SOE_HEADER
@@ -457,13 +457,13 @@ typedef struct TETHERCAT_SOE_HEADER
SoeHeaderDataUnion anSoeHeaderDataUnion;
/* typedef union tMailBoxDataUnion
{
- guint8 Data[] rest of mailbox data if (Error==0)
- guint16 ErrorCode if (Error==1)
+ uint8_t Data[] rest of mailbox data if (Error==0)
+ uint16_t ErrorCode if (Error==1)
} MailBoxDataUnion;*/
} ETHERCAT_SOE_HEADER, *PETHERCAT_SOE_HEADER;
#define ETHERCAT_SOE_HEADER_LEN ((int) sizeof(ETHERCAT_SOE_HEADER))
-extern void init_mbx_header(PETHERCAT_MBOX_HEADER pMbox, tvbuff_t *tvb, gint offset);
+extern void init_mbx_header(PETHERCAT_MBOX_HEADER pMbox, tvbuff_t *tvb, int offset);
DIAG_ON_PEDANTIC
#endif /* _PACKET_ECATMAILBOX_H_ */
diff --git a/plugins/epan/ethercat/packet-esl.c b/plugins/epan/ethercat/packet-esl.c
index b0d197efb6..b67902cbe8 100644
--- a/plugins/epan/ethercat/packet-esl.c
+++ b/plugins/epan/ethercat/packet-esl.c
@@ -14,6 +14,8 @@
#include <epan/packet.h>
#include <epan/prefs.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
void proto_register_esl(void);
@@ -24,29 +26,29 @@ typedef union _EslFlagsUnion
{
struct
{
- guint16 port7 : 1;
- guint16 port6 : 1;
- guint16 port5 : 1;
- guint16 port4 : 1;
- guint16 port3 : 1;
- guint16 port2 : 1;
- guint16 port1 : 1;
- guint16 port0 : 1;
- guint16 extended : 1;
- guint16 port11 : 1;
- guint16 port10 : 1;
- guint16 alignError : 1;
- guint16 crcError : 1;
- guint16 timeStampEna : 1;
- guint16 port9 : 1;
- guint16 port8 : 1;
+ uint16_t port7 : 1;
+ uint16_t port6 : 1;
+ uint16_t port5 : 1;
+ uint16_t port4 : 1;
+ uint16_t port3 : 1;
+ uint16_t port2 : 1;
+ uint16_t port1 : 1;
+ uint16_t port0 : 1;
+ uint16_t extended : 1;
+ uint16_t port11 : 1;
+ uint16_t port10 : 1;
+ uint16_t alignError : 1;
+ uint16_t crcError : 1;
+ uint16_t timeStampEna : 1;
+ uint16_t port9 : 1;
+ uint16_t port8 : 1;
}d;
struct
{
- guint8 loPorts : 1;
- guint8 flagsHiPorts : 1;
+ uint8_t loPorts : 1;
+ uint8_t flagsHiPorts : 1;
}lo_hi_flags;
- guint flags;
+ unsigned flags;
} EslFlagsUnion;
#endif
@@ -70,9 +72,9 @@ typedef union _EslFlagsUnion
#if 0
typedef struct _EslHeader
{
- guint8 eslCookie[6]; /* 01 01 05 10 00 00 */
+ uint8_t eslCookie[6]; /* 01 01 05 10 00 00 */
EslFlagsUnion flags;
- guint64 timeStamp;
+ uint64_t timeStamp;
} EslHeader, *PEslHeader;
#endif
@@ -101,7 +103,7 @@ static const true_false_string flags_yes_no = {
#if 0
/* XXX: using bitfields is compiler dependent: See README.developer */
-static guint16 flags_to_port(guint16 flagsValue) {
+static uint16_t flags_to_port(uint16_t flagsValue) {
EslFlagsUnion flagsUnion;
flagsUnion.flags = flagsValue;
if ( flagsUnion.d.port0 )
@@ -129,7 +131,7 @@ static guint16 flags_to_port(guint16 flagsValue) {
}
#endif
-static guint16 flags_to_port(guint16 flagsValue) {
+static uint16_t flags_to_port(uint16_t flagsValue) {
if ( (flagsValue & esl_port0_bitmask) != 0 )
return 0;
else if ( (flagsValue & esl_port1_bitmask) != 0 )
@@ -164,14 +166,14 @@ dissect_esl_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void
proto_item *ti = NULL;
proto_tree *esl_header_tree;
- gint offset = 0;
+ int offset = 0;
- guint esl_length = tvb_reported_length(tvb);
+ unsigned esl_length = tvb_reported_length(tvb);
if ( esl_length >= SIZEOF_ESLHEADER )
{
if (tree)
{
- guint16 flags;
+ uint16_t flags;
ti = proto_tree_add_item(tree, proto_esl, tvb, 0, SIZEOF_ESLHEADER, ENC_NA);
esl_header_tree = proto_item_add_subtree(ti, ett_esl);
@@ -194,24 +196,24 @@ dissect_esl_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void
typedef struct _ref_time_frame_info
{
frame_data *fd;
- guint64 esl_ts;
+ uint64_t esl_ts;
nstime_t abs_ts;
- guint32 num;
+ uint32_t num;
} ref_time_frame_info;
static ref_time_frame_info ref_time_frame;
-static gboolean is_esl_header(tvbuff_t *tvb, gint offset)
+static bool is_esl_header(tvbuff_t *tvb, int offset)
{
- return tvb_get_guint8(tvb, offset) == 0x01 &&
- tvb_get_guint8(tvb, offset+1) == 0x01 &&
- tvb_get_guint8(tvb, offset+2) == 0x05 &&
- (tvb_get_guint8(tvb, offset+3) == 0x10 ||tvb_get_guint8(tvb, offset+3) == 0x11)&&
- tvb_get_guint8(tvb, offset+4) == 0x00 &&
- tvb_get_guint8(tvb, offset+5) == 0x00;
+ return tvb_get_uint8(tvb, offset) == 0x01 &&
+ tvb_get_uint8(tvb, offset+1) == 0x01 &&
+ tvb_get_uint8(tvb, offset+2) == 0x05 &&
+ (tvb_get_uint8(tvb, offset+3) == 0x10 ||tvb_get_uint8(tvb, offset+3) == 0x11)&&
+ tvb_get_uint8(tvb, offset+4) == 0x00 &&
+ tvb_get_uint8(tvb, offset+5) == 0x00;
}
-static void modify_times(tvbuff_t *tvb, gint offset, packet_info *pinfo)
+static void modify_times(tvbuff_t *tvb, int offset, packet_info *pinfo)
{
if ( ref_time_frame.fd == NULL )
{
@@ -222,8 +224,8 @@ static void modify_times(tvbuff_t *tvb, gint offset, packet_info *pinfo)
}
else if ( !pinfo->fd->visited )
{
- guint64 nsecs = tvb_get_letoh64(tvb, offset+8) - ref_time_frame.esl_ts;
- guint64 secs = nsecs/1000000000;
+ uint64_t nsecs = tvb_get_letoh64(tvb, offset+8) - ref_time_frame.esl_ts;
+ uint64_t secs = nsecs/1000000000;
nstime_t ts;
nstime_t ts_delta;
@@ -243,18 +245,18 @@ static void modify_times(tvbuff_t *tvb, gint offset, packet_info *pinfo)
}
}
-static gboolean
+static bool
dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- static gboolean in_heur = FALSE;
- gboolean result;
+ static bool in_heur = false;
+ bool result;
tvbuff_t *next_tvb;
- guint esl_length = tvb_captured_length(tvb);
+ unsigned esl_length = tvb_captured_length(tvb);
if ( in_heur )
- return FALSE;
+ return false;
- in_heur = TRUE;
+ in_heur = true;
/*TRY */
{
if ( ref_time_frame.fd != NULL && !pinfo->fd->visited && pinfo->num <= ref_time_frame.num )
@@ -262,7 +264,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
/* Check that there's enough data */
if ( esl_length < SIZEOF_ESLHEADER )
- return FALSE;
+ return false;
/* check for Esl frame, this has a unique destination MAC from Beckhoff range
First 6 bytes must be: 01 01 05 10 00 00 */
@@ -275,7 +277,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
}
modify_times(tvb, 0, pinfo);
- result = TRUE;
+ result = true;
}
else if ( is_esl_header(tvb, esl_length-SIZEOF_ESLHEADER) )
{
@@ -288,18 +290,18 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
dissect_esl_header(next_tvb, pinfo, tree, data);
modify_times(tvb, esl_length-SIZEOF_ESLHEADER, pinfo);
- result = TRUE;
+ result = true;
}
else
{
- result = FALSE;
+ result = false;
}
}
/*CATCH_ALL{
- in_heur = FALSE;
+ in_heur = false;
RETHROW;
}ENDTRY;*/
- in_heur = FALSE;
+ in_heur = false;
return result;
}
@@ -328,7 +330,7 @@ proto_register_esl(void) {
},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_esl,
};
@@ -349,12 +351,12 @@ proto_register_esl(void) {
void
proto_reg_handoff_esl(void) {
- static gboolean initialized = FALSE;
+ static bool initialized = false;
if (!initialized) {
eth_withoutfcs_handle = find_dissector_add_dependency("eth_withoutfcs", proto_esl);
heur_dissector_add("eth", dissect_esl_heur, "EtherCAT over Ethernet", "esl_eth", proto_esl, HEURISTIC_DISABLE);
- initialized = TRUE;
+ initialized = true;
}
}
diff --git a/plugins/epan/ethercat/packet-ethercat-datagram.c b/plugins/epan/ethercat/packet-ethercat-datagram.c
index e1d98d1095..002871be78 100644
--- a/plugins/epan/ethercat/packet-ethercat-datagram.c
+++ b/plugins/epan/ethercat/packet-ethercat-datagram.c
@@ -17,6 +17,8 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "packet-ethercat-datagram.h"
#include "packet-ecatmb.h"
@@ -1072,12 +1074,12 @@ typedef int register_dissect_func(packet_info *pinfo, proto_tree *tree, tvbuff_t
/* esc registers */
typedef struct
{
- guint16 reg;
- guint16 length;
- guint16 repeat;
+ uint16_t reg;
+ uint16_t length;
+ uint16_t repeat;
int* phf;
int* const *bitmask_info;
- gint* pett;
+ int* pett;
register_dissect_func *dissect;
} ecat_esc_reg_info;
@@ -1198,13 +1200,13 @@ static ecat_esc_reg_info ecat_esc_registers [] =
};
/* esc dissector */
-static int dissect_esc_register(packet_info* pinfo, proto_tree *tree, tvbuff_t *tvb, gint offset, guint32 len, EcParserHDR* hdr, guint16 cnt)
+static int dissect_esc_register(packet_info* pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, uint32_t len, EcParserHDR* hdr, uint16_t cnt)
{
- guint i;
- gint r;
- gint res = -1;
- gint regOffset;
- gint read = 0;
+ unsigned i;
+ int r;
+ int res = -1;
+ int regOffset;
+ int read = 0;
if (len > 0 )
{
@@ -1231,7 +1233,7 @@ static int dissect_esc_register(packet_info* pinfo, proto_tree *tree, tvbuff_t *
regOffset = ecat_esc_registers[i].reg;
for ( r=0; r<ecat_esc_registers[i].repeat; r++ )
{
- if ( regOffset >= hdr->anAddrUnion.a.ado && regOffset+ecat_esc_registers[i].length <= (guint16)(hdr->anAddrUnion.a.ado + len) )
+ if ( regOffset >= hdr->anAddrUnion.a.ado && regOffset+ecat_esc_registers[i].length <= (uint16_t)(hdr->anAddrUnion.a.ado + len) )
{
if ( cnt > 0 || !read )
{
@@ -1260,17 +1262,17 @@ static int dissect_esc_register(packet_info* pinfo, proto_tree *tree, tvbuff_t *
return res;
}
-static void init_EcParserHDR(EcParserHDR* pHdr, tvbuff_t *tvb, gint offset)
+static void init_EcParserHDR(EcParserHDR* pHdr, tvbuff_t *tvb, int offset)
{
- pHdr->cmd = tvb_get_guint8(tvb, offset++);
- pHdr->idx = tvb_get_guint8(tvb, offset++);
+ pHdr->cmd = tvb_get_uint8(tvb, offset++);
+ pHdr->idx = tvb_get_uint8(tvb, offset++);
pHdr->anAddrUnion.a.adp = tvb_get_letohs(tvb, offset); offset+=2;
pHdr->anAddrUnion.a.ado = tvb_get_letohs(tvb, offset); offset+=2;
pHdr->len = tvb_get_letohs(tvb, offset); offset+=2;
pHdr->intr = tvb_get_letohs(tvb, offset);
}
-static void init_dc_measure(guint32* pDC, tvbuff_t *tvb, gint offset)
+static void init_dc_measure(uint32_t* pDC, tvbuff_t *tvb, int offset)
{
int i;
for ( i=0; i<4; i++ )
@@ -1280,27 +1282,27 @@ static void init_dc_measure(guint32* pDC, tvbuff_t *tvb, gint offset)
}
}
-static guint16 get_wc(EcParserHDR* pHdr, tvbuff_t *tvb, gint offset)
+static uint16_t get_wc(EcParserHDR* pHdr, tvbuff_t *tvb, int offset)
{
return tvb_get_letohs(tvb, offset+EcParserHDR_Len+(pHdr->len&0x07ff));
}
-static guint16 get_cmd_len(EcParserHDR* pHdr)
+static uint16_t get_cmd_len(EcParserHDR* pHdr)
{
return (EcParserHDR_Len+(pHdr->len&0x07ff)+2); /*Header + data + wc*/
}
-static void EcSummaryFormater(guint32 datalength, tvbuff_t *tvb, gint offset, char *szText, gint nMax)
+static void EcSummaryFormater(uint32_t datalength, tvbuff_t *tvb, int offset, char *szText, int nMax)
{
- guint nSub=0;
- guint nLen=0;
- guint8 nCmds[4];
- guint nLens[4];
+ unsigned nSub=0;
+ unsigned nLen=0;
+ uint8_t nCmds[4];
+ unsigned nLens[4];
EcParserHDR ecFirst;
EcParserHDR ecParser;
- guint suboffset=0;
+ unsigned suboffset=0;
init_EcParserHDR(&ecFirst, tvb, offset);
@@ -1331,8 +1333,8 @@ static void EcSummaryFormater(guint32 datalength, tvbuff_t *tvb, gint offset, ch
}
if ( nSub == 1 )
{
- guint16 len = ecFirst.len&0x07ff;
- guint16 cnt = get_wc(&ecFirst, tvb, offset);
+ uint16_t len = ecFirst.len&0x07ff;
+ uint16_t cnt = get_wc(&ecFirst, tvb, offset);
snprintf ( szText, nMax, "'%s': Len: %d, Adp 0x%x, Ado 0x%x, Wc %d ",
convertEcCmdToText(ecFirst.cmd, EcCmdShort), len, ecFirst.anAddrUnion.a.adp, ecFirst.anAddrUnion.a.ado, cnt );
}
@@ -1356,10 +1358,10 @@ static void EcSummaryFormater(guint32 datalength, tvbuff_t *tvb, gint offset, ch
nSub, nLen, convertEcCmdToText(ecFirst.cmd, EcCmdShort));
}
-static void EcCmdFormatter(guint8 cmd, char *szText, gint nMax)
+static void EcCmdFormatter(uint8_t cmd, char *szText, int nMax)
{
- gint idx=0;
- const gchar *szCmd = try_val_to_str_idx((guint32)cmd, EcCmdLong, &idx);
+ int idx=0;
+ const char *szCmd = try_val_to_str_idx((uint32_t)cmd, EcCmdLong, &idx);
if ( idx != -1 )
snprintf(szText, nMax, "Cmd : %d (%s)", cmd, szCmd);
@@ -1368,10 +1370,10 @@ static void EcCmdFormatter(guint8 cmd, char *szText, gint nMax)
}
-static void EcSubFormatter(tvbuff_t *tvb, gint offset, char *szText, gint nMax)
+static void EcSubFormatter(tvbuff_t *tvb, int offset, char *szText, int nMax)
{
EcParserHDR ecParser;
- guint16 len, cnt;
+ uint16_t len, cnt;
init_EcParserHDR(&ecParser, tvb, offset);
len = ecParser.len&0x07ff;
@@ -1414,14 +1416,14 @@ static int dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
tvbuff_t *next_tvb;
proto_item *ti, *aitem = NULL;
proto_tree *ecat_datagrams_tree = NULL;
- guint offset = 0;
+ unsigned offset = 0;
char szText[200];
int nMax = sizeof(szText)-1;
- guint ecLength=0;
- guint subCount = 0;
- const guint datagram_length = tvb_captured_length(tvb);
- guint datagram_padding_bytes = 0;
+ unsigned ecLength=0;
+ unsigned subCount = 0;
+ const unsigned datagram_length = tvb_captured_length(tvb);
+ unsigned datagram_padding_bytes = 0;
EcParserHDR ecHdr;
heur_dtbl_entry_t *hdtbl_entry;
@@ -1473,10 +1475,10 @@ static int dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
proto_tree *ecat_datagram_tree = NULL, *ecat_header_tree = NULL, *ecat_dc_tree = NULL;
proto_item *hidden_item;
- guint32 subsize;
- guint32 suboffset;
- guint32 len;
- guint16 cnt;
+ uint32_t subsize;
+ uint32_t suboffset;
+ uint32_t len;
+ uint16_t cnt;
ETHERCAT_MBOX_HEADER mbox;
suboffset = offset;
@@ -1568,7 +1570,7 @@ static int dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
if ( (ecHdr.cmd == 1 || ecHdr.cmd == 4) && ecHdr.anAddrUnion.a.ado == 0x900 && ecHdr.len >= 16 && cnt > 0 )
{
- guint32 pDC[4];
+ uint32_t pDC[4];
init_dc_measure(pDC, tvb, suboffset);
ecat_dc_tree = proto_tree_add_subtree(ecat_datagram_tree, tvb, suboffset, len, ett_ecat_dc, NULL, "Dc");
@@ -1631,8 +1633,8 @@ static int dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
}
else if (dissect_esc_register(pinfo, ecat_datagram_tree, tvb, suboffset, len, &ecHdr, cnt) != 0)
{
- guint startOfData = offset + EcParserHDR_Len;
- guint dataLength = len;
+ unsigned startOfData = offset + EcParserHDR_Len;
+ unsigned dataLength = len;
if ( len >= ETHERCAT_MBOX_HEADER_LEN &&
((ecHdr.cmd==EC_CMD_TYPE_FPWR || ecHdr.cmd == EC_CMD_TYPE_APWR || ecHdr.cmd == EC_CMD_TYPE_APRW || ecHdr.cmd == EC_CMD_TYPE_FPRW) || ((ecHdr.cmd==EC_CMD_TYPE_FPRD || ecHdr.cmd==EC_CMD_TYPE_APRD) && cnt==1) ) &&
@@ -1649,7 +1651,7 @@ static int dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
case ETHERCAT_MBOX_TYPE_SOE:
if ( mbox.Length <= 1500 )
{
- guint MBoxLength = mbox.Length + ETHERCAT_MBOX_HEADER_LEN;
+ unsigned MBoxLength = mbox.Length + ETHERCAT_MBOX_HEADER_LEN;
if ( MBoxLength > len )
MBoxLength = len;
@@ -3660,7 +3662,7 @@ void proto_register_ecat(void)
},
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_ecat,
&ett_ecat_header,
diff --git a/plugins/epan/ethercat/packet-ethercat-datagram.h b/plugins/epan/ethercat/packet-ethercat-datagram.h
index b1565cfe32..cd0b545acd 100644
--- a/plugins/epan/ethercat/packet-ethercat-datagram.h
+++ b/plugins/epan/ethercat/packet-ethercat-datagram.h
@@ -16,19 +16,19 @@ typedef union
{
struct
{
- guint16 adp;
- guint16 ado;
+ uint16_t adp;
+ uint16_t ado;
} a;
- guint32 addr;
+ uint32_t addr;
} EcParserAddrUnion;
typedef struct _EcParser
{
- guint8 cmd;
- guint8 idx;
+ uint8_t cmd;
+ uint8_t idx;
EcParserAddrUnion anAddrUnion;
- guint16 len;
- guint16 intr;
+ uint16_t len;
+ uint16_t intr;
} EcParserHDR, *PEcParserHDR;
#define EcParserHDR_Len 10/*sizeof(EcParserHDR)*/
diff --git a/plugins/epan/ethercat/packet-ethercat-frame.c b/plugins/epan/ethercat/packet-ethercat-frame.c
index 275fc4fcd1..687ca8bdac 100644
--- a/plugins/epan/ethercat/packet-ethercat-frame.c
+++ b/plugins/epan/ethercat/packet-ethercat-frame.c
@@ -58,7 +58,7 @@ static int dissect_ethercat_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tvbuff_t *next_tvb;
proto_item *ti;
proto_tree *ethercat_frame_tree;
- gint offset = 0;
+ int offset = 0;
EtherCATFrameParserHDR hdr;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ECATF");
@@ -115,7 +115,7 @@ void proto_register_ethercat_frame(void)
}
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_ethercat_frame
};
diff --git a/plugins/epan/ethercat/packet-ethercat-frame.h b/plugins/epan/ethercat/packet-ethercat-frame.h
index 2bb8c19b03..d47587e45b 100644
--- a/plugins/epan/ethercat/packet-ethercat-frame.h
+++ b/plugins/epan/ethercat/packet-ethercat-frame.h
@@ -19,11 +19,11 @@ typedef union _EtherCATFrameParser
{
struct
{
- guint16 length : 11;
- guint16 reserved : 1;
- guint16 protocol : 4;
+ uint16_t length : 11;
+ uint16_t reserved : 1;
+ uint16_t protocol : 4;
} v;
- guint16 hdr;
+ uint16_t hdr;
} EtherCATFrameParserHDR;
DIAG_ON_PEDANTIC
typedef EtherCATFrameParserHDR *PEtherCATFrameParserHDR;
diff --git a/plugins/epan/ethercat/packet-ioraw.c b/plugins/epan/ethercat/packet-ioraw.c
index 739417ed11..a6554cfd42 100644
--- a/plugins/epan/ethercat/packet-ioraw.c
+++ b/plugins/epan/ethercat/packet-ioraw.c
@@ -42,11 +42,11 @@ static int dissect_ioraw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
{
proto_item *ti;
proto_tree *ioraw_tree;
- gint offset = 0;
+ int offset = 0;
char szText[200];
int nMax = sizeof(szText)-1;
- guint ioraw_length = tvb_reported_length(tvb);
+ unsigned ioraw_length = tvb_reported_length(tvb);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IO-RAW");
@@ -88,7 +88,7 @@ void proto_register_ioraw(void)
}
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_ioraw
};
diff --git a/plugins/epan/ethercat/packet-ioraw.h b/plugins/epan/ethercat/packet-ioraw.h
index 48f942ef66..f1e11c5b7d 100644
--- a/plugins/epan/ethercat/packet-ioraw.h
+++ b/plugins/epan/ethercat/packet-ioraw.h
@@ -14,7 +14,7 @@
/* headers are only used for size and offset calculation*/
typedef struct _IoRawParser
{
- guint32 head;
+ uint32_t head;
} IoRawParserHDR, *PIoRawParserHDR;
#define IoRawParserHDR_Len (int)sizeof(IoRawParserHDR)
diff --git a/plugins/epan/ethercat/packet-nv.c b/plugins/epan/ethercat/packet-nv.c
index 8f904c3c22..3113ffb92f 100644
--- a/plugins/epan/ethercat/packet-nv.c
+++ b/plugins/epan/ethercat/packet-nv.c
@@ -45,34 +45,34 @@ static int hf_nv_quality;
static int hf_nv_data;
/*nv*/
-static void NvSummaryFormater(tvbuff_t *tvb, gint offset, char *szText, int nMax)
+static void NvSummaryFormater(tvbuff_t *tvb, int offset, char *szText, int nMax)
{
- guint32 nvOffset = offset;
+ uint32_t nvOffset = offset;
snprintf ( szText, nMax, "Network Vars from %d.%d.%d.%d.%d.%d - %d Var(s)",
- tvb_get_guint8(tvb, nvOffset),
- tvb_get_guint8(tvb, nvOffset+1),
- tvb_get_guint8(tvb, nvOffset+2),
- tvb_get_guint8(tvb, nvOffset+3),
- tvb_get_guint8(tvb, nvOffset+4),
- tvb_get_guint8(tvb, nvOffset+5),
+ tvb_get_uint8(tvb, nvOffset),
+ tvb_get_uint8(tvb, nvOffset+1),
+ tvb_get_uint8(tvb, nvOffset+2),
+ tvb_get_uint8(tvb, nvOffset+3),
+ tvb_get_uint8(tvb, nvOffset+4),
+ tvb_get_uint8(tvb, nvOffset+5),
tvb_get_letohs(tvb, nvOffset+6));
}
-static void NvPublisherFormater(tvbuff_t *tvb, gint offset, char *szText, int nMax)
+static void NvPublisherFormater(tvbuff_t *tvb, int offset, char *szText, int nMax)
{
- guint32 nvOffset = offset;
+ uint32_t nvOffset = offset;
snprintf ( szText, nMax, "Publisher %d.%d.%d.%d.%d.%d",
- tvb_get_guint8(tvb, nvOffset),
- tvb_get_guint8(tvb, nvOffset+1),
- tvb_get_guint8(tvb, nvOffset+2),
- tvb_get_guint8(tvb, nvOffset+3),
- tvb_get_guint8(tvb, nvOffset+4),
- tvb_get_guint8(tvb, nvOffset+5));
+ tvb_get_uint8(tvb, nvOffset),
+ tvb_get_uint8(tvb, nvOffset+1),
+ tvb_get_uint8(tvb, nvOffset+2),
+ tvb_get_uint8(tvb, nvOffset+3),
+ tvb_get_uint8(tvb, nvOffset+4),
+ tvb_get_uint8(tvb, nvOffset+5));
}
-static void NvVarHeaderFormater(tvbuff_t *tvb, gint offset, char *szText, int nMax)
+static void NvVarHeaderFormater(tvbuff_t *tvb, int offset, char *szText, int nMax)
{
snprintf ( szText, nMax, "Variable - Id = %d, Length = %d",
tvb_get_letohs(tvb, offset),
@@ -83,11 +83,11 @@ static int dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
{
proto_item *ti;
proto_tree *nv_tree, *nv_header_tree, *nv_var_tree,*nv_varheader_tree;
- gint offset = 0;
+ int offset = 0;
char szText[200];
int nMax = (int)sizeof(szText)-1;
- gint i;
+ int i;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TC-NV");
@@ -98,7 +98,7 @@ static int dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
if (tree)
{
- guint16 nv_count;
+ uint16_t nv_count;
ti = proto_tree_add_item(tree, proto_nv, tvb, 0, -1, ENC_NA);
nv_tree = proto_item_add_subtree(ti, ett_nv);
@@ -108,21 +108,21 @@ static int dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
nv_header_tree = proto_item_add_subtree(ti, ett_nv_header);
- ti= proto_tree_add_item(nv_header_tree, hf_nv_publisher, tvb, offset, (int)sizeof(guint8)*6, ENC_NA);
+ ti= proto_tree_add_item(nv_header_tree, hf_nv_publisher, tvb, offset, (int)sizeof(uint8_t)*6, ENC_NA);
NvPublisherFormater(tvb, offset, szText, nMax);
proto_item_set_text(ti, "%s", szText);
- offset+=((int)sizeof(guint8)*6);
+ offset+=((int)sizeof(uint8_t)*6);
- proto_tree_add_item(nv_header_tree, hf_nv_count, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(nv_header_tree, hf_nv_count, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
nv_count = tvb_get_letohs(tvb, offset);
- offset+=(int)sizeof(guint16);
+ offset+=(int)sizeof(uint16_t);
- proto_tree_add_item(nv_header_tree, hf_nv_cycleindex, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(nv_header_tree, hf_nv_cycleindex, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
offset = NvParserHDR_Len;
for ( i=0; i < nv_count; i++ )
{
- guint16 var_length = tvb_get_letohs(tvb, offset+4);
+ uint16_t var_length = tvb_get_letohs(tvb, offset+4);
ti = proto_tree_add_item(nv_tree, hf_nv_variable, tvb, offset, ETYPE_88A4_NV_DATA_HEADER_Len+var_length, ENC_NA);
NvVarHeaderFormater(tvb, offset, szText, nMax);
@@ -132,17 +132,17 @@ static int dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
ti = proto_tree_add_item(nv_var_tree, hf_nv_varheader, tvb, offset, ETYPE_88A4_NV_DATA_HEADER_Len, ENC_NA);
nv_varheader_tree = proto_item_add_subtree(ti, ett_nv_varheader);
- proto_tree_add_item(nv_varheader_tree, hf_nv_id, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint16);
+ proto_tree_add_item(nv_varheader_tree, hf_nv_id, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint16_t);
- proto_tree_add_item(nv_varheader_tree, hf_nv_hash, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint16);
+ proto_tree_add_item(nv_varheader_tree, hf_nv_hash, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint16_t);
- proto_tree_add_item(nv_varheader_tree, hf_nv_length, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint16);
+ proto_tree_add_item(nv_varheader_tree, hf_nv_length, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint16_t);
- proto_tree_add_item(nv_varheader_tree, hf_nv_quality, tvb, offset, (int)sizeof(guint16), ENC_LITTLE_ENDIAN);
- offset+=(int)sizeof(guint16);
+ proto_tree_add_item(nv_varheader_tree, hf_nv_quality, tvb, offset, (int)sizeof(uint16_t), ENC_LITTLE_ENDIAN);
+ offset+=(int)sizeof(uint16_t);
proto_tree_add_item(nv_var_tree, hf_nv_data, tvb, offset, var_length, ENC_NA);
offset+=var_length;
@@ -207,7 +207,7 @@ void proto_register_nv(void)
},
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_nv,
&ett_nv_header,
diff --git a/plugins/epan/ethercat/packet-nv.h b/plugins/epan/ethercat/packet-nv.h
index 14eaee03de..0ca7ea8e3e 100644
--- a/plugins/epan/ethercat/packet-nv.h
+++ b/plugins/epan/ethercat/packet-nv.h
@@ -15,19 +15,19 @@
/* Ensure the same data layout for all platforms*/
typedef struct _ETYPE_88A4_NV_DATA_HEADER
{
- guint16 Id;
- guint16 Hash;
- guint16 Length;
- guint16 Quality;
+ uint16_t Id;
+ uint16_t Hash;
+ uint16_t Length;
+ uint16_t Quality;
} ETYPE_88A4_NV_DATA_HEADER;
#define ETYPE_88A4_NV_DATA_HEADER_Len (int)sizeof(ETYPE_88A4_NV_DATA_HEADER)
typedef struct _NvParserHDR
{
- guint8 Publisher[6];
- guint16 CountNV;
- guint16 CycleIndex;
- guint16 Reserved;
+ uint8_t Publisher[6];
+ uint16_t CountNV;
+ uint16_t CycleIndex;
+ uint16_t Reserved;
} NvParserHDR;
#define NvParserHDR_Len (int)sizeof(NvParserHDR)
diff --git a/plugins/epan/falco_bridge/CMakeLists.txt b/plugins/epan/falco_bridge/CMakeLists.txt
index 2e369e2ee5..dea7f9cc67 100644
--- a/plugins/epan/falco_bridge/CMakeLists.txt
+++ b/plugins/epan/falco_bridge/CMakeLists.txt
@@ -18,7 +18,6 @@ set(DISSECTOR_SRC
)
set(DISSECTOR_HEADERS
- conversation-macros.h
sinsp-span.h
)
@@ -35,11 +34,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "Implements a bridge between Falco plugins and Wireshark"
${DISSECTOR_SRC}
)
-add_logray_epan_plugin_library(falco-bridge)
+add_logray_plugin_library(falco-bridge epan)
# XXX Hacks; need to fix in falcosecurity-libs.
target_compile_definitions(falco-bridge PRIVATE
@@ -49,9 +47,14 @@ target_compile_definitions(falco-bridge PRIVATE
target_include_directories(falco-bridge SYSTEM PRIVATE
${SINSP_INCLUDE_DIRS}
- ${ZLIB_INCLUDE_DIR}
)
+if(WIN32)
+ # libsinsp/dumper.h includes libscap/scap_savefile_api.h, which includes
+ # libscap/scap_zlib.h.
+ target_include_directories(falco-bridge SYSTEM PRIVATE ${ZLIB_INCLUDE_DIR})
+endif()
+
target_link_libraries(falco-bridge
epan
${SINSP_LINK_LIBRARIES}
diff --git a/plugins/epan/falco_bridge/README.md b/plugins/epan/falco_bridge/README.md
index 331e80b26d..88406d086e 100644
--- a/plugins/epan/falco_bridge/README.md
+++ b/plugins/epan/falco_bridge/README.md
@@ -49,7 +49,7 @@ They depend on the following libraries:
- zlib: zlib
Wireshark is released under the GPL version 2 (GPL-2.0-or-later). It and the Apache-2.0 license are compatible via the "any later version" provision in the GPL version 2.
-As discussed at https://www.wireshark.org/lists/wireshark-dev/202203/msg00020.html, combining Wireshark and libsinsp+libscap should be OK, but that in effect invokes the GPLv2's "any later version" provision, making the Wireshark portion of the combined work GPLv3+.
+As discussed at https://lists.wireshark.org/archives/wireshark-dev/202203/msg00020.html, combining Wireshark and libsinsp+libscap should be OK, but that in effect invokes the GPLv2's "any later version" provision, making the Wireshark portion of the combined work GPLv3+.
Debian would appear to concur: https://lists.debian.org/debian-legal/2014/08/msg00102.html.
diff --git a/plugins/epan/falco_bridge/packet-falco-bridge.c b/plugins/epan/falco_bridge/packet-falco-bridge.c
index a5c252aea6..2475c44b80 100644
--- a/plugins/epan/falco_bridge/packet-falco-bridge.c
+++ b/plugins/epan/falco_bridge/packet-falco-bridge.c
@@ -18,8 +18,13 @@
// - Add a configuration preference for individual conversation filters vs ANDing them?
// We would need to add deregister_(|log_)conversation_filter before we implement this.
// - Add syscall IP address conversation support
+// - Add prefs for
+// - set_snaplen
+// - set_dopfailed
+// - set_import_users
#include "config.h"
+#define WS_LOG_DOMAIN "falco-bridge"
#include <stddef.h>
#include <stdint.h>
@@ -32,14 +37,17 @@
#include <wiretap/wtap.h>
+#include <epan/conversation.h>
+#include <epan/conversation_filter.h>
+#include <epan/dfilter/dfilter-translator.h>
+#include <epan/dfilter/sttype-field.h>
+#include <epan/dfilter/sttype-op.h>
#include <epan/exceptions.h>
#include <epan/follow.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/proto.h>
#include <epan/proto_data.h>
-#include <epan/conversation.h>
-#include <epan/conversation_filter.h>
#include <epan/stats_tree.h>
#include <epan/stat_tap_ui.h>
#include <epan/tap.h>
@@ -80,7 +88,8 @@ typedef struct bridge_info {
hf_register_info* hf_v6;
int *hf_v6_ids;
int* hf_id_to_addr_id; // Maps an hf offset to an hf_v[46] offset
- uint32_t visible_fields;
+ unsigned visible_fields;
+ unsigned addr_fields;
uint32_t* field_flags;
int* field_ids;
uint32_t num_conversation_filters;
@@ -119,31 +128,32 @@ static int ett_lineage[N_PROC_LINEAGE_ENTRIES];
static int ett_sinsp_enriched;
static int ett_sinsp_span;
static int ett_address;
+static int ett_json;
static int container_io_tap;
-static gboolean pref_show_internal = false;
+static bool pref_show_internal;
static dissector_table_t ptype_dissector_table;
+static dissector_handle_t json_handle;
static int fd_follow_tap;
static int dissect_sinsp_enriched(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *bi_ptr, sysdig_event_param_data *event_param_data);
static int dissect_sinsp_plugin(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *bi_ptr);
-static bridge_info* get_bridge_info(guint32 source_id);
+static bridge_info* get_bridge_info(uint32_t source_id);
const char* get_str_value(sinsp_field_extract_t *sinsp_fields, uint32_t sf_idx);
/*
* Array of plugin bridges
*/
-bridge_info* bridges = NULL;
-guint nbridges = 0;
-guint n_conv_fields = 0;
+bridge_info* bridges;
+size_t nbridges;
/*
* sinsp extractor span
*/
-sinsp_span_t *sinsp_span = NULL;
+sinsp_span_t *sinsp_span;
/*
* Fields
@@ -193,13 +203,13 @@ is_string_address_field(enum ftenum ftype, const char *abbrev) {
return false;
}
-static gboolean
+static bool
is_filter_valid(packet_info *pinfo, void *cfi_ptr)
{
conv_filter_info *cfi = (conv_filter_info *)cfi_ptr;
if (!cfi->is_present) {
- return FALSE;
+ return false;
}
int proto_id = proto_registrar_get_parent(cfi->field_info->hfinfo.id);
@@ -211,18 +221,150 @@ is_filter_valid(packet_info *pinfo, void *cfi_ptr)
return proto_is_frame_protocol(pinfo->layers, proto_registrar_get_nth(proto_id)->abbrev);
}
-static gchar*
-build_filter(packet_info *pinfo _U_, void *cfi_ptr)
+static char*
+build_conversation_filter(packet_info *pinfo _U_, void *cfi_ptr)
{
conv_filter_info *cfi = (conv_filter_info *)cfi_ptr;
if (!cfi->is_present) {
- return FALSE;
+ return NULL;
}
return ws_strdup_printf("%s eq %s", cfi->field_info->hfinfo.abbrev, cfi->strbuf->str);
}
+// Falco rule translation
+
+const char *
+stnode_op_to_string(stnode_op_t op) {
+ switch (op) {
+ case STNODE_OP_NOT: return "!";
+ case STNODE_OP_AND: return "and";
+ case STNODE_OP_OR: return "or";
+ case STNODE_OP_ANY_EQ: return "=";
+ case STNODE_OP_ALL_NE: return "!=";
+ case STNODE_OP_GT: return ">";
+ case STNODE_OP_GE: return ">=";
+ case STNODE_OP_LT: return "<";
+ case STNODE_OP_LE: return "<=";
+ case STNODE_OP_CONTAINS: return "icontains";
+ case STNODE_OP_UNARY_MINUS: return "-";
+ case STNODE_OP_IN:
+ case STNODE_OP_NOT_IN:
+ default:
+ break;
+ }
+ return NULL;
+}
+
+char *hfinfo_to_filtercheck(header_field_info *hfinfo) {
+ if (!hfinfo) {
+ return NULL;
+ }
+
+ const char *filtercheck = NULL;
+ for (size_t br_idx = 0; br_idx < nbridges && !filtercheck; br_idx++) {
+ bridge_info *bridge = &bridges[br_idx];
+ unsigned hf_idx;
+ for (hf_idx = 0; hf_idx < bridge->visible_fields; hf_idx++) {
+ if (hfinfo->id == bridge->hf_ids[hf_idx]) {
+ ptrdiff_t pfx_off = 0;
+ if (g_str_has_prefix(hfinfo->abbrev, FALCO_FIELD_NAME_PREFIX)) {
+ pfx_off = strlen(FALCO_FIELD_NAME_PREFIX);
+ }
+ return g_strdup(hfinfo->abbrev + pfx_off);
+ }
+ }
+ for (hf_idx = 0; hf_idx < bridge->addr_fields; hf_idx++) {
+ if (hfinfo->id == bridge->hf_v4_ids[hf_idx] || hfinfo->id == bridge->hf_v6_ids[hf_idx]) {
+ size_t fc_len = strlen(hfinfo->abbrev) - strlen(".v?");
+ return g_strndup(hfinfo->abbrev, fc_len);
+ }
+ }
+ }
+ return NULL;
+}
+
+// Falco rule syntax is specified at
+// https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/filter/parser.h
+
+// NOLINTNEXTLINE(misc-no-recursion)
+bool visit_dfilter_node(stnode_t *node, stnode_op_t parent_bool_op, GString *falco_rule)
+{
+ stnode_t *left, *right;
+
+ if (stnode_type_id(node) == STTYPE_TEST) {
+ stnode_op_t op = STNODE_OP_UNINITIALIZED;
+ sttype_oper_get(node, &op, &left, &right);
+
+ const char *op_str = stnode_op_to_string(op);
+ if (!op_str) {
+ return false;
+ }
+
+ if (left && right) {
+ if ((op == STNODE_OP_ANY_EQ || op == STNODE_OP_ALL_NE) && stnode_type_id(right) != STTYPE_FVALUE) {
+ // XXX Not yet supported; need to add a version check.
+ return false;
+ }
+ bool add_parens = (op == STNODE_OP_AND || op == STNODE_OP_OR) && op != parent_bool_op && parent_bool_op != STNODE_OP_UNINITIALIZED;
+ if (add_parens) {
+ g_string_append_c(falco_rule, '(');
+ }
+ if (!visit_dfilter_node(left, op, falco_rule)) {
+ return false;
+ }
+ g_string_append_printf(falco_rule, " %s ", op_str);
+ if (!visit_dfilter_node(right, op, falco_rule)) {
+ return false;
+ }
+ if (add_parens) {
+ g_string_append_c(falco_rule, ')');
+ }
+ }
+ else if (left) {
+ op = op == STNODE_OP_NOT ? op : parent_bool_op;
+ if (falco_rule->len > 0) {
+ g_string_append_c(falco_rule, ' ');
+ }
+ g_string_append_printf(falco_rule, "%s ", op_str);
+ if (!visit_dfilter_node(left, op, falco_rule)) {
+ return false;
+ }
+ }
+ else if (right) {
+ ws_assert_not_reached();
+ }
+ }
+ else if (stnode_type_id(node) == STTYPE_SET) {
+ return false;
+ }
+ else if (stnode_type_id(node) == STTYPE_FUNCTION) {
+ return false;
+ }
+ else if (stnode_type_id(node) == STTYPE_FIELD) {
+ header_field_info *hfinfo = sttype_field_hfinfo(node);
+ char *filtercheck = hfinfo_to_filtercheck(hfinfo);
+ if (!filtercheck) {
+ return false;
+ }
+ g_string_append_printf(falco_rule, "%s", filtercheck);
+ g_free(filtercheck);
+ }
+ else if (stnode_type_id(node) == STTYPE_FVALUE) {
+ g_string_append_printf(falco_rule, "%s", stnode_tostr(node, true));
+ }
+ else {
+ g_string_append_printf(falco_rule, "%s", stnode_type_name(node));
+ }
+
+ return true;
+}
+
+bool dfilter_to_falco_rule(stnode_t *root_node, GString *falco_rule) {
+ return visit_dfilter_node(root_node, STNODE_OP_UNINITIALIZED, falco_rule);
+}
+
static void
create_source_hfids(bridge_info* bi)
{
@@ -233,7 +375,7 @@ create_source_hfids(bridge_info* bi)
size_t tot_fields = get_sinsp_source_nfields(bi->ssi);
bi->visible_fields = 0;
- uint32_t addr_fields = 0;
+ bi->addr_fields = 0;
sinsp_field_info_t sfi;
bi->num_conversation_filters = 0;
@@ -247,7 +389,7 @@ create_source_hfids(bridge_info* bi)
continue;
}
if (sfi.is_numeric_address || is_string_address_field(sfi.type, sfi.abbrev)) {
- addr_fields++;
+ bi->addr_fields++;
}
bi->visible_fields++;
@@ -260,14 +402,14 @@ create_source_hfids(bridge_info* bi)
bi->hf = (hf_register_info*)wmem_alloc(wmem_epan_scope(), bi->visible_fields * sizeof(hf_register_info));
bi->hf_ids = (int*)wmem_alloc0(wmem_epan_scope(), bi->visible_fields * sizeof(int));
bi->field_ids = (int*)wmem_alloc(wmem_epan_scope(), bi->visible_fields * sizeof(int));
- bi->field_flags = (guint32*)wmem_alloc(wmem_epan_scope(), bi->visible_fields * sizeof(guint32));
+ bi->field_flags = (uint32_t*)wmem_alloc(wmem_epan_scope(), bi->visible_fields * sizeof(uint32_t));
- if (addr_fields) {
+ if (bi->addr_fields) {
bi->hf_id_to_addr_id = (int *)wmem_alloc(wmem_epan_scope(), bi->visible_fields * sizeof(int));
- bi->hf_v4 = (hf_register_info*)wmem_alloc(wmem_epan_scope(), addr_fields * sizeof(hf_register_info));
- bi->hf_v4_ids = (int*)wmem_alloc0(wmem_epan_scope(), addr_fields * sizeof(int));
- bi->hf_v6 = (hf_register_info*)wmem_alloc(wmem_epan_scope(), addr_fields * sizeof(hf_register_info));
- bi->hf_v6_ids = (int*)wmem_alloc0(wmem_epan_scope(), addr_fields * sizeof(int));
+ bi->hf_v4 = (hf_register_info*)wmem_alloc(wmem_epan_scope(), bi->addr_fields * sizeof(hf_register_info));
+ bi->hf_v4_ids = (int*)wmem_alloc0(wmem_epan_scope(), bi->addr_fields * sizeof(int));
+ bi->hf_v6 = (hf_register_info*)wmem_alloc(wmem_epan_scope(), bi->addr_fields * sizeof(hf_register_info));
+ bi->hf_v6_ids = (int*)wmem_alloc0(wmem_epan_scope(), bi->addr_fields * sizeof(int));
}
if (bi->num_conversation_filters) {
@@ -327,7 +469,7 @@ create_source_hfids(bridge_info* bi)
fdisplay = BASE_OCT;
break;
default:
- THROW_FORMATTED(DissectorError, "error in source %s: format %d for field %s is not supported",
+ THROW_FORMATTED(DissectorError, "error in Falco bridge plugin %s: format %d for field %s is not supported",
get_sinsp_source_name(bi->ssi), sfi.display_format, sfi.abbrev);
}
break;
@@ -338,6 +480,11 @@ create_source_hfids(bridge_info* bi)
sfi.abbrev, sfi.type);
}
+ if(strlen(sfi.display) == 0) {
+ THROW_FORMATTED(DissectorError, "error in Falco bridge plugin %s: field %s is missing display name",
+ get_sinsp_source_name(bi->ssi), sfi.abbrev);
+ }
+
hf_register_info finfo = {
bi->hf_ids + fld_cnt,
{
@@ -357,7 +504,7 @@ create_source_hfids(bridge_info* bi)
const char *source_name = get_sinsp_source_name(bi->ssi);
const char *conv_filter_name = wmem_strdup_printf(wmem_epan_scope(), "%s %s", source_name, bi->hf[fld_cnt].hfinfo.name);
- register_log_conversation_filter(source_name, conv_filter_name, is_filter_valid, build_filter, &bi->conversation_filters[conv_fld_cnt]);
+ register_log_conversation_filter(source_name, conv_filter_name, is_filter_valid, build_conversation_filter, &bi->conversation_filters[conv_fld_cnt]);
if (conv_fld_cnt == 0) {
add_conversation_filter_protocol(source_name);
}
@@ -369,7 +516,7 @@ create_source_hfids(bridge_info* bi)
}
if (sfi.is_numeric_address || is_string_address_field(sfi.type, sfi.abbrev)) {
- ws_assert(addr_fld_cnt < addr_fields);
+ ws_assert(addr_fld_cnt < bi->addr_fields);
bi->hf_id_to_addr_id[fld_cnt] = addr_fld_cnt;
hf_register_info finfo_v4 = {
@@ -427,7 +574,7 @@ import_plugin(char* fname)
create_source_hfids(bi);
const char *source_name = get_sinsp_source_name(bi->ssi);
- const char *plugin_name = g_strdup_printf("%s Plugin", source_name);
+ const char *plugin_name = g_strdup_printf("%s Falco Bridge Plugin", source_name);
bi->proto = proto_register_protocol(plugin_name, source_name, source_name);
static dissector_handle_t ct_handle;
@@ -443,7 +590,7 @@ on_wireshark_exit(void)
sinsp_span = NULL;
}
-static gboolean
+static bool
extract_syscall_conversation_fields (packet_info *pinfo, falco_conv_filter_fields* args) {
args->container_id = NULL;
args->pid = -1;
@@ -504,7 +651,7 @@ extract_syscall_conversation_fields (packet_info *pinfo, falco_conv_filter_field
return true;
}
-static gboolean sysdig_syscall_filter_valid(packet_info *pinfo, void *user_data _U_) {
+static bool sysdig_syscall_filter_valid(packet_info *pinfo, void *user_data _U_) {
if (!proto_is_frame_protocol(pinfo->layers, "sysdig")) {
return false;
}
@@ -517,7 +664,7 @@ static gboolean sysdig_syscall_filter_valid(packet_info *pinfo, void *user_data
return true;
}
-static gboolean sysdig_syscall_container_filter_valid(packet_info *pinfo, void *user_data) {
+static bool sysdig_syscall_container_filter_valid(packet_info *pinfo, void *user_data) {
if (!sysdig_syscall_filter_valid(pinfo, user_data)) {
return false;
}
@@ -530,7 +677,7 @@ static gboolean sysdig_syscall_container_filter_valid(packet_info *pinfo, void *
return cff.container_id != NULL;
}
-static gboolean sysdig_syscall_fd_filter_valid(packet_info *pinfo, void *user_data) {
+static bool sysdig_syscall_fd_filter_valid(packet_info *pinfo, void *user_data) {
if (!sysdig_syscall_filter_valid(pinfo, user_data)) {
return false;
}
@@ -539,13 +686,13 @@ static gboolean sysdig_syscall_fd_filter_valid(packet_info *pinfo, void *user_da
return extract_syscall_conversation_fields(pinfo, &cff);
}
-static gchar* sysdig_container_build_filter(packet_info *pinfo, void *user_data _U_) {
+static char* sysdig_container_build_filter(packet_info *pinfo, void *user_data _U_) {
falco_conv_filter_fields cff;
extract_syscall_conversation_fields(pinfo, &cff);
return ws_strdup_printf("container.id==\"%s\"", cff.container_id);
}
-static gchar* sysdig_proc_build_filter(packet_info *pinfo, void *user_data _U_) {
+static char* sysdig_proc_build_filter(packet_info *pinfo, void *user_data _U_) {
falco_conv_filter_fields cff;
extract_syscall_conversation_fields(pinfo, &cff);
if (cff.container_id) {
@@ -555,7 +702,7 @@ static gchar* sysdig_proc_build_filter(packet_info *pinfo, void *user_data _U_)
}
}
-static gchar* sysdig_procdescendants_build_filter(packet_info *pinfo, void *user_data _U_) {
+static char* sysdig_procdescendants_build_filter(packet_info *pinfo, void *user_data _U_) {
falco_conv_filter_fields cff;
extract_syscall_conversation_fields(pinfo, &cff);
@@ -577,7 +724,7 @@ static gchar* sysdig_procdescendants_build_filter(packet_info *pinfo, void *user
}
}
-static gchar* sysdig_thread_build_filter(packet_info *pinfo, void *user_data _U_) {
+static char* sysdig_thread_build_filter(packet_info *pinfo, void *user_data _U_) {
falco_conv_filter_fields cff;
extract_syscall_conversation_fields(pinfo, &cff);
if (cff.container_id) {
@@ -587,7 +734,7 @@ static gchar* sysdig_thread_build_filter(packet_info *pinfo, void *user_data _U_
}
}
-static gchar* sysdig_fd_build_filter(packet_info *pinfo, void *user_data _U_) {
+static char* sysdig_fd_build_filter(packet_info *pinfo, void *user_data _U_) {
falco_conv_filter_fields cff;
extract_syscall_conversation_fields(pinfo, &cff);
if (cff.container_id) {
@@ -600,23 +747,28 @@ static gchar* sysdig_fd_build_filter(packet_info *pinfo, void *user_data _U_) {
}
}
-static gchar *fd_follow_conv_filter(epan_dissect_t *edt _U_, packet_info *pinfo _U_, guint *stream _U_, guint *sub_stream _U_)
+static char *fd_follow_conv_filter(epan_dissect_t *edt _U_, packet_info *pinfo _U_, unsigned *stream _U_, unsigned *sub_stream _U_)
{
+ // This only supports the syscall source.
+ if (pinfo->rec->rec_header.syscall_header.event_type == FALCO_PPME_PLUGINEVENT_E) {
+ return NULL;
+ }
+
return sysdig_fd_build_filter(pinfo, NULL);
}
-static gchar *fd_follow_index_filter(guint stream _U_, guint sub_stream _U_)
+static char *fd_follow_index_filter(unsigned stream _U_, unsigned sub_stream _U_)
{
return NULL;
}
-static gchar *fd_follow_address_filter(address *src_addr _U_, address *dst_addr _U_, int src_port _U_, int dst_port _U_)
+static char *fd_follow_address_filter(address *src_addr _U_, address *dst_addr _U_, int src_port _U_, int dst_port _U_)
{
return NULL;
}
-gchar *
-fd_port_to_display(wmem_allocator_t *allocator _U_, guint port _U_)
+char *
+fd_port_to_display(wmem_allocator_t *allocator _U_, unsigned port _U_)
{
return NULL;
}
@@ -628,7 +780,7 @@ fd_tap_listener(void *tapdata, packet_info *pinfo,
follow_record_t *follow_record;
follow_info_t *follow_info = (follow_info_t *)tapdata;
fd_follow_tap_info *tap_info = (fd_follow_tap_info *)data;
- gboolean is_server;
+ bool is_server;
is_server = tap_info->is_write;
@@ -646,7 +798,7 @@ fd_tap_listener(void *tapdata, packet_info *pinfo,
return TAP_PACKET_DONT_REDRAW;
}
-guint32 get_fd_stream_count(void)
+uint32_t get_fd_stream_count(void)
{
// This effectively disables the "streams" dropdown, which is we don't really care about for the moment in logray.
return 1;
@@ -655,7 +807,7 @@ guint32 get_fd_stream_count(void)
static bridge_info*
-get_bridge_info(guint32 source_id)
+get_bridge_info(uint32_t source_id)
{
if (source_id == 0) {
return &bridges[0];
@@ -681,9 +833,9 @@ dissect_falco_bridge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
// https://github.com/falcosecurity/libs/blob/9c942f27/userspace/libscap/scap.c#L1900
- guint32 source_id = 0;
+ uint32_t source_id = 0;
if (pinfo->rec->rec_header.syscall_header.event_type == FALCO_PPME_PLUGINEVENT_E) {
- source_id = tvb_get_guint32(tvb, 8, encoding);
+ source_id = tvb_get_uint32(tvb, 8, encoding);
}
bridge_info* bi = get_bridge_info(source_id);
@@ -990,7 +1142,7 @@ static int
dissect_sinsp_plugin(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi_ptr)
{
bridge_info* bi = (bridge_info *) bi_ptr;
- guint payload_len = tvb_captured_length(tvb);
+ unsigned payload_len = tvb_captured_length(tvb);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "oops");
/* Clear out stuff in the info column */
@@ -999,7 +1151,7 @@ dissect_sinsp_plugin(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void*
proto_item *ti = tree;
proto_tree* fb_tree = proto_item_add_subtree(ti, ett_sinsp_span);
- guint8* payload = (guint8*)tvb_get_ptr(tvb, 0, payload_len);
+ uint8_t* payload = (uint8_t*)tvb_get_ptr(tvb, 0, payload_len);
plugin_field_extract_t *sinsp_fields = (plugin_field_extract_t*) wmem_alloc(pinfo->pool, sizeof(plugin_field_extract_t) * bi->visible_fields);
for (uint32_t fld_idx = 0; fld_idx < bi->visible_fields; fld_idx++) {
@@ -1059,6 +1211,19 @@ dissect_sinsp_plugin(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void*
proto_item_set_hidden(pi);
}
+ if ((strcmp(hfinfo->abbrev, "ct.response") == 0 ||
+ strcmp(hfinfo->abbrev, "ct.request") == 0 ||
+ strcmp(hfinfo->abbrev, "ct.resources") == 0 ) &&
+ strcmp(sfe->res.str, "null") != 0) {
+ tvbuff_t *json_tvb = tvb_new_child_real_data(tvb, sfe->res.str, (unsigned)strlen(sfe->res.str), (unsigned)strlen(sfe->res.str));
+ add_new_data_source(pinfo, json_tvb, "JSON Object");
+ proto_tree *json_tree = proto_item_add_subtree(pi, ett_json);
+ char *col_info_text = wmem_strdup(pinfo->pool, col_get_text(pinfo->cinfo, COL_INFO));
+ call_dissector(json_handle, json_tvb, pinfo, json_tree);
+
+ /* Restore Protocol and Info columns */
+ col_set_str(pinfo->cinfo, COL_INFO, col_info_text);
+ }
int addr_fld_idx = bi->hf_id_to_addr_id[fld_idx];
if (addr_fld_idx >= 0) {
ws_in4_addr v4_addr;
@@ -1140,8 +1305,8 @@ const char *st_str_container_total_io = "Total";
static void container_io_stats_tree_init(stats_tree* st _U_)
{
- stats_tree_create_node(st, st_str_container_total_io, 0, STAT_DT_INT, TRUE);
- stat_node_set_flags(st, st_str_container_total_io, 0, FALSE, ST_FLG_SORT_TOP);
+ stats_tree_create_node(st, st_str_container_total_io, 0, STAT_DT_INT, true);
+ stat_node_set_flags(st, st_str_container_total_io, 0, false, ST_FLG_SORT_TOP);
}
@@ -1149,14 +1314,14 @@ static tap_packet_status container_io_stats_tree_event(stats_tree* st, packet_in
{
const container_io_tap_info* tap_info = (const container_io_tap_info*) tap_info_p;
- increase_stat_node(st, st_str_container_total_io, 0, FALSE, tap_info->io_bytes);
- int container_id_node = increase_stat_node(st, tap_info->container_id, 0, TRUE, tap_info->io_bytes);
- int proc_name_node = increase_stat_node(st, tap_info->proc_name, container_id_node, TRUE, tap_info->io_bytes);
- int fd_name_node = increase_stat_node(st, tap_info->fd_name, proc_name_node, TRUE, tap_info->io_bytes);
+ increase_stat_node(st, st_str_container_total_io, 0, false, tap_info->io_bytes);
+ int container_id_node = increase_stat_node(st, tap_info->container_id, 0, true, tap_info->io_bytes);
+ int proc_name_node = increase_stat_node(st, tap_info->proc_name, container_id_node, true, tap_info->io_bytes);
+ int fd_name_node = increase_stat_node(st, tap_info->fd_name, proc_name_node, true, tap_info->io_bytes);
if (tap_info->is_write) {
- increase_stat_node(st, "write", fd_name_node, TRUE, tap_info->io_bytes);
+ increase_stat_node(st, "write", fd_name_node, true, tap_info->io_bytes);
} else {
- increase_stat_node(st, "read", fd_name_node, TRUE, tap_info->io_bytes);
+ increase_stat_node(st, "read", fd_name_node, true, tap_info->io_bytes);
}
return TAP_PACKET_REDRAW;
@@ -1170,6 +1335,7 @@ proto_reg_handoff_falcoplugin(void)
stats_tree_set_group(st_config, REGISTER_LOG_STAT_GROUP_UNSORTED);
stats_tree_set_first_column_name(st_config, "Container, process, and FD I/O");
+ json_handle = find_dissector("json");
}
void
@@ -1236,6 +1402,8 @@ proto_register_falcoplugin(void)
WS_DIR *dir;
WS_DIRENT *file;
char *filename;
+ // XXX Falco plugins should probably be installed in a path that reflects
+ // the Falco version or its plugin API version.
char *spdname = g_build_filename(get_plugins_dir(), "falco", NULL);
char *ppdname = g_build_filename(get_plugins_pers_dir(), "falco", NULL);
@@ -1307,6 +1475,7 @@ proto_register_falcoplugin(void)
&ett_sinsp_enriched,
&ett_sinsp_span,
&ett_address,
+ &ett_json,
};
/*
@@ -1335,5 +1504,7 @@ proto_register_falcoplugin(void)
proto_register_subtree_array(ett, array_length(ett));
proto_register_subtree_array(ett_lin, array_length(ett_lin));
+ register_dfilter_translator("Falco rule", dfilter_to_falco_rule);
+
register_shutdown_routine(on_wireshark_exit);
}
diff --git a/plugins/epan/falco_bridge/sinsp-span.cpp b/plugins/epan/falco_bridge/sinsp-span.cpp
index 98612f8cbf..051469c9a4 100644
--- a/plugins/epan/falco_bridge/sinsp-span.cpp
+++ b/plugins/epan/falco_bridge/sinsp-span.cpp
@@ -11,14 +11,17 @@
*/
#include "config.h"
+#define WS_LOG_DOMAIN "sinsp-span"
#include <stddef.h>
#include <stdint.h>
#include <glib.h>
+#include <epan/dfilter/dfilter-translator.h>
#include <epan/wmem_scopes.h>
+#include <wsutil/array.h>
#include <wsutil/unicode-utils.h>
#ifdef _MSC_VER
@@ -41,14 +44,14 @@ typedef struct ss_plugin_info ss_plugin_info;
#include "sinsp-span.h"
-#include <sinsp.h>
+#include <libsinsp/sinsp.h>
typedef struct sinsp_source_info_t {
sinsp_plugin *source;
std::vector<const filter_check_info *> syscall_filter_checks;
std::vector<const filtercheck_field_info *> syscall_filter_fields;
- std::vector<gen_event_filter_check *> syscall_event_filter_checks; // Same size as syscall_filter_fields
- std::vector<sinsp_syscall_category_e> field_to_category; // Same size as syscall_filter_fields
+ std::vector<std::unique_ptr<sinsp_filter_check>> syscall_event_filter_checks; // Same size as syscall_filter_fields
+ std::vector<sinsp_syscall_category_e> field_to_category; // Same size as syscall_filter_fields
sinsp_evt *evt;
uint8_t *evt_storage;
size_t evt_storage_size;
@@ -291,29 +294,29 @@ const filtercheck_field_info proc_lineage_event_fields[] = {
};
void add_arg_event(uint32_t arg_number,
- sinsp_filter_factory* filter_factory,
+ sinsp_span_t *sinsp_span,
sinsp_source_info_t *ssi,
sinsp_syscall_category_e args_syscall_category) {
- if (arg_number >= sizeof(args_event_fields) / sizeof(args_event_fields[0])) {
+ if (arg_number >= array_length(args_event_fields)) {
ws_error("falco event has too many arguments (%" PRIu32 ")", arg_number);
}
std::string fname = "evt.arg[" + std::to_string(arg_number) + "]";
const filtercheck_field_info *ffi = &args_event_fields[arg_number];
- gen_event_filter_check *gefc = filter_factory->new_filtercheck(fname.c_str());
- if (!gefc) {
+ std::unique_ptr<sinsp_filter_check> sfc = sinsp_span->filter_checks.new_filter_check_from_fldname(fname.c_str(), &sinsp_span->inspector, true);
+ if (!sfc) {
ws_error("cannot find expected Falco field evt.arg");
}
- gefc->parse_field_name(fname.c_str(), true, false);
+ sfc->parse_field_name(fname.c_str(), true, false);
ssi->field_to_category.push_back(args_syscall_category);
- ssi->syscall_event_filter_checks.push_back(gefc);
+ ssi->syscall_event_filter_checks.push_back(std::move(sfc));
ssi->syscall_filter_fields.push_back(ffi);
}
-void create_args_source(sinsp_source_info_t *ssi,
- sinsp_filter_factory* filter_factory,
+void create_args_source(sinsp_span_t *sinsp_span,
+ sinsp_source_info_t *ssi,
const filter_check_info* fci) {
g_args_fci.m_name = "args";
sinsp_syscall_category_e args_syscall_category = filtercheck_name_to_category(g_args_fci.m_name);
@@ -321,7 +324,7 @@ void create_args_source(sinsp_source_info_t *ssi,
g_args_fci = *fci;
for (uint32_t i = 0; i < 32; i++) {
- add_arg_event(i, filter_factory, ssi, args_syscall_category);
+ add_arg_event(i, sinsp_span, ssi, args_syscall_category);
}
ssi->syscall_filter_checks.push_back(&g_args_fci);
}
@@ -334,14 +337,14 @@ void add_lineage_field(std::string basefname,
sinsp_syscall_category_e args_syscall_category) {
std::string fname = basefname + "[" + std::to_string(ancestor_number) + "]";
const filtercheck_field_info *ffi = &proc_lineage_event_fields[(ancestor_number - 1) * N_PROC_LINEAGE_ENTRY_FIELDS + field_number];
- gen_event_filter_check *gefc = filter_factory->new_filtercheck(fname.c_str());
- if (!gefc) {
+ std::unique_ptr<sinsp_filter_check> sfc = filter_factory->new_filtercheck(fname.c_str());
+ if (!sfc) {
ws_error("cannot find expected Falco field evt.arg");
}
- gefc->parse_field_name(fname.c_str(), true, false);
+ sfc->parse_field_name(fname.c_str(), true, false);
ssi->field_to_category.push_back(args_syscall_category);
- ssi->syscall_event_filter_checks.push_back(gefc);
+ ssi->syscall_event_filter_checks.push_back(std::move(sfc));
ssi->syscall_filter_fields.push_back(ffi);
}
@@ -350,7 +353,7 @@ void add_lineage_events(uint32_t ancestor_number,
sinsp_source_info_t *ssi,
sinsp_syscall_category_e args_syscall_category) {
- if (ancestor_number >= sizeof(proc_lineage_event_fields) / sizeof(proc_lineage_event_fields[0]) / N_PROC_LINEAGE_ENTRY_FIELDS) {
+ if (ancestor_number >= array_length(proc_lineage_event_fields) / N_PROC_LINEAGE_ENTRY_FIELDS) {
ws_error("falco lineage mismatch (%" PRIu32 ")", ancestor_number);
}
@@ -384,7 +387,7 @@ bool skip_field(const filtercheck_field_info *ffi) {
}
/*
- * We want the flexibility to decide the deiplay order of the fields in the UI, since
+ * We want the flexibility to decide the display order of the fields in the UI, since
* the order in which they are defined in filterchecks.{cpp,h} is not necessarily the one we want.
*/
void reorder_syscall_fields(std::vector<const filter_check_info*>* all_syscall_fields) {
@@ -403,7 +406,6 @@ void reorder_syscall_fields(std::vector<const filter_check_info*>* all_syscall_f
void create_sinsp_syscall_source(sinsp_span_t *sinsp_span, sinsp_source_info_t **ssi_ptr) {
sinsp_source_info_t *ssi = new sinsp_source_info_t();
- std::shared_ptr<gen_event_filter_factory> factory(new sinsp_filter_factory(NULL, sinsp_span->filter_checks));
sinsp_filter_factory filter_factory(&sinsp_span->inspector, sinsp_span->filter_checks);
std::vector<const filter_check_info*> all_syscall_fields;
@@ -420,7 +422,7 @@ void create_sinsp_syscall_source(sinsp_span_t *sinsp_span, sinsp_source_info_t *
// This creates a meta-filtercheck for the events arguments and it register its fields.
// We do it before the process filtercheck because we want to have it exactly in the position
// after event and before process.
- create_args_source(ssi, &filter_factory, fci);
+ create_args_source(sinsp_span, ssi, fci);
} else if (fci->m_name == "fd") {
// This creates a meta-filtercheck for process lineage.
// We do it before the fd filtercheck because we want it to be between the proc and fd trees.
@@ -437,8 +439,8 @@ void create_sinsp_syscall_source(sinsp_span_t *sinsp_span, sinsp_source_info_t *
continue;
}
- gen_event_filter_check *gefc = filter_factory.new_filtercheck(ffi->m_name);
- if (!gefc) {
+ std::unique_ptr<sinsp_filter_check> sfc = filter_factory.new_filtercheck(ffi->m_name);
+ if (!sfc) {
continue;
}
if (strcmp(ffi->m_name, "evt.category") == 0) {
@@ -450,9 +452,9 @@ void create_sinsp_syscall_source(sinsp_span_t *sinsp_span, sinsp_source_info_t *
if (strcmp(ffi->m_name, "proc.pid") == 0) {
ssi->proc_id_idx = (uint16_t) ssi->syscall_filter_fields.size();
}
- gefc->parse_field_name(ffi->m_name, true, false);
+ sfc->parse_field_name(ffi->m_name, true, false);
ssi->field_to_category.push_back(syscall_category);
- ssi->syscall_event_filter_checks.push_back(gefc);
+ ssi->syscall_event_filter_checks.push_back(std::move(sfc));
ssi->syscall_filter_fields.push_back(ffi);
}
}
@@ -463,8 +465,8 @@ void create_sinsp_syscall_source(sinsp_span_t *sinsp_span, sinsp_source_info_t *
ssi->evt = new sinsp_evt(&sinsp_span->inspector);
ssi->evt_storage_size = 4096;
ssi->evt_storage = (uint8_t *) g_malloc(ssi->evt_storage_size);
- ssi->name = strdup(sinsp_syscall_event_source_name);
- ssi->description = strdup(sinsp_syscall_event_source_name);
+ ssi->name = g_strdup(sinsp_syscall_event_source_name);
+ ssi->description = g_strdup(sinsp_syscall_event_source_name);
*ssi_ptr = ssi;
return;
}
@@ -503,8 +505,8 @@ create_sinsp_plugin_source(sinsp_span_t *sinsp_span, const char* libname, sinsp_
ssi->evt = new sinsp_evt(&sinsp_span->inspector);
ssi->evt_storage_size = 4096;
ssi->evt_storage = (uint8_t *) g_malloc(ssi->evt_storage_size);
- ssi->name = strdup(ssi->source->name().c_str());
- ssi->description = strdup(ssi->source->description().c_str());
+ ssi->name = g_strdup(ssi->source->name().c_str());
+ ssi->description = g_strdup(ssi->source->description().c_str());
*ssi_ptr = ssi;
return NULL;
}
@@ -521,9 +523,9 @@ const char *get_sinsp_source_last_error(sinsp_source_info_t *ssi)
{
if (ssi->source) {
if (ssi->last_error) {
- free(ssi->last_error);
+ g_free(ssi->last_error);
}
- ssi->last_error = strdup(ssi->source->get_last_error().c_str());
+ ssi->last_error = g_strdup(ssi->source->get_last_error().c_str());
}
return ssi->last_error;
}
@@ -661,6 +663,19 @@ char* get_evt_arg_name(void* sinp_evt_info, uint32_t arg_num) {
return realinfo->params[arg_num].name;
}
+// Ensure that our caches can index evt_num - 1
+static void ensure_cache_size(sinsp_span_t *sinsp_span, uint64_t evt_num)
+{
+ if (evt_num <= sinsp_span->sfe_ptrs.size()) {
+ // Not necessarily an error, e.g. if we're expanding to handle a frame number at EOF
+ return;
+ }
+ // XXX check for evt_num < 1?
+ sinsp_span->sfe_ptrs.resize(evt_num);
+ sinsp_span->sfe_lengths.resize(evt_num);
+ sinsp_span->sfe_infos.resize(evt_num);
+}
+
void open_sinsp_capture(sinsp_span_t *sinsp_span, const char *filepath)
{
sinsp_span->sfe_slab = NULL;
@@ -688,14 +703,6 @@ static void add_syscall_event_to_cache(sinsp_span_t *sinsp_span, sinsp_source_in
{
uint64_t evt_num = evt->get_num();
- // Fill in any gaps
- if (evt_num > 1 && evt_num - 1 > sinsp_span->sfe_ptrs.size()) {
- ws_debug("Filling syscall gap from %d to %u", (int) sinsp_span->sfe_ptrs.size(), (unsigned) evt_num - 1);
- sinsp_span->sfe_ptrs.resize(evt_num - 1);
- sinsp_span->sfe_lengths.resize(evt_num - 1);
- sinsp_span->sfe_infos.resize(evt_num - 1);
- }
-
// libsinsp requires that events be processed in order so we cache our extracted
// data during the first pass. We don't know how many fields we're going to extract
// during an event, so we preallocate slabs of `sfe_slab_prealloc` entries.
@@ -727,8 +734,8 @@ static void add_syscall_event_to_cache(sinsp_span_t *sinsp_span, sinsp_source_in
// First check for internal events.
// XXX We should skip this if "Show internal events" is enabled.
- auto gefc = ssi->syscall_event_filter_checks[ssi->evt_category_idx];
- if (!gefc->extract(evt, values, false) || values.size() < 1) {
+ auto sfc = ssi->syscall_event_filter_checks[ssi->evt_category_idx].get();
+ if (!sfc->extract(evt, values, false) || values.size() < 1) {
return;
}
if (strcmp((const char *) values[0].ptr, "internal") == 0) {
@@ -736,9 +743,9 @@ static void add_syscall_event_to_cache(sinsp_span_t *sinsp_span, sinsp_source_in
}
for (size_t fc_idx = 0; fc_idx < ssi->syscall_event_filter_checks.size(); fc_idx++) {
- gefc = ssi->syscall_event_filter_checks[fc_idx];
+ sfc = ssi->syscall_event_filter_checks[fc_idx].get();
values.clear();
- if (!gefc->extract(evt, values, false) || values.size() < 1) {
+ if (!sfc->extract(evt, values, false) || values.size() < 1) {
continue;
}
auto ffi = ssi->syscall_filter_fields[fc_idx];
@@ -786,6 +793,11 @@ static void add_syscall_event_to_cache(sinsp_span_t *sinsp_span, sinsp_source_in
sfe->res.u64 = *(uint64_t *)values[0].ptr;
break;
case PT_CHARBUF:
+ if (*values[0].ptr == '\0') {
+ // XXX libsinsp 0.14.1 sometimes returns garbage / large length values for empty strings.
+ // ws_warning("charbuf value length %u should be 0", values[0].len);
+ values[0].len = 0;
+ }
if (values[0].len < SFE_SMALL_BUF_SIZE) {
// XXX We need to convert this to valid UTF-8
g_strlcpy(sfe->res.small_str, (const char *) values[0].ptr, SFE_SMALL_BUF_SIZE);
@@ -811,13 +823,11 @@ static void add_syscall_event_to_cache(sinsp_span_t *sinsp_span, sinsp_source_in
}
sinsp_span->sfe_slab_offset += sfe_idx;
- sinsp_span->sfe_ptrs.push_back(sfe_block);
- sinsp_span->sfe_lengths.push_back(sfe_idx);
- sinsp_span->sfe_infos.push_back(evt->get_info());
- if (sinsp_span->sfe_ptrs.size() < evt_num) {
- ws_warning("Unable to fill cache to the proper size (%d vs %u)", (int) sinsp_span->sfe_ptrs.size(), (unsigned) evt_num);
- }
+ ensure_cache_size(sinsp_span, evt_num);
+ sinsp_span->sfe_ptrs[evt_num - 1] = sfe_block;
+ sinsp_span->sfe_lengths[evt_num - 1] = sfe_idx;
+ sinsp_span->sfe_infos[evt_num - 1] = evt->get_info();
return;
}
@@ -876,9 +886,6 @@ bool extract_syscall_source_fields(sinsp_span_t *sinsp_span, sinsp_source_info_t
return false;
}
- // libsinsp event numbers may or may not be contiguous. Make sure our event cache is at
- // least as large as the current frame number. add_syscall_event_to_cache will fill in
- // any gaps with null entries.
while (frame_num > sinsp_span->sfe_ptrs.size()) {
sinsp_evt *evt = NULL;
try {
@@ -887,11 +894,13 @@ bool extract_syscall_source_fields(sinsp_span_t *sinsp_span, sinsp_source_info_t
case SCAP_TIMEOUT:
case SCAP_FILTERED_EVENT:
break;
+ case SCAP_UNEXPECTED_BLOCK:
+ ws_debug("Filling unexpected block gap from %d to %u", (int) sinsp_span->sfe_ptrs.size(), frame_num);
+ ensure_cache_size(sinsp_span, frame_num);
+ break;
case SCAP_EOF:
- ws_debug("Filling syscall EOF gap from %d to %u", (int) sinsp_span->sfe_ptrs.size(), frame_num);
- sinsp_span->sfe_ptrs.resize(frame_num);
- sinsp_span->sfe_lengths.resize(frame_num);
- sinsp_span->sfe_infos.resize(frame_num);
+ ws_debug("Filling syscall EOF gap from %d to %u at %u", (int) sinsp_span->sfe_ptrs.size(), frame_num, (unsigned)sinsp_span->inspector.get_bytes_read());
+ ensure_cache_size(sinsp_span, frame_num);
break;
case SCAP_SUCCESS:
add_syscall_event_to_cache(sinsp_span, ssi, evt);
diff --git a/plugins/epan/gryphon/CMakeLists.txt b/plugins/epan/gryphon/CMakeLists.txt
index 22bb87cf2b..e047c06911 100644
--- a/plugins/epan/gryphon/CMakeLists.txt
+++ b/plugins/epan/gryphon/CMakeLists.txt
@@ -29,11 +29,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "Gryphon automotive network tool protocol"
${DISSECTOR_SRC}
)
-add_wireshark_epan_plugin_library(gryphon)
+add_wireshark_plugin_library(gryphon epan)
target_link_libraries(gryphon epan)
diff --git a/plugins/epan/gryphon/packet-gryphon.c b/plugins/epan/gryphon/packet-gryphon.c
index 2b4d4532b7..41922ac68e 100644
--- a/plugins/epan/gryphon/packet-gryphon.c
+++ b/plugins/epan/gryphon/packet-gryphon.c
@@ -26,6 +26,8 @@
#include <epan/proto_data.h>
#include <epan/conversation.h>
#include <epan/dissectors/packet-tcp.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include <wsutil/str_util.h>
#include "packet-gryphon.h"
@@ -338,51 +340,51 @@ static int hf_gryphon_filenames;
static int hf_gryphon_program_channel_number;
static int hf_gryphon_valid_header_length;
-static gint ett_gryphon;
-static gint ett_gryphon_header;
-static gint ett_gryphon_body;
-static gint ett_gryphon_command_data;
-static gint ett_gryphon_response_data;
-static gint ett_gryphon_data_header;
-static gint ett_gryphon_flags;
-static gint ett_gryphon_data_body;
-static gint ett_gryphon_cmd_filter_block;
-static gint ett_gryphon_cmd_events_data;
-static gint ett_gryphon_cmd_config_device;
-static gint ett_gryphon_cmd_sched_data;
-static gint ett_gryphon_cmd_sched_cmd;
-static gint ett_gryphon_cmd_response_block;
-static gint ett_gryphon_pgm_list;
-static gint ett_gryphon_pgm_status;
-static gint ett_gryphon_pgm_options;
-static gint ett_gryphon_valid_headers;
-static gint ett_gryphon_usdt_data;
-static gint ett_gryphon_usdt_action_flags;
-static gint ett_gryphon_usdt_tx_options_flags;
-static gint ett_gryphon_usdt_rx_options_flags;
-static gint ett_gryphon_usdt_len_options_flags;
-static gint ett_gryphon_usdt_data_block;
-static gint ett_gryphon_lin_emulate_node;
-static gint ett_gryphon_ldf_block;
-static gint ett_gryphon_ldf_schedule_name;
-static gint ett_gryphon_lin_schedule_msg;
-static gint ett_gryphon_cnvt_getflags;
-static gint ett_gryphon_digital_data;
-static gint ett_gryphon_blm_mode;
+static int ett_gryphon;
+static int ett_gryphon_header;
+static int ett_gryphon_body;
+static int ett_gryphon_command_data;
+static int ett_gryphon_response_data;
+static int ett_gryphon_data_header;
+static int ett_gryphon_flags;
+static int ett_gryphon_data_body;
+static int ett_gryphon_cmd_filter_block;
+static int ett_gryphon_cmd_events_data;
+static int ett_gryphon_cmd_config_device;
+static int ett_gryphon_cmd_sched_data;
+static int ett_gryphon_cmd_sched_cmd;
+static int ett_gryphon_cmd_response_block;
+static int ett_gryphon_pgm_list;
+static int ett_gryphon_pgm_status;
+static int ett_gryphon_pgm_options;
+static int ett_gryphon_valid_headers;
+static int ett_gryphon_usdt_data;
+static int ett_gryphon_usdt_action_flags;
+static int ett_gryphon_usdt_tx_options_flags;
+static int ett_gryphon_usdt_rx_options_flags;
+static int ett_gryphon_usdt_len_options_flags;
+static int ett_gryphon_usdt_data_block;
+static int ett_gryphon_lin_emulate_node;
+static int ett_gryphon_ldf_block;
+static int ett_gryphon_ldf_schedule_name;
+static int ett_gryphon_lin_schedule_msg;
+static int ett_gryphon_cnvt_getflags;
+static int ett_gryphon_digital_data;
+static int ett_gryphon_blm_mode;
static expert_field ei_gryphon_type;
/* desegmentation of Gryphon */
-static gboolean gryphon_desegment = TRUE;
+static bool gryphon_desegment = true;
/*
* Length of the frame header.
*/
#define GRYPHON_FRAME_HEADER_LEN 8
-static int dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_msgresp_add);
-static int cmd_ioctl(tvbuff_t*, packet_info*, int, proto_tree*, guint32 ui_command);
-static int cmd_ioctl_resp(tvbuff_t*, packet_info*, int, proto_tree*, guint32 ui_command);
+static int dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bool is_msgresp_add);
+static int cmd_ioctl(tvbuff_t*, packet_info*, int, proto_tree*, uint32_t ui_command);
+static int cmd_ioctl_resp(tvbuff_t*, packet_info*, int, proto_tree*, uint32_t ui_command);
static const value_string action_vals[] = {
{ FR_RESP_AFTER_EVENT,
@@ -1007,7 +1009,7 @@ static const true_false_string set_not_set = { "Set", "Not set" };
* returns 1 if the ID is one of the special servers
* return 0 otherwise
*/
-static int is_special_client(guint32 id)
+static int is_special_client(uint32_t id)
{
if((id == SD_SERVER) || (id == SD_CLIENT)) {
return 1;
@@ -1035,10 +1037,10 @@ decode_data(tvbuff_t *tvb, int offset, proto_tree *pt)
NULL
};
- hdrsize = tvb_get_guint8(tvb, offset+0);
- /* hdrbits = tvb_get_guint8(tvb, offset+1); */
+ hdrsize = tvb_get_uint8(tvb, offset+0);
+ /* hdrbits = tvb_get_uint8(tvb, offset+1); */
datasize = tvb_get_ntohs(tvb, offset+2);
- extrasize = tvb_get_guint8(tvb, offset+4);
+ extrasize = tvb_get_uint8(tvb, offset+4);
padding = 3 - (hdrsize + datasize + extrasize + 3) % 4;
msgsize = hdrsize + datasize + extrasize + padding + 16;
@@ -1118,6 +1120,7 @@ decode_event(tvbuff_t *tvb, int offset, proto_tree *pt)
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
decode_misc (tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
{
tvbuff_t *next_tvb;
@@ -1133,7 +1136,7 @@ decode_misc (tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
*/
next_tvb = tvb_new_subset_remaining(tvb, offset);
- offset += dissect_gryphon_message(next_tvb, pinfo, pt, TRUE);
+ offset += dissect_gryphon_message(next_tvb, pinfo, pt, true);
}
return offset;
}
@@ -1157,7 +1160,7 @@ decode_text (tvbuff_t *tvb, int offset, int msglen, proto_tree *pt)
static int
cmd_init(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 mode = tvb_get_guint8(tvb, offset);
+ uint8_t mode = tvb_get_uint8(tvb, offset);
if (mode == 0)
proto_tree_add_uint_format_value(pt, hf_gryphon_cmd_mode, tvb, offset, 1, mode, "Always initialize");
@@ -1170,7 +1173,7 @@ cmd_init(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
eventnum(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 event = tvb_get_guint8(tvb, offset);
+ uint8_t event = tvb_get_uint8(tvb, offset);
if (event)
proto_tree_add_item(pt, hf_gryphon_eventnum, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1183,7 +1186,7 @@ eventnum(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_time(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint64 val;
+ uint64_t val;
nstime_t timestamp;
val = tvb_get_ntoh64(tvb, offset);
@@ -1202,7 +1205,7 @@ cmd_setfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
int flag = tvb_get_ntohl(tvb, offset);
int length, padding;
- length = tvb_get_guint8(tvb, offset+4) + tvb_get_guint8(tvb, offset+5)
+ length = tvb_get_uint8(tvb, offset+4) + tvb_get_uint8(tvb, offset+5)
+ tvb_get_ntohs(tvb, offset+6);
proto_tree_add_uint_format_value(pt, hf_gryphon_setfilt, tvb, offset, 4,
@@ -1222,26 +1225,26 @@ cmd_setfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
}
static int
-cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, guint32 ui_command, int msglen)
+cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, uint32_t ui_command, int msglen)
{
char *string;
int length;
- gint32 nbytes;
- gint32 block_nbytes;
- gint16 us_stream;
- gint16 us_value;
+ int32_t nbytes;
+ int32_t block_nbytes;
+ int16_t us_stream;
+ int16_t us_value;
proto_tree *tree;
unsigned int msg;
- guint8 number_ids;
- guint8 number_bytes;
- guint8 number_extra_bytes;
- guint8 flags;
- guint8 pid;
- guint8 datalen;
- guint8 extralen;
+ uint8_t number_ids;
+ uint8_t number_bytes;
+ uint8_t number_extra_bytes;
+ uint8_t flags;
+ uint8_t pid;
+ uint8_t datalen;
+ uint8_t extralen;
int i;
- guint32 mtime;
- guint16 us_nsched;
+ uint32_t mtime;
+ uint16_t us_nsched;
float value;
static int * const ldf_schedule_flags[] = {
&hf_gryphon_ldf_schedule_event,
@@ -1300,13 +1303,13 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
proto_tree_add_float_format_value(pt, hf_gryphon_init_strat_delay, tvb, offset, 4, value, "%.1f milliseconds", value);
offset += 4;
- number_ids = tvb_get_guint8(tvb, offset);
+ number_ids = tvb_get_uint8(tvb, offset);
/* header length, number of IDs to follow */
proto_tree_add_item(pt, hf_gryphon_data_header_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- number_bytes = tvb_get_guint8(tvb, offset);
+ number_bytes = tvb_get_uint8(tvb, offset);
number_bytes &= 0x0F; /* bit0 thru bit3 */
/* data length, number data bytes to follow */
@@ -1364,8 +1367,8 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
while(nbytes > 0) {
/* calc the number of bytes in this block */
- number_ids = tvb_get_guint8(tvb, offset+4);
- number_bytes = tvb_get_guint8(tvb, offset+5);
+ number_ids = tvb_get_uint8(tvb, offset+4);
+ number_bytes = tvb_get_uint8(tvb, offset+5);
number_bytes &= 0x0F; /* bit0 thru bit3 */
block_nbytes = 4 + 1 + 1 + number_ids + number_bytes;
@@ -1408,11 +1411,11 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
/* 20171113 */
proto_tree_add_item(pt, hf_gryphon_ldf_ioctl_setflags, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- number_ids = tvb_get_guint8(tvb, offset);
+ number_ids = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_numb_ids, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i = 0; i < number_ids; i++) {
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, flags, "0x%x %s",i,flags==0 ? "Classic checksum" : (flags==0x80?"Enhanced checksum":(flags==0x40?"Event":"UNKNOWN")));
offset += 1;
}
@@ -1438,11 +1441,11 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
case GLINGETSLAVETABLEPIDS:
{
/* 20180104 */
- number_ids = tvb_get_guint8(tvb, offset);
+ number_ids = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_numb_ids, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i = 0; i < number_ids; i++) {
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%x ",pid);
offset += 1;
}
@@ -1460,13 +1463,13 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
* byte 5-13: data[datalen]
* byte n: checksum
*/
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%02x ",pid);
offset += 1;
- datalen = tvb_get_guint8(tvb, offset);
+ datalen = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_lin_data_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- extralen = tvb_get_guint8(tvb, offset);
+ extralen = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_data_extra_data_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(pt, hf_gryphon_lin_slave_table_enable, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1494,13 +1497,13 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
* byte 4-12: data[datalen]
* byte n: checksum
*/
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%02x ",pid);
offset += 1;
- datalen = tvb_get_guint8(tvb, offset);
+ datalen = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_lin_data_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- extralen = tvb_get_guint8(tvb, offset);
+ extralen = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_data_extra_data_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(pt, hf_gryphon_lin_slave_table_enable, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1518,7 +1521,7 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
case GLINCLEARSLAVETABLE:
{
/* 20180104 done */
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%02x ",pid);
offset += 1;
}
@@ -1541,8 +1544,8 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
{
/* 20180104 */
/* 20180228 */
- number_bytes = tvb_get_guint8(tvb, offset+1);
- number_extra_bytes = tvb_get_guint8(tvb, offset+2);
+ number_bytes = tvb_get_uint8(tvb, offset+1);
+ number_extra_bytes = tvb_get_uint8(tvb, offset+2);
/* id */
proto_tree_add_item(pt, hf_gryphon_data_header_data, tvb, offset, 1, ENC_NA);
offset += 1;
@@ -1621,10 +1624,10 @@ cmd_ioctl_details(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt,
* calls cmd_ioctl_details()
*/
static int
-cmd_ioctl(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, guint32 ui_command)
+cmd_ioctl(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, uint32_t ui_command)
{
int msglen;
- /*guint32 ioctl;*/
+ /*uint32_t ioctl;*/
int padding;
msglen = tvb_reported_length_remaining(tvb, offset);
@@ -1659,7 +1662,7 @@ cmd_ioctl(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, guint32
* the IOCTL response to the request.
*/
static int
-cmd_ioctl_resp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, guint32 ui_command)
+cmd_ioctl_resp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, uint32_t ui_command)
{
int msglen = tvb_reported_length_remaining(tvb, offset);
@@ -1677,7 +1680,7 @@ cmd_ioctl_resp(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt, gu
static int
filter_block(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint32 op, length, padding;
+ uint32_t op, length, padding;
/* 20171017 fixed display of filter block padding */
@@ -1752,7 +1755,7 @@ cmd_addfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_item(tree, hf_gryphon_addfilt_active, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- blocks = tvb_get_guint8(tvb, offset);
+ blocks = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_addfilt_blocks, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(pt, hf_gryphon_reserved, tvb, offset+1, 6, ENC_NA);
offset += 7;
@@ -1779,7 +1782,7 @@ resp_addfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_modfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 filter_handle = tvb_get_guint8(tvb, offset);
+ uint8_t filter_handle = tvb_get_uint8(tvb, offset);
if (filter_handle)
proto_tree_add_item(pt, hf_gryphon_modfilt, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1796,12 +1799,12 @@ cmd_modfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_filthan(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- int handles = tvb_get_guint8(tvb, offset);
+ int handles = tvb_get_uint8(tvb, offset);
int i, padding, handle;
proto_tree_add_item(pt, hf_gryphon_filthan, tvb, offset, 1, ENC_BIG_ENDIAN);
for (i = 1; i <= handles; i++){
- handle = tvb_get_guint8(tvb, offset+i);
+ handle = tvb_get_uint8(tvb, offset+i);
proto_tree_add_uint_format_value(pt, hf_gryphon_filthan_id, tvb, offset+i, 1,
handle, "Handle %d: %u", i, handle);
}
@@ -1875,8 +1878,8 @@ static int
resp_getspeeds(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int indx,
- size = tvb_get_guint8(tvb, offset+8),
- number = tvb_get_guint8(tvb, offset+9);
+ size = tvb_get_uint8(tvb, offset+8),
+ number = tvb_get_uint8(tvb, offset+9);
proto_tree_add_item(pt, hf_gryphon_getspeeds_set_ioctl, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(pt, hf_gryphon_getspeeds_get_ioctl, tvb, offset+4, 4, ENC_BIG_ENDIAN);
@@ -1923,7 +1926,7 @@ resp_config(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_item(pt, hf_gryphon_config_device_serial_number, tvb, offset, 20, ENC_NA|ENC_ASCII);
offset += 20;
- devices = tvb_get_guint8(tvb, offset);
+ devices = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_config_num_channels, tvb, offset+1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(pt, hf_gryphon_config_name_version_ext, tvb, offset+1, 11, ENC_NA|ENC_ASCII);
@@ -1992,7 +1995,7 @@ cmd_sched(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree *tree, *tree1;
int save_offset;
unsigned int i, x, length;
- guint8 def_chan = tvb_get_guint8(tvb, offset-9);
+ uint8_t def_chan = tvb_get_uint8(tvb, offset-9);
msglen = tvb_reported_length_remaining(tvb, offset);
@@ -2014,7 +2017,7 @@ cmd_sched(tvbuff_t *tvb, int offset, proto_tree *pt)
i = 1;
while (msglen > 0) {
- length = 16 + tvb_get_guint8(tvb, offset+16) + tvb_get_ntohs(tvb, offset+18) + tvb_get_guint8(tvb, offset+20) + 16;
+ length = 16 + tvb_get_uint8(tvb, offset+16) + tvb_get_ntohs(tvb, offset+18) + tvb_get_uint8(tvb, offset+20) + 16;
length += 3 - (length + 3) % 4;
tree = proto_tree_add_subtree_format(pt, tvb, offset, length, ett_gryphon_cmd_sched_data, NULL, "Message %d", i);
@@ -2038,7 +2041,7 @@ cmd_sched(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_item(tree1, hf_gryphon_sched_skip_sleep, tvb, offset, 2, ENC_BIG_ENDIAN);
}
- x = tvb_get_guint8(tvb, offset+2);
+ x = tvb_get_uint8(tvb, offset+2);
/* 20171026 */
if (x == 0) {
x = def_chan;
@@ -2156,7 +2159,7 @@ resp_ldf_list(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree *localTree;
/* block index */
- blocks = tvb_get_guint8(tvb, offset);
+ blocks = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_number, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2193,7 +2196,7 @@ cmd_ldf_delete(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_ldf_desc(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint32 size;
+ uint32_t size;
/* size 4 bytes */
size = tvb_get_ntohl(tvb, offset);
@@ -2248,7 +2251,7 @@ cmd_ldf_parse(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_get_ldf_info(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint32 bitrate;
+ uint32_t bitrate;
float value;
proto_tree_add_item(pt, hf_gryphon_ldf_info_pv, tvb, offset, 16, ENC_ASCII|ENC_NA);
offset += 16;
@@ -2264,10 +2267,10 @@ resp_get_ldf_info(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_cnvt_get_values(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 num_signals;
+ uint8_t num_signals;
int length;
int i;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
@@ -2280,17 +2283,17 @@ cmd_cnvt_get_values(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_cnvt_get_values(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 flag;
- guint8 num_signals;
+ uint8_t flag;
+ uint8_t num_signals;
float fvalue;
int i;
int length;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
/* flag */
- flag = tvb_get_guint8(tvb, offset);
+ flag = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_cnvt_flags_getvalues, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2318,10 +2321,10 @@ resp_cnvt_get_values(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_cnvt_get_units(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 num_signals;
+ uint8_t num_signals;
int length;
int i;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
@@ -2334,10 +2337,10 @@ cmd_cnvt_get_units(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_cnvt_get_units(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 num_signals;
+ uint8_t num_signals;
int i;
int length;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
@@ -2351,11 +2354,11 @@ resp_cnvt_get_units(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_cnvt_set_values(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 num_signals;
+ uint8_t num_signals;
int length;
int i;
float fvalue;
- num_signals = tvb_get_guint8(tvb, offset);
+ num_signals = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for(i=0;i< num_signals; i++) {
@@ -2383,7 +2386,7 @@ static int
resp_ldf_get_node_names(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint16 us_num;
+ uint16_t us_num;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_node_names, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2414,15 +2417,15 @@ static int
resp_ldf_get_frames(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint16 us_num;
- guint8 pid;
+ uint16_t us_num;
+ uint8_t pid;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_frames, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
while(us_num > 0) {
/* id */
- pid = tvb_get_guint8(tvb, offset);
+ pid = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, pid, "0x%x ",pid);
offset += 1;
/* frame name */
@@ -2438,7 +2441,7 @@ cmd_ldf_get_frame_info(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
{
char *string;
int length;
- guint8 id;
+ uint8_t id;
string = tvb_get_stringz_enc(pinfo->pool, tvb, offset, &length, ENC_ASCII);
if(length > 1) {
proto_tree_add_string(pt, hf_gryphon_ldf_get_frame, tvb, offset, length, string);
@@ -2446,7 +2449,7 @@ cmd_ldf_get_frame_info(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, 0, "(Id not used)");
offset += 1;
} else {
- id = tvb_get_guint8(tvb, offset);
+ id = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(pt, hf_gryphon_ldf_ioctl_setflags_flags, tvb, offset, 1, id, "0x%x ",id);
offset += 1;
}
@@ -2457,12 +2460,12 @@ static int
resp_ldf_get_frame_info(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint8 count, i;
+ uint8_t count, i;
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item_ret_length(pt, hf_gryphon_ldf_get_frame_pub, tvb, offset, -1, ENC_NA | ENC_ASCII, &length);
offset += length;
- count = tvb_get_guint8(tvb, offset);
+ count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_get_frame_num_signals, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for (i = 0; i < count; i++) {
@@ -2552,7 +2555,7 @@ resp_ldf_do_encoding_block(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_
static int
resp_ldf_get_signal_detail(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt)
{
- guint16 us_num;
+ uint16_t us_num;
/* offset */
proto_tree_add_item(pt, hf_gryphon_ldf_signal_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2585,7 +2588,7 @@ cmd_ldf_get_encoding_info(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_ldf_get_encoding_info(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt)
{
- guint16 us_num;
+ uint16_t us_num;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_encodings, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2619,7 +2622,7 @@ cmd_ldf_emulate_nodes(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
int length;
proto_tree *tree2;
- nnodes = tvb_get_guint8(tvb, offset);
+ nnodes = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_nodenumber, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2630,7 +2633,7 @@ cmd_ldf_emulate_nodes(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree
tree2 = proto_tree_add_subtree_format(pt, tvb, offset, 1+length, ett_gryphon_lin_emulate_node, NULL, "Node %u", node_numb);
- xchannel = tvb_get_guint8(tvb, offset);
+ xchannel = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(tree2, hf_gryphon_sched_channel, tvb, offset, 1, xchannel);
offset += 1;
@@ -2646,7 +2649,7 @@ static int
resp_ldf_get_schedules(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint16 us_num;
+ uint16_t us_num;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_schedules, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2682,7 +2685,7 @@ static int
resp_ldf_get_node_signals(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int length;
- guint16 us_num;
+ uint16_t us_num;
/* number */
us_num = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_ldf_num_signal_names, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2715,11 +2718,12 @@ resp_restore_session(tvbuff_t *tvb, int offset, proto_tree *pt)
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
cmd_addresp(tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
{
proto_item *item;
proto_tree *tree;
- guint blocks, responses, i, msglen, length;
+ unsigned blocks, responses, i, msglen, length;
int padding;
int action, actionType, actionValue;
tvbuff_t *next_tvb;
@@ -2747,7 +2751,7 @@ cmd_addresp(tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
offset += 1;
/* action */
- action = tvb_get_guint8(tvb, offset);
+ action = tvb_get_uint8(tvb, offset);
item = proto_tree_add_item(pt, hf_gryphon_addresp_action, tvb, offset, 1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (item, ett_gryphon_flags);
actionValue = tvb_get_ntohs(tvb, offset+2);
@@ -2795,7 +2799,7 @@ cmd_addresp(tvbuff_t *tvb, int offset, packet_info* pinfo, proto_tree *pt)
padding = 3 - (msglen + 3) % 4;
tree = proto_tree_add_subtree_format(pt, tvb, offset, msglen + padding, ett_gryphon_cmd_response_block, NULL, "Response block %d", i);
next_tvb = tvb_new_subset_length(tvb, offset, msglen + padding);
- dissect_gryphon_message(next_tvb, pinfo, tree, TRUE);
+ dissect_gryphon_message(next_tvb, pinfo, tree, true);
offset += msglen + padding;
}
return offset;
@@ -2813,8 +2817,8 @@ resp_addresp(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_modresp(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint8 dest = tvb_get_guint8(tvb, offset-5),
- resp_handle = tvb_get_guint8(tvb, offset);
+ uint8_t dest = tvb_get_uint8(tvb, offset-5),
+ resp_handle = tvb_get_uint8(tvb, offset);
if (resp_handle)
proto_tree_add_item(pt, hf_gryphon_modresp_handle, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2834,12 +2838,12 @@ cmd_modresp(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_resphan(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- int handles = tvb_get_guint8(tvb, offset);
+ int handles = tvb_get_uint8(tvb, offset);
int i, padding, handle;
proto_tree_add_item(pt, hf_gryphon_num_resphan, tvb, offset, 1, ENC_BIG_ENDIAN);
for (i = 1; i <= handles; i++){
- handle = tvb_get_guint8(tvb, offset+i);
+ handle = tvb_get_uint8(tvb, offset+i);
proto_tree_add_uint_format(pt, hf_gryphon_handle, tvb, offset+i, 1, handle, "Handle %d: %u", i,
handle);
}
@@ -2933,7 +2937,7 @@ static int
resp_list(tvbuff_t *tvb, int offset, proto_tree *pt)
{
proto_tree *tree;
- guint32 i, count;
+ uint32_t i, count;
proto_tree_add_item_ret_uint(pt, hf_gryphon_list_num_programs, tvb, offset, 1, ENC_BIG_ENDIAN, &count);
proto_tree_add_item(pt, hf_gryphon_reserved, tvb, offset+1, 1, ENC_NA);
@@ -2957,7 +2961,7 @@ static int
cmd_start(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *pt)
{
char *string;
- gint length;
+ int length;
int msglen;
int hdr_stuff = offset;
@@ -3001,13 +3005,13 @@ resp_status(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree *tree;
unsigned int i, copies, length, channel;
- copies = tvb_get_guint8(tvb, offset);
+ copies = tvb_get_uint8(tvb, offset);
item = proto_tree_add_item(pt, hf_gryphon_status_num_running_copies, tvb, offset, 1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree (item, ett_gryphon_pgm_status);
offset += 1;
if (copies) {
for (i = 1; i <= copies; i++) {
- channel = tvb_get_guint8(tvb, offset);
+ channel = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(tree, hf_gryphon_program_channel_number, tvb, offset, 1, channel,
"Program %u channel (client) number %u", i, channel);
offset += 1;
@@ -3036,14 +3040,14 @@ cmd_options(tvbuff_t *tvb, int offset, proto_tree *pt)
msglen -= 4;
for (i = 1; msglen > 0; i++) {
- option_length = tvb_get_guint8(tvb, offset+1);
+ option_length = tvb_get_uint8(tvb, offset+1);
size = option_length + 2;
padding = 3 - ((size + 3) %4);
tree = proto_tree_add_subtree_format(pt, tvb, offset, size + padding, ett_gryphon_pgm_options, NULL, "Option number %u", i);
- option = tvb_get_guint8(tvb, offset);
+ option = tvb_get_uint8(tvb, offset);
switch (option_length) {
case 1:
- option_value = tvb_get_guint8(tvb, offset+2);
+ option_value = tvb_get_uint8(tvb, offset+2);
break;
case 2:
option_value = tvb_get_ntohs(tvb, offset+2);
@@ -3094,10 +3098,10 @@ static int
cmd_files(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int msglen;
- guint8 file;
+ uint8_t file;
msglen = tvb_reported_length_remaining(tvb, offset);
- file = tvb_get_guint8(tvb, offset);
+ file = tvb_get_uint8(tvb, offset);
if (file == 0)
proto_tree_add_uint_format(pt, hf_gryphon_cmd_file, tvb, offset, 1, file, "First group of names");
else
@@ -3126,21 +3130,21 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int remain;
unsigned int ui_block;
- guint32 ui_ids;
+ uint32_t ui_ids;
int id_usdtreq;
int id_usdtresp;
int id_uudtresp;
- guint8 u8_options;
- guint8 u8USDTReqExtAddr_bit;
- guint8 u8USDTRespExtAddr_bit;
- guint8 u8UUDTRespExtAddr_bit;
- guint8 u8USDTReqExtAddr;
- guint8 u8USDTRespExtAddr;
- guint8 u8UUDTRespExtAddr;
- guint8 u8USDTReqHeaderSize;
- guint8 u8USDTRespHeaderSize;
- guint8 u8UUDTRespHeaderSize;
- guint8 flags;
+ uint8_t u8_options;
+ uint8_t u8USDTReqExtAddr_bit;
+ uint8_t u8USDTRespExtAddr_bit;
+ uint8_t u8UUDTRespExtAddr_bit;
+ uint8_t u8USDTReqExtAddr;
+ uint8_t u8USDTRespExtAddr;
+ uint8_t u8UUDTRespExtAddr;
+ uint8_t u8USDTReqHeaderSize;
+ uint8_t u8USDTRespHeaderSize;
+ uint8_t u8UUDTRespHeaderSize;
+ uint8_t flags;
proto_tree *tree1;
proto_tree *tree2;
proto_tree *tree3;
@@ -3169,21 +3173,21 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
/* 20171012 */
/* Action flags */
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
tree1 = proto_tree_add_subtree_format(pt, tvb, offset, 1, ett_gryphon_usdt_action_flags, NULL, "Action flags 0x%02x", flags);
proto_tree_add_item(tree1, hf_gryphon_usdt_action_flags_non_legacy, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
remain -= 1;
/* tx options */
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
tree2 = proto_tree_add_subtree_format(pt, tvb, offset, 1, ett_gryphon_usdt_tx_options_flags, NULL, "Transmit options 0x%02x", flags);
proto_tree_add_bitmask(tree2, tvb, offset, hf_gryphon_usdt_transmit_options_flags, ett_gryphon_flags, transmit_options_flags, ENC_BIG_ENDIAN);
offset += 1;
remain -= 1;
/* rx options */
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
tree3 = proto_tree_add_subtree_format(pt, tvb, offset, 1, ett_gryphon_usdt_rx_options_flags, NULL, "Receive options 0x%02x", flags);
proto_tree_add_bitmask(tree3, tvb, offset, hf_gryphon_usdt_receive_options_flags, ett_gryphon_flags, receive_options_flags, ENC_BIG_ENDIAN);
offset += 1;
@@ -3219,9 +3223,9 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
offset += 4;
remain -= 4;
- u8UUDTRespExtAddr = tvb_get_guint8(tvb, offset+10);
- u8USDTRespExtAddr = tvb_get_guint8(tvb, offset+13);
- u8USDTReqExtAddr = tvb_get_guint8(tvb, offset+16);
+ u8UUDTRespExtAddr = tvb_get_uint8(tvb, offset+10);
+ u8USDTRespExtAddr = tvb_get_uint8(tvb, offset+13);
+ u8USDTReqExtAddr = tvb_get_uint8(tvb, offset+16);
if(ui_ids == 1) {
/* single ID */
@@ -3240,7 +3244,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_request, tvb, offset, 4, id_usdtreq, "0x%04x (29-bit)", id_usdtreq);
}
} else {
- u8USDTReqExtAddr = tvb_get_guint8(tvb, offset+16);
+ u8USDTReqExtAddr = tvb_get_uint8(tvb, offset+16);
if(u8USDTReqHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_request, tvb, offset, 4, id_usdtreq, "0x%02x (11-bit extended address %01x)", id_usdtreq, u8USDTReqExtAddr);
} else {
@@ -3263,7 +3267,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_response, tvb, offset, 4, id_usdtresp, "0x%04x (29-bit)", id_usdtresp);
}
} else {
- u8USDTRespExtAddr = tvb_get_guint8(tvb, offset+13);
+ u8USDTRespExtAddr = tvb_get_uint8(tvb, offset+13);
if(u8USDTRespHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_response, tvb, offset, 4, id_usdtresp, "0x%02x (11-bit extended address %01x)", id_usdtresp, u8USDTRespExtAddr);
} else {
@@ -3287,7 +3291,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_uudt_response, tvb, offset, 4, id_uudtresp, "0x%04x (29-bit)", id_uudtresp);
}
} else {
- u8UUDTRespExtAddr = tvb_get_guint8(tvb, offset+10);
+ u8UUDTRespExtAddr = tvb_get_uint8(tvb, offset+10);
if(u8UUDTRespHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_uudt_response, tvb, offset, 4, id_uudtresp, "0x%02x (11-bit extended address %01x)", id_uudtresp, u8UUDTRespExtAddr);
} else {
@@ -3317,7 +3321,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_request, tvb, offset, 4, id_usdtreq, "0x%04x through 0x%04x (29-bit)", id_usdtreq, id_usdtreq + ui_ids-1);
}
} else {
- u8USDTReqExtAddr = tvb_get_guint8(tvb, offset+16);
+ u8USDTReqExtAddr = tvb_get_uint8(tvb, offset+16);
if(u8USDTReqHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_request, tvb, offset, 4, id_usdtreq, "0x%02x through 0x%02x (11-bit extended address %0x)", id_usdtreq, id_usdtreq + ui_ids-1, u8USDTReqExtAddr);
} else {
@@ -3340,7 +3344,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_response, tvb, offset, 4, id_usdtresp, "0x%04x through 0x%04x (29-bit)", id_usdtresp, id_usdtresp + ui_ids-1);
}
} else {
- u8USDTRespExtAddr = tvb_get_guint8(tvb, offset+13);
+ u8USDTRespExtAddr = tvb_get_uint8(tvb, offset+13);
if(u8USDTRespHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_usdt_response, tvb, offset, 4, id_usdtresp, "0x%02x through 0x%02x (11-bit extended address %01x)", id_usdtresp, id_usdtresp + ui_ids-1, u8USDTRespExtAddr);
} else {
@@ -3363,7 +3367,7 @@ cmd_usdt_register_non_legacy(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_uint_format_value(tree4, hf_gryphon_uudt_response, tvb, offset, 4, id_uudtresp, "0x%04x through 0x%04x (29-bit)", id_uudtresp, id_uudtresp + ui_ids-1);
}
} else {
- u8UUDTRespExtAddr = tvb_get_guint8(tvb, offset+10);
+ u8UUDTRespExtAddr = tvb_get_uint8(tvb, offset+10);
if(u8UUDTRespHeaderSize == 0) {
proto_tree_add_uint_format_value(tree4, hf_gryphon_uudt_response, tvb, offset, 4, id_uudtresp, "0x%02x through 0x%02x (11-bit extended address %01x)", id_uudtresp, id_uudtresp + ui_ids-1, u8UUDTRespExtAddr);
} else {
@@ -3487,11 +3491,11 @@ static int
cmd_usdt(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int ids, id, remain, size, i, bytes;
- guint8 flags;
+ uint8_t flags;
proto_tree *localTree;
proto_item *localItem;
- flags = tvb_get_guint8(tvb, offset);
+ flags = tvb_get_uint8(tvb, offset);
proto_tree_add_item(pt, hf_gryphon_usdt_flags_register, tvb, offset, 1, ENC_BIG_ENDIAN);
if (flags & 1) {
@@ -3519,7 +3523,7 @@ cmd_usdt(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_bitmask(pt, tvb, offset+1, hf_gryphon_usdt_transmit_options_flags, ett_gryphon_flags, transmit_option_flags, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(pt, tvb, offset+2, hf_gryphon_usdt_receive_options_flags, ett_gryphon_flags, receive_option_flags, ENC_BIG_ENDIAN);
- if ((ids = tvb_get_guint8(tvb, offset+3))) {
+ if ((ids = tvb_get_uint8(tvb, offset+3))) {
localItem = proto_tree_add_item(pt, hf_gryphon_usdt_ext_address, tvb, offset+3, 1, ENC_BIG_ENDIAN);
offset += 4;
@@ -3578,7 +3582,7 @@ cmd_bits_in (tvbuff_t *tvb, int offset, proto_tree *pt)
{
int value;
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
if (value) {
static int * const digital_values[] = {
&hf_gryphon_bits_in_input1,
@@ -3601,7 +3605,7 @@ cmd_bits_out (tvbuff_t *tvb, int offset, proto_tree *pt)
{
int value;
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
if (value) {
static int * const digital_values[] = {
&hf_gryphon_bits_out_output1,
@@ -3620,7 +3624,7 @@ cmd_bits_out (tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_init_strat (tvbuff_t *tvb, int offset, proto_tree *pt)
{
- guint32 reset_limit;
+ uint32_t reset_limit;
int msglen, indx;
float value;
@@ -3631,7 +3635,7 @@ cmd_init_strat (tvbuff_t *tvb, int offset, proto_tree *pt)
offset += 4;
msglen -= 4;
for (indx = 1; msglen; indx++, offset++, msglen--) {
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
if (value)
proto_tree_add_float_format_value(pt, hf_gryphon_init_strat_delay, tvb, offset, 1,
value/4, "Delay %d = %.2f seconds", indx, value/4);
@@ -3657,7 +3661,7 @@ blm_mode(tvbuff_t *tvb, int offset, proto_tree *pt)
{
proto_item *item;
proto_tree *tree;
- guint32 mode, milliseconds;
+ uint32_t mode, milliseconds;
item = proto_tree_add_item_ret_uint(pt, hf_gryphon_blm_mode, tvb, offset, 4, ENC_BIG_ENDIAN, &mode);
tree = proto_item_add_subtree(item, ett_gryphon_blm_mode);
@@ -3700,10 +3704,11 @@ get_conversation_data(packet_info* pinfo)
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int dst, proto_tree *pt)
{
- guint32 cmd;
- guint32 context, ioctl_command;
+ uint32_t cmd;
+ uint32_t context, ioctl_command;
proto_tree *ft;
proto_item *hi;
gryphon_pkt_info_t *pkt_info;
@@ -3714,7 +3719,7 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds
if (cmd > 0x3F)
cmd += dst * 256;
- pkt_info = (gryphon_pkt_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb));
+ pkt_info = (gryphon_pkt_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (uint32_t)tvb_raw_offset(tvb));
if (!pkt_info) {
/* Find a conversation, create a new if no one exists */
@@ -3729,7 +3734,7 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds
wmem_list_prepend(conv_data->request_frame_data, pkt_info);
- p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb), pkt_info);
+ p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (uint32_t)tvb_raw_offset(tvb), pkt_info);
}
proto_tree_add_uint(pt, hf_gryphon_command, tvb, offset, 1, cmd);
@@ -3751,6 +3756,7 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds
ft = proto_tree_add_subtree_format(pt, tvb, offset, msglen, ett_gryphon_command_data, NULL,
"Data: (%d byte%s)", msglen, plurality(msglen, "", "s"));
+ increment_dissection_depth(pinfo);
switch (cmd)
{
case CMD_INIT:
@@ -3958,26 +3964,28 @@ decode_command(tvbuff_t *tvb, packet_info* pinfo, int msglen, int offset, int ds
offset += msglen;
break;
}
+ decrement_dissection_depth(pinfo);
}
return offset;
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tree *pt)
{
int msglen;
- guint32 cmd;
+ uint32_t cmd;
proto_tree *ft;
gryphon_pkt_info_t *pkt_info, *pkt_info_list;
msglen = tvb_reported_length_remaining(tvb, offset);
- cmd = tvb_get_guint8(tvb, offset);
+ cmd = tvb_get_uint8(tvb, offset);
if (cmd > 0x3F)
cmd += src * 256;
- pkt_info = (gryphon_pkt_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb));
+ pkt_info = (gryphon_pkt_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (uint32_t)tvb_raw_offset(tvb));
if (!pkt_info) {
/* Find a conversation, create a new if no one exists */
@@ -4002,7 +4010,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
frame = wmem_list_frame_next(frame);
}
- p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (guint32)tvb_raw_offset(tvb), pkt_info);
+ p_add_proto_data(wmem_file_scope(), pinfo, proto_gryphon, (uint32_t)tvb_raw_offset(tvb), pkt_info);
}
/*
@@ -4042,6 +4050,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
ft = proto_tree_add_subtree_format(pt, tvb, offset, msglen, ett_gryphon_response_data, NULL,
"Data: (%d byte%s)", msglen, plurality(msglen, "", "s"));
+ increment_dissection_depth(pinfo);
switch (cmd)
{
case CMD_GET_CONFIG:
@@ -4191,6 +4200,7 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
proto_tree_add_item(ft, hf_gryphon_data, tvb, offset, msglen, ENC_NA);
offset += msglen;
}
+ decrement_dissection_depth(pinfo);
}
return offset;
@@ -4202,14 +4212,15 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
* So, this function will decode a packet and return the offset.
*/
static int
-dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_msgresp_add)
+// NOLINTNEXTLINE(misc-no-recursion)
+dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bool is_msgresp_add)
{
proto_tree *gryphon_tree;
proto_item *ti, *type_item;
proto_tree *header_tree, *body_tree;
int msgend, msglen, msgpad;
int offset = 0;
- guint32 src, dest, i, frmtyp, flags;
+ uint32_t src, dest, i, frmtyp, flags;
if (!is_msgresp_add) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Gryphon");
@@ -4247,7 +4258,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo
}
proto_tree_add_item_ret_uint(header_tree, hf_gryphon_data_length, tvb, offset + 4, 2, ENC_BIG_ENDIAN, &msglen);
- flags = tvb_get_guint8(tvb, offset + 6);
+ flags = tvb_get_uint8(tvb, offset + 6);
frmtyp = flags & ~RESPONSE_FLAGS;
type_item = proto_tree_add_uint(header_tree, hf_gryphon_type, tvb, offset + 6, 1, frmtyp);
/*
@@ -4273,6 +4284,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo
body_tree = proto_tree_add_subtree(gryphon_tree, tvb, offset, msglen, ett_gryphon_body, NULL, "Body");
+ increment_dissection_depth(pinfo);
switch (frmtyp) {
case GY_FT_CMD:
offset = decode_command(tvb, pinfo, msglen, offset, dest, body_tree);
@@ -4299,6 +4311,7 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo
proto_tree_add_item(body_tree, hf_gryphon_data, tvb, offset, msglen, ENC_NA);
break;
}
+ decrement_dissection_depth(pinfo);
/*debug*/
/*i = msgend - offset;*/
@@ -4316,10 +4329,10 @@ dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gbo
return offset;
}
-static guint
+static unsigned
get_gryphon_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
- guint16 plen;
+ uint16_t plen;
int padded_len;
/*
@@ -4339,7 +4352,7 @@ get_gryphon_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *dat
static int
dissect_gryphon_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- dissect_gryphon_message(tvb, pinfo, tree, FALSE);
+ dissect_gryphon_message(tvb, pinfo, tree, false);
return tvb_reported_length(tvb);
}
@@ -5256,7 +5269,7 @@ proto_register_gryphon(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_gryphon,
&ett_gryphon_header,
&ett_gryphon_body,
diff --git a/plugins/epan/gryphon/packet-gryphon.h b/plugins/epan/gryphon/packet-gryphon.h
index 182146269d..436cb134a6 100644
--- a/plugins/epan/gryphon/packet-gryphon.h
+++ b/plugins/epan/gryphon/packet-gryphon.h
@@ -564,11 +564,11 @@
#define GDGLIN_BEACON 0x03 /* DG BEACON LIN SUBTYPE */
typedef struct {
- guint32 cmd;
- guint32 cmd_context; //typically just guint8, but let's room for expansion/improvement
- guint32 ioctl_command; //should be more generic, but IOCTL is currently the only user
- guint32 req_frame_num;
- guint32 rsp_frame_num;
+ uint32_t cmd;
+ uint32_t cmd_context; //typically just uint8_t, but let's room for expansion/improvement
+ uint32_t ioctl_command; //should be more generic, but IOCTL is currently the only user
+ uint32_t req_frame_num;
+ uint32_t rsp_frame_num;
nstime_t req_time;
} gryphon_pkt_info_t;
diff --git a/plugins/epan/irda/CMakeLists.txt b/plugins/epan/irda/CMakeLists.txt
index 47a2c7322e..31bfe89720 100644
--- a/plugins/epan/irda/CMakeLists.txt
+++ b/plugins/epan/irda/CMakeLists.txt
@@ -31,11 +31,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "IrDA dissection"
${DISSECTOR_SRC}
)
-add_wireshark_epan_plugin_library(irda)
+add_wireshark_plugin_library(irda epan)
target_link_libraries(irda epan)
diff --git a/plugins/epan/irda/irda-appl.h b/plugins/epan/irda/irda-appl.h
index 5a83940547..01c6fef159 100644
--- a/plugins/epan/irda/irda-appl.h
+++ b/plugins/epan/irda/irda-appl.h
@@ -36,8 +36,8 @@ typedef enum {
DATA_PDU
} pdu_type_t;
-typedef gboolean (*ias_value_dissector_t)(tvbuff_t* tvb, guint offset, packet_info* pinfo, proto_tree* tree,
- guint list_index, guint8 attr_type, guint8 circuit_id);
+typedef bool (*ias_value_dissector_t)(tvbuff_t* tvb, unsigned offset, packet_info* pinfo, proto_tree* tree,
+ unsigned list_index, uint8_t attr_type, uint8_t circuit_id);
typedef const struct ias_attr_dissector {
const char* attr_name;
@@ -50,14 +50,14 @@ typedef const struct ias_class_dissector {
} ias_class_dissector_t;
-extern gboolean check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, guint offset,
- const char* attr_name, guint8 attr_type);
-extern guint8 check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, guint offset,
- const char* attr_name, guint8 attr_type);
+extern bool check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
+ const char* attr_name, uint8_t attr_type);
+extern uint8_t check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
+ const char* attr_name, uint8_t attr_type);
-extern void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissector_handle_t dissector, guint8 circuit_id);
+extern void add_lmp_conversation(packet_info* pinfo, uint8_t dlsap, bool ttp, dissector_handle_t dissector, uint8_t circuit_id);
-extern unsigned dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, guint offset);
+extern unsigned dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, unsigned offset);
/*
* Protocol exports.
diff --git a/plugins/epan/irda/packet-ircomm.c b/plugins/epan/irda/packet-ircomm.c
index cd5372a52e..d3237014df 100644
--- a/plugins/epan/irda/packet-ircomm.c
+++ b/plugins/epan/irda/packet-ircomm.c
@@ -116,11 +116,11 @@
void proto_reg_handoff_ircomm(void);
/* Initialize the subtree pointers */
-static gint ett_ircomm;
-static gint ett_ircomm_ctrl;
+static int ett_ircomm;
+static int ett_ircomm_ctrl;
#define MAX_PARAMETERS 32
-static gint ett_param[MAX_IAP_ENTRIES * MAX_PARAMETERS];
+static int ett_param[MAX_IAP_ENTRIES * MAX_PARAMETERS];
static dissector_handle_t ircomm_raw_handle;
static dissector_handle_t ircomm_cooked_handle;
@@ -133,12 +133,12 @@ static int hf_ircomm_param;
static int hf_control;
static int hf_control_len;
-static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_info* pinfo,
- proto_tree* tree, guint list_index, guint8 attr_type, guint8 circuit_id);
-static gboolean dissect_ircomm_ttp_lsap(tvbuff_t* tvb, guint offset, packet_info* pinfo,
- proto_tree* tree, guint list_index, guint8 attr_type, guint8 circuit_id);
-static gboolean dissect_ircomm_lmp_lsap(tvbuff_t* tvb, guint offset, packet_info* pinfo,
- proto_tree* tree, guint list_index, guint8 attr_type, guint8 circuit_id);
+static bool dissect_ircomm_parameters(tvbuff_t* tvb, unsigned offset, packet_info* pinfo,
+ proto_tree* tree, unsigned list_index, uint8_t attr_type, uint8_t circuit_id);
+static bool dissect_ircomm_ttp_lsap(tvbuff_t* tvb, unsigned offset, packet_info* pinfo,
+ proto_tree* tree, unsigned list_index, uint8_t attr_type, uint8_t circuit_id);
+static bool dissect_ircomm_lmp_lsap(tvbuff_t* tvb, unsigned offset, packet_info* pinfo,
+ proto_tree* tree, unsigned list_index, uint8_t attr_type, uint8_t circuit_id);
ias_attr_dissector_t ircomm_attr_dissector[] = {
/* IrDA:IrCOMM attribute dissectors */
@@ -162,9 +162,9 @@ static int dissect_cooked_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree*
{
proto_item *ti;
proto_tree *ircomm_tree, *ctrl_tree;
- guint offset = 0;
- guint clen;
- gint len = tvb_reported_length(tvb);
+ unsigned offset = 0;
+ unsigned clen;
+ int len = tvb_reported_length(tvb);
if (len == 0)
return len;
@@ -172,7 +172,7 @@ static int dissect_cooked_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree*
/* Make entries in Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrCOMM");
- clen = tvb_get_guint8(tvb, offset);
+ clen = tvb_get_uint8(tvb, offset);
len -= 1 + clen;
if (len > 0)
@@ -203,7 +203,7 @@ static int dissect_cooked_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree*
*/
static int dissect_raw_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U_)
{
- guint len = tvb_reported_length(tvb);
+ unsigned len = tvb_reported_length(tvb);
proto_item* ti;
proto_tree* ircomm_tree;
@@ -228,19 +228,19 @@ static int dissect_raw_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tre
/*
* Dissect IrCOMM IAS "Parameters" attribute
*/
-static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_info* pinfo _U_,
- proto_tree* tree, guint list_index, guint8 attr_type, guint8 circuit_id _U_)
+static bool dissect_ircomm_parameters(tvbuff_t* tvb, unsigned offset, packet_info* pinfo _U_,
+ proto_tree* tree, unsigned list_index, uint8_t attr_type, uint8_t circuit_id _U_)
{
- guint len;
- guint n = 0;
+ unsigned len;
+ unsigned n = 0;
proto_item* ti;
proto_tree* p_tree;
char buf[256];
- guint8 pv;
+ uint8_t pv;
if (!check_iap_octet_result(tvb, tree, offset, "Parameters", attr_type))
- return TRUE;
+ return true;
if (tree)
{
@@ -249,7 +249,7 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_in
while (offset < len)
{
- guint8 p_len = tvb_get_guint8(tvb, offset + 1);
+ uint8_t p_len = tvb_get_uint8(tvb, offset + 1);
ti = proto_tree_add_item(tree, hf_ircomm_param, tvb, offset, p_len + 2, ENC_NA);
@@ -257,12 +257,12 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_in
buf[0] = 0;
- switch (tvb_get_guint8(tvb, offset))
+ switch (tvb_get_uint8(tvb, offset))
{
case IRCOMM_SERVICE_TYPE:
proto_item_append_text(ti, ": Service Type (");
- pv = tvb_get_guint8(tvb, offset+2);
+ pv = tvb_get_uint8(tvb, offset+2);
if (pv & IRCOMM_3_WIRE_RAW)
(void) g_strlcat(buf, ", 3-Wire raw", 256);
if (pv & IRCOMM_3_WIRE)
@@ -284,7 +284,7 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_in
case IRCOMM_PORT_TYPE:
proto_item_append_text(ti, ": Port Type (");
- pv = tvb_get_guint8(tvb, offset+2);
+ pv = tvb_get_uint8(tvb, offset+2);
if (pv & IRCOMM_SERIAL)
(void) g_strlcat(buf, ", serial", 256);
if (pv & IRCOMM_PARALLEL)
@@ -317,43 +317,43 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_in
}
- return TRUE;
+ return true;
}
/*
* Dissect IrCOMM IAS "IrDA:TinyTP:LsapSel" attribute
*/
-static gboolean dissect_ircomm_ttp_lsap(tvbuff_t* tvb, guint offset, packet_info* pinfo,
- proto_tree* tree, guint list_index _U_, guint8 attr_type, guint8 circuit_id)
+static bool dissect_ircomm_ttp_lsap(tvbuff_t* tvb, unsigned offset, packet_info* pinfo,
+ proto_tree* tree, unsigned list_index _U_, uint8_t attr_type, uint8_t circuit_id)
{
- guint8 dlsap;
+ uint8_t dlsap;
if ((dlsap = check_iap_lsap_result(tvb, tree, offset, "IrDA:TinyTP:LsapSel", attr_type)) == 0)
- return FALSE;
+ return false;
- add_lmp_conversation(pinfo, dlsap, TRUE, ircomm_cooked_handle, circuit_id);
+ add_lmp_conversation(pinfo, dlsap, true, ircomm_cooked_handle, circuit_id);
- return FALSE;
+ return false;
}
/*
* Dissect IrCOMM/IrLPT IAS "IrDA:IrLMP:LsapSel" attribute
*/
-static gboolean dissect_ircomm_lmp_lsap(tvbuff_t* tvb, guint offset, packet_info* pinfo,
- proto_tree* tree, guint list_index _U_, guint8 attr_type, guint8 circuit_id)
+static bool dissect_ircomm_lmp_lsap(tvbuff_t* tvb, unsigned offset, packet_info* pinfo,
+ proto_tree* tree, unsigned list_index _U_, uint8_t attr_type, uint8_t circuit_id)
{
- guint8 dlsap;
+ uint8_t dlsap;
if ((dlsap = check_iap_lsap_result(tvb, tree, offset, "IrDA:IrLMP:LsapSel", attr_type)) == 0)
- return FALSE;
+ return false;
- add_lmp_conversation(pinfo, dlsap, FALSE, ircomm_raw_handle, circuit_id);
+ add_lmp_conversation(pinfo, dlsap, false, ircomm_raw_handle, circuit_id);
- return FALSE;
+ return false;
}
@@ -362,7 +362,7 @@ static gboolean dissect_ircomm_lmp_lsap(tvbuff_t* tvb, guint offset, packet_info
*/
void proto_register_ircomm(void)
{
- guint i;
+ unsigned i;
/* Setup list of header fields */
static hf_register_info hf_ircomm[] = {
@@ -395,12 +395,12 @@ void proto_register_ircomm(void)
};
/* Setup protocol subtree arrays */
- static gint* ett[] = {
+ static int* ett[] = {
&ett_ircomm,
&ett_ircomm_ctrl
};
- gint* ett_p[MAX_IAP_ENTRIES * MAX_PARAMETERS];
+ int* ett_p[MAX_IAP_ENTRIES * MAX_PARAMETERS];
/* Register protocol names and descriptions */
diff --git a/plugins/epan/irda/packet-irda.c b/plugins/epan/irda/packet-irda.c
index 6486aa797e..a3d096fcc9 100644
--- a/plugins/epan/irda/packet-irda.c
+++ b/plugins/epan/irda/packet-irda.c
@@ -23,6 +23,8 @@
#include <epan/strutil.h>
#include <epan/conversation.h>
#include <epan/xdlc.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include <wiretap/wtap.h>
#include <epan/dissectors/packet-sll.h>
@@ -222,23 +224,23 @@ static int hf_log_msg;
static int hf_log_missed;
/* Initialize the subtree pointers */
-static gint ett_irlap;
-static gint ett_lap_a;
-static gint ett_lap_c;
-static gint ett_lap_i;
-static gint ett_xid_flags;
-static gint ett_log;
-static gint ett_irlmp;
-static gint ett_lmp_dst;
-static gint ett_lmp_src;
-static gint ett_iap;
-static gint ett_iap_ctl;
-static gint ett_ttp;
+static int ett_irlap;
+static int ett_lap_a;
+static int ett_lap_c;
+static int ett_lap_i;
+static int ett_xid_flags;
+static int ett_log;
+static int ett_irlmp;
+static int ett_lmp_dst;
+static int ett_lmp_src;
+static int ett_iap;
+static int ett_iap_ctl;
+static int ett_ttp;
#define MAX_PARAMETERS 32
-static gint ett_param[MAX_PARAMETERS];
+static int ett_param[MAX_PARAMETERS];
-static gint ett_iap_entry[MAX_IAP_ENTRIES];
+static int ett_iap_entry[MAX_IAP_ENTRIES];
static int irda_address_type = -1;
@@ -259,15 +261,15 @@ static const xdlc_cf_items irlap_cf_items = {
/* IAP conversation type */
typedef struct iap_conversation {
struct iap_conversation* pnext;
- guint32 iap_query_frame;
+ uint32_t iap_query_frame;
ias_attr_dissector_t* pattr_dissector;
} iap_conversation_t;
/* IrLMP conversation type */
typedef struct lmp_conversation {
struct lmp_conversation* pnext;
- guint32 iap_result_frame;
- gboolean ttp;
+ uint32_t iap_result_frame;
+ bool ttp;
dissector_handle_t dissector;
} lmp_conversation_t;
@@ -460,9 +462,9 @@ static ias_class_dissector_t class_dissector[] = { CLASS_DISSECTORS };
/*
* Dissect parameter tuple
*/
-guint dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, guint offset)
+unsigned dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, unsigned offset)
{
- guint8 len = tvb_get_guint8(tvb, offset + 1);
+ uint8_t len = tvb_get_uint8(tvb, offset + 1);
if (tree)
proto_tree_add_item(tree, hf_param_pi, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -486,10 +488,10 @@ guint dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, guint offset)
/*
* Dissect TTP
*/
-static guint dissect_ttp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, gboolean data)
+static unsigned dissect_ttp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, bool data)
{
- guint offset = 0;
- guint8 head;
+ unsigned offset = 0;
+ uint8_t head;
char buf[128];
if (tvb_reported_length(tvb) == 0)
@@ -498,7 +500,7 @@ static guint dissect_ttp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, gb
/* Make entries in Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TTP");
- head = tvb_get_guint8(tvb, offset);
+ head = tvb_get_uint8(tvb, offset);
snprintf(buf, 128, ", Credit=%d", head & ~TTP_PARAMETERS);
col_append_str(pinfo->cinfo, COL_INFO, buf);
@@ -533,13 +535,13 @@ static guint dissect_ttp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, gb
/*
* Dissect IAP request
*/
-static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, guint8 circuit_id)
+static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, uint8_t circuit_id)
{
- guint offset = 0;
- guint8 op;
- guint8 clen = 0;
- guint8 alen = 0;
- guint8 src;
+ unsigned offset = 0;
+ uint8_t op;
+ uint8_t clen = 0;
+ uint8_t alen = 0;
+ uint8_t src;
address srcaddr;
address destaddr;
conversation_t* conv;
@@ -551,13 +553,13 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
/* Make entries in Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IAP");
- op = tvb_get_guint8(tvb, offset) & IAP_OP;
+ op = tvb_get_uint8(tvb, offset) & IAP_OP;
switch (op)
{
case GET_VALUE_BY_CLASS:
- clen = MIN(tvb_get_guint8(tvb, offset + 1), 60);
- alen = MIN(tvb_get_guint8(tvb, offset + 1 + 1 + clen), 60);
+ clen = MIN(tvb_get_uint8(tvb, offset + 1), 60);
+ alen = MIN(tvb_get_uint8(tvb, offset + 1 + 1 + clen), 60);
/* create conversation entry */
src = circuit_id ^ CMD_FRAME;
@@ -602,8 +604,8 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
char *attr_name = (char *) tvb_get_string_enc(pinfo->pool, tvb, offset + 1 + 1 + clen + 1, alen, ENC_ASCII|ENC_NA);
col_add_fstr(pinfo->cinfo, COL_INFO, "GetValueByClass: \"%s\" \"%s\"",
- format_text(pinfo->pool, (guchar *) class_name, strlen(class_name)),
- format_text(pinfo->pool, (guchar *) attr_name, strlen(attr_name)));
+ format_text(pinfo->pool, (unsigned char *) class_name, strlen(class_name)),
+ format_text(pinfo->pool, (unsigned char *) attr_name, strlen(attr_name)));
/* Dissect IAP query if it is new */
if (iap_conv)
@@ -672,24 +674,24 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
/*
* Dissect IAP result
*/
-static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, guint8 circuit_id)
+static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, uint8_t circuit_id)
{
- guint offset = 0;
- guint len = tvb_reported_length(tvb);
- guint n = 0;
- guint list_len;
- guint8 op;
- guint8 retcode;
- guint8 type;
- guint16 attr_len;
+ unsigned offset = 0;
+ unsigned len = tvb_reported_length(tvb);
+ unsigned n = 0;
+ unsigned list_len;
+ uint8_t op;
+ uint8_t retcode;
+ uint8_t type;
+ uint16_t attr_len;
char buf[300];
- guint8 src;
+ uint8_t src;
address srcaddr;
address destaddr;
conversation_t* conv;
iap_conversation_t* cur_iap_conv;
iap_conversation_t* iap_conv = NULL;
- guint32 num;
+ uint32_t num;
if (len == 0)
@@ -698,8 +700,8 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
/* Make entries in Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IAP");
- op = tvb_get_guint8(tvb, offset) & IAP_OP;
- retcode = tvb_get_guint8(tvb, offset + 1);
+ op = tvb_get_uint8(tvb, offset) & IAP_OP;
+ retcode = tvb_get_uint8(tvb, offset + 1);
src = circuit_id ^ CMD_FRAME;
set_address(&srcaddr, irda_address_type, 1, &src);
@@ -740,7 +742,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
case GET_VALUE_BY_CLASS:
if (retcode == 0)
{
- switch (tvb_get_guint8(tvb, offset + 6))
+ switch (tvb_get_uint8(tvb, offset + 6))
{
case IAS_MISSING:
col_append_str(pinfo->cinfo, COL_INFO, ", Missing");
@@ -755,7 +757,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
break;
case IAS_STRING:
- n = tvb_get_guint8(tvb, offset + 8);
+ n = tvb_get_uint8(tvb, offset + 8);
col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", tvb_get_string_enc(pinfo->pool, tvb, offset + 9, n, ENC_ASCII));
break;
default:
@@ -799,7 +801,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
while ((offset < len) && (n < list_len))
{
- type = tvb_get_guint8(tvb, offset + 2);
+ type = tvb_get_uint8(tvb, offset + 2);
switch (type)
{
case IAS_INTEGER:
@@ -811,7 +813,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
break;
case IAS_STRING:
- attr_len = tvb_get_guint8(tvb, offset + 2 + 1 + 1) + 2;
+ attr_len = tvb_get_uint8(tvb, offset + 2 + 1 + 1) + 2;
break;
default:
@@ -875,7 +877,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
while (offset < len)
{
offset += 2;
- type = tvb_get_guint8(tvb, offset);
+ type = tvb_get_uint8(tvb, offset);
offset++;
switch (type)
@@ -895,7 +897,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
break;
case IAS_STRING:
- attr_len = tvb_get_guint8(tvb, offset + 1) + 2;
+ attr_len = tvb_get_uint8(tvb, offset + 1) + 2;
if (iap_conv && iap_conv->pattr_dissector)
iap_conv->pattr_dissector->value_dissector(tvb, offset, pinfo, 0,
n, type, circuit_id);
@@ -922,8 +924,8 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
/*
* Check if IAP result is octet sequence
*/
-gboolean check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, guint offset,
- const char* attr_name, guint8 attr_type)
+bool check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
+ const char* attr_name, uint8_t attr_type)
{
if (attr_type != IAS_OCT_SEQ)
{
@@ -934,20 +936,20 @@ gboolean check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, guint offset,
proto_item_append_text(ti, "\" attribute must be octet sequence!");
}
- return FALSE;
+ return false;
}
else
- return TRUE;
+ return true;
}
/*
* Check if IAP result is correct LsapSel
*/
-guint8 check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, guint offset,
- const char* attr_name, guint8 attr_type)
+uint8_t check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
+ const char* attr_name, uint8_t attr_type)
{
- guint32 lsap;
+ uint32_t lsap;
if ((attr_type != IAS_INTEGER) || ((lsap = tvb_get_ntohl(tvb, offset)) < 0x01) ||
@@ -970,16 +972,16 @@ guint8 check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, guint offset,
/*
* Dissect IrDA application protocol
*/
-static void dissect_appl_proto(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pdu_type_t pdu_type, guint8 circuit_id)
+static void dissect_appl_proto(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pdu_type_t pdu_type, uint8_t circuit_id)
{
- guint offset = 0;
- guint8 src;
+ unsigned offset = 0;
+ uint8_t src;
address srcaddr;
address destaddr;
conversation_t* conv;
lmp_conversation_t* cur_lmp_conv;
lmp_conversation_t* lmp_conv = NULL;
- guint32 num;
+ uint32_t num;
src = circuit_id ^ CMD_FRAME;
@@ -1034,23 +1036,23 @@ static void dissect_appl_proto(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
/*
* Dissect LMP
*/
-static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, guint8 circuit_id)
+static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, uint8_t circuit_id)
{
- guint offset = 0;
- guint8 dlsap;
- guint8 slsap;
- guint8 cbit;
- guint8 opcode = 0;
+ unsigned offset = 0;
+ uint8_t dlsap;
+ uint8_t slsap;
+ uint8_t cbit;
+ uint8_t opcode = 0;
/* Make entries in Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrLMP");
- dlsap = tvb_get_guint8(tvb, offset);
+ dlsap = tvb_get_uint8(tvb, offset);
cbit = dlsap & CONTROL_BIT;
dlsap &= ~CONTROL_BIT;
- slsap = tvb_get_guint8(tvb, offset+1) & ~CONTROL_BIT;
+ slsap = tvb_get_uint8(tvb, offset+1) & ~CONTROL_BIT;
/* save Lsaps in pinfo */
pinfo->srcport = slsap;
@@ -1058,7 +1060,7 @@ static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, g
if (cbit != 0)
{
- opcode = tvb_get_guint8(tvb, offset+2);
+ opcode = tvb_get_uint8(tvb, offset+2);
col_add_fstr(pinfo->cinfo, COL_INFO, "%d > %d, ", slsap, dlsap);
col_append_str(pinfo->cinfo, COL_INFO, val_to_str(opcode, lmp_opcode_vals, "0x%02X"));
@@ -1066,7 +1068,7 @@ static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, g
{
col_append_str(pinfo->cinfo, COL_INFO, " (");
col_append_str(pinfo->cinfo, COL_INFO,
- val_to_str(tvb_get_guint8(tvb, offset+4), lmp_mode_vals, "0x%02X"));
+ val_to_str(tvb_get_uint8(tvb, offset+4), lmp_mode_vals, "0x%02X"));
col_append_str(pinfo->cinfo, COL_INFO, ")");
}
}
@@ -1202,9 +1204,9 @@ static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, g
/*
* Add LMP conversation
*/
-void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissector_handle_t dissector, guint8 circuit_id)
+void add_lmp_conversation(packet_info* pinfo, uint8_t dlsap, bool ttp, dissector_handle_t dissector, uint8_t circuit_id)
{
- guint8 dest;
+ uint8_t dest;
address srcaddr;
address destaddr;
conversation_t* conv;
@@ -1254,27 +1256,27 @@ void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissec
/*
* Dissect Negotiation Parameters
*/
-static guint dissect_negotiation(tvbuff_t* tvb, proto_tree* tree, guint offset)
+static unsigned dissect_negotiation(tvbuff_t* tvb, proto_tree* tree, unsigned offset)
{
- guint n = 0;
+ unsigned n = 0;
proto_item* ti;
proto_tree* p_tree;
char buf[256];
- guint8 pv;
+ uint8_t pv;
while (tvb_reported_length_remaining(tvb, offset) > 0)
{
- guint8 p_len = tvb_get_guint8(tvb, offset + 1);
+ uint8_t p_len = tvb_get_uint8(tvb, offset + 1);
if (tree)
{
ti = proto_tree_add_item(tree, hf_negotiation_param, tvb, offset, p_len + 2, ENC_NA);
p_tree = proto_item_add_subtree(ti, ett_param[n]);
- pv = tvb_get_guint8(tvb, offset+2);
+ pv = tvb_get_uint8(tvb, offset+2);
buf[0] = 0;
- switch (tvb_get_guint8(tvb, offset))
+ switch (tvb_get_uint8(tvb, offset))
{
case PI_BAUD_RATE:
proto_item_append_text(ti, ": Baud Rate (");
@@ -1295,7 +1297,7 @@ static guint dissect_negotiation(tvbuff_t* tvb, proto_tree* tree, guint offset)
(void) g_strlcat(buf, ", 576000", 256);
if (pv & 0x80)
(void) g_strlcat(buf, ", 1152000", 256);
- if ((p_len > 1) && (tvb_get_guint8(tvb, offset+3) & 0x01))
+ if ((p_len > 1) && (tvb_get_uint8(tvb, offset+3) & 0x01))
(void) g_strlcat(buf, ", 4000000", 256);
(void) g_strlcat(buf, " bps)", 256);
@@ -1463,14 +1465,14 @@ static guint dissect_negotiation(tvbuff_t* tvb, proto_tree* tree, guint offset)
/*
* Dissect XID packet
*/
-static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, proto_tree* lap_tree, gboolean is_command)
+static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, proto_tree* lap_tree, bool is_command)
{
int offset = 0;
proto_item* ti = NULL;
proto_tree* i_tree = NULL;
proto_tree* flags_tree;
- guint32 saddr, daddr;
- guint8 s;
+ uint32_t saddr, daddr;
+ uint8_t s;
proto_tree* lmp_tree = NULL;
if (lap_tree)
@@ -1506,7 +1508,7 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro
if (is_command)
{
- s = tvb_get_guint8(tvb, offset);
+ s = tvb_get_uint8(tvb, offset);
if (s == 0xFF)
col_append_str(pinfo->cinfo, COL_INFO, ", s=final");
else
@@ -1533,9 +1535,9 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro
if (tvb_reported_length_remaining(tvb, offset) > 0)
{
- guint hints_len;
- guint8 hint1 = 0;
- guint8 hint2 = 0;
+ unsigned hints_len;
+ uint8_t hint1 = 0;
+ uint8_t hint2 = 0;
if (root)
{
@@ -1545,7 +1547,7 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro
for (hints_len = 0;;)
{
- guint8 hint = tvb_get_guint8(tvb, offset + hints_len++);
+ uint8_t hint = tvb_get_uint8(tvb, offset + hints_len++);
if (hints_len == 1)
hint1 = hint;
@@ -1599,13 +1601,13 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro
if (tvb_reported_length_remaining(tvb, offset) > 0)
{
- guint8 cset;
- gint name_len;
- gchar *name;
- gboolean have_encoding;
- guint encoding;
+ uint8_t cset;
+ int name_len;
+ char *name;
+ bool have_encoding;
+ unsigned encoding;
- cset = tvb_get_guint8(tvb, offset);
+ cset = tvb_get_uint8(tvb, offset);
if (root)
proto_tree_add_uint(lmp_tree, hf_lmp_xid_charset, tvb, offset, 1, cset);
offset++;
@@ -1616,70 +1618,70 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro
case LMP_CHARSET_ASCII:
encoding = ENC_ASCII|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_1:
encoding = ENC_ISO_8859_1|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_2:
encoding = ENC_ISO_8859_2|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_3:
encoding = ENC_ISO_8859_3|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_4:
encoding = ENC_ISO_8859_4|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_5:
encoding = ENC_ISO_8859_5|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_6:
encoding = ENC_ISO_8859_6|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_7:
encoding = ENC_ISO_8859_7|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_8:
encoding = ENC_ISO_8859_8|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_ISO_8859_9:
encoding = ENC_ISO_8859_9|ENC_NA;
- have_encoding = TRUE;
+ have_encoding = true;
break;
case LMP_CHARSET_UNICODE:
/* Presumably big-endian; assume just UCS-2 for now */
encoding = ENC_UCS_2|ENC_BIG_ENDIAN;
- have_encoding = TRUE;
+ have_encoding = true;
break;
default:
encoding = 0;
- have_encoding = FALSE;
+ have_encoding = false;
break;
}
if (have_encoding)
{
- name = (gchar *) tvb_get_string_enc(pinfo->pool, tvb, offset, name_len, encoding);
- col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", format_text(pinfo->pool, (guchar *) name, strlen(name)));
+ name = (char *) tvb_get_string_enc(pinfo->pool, tvb, offset, name_len, encoding);
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", \"%s\"", format_text(pinfo->pool, (unsigned char *) name, strlen(name)));
if (root)
proto_tree_add_item(lmp_tree, hf_lmp_xid_name, tvb, offset,
-1, encoding);
@@ -1711,7 +1713,7 @@ static void dissect_log(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
}
else
{
- guint length;
+ unsigned length;
char *buf;
length = tvb_captured_length(tvb);
@@ -1721,7 +1723,7 @@ static void dissect_log(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
else if (length > 1 && buf[length-2] == '\n')
buf[length-2] = 0;
- col_add_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, (guchar *) buf, strlen(buf)));
+ col_add_str(pinfo->cinfo, COL_INFO, format_text(pinfo->pool, (unsigned char *) buf, strlen(buf)));
}
if (root)
@@ -1743,14 +1745,14 @@ static void dissect_log(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
{
int offset = 0;
- guint8 circuit_id, c;
- gboolean is_response;
+ uint8_t circuit_id, c;
+ bool is_response;
char addr[9];
proto_item* ti = NULL;
proto_tree* tree = NULL;
proto_tree* i_tree = NULL;
- guint32 saddr, daddr;
- guint8 ca;
+ uint32_t saddr, daddr;
+ uint8_t ca;
/* Make entries in Protocol column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IrLAP");
@@ -1771,7 +1773,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
}
/* decode values used for demuxing */
- circuit_id = tvb_get_guint8(tvb, 0);
+ circuit_id = tvb_get_uint8(tvb, 0);
/* initially set address columns to connection address */
snprintf(addr, sizeof(addr)-1, "0x%02X", circuit_id >> 1);
@@ -1808,7 +1810,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
/* process the control field */
c = dissect_xdlc_control(tvb, offset, pinfo, tree, hf_lap_c,
ett_lap_c, &irlap_cf_items, NULL, lap_c_u_cmd_abbr_vals,
- lap_c_u_rsp_abbr_vals, is_response, FALSE, FALSE);
+ lap_c_u_rsp_abbr_vals, is_response, false, false);
offset++;
if ((c & XDLC_I_MASK) == XDLC_I) {
@@ -1848,7 +1850,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
proto_tree_add_uint(i_tree, hf_snrm_daddr, tvb, offset, 4, daddr);
offset += 4;
- ca = tvb_get_guint8(tvb, offset);
+ ca = tvb_get_uint8(tvb, offset);
if (!is_response)
{
col_append_fstr(pinfo->cinfo, COL_INFO, ", ca=0x%02X",
@@ -1865,7 +1867,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
case IRDA_XID_CMD:
tvb = tvb_new_subset_remaining(tvb, offset);
- dissect_xid(tvb, pinfo, root, tree, TRUE);
+ dissect_xid(tvb, pinfo, root, tree, true);
return;
case XDLC_UA:
@@ -1897,7 +1899,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
case XDLC_XID:
tvb = tvb_new_subset_remaining(tvb, offset);
- dissect_xid(tvb, pinfo, root, tree, FALSE);
+ dissect_xid(tvb, pinfo, root, tree, false);
return;
}
}
@@ -1928,11 +1930,11 @@ static int dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, voi
return tvb_captured_length(tvb);
}
-static int irda_addr_to_str(const address* addr, gchar *buf, int buf_len _U_)
+static int irda_addr_to_str(const address* addr, char *buf, int buf_len _U_)
{
- const guint8 *addrdata = (const guint8 *)addr->data;
+ const uint8_t *addrdata = (const uint8_t *)addr->data;
- guint32_to_str_buf(*addrdata, buf, buf_len);
+ uint32_to_str_buf(*addrdata, buf, buf_len);
return (int)strlen(buf);
}
@@ -1941,7 +1943,7 @@ static int irda_addr_str_len(const address* addr _U_)
return 11; /* Leaves required space (10 bytes) for uint_to_str_back() */
}
-static const char* irda_col_filter_str(const address* addr _U_, gboolean is_src _U_)
+static const char* irda_col_filter_str(const address* addr _U_, bool is_src _U_)
{
return "irlap.a";
}
@@ -1958,7 +1960,7 @@ static int irda_addr_len(void)
*/
void proto_register_irda(void)
{
- guint i;
+ unsigned i;
/* Setup list of header fields */
static hf_register_info hf_lap[] = {
@@ -2257,7 +2259,7 @@ void proto_register_irda(void)
};
/* Setup protocol subtree arrays */
- static gint* ett[] = {
+ static int* ett[] = {
&ett_irlap,
&ett_lap_a,
&ett_lap_c,
@@ -2272,8 +2274,8 @@ void proto_register_irda(void)
&ett_ttp
};
- gint* ett_p[MAX_PARAMETERS];
- gint* ett_iap_e[MAX_IAP_ENTRIES];
+ int* ett_p[MAX_PARAMETERS];
+ int* ett_iap_e[MAX_IAP_ENTRIES];
/* Register protocol names and descriptions */
diff --git a/plugins/epan/irda/packet-sir.c b/plugins/epan/irda/packet-sir.c
index b9baf4775c..3aa81fe776 100644
--- a/plugins/epan/irda/packet-sir.c
+++ b/plugins/epan/irda/packet-sir.c
@@ -67,24 +67,24 @@ static const value_string plugin_proto_checksum_vals[] = {
static tvbuff_t *
unescape_data(tvbuff_t *tvb, packet_info *pinfo)
{
- if (tvb_find_guint8(tvb, 0, -1, SIR_CE) == -1) {
+ if (tvb_find_uint8(tvb, 0, -1, SIR_CE) == -1) {
return tvb;
} else {
- guint length = tvb_captured_length(tvb);
- guint offset;
- guint8 *data = (guint8 *)wmem_alloc(pinfo->pool, length);
- guint8 *dst = data;
+ unsigned length = tvb_captured_length(tvb);
+ unsigned offset;
+ uint8_t *data = (uint8_t *)wmem_alloc(pinfo->pool, length);
+ uint8_t *dst = data;
tvbuff_t *next_tvb;
for (offset = 0; offset < length; )
{
- guint8 c = tvb_get_guint8(tvb, offset++);
+ uint8_t c = tvb_get_uint8(tvb, offset++);
if ((c == SIR_CE) && (offset < length))
- c = SIR_ESCAPE(tvb_get_guint8(tvb, offset++));
+ c = SIR_ESCAPE(tvb_get_uint8(tvb, offset++));
*dst++ = c;
}
- next_tvb = tvb_new_child_real_data(tvb, data, (guint) (dst-data), (guint) (dst-data));
+ next_tvb = tvb_new_child_real_data(tvb, data, (unsigned) (dst-data), (unsigned) (dst-data));
add_new_data_source(pinfo, next_tvb, "Unescaped SIR");
return next_tvb;
}
@@ -110,14 +110,14 @@ checksum_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root, void* data _U_)
{
- gint offset = 0;
- gint bof_offset;
- gint eof_offset;
+ int offset = 0;
+ int bof_offset;
+ int eof_offset;
while (tvb_reported_length_remaining(tvb, offset) > 0) {
- bof_offset = tvb_find_guint8(tvb, offset, -1, SIR_BOF);
+ bof_offset = tvb_find_uint8(tvb, offset, -1, SIR_BOF);
eof_offset = (bof_offset == -1) ? -1 :
- tvb_find_guint8(tvb, bof_offset, -1, SIR_EOF);
+ tvb_find_uint8(tvb, bof_offset, -1, SIR_EOF);
if (bof_offset == -1 || eof_offset == -1) {
if (pinfo->can_desegment) {
@@ -126,13 +126,13 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root, void* data _U_)
}
return tvb_captured_length(tvb);
} else {
- guint preamble_len = bof_offset - offset;
- gint data_offset = bof_offset + 1;
+ unsigned preamble_len = bof_offset - offset;
+ int data_offset = bof_offset + 1;
tvbuff_t* next_tvb = tvb_new_subset_length_caplen(tvb,
data_offset, eof_offset - data_offset, -1);
next_tvb = unescape_data(next_tvb, pinfo);
if (root) {
- guint data_len = tvb_reported_length(next_tvb) < 2 ? 0 :
+ unsigned data_len = tvb_reported_length(next_tvb) < 2 ? 0 :
tvb_reported_length(next_tvb) - 2;
proto_tree* ti = proto_tree_add_protocol_format(root,
proto_sir, tvb, offset, eof_offset - offset + 1,
@@ -173,7 +173,7 @@ proto_reg_handoff_irsir(void)
void
proto_register_irsir(void)
{
- static gint* ett[] = { &ett_sir };
+ static int* ett[] = { &ett_sir };
static hf_register_info hf_sir[] = {
{ &hf_sir_bof,
diff --git a/plugins/epan/mate/CMakeLists.txt b/plugins/epan/mate/CMakeLists.txt
index e012f536bc..62b6c09048 100644
--- a/plugins/epan/mate/CMakeLists.txt
+++ b/plugins/epan/mate/CMakeLists.txt
@@ -45,12 +45,11 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "Meta Analysis Tracing Engine (MATE)"
${DISSECTOR_SRC}
${DISSECTOR_SUPPORT_SRC}
)
-add_wireshark_epan_plugin_library(mate)
+add_wireshark_plugin_library(mate epan)
target_link_libraries(mate epan)
diff --git a/plugins/epan/mate/examples/tcp.mate b/plugins/epan/mate/examples/tcp.mate
index 773ad85f37..541acf871c 100644
--- a/plugins/epan/mate/examples/tcp.mate
+++ b/plugins/epan/mate/examples/tcp.mate
@@ -1,14 +1,20 @@
+Transform add_tcp_stop {
+ Match (tcp_flags_reset="True") Insert (tcp_stop="True");
+ Match (tcp_flags_fin="True") Insert (tcp_stop="True");
+};
+
Pdu tcp_pdu Proto tcp Transport ip {
Extract addr From ip.addr;
Extract port From tcp.port;
Extract tcp_start From tcp.flags.syn;
- Extract tcp_stop From tcp.flags.reset;
- Extract tcp_stop From tcp.flags.fin;
+ Extract tcp_flags_reset From tcp.flags.reset;
+ Extract tcp_flags_fin From tcp.flags.fin;
+ Transform add_tcp_stop;
};
Gop tcp_ses On tcp_pdu Match (addr, addr, port, port) {
- Start (tcp_start=1);
- Stop (tcp_stop=1);
+ Start (tcp_start="True");
+ Stop (tcp_stop="True");
};
Done;
diff --git a/plugins/epan/mate/mate.h b/plugins/epan/mate/mate.h
index c4a5adc954..b449aa0c25 100644
--- a/plugins/epan/mate/mate.h
+++ b/plugins/epan/mate/mate.h
@@ -73,8 +73,8 @@ typedef enum _accept_mode_t {
typedef struct _mate_cfg_pdu {
- gchar* name;
- guint last_id; /* keeps the last id given to an item of this kind */
+ char* name;
+ unsigned last_id; /* keeps the last id given to an item of this kind */
GHashTable* items; /* all the items of this type */
GPtrArray* transforms; /* transformations to be applied */
@@ -87,14 +87,14 @@ typedef struct _mate_cfg_pdu {
GHashTable* my_hfids; /* for creating register info */
- gint ett;
- gint ett_attr;
+ int ett;
+ int ett_attr;
GHashTable* hfids_attr; /* k=hfid v=avp_name */
- gboolean discard;
- gboolean last_extracted;
- gboolean drop_unassigned;
+ bool discard;
+ bool last_extracted;
+ bool drop_unassigned;
GPtrArray* transport_ranges; /* hfids of candidate transport ranges from which to extract attributes */
GPtrArray* payload_ranges; /* hfids of candidate payload ranges from which to extract attributes */
@@ -106,25 +106,25 @@ typedef struct _mate_cfg_pdu {
typedef struct _mate_cfg_gop {
- gchar* name;
- guint last_id; /* keeps the last id given to an item of this kind */
+ char* name;
+ unsigned last_id; /* keeps the last id given to an item of this kind */
GHashTable* items; /* all the items of this type */
GPtrArray* transforms; /* transformations to be applied */
- gchar* on_pdu;
+ char* on_pdu;
AVPL* key; /* key candidate avpl */
AVPL* start; /* start candidate avpl */
AVPL* stop; /* stop candidate avpl */
AVPL* extra; /* attributes to be added */
- float expiration;
- float idle_timeout;
- float lifetime;
+ double expiration;
+ double idle_timeout;
+ double lifetime;
- gboolean drop_unassigned;
+ bool drop_unassigned;
gop_pdu_tree_t pdu_tree_mode;
- gboolean show_times;
+ bool show_times;
GHashTable* my_hfids; /* for creating register info */
int hfid;
@@ -134,10 +134,10 @@ typedef struct _mate_cfg_gop {
int hfid_gop_pdu;
int hfid_gop_num_pdus;
- gint ett;
- gint ett_attr;
- gint ett_times;
- gint ett_children;
+ int ett;
+ int ett_attr;
+ int ett_times;
+ int ett_children;
GHashTable* gop_index;
GHashTable* gog_index;
@@ -145,19 +145,19 @@ typedef struct _mate_cfg_gop {
typedef struct _mate_cfg_gog {
- gchar* name;
+ char* name;
GHashTable* items; /* all the items of this type */
- guint last_id; /* keeps the last id given to an item of this kind */
+ unsigned last_id; /* keeps the last id given to an item of this kind */
GPtrArray* transforms; /* transformations to be applied */
LoAL* keys;
AVPL* extra; /* attributes to be added */
- float expiration;
+ double expiration;
gop_tree_mode_t gop_tree_mode;
- gboolean show_times;
+ bool show_times;
GHashTable* my_hfids; /* for creating register info */
int hfid;
@@ -168,24 +168,24 @@ typedef struct _mate_cfg_gog {
int hfid_start_time;
int hfid_stop_time;
int hfid_last_time;
- gint ett;
- gint ett_attr;
- gint ett_times;
- gint ett_children;
- gint ett_gog_gop;
+ int ett;
+ int ett_attr;
+ int ett_times;
+ int ett_children;
+ int ett_gog_gop;
} mate_cfg_gog;
typedef struct _mate_config {
- gchar* mate_config_file; /* name of the config file */
+ char* mate_config_file; /* name of the config file */
int hfid_mate;
GArray *wanted_hfids; /* hfids of protocols and fields MATE needs */
- guint num_fields_wanted; /* number of fields MATE will look at */
+ unsigned num_fields_wanted; /* number of fields MATE will look at */
FILE* dbg_facility; /* where to dump dbgprint output ws_message if null */
- gchar* mate_lib_path; /* where to look for "Include" files first */
+ char* mate_lib_path; /* where to look for "Include" files first */
GHashTable* pducfgs; /* k=pducfg->name v=pducfg */
GHashTable* gopcfgs; /* k=gopcfg->name v=gopcfg */
@@ -197,7 +197,7 @@ typedef struct _mate_config {
GHashTable* gogs_by_gopname; /* k=gopname v=loal where avpl->name == matchedgop->name */
GArray* hfrs;
- gint ett_root;
+ int ett_root;
GArray* ett;
/* defaults */
@@ -205,26 +205,26 @@ typedef struct _mate_config {
struct _pdu_defaults {
avpl_match_mode match_mode;
avpl_replace_mode replace_mode;
- gboolean last_extracted;
+ bool last_extracted;
- gboolean drop_unassigned;
- gboolean discard;
+ bool drop_unassigned;
+ bool discard;
} pdu;
struct _gop_defaults {
- float expiration;
- float idle_timeout;
- float lifetime;
+ double expiration;
+ double idle_timeout;
+ double lifetime;
gop_pdu_tree_t pdu_tree_mode;
- gboolean show_times;
- gboolean drop_unassigned;
+ bool show_times;
+ bool drop_unassigned;
} gop;
struct _gog_defaults {
- float expiration;
- gboolean show_times;
+ double expiration;
+ bool show_times;
gop_tree_mode_t gop_tree_mode;
} gog;
} defaults;
@@ -242,15 +242,15 @@ typedef struct _mate_config {
typedef struct _mate_config_frame {
- gchar* filename;
- guint linenum;
+ char* filename;
+ unsigned linenum;
} mate_config_frame;
typedef struct _mate_runtime_data {
- guint current_items; /* a count of items */
- float now;
- guint highest_analyzed_frame;
+ unsigned current_items; /* a count of items */
+ double now;
+ unsigned highest_analyzed_frame;
GHashTable* frames; /* k=frame.num v=pdus */
@@ -262,46 +262,46 @@ typedef struct _mate_gog mate_gog;
/* these are used to contain information regarding pdus, gops and gogs */
struct _mate_pdu {
- guint32 id; /* 1:1 -> saving a g_malloc */
+ uint32_t id; /* 1:1 -> saving a g_malloc */
mate_cfg_pdu* cfg; /* the type of this item */
AVPL* avpl;
- guint32 frame; /* which frame I belong to? */
+ uint32_t frame; /* which frame I belong to? */
mate_pdu* next_in_frame; /* points to the next pdu in this frame */
- float rel_time; /* time since start of capture */
+ double rel_time; /* time since start of capture */
mate_gop* gop; /* the gop the pdu belongs to (if any) */
mate_pdu* next; /* next in gop */
- float time_in_gop; /* time since gop start */
+ double time_in_gop; /* time since gop start */
- gboolean first; /* is this the first pdu in this frame? */
- gboolean is_start; /* this is the start pdu for this gop */
- gboolean is_stop; /* this is the stop pdu for this gop */
- gboolean after_release; /* this pdu comes after the stop */
+ bool first; /* is this the first pdu in this frame? */
+ bool is_start; /* this is the start pdu for this gop */
+ bool is_stop; /* this is the stop pdu for this gop */
+ bool after_release; /* this pdu comes after the stop */
};
struct _mate_gop {
- guint32 id;
+ uint32_t id;
mate_cfg_gop* cfg;
- gchar* gop_key;
+ char* gop_key;
AVPL* avpl; /* the attributes of the pdu/gop/gog */
- guint last_n;
+ unsigned last_n;
mate_gog* gog; /* the gog of a gop */
mate_gop* next; /* next in gog; */
- float expiration; /* when will it expire after release (all gops releases if gog)? */
- float idle_expiration; /* when will it expire if no new pdus are assigned to it */
- float time_to_die;
- float time_to_timeout;
+ double expiration; /* when will it expire after release (all gops releases if gog)? */
+ double idle_expiration; /* when will it expire if no new pdus are assigned to it */
+ double time_to_die;
+ double time_to_timeout;
- float start_time; /* time of start */
- float release_time; /* when this gop/gog was released */
- float last_time; /* the rel_time at which the last pdu has been added (to gop or gog's gop) */
+ double start_time; /* time of start */
+ double release_time; /* when this gop/gog was released */
+ double last_time; /* the rel_time at which the last pdu has been added (to gop or gog's gop) */
int num_of_pdus; /* how many gops a gog has? */
@@ -309,26 +309,26 @@ struct _mate_gop {
mate_pdu* pdus; /* pdus that belong to a gop (NULL in gog) */
mate_pdu* last_pdu; /* last pdu in pdu's list */
- gboolean released; /* has this gop been released? */
+ bool released; /* has this gop been released? */
};
struct _mate_gog {
- guint32 id;
+ uint32_t id;
mate_cfg_gog* cfg;
AVPL* avpl; /* the attributes of the pdu/gop/gog */
- guint last_n; /* the number of attributes the avpl had the last time we checked */
+ unsigned last_n; /* the number of attributes the avpl had the last time we checked */
- gboolean released; /* has this gop been released? */
+ bool released; /* has this gop been released? */
- float expiration; /* when will it expire after release (all gops releases if gog)? */
- float idle_expiration; /* when will it expire if no new pdus are assigned to it */
+ double expiration; /* when will it expire after release (all gops releases if gog)? */
+ double idle_expiration; /* when will it expire if no new pdus are assigned to it */
/* on gop and gog: */
- float start_time; /* time of start */
- float release_time; /* when this gog was released */
- float last_time; /* the rel_time at which the last pdu has been added */
+ double start_time; /* time of start */
+ double release_time; /* when this gog was released */
+ double last_time; /* the rel_time at which the last pdu has been added */
mate_gop* gops; /* gops that belong to a gog (NULL in gop) */
mate_gop* last_gop; /* last gop in gop's list */
@@ -347,27 +347,27 @@ typedef union _mate_max_size {
/* from mate_runtime.c */
extern void initialize_mate_runtime(mate_config* mc);
-extern mate_pdu* mate_get_pdus(guint32 framenum);
+extern mate_pdu* mate_get_pdus(uint32_t framenum);
extern void mate_analyze_frame(mate_config *mc, packet_info *pinfo, proto_tree* tree);
/* from mate_setup.c */
-extern mate_config* mate_make_config(const gchar* filename, int mate_hfid);
+extern mate_config* mate_make_config(const char* filename, int mate_hfid);
-extern mate_cfg_pdu* new_pducfg(mate_config* mc, gchar* name);
-extern mate_cfg_gop* new_gopcfg(mate_config* mc, gchar* name);
-extern mate_cfg_gog* new_gogcfg(mate_config* mc, gchar* name);
+extern mate_cfg_pdu* new_pducfg(mate_config* mc, char* name);
+extern mate_cfg_gop* new_gopcfg(mate_config* mc, char* name);
+extern mate_cfg_gog* new_gogcfg(mate_config* mc, char* name);
-extern gboolean add_hfid(mate_config* mc, header_field_info* hfi, gchar* as, GHashTable* where);
-extern gchar* add_ranges(gchar* range, GPtrArray* range_ptr_arr);
+extern bool add_hfid(mate_config* mc, header_field_info* hfi, char* as, GHashTable* where);
+extern char* add_ranges(char* range, GPtrArray* range_ptr_arr);
/* from mate_parser.l */
-extern gboolean mate_load_config(const gchar* filename, mate_config* mc);
+extern bool mate_load_config(const char* filename, mate_config* mc);
/* Constructor/Destructor prototypes for Lemon Parser */
-#define YYMALLOCARGTYPE gsize
+#define YYMALLOCARGTYPE size_t
void *MateParserAlloc(void* (*)(YYMALLOCARGTYPE));
void MateParserFree(void*, void (*)(void *));
-void MateParser(void*, int, gchar*, mate_config*);
+void MateParser(void*, int, char*, mate_config*);
#endif
diff --git a/plugins/epan/mate/mate_grammar.lemon b/plugins/epan/mate/mate_grammar.lemon
index 57f291fe29..e90591ba42 100644
--- a/plugins/epan/mate/mate_grammar.lemon
+++ b/plugins/epan/mate/mate_grammar.lemon
@@ -25,13 +25,16 @@
#include "mate.h"
#include "mate_grammar.h"
+
+#include "ws_attributes.h"
+
#include <wsutil/file_util.h>
#include <wsutil/str_util.h>
#define DUMMY void*
typedef struct _extraction {
- gchar* as;
+ char* as;
header_field_info* hfi;
struct _extraction* next;
struct _extraction* last;
@@ -45,18 +48,18 @@ typedef struct _pdu_criteria_t {
typedef struct _gop_options {
gop_tree_mode_t pdu_tree_mode;
- gboolean drop_unassigned;
- gboolean show_times;
- float expiration;
- float idle_timeout;
- float lifetime;
+ bool drop_unassigned;
+ bool show_times;
+ double expiration;
+ double idle_timeout;
+ double lifetime;
AVPL* start;
AVPL* stop;
AVPL* extras;
} gop_options_t;
typedef struct _gog_statements {
- float expiration;
+ double expiration;
gop_tree_mode_t gop_tree_mode;
GPtrArray* transform_list;
AVPL* extras;
@@ -73,10 +76,11 @@ typedef struct _transf_action_t {
AVPL* avpl;
} transf_action_t;
-static void configuration_error(mate_config* mc, const gchar* fmt, ...) {
- static gchar error_buffer[256];
- const gchar* incl;
- gint i;
+WS_NORETURN
+static void configuration_error(mate_config* mc, const char* fmt, ...) {
+ static char error_buffer[256];
+ const char* incl;
+ int i;
mate_config_frame* current_frame;
va_list list;
@@ -84,7 +88,7 @@ static void configuration_error(mate_config* mc, const gchar* fmt, ...) {
vsnprintf(error_buffer,sizeof(error_buffer),fmt,list);
va_end( list );
- i = (gint) mc->config_stack->len;
+ i = (int) mc->config_stack->len;
while (i--) {
@@ -94,7 +98,7 @@ static void configuration_error(mate_config* mc, const gchar* fmt, ...) {
incl = " ";
}
- current_frame = (mate_config_frame *)g_ptr_array_index(mc->config_stack,(guint)i);
+ current_frame = (mate_config_frame *)g_ptr_array_index(mc->config_stack,(unsigned)i);
g_string_append_printf(mc->config_error,"%s%s at line %u",incl, current_frame->filename, current_frame->linenum);
}
@@ -120,12 +124,12 @@ static AVPL_Transf* new_transform_elem(AVPL* match, AVPL* replace, avpl_match_mo
return t;
}
-static gchar* recolonize(mate_config* mc, gchar* s) {
+static char* recolonize(mate_config* mc, char* s) {
GString* str = g_string_new("");
- gchar** vec;
- gchar* r;
- guint i,v;
- gchar c;
+ char** vec;
+ char* r;
+ unsigned i,v;
+ char c;
vec = g_strsplit(s,":",0);
@@ -181,7 +185,7 @@ DIAG_ON_LEMON()
%token_prefix TOKEN_
-%token_type { gchar* }
+%token_type { char* }
%token_destructor {
(void) mc; /* Mark unused, similar to Q_UNUSED */
g_free($$);
@@ -190,11 +194,15 @@ DIAG_ON_LEMON()
%extra_argument { mate_config* mc }
%syntax_error {
- configuration_error(mc,"Syntax Error before %s",yyminor);
+ if(yyminor == NULL) {
+ configuration_error(mc,"Syntax error detected before end of file.");
+ } else {
+ configuration_error(mc,"Syntax error at or before \"%s\"",yyminor);
+ }
}
%parse_failure {
- configuration_error(mc,"Parse Error");
+ configuration_error(mc,"Parse error");
}
%type transform_decl { AVPL_Transf* }
@@ -206,17 +214,17 @@ DIAG_ON_LEMON()
%type match_mode { avpl_match_mode }
%type action_mode { avpl_replace_mode }
-%type gop_name { gchar* }
-%type time_value { float }
-%type pdu_name { gchar* }
+%type gop_name { char* }
+%type time_value { double }
+%type pdu_name { char* }
%type gop_tree_mode { gop_tree_mode_t }
-%type true_false { gboolean }
+%type true_false { bool }
%type criteria_statement { pdu_criteria_t* }
%type accept_mode { accept_mode_t }
-%type pdu_drop_unassigned_statement { gboolean }
-%type discard_pdu_data_statement { gboolean }
-%type last_extracted_statement { gboolean }
+%type pdu_drop_unassigned_statement { bool }
+%type discard_pdu_data_statement { bool }
+%type last_extracted_statement { bool }
%type extraction_statement {extraction_t*}
%type extraction_statements {extraction_t*}
@@ -226,15 +234,15 @@ DIAG_ON_LEMON()
%type gop_start_statement { AVPL* }
%type gop_stop_statement { AVPL* }
%type extra_statement { AVPL* }
-%type gop_drop_unassigned_statement { gboolean }
+%type gop_drop_unassigned_statement { bool }
%type show_goptree_statement { gop_tree_mode_t }
-%type show_times_statement { gboolean }
-%type gop_expiration_statement { float }
-%type idle_timeout_statement { float }
-%type lifetime_statement { float }
+%type show_times_statement { bool }
+%type gop_expiration_statement { double }
+%type idle_timeout_statement { double }
+%type lifetime_statement { double }
%type gog_statements { gog_statement_t* }
-%type gog_expiration_statement { float }
+%type gog_expiration_statement { double }
%type gog_goptree_statement { gop_tree_mode_t }
%type gog_key_statements { LoAL* }
%type gog_key_statement { AVPL* }
@@ -249,8 +257,8 @@ DIAG_ON_LEMON()
%type avpl { AVPL* }
%type avps { AVPL* }
%type avp { AVP* }
-%type value { gchar* }
-%type avp_oneoff { gchar* }
+%type value { char* }
+%type avp_oneoff { char* }
mate_config ::= decls.
@@ -271,8 +279,8 @@ decl ::= DONE_KW SEMICOLON.
debug_decl ::= DEBUG_KW OPEN_BRACE dbgfile_default dbglevel_default pdu_dbglevel_default gop_dbglevel_default gog_dbglevel_default CLOSE_BRACE SEMICOLON.
-dbgfile_default ::= FILENAME_KW QUOTED(Filename) SEMICOLON. { mc->dbg_facility = ws_fopen(Filename,"w"); if (mc->dbg_facility == NULL) report_open_failure(Filename,errno,TRUE); }
-dbgfile_default ::= FILENAME_KW NAME(Filename) SEMICOLON. { mc->dbg_facility = ws_fopen(Filename,"w"); if (mc->dbg_facility == NULL) report_open_failure(Filename,errno,TRUE); }
+dbgfile_default ::= FILENAME_KW QUOTED(Filename) SEMICOLON. { mc->dbg_facility = ws_fopen(Filename,"w"); if (mc->dbg_facility == NULL) report_open_failure(Filename,errno,true); }
+dbgfile_default ::= FILENAME_KW NAME(Filename) SEMICOLON. { mc->dbg_facility = ws_fopen(Filename,"w"); if (mc->dbg_facility == NULL) report_open_failure(Filename,errno,true); }
dbgfile_default ::= .
dbglevel_default ::= LEVEL_KW INTEGER(LevelString) SEMICOLON. { mc->dbg_lvl = (int) strtol(LevelString,NULL,10); }
@@ -352,7 +360,9 @@ transform_decl(A) ::= TRANSFORM_KW NAME(B) transform_body(C) SEMICOLON. {
for ( c = C; c; c = c->next )
c->name = g_strdup(B);
- g_hash_table_insert(mc->transfs,C->name,C);
+ if (C) {
+ g_hash_table_insert(mc->transfs,C->name,C);
+ }
A = NULL;
}
@@ -445,7 +455,7 @@ pdu_decl ::=
g_ptr_array_add(transport_stack,g_ptr_array_remove_index(Stack,i));
}
- g_ptr_array_free(Stack, TRUE);
+ g_ptr_array_free(Stack, true);
cfg->transport_ranges = transport_stack;
cfg->payload_ranges = Payload;
@@ -522,6 +532,9 @@ proto_stack(A) ::= field(B). {
field(A) ::= NAME(B). {
A = proto_registrar_get_byname(B);
+ if (A == NULL) {
+ configuration_error(mc,"\nUnknown Proto/Transport/field: %s\n",B);
+ };
}
/******************************************* GOP
@@ -560,8 +573,8 @@ gop_decl(A) ::= GOP_KW NAME(Name) ON_KW pdu_name(PduName) MATCH_KW avpl(Key) OPE
cfg->stop = Stop;
cfg->transforms = Transform;
- merge_avpl(cfg->extra,Extra,TRUE);
- delete_avpl(Extra,TRUE);
+ merge_avpl(cfg->extra,Extra,true);
+ delete_avpl(Extra,true);
}
gop_drop_unassigned_statement(A) ::= DROP_UNASSIGNED_KW true_false(B) SEMICOLON. { A = B; }
@@ -593,8 +606,8 @@ gop_tree_mode(A) ::= PDU_TREE_KW. { A = (gop_tree_mode_t)GOP_PDU_TREE; }
gop_tree_mode(A) ::= FRAME_TREE_KW. { A = (gop_tree_mode_t)GOP_FRAME_TREE; }
gop_tree_mode(A) ::= BASIC_TREE_KW. { A = (gop_tree_mode_t)GOP_BASIC_PDU_TREE; }
-true_false(A) ::= TRUE_KW. { A = TRUE; }
-true_false(A) ::= FALSE_KW. { A = FALSE; }
+true_false(A) ::= TRUE_KW. { A = true; }
+true_false(A) ::= FALSE_KW. { A = false; }
pdu_name(A) ::= NAME(B). {
mate_cfg_pdu* c;
@@ -607,11 +620,11 @@ pdu_name(A) ::= NAME(B). {
time_value(A) ::= FLOATING(B). {
- A = (float) g_ascii_strtod(B,NULL);
+ A = g_ascii_strtod(B,NULL);
}
time_value(A) ::= INTEGER(B). {
- A = (float) g_ascii_strtod(B,NULL);
+ A = g_ascii_strtod(B,NULL);
}
/************* GOG
@@ -639,8 +652,8 @@ gog_decl ::= GOG_KW NAME(Name) OPEN_BRACE
cfg->keys = Keys;
cfg->show_times = ShowTimes;
- merge_avpl(cfg->extra,Extra,TRUE);
- delete_avpl(Extra,TRUE);
+ merge_avpl(cfg->extra,Extra,true);
+ delete_avpl(Extra,true);
}
gog_goptree_statement(A) ::= GOP_TREE_KW gop_tree_type(B) SEMICOLON. { A = B; }
diff --git a/plugins/epan/mate/mate_parser.l b/plugins/epan/mate/mate_parser.l
index 6e423abccd..aff57aad61 100644
--- a/plugins/epan/mate/mate_parser.l
+++ b/plugins/epan/mate/mate_parser.l
@@ -261,7 +261,7 @@ blk_cmnt_stop "*/"
}
}
-<OUTSIDE>{comment} ;
+<OUTSIDE>{comment} yyextra->current_frame->linenum++;
<OUTSIDE>{blk_cmnt_start} BEGIN COMMENT;
<COMMENT>{cmnt_char} ;
@@ -339,28 +339,28 @@ blk_cmnt_stop "*/"
*/
DIAG_ON_FLEX()
-static void ptr_array_free(gpointer data, gpointer user_data _U_)
+static void ptr_array_free(void *data, void *user_data _U_)
{
free_config_frame((mate_config_frame *)data);
}
-extern gboolean mate_load_config(const gchar* filename, mate_config* mc) {
+extern bool mate_load_config(const char* filename, mate_config* mc) {
FILE *in;
yyscan_t scanner;
Mate_scanner_state_t state;
- volatile gboolean status = TRUE;
+ volatile bool status = true;
in = ws_fopen(filename,"r");
if (!in) {
g_string_append_printf(mc->config_error,"Mate parser: Could not open file: '%s', error: %s", filename, g_strerror(errno) );
- return FALSE;
+ return false;
}
if (Mate_lex_init(&scanner) != 0) {
g_string_append_printf(mc->config_error, "Mate parse: Could not initialize scanner: %s", g_strerror(errno));
fclose(in);
- return FALSE;
+ return false;
}
Mate_set_in(in, scanner);
@@ -392,9 +392,9 @@ extern gboolean mate_load_config(const gchar* filename, mate_config* mc) {
MateParserFree(state.pParser, g_free);
} CATCH(MateConfigError) {
- status = FALSE;
+ status = false;
} CATCH_ALL {
- status = FALSE;
+ status = false;
g_string_append_printf(mc->config_error,"An unexpected error occurred");
}
ENDTRY;
@@ -403,7 +403,7 @@ extern gboolean mate_load_config(const gchar* filename, mate_config* mc) {
fclose(in);
g_ptr_array_foreach(mc->config_stack, ptr_array_free, NULL);
- g_ptr_array_free(mc->config_stack, TRUE);
+ g_ptr_array_free(mc->config_stack, true);
return status;
}
diff --git a/plugins/epan/mate/mate_runtime.c b/plugins/epan/mate/mate_runtime.c
index 8cda791a62..0227dd4500 100644
--- a/plugins/epan/mate/mate_runtime.c
+++ b/plugins/epan/mate/mate_runtime.c
@@ -19,8 +19,8 @@ typedef struct _mate_range mate_range;
struct _mate_range {
tvbuff_t *ds_tvb;
- guint start;
- guint end;
+ unsigned start;
+ unsigned end;
};
@@ -32,12 +32,12 @@ typedef struct _tmp_pdu_data {
typedef struct _gogkey {
- gchar* key;
+ char* key;
mate_cfg_gop* cfg;
} gogkey;
-static mate_runtime_data* rd = NULL;
+static mate_runtime_data* rd;
static int zero = 5;
@@ -45,19 +45,19 @@ static int* dbg = &zero;
static int* dbg_pdu = &zero;
static int* dbg_gop = &zero;
static int* dbg_gog = &zero;
-static FILE* dbg_facility = NULL;
+static FILE* dbg_facility;
-static gboolean destroy_mate_pdus(gpointer k _U_, gpointer v, gpointer p _U_) {
+static gboolean destroy_mate_pdus(void *k _U_, void *v, void *p _U_) {
mate_pdu* pdu = (mate_pdu*) v;
- if (pdu->avpl) delete_avpl(pdu->avpl,TRUE);
+ if (pdu->avpl) delete_avpl(pdu->avpl,true);
g_slice_free(mate_max_size, (mate_max_size *)pdu);
return TRUE;
}
-static gboolean destroy_mate_gops(gpointer k _U_, gpointer v, gpointer p _U_) {
+static gboolean destroy_mate_gops(void *k _U_, void *v, void *p _U_) {
mate_gop* gop = (mate_gop*) v;
- if (gop->avpl) delete_avpl(gop->avpl,TRUE);
+ if (gop->avpl) delete_avpl(gop->avpl,true);
if (gop->gop_key) {
if (g_hash_table_lookup(gop->cfg->gop_index,gop->gop_key) == gop) {
@@ -75,14 +75,14 @@ static gboolean destroy_mate_gops(gpointer k _U_, gpointer v, gpointer p _U_) {
static void gog_remove_keys (mate_gog* gog);
-static gboolean destroy_mate_gogs(gpointer k _U_, gpointer v, gpointer p _U_) {
+static gboolean destroy_mate_gogs(void *k _U_, void *v, void *p _U_) {
mate_gog* gog = (mate_gog*) v;
- if (gog->avpl) delete_avpl(gog->avpl,TRUE);
+ if (gog->avpl) delete_avpl(gog->avpl,true);
if (gog->gog_keys) {
gog_remove_keys(gog);
- g_ptr_array_free(gog->gog_keys, TRUE);
+ g_ptr_array_free(gog->gog_keys, true);
}
g_slice_free(mate_max_size,(mate_max_size*)gog);
@@ -90,18 +90,18 @@ static gboolean destroy_mate_gogs(gpointer k _U_, gpointer v, gpointer p _U_) {
return TRUE;
}
-static gboolean return_true(gpointer k _U_, gpointer v _U_, gpointer p _U_) {
+static gboolean return_true(void *k _U_, void *v _U_, void *p _U_) {
return TRUE;
}
-static void destroy_pdus_in_cfg(gpointer k _U_, gpointer v, gpointer p _U_) {
+static void destroy_pdus_in_cfg(void *k _U_, void *v, void *p _U_) {
mate_cfg_pdu* c = (mate_cfg_pdu *)v;
g_hash_table_foreach_remove(c->items,destroy_mate_pdus,NULL);
c->last_id = 0;
}
-static void destroy_gops_in_cfg(gpointer k _U_, gpointer v, gpointer p _U_) {
+static void destroy_gops_in_cfg(void *k _U_, void *v, void *p _U_) {
mate_cfg_gop* c = (mate_cfg_gop *)v;
g_hash_table_foreach_remove(c->gop_index,return_true,NULL);
@@ -116,7 +116,7 @@ static void destroy_gops_in_cfg(gpointer k _U_, gpointer v, gpointer p _U_) {
c->last_id = 0;
}
-static void destroy_gogs_in_cfg(gpointer k _U_, gpointer v, gpointer p _U_) {
+static void destroy_gogs_in_cfg(void *k _U_, void *v, void *p _U_) {
mate_cfg_gog* c = (mate_cfg_gog *)v;
g_hash_table_foreach_remove(c->items,destroy_mate_gogs,NULL);
c->last_id = 0;
@@ -160,7 +160,7 @@ void initialize_mate_runtime(mate_config* mc) {
}
-static mate_gop* new_gop(mate_cfg_gop* cfg, mate_pdu* pdu, gchar* key) {
+static mate_gop* new_gop(mate_cfg_gop* cfg, mate_pdu* pdu, char* key) {
mate_gop* gop = (mate_gop*)g_slice_new(mate_max_size);
gop->id = ++(cfg->last_id);
@@ -175,9 +175,9 @@ static mate_gop* new_gop(mate_cfg_gop* cfg, mate_pdu* pdu, gchar* key) {
gop->gog = NULL;
gop->next = NULL;
- gop->expiration = cfg->expiration > 0.0 ? cfg->expiration + rd->now : (float) -1.0 ;
- gop->idle_expiration = cfg->idle_timeout > 0.0 ? cfg->idle_timeout + rd->now : (float) -1.0 ;
- gop->time_to_die = cfg->lifetime > 0.0 ? cfg->lifetime + rd->now : (float) -1.0 ;
+ gop->expiration = cfg->expiration > 0.0 ? cfg->expiration + rd->now : -1.0 ;
+ gop->idle_expiration = cfg->idle_timeout > 0.0 ? cfg->idle_timeout + rd->now : -1.0 ;
+ gop->time_to_die = cfg->lifetime > 0.0 ? cfg->lifetime + rd->now : -1.0 ;
gop->time_to_timeout = 0.0f;
gop->last_time = gop->start_time = rd->now;
@@ -189,11 +189,11 @@ static mate_gop* new_gop(mate_cfg_gop* cfg, mate_pdu* pdu, gchar* key) {
gop->pdus = pdu;
gop->last_pdu = pdu;
- gop->released = FALSE;
+ gop->released = false;
pdu->gop = gop;
pdu->next = NULL;
- pdu->is_start = TRUE;
+ pdu->is_start = true;
pdu->time_in_gop = 0.0f;
g_hash_table_insert(cfg->gop_index,gop->gop_key,gop);
@@ -257,7 +257,7 @@ static mate_gog* new_gog(mate_cfg_gog* cfg, mate_gop* gop) {
static void apply_transforms(GPtrArray* transforms, AVPL* avpl) {
AVPL_Transf* transform = NULL;
- guint i;
+ unsigned i;
for (i = 0; i < transforms->len; i++) {
transform = (AVPL_Transf *)g_ptr_array_index(transforms,i);
@@ -268,11 +268,11 @@ static void apply_transforms(GPtrArray* transforms, AVPL* avpl) {
/* applies the extras for which type to what avpl */
static void apply_extras(AVPL* from, AVPL* to, AVPL* extras) {
- AVPL* our_extras = new_avpl_loose_match("",from, extras, FALSE) ;
+ AVPL* our_extras = new_avpl_loose_match("",from, extras, false) ;
if (our_extras) {
- merge_avpl(to,our_extras,TRUE);
- delete_avpl(our_extras,FALSE);
+ merge_avpl(to,our_extras,true);
+ delete_avpl(our_extras,false);
}
}
@@ -324,12 +324,12 @@ static void reanalyze_gop(mate_config* mc, mate_gop* gop) {
while (( curr_gogkey = get_next_avpl(gog_keys,&cookie) )) {
gop_cfg = (mate_cfg_gop *)g_hash_table_lookup(mc->gopcfgs,curr_gogkey->name);
- if (( gogkey_match = new_avpl_pairs_match(gop_cfg->name, gog->avpl, curr_gogkey, TRUE, FALSE) )) {
+ if (( gogkey_match = new_avpl_pairs_match(gop_cfg->name, gog->avpl, curr_gogkey, true, false) )) {
gog_key = g_new(gogkey, 1);
gog_key->key = avpl_to_str(gogkey_match);
- delete_avpl(gogkey_match,FALSE);
+ delete_avpl(gogkey_match,false);
gog_key->cfg = gop_cfg;
@@ -356,10 +356,10 @@ static void reanalyze_gop(mate_config* mc, mate_gop* gop) {
}
if (gog->num_of_released_gops == gog->num_of_counting_gops) {
- gog->released = TRUE;
+ gog->released = true;
gog->expiration = gog->cfg->expiration + rd->now;
} else {
- gog->released = FALSE;
+ gog->released = false;
}
}
@@ -370,7 +370,7 @@ static void analyze_gop(mate_config* mc, mate_gop* gop) {
void* cookie = NULL;
AVPL* gogkey_match = NULL;
mate_gog* gog = NULL;
- gchar* key = NULL;
+ char* key = NULL;
if ( ! gop->gog ) {
/* no gog, let's either find one or create it if due */
@@ -388,14 +388,14 @@ static void analyze_gop(mate_config* mc, mate_gop* gop) {
dbg_print (dbg_gog,1,dbg_facility,"analyze_gop: got gog_keys: %s",gog_keys->name) ;
while (( curr_gogkey = get_next_avpl(gog_keys,&cookie) )) {
- if (( gogkey_match = new_avpl_pairs_match(gop->cfg->name, gop->avpl, curr_gogkey, TRUE, TRUE) )) {
+ if (( gogkey_match = new_avpl_pairs_match(gop->cfg->name, gop->avpl, curr_gogkey, true, true) )) {
key = avpl_to_str(gogkey_match);
dbg_print (dbg_gog,1,dbg_facility,"analyze_gop: got gogkey_match: %s",key);
if (( gog = (mate_gog *)g_hash_table_lookup(gop->cfg->gog_index,key) )) {
- dbg_print (dbg_gog,1,dbg_facility,"analyze_gop: got already a matching gog");
+ dbg_print (dbg_gog,1,dbg_facility,"analyze_gop: got already a matching gog: %s:%d",gog->cfg->name,gog->id);
if (gog->num_of_counting_gops == gog->num_of_released_gops && gog->expiration < rd->now) {
dbg_print (dbg_gog,1,dbg_facility,"analyze_gop: this is a new gog, not the old one, let's create it");
@@ -440,7 +440,7 @@ static void analyze_gop(mate_config* mc, mate_gop* gop) {
g_free(key);
key = NULL;
- if (gogkey_match) delete_avpl(gogkey_match,TRUE);
+ if (gogkey_match) delete_avpl(gogkey_match,true);
reanalyze_gop(mc, gop);
}
@@ -455,8 +455,8 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
*/
mate_cfg_gop* cfg = NULL;
mate_gop* gop = NULL;
- gchar* gop_key;
- gchar* orig_gop_key = NULL;
+ char* gop_key;
+ char* orig_gop_key = NULL;
AVPL* candidate_start = NULL;
AVPL* candidate_stop = NULL;
AVPL* is_start = NULL;
@@ -466,17 +466,17 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
AVPL* curr_gogkey = NULL;
void* cookie = NULL;
AVPL* gogkey_match = NULL;
- gchar* gogkey_str = NULL;
+ char* gogkey_str = NULL;
dbg_print (dbg_gop,1,dbg_facility,"analyze_pdu: %s",pdu->cfg->name);
if (! (cfg = (mate_cfg_gop *)g_hash_table_lookup(mc->gops_by_pduname,pdu->cfg->name)) )
return;
- if ((gopkey_match = new_avpl_pairs_match("gop_key_match", pdu->avpl, cfg->key, TRUE, TRUE))) {
+ if ((gopkey_match = new_avpl_pairs_match("gop_key_match", pdu->avpl, cfg->key, true, true))) {
gop_key = avpl_to_str(gopkey_match);
- g_hash_table_lookup_extended(cfg->gop_index,(gconstpointer)gop_key,(gpointer *)&orig_gop_key,(gpointer *)&gop);
+ g_hash_table_lookup_extended(cfg->gop_index,(const void *)gop_key,(void * *)&orig_gop_key,(void * *)&gop);
if ( gop ) {
g_free(gop_key);
@@ -486,7 +486,7 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
( ( gop->cfg->lifetime > 0.0 && gop->time_to_die >= rd->now) ||
( gop->cfg->idle_timeout > 0.0 && gop->time_to_timeout >= rd->now) ) ) {
dbg_print (dbg_gop,4,dbg_facility,"analyze_pdu: expiring released gop");
- gop->released = TRUE;
+ gop->released = true;
if (gop->gog && gop->cfg->start) gop->gog->num_of_released_gops++;
}
@@ -501,8 +501,8 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
dbg_print (dbg_gop,2,dbg_facility,"analyze_pdu: got candidate start");
- if (( is_start = new_avpl_pairs_match("", pdu->avpl, candidate_start, TRUE, FALSE) )) {
- delete_avpl(is_start,FALSE);
+ if (( is_start = new_avpl_pairs_match("", pdu->avpl, candidate_start, true, false) )) {
+ delete_avpl(is_start,false);
if ( gop->released ) {
dbg_print (dbg_gop,3,dbg_facility,"analyze_pdu: start on released gop, let's create a new gop");
@@ -523,7 +523,7 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
pdu->next = NULL;
pdu->time_in_gop = rd->now - gop->start_time;
- if (gop->released) pdu->after_release = TRUE;
+ if (gop->released) pdu->after_release = true;
} else {
@@ -540,17 +540,17 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
if (gog_keys) {
while (( curr_gogkey = get_next_avpl(gog_keys,&cookie) )) {
- if (( gogkey_match = new_avpl_pairs_match(cfg->name, gopkey_match, curr_gogkey, TRUE, FALSE) )) {
+ if (( gogkey_match = new_avpl_pairs_match(cfg->name, gopkey_match, curr_gogkey, true, false) )) {
gogkey_str = avpl_to_str(gogkey_match);
if (g_hash_table_lookup(cfg->gog_index,gogkey_str)) {
gop = new_gop(cfg,pdu,gop_key);
g_hash_table_insert(cfg->gop_index,gop_key,gop);
- delete_avpl(gogkey_match,FALSE);
+ delete_avpl(gogkey_match,false);
g_free(gogkey_str);
break;
} else {
- delete_avpl(gogkey_match,FALSE);
+ delete_avpl(gogkey_match,false);
g_free(gogkey_str);
}
}
@@ -558,21 +558,21 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
if ( ! gop ) {
g_free(gop_key);
- delete_avpl(gopkey_match,TRUE);
+ delete_avpl(gopkey_match,true);
return;
}
} else {
g_free(gop_key);
- delete_avpl(gopkey_match,TRUE);
+ delete_avpl(gopkey_match,true);
return;
}
} else {
candidate_start = cfg->start;
- if (( is_start = new_avpl_pairs_match("", pdu->avpl, candidate_start, TRUE, FALSE) )) {
- delete_avpl(is_start,FALSE);
+ if (( is_start = new_avpl_pairs_match("", pdu->avpl, candidate_start, true, false) )) {
+ delete_avpl(is_start,false);
gop = new_gop(cfg,pdu,gop_key);
} else {
g_free(gop_key);
@@ -590,12 +590,12 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
pdu->time_in_gop = rd->now - gop->start_time;
gop->num_of_pdus++;
- gop->time_to_timeout = cfg->idle_timeout > 0.0 ? cfg->idle_timeout + rd->now : (float) -1.0 ;
+ gop->time_to_timeout = cfg->idle_timeout > 0.0 ? cfg->idle_timeout + rd->now : -1.0 ;
dbg_print (dbg_gop,4,dbg_facility,"analyze_pdu: merge with key");
- merge_avpl(gop->avpl,gopkey_match,TRUE);
- delete_avpl(gopkey_match,TRUE);
+ merge_avpl(gop->avpl,gopkey_match,true);
+ delete_avpl(gopkey_match,true);
dbg_print (dbg_gop,4,dbg_facility,"analyze_pdu: apply extras");
@@ -607,22 +607,22 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
candidate_stop = cfg->stop;
if (candidate_stop) {
- is_stop = new_avpl_pairs_match("", pdu->avpl, candidate_stop, TRUE, FALSE);
+ is_stop = new_avpl_pairs_match("", pdu->avpl, candidate_stop, true, false);
} else {
is_stop = new_avpl("");
}
if(is_stop) {
dbg_print (dbg_gop,1,dbg_facility,"analyze_pdu: is a `stop");
- delete_avpl(is_stop,FALSE);
+ delete_avpl(is_stop,false);
if (! gop->released) {
- gop->released = TRUE;
+ gop->released = true;
gop->release_time = pdu->rel_time;
if (gop->gog && gop->cfg->start) gop->gog->num_of_released_gops++;
}
- pdu->is_stop = TRUE;
+ pdu->is_stop = true;
}
}
@@ -645,6 +645,7 @@ static void analyze_pdu(mate_config* mc, mate_pdu* pdu) {
}
static proto_node *
+// NOLINTNEXTLINE(misc-no-recursion)
proto_tree_find_node_from_finfo(proto_tree *tree, field_info *finfo)
{
proto_node *pnode = tree;
@@ -659,6 +660,7 @@ proto_tree_find_node_from_finfo(proto_tree *tree, field_info *finfo)
while (child != NULL) {
current = child;
child = current->next;
+ // We recurse here, but we're limited by tree depth checks in epan
if ((pnode = proto_tree_find_node_from_finfo((proto_tree *)current, finfo))) {
return pnode;
}
@@ -712,15 +714,15 @@ add_avp(const char *name, field_info *fi, const field_info *ancestor_fi, tmp_pdu
return all_same_ds;
}
-static void get_pdu_fields(gpointer k, gpointer v, gpointer p) {
+static void get_pdu_fields(void *k, void *v, void *p) {
int hfid = *((int*) k);
- gchar* name = (gchar*) v;
+ char* name = (char*) v;
tmp_pdu_data* data = (tmp_pdu_data*) p;
GPtrArray* fis;
field_info* fi;
- guint i;
- guint start;
- guint end;
+ unsigned i;
+ unsigned start;
+ unsigned end;
tvbuff_t *ds_tvb;
fis = proto_get_finfo_ptr_array(data->tree, hfid);
@@ -761,19 +763,19 @@ static void get_pdu_fields(gpointer k, gpointer v, gpointer p) {
}
}
-static mate_pdu* new_pdu(mate_cfg_pdu* cfg, guint32 framenum, field_info* proto, proto_tree* tree) {
+static mate_pdu* new_pdu(mate_cfg_pdu* cfg, uint32_t framenum, field_info* proto, proto_tree* tree) {
mate_pdu* pdu = (mate_pdu*)g_slice_new(mate_max_size);
field_info* cfi;
GPtrArray* ptrs;
mate_range* range;
mate_range* proto_range;
tmp_pdu_data data;
- guint i,j;
- gint min_dist;
+ unsigned i,j;
+ int min_dist;
field_info* range_fi;
- gint32 last_start;
- gint32 first_end;
- gint32 curr_end;
+ int32_t last_start;
+ int32_t first_end;
+ int32_t curr_end;
int hfid;
dbg_print (dbg_pdu,1,dbg_facility,"new_pdu: type=%s framenum=%i",cfg->name,framenum);
@@ -791,10 +793,10 @@ static mate_pdu* new_pdu(mate_cfg_pdu* cfg, guint32 framenum, field_info* proto,
pdu->next = NULL;
pdu->time_in_gop = -1.0f;
- pdu->first = FALSE;
- pdu->is_start = FALSE;
- pdu->is_stop = FALSE;
- pdu->after_release = FALSE;
+ pdu->first = false;
+ pdu->is_start = false;
+ pdu->is_stop = false;
+ pdu->after_release = false;
data.ranges = g_ptr_array_new_with_free_func(g_free);
data.pdu = pdu;
@@ -811,7 +813,7 @@ static mate_pdu* new_pdu(mate_cfg_pdu* cfg, guint32 framenum, field_info* proto,
last_start = proto_range->start;
- /* we move forward in the tranport */
+ /* we move forward in the transport */
for (i = cfg->transport_ranges->len; i--; ) {
hfid = *((int*)g_ptr_array_index(cfg->transport_ranges,i));
ptrs = proto_get_finfo_ptr_array(tree, hfid);
@@ -886,7 +888,7 @@ static mate_pdu* new_pdu(mate_cfg_pdu* cfg, guint32 framenum, field_info* proto,
apply_transforms(pdu->cfg->transforms,pdu->avpl);
- g_ptr_array_free(data.ranges,TRUE);
+ g_ptr_array_free(data.ranges,true);
return pdu;
}
@@ -896,18 +898,21 @@ extern void mate_analyze_frame(mate_config *mc, packet_info *pinfo, proto_tree*
mate_cfg_pdu* cfg;
GPtrArray* protos;
field_info* proto;
- guint i,j;
+ unsigned i,j;
AVPL* criterium_match;
mate_pdu* pdu = NULL;
mate_pdu* last = NULL;
- rd->now = (float) nstime_to_sec(&pinfo->rel_ts);
+ rd->now = nstime_to_sec(&pinfo->rel_ts);
if ( proto_tracking_interesting_fields(tree)
&& rd->highest_analyzed_frame < pinfo->num ) {
for ( i = 0; i < mc->pducfglist->len; i++ ) {
+ if (i == 0) {
+ dbg_print (dbg_pdu,4,dbg_facility,"\nmate_analyze_frame: frame: %i",pinfo->num);
+ }
cfg = (mate_cfg_pdu *)g_ptr_array_index(mc->pducfglist,i);
dbg_print (dbg_pdu,4,dbg_facility,"mate_analyze_frame: trying to extract: %s",cfg->name);
@@ -924,16 +929,16 @@ extern void mate_analyze_frame(mate_config *mc, packet_info *pinfo, proto_tree*
pdu = new_pdu(cfg, pinfo->num, proto, tree);
if (cfg->criterium) {
- criterium_match = new_avpl_from_match(cfg->criterium_match_mode,"",pdu->avpl,cfg->criterium,FALSE);
+ criterium_match = new_avpl_from_match(cfg->criterium_match_mode,"",pdu->avpl,cfg->criterium,false);
if (criterium_match) {
- delete_avpl(criterium_match,FALSE);
+ delete_avpl(criterium_match,false);
}
if ( (criterium_match && cfg->criterium_accept_mode == REJECT_MODE )
|| ( ! criterium_match && cfg->criterium_accept_mode == ACCEPT_MODE )) {
- delete_avpl(pdu->avpl,TRUE);
+ delete_avpl(pdu->avpl,true);
g_slice_free(mate_max_size,(mate_max_size*)pdu);
pdu = NULL;
@@ -944,14 +949,14 @@ extern void mate_analyze_frame(mate_config *mc, packet_info *pinfo, proto_tree*
analyze_pdu(mc, pdu);
if ( ! pdu->gop && cfg->drop_unassigned) {
- delete_avpl(pdu->avpl,TRUE);
+ delete_avpl(pdu->avpl,true);
g_slice_free(mate_max_size,(mate_max_size*)pdu);
pdu = NULL;
continue;
}
if ( cfg->discard ) {
- delete_avpl(pdu->avpl,TRUE);
+ delete_avpl(pdu->avpl,true);
pdu->avpl = NULL;
}
@@ -973,7 +978,7 @@ extern void mate_analyze_frame(mate_config *mc, packet_info *pinfo, proto_tree*
}
}
-extern mate_pdu* mate_get_pdus(guint32 framenum) {
+extern mate_pdu* mate_get_pdus(uint32_t framenum) {
if (rd) {
return (mate_pdu*) g_hash_table_lookup(rd->frames,GUINT_TO_POINTER(framenum));
diff --git a/plugins/epan/mate/mate_setup.c b/plugins/epan/mate/mate_setup.c
index 680a8fa92c..03ad154378 100644
--- a/plugins/epan/mate/mate_setup.c
+++ b/plugins/epan/mate/mate_setup.c
@@ -15,8 +15,8 @@
#include "mate.h"
/* appends the formatted string to the current error log */
-static void report_error(mate_config* mc, const gchar* fmt, ...) {
- static gchar error_buffer[DEBUG_BUFFER_SIZE];
+static void report_error(mate_config* mc, const char* fmt, ...) {
+ static char error_buffer[DEBUG_BUFFER_SIZE];
va_list list;
@@ -32,7 +32,7 @@ static void report_error(mate_config* mc, const gchar* fmt, ...) {
/* creates a blank pdu config
is going to be called only by the grammar
which will set all those elements that aren't set here */
-extern mate_cfg_pdu* new_pducfg(mate_config* mc, gchar* name) {
+extern mate_cfg_pdu* new_pducfg(mate_config* mc, char* name) {
mate_cfg_pdu* cfg = g_new(mate_cfg_pdu, 1);
cfg->name = g_strdup(name);
@@ -55,15 +55,15 @@ extern mate_cfg_pdu* new_pducfg(mate_config* mc, gchar* name) {
cfg->criterium_match_mode = AVPL_NO_MATCH;
cfg->criterium_accept_mode = ACCEPT_MODE;
- g_ptr_array_add(mc->pducfglist,(gpointer) cfg);
- g_hash_table_insert(mc->pducfgs,(gpointer) cfg->name,(gpointer) cfg);
+ g_ptr_array_add(mc->pducfglist,(void *) cfg);
+ g_hash_table_insert(mc->pducfgs,(void *) cfg->name,(void *) cfg);
cfg->hfids_attr = g_hash_table_new(g_int_hash,g_int_equal);
return cfg;
}
-extern mate_cfg_gop* new_gopcfg(mate_config* mc, gchar* name) {
+extern mate_cfg_gop* new_gopcfg(mate_config* mc, char* name) {
mate_cfg_gop* cfg = g_new(mate_cfg_gop, 1);
cfg->name = g_strdup(name);
@@ -93,12 +93,12 @@ extern mate_cfg_gop* new_gopcfg(mate_config* mc, gchar* name) {
cfg->gop_index = g_hash_table_new(g_str_hash,g_str_equal);
cfg->gog_index = g_hash_table_new(g_str_hash,g_str_equal);
- g_hash_table_insert(mc->gopcfgs,(gpointer) cfg->name, (gpointer) cfg);
+ g_hash_table_insert(mc->gopcfgs,(void *) cfg->name, (void *) cfg);
return cfg;
}
-extern mate_cfg_gog* new_gogcfg(mate_config* mc, gchar* name) {
+extern mate_cfg_gog* new_gogcfg(mate_config* mc, char* name) {
mate_cfg_gog* cfg = g_new(mate_cfg_gog, 1);
cfg->name = g_strdup(name);
@@ -127,16 +127,16 @@ extern mate_cfg_gog* new_gogcfg(mate_config* mc, gchar* name) {
cfg->hfid_stop_time = -1;
cfg->hfid_last_time = -1;
- g_hash_table_insert(mc->gogcfgs,(gpointer) cfg->name, (gpointer) cfg);
+ g_hash_table_insert(mc->gogcfgs,(void *) cfg->name, (void *) cfg);
return cfg;
}
-extern gboolean add_hfid(mate_config* mc, header_field_info* hfi, gchar* how, GHashTable* where) {
+extern bool add_hfid(mate_config* mc, header_field_info* hfi, char* how, GHashTable* where) {
header_field_info* first_hfi = NULL;
- gboolean exists = FALSE;
- gchar* as;
- gchar* h;
+ bool exists = false;
+ char* as;
+ char* h;
int* ip;
while(hfi) {
@@ -147,18 +147,18 @@ extern gboolean add_hfid(mate_config* mc, header_field_info* hfi, gchar* how, G
hfi = first_hfi;
while (hfi) {
- exists = TRUE;
+ exists = true;
ip = g_new(int, 1);
*ip = hfi->id;
- if (( as = (gchar *)g_hash_table_lookup(where,ip) )) {
+ if (( as = (char *)g_hash_table_lookup(where,ip) )) {
g_free(ip);
if (! g_str_equal(as,how)) {
report_error(mc,
"MATE Error: add field to Pdu: attempt to add %s(%i) as %s"
" failed: field already added as '%s'",hfi->abbrev,hfi->id,how,as);
- return FALSE;
+ return false;
}
} else {
h = g_strdup(how);
@@ -179,9 +179,9 @@ extern gboolean add_hfid(mate_config* mc, header_field_info* hfi, gchar* how, G
/*
* XXX - where is this supposed to be used?
*/
-extern gchar* add_ranges(mate_config* mc, gchar* range,GPtrArray* range_ptr_arr) {
- gchar** ranges;
- guint i;
+extern char* add_ranges(mate_config* mc, char* range,GPtrArray* range_ptr_arr) {
+ char** ranges;
+ unsigned i;
header_field_info* hfi;
int* hfidp;
@@ -193,7 +193,7 @@ extern gchar* add_ranges(mate_config* mc, gchar* range,GPtrArray* range_ptr_arr)
if (hfi) {
hfidp = g_new(int, 1);
*hfidp = hfi->id;
- g_ptr_array_add(range_ptr_arr,(gpointer)hfidp);
+ g_ptr_array_add(range_ptr_arr,(void *)hfidp);
} else {
g_strfreev(ranges);
return ws_strdup_printf("no such proto: '%s'",ranges[i]);
@@ -207,7 +207,7 @@ extern gchar* add_ranges(mate_config* mc, gchar* range,GPtrArray* range_ptr_arr)
}
#endif
-static void new_attr_hfri(mate_config* mc, gchar* item_name, GHashTable* hfids, gchar* name) {
+static void new_attr_hfri(mate_config* mc, char* item_name, GHashTable* hfids, char* name) {
int* p_id = g_new(int, 1);
hf_register_info hfri;
@@ -233,11 +233,11 @@ typedef struct {
mate_cfg_pdu* cfg;
} analyze_pdu_hfids_arg;
-static void analyze_pdu_hfids(gpointer k, gpointer v, gpointer p) {
+static void analyze_pdu_hfids(void *k, void *v, void *p) {
analyze_pdu_hfids_arg* argp = (analyze_pdu_hfids_arg*)p;
mate_config* mc = argp->mc;
mate_cfg_pdu* cfg = argp->cfg;
- new_attr_hfri(mc, cfg->name,cfg->my_hfids,(gchar*) v);
+ new_attr_hfri(mc, cfg->name,cfg->my_hfids,(char*) v);
/*
* Add this hfid to our table of wanted hfids.
@@ -246,8 +246,8 @@ static void analyze_pdu_hfids(gpointer k, gpointer v, gpointer p) {
mc->num_fields_wanted++;
}
-static void analyze_transform_hfrs(mate_config* mc, gchar* name, GPtrArray* transforms, GHashTable* hfids) {
- guint i;
+static void analyze_transform_hfrs(mate_config* mc, char* name, GPtrArray* transforms, GHashTable* hfids) {
+ unsigned i;
void* cookie = NULL;
AVPL_Transf* t;
AVP* avp;
@@ -266,7 +266,7 @@ static void analyze_transform_hfrs(mate_config* mc, gchar* name, GPtrArray* tran
static void analyze_pdu_config(mate_config* mc, mate_cfg_pdu* cfg) {
hf_register_info hfri = { NULL, {NULL, NULL, FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL}};
- gint* ett;
+ int* ett;
analyze_pdu_hfids_arg arg;
hfri.p_id = &(cfg->hfid);
@@ -281,7 +281,7 @@ static void analyze_pdu_config(mate_config* mc, mate_cfg_pdu* cfg) {
hfri.p_id = &(cfg->hfid_pdu_rel_time);
hfri.hfinfo.name = ws_strdup_printf("%s time",cfg->name);
hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.RelativeTime",cfg->name);
- hfri.hfinfo.type = FT_FLOAT;
+ hfri.hfinfo.type = FT_DOUBLE;
hfri.hfinfo.display = BASE_NONE;
hfri.hfinfo.blurb = "Seconds passed since the start of capture";
@@ -290,7 +290,7 @@ static void analyze_pdu_config(mate_config* mc, mate_cfg_pdu* cfg) {
hfri.p_id = &(cfg->hfid_pdu_time_in_gop);
hfri.hfinfo.name = ws_strdup_printf("%s time since beginning of Gop",cfg->name);
hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.TimeInGop",cfg->name);
- hfri.hfinfo.type = FT_FLOAT;
+ hfri.hfinfo.type = FT_DOUBLE;
hfri.hfinfo.display = BASE_NONE;
hfri.hfinfo.blurb = "Seconds passed since the start of the GOP";
@@ -301,7 +301,7 @@ static void analyze_pdu_config(mate_config* mc, mate_cfg_pdu* cfg) {
g_hash_table_foreach(cfg->hfids_attr,analyze_pdu_hfids,&arg);
/* Add the hfids of transport protocols as wanted hfids */
- for (guint i = 0; i < cfg->transport_ranges->len; i++) {
+ for (unsigned i = 0; i < cfg->transport_ranges->len; i++) {
int hfid = *((int*)g_ptr_array_index(cfg->transport_ranges,i));
mc->wanted_hfids = g_array_append_val(mc->wanted_hfids, hfid);
mc->num_fields_wanted++;
@@ -316,12 +316,12 @@ static void analyze_pdu_config(mate_config* mc, mate_cfg_pdu* cfg) {
analyze_transform_hfrs(mc, cfg->name,cfg->transforms,cfg->my_hfids);
}
-static void analyze_gop_config(gpointer k _U_, gpointer v, gpointer p) {
+static void analyze_gop_config(void *k _U_, void *v, void *p) {
mate_config* mc = (mate_config*)p;
mate_cfg_gop* cfg = (mate_cfg_gop *)v;
void* cookie = NULL;
AVP* avp;
- gint* ett;
+ int* ett;
hf_register_info hfri = { NULL, {NULL, NULL, FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL}};
hfri.p_id = &(cfg->hfid);
@@ -336,7 +336,7 @@ static void analyze_gop_config(gpointer k _U_, gpointer v, gpointer p) {
hfri.p_id = &(cfg->hfid_start_time);
hfri.hfinfo.name = ws_strdup_printf("%s start time",cfg->name);
hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.StartTime",cfg->name);
- hfri.hfinfo.type = FT_FLOAT;
+ hfri.hfinfo.type = FT_DOUBLE;
hfri.hfinfo.display = BASE_NONE;
hfri.hfinfo.blurb = ws_strdup_printf("Seconds passed since the beginning of capture to the start of this %s",cfg->name);
@@ -429,7 +429,7 @@ static void analyze_gop_config(gpointer k _U_, gpointer v, gpointer p) {
g_hash_table_insert(mc->gops_by_pduname,cfg->name,cfg);
}
-static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
+static void analyze_gog_config(void *k _U_, void *v, void *p) {
mate_config* mc = (mate_config*)p;
mate_cfg_gog* cfg = (mate_cfg_gog *)v;
void* avp_cookie;
@@ -440,7 +440,7 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
AVPL* key_avps;
LoAL* gog_keys = NULL;
hf_register_info hfri = { NULL, {NULL, NULL, FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL}};
- gint* ett;
+ int* ett;
/* create the hf array for this gog */
hfri.p_id = &(cfg->hfid);
@@ -482,7 +482,7 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
hfri.p_id = &(cfg->hfid_start_time);
hfri.hfinfo.name = ws_strdup_printf("%s start time",cfg->name);
hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.StartTime",cfg->name);
- hfri.hfinfo.type = FT_FLOAT;
+ hfri.hfinfo.type = FT_DOUBLE;
hfri.hfinfo.blurb = ws_strdup_printf("Seconds passed since the beginning of capture to the start of this %s",cfg->name);
g_array_append_val(mc->hfrs,hfri);
@@ -516,7 +516,7 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
g_hash_table_insert(mc->gogs_by_gopname,gog_keys->name,gog_keys);
}
- gopkey_avpl = new_avpl_from_avpl(cfg->name, avpl, TRUE);
+ gopkey_avpl = new_avpl_from_avpl(cfg->name, avpl, true);
loal_append(gog_keys,gopkey_avpl);
avp_cookie = NULL;
@@ -538,7 +538,7 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
/* every key_avp ios an extra as well.
one day every Member will have its own extras */
- merge_avpl(cfg->extra,key_avps,TRUE);
+ merge_avpl(cfg->extra,key_avps,true);
analyze_transform_hfrs(mc, cfg->name,cfg->transforms,cfg->my_hfids);
@@ -561,7 +561,7 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
}
static void analyze_config(mate_config* mc) {
- guint i;
+ unsigned i;
for (i=0; i < mc->pducfglist->len; i++) {
analyze_pdu_config(mc, (mate_cfg_pdu*) g_ptr_array_index(mc->pducfglist,i));
@@ -572,16 +572,16 @@ static void analyze_config(mate_config* mc) {
}
-extern mate_config* mate_make_config(const gchar* filename, int mate_hfid) {
+extern mate_config* mate_make_config(const char* filename, int mate_hfid) {
mate_config* mc;
- gint* ett;
+ int* ett;
avp_init();
mc = g_new(mate_config, 1);
mc->hfid_mate = mate_hfid;
- mc->wanted_hfids = g_array_new(FALSE, FALSE, (guint)sizeof(int));
+ mc->wanted_hfids = g_array_new(false, false, (unsigned)sizeof(int));
mc->num_fields_wanted = 0;
mc->dbg_facility = NULL;
@@ -599,12 +599,12 @@ extern mate_config* mate_make_config(const gchar* filename, int mate_hfid) {
mc->ett_root = -1;
- mc->hfrs = g_array_new(FALSE,FALSE,sizeof(hf_register_info));
- mc->ett = g_array_new(FALSE,FALSE,sizeof(gint*));
+ mc->hfrs = g_array_new(false,false,sizeof(hf_register_info));
+ mc->ett = g_array_new(false,false,sizeof(int*));
- mc->defaults.pdu.drop_unassigned = FALSE;
- mc->defaults.pdu.discard = FALSE;
- mc->defaults.pdu.last_extracted = FALSE;
+ mc->defaults.pdu.drop_unassigned = false;
+ mc->defaults.pdu.discard = false;
+ mc->defaults.pdu.last_extracted = false;
mc->defaults.pdu.match_mode = AVPL_STRICT;
mc->defaults.pdu.replace_mode = AVPL_INSERT;
@@ -613,12 +613,12 @@ extern mate_config* mate_make_config(const gchar* filename, int mate_hfid) {
mc->defaults.gop.idle_timeout = -1.0f;
mc->defaults.gop.lifetime = -1.0f;
mc->defaults.gop.pdu_tree_mode = GOP_FRAME_TREE;
- mc->defaults.gop.show_times = TRUE;
- mc->defaults.gop.drop_unassigned = FALSE;
+ mc->defaults.gop.show_times = true;
+ mc->defaults.gop.drop_unassigned = false;
/* gog prefs */
mc->defaults.gog.expiration = 5.0f;
- mc->defaults.gog.show_times = TRUE;
+ mc->defaults.gog.show_times = true;
mc->defaults.gog.gop_tree_mode = GOP_BASIC_TREE;
/* what to dbgprint */
@@ -639,14 +639,14 @@ extern mate_config* mate_make_config(const gchar* filename, int mate_hfid) {
"It is recommended that you fix your config and restart Wireshark.\n"
"The reported error is:\n%s\n",mc->config_error->str);
- /* if (mc) destroy_mate_config(mc,FALSE); */
+ /* if (mc) destroy_mate_config(mc,false); */
return NULL;
}
if (mc->num_fields_wanted == 0) {
/* We have no interest in any fields, so we have no
work to do. */
- /*destroy_mate_config(mc,FALSE);*/
+ /*destroy_mate_config(mc,false);*/
return NULL;
}
diff --git a/plugins/epan/mate/mate_util.c b/plugins/epan/mate/mate_util.c
index 4fa7e653e4..dcfe36c0dd 100644
--- a/plugins/epan/mate/mate_util.c
+++ b/plugins/epan/mate/mate_util.c
@@ -33,8 +33,8 @@
* fmt, ...: what to print
*/
-void dbg_print(const gint* which, gint how, FILE* where, const gchar* fmt, ... ) {
- static gchar debug_buffer[DEBUG_BUFFER_SIZE];
+void dbg_print(const int* which, int how, FILE* where, const char* fmt, ... ) {
+ static char debug_buffer[DEBUG_BUFFER_SIZE];
va_list list;
if ( ! which || *which < how ) return;
@@ -67,7 +67,7 @@ void dbg_print(const gint* which, gint how, FILE* where, const gchar* fmt, ... )
**/
struct _scs_collection {
- GHashTable* hash; /* key: a string value: guint number of subscribers */
+ GHashTable* hash; /* key: a string value: unsigned number of subscribers */
};
/* ToDo? free any string,ctr entries pointed to by the hash table ??
@@ -102,17 +102,17 @@ static SCS_collection* scs_init(void) {
*
* Return value: a pointer to the subscribed string.
**/
-gchar* scs_subscribe(SCS_collection* c, const gchar* s) {
- gchar* orig = NULL;
- guint* ip = NULL;
+char* scs_subscribe(SCS_collection* c, const char* s) {
+ char* orig = NULL;
+ unsigned* ip = NULL;
size_t len = 0;
- g_hash_table_lookup_extended(c->hash,(gconstpointer)s,(gpointer *)&orig,(gpointer *)&ip);
+ g_hash_table_lookup_extended(c->hash,(const void *)s,(void * *)&orig,(void * *)&ip);
if (ip) {
(*ip)++;
} else {
- ip = g_slice_new(guint);
+ ip = g_slice_new(unsigned);
*ip = 0;
len = strlen(s) + 1;
@@ -130,7 +130,7 @@ gchar* scs_subscribe(SCS_collection* c, const gchar* s) {
ws_warning("mate SCS: string truncated due to huge size");
}
- orig = (gchar *)g_slice_alloc(len);
+ orig = (char *)g_slice_alloc(len);
(void) g_strlcpy(orig,s,len);
g_hash_table_insert(c->hash,orig,ip);
@@ -147,12 +147,12 @@ gchar* scs_subscribe(SCS_collection* c, const gchar* s) {
* decreases the count of subscribers, if zero frees the internal copy of
* the string.
**/
-void scs_unsubscribe(SCS_collection* c, gchar* s) {
- gchar* orig = NULL;
- guint* ip = NULL;
+void scs_unsubscribe(SCS_collection* c, char* s) {
+ char* orig = NULL;
+ unsigned* ip = NULL;
size_t len = 0xffff;
- g_hash_table_lookup_extended(c->hash,(gconstpointer)s,(gpointer *)&orig,(gpointer *)&ip);
+ g_hash_table_lookup_extended(c->hash,(const void *)s,(void * *)&orig,(void * *)&ip);
if (ip) {
if (*ip == 0) {
@@ -171,7 +171,7 @@ void scs_unsubscribe(SCS_collection* c, gchar* s) {
}
g_slice_free1(len, orig);
- g_slice_free(guint,ip);
+ g_slice_free(unsigned,ip);
}
else {
(*ip)--;
@@ -190,9 +190,9 @@ void scs_unsubscribe(SCS_collection* c, gchar* s) {
* Return value: the stored copy of the formated string.
*
**/
-gchar* scs_subscribe_printf(SCS_collection* c, gchar* fmt, ...) {
+char* scs_subscribe_printf(SCS_collection* c, char* fmt, ...) {
va_list list;
- static gchar buf[SCS_HUGE_SIZE];
+ static char buf[SCS_HUGE_SIZE];
va_start( list, fmt );
vsnprintf(buf, SCS_HUGE_SIZE, fmt, list);
@@ -222,24 +222,24 @@ typedef union _any_avp_type {
} any_avp_type;
-static SCS_collection* avp_strings = NULL;
+static SCS_collection* avp_strings;
#ifdef _AVP_DEBUGGING
-static FILE* dbg_fp = NULL;
+static FILE* dbg_fp;
-static int dbg_level = 0;
+static int dbg_level;
static int* dbg = &dbg_level;
-static int dbg_avp_level = 0;
+static int dbg_avp_level;
static int* dbg_avp = &dbg_avp_level;
-static int dbg_avp_op_level = 0;
+static int dbg_avp_op_level;
static int* dbg_avp_op = &dbg_avp_op_level;
-static int dbg_avpl_level = 0;
+static int dbg_avpl_level;
static int* dbg_avpl = &dbg_avpl_level;
-static int dbg_avpl_op_level = 0;
+static int dbg_avpl_op_level;
static int* dbg_avpl_op = &dbg_avpl_op_level;
/**
@@ -288,10 +288,10 @@ extern void avp_init(void) {
* Return value: a pointer to the newly created avp.
*
**/
-extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo) {
+extern AVP* new_avp_from_finfo(const char* name, field_info* finfo) {
AVP* new_avp_val = (AVP*)g_slice_new(any_avp_type);
- gchar* value;
- gchar* repr;
+ char* value;
+ char* repr;
new_avp_val->n = scs_subscribe(avp_strings, name);
@@ -333,7 +333,7 @@ extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo) {
* Return value: a pointer to the newly created avp.
*
**/
-extern AVP* new_avp(const gchar* name, const gchar* value, gchar o) {
+extern AVP* new_avp(const char* name, const char* value, char o) {
AVP* new_avp_val = (AVP*)g_slice_new(any_avp_type);
new_avp_val->n = scs_subscribe(avp_strings, name);
@@ -397,7 +397,7 @@ extern AVP* avp_copy(AVP* from) {
* Return value: a pointer to the newly created avpl.
*
**/
-extern AVPL* new_avpl(const gchar* name) {
+extern AVPL* new_avpl(const char* name) {
AVPL* new_avpl_p = (AVPL*)g_slice_new(any_avp_type);
#ifdef _AVP_DEBUGGING
@@ -414,7 +414,7 @@ extern AVPL* new_avpl(const gchar* name) {
return new_avpl_p;
}
-extern void rename_avpl(AVPL* avpl, gchar* name) {
+extern void rename_avpl(AVPL* avpl, char* name) {
scs_unsubscribe(avp_strings,avpl->name);
avpl->name = scs_subscribe(avp_strings,name);
}
@@ -429,7 +429,7 @@ extern void rename_avpl(AVPL* avpl, gchar* name) {
* Pre-condition: the avp is sorted before before_avp and does not already exist
* in the avpl.
*/
-static void insert_avp_before_node(AVPL* avpl, AVPN* next_node, AVP *avp, gboolean copy_avp) {
+static void insert_avp_before_node(AVPL* avpl, AVPN* next_node, AVP *avp, bool copy_avp) {
AVPN* new_avp_val = (AVPN*)g_slice_new(any_avp_type);
new_avp_val->avp = copy_avp ? avp_copy(avp) : avp;
@@ -463,7 +463,7 @@ static void insert_avp_before_node(AVPL* avpl, AVPN* next_node, AVP *avp, gboole
* BEWARE: Check the return value, you might need to delete the avp if
* it is not inserted.
**/
-extern gboolean insert_avp(AVPL* avpl, AVP* avp) {
+extern bool insert_avp(AVPL* avpl, AVP* avp) {
AVPN* c;
#ifdef _AVP_DEBUGGING
@@ -487,7 +487,7 @@ extern gboolean insert_avp(AVPL* avpl, AVP* avp) {
// conditions AVPs, so really check if the name,
// value and operator are all equal.
if (c->avp->o == avp->o && avp->o == AVP_OP_EQUAL) {
- return FALSE;
+ return false;
}
}
}
@@ -497,9 +497,9 @@ extern gboolean insert_avp(AVPL* avpl, AVP* avp) {
}
}
- insert_avp_before_node(avpl, c, avp, FALSE);
+ insert_avp_before_node(avpl, c, avp, false);
- return TRUE;
+ return true;
}
/**
@@ -514,7 +514,7 @@ extern gboolean insert_avp(AVPL* avpl, AVP* avp) {
* Return value: a pointer to the next matching avp if there's one, else NULL.
*
**/
-extern AVP* get_avp_by_name(AVPL* avpl, gchar* name, void** cookie) {
+extern AVP* get_avp_by_name(AVPL* avpl, char* name, void** cookie) {
AVPN* curr;
AVPN* start = (AVPN*) *cookie;
@@ -553,7 +553,7 @@ extern AVP* get_avp_by_name(AVPL* avpl, gchar* name, void** cookie) {
* Return value: a pointer to extracted avp if there's one, else NULL.
*
**/
-extern AVP* extract_avp_by_name(AVPL* avpl, gchar* name) {
+extern AVP* extract_avp_by_name(AVPL* avpl, char* name) {
AVPN* curr;
AVP* avp = NULL;
@@ -681,7 +681,7 @@ extern AVP* extract_last_avp(AVPL* avpl) {
* so releases the avps as well.
*
**/
-extern void delete_avpl(AVPL* avpl, gboolean avps_too) {
+extern void delete_avpl(AVPL* avpl, bool avps_too) {
AVP* avp;
#ifdef _AVP_DEBUGGING
dbg_print(dbg_avpl,3,dbg_fp,"delete_avpl: %p",avpl);
@@ -740,11 +740,11 @@ extern AVP* get_next_avp(AVPL* avpl, void** cookie) {
* Return value: a pointer to the newly allocated string.
*
**/
-gchar* avpl_to_str(AVPL* avpl) {
+char* avpl_to_str(AVPL* avpl) {
AVPN* c;
GString* s = g_string_new("");
- gchar* avp_s;
- gchar* r;
+ char* avp_s;
+ char* r;
for(c=avpl->null.next; c->avp; c = c->next) {
avp_s = avp_to_str(c->avp);
@@ -758,11 +758,11 @@ gchar* avpl_to_str(AVPL* avpl) {
return r;
}
-extern gchar* avpl_to_dotstr(AVPL* avpl) {
+extern char* avpl_to_dotstr(AVPL* avpl) {
AVPN* c;
GString* s = g_string_new("");
- gchar* avp_s;
- gchar* r;
+ char* avp_s;
+ char* r;
for(c=avpl->null.next; c->avp; c = c->next) {
avp_s = avp_to_str(c->avp);
@@ -785,7 +785,7 @@ extern gchar* avpl_to_dotstr(AVPL* avpl) {
* Adds the avps of src that are not existent in dst into dst.
*
**/
-extern void merge_avpl(AVPL* dst, AVPL* src, gboolean copy_avps) {
+extern void merge_avpl(AVPL* dst, AVPL* src, bool copy_avps) {
AVPN* cd = NULL;
AVPN* cs = NULL;
@@ -853,7 +853,7 @@ extern void merge_avpl(AVPL* dst, AVPL* src, gboolean copy_avps) {
* Return value: a pointer to the newly allocated string.
*
**/
-extern AVPL* new_avpl_from_avpl(const gchar* name, AVPL* avpl, gboolean copy_avps) {
+extern AVPL* new_avpl_from_avpl(const char* name, AVPL* avpl, bool copy_avps) {
AVPL* newavpl = new_avpl(name);
void* cookie = NULL;
AVP* avp;
@@ -892,14 +892,14 @@ extern AVPL* new_avpl_from_avpl(const gchar* name, AVPL* avpl, gboolean copy_avp
*
**/
extern AVP* match_avp(AVP* src, AVP* op) {
- gchar** splited;
+ char** splited;
int i;
- gchar* p;
- guint ls;
- guint lo;
- float fs = 0.0f;
- float fo = 0.0f;
- gboolean lower = FALSE;
+ char* p;
+ unsigned ls;
+ unsigned lo;
+ double fs = 0.0;
+ double fo = 0.0;
+ bool lower = false;
#ifdef _AVP_DEBUGGING
dbg_print(dbg_avpl_op,3,dbg_fp,"match_avp: %s%c%s; vs. %s%c%s;",src->n,src->o,src->v,op->n,op->o,op->v);
@@ -932,12 +932,12 @@ extern AVP* match_avp(AVP* src, AVP* op) {
return NULL;
case AVP_OP_LOWER:
- lower = TRUE;
+ lower = true;
/* FALLTHRU */
case AVP_OP_HIGHER:
- fs = (float) g_ascii_strtod(src->v, NULL);
- fo = (float) g_ascii_strtod(op->v, NULL);
+ fs = g_ascii_strtod(src->v, NULL);
+ fo = g_ascii_strtod(op->v, NULL);
if (lower) {
if (fs<fo) return src;
@@ -948,8 +948,8 @@ extern AVP* match_avp(AVP* src, AVP* op) {
}
case AVP_OP_ENDS:
/* does this work? */
- ls = (guint) strlen(src->v);
- lo = (guint) strlen(op->v);
+ ls = (unsigned) strlen(src->v);
+ lo = (unsigned) strlen(op->v);
if ( ls < lo ) {
return NULL;
@@ -982,10 +982,10 @@ extern AVP* match_avp(AVP* src, AVP* op) {
* Note: Loose will always be considered a successful match, it matches zero or
* more conditions.
*/
-extern AVPL* new_avpl_loose_match(const gchar* name,
+extern AVPL* new_avpl_loose_match(const char* name,
AVPL* src,
AVPL* op,
- gboolean copy_avps) {
+ bool copy_avps) {
AVPL* newavpl = new_avpl(scs_subscribe(avp_strings, name));
AVPN* co = NULL;
@@ -1012,7 +1012,7 @@ extern AVPL* new_avpl_loose_match(const gchar* name,
AVPN *cond = co;
do {
if (match_avp(cs->avp, cond->avp)) {
- insert_avp_before_node(newavpl, newavpl->null.prev, cs->avp, copy_avps);
+ insert_avp_before_node(newavpl, newavpl->null.prev->next, cs->avp, copy_avps);
break;
}
cond = cond->next;
@@ -1030,26 +1030,26 @@ extern AVPL* new_avpl_loose_match(const gchar* name,
* @param name the name of the resulting avpl
* @param src the data AVPL to be matched against a condition AVPL
* @param op the conditions AVPL that will be matched against the data AVPL
- * @param strict TRUE if every condition must have a matching data AVP, FALSE if
+ * @param strict true if every condition must have a matching data AVP, false if
* it is also acceptable that only one of the condition AVPs for the same
* attribute is matching.
* @param copy_avps whether the avps in the resulting avpl should be copied
*
* Creates an AVP list by matching pairs of conditions and data AVPs, returning
- * the data AVPs. If strict is TRUE, then each condition must be paired with a
- * matching data AVP. If strict is FALSE, then some conditions are allowed to
+ * the data AVPs. If strict is true, then each condition must be paired with a
+ * matching data AVP. If strict is false, then some conditions are allowed to
* fail when other conditions for the same attribute do have a match. Note that
* if the condition AVPL is empty, the result will be a match (an empty list).
*
* Return value: a pointer to the newly created avpl containing the
* matching avps or NULL if there is no match.
*/
-extern AVPL* new_avpl_pairs_match(const gchar* name, AVPL* src, AVPL* op, gboolean strict, gboolean copy_avps) {
+extern AVPL* new_avpl_pairs_match(const char* name, AVPL* src, AVPL* op, bool strict, bool copy_avps) {
AVPL* newavpl;
AVPN* co = NULL;
AVPN* cs = NULL;
- const gchar *last_match = NULL;
- gboolean matched = TRUE;
+ const char *last_match = NULL;
+ bool matched = true;
newavpl = new_avpl(scs_subscribe(avp_strings, name));
@@ -1061,7 +1061,7 @@ extern AVPL* new_avpl_pairs_match(const gchar* name, AVPL* src, AVPL* op, gboole
co = op->null.next;
while (cs->avp && co->avp) {
int name_diff = g_strcmp0(co->avp->n, cs->avp->n);
- const gchar *failed_match = NULL;
+ const char *failed_match = NULL;
if (name_diff < 0) {
// op < source, op has no data avp with same attribute.
@@ -1073,7 +1073,7 @@ extern AVPL* new_avpl_pairs_match(const gchar* name, AVPL* src, AVPL* op, gboole
} else {
// Matching attributes found, now try to find a matching data AVP for the condition.
if (match_avp(cs->avp, co->avp)) {
- insert_avp_before_node(newavpl, newavpl->null.prev, cs->avp, copy_avps);
+ insert_avp_before_node(newavpl, newavpl->null.prev->next, cs->avp, copy_avps);
last_match = co->avp->n;
cs = cs->next;
} else {
@@ -1085,12 +1085,12 @@ extern AVPL* new_avpl_pairs_match(const gchar* name, AVPL* src, AVPL* op, gboole
// condition did not match, check if we can continue matching.
if (failed_match) {
if (strict) {
- matched = FALSE;
+ matched = false;
break;
} else if (last_match != failed_match) {
// None of the conditions so far matched the attribute, check for other candidates
if (!co->avp || co->avp->n != last_match) {
- matched = FALSE;
+ matched = false;
break;
}
}
@@ -1099,7 +1099,7 @@ extern AVPL* new_avpl_pairs_match(const gchar* name, AVPL* src, AVPL* op, gboole
// if there are any conditions remaining, then those could not be matched
if (matched && strict && co->avp) {
- matched = FALSE;
+ matched = false;
}
if (matched) {
@@ -1124,18 +1124,18 @@ extern AVPL* new_avpl_pairs_match(const gchar* name, AVPL* src, AVPL* op, gboole
* If there is no match, NULL is returned. If there is actually a match, then
* the matching AVPs (a subset of the data) are returned.
*/
-extern AVPL* new_avpl_from_match(avpl_match_mode mode, const gchar* name,AVPL* src, AVPL* op, gboolean copy_avps) {
+extern AVPL* new_avpl_from_match(avpl_match_mode mode, const char* name,AVPL* src, AVPL* op, bool copy_avps) {
AVPL* avpl = NULL;
switch (mode) {
case AVPL_STRICT:
- avpl = new_avpl_pairs_match(name, src, op, TRUE, copy_avps);
+ avpl = new_avpl_pairs_match(name, src, op, true, copy_avps);
break;
case AVPL_LOOSE:
avpl = new_avpl_loose_match(name,src,op,copy_avps);
break;
case AVPL_EVERY:
- avpl = new_avpl_pairs_match(name, src, op, FALSE, copy_avps);
+ avpl = new_avpl_pairs_match(name, src, op, false, copy_avps);
break;
case AVPL_NO_MATCH:
// XXX this seems unused
@@ -1164,11 +1164,11 @@ extern void delete_avpl_transform(AVPL_Transf* op) {
g_free(op->name);
if (op->match) {
- delete_avpl(op->match,TRUE);
+ delete_avpl(op->match,true);
}
if (op->replace) {
- delete_avpl(op->replace,TRUE);
+ delete_avpl(op->replace,true);
}
g_free(op);
@@ -1199,16 +1199,16 @@ extern void avpl_transform(AVPL* src, AVPL_Transf* op) {
for ( ; op ; op = op->next) {
- avpl = new_avpl_from_match(op->match_mode, src->name,src, op->match, TRUE);
+ avpl = new_avpl_from_match(op->match_mode, src->name,src, op->match, true);
if (avpl) {
switch (op->replace_mode) {
case AVPL_NO_REPLACE:
- delete_avpl(avpl,TRUE);
+ delete_avpl(avpl,true);
return;
case AVPL_INSERT:
- merge_avpl(src,op->replace,TRUE);
- delete_avpl(avpl,TRUE);
+ merge_avpl(src,op->replace,true);
+ delete_avpl(avpl,true);
return;
case AVPL_REPLACE:
cs = src->null.next;
@@ -1234,8 +1234,8 @@ extern void avpl_transform(AVPL* src, AVPL_Transf* op) {
}
}
- merge_avpl(src,op->replace,TRUE);
- delete_avpl(avpl,TRUE);
+ merge_avpl(src,op->replace,true);
+ delete_avpl(avpl,true);
return;
}
}
@@ -1251,7 +1251,7 @@ extern void avpl_transform(AVPL* src, AVPL_Transf* op) {
*
* Return value: a pointer to the newly created loal.
**/
-extern LoAL* new_loal(const gchar* name) {
+extern LoAL* new_loal(const char* name) {
LoAL* new_loal_p = (LoAL*)g_slice_new(any_avp_type);
if (! name) {
@@ -1403,7 +1403,7 @@ extern AVPL* get_next_avpl(LoAL* loal,void** cookie) {
* Destroys a loal and eventually desstroys avpls and avps.
*
**/
-extern void delete_loal(LoAL* loal, gboolean avpls_too, gboolean avps_too) {
+extern void delete_loal(LoAL* loal, bool avpls_too, bool avps_too) {
AVPL* avpl;
#ifdef _AVP_DEBUGGING
@@ -1430,11 +1430,11 @@ extern void delete_loal(LoAL* loal, gboolean avpls_too, gboolean avps_too) {
* load_loal_error:
* Used by loal_from_file to handle errors while loading.
**/
-static LoAL* load_loal_error(FILE* fp, LoAL* loal, AVPL* curr, int linenum, const gchar* fmt, ...) {
+static LoAL* load_loal_error(FILE* fp, LoAL* loal, AVPL* curr, int linenum, const char* fmt, ...) {
va_list list;
- gchar* desc;
+ char* desc;
LoAL* ret = NULL;
- gchar* err;
+ char* err;
va_start( list, fmt );
desc = ws_strdup_vprintf(fmt, list);
@@ -1451,8 +1451,8 @@ static LoAL* load_loal_error(FILE* fp, LoAL* loal, AVPL* curr, int linenum, cons
g_free(err);
if (fp) fclose(fp);
- if (loal) delete_loal(loal,TRUE,TRUE);
- if (curr) delete_avpl(curr,TRUE);
+ if (loal) delete_loal(loal,true,true);
+ if (curr) delete_avpl(curr,true);
return ret;
}
@@ -1483,15 +1483,15 @@ case '7': case '8': case '9': case '.'
* Return value: if successful a pointer to the new populated loal, else NULL.
*
**/
-extern LoAL* loal_from_file(gchar* filename) {
+extern LoAL* loal_from_file(char* filename) {
FILE *fp = NULL;
- gchar c;
+ char c;
int i = 0;
- guint32 linenum = 1;
- gchar *linenum_buf;
- gchar *name;
- gchar *value;
- gchar op = '?';
+ uint32_t linenum = 1;
+ char *linenum_buf;
+ char *name;
+ char *value;
+ char op = '?';
LoAL *loal_error, *loal = new_loal(filename);
AVPL* curr = NULL;
AVP* avp;
@@ -1504,9 +1504,9 @@ extern LoAL* loal_from_file(gchar* filename) {
MY_IGNORE
} state;
- linenum_buf = (gchar*)g_malloc(MAX_ITEM_LEN);
- name = (gchar*)g_malloc(MAX_ITEM_LEN);
- value = (gchar*)g_malloc(MAX_ITEM_LEN);
+ linenum_buf = (char*)g_malloc(MAX_ITEM_LEN);
+ name = (char*)g_malloc(MAX_ITEM_LEN);
+ value = (char*)g_malloc(MAX_ITEM_LEN);
#ifndef _WIN32
if (! getuid()) {
loal_error = load_loal_error(fp,loal,curr,linenum,"MATE Will not run as root");
@@ -1517,7 +1517,7 @@ extern LoAL* loal_from_file(gchar* filename) {
state = START;
if (( fp = ws_fopen(filename,"r") )) {
- while(( c = (gchar) fgetc(fp) )){
+ while(( c = (char) fgetc(fp) )){
if ( feof(fp) ) {
if ( ferror(fp) ) {
@@ -1576,7 +1576,7 @@ extern LoAL* loal_from_file(gchar* filename) {
name[0] = '\0';
switch (c) {
case '\\':
- c = (gchar) fgetc(fp);
+ c = (char) fgetc(fp);
if (c != '\n') ungetc(c,fp);
continue;
case ' ':
@@ -1632,7 +1632,7 @@ extern LoAL* loal_from_file(gchar* filename) {
case IN_VALUE:
switch (c) {
case '\\':
- value[i++] = (gchar) fgetc(fp);
+ value[i++] = (char) fgetc(fp);
continue;
case ';':
state = BEFORE_NAME;
@@ -1664,7 +1664,7 @@ extern LoAL* loal_from_file(gchar* filename) {
return loal;
} else {
- report_open_failure(filename,errno,FALSE);
+ report_open_failure(filename,errno,false);
loal_error = load_loal_error(NULL,loal,NULL,0,"Cannot Open file '%s'",filename);
}
diff --git a/plugins/epan/mate/mate_util.h b/plugins/epan/mate/mate_util.h
index 0764ea5ec2..7a888e0a3b 100644
--- a/plugins/epan/mate/mate_util.h
+++ b/plugins/epan/mate/mate_util.h
@@ -20,8 +20,8 @@
/******* dbg_print *********/
#define DEBUG_BUFFER_SIZE 4096
-extern void dbg_print(const gint* which, gint how, FILE* where,
- const gchar* fmt, ... ) G_GNUC_PRINTF(4, 5);
+extern void dbg_print(const int* which, int how, FILE* where,
+ const char* fmt, ... ) G_GNUC_PRINTF(4, 5);
/******* single copy strings *********/
@@ -32,9 +32,9 @@ typedef struct _scs_collection SCS_collection;
#define SCS_LARGE_SIZE 4096
#define SCS_HUGE_SIZE 65536
-extern gchar* scs_subscribe(SCS_collection* collection, const gchar* s);
-extern void scs_unsubscribe(SCS_collection* collection, gchar* s);
-extern gchar* scs_subscribe_printf(SCS_collection* collection, gchar* fmt, ...)
+extern char* scs_subscribe(SCS_collection* collection, const char* s);
+extern void scs_unsubscribe(SCS_collection* collection, char* s);
+extern char* scs_subscribe_printf(SCS_collection* collection, char* fmt, ...)
G_GNUC_PRINTF(2, 3);
/******* AVPs & Co. *********/
@@ -54,9 +54,9 @@ extern gchar* scs_subscribe_printf(SCS_collection* collection, gchar* fmt, ...)
/* an avp is an object made of a name a value and an operator */
typedef struct _avp {
- gchar* n;
- gchar* v;
- gchar o;
+ char* n;
+ char* v;
+ char o;
} AVP;
/* avp nodes are used in avp lists */
@@ -68,8 +68,8 @@ typedef struct _avp_node {
/* an avp list is a sorted set of avps */
typedef struct _avp_list {
- gchar* name;
- guint32 len;
+ char* name;
+ uint32_t len;
AVPN null;
} AVPL;
@@ -92,7 +92,7 @@ typedef enum _avpl_replace_mode {
typedef struct _avpl_transf AVPL_Transf;
struct _avpl_transf {
- gchar* name;
+ char* name;
AVPL* match;
AVPL* replace;
@@ -114,8 +114,8 @@ typedef struct _loal_node {
/* a loal is a list of avp lists */
typedef struct _loal {
- gchar* name;
- guint len;
+ char* name;
+ unsigned len;
LoALnode null;
} LoAL;
@@ -133,13 +133,13 @@ extern void setup_avp_debug(FILE* fp, int* general, int* avp, int* avp_op, int*
*/
/* creates a new avp */
-extern AVP* new_avp(const gchar* name, const gchar* value, gchar op);
+extern AVP* new_avp(const char* name, const char* value, char op);
/* creates a copy od an avp */
extern AVP* avp_copy(AVP* from);
/* creates an avp from a field_info record */
-extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo);
+extern AVP* new_avp_from_finfo(const char* name, field_info* finfo);
/*
* avp destructor
@@ -161,18 +161,18 @@ extern AVP* match_avp(AVP* src, AVP* op);
*/
/* creates an empty avp list */
-extern AVPL* new_avpl(const gchar* name);
+extern AVPL* new_avpl(const char* name);
/* creates a copy of an avp list */
-extern AVPL* new_avpl_from_avpl(const gchar* name, AVPL* avpl, gboolean copy_avps);
+extern AVPL* new_avpl_from_avpl(const char* name, AVPL* avpl, bool copy_avps);
-extern AVPL* new_avpl_loose_match(const gchar* name, AVPL* src, AVPL* op, gboolean copy_avps);
+extern AVPL* new_avpl_loose_match(const char* name, AVPL* src, AVPL* op, bool copy_avps);
-extern AVPL* new_avpl_pairs_match(const gchar* name, AVPL* src, AVPL* op, gboolean strict, gboolean copy_avps);
+extern AVPL* new_avpl_pairs_match(const char* name, AVPL* src, AVPL* op, bool strict, bool copy_avps);
/* uses mode to call one of the former matches. NO_MATCH = merge(merge(copy(src),op)) */
-extern AVPL* new_avpl_from_match(avpl_match_mode mode, const gchar* name,AVPL* src, AVPL* op, gboolean copy_avps);
+extern AVPL* new_avpl_from_match(avpl_match_mode mode, const char* name,AVPL* src, AVPL* op, bool copy_avps);
/*
@@ -180,17 +180,17 @@ extern AVPL* new_avpl_from_match(avpl_match_mode mode, const gchar* name,AVPL* s
*/
/* it will insert an avp to an avpl */
-extern gboolean insert_avp(AVPL* avpl, AVP* avp);
+extern bool insert_avp(AVPL* avpl, AVP* avp);
/* renames an avpl */
-extern void rename_avpl(AVPL* avpl, gchar* name);
+extern void rename_avpl(AVPL* avpl, char* name);
/* it will add all the avps in src which don't match(*) any attribute in dest */
-extern void merge_avpl(AVPL* dest, AVPL* src, gboolean copy);
+extern void merge_avpl(AVPL* dest, AVPL* src, bool copy);
/* it will return the first avp in an avpl whose name matches the given name.
will return NULL if there is not anyone matching */
-extern AVP* get_avp_by_name(AVPL* avpl, gchar* name, void** cookie);
+extern AVP* get_avp_by_name(AVPL* avpl, char* name, void** cookie);
/* it will get the next avp from an avpl, using cookie to keep state */
extern AVP* get_next_avp(AVPL* avpl, void** cookie);
@@ -203,14 +203,14 @@ extern AVP* extract_last_avp(AVPL* avpl);
/* it will extract the first avp in an avpl whose name matches the given name.
it will not extract any and return NULL if there is not anyone matching */
-extern AVP* extract_avp_by_name(AVPL* avpl, gchar* name);
+extern AVP* extract_avp_by_name(AVPL* avpl, char* name);
/* returns a newly allocated string containing a representation of the avp list */
-extern gchar* avpl_to_str(AVPL* avpl);
-extern gchar* avpl_to_dotstr(AVPL*);
+extern char* avpl_to_str(AVPL* avpl);
+extern char* avpl_to_dotstr(AVPL*);
/* deletes an avp list and eventually its contents */
-extern void delete_avpl(AVPL* avpl, gboolean avps_too);
+extern void delete_avpl(AVPL* avpl, bool avps_too);
/*
* AVPL transformations
@@ -224,11 +224,11 @@ extern void avpl_transform(AVPL* src, AVPL_Transf* op);
*/
/* creates an empty list of avp lists */
-extern LoAL* new_loal(const gchar* name);
+extern LoAL* new_loal(const char* name);
/* given a file loads all the avpls contained in it
every line is formatted as it is the output of avplist_to_string */
-extern LoAL* loal_from_file(gchar* filename);
+extern LoAL* loal_from_file(char* filename);
/* inserts an avplist into a LoAL */
extern void loal_append(LoAL* loal, AVPL* avpl);
@@ -243,7 +243,7 @@ extern AVPL* extract_last_avpl(LoAL* loal);
extern AVPL* get_next_avpl(LoAL* loal,void** cookie);
/* deletes a loal and eventually its contents */
-extern void delete_loal(LoAL* loal, gboolean avpls_too, gboolean avps_too);
+extern void delete_loal(LoAL* loal, bool avpls_too, bool avps_too);
#endif
diff --git a/plugins/epan/mate/packet-mate.c b/plugins/epan/mate/packet-mate.c
index f4621e349d..6e76ab4d33 100644
--- a/plugins/epan/mate/packet-mate.c
+++ b/plugins/epan/mate/packet-mate.c
@@ -24,7 +24,7 @@
void proto_register_mate(void);
void proto_reg_handoff_mate(void);
-static mate_config* mc = NULL;
+static mate_config* mc;
static int proto_mate;
@@ -36,15 +36,15 @@ static int hf_mate_gop_key;
static expert_field ei_mate_undefined_attribute;
-static const gchar* pref_mate_config_filename = "";
-static const gchar* current_mate_config_filename = NULL;
+static const char* pref_mate_config_filename = "";
+static const char* current_mate_config_filename;
#ifdef _AVP_DEBUGGING
-static int pref_avp_debug_general = 0;
-static int pref_avp_debug_avp = 0;
-static int pref_avp_debug_avp_op = 0;
-static int pref_avp_debug_avpl = 0;
-static int pref_avp_debug_avpl_op = 0;
+static int pref_avp_debug_general;
+static int pref_avp_debug_avp;
+static int pref_avp_debug_avp_op;
+static int pref_avp_debug_avpl;
+static int pref_avp_debug_avpl_op;
#endif
static dissector_handle_t mate_handle;
@@ -132,8 +132,8 @@ mate_gog_tree(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, mate_gog* gog
if (gog->cfg->show_times) {
gog_time_tree = proto_tree_add_subtree_format(gog_tree,tvb,0,0,gog->cfg->ett_times,NULL,"%s Times",gog->cfg->name);
- proto_tree_add_float(gog_time_tree, gog->cfg->hfid_start_time, tvb, 0, 0, gog->start_time);
- proto_tree_add_float(gog_time_tree, gog->cfg->hfid_last_time, tvb, 0, 0, gog->last_time - gog->start_time);
+ proto_tree_add_double(gog_time_tree, gog->cfg->hfid_start_time, tvb, 0, 0, gog->start_time);
+ proto_tree_add_double(gog_time_tree, gog->cfg->hfid_last_time, tvb, 0, 0, gog->last_time - gog->start_time);
}
gog_gops_item = proto_tree_add_uint(gog_tree, gog->cfg->hfid_gog_num_of_gops, tvb, 0, 0, gog->num_of_gops);
@@ -151,13 +151,13 @@ mate_gog_tree(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, mate_gog* gog
if (gog->cfg->gop_tree_mode == GOP_BASIC_TREE) {
gog_gop_tree = proto_item_add_subtree(gog_gop_item, gog->cfg->ett_gog_gop);
- proto_tree_add_float(gog_gop_tree, hf_mate_started_at, tvb,0,0,gog_gops->start_time);
+ proto_tree_add_double(gog_gop_tree, hf_mate_started_at, tvb,0,0,gog_gops->start_time);
- proto_tree_add_float_format(gog_gop_tree, hf_mate_duration, tvb,0,0, gog_gops->last_time - gog_gops->start_time,
+ proto_tree_add_double_format(gog_gop_tree, hf_mate_duration, tvb,0,0, gog_gops->last_time - gog_gops->start_time,
"%s Duration: %f", gog_gops->cfg->name, gog_gops->last_time - gog_gops->start_time);
if (gog_gops->released)
- proto_tree_add_float_format(gog_gop_tree, hf_mate_released_time, tvb,0,0, gog_gops->release_time - gog_gops->start_time,
+ proto_tree_add_double_format(gog_gop_tree, hf_mate_released_time, tvb,0,0, gog_gops->release_time - gog_gops->start_time,
"%s has been released, Time: %f", gog_gops->cfg->name, gog_gops->release_time - gog_gops->start_time);
proto_tree_add_uint(gog_gop_tree, hf_mate_number_of_pdus, tvb,0,0, gog_gops->num_of_pdus);
@@ -190,11 +190,11 @@ mate_gop_tree(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, mate_gop* gop
proto_item *gop_pdu_item;
proto_tree *gop_pdu_tree;
mate_pdu* gop_pdus;
- float rel_time;
- float pdu_rel_time;
- const gchar* pdu_str;
- const gchar* type_str;
- guint32 pdu_item;
+ double rel_time;
+ double pdu_rel_time;
+ const char* pdu_str;
+ const char* type_str;
+ uint32_t pdu_item;
gop_item = proto_tree_add_uint(tree,gop->cfg->hfid,tvb,0,0,gop->id);
gop_tree = proto_item_add_subtree(gop_item, gop->cfg->ett);
@@ -206,13 +206,13 @@ mate_gop_tree(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, mate_gop* gop
if (gop->cfg->show_times) {
gop_time_tree = proto_tree_add_subtree_format(gop_tree,tvb,0,0,gop->cfg->ett_times,NULL,"%s Times",gop->cfg->name);
- proto_tree_add_float(gop_time_tree, gop->cfg->hfid_start_time, tvb, 0, 0, gop->start_time);
+ proto_tree_add_double(gop_time_tree, gop->cfg->hfid_start_time, tvb, 0, 0, gop->start_time);
if (gop->released) {
- proto_tree_add_float(gop_time_tree, gop->cfg->hfid_stop_time, tvb, 0, 0, gop->release_time - gop->start_time);
- proto_tree_add_float(gop_time_tree, gop->cfg->hfid_last_time, tvb, 0, 0, gop->last_time - gop->start_time);
+ proto_tree_add_double(gop_time_tree, gop->cfg->hfid_stop_time, tvb, 0, 0, gop->release_time - gop->start_time);
+ proto_tree_add_double(gop_time_tree, gop->cfg->hfid_last_time, tvb, 0, 0, gop->last_time - gop->start_time);
} else {
- proto_tree_add_float(gop_time_tree, gop->cfg->hfid_last_time, tvb, 0, 0, gop->last_time - gop->start_time);
+ proto_tree_add_double(gop_time_tree, gop->cfg->hfid_last_time, tvb, 0, 0, gop->last_time - gop->start_time);
}
}
@@ -240,7 +240,7 @@ mate_gop_tree(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, mate_gop* gop
pdu_str = "";
}
- pdu_rel_time = gop_pdus->time_in_gop != 0.0 ? gop_pdus->time_in_gop - rel_time : (float) 0.0;
+ pdu_rel_time = gop_pdus->time_in_gop != 0.0 ? gop_pdus->time_in_gop - rel_time : 0.0;
proto_tree_add_uint_format(gop_pdu_tree,gop->cfg->hfid_gop_pdu,tvb,0,0,pdu_item,
"%sPDU: %s %i (%f : %f)",pdu_str, type_str,
@@ -277,10 +277,10 @@ mate_pdu_tree(mate_pdu *pdu, packet_info *pinfo, tvbuff_t *tvb, proto_item *item
pdu_item = proto_tree_add_uint(tree,pdu->cfg->hfid,tvb,0,0,pdu->id);
pdu_tree = proto_item_add_subtree(pdu_item, pdu->cfg->ett);
- proto_tree_add_float(pdu_tree,pdu->cfg->hfid_pdu_rel_time, tvb, 0, 0, pdu->rel_time);
+ proto_tree_add_double(pdu_tree,pdu->cfg->hfid_pdu_rel_time, tvb, 0, 0, pdu->rel_time);
if (pdu->gop) {
- proto_tree_add_float(pdu_tree,pdu->cfg->hfid_pdu_time_in_gop, tvb, 0, 0, pdu->time_in_gop);
+ proto_tree_add_double(pdu_tree,pdu->cfg->hfid_pdu_time_in_gop, tvb, 0, 0, pdu->time_in_gop);
mate_gop_tree(tree,pinfo,tvb,pdu->gop);
if (pdu->gop->gog)
@@ -359,7 +359,7 @@ proto_reg_handoff_mate(void)
if (mc) {
/* XXX: alignment warnings, what do they mean? */
proto_register_field_array(proto_mate, (hf_register_info*)(void *)mc->hfrs->data, mc->hfrs->len );
- proto_register_subtree_array((gint**)(void*)mc->ett->data, mc->ett->len);
+ proto_register_subtree_array((int**)(void*)mc->ett->data, mc->ett->len);
register_init_routine(initialize_mate);
register_postseq_cleanup_routine(flush_mate_debug);
@@ -376,7 +376,7 @@ proto_reg_handoff_mate(void)
* work. Set the tree as visible as with Lua postdissectors that
* need all fields. It's overkill and bad for performance, though.
*/
- epan_set_always_visible(TRUE);
+ epan_set_always_visible(true);
initialize_mate_runtime(mc);
}
@@ -392,9 +392,9 @@ void
proto_register_mate(void)
{
static hf_register_info hf[] = {
- { &hf_mate_started_at, { "Started at", "mate.started_at", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
- { &hf_mate_duration, { "Duration", "mate.duration", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
- { &hf_mate_released_time, { "Release time", "mate.released_time", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_mate_started_at, { "Started at", "mate.started_at", FT_DOUBLE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_mate_duration, { "Duration", "mate.duration", FT_DOUBLE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
+ { &hf_mate_released_time, { "Release time", "mate.released_time", FT_DOUBLE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_mate_number_of_pdus, { "Number of Pdus", "mate.number_of_pdus", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_mate_gop_key, { "GOP Key", "mate.gop_key", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
@@ -416,7 +416,7 @@ proto_register_mate(void)
prefs_register_filename_preference(mate_module, "config",
"Configuration Filename",
"The name of the file containing the mate module's configuration",
- &pref_mate_config_filename, FALSE);
+ &pref_mate_config_filename, false);
#ifdef _AVP_DEBUGGING
prefs_register_uint_preference(mate_module, "avp_debug_general",
"AVP Debug general",
diff --git a/plugins/epan/opcua/CMakeLists.txt b/plugins/epan/opcua/CMakeLists.txt
index 04c1bbb5a0..7299358f7d 100644
--- a/plugins/epan/opcua/CMakeLists.txt
+++ b/plugins/epan/opcua/CMakeLists.txt
@@ -45,12 +45,11 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "OpcUa (OPC Unified Architecture) dissection"
${DISSECTOR_SRC}
${DISSECTOR_SUPPORT_SRC}
)
-add_wireshark_epan_plugin_library(opcua)
+add_wireshark_plugin_library(opcua epan)
target_link_libraries(opcua epan ${GCRYPT_LIBRARIES})
diff --git a/plugins/epan/opcua/README b/plugins/epan/opcua/README
index 8c4993be10..225fbea56c 100644
--- a/plugins/epan/opcua/README
+++ b/plugins/epan/opcua/README
@@ -28,7 +28,7 @@ Protocol Mappings:
Binary (TCP): The fastest and most flexible version (small footprint, no XML and SOAP necessary)
can easily be tunneled (SSH, IPSEC, etc.), redirected, ...
-SOAP version: Easy to implement with verious tools like .Net, JAVA, gSOAP, etc.
+SOAP version: Easy to implement with various tools like .Net, JAVA, gSOAP, etc.
Better to communicate through firewalls via HTTP.
SOAP with Binary Attachment: Combines the advantages of both.
The messages are encoded as Binary, and transported via SOAP as binary
@@ -60,7 +60,7 @@ marked "DON'T MODIFY THIS FILE!" for this reason.
However, the code to create this dissector is not part of the Wireshark source
source code distribution. This was discussed prior to the plugin's inclusion.
-From https://www.wireshark.org/lists/wireshark-dev/200704/msg00025.html :
+From https://lists.wireshark.org/archives/wireshark-dev/200704/msg00025.html :
~~~
> a lot of the code seems to be autogenerated (as the comments suggest)
diff --git a/plugins/epan/opcua/opcua.c b/plugins/epan/opcua/opcua.c
index 10ad0e1b3f..5872a207bc 100644
--- a/plugins/epan/opcua/opcua.c
+++ b/plugins/epan/opcua/opcua.c
@@ -41,13 +41,13 @@ void proto_register_opcua(void);
extern const value_string g_requesttypes[];
extern const int g_NumServices;
-static const gchar *g_opcua_debug_file_name = NULL;
-int g_opcua_default_sig_len = 0;
+static const char *g_opcua_debug_file_name;
+int g_opcua_default_sig_len;
/* forward reference */
void proto_reg_handoff_opcua(void);
/* declare parse function pointer */
-typedef int (*FctParse)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
+typedef int (*FctParse)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
int proto_opcua;
static dissector_handle_t opcua_handle;
@@ -72,13 +72,13 @@ static module_t *opcua_module;
#define AES_BLOCK_SIZE 16
/** subtree types used in opcua_transport_layer.c */
-gint ett_opcua_extensionobject;
-gint ett_opcua_nodeid;
+int ett_opcua_extensionobject;
+int ett_opcua_nodeid;
/** subtree types used locally */
-static gint ett_opcua_transport;
-static gint ett_opcua_fragment;
-static gint ett_opcua_fragments;
+static int ett_opcua_transport;
+static int ett_opcua_fragment;
+static int ett_opcua_fragments;
static int hf_opcua_fragments;
static int hf_opcua_fragment;
@@ -167,10 +167,10 @@ static char *ua_strtok_r(char *str, const char *delim, char **saveptr)
* This function reads the length information from
* the transport header.
*/
-static guint get_opcua_message_len(packet_info *pinfo _U_, tvbuff_t *tvb,
+static unsigned get_opcua_message_len(packet_info *pinfo _U_, tvbuff_t *tvb,
int offset, void *data _U_)
{
- gint32 plen;
+ int32_t plen;
/* the message length starts at offset 4 */
plen = tvb_get_letohl(tvb, offset + 4);
@@ -179,10 +179,10 @@ static guint get_opcua_message_len(packet_info *pinfo _U_, tvbuff_t *tvb,
}
/* Helper function to convert hex string to binary data */
-guint hex_to_bin(const char *hex_string, unsigned char *binary_data, unsigned int binary_size)
+unsigned hex_to_bin(const char *hex_string, unsigned char *binary_data, unsigned int binary_size)
{
- guint length = (guint)strlen(hex_string);
- guint i;
+ unsigned length = (unsigned)strlen(hex_string);
+ unsigned i;
for (i = 0; i < length / 2 && i < binary_size; ++i) {
sscanf(hex_string + 2 * i, "%2hhx", &binary_data[i]);
@@ -325,7 +325,7 @@ static void opcua_load_keylog_file(const char *filename)
* @param padding Pointer to last padding byte.
* @return padding length on success, -1 if the paddding is invalid.
*/
-static int verify_padding(const guint8 *padding)
+static int verify_padding(const uint8_t *padding)
{
uint8_t pad_len;
uint8_t i;
@@ -348,7 +348,7 @@ static int verify_padding(const guint8 *padding)
*
* @return Returns 0 on success, -1 if parsing failed.
*/
-static int opcua_get_footer_info(uint32_t channel_id, uint32_t token_id, guint8 *sig_len, bool from_server)
+static int opcua_get_footer_info(uint32_t channel_id, uint32_t token_id, uint8_t *sig_len, bool from_server)
{
struct ua_keyset *keyset;
uint64_t id;
@@ -394,9 +394,9 @@ static int opcua_get_footer_info(uint32_t channel_id, uint32_t token_id, guint8
*/
static int decrypt_opcua(
uint32_t channel_id, uint32_t token_id,
- const guint8 *cipher, guint cipher_len,
- guint8 *plaintext, guint plaintext_len,
- guint8 *padding_len, guint8 *sig_len, bool from_server)
+ const uint8_t *cipher, unsigned cipher_len,
+ uint8_t *plaintext, unsigned plaintext_len,
+ uint8_t *padding_len, uint8_t *sig_len, bool from_server)
{
struct ua_keyset *keyset;
uint64_t id;
@@ -496,7 +496,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
{
FctParse pfctParse = NULL;
enum MessageType msgtype = MSG_INVALID;
- guint16 src_port = pinfo->srcport;
+ uint16_t src_port = pinfo->srcport;
range_t *port_range;
bool from_server = false;
bool decrypted = false; /* successfully decrypted secure message */
@@ -523,37 +523,37 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
/* parse message type */
- if (tvb_memeql(tvb, 0, (const guint8 * )"HEL", 3) == 0)
+ if (tvb_memeql(tvb, 0, (const uint8_t * )"HEL", 3) == 0)
{
msgtype = MSG_HELLO;
pfctParse = parseHello;
}
- else if (tvb_memeql(tvb, 0, (const guint8*)"ACK", 3) == 0)
+ else if (tvb_memeql(tvb, 0, (const uint8_t*)"ACK", 3) == 0)
{
msgtype = MSG_ACKNOWLEDGE;
pfctParse = parseAcknowledge;
}
- else if (tvb_memeql(tvb, 0, (const guint8*)"ERR", 3) == 0)
+ else if (tvb_memeql(tvb, 0, (const uint8_t*)"ERR", 3) == 0)
{
msgtype = MSG_ERROR;
pfctParse = parseError;
}
- else if (tvb_memeql(tvb, 0, (const guint8*)"RHE", 3) == 0)
+ else if (tvb_memeql(tvb, 0, (const uint8_t*)"RHE", 3) == 0)
{
msgtype = MSG_REVERSEHELLO;
pfctParse = parseReverseHello;
}
- else if (tvb_memeql(tvb, 0, (const guint8*)"MSG", 3) == 0)
+ else if (tvb_memeql(tvb, 0, (const uint8_t*)"MSG", 3) == 0)
{
msgtype = MSG_MESSAGE;
pfctParse = parseMessage;
}
- else if (tvb_memeql(tvb, 0, (const guint8*)"OPN", 3) == 0)
+ else if (tvb_memeql(tvb, 0, (const uint8_t*)"OPN", 3) == 0)
{
msgtype = MSG_OPENSECURECHANNEL;
pfctParse = parseOpenSecureChannel;
}
- else if (tvb_memeql(tvb, 0, (const guint8*)"CLO", 3) == 0)
+ else if (tvb_memeql(tvb, 0, (const uint8_t*)"CLO", 3) == 0)
{
msgtype = MSG_CLOSESECURECHANNEL;
pfctParse = parseCloseSecureChannel;
@@ -576,12 +576,12 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
if (pfctParse)
{
- gint offset = 0;
+ int offset = 0;
int iServiceId = -1;
- gboolean bParseService = FALSE; /* Only MSG, OPN and CLO have a service payload */
- gboolean bIsFinalChunk = FALSE;
- guint payload_len = 0;
- guint8 pad_len = 0;
+ bool bParseService = false; /* Only MSG, OPN and CLO have a service payload */
+ bool bIsFinalChunk = false;
+ unsigned payload_len = 0;
+ uint8_t pad_len = 0;
/* we are being asked for details */
proto_item *ti = NULL;
@@ -598,14 +598,14 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
*/
if (msgtype == MSG_MESSAGE || msgtype == MSG_CLOSESECURECHANNEL)
{
- guint8 chunkType = 0;
- guint32 opcua_seqno = 0; /* OPCUA sequence number */
- guint32 opcua_reqid = 0; /* OPCUA request id */
+ uint8_t chunkType = 0;
+ uint32_t opcua_seqno = 0; /* OPCUA sequence number */
+ uint32_t opcua_reqid = 0; /* OPCUA request id */
fragment_head *frag_msg = NULL;
- bParseService = TRUE;
+ bParseService = true;
offset = 3;
- chunkType = tvb_get_guint8(tvb, offset); offset += 1;
+ chunkType = tvb_get_uint8(tvb, offset); offset += 1;
offset += 4; /* message size */
offset += 4; /* skip secure channel_id */
parseSecurityHeader(transport_tree, tvb, &offset, &metadata); /* only token_id (4 byte) */
@@ -613,7 +613,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
if (mode == UA_MessageMode_MaybeEncrypted) {
/* try to parse ServiceId */
iServiceId = getServiceNodeId(tvb, offset + 8); /* skip 4 byte SeqNo and 4 byte RequestId */
- const gchar *szServiceName = val_to_str((guint32)iServiceId, g_requesttypes, "not found");
+ const char *szServiceName = val_to_str((uint32_t)iServiceId, g_requesttypes, "not found");
if (strcmp(szServiceName, "not found") == 0) {
mode = UA_MessageMode_SignAndEncrypt;
} else {
@@ -640,10 +640,10 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
if (mode == UA_MessageMode_SignAndEncrypt) {
uint32_t channel_id = tvb_get_letohl(tvb, 8);
uint32_t token_id = tvb_get_letohl(tvb, 12);
- guint cipher_len = tvb_ensure_captured_length_remaining(tvb, 16);
- guint plaintext_len = cipher_len;
- const guint8 *cipher = tvb_get_ptr(tvb, 16, (gint)cipher_len);
- guchar *plaintext = (guchar*)wmem_alloc(pinfo->pool, plaintext_len);
+ unsigned cipher_len = tvb_ensure_captured_length_remaining(tvb, 16);
+ unsigned plaintext_len = cipher_len;
+ const uint8_t *cipher = tvb_get_ptr(tvb, 16, (int)cipher_len);
+ unsigned char *plaintext = (unsigned char*)wmem_alloc(pinfo->pool, plaintext_len);
ret = decrypt_opcua(channel_id, token_id, cipher, cipher_len, plaintext, plaintext_len, &pad_len, &sig_len, from_server);
if (ret == 0) {
@@ -652,7 +652,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
* the padding (paddin_len+1), and the signature from the plaintext */
payload_len = plaintext_len - pad_len - sig_len - 9; /* pad_len 2 = 02 02 02 */
/* Now re-setup the tvb buffer to have the new data */
- decrypted_tvb = tvb_new_child_real_data(tvb, plaintext, (guint)plaintext_len, (gint)plaintext_len);
+ decrypted_tvb = tvb_new_child_real_data(tvb, plaintext, (unsigned)plaintext_len, (int)plaintext_len);
add_new_data_source(pinfo, decrypted_tvb, "Decrypted Data");
/* process decrypted_tvb from here */
tvb = decrypted_tvb;
@@ -717,12 +717,12 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
if (frag_msg != NULL || chunkType == 'C')
{
- gboolean bSaveFragmented = pinfo->fragmented;
- gboolean bMoreFragments = TRUE;
+ bool bSaveFragmented = pinfo->fragmented;
+ bool bMoreFragments = true;
tvbuff_t *reassembled_tvb = NULL;
bool first_frag = false;
- pinfo->fragmented = TRUE;
+ pinfo->fragmented = true;
if (frag_msg == NULL)
{
@@ -732,7 +732,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
{
if (chunkType == 'F')
{
- bMoreFragments = FALSE;
+ bMoreFragments = false;
}
}
@@ -769,7 +769,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
if (reassembled_tvb)
{
/* Reassembled */
- bIsFinalChunk = TRUE;
+ bIsFinalChunk = true;
/* take it all */
tvb = reassembled_tvb;
/* new tvb starts at payload */
@@ -780,7 +780,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
/* Not last packet of reassembled UA message */
col_append_fstr(pinfo->cinfo, COL_INFO, " (Message fragment %u)", opcua_seqno);
/* only show transport header */
- bParseService = FALSE;
+ bParseService = false;
tvb = tvb_new_subset_remaining(tvb, 0);
}
@@ -797,7 +797,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
} else if (iServiceId == OpcUaId_CloseSecureChannelResponse_Encoding_DefaultBinary) {
col_append_str(pinfo->cinfo, COL_INFO, ": CloseSecureChannelResponse");
} else {
- const gchar *szServiceName = val_to_str((guint32)iServiceId, g_requesttypes, "ServiceId %d");
+ const char *szServiceName = val_to_str((uint32_t)iServiceId, g_requesttypes, "ServiceId %d");
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s (Wrong ServiceId)", szServiceName);
}
} else if (msgtype == MSG_MESSAGE) {
@@ -807,9 +807,9 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
/* display the service type in addition to the message type */
if (iServiceId != -1)
{
- const gchar *szServiceName = val_to_str((guint32)iServiceId, g_requesttypes, "ServiceId %d");
+ const char *szServiceName = val_to_str((uint32_t)iServiceId, g_requesttypes, "ServiceId %d");
- if (bIsFinalChunk == FALSE)
+ if (bIsFinalChunk == false)
{
/* normal message in one chunk */
col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", szServiceName);
@@ -845,7 +845,7 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
*/
static int dissect_opcua(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
- tcp_dissect_pdus(tvb, pinfo, tree, TRUE, FRAME_HEADER_LEN,
+ tcp_dissect_pdus(tvb, pinfo, tree, true, FRAME_HEADER_LEN,
get_opcua_message_len, dissect_opcua_message, data);
return tvb_reported_length(tvb);
}
@@ -866,7 +866,7 @@ void proto_cleanup_opcua(void)
}
/** secrets callback called from Wireshark when loading a capture file with OPC UA Keylog File. */
-static void opcua_secrets_block_callback(const void *secrets, guint size)
+static void opcua_secrets_block_callback(const void *secrets, unsigned size)
{
char *tmp = g_memdup2(secrets, size + 1);
if (tmp == NULL) return; /* OOM */
@@ -901,7 +901,7 @@ void proto_register_opcua(void)
};
/** Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_opcua_extensionobject,
&ett_opcua_nodeid,
@@ -919,11 +919,11 @@ void proto_register_opcua(void)
opcua_module = prefs_register_protocol(proto_opcua, proto_reg_handoff_opcua);
prefs_register_filename_preference(opcua_module, "debug_file", "OPCUA debug file",
"Redirect OPC UA Secure Conversion session keys to the file specified to enable decryption.",
- &g_opcua_debug_file_name, FALSE);
+ &g_opcua_debug_file_name, false);
prefs_register_enum_preference(opcua_module, "signature_length", "Default signature length",
"Default signature length to use if the OpenSecureChannel message is missing.",
- &g_opcua_default_sig_len, opcua_sig_len_enum, FALSE);
+ &g_opcua_default_sig_len, opcua_sig_len_enum, false);
registerTransportLayerTypes(proto_opcua);
registerSecurityLayerTypes(proto_opcua);
diff --git a/plugins/epan/opcua/opcua_application_layer.c b/plugins/epan/opcua/opcua_application_layer.c
index dfa1e19238..8006a36696 100644
--- a/plugins/epan/opcua/opcua_application_layer.c
+++ b/plugins/epan/opcua/opcua_application_layer.c
@@ -55,18 +55,18 @@ void registerApplicationLayerTypes(int proto)
/** Decodes the service nodeid without modifying the tree or offset.
* Service NodeIds are alsways numeric.
*/
-int getServiceNodeId(tvbuff_t *tvb, gint offset)
+int getServiceNodeId(tvbuff_t *tvb, int offset)
{
- guint8 EncodingMask;
- guint32 Numeric = 0;
+ uint8_t EncodingMask;
+ uint32_t Numeric = 0;
- EncodingMask = tvb_get_guint8(tvb, offset);
+ EncodingMask = tvb_get_uint8(tvb, offset);
offset++;
switch(EncodingMask)
{
case 0x00: /* two byte node id */
- Numeric = tvb_get_guint8(tvb, offset);
+ Numeric = tvb_get_uint8(tvb, offset);
break;
case 0x01: /* four byte node id */
offset+=1;
@@ -89,20 +89,20 @@ int getServiceNodeId(tvbuff_t *tvb, gint offset)
/** Parses an OpcUa Service NodeId and returns the service type.
* In this cases the NodeId is always from type numeric and NSId = 0.
*/
-int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, int *pOffset)
{
- gint iOffset = *pOffset;
- guint8 EncodingMask;
- guint32 Numeric = 0;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
+ uint32_t Numeric = 0;
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
proto_tree_add_item(tree, hf_opcua_nodeid_encodingmask, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);
iOffset++;
switch(EncodingMask)
{
case 0x00: /* two byte node id */
- Numeric = tvb_get_guint8(tvb, iOffset);
+ Numeric = tvb_get_uint8(tvb, iOffset);
proto_tree_add_item(tree, hf_opcua_app_numeric, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);
iOffset+=1;
break;
diff --git a/plugins/epan/opcua/opcua_application_layer.h b/plugins/epan/opcua/opcua_application_layer.h
index 44e9345cdc..9e47a2dd9a 100644
--- a/plugins/epan/opcua/opcua_application_layer.h
+++ b/plugins/epan/opcua/opcua_application_layer.h
@@ -17,5 +17,5 @@
void registerApplicationLayerTypes(int proto);
/* Ua type parsers */
-int getServiceNodeId(tvbuff_t *tvb, gint offset);
-int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
+int getServiceNodeId(tvbuff_t *tvb, int offset);
+int parseServiceNodeId(proto_tree *tree, tvbuff_t *tvb, int *pOffset);
diff --git a/plugins/epan/opcua/opcua_complextypeparser.c b/plugins/epan/opcua/opcua_complextypeparser.c
index 53362785ff..a04f9c596d 100644
--- a/plugins/epan/opcua/opcua_complextypeparser.c
+++ b/plugins/epan/opcua/opcua_complextypeparser.c
@@ -24,288 +24,288 @@
#include "opcua_simpletypes.h"
#include "opcua_hfindeces.h"
-gint ett_opcua_TrustListDataType;
-gint ett_opcua_array_TrustListDataType;
-gint ett_opcua_Node;
-gint ett_opcua_array_Node;
-gint ett_opcua_InstanceNode;
-gint ett_opcua_array_InstanceNode;
-gint ett_opcua_TypeNode;
-gint ett_opcua_array_TypeNode;
-gint ett_opcua_ObjectNode;
-gint ett_opcua_array_ObjectNode;
-gint ett_opcua_ObjectTypeNode;
-gint ett_opcua_array_ObjectTypeNode;
-gint ett_opcua_VariableNode;
-gint ett_opcua_array_VariableNode;
-gint ett_opcua_VariableTypeNode;
-gint ett_opcua_array_VariableTypeNode;
-gint ett_opcua_ReferenceTypeNode;
-gint ett_opcua_array_ReferenceTypeNode;
-gint ett_opcua_MethodNode;
-gint ett_opcua_array_MethodNode;
-gint ett_opcua_ViewNode;
-gint ett_opcua_array_ViewNode;
-gint ett_opcua_DataTypeNode;
-gint ett_opcua_array_DataTypeNode;
-gint ett_opcua_ReferenceNode;
-gint ett_opcua_array_ReferenceNode;
-gint ett_opcua_Argument;
-gint ett_opcua_array_Argument;
-gint ett_opcua_EnumValueType;
-gint ett_opcua_array_EnumValueType;
-gint ett_opcua_OptionSet;
-gint ett_opcua_array_OptionSet;
-gint ett_opcua_TimeZoneDataType;
-gint ett_opcua_array_TimeZoneDataType;
-gint ett_opcua_ApplicationDescription;
-gint ett_opcua_array_ApplicationDescription;
-gint ett_opcua_RequestHeader;
-gint ett_opcua_array_RequestHeader;
-gint ett_opcua_ResponseHeader;
-gint ett_opcua_array_ResponseHeader;
-gint ett_opcua_ServerOnNetwork;
-gint ett_opcua_array_ServerOnNetwork;
-gint ett_opcua_UserTokenPolicy;
-gint ett_opcua_array_UserTokenPolicy;
-gint ett_opcua_EndpointDescription;
-gint ett_opcua_array_EndpointDescription;
-gint ett_opcua_RegisteredServer;
-gint ett_opcua_array_RegisteredServer;
-gint ett_opcua_MdnsDiscoveryConfiguration;
-gint ett_opcua_array_MdnsDiscoveryConfiguration;
-gint ett_opcua_ChannelSecurityToken;
-gint ett_opcua_array_ChannelSecurityToken;
-gint ett_opcua_SignedSoftwareCertificate;
-gint ett_opcua_array_SignedSoftwareCertificate;
-gint ett_opcua_SignatureData;
-gint ett_opcua_array_SignatureData;
-gint ett_opcua_UserIdentityToken;
-gint ett_opcua_array_UserIdentityToken;
-gint ett_opcua_AnonymousIdentityToken;
-gint ett_opcua_array_AnonymousIdentityToken;
-gint ett_opcua_UserNameIdentityToken;
-gint ett_opcua_array_UserNameIdentityToken;
-gint ett_opcua_X509IdentityToken;
-gint ett_opcua_array_X509IdentityToken;
-gint ett_opcua_KerberosIdentityToken;
-gint ett_opcua_array_KerberosIdentityToken;
-gint ett_opcua_IssuedIdentityToken;
-gint ett_opcua_array_IssuedIdentityToken;
-gint ett_opcua_NodeAttributes;
-gint ett_opcua_array_NodeAttributes;
-gint ett_opcua_ObjectAttributes;
-gint ett_opcua_array_ObjectAttributes;
-gint ett_opcua_VariableAttributes;
-gint ett_opcua_array_VariableAttributes;
-gint ett_opcua_MethodAttributes;
-gint ett_opcua_array_MethodAttributes;
-gint ett_opcua_ObjectTypeAttributes;
-gint ett_opcua_array_ObjectTypeAttributes;
-gint ett_opcua_VariableTypeAttributes;
-gint ett_opcua_array_VariableTypeAttributes;
-gint ett_opcua_ReferenceTypeAttributes;
-gint ett_opcua_array_ReferenceTypeAttributes;
-gint ett_opcua_DataTypeAttributes;
-gint ett_opcua_array_DataTypeAttributes;
-gint ett_opcua_ViewAttributes;
-gint ett_opcua_array_ViewAttributes;
-gint ett_opcua_AddNodesItem;
-gint ett_opcua_array_AddNodesItem;
-gint ett_opcua_AddNodesResult;
-gint ett_opcua_array_AddNodesResult;
-gint ett_opcua_AddReferencesItem;
-gint ett_opcua_array_AddReferencesItem;
-gint ett_opcua_DeleteNodesItem;
-gint ett_opcua_array_DeleteNodesItem;
-gint ett_opcua_DeleteReferencesItem;
-gint ett_opcua_array_DeleteReferencesItem;
-gint ett_opcua_ViewDescription;
-gint ett_opcua_array_ViewDescription;
-gint ett_opcua_BrowseDescription;
-gint ett_opcua_array_BrowseDescription;
-gint ett_opcua_ReferenceDescription;
-gint ett_opcua_array_ReferenceDescription;
-gint ett_opcua_BrowseResult;
-gint ett_opcua_array_BrowseResult;
-gint ett_opcua_RelativePathElement;
-gint ett_opcua_array_RelativePathElement;
-gint ett_opcua_RelativePath;
-gint ett_opcua_array_RelativePath;
-gint ett_opcua_BrowsePath;
-gint ett_opcua_array_BrowsePath;
-gint ett_opcua_BrowsePathTarget;
-gint ett_opcua_array_BrowsePathTarget;
-gint ett_opcua_BrowsePathResult;
-gint ett_opcua_array_BrowsePathResult;
-gint ett_opcua_EndpointConfiguration;
-gint ett_opcua_array_EndpointConfiguration;
-gint ett_opcua_SupportedProfile;
-gint ett_opcua_array_SupportedProfile;
-gint ett_opcua_SoftwareCertificate;
-gint ett_opcua_array_SoftwareCertificate;
-gint ett_opcua_QueryDataDescription;
-gint ett_opcua_array_QueryDataDescription;
-gint ett_opcua_NodeTypeDescription;
-gint ett_opcua_array_NodeTypeDescription;
-gint ett_opcua_QueryDataSet;
-gint ett_opcua_array_QueryDataSet;
-gint ett_opcua_NodeReference;
-gint ett_opcua_array_NodeReference;
-gint ett_opcua_ContentFilterElement;
-gint ett_opcua_array_ContentFilterElement;
-gint ett_opcua_ContentFilter;
-gint ett_opcua_array_ContentFilter;
-gint ett_opcua_ElementOperand;
-gint ett_opcua_array_ElementOperand;
-gint ett_opcua_LiteralOperand;
-gint ett_opcua_array_LiteralOperand;
-gint ett_opcua_AttributeOperand;
-gint ett_opcua_array_AttributeOperand;
-gint ett_opcua_SimpleAttributeOperand;
-gint ett_opcua_array_SimpleAttributeOperand;
-gint ett_opcua_ContentFilterElementResult;
-gint ett_opcua_array_ContentFilterElementResult;
-gint ett_opcua_ContentFilterResult;
-gint ett_opcua_array_ContentFilterResult;
-gint ett_opcua_ParsingResult;
-gint ett_opcua_array_ParsingResult;
-gint ett_opcua_ReadValueId;
-gint ett_opcua_array_ReadValueId;
-gint ett_opcua_HistoryReadValueId;
-gint ett_opcua_array_HistoryReadValueId;
-gint ett_opcua_HistoryReadResult;
-gint ett_opcua_array_HistoryReadResult;
-gint ett_opcua_ReadEventDetails;
-gint ett_opcua_array_ReadEventDetails;
-gint ett_opcua_ReadRawModifiedDetails;
-gint ett_opcua_array_ReadRawModifiedDetails;
-gint ett_opcua_ReadProcessedDetails;
-gint ett_opcua_array_ReadProcessedDetails;
-gint ett_opcua_ReadAtTimeDetails;
-gint ett_opcua_array_ReadAtTimeDetails;
-gint ett_opcua_HistoryData;
-gint ett_opcua_array_HistoryData;
-gint ett_opcua_ModificationInfo;
-gint ett_opcua_array_ModificationInfo;
-gint ett_opcua_HistoryModifiedData;
-gint ett_opcua_array_HistoryModifiedData;
-gint ett_opcua_HistoryEvent;
-gint ett_opcua_array_HistoryEvent;
-gint ett_opcua_WriteValue;
-gint ett_opcua_array_WriteValue;
-gint ett_opcua_HistoryUpdateDetails;
-gint ett_opcua_array_HistoryUpdateDetails;
-gint ett_opcua_UpdateDataDetails;
-gint ett_opcua_array_UpdateDataDetails;
-gint ett_opcua_UpdateStructureDataDetails;
-gint ett_opcua_array_UpdateStructureDataDetails;
-gint ett_opcua_UpdateEventDetails;
-gint ett_opcua_array_UpdateEventDetails;
-gint ett_opcua_DeleteRawModifiedDetails;
-gint ett_opcua_array_DeleteRawModifiedDetails;
-gint ett_opcua_DeleteAtTimeDetails;
-gint ett_opcua_array_DeleteAtTimeDetails;
-gint ett_opcua_DeleteEventDetails;
-gint ett_opcua_array_DeleteEventDetails;
-gint ett_opcua_HistoryUpdateResult;
-gint ett_opcua_array_HistoryUpdateResult;
-gint ett_opcua_CallMethodRequest;
-gint ett_opcua_array_CallMethodRequest;
-gint ett_opcua_CallMethodResult;
-gint ett_opcua_array_CallMethodResult;
-gint ett_opcua_DataChangeFilter;
-gint ett_opcua_array_DataChangeFilter;
-gint ett_opcua_EventFilter;
-gint ett_opcua_array_EventFilter;
-gint ett_opcua_AggregateConfiguration;
-gint ett_opcua_array_AggregateConfiguration;
-gint ett_opcua_AggregateFilter;
-gint ett_opcua_array_AggregateFilter;
-gint ett_opcua_EventFilterResult;
-gint ett_opcua_array_EventFilterResult;
-gint ett_opcua_AggregateFilterResult;
-gint ett_opcua_array_AggregateFilterResult;
-gint ett_opcua_MonitoringParameters;
-gint ett_opcua_array_MonitoringParameters;
-gint ett_opcua_MonitoredItemCreateRequest;
-gint ett_opcua_array_MonitoredItemCreateRequest;
-gint ett_opcua_MonitoredItemCreateResult;
-gint ett_opcua_array_MonitoredItemCreateResult;
-gint ett_opcua_MonitoredItemModifyRequest;
-gint ett_opcua_array_MonitoredItemModifyRequest;
-gint ett_opcua_MonitoredItemModifyResult;
-gint ett_opcua_array_MonitoredItemModifyResult;
-gint ett_opcua_NotificationMessage;
-gint ett_opcua_array_NotificationMessage;
-gint ett_opcua_DataChangeNotification;
-gint ett_opcua_array_DataChangeNotification;
-gint ett_opcua_MonitoredItemNotification;
-gint ett_opcua_array_MonitoredItemNotification;
-gint ett_opcua_EventNotificationList;
-gint ett_opcua_array_EventNotificationList;
-gint ett_opcua_EventFieldList;
-gint ett_opcua_array_EventFieldList;
-gint ett_opcua_HistoryEventFieldList;
-gint ett_opcua_array_HistoryEventFieldList;
-gint ett_opcua_StatusChangeNotification;
-gint ett_opcua_array_StatusChangeNotification;
-gint ett_opcua_SubscriptionAcknowledgement;
-gint ett_opcua_array_SubscriptionAcknowledgement;
-gint ett_opcua_TransferResult;
-gint ett_opcua_array_TransferResult;
-gint ett_opcua_ScalarTestType;
-gint ett_opcua_array_ScalarTestType;
-gint ett_opcua_ArrayTestType;
-gint ett_opcua_array_ArrayTestType;
-gint ett_opcua_CompositeTestType;
-gint ett_opcua_array_CompositeTestType;
-gint ett_opcua_BuildInfo;
-gint ett_opcua_array_BuildInfo;
-gint ett_opcua_RedundantServerDataType;
-gint ett_opcua_array_RedundantServerDataType;
-gint ett_opcua_EndpointUrlListDataType;
-gint ett_opcua_array_EndpointUrlListDataType;
-gint ett_opcua_NetworkGroupDataType;
-gint ett_opcua_array_NetworkGroupDataType;
-gint ett_opcua_SamplingIntervalDiagnosticsDataType;
-gint ett_opcua_array_SamplingIntervalDiagnosticsDataType;
-gint ett_opcua_ServerDiagnosticsSummaryDataType;
-gint ett_opcua_array_ServerDiagnosticsSummaryDataType;
-gint ett_opcua_ServerStatusDataType;
-gint ett_opcua_array_ServerStatusDataType;
-gint ett_opcua_SessionDiagnosticsDataType;
-gint ett_opcua_array_SessionDiagnosticsDataType;
-gint ett_opcua_SessionSecurityDiagnosticsDataType;
-gint ett_opcua_array_SessionSecurityDiagnosticsDataType;
-gint ett_opcua_ServiceCounterDataType;
-gint ett_opcua_array_ServiceCounterDataType;
-gint ett_opcua_StatusResult;
-gint ett_opcua_array_StatusResult;
-gint ett_opcua_SubscriptionDiagnosticsDataType;
-gint ett_opcua_array_SubscriptionDiagnosticsDataType;
-gint ett_opcua_ModelChangeStructureDataType;
-gint ett_opcua_array_ModelChangeStructureDataType;
-gint ett_opcua_SemanticChangeStructureDataType;
-gint ett_opcua_array_SemanticChangeStructureDataType;
-gint ett_opcua_Range;
-gint ett_opcua_array_Range;
-gint ett_opcua_EUInformation;
-gint ett_opcua_array_EUInformation;
-gint ett_opcua_ComplexNumberType;
-gint ett_opcua_array_ComplexNumberType;
-gint ett_opcua_DoubleComplexNumberType;
-gint ett_opcua_array_DoubleComplexNumberType;
-gint ett_opcua_AxisInformation;
-gint ett_opcua_array_AxisInformation;
-gint ett_opcua_XVType;
-gint ett_opcua_array_XVType;
-gint ett_opcua_ProgramDiagnosticDataType;
-gint ett_opcua_array_ProgramDiagnosticDataType;
-gint ett_opcua_Annotation;
-gint ett_opcua_array_Annotation;
+int ett_opcua_TrustListDataType;
+int ett_opcua_array_TrustListDataType;
+int ett_opcua_Node;
+int ett_opcua_array_Node;
+int ett_opcua_InstanceNode;
+int ett_opcua_array_InstanceNode;
+int ett_opcua_TypeNode;
+int ett_opcua_array_TypeNode;
+int ett_opcua_ObjectNode;
+int ett_opcua_array_ObjectNode;
+int ett_opcua_ObjectTypeNode;
+int ett_opcua_array_ObjectTypeNode;
+int ett_opcua_VariableNode;
+int ett_opcua_array_VariableNode;
+int ett_opcua_VariableTypeNode;
+int ett_opcua_array_VariableTypeNode;
+int ett_opcua_ReferenceTypeNode;
+int ett_opcua_array_ReferenceTypeNode;
+int ett_opcua_MethodNode;
+int ett_opcua_array_MethodNode;
+int ett_opcua_ViewNode;
+int ett_opcua_array_ViewNode;
+int ett_opcua_DataTypeNode;
+int ett_opcua_array_DataTypeNode;
+int ett_opcua_ReferenceNode;
+int ett_opcua_array_ReferenceNode;
+int ett_opcua_Argument;
+int ett_opcua_array_Argument;
+int ett_opcua_EnumValueType;
+int ett_opcua_array_EnumValueType;
+int ett_opcua_OptionSet;
+int ett_opcua_array_OptionSet;
+int ett_opcua_TimeZoneDataType;
+int ett_opcua_array_TimeZoneDataType;
+int ett_opcua_ApplicationDescription;
+int ett_opcua_array_ApplicationDescription;
+int ett_opcua_RequestHeader;
+int ett_opcua_array_RequestHeader;
+int ett_opcua_ResponseHeader;
+int ett_opcua_array_ResponseHeader;
+int ett_opcua_ServerOnNetwork;
+int ett_opcua_array_ServerOnNetwork;
+int ett_opcua_UserTokenPolicy;
+int ett_opcua_array_UserTokenPolicy;
+int ett_opcua_EndpointDescription;
+int ett_opcua_array_EndpointDescription;
+int ett_opcua_RegisteredServer;
+int ett_opcua_array_RegisteredServer;
+int ett_opcua_MdnsDiscoveryConfiguration;
+int ett_opcua_array_MdnsDiscoveryConfiguration;
+int ett_opcua_ChannelSecurityToken;
+int ett_opcua_array_ChannelSecurityToken;
+int ett_opcua_SignedSoftwareCertificate;
+int ett_opcua_array_SignedSoftwareCertificate;
+int ett_opcua_SignatureData;
+int ett_opcua_array_SignatureData;
+int ett_opcua_UserIdentityToken;
+int ett_opcua_array_UserIdentityToken;
+int ett_opcua_AnonymousIdentityToken;
+int ett_opcua_array_AnonymousIdentityToken;
+int ett_opcua_UserNameIdentityToken;
+int ett_opcua_array_UserNameIdentityToken;
+int ett_opcua_X509IdentityToken;
+int ett_opcua_array_X509IdentityToken;
+int ett_opcua_KerberosIdentityToken;
+int ett_opcua_array_KerberosIdentityToken;
+int ett_opcua_IssuedIdentityToken;
+int ett_opcua_array_IssuedIdentityToken;
+int ett_opcua_NodeAttributes;
+int ett_opcua_array_NodeAttributes;
+int ett_opcua_ObjectAttributes;
+int ett_opcua_array_ObjectAttributes;
+int ett_opcua_VariableAttributes;
+int ett_opcua_array_VariableAttributes;
+int ett_opcua_MethodAttributes;
+int ett_opcua_array_MethodAttributes;
+int ett_opcua_ObjectTypeAttributes;
+int ett_opcua_array_ObjectTypeAttributes;
+int ett_opcua_VariableTypeAttributes;
+int ett_opcua_array_VariableTypeAttributes;
+int ett_opcua_ReferenceTypeAttributes;
+int ett_opcua_array_ReferenceTypeAttributes;
+int ett_opcua_DataTypeAttributes;
+int ett_opcua_array_DataTypeAttributes;
+int ett_opcua_ViewAttributes;
+int ett_opcua_array_ViewAttributes;
+int ett_opcua_AddNodesItem;
+int ett_opcua_array_AddNodesItem;
+int ett_opcua_AddNodesResult;
+int ett_opcua_array_AddNodesResult;
+int ett_opcua_AddReferencesItem;
+int ett_opcua_array_AddReferencesItem;
+int ett_opcua_DeleteNodesItem;
+int ett_opcua_array_DeleteNodesItem;
+int ett_opcua_DeleteReferencesItem;
+int ett_opcua_array_DeleteReferencesItem;
+int ett_opcua_ViewDescription;
+int ett_opcua_array_ViewDescription;
+int ett_opcua_BrowseDescription;
+int ett_opcua_array_BrowseDescription;
+int ett_opcua_ReferenceDescription;
+int ett_opcua_array_ReferenceDescription;
+int ett_opcua_BrowseResult;
+int ett_opcua_array_BrowseResult;
+int ett_opcua_RelativePathElement;
+int ett_opcua_array_RelativePathElement;
+int ett_opcua_RelativePath;
+int ett_opcua_array_RelativePath;
+int ett_opcua_BrowsePath;
+int ett_opcua_array_BrowsePath;
+int ett_opcua_BrowsePathTarget;
+int ett_opcua_array_BrowsePathTarget;
+int ett_opcua_BrowsePathResult;
+int ett_opcua_array_BrowsePathResult;
+int ett_opcua_EndpointConfiguration;
+int ett_opcua_array_EndpointConfiguration;
+int ett_opcua_SupportedProfile;
+int ett_opcua_array_SupportedProfile;
+int ett_opcua_SoftwareCertificate;
+int ett_opcua_array_SoftwareCertificate;
+int ett_opcua_QueryDataDescription;
+int ett_opcua_array_QueryDataDescription;
+int ett_opcua_NodeTypeDescription;
+int ett_opcua_array_NodeTypeDescription;
+int ett_opcua_QueryDataSet;
+int ett_opcua_array_QueryDataSet;
+int ett_opcua_NodeReference;
+int ett_opcua_array_NodeReference;
+int ett_opcua_ContentFilterElement;
+int ett_opcua_array_ContentFilterElement;
+int ett_opcua_ContentFilter;
+int ett_opcua_array_ContentFilter;
+int ett_opcua_ElementOperand;
+int ett_opcua_array_ElementOperand;
+int ett_opcua_LiteralOperand;
+int ett_opcua_array_LiteralOperand;
+int ett_opcua_AttributeOperand;
+int ett_opcua_array_AttributeOperand;
+int ett_opcua_SimpleAttributeOperand;
+int ett_opcua_array_SimpleAttributeOperand;
+int ett_opcua_ContentFilterElementResult;
+int ett_opcua_array_ContentFilterElementResult;
+int ett_opcua_ContentFilterResult;
+int ett_opcua_array_ContentFilterResult;
+int ett_opcua_ParsingResult;
+int ett_opcua_array_ParsingResult;
+int ett_opcua_ReadValueId;
+int ett_opcua_array_ReadValueId;
+int ett_opcua_HistoryReadValueId;
+int ett_opcua_array_HistoryReadValueId;
+int ett_opcua_HistoryReadResult;
+int ett_opcua_array_HistoryReadResult;
+int ett_opcua_ReadEventDetails;
+int ett_opcua_array_ReadEventDetails;
+int ett_opcua_ReadRawModifiedDetails;
+int ett_opcua_array_ReadRawModifiedDetails;
+int ett_opcua_ReadProcessedDetails;
+int ett_opcua_array_ReadProcessedDetails;
+int ett_opcua_ReadAtTimeDetails;
+int ett_opcua_array_ReadAtTimeDetails;
+int ett_opcua_HistoryData;
+int ett_opcua_array_HistoryData;
+int ett_opcua_ModificationInfo;
+int ett_opcua_array_ModificationInfo;
+int ett_opcua_HistoryModifiedData;
+int ett_opcua_array_HistoryModifiedData;
+int ett_opcua_HistoryEvent;
+int ett_opcua_array_HistoryEvent;
+int ett_opcua_WriteValue;
+int ett_opcua_array_WriteValue;
+int ett_opcua_HistoryUpdateDetails;
+int ett_opcua_array_HistoryUpdateDetails;
+int ett_opcua_UpdateDataDetails;
+int ett_opcua_array_UpdateDataDetails;
+int ett_opcua_UpdateStructureDataDetails;
+int ett_opcua_array_UpdateStructureDataDetails;
+int ett_opcua_UpdateEventDetails;
+int ett_opcua_array_UpdateEventDetails;
+int ett_opcua_DeleteRawModifiedDetails;
+int ett_opcua_array_DeleteRawModifiedDetails;
+int ett_opcua_DeleteAtTimeDetails;
+int ett_opcua_array_DeleteAtTimeDetails;
+int ett_opcua_DeleteEventDetails;
+int ett_opcua_array_DeleteEventDetails;
+int ett_opcua_HistoryUpdateResult;
+int ett_opcua_array_HistoryUpdateResult;
+int ett_opcua_CallMethodRequest;
+int ett_opcua_array_CallMethodRequest;
+int ett_opcua_CallMethodResult;
+int ett_opcua_array_CallMethodResult;
+int ett_opcua_DataChangeFilter;
+int ett_opcua_array_DataChangeFilter;
+int ett_opcua_EventFilter;
+int ett_opcua_array_EventFilter;
+int ett_opcua_AggregateConfiguration;
+int ett_opcua_array_AggregateConfiguration;
+int ett_opcua_AggregateFilter;
+int ett_opcua_array_AggregateFilter;
+int ett_opcua_EventFilterResult;
+int ett_opcua_array_EventFilterResult;
+int ett_opcua_AggregateFilterResult;
+int ett_opcua_array_AggregateFilterResult;
+int ett_opcua_MonitoringParameters;
+int ett_opcua_array_MonitoringParameters;
+int ett_opcua_MonitoredItemCreateRequest;
+int ett_opcua_array_MonitoredItemCreateRequest;
+int ett_opcua_MonitoredItemCreateResult;
+int ett_opcua_array_MonitoredItemCreateResult;
+int ett_opcua_MonitoredItemModifyRequest;
+int ett_opcua_array_MonitoredItemModifyRequest;
+int ett_opcua_MonitoredItemModifyResult;
+int ett_opcua_array_MonitoredItemModifyResult;
+int ett_opcua_NotificationMessage;
+int ett_opcua_array_NotificationMessage;
+int ett_opcua_DataChangeNotification;
+int ett_opcua_array_DataChangeNotification;
+int ett_opcua_MonitoredItemNotification;
+int ett_opcua_array_MonitoredItemNotification;
+int ett_opcua_EventNotificationList;
+int ett_opcua_array_EventNotificationList;
+int ett_opcua_EventFieldList;
+int ett_opcua_array_EventFieldList;
+int ett_opcua_HistoryEventFieldList;
+int ett_opcua_array_HistoryEventFieldList;
+int ett_opcua_StatusChangeNotification;
+int ett_opcua_array_StatusChangeNotification;
+int ett_opcua_SubscriptionAcknowledgement;
+int ett_opcua_array_SubscriptionAcknowledgement;
+int ett_opcua_TransferResult;
+int ett_opcua_array_TransferResult;
+int ett_opcua_ScalarTestType;
+int ett_opcua_array_ScalarTestType;
+int ett_opcua_ArrayTestType;
+int ett_opcua_array_ArrayTestType;
+int ett_opcua_CompositeTestType;
+int ett_opcua_array_CompositeTestType;
+int ett_opcua_BuildInfo;
+int ett_opcua_array_BuildInfo;
+int ett_opcua_RedundantServerDataType;
+int ett_opcua_array_RedundantServerDataType;
+int ett_opcua_EndpointUrlListDataType;
+int ett_opcua_array_EndpointUrlListDataType;
+int ett_opcua_NetworkGroupDataType;
+int ett_opcua_array_NetworkGroupDataType;
+int ett_opcua_SamplingIntervalDiagnosticsDataType;
+int ett_opcua_array_SamplingIntervalDiagnosticsDataType;
+int ett_opcua_ServerDiagnosticsSummaryDataType;
+int ett_opcua_array_ServerDiagnosticsSummaryDataType;
+int ett_opcua_ServerStatusDataType;
+int ett_opcua_array_ServerStatusDataType;
+int ett_opcua_SessionDiagnosticsDataType;
+int ett_opcua_array_SessionDiagnosticsDataType;
+int ett_opcua_SessionSecurityDiagnosticsDataType;
+int ett_opcua_array_SessionSecurityDiagnosticsDataType;
+int ett_opcua_ServiceCounterDataType;
+int ett_opcua_array_ServiceCounterDataType;
+int ett_opcua_StatusResult;
+int ett_opcua_array_StatusResult;
+int ett_opcua_SubscriptionDiagnosticsDataType;
+int ett_opcua_array_SubscriptionDiagnosticsDataType;
+int ett_opcua_ModelChangeStructureDataType;
+int ett_opcua_array_ModelChangeStructureDataType;
+int ett_opcua_SemanticChangeStructureDataType;
+int ett_opcua_array_SemanticChangeStructureDataType;
+int ett_opcua_Range;
+int ett_opcua_array_Range;
+int ett_opcua_EUInformation;
+int ett_opcua_array_EUInformation;
+int ett_opcua_ComplexNumberType;
+int ett_opcua_array_ComplexNumberType;
+int ett_opcua_DoubleComplexNumberType;
+int ett_opcua_array_DoubleComplexNumberType;
+int ett_opcua_AxisInformation;
+int ett_opcua_array_AxisInformation;
+int ett_opcua_XVType;
+int ett_opcua_array_XVType;
+int ett_opcua_ProgramDiagnosticDataType;
+int ett_opcua_array_ProgramDiagnosticDataType;
+int ett_opcua_Annotation;
+int ett_opcua_array_Annotation;
-void parseTrustListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseTrustListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_TrustListDataType, &ti, "%s: TrustListDataType", szFieldName);
@@ -320,7 +320,7 @@ void parseTrustListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArraySimple(subtree, tvb, pinfo, pOffset, "IssuerCrls", "ByteString", hf_opcua_IssuerCrls, parseByteString, ett_opcua_array_ByteString);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_Node, &ti, "%s: Node", szFieldName);
@@ -335,7 +335,7 @@ void parseNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffse
parseArrayComplex(subtree, tvb, pinfo, pOffset, "References", "ReferenceNode", parseReferenceNode, ett_opcua_array_ReferenceNode);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseInstanceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseInstanceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_InstanceNode, &ti, "%s: InstanceNode", szFieldName);
@@ -350,7 +350,7 @@ void parseInstanceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "References", "ReferenceNode", parseReferenceNode, ett_opcua_array_ReferenceNode);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_TypeNode, &ti, "%s: TypeNode", szFieldName);
@@ -365,7 +365,7 @@ void parseTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pO
parseArrayComplex(subtree, tvb, pinfo, pOffset, "References", "ReferenceNode", parseReferenceNode, ett_opcua_array_ReferenceNode);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseObjectNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseObjectNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ObjectNode, &ti, "%s: ObjectNode", szFieldName);
@@ -381,7 +381,7 @@ void parseObjectNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *
parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_EventNotifier);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseObjectTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseObjectTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ObjectTypeNode, &ti, "%s: ObjectTypeNode", szFieldName);
@@ -397,7 +397,7 @@ void parseObjectTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_IsAbstract);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseVariableNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseVariableNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_VariableNode, &ti, "%s: VariableNode", szFieldName);
@@ -421,7 +421,7 @@ void parseVariableNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_Historizing);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseVariableTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseVariableTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_VariableTypeNode, &ti, "%s: VariableTypeNode", szFieldName);
@@ -442,7 +442,7 @@ void parseVariableTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_IsAbstract);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReferenceTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReferenceTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReferenceTypeNode, &ti, "%s: ReferenceTypeNode", szFieldName);
@@ -460,7 +460,7 @@ void parseReferenceTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseLocalizedText(subtree, tvb, pinfo, pOffset, "InverseName");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMethodNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMethodNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MethodNode, &ti, "%s: MethodNode", szFieldName);
@@ -477,7 +477,7 @@ void parseMethodNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_UserExecutable);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseViewNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseViewNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ViewNode, &ti, "%s: ViewNode", szFieldName);
@@ -494,7 +494,7 @@ void parseViewNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pO
parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_EventNotifier);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDataTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDataTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DataTypeNode, &ti, "%s: DataTypeNode", szFieldName);
@@ -510,7 +510,7 @@ void parseDataTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_IsAbstract);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReferenceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReferenceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReferenceNode, &ti, "%s: ReferenceNode", szFieldName);
@@ -519,7 +519,7 @@ void parseReferenceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseExpandedNodeId(subtree, tvb, pinfo, pOffset, "TargetId");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseArgument(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseArgument(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_Argument, &ti, "%s: Argument", szFieldName);
@@ -531,7 +531,7 @@ void parseArgument(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pO
parseLocalizedText(subtree, tvb, pinfo, pOffset, "Description");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEnumValueType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEnumValueType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EnumValueType, &ti, "%s: EnumValueType", szFieldName);
@@ -540,7 +540,7 @@ void parseEnumValueType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseLocalizedText(subtree, tvb, pinfo, pOffset, "Description");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseOptionSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseOptionSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_OptionSet, &ti, "%s: OptionSet", szFieldName);
@@ -548,7 +548,7 @@ void parseOptionSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *p
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ValidBits);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTimeZoneDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseTimeZoneDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_TimeZoneDataType, &ti, "%s: TimeZoneDataType", szFieldName);
@@ -556,7 +556,7 @@ void parseTimeZoneDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_DaylightSavingInOffset);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseApplicationDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseApplicationDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ApplicationDescription, &ti, "%s: ApplicationDescription", szFieldName);
@@ -570,7 +570,7 @@ void parseApplicationDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseArraySimple(subtree, tvb, pinfo, pOffset, "DiscoveryUrls", "String", hf_opcua_DiscoveryUrls, parseString, ett_opcua_array_String);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRequestHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseRequestHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
static int * const returnDiagnostics_mask[] = {
&hf_opcua_returnDiag_mask_sl_symbolicId,
@@ -596,7 +596,7 @@ void parseRequestHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseExtensionObject(subtree, tvb, pinfo, pOffset, "AdditionalHeader");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseResponseHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseResponseHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ResponseHeader, &ti, "%s: ResponseHeader", szFieldName);
@@ -609,7 +609,7 @@ void parseResponseHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseExtensionObject(subtree, tvb, pinfo, pOffset, "AdditionalHeader");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseServerOnNetwork(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseServerOnNetwork(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ServerOnNetwork, &ti, "%s: ServerOnNetwork", szFieldName);
@@ -620,7 +620,7 @@ void parseServerOnNetwork(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseArraySimple(subtree, tvb, pinfo, pOffset, "ServerCapabilities", "String", hf_opcua_ServerCapabilities, parseString, ett_opcua_array_String);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_UserTokenPolicy, &ti, "%s: UserTokenPolicy", szFieldName);
@@ -631,7 +631,7 @@ void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_SecurityPolicyUri);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEndpointDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEndpointDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EndpointDescription, &ti, "%s: EndpointDescription", szFieldName);
@@ -646,7 +646,7 @@ void parseEndpointDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_SecurityLevel);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRegisteredServer(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseRegisteredServer(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_RegisteredServer, &ti, "%s: RegisteredServer", szFieldName);
@@ -662,7 +662,7 @@ void parseRegisteredServer(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_IsOnline);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMdnsDiscoveryConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMdnsDiscoveryConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MdnsDiscoveryConfiguration, &ti, "%s: MdnsDiscoveryConfiguration", szFieldName);
@@ -671,7 +671,7 @@ void parseMdnsDiscoveryConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseArraySimple(subtree, tvb, pinfo, pOffset, "ServerCapabilities", "String", hf_opcua_ServerCapabilities, parseString, ett_opcua_array_String);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseChannelSecurityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseChannelSecurityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ChannelSecurityToken, &ti, "%s: ChannelSecurityToken", szFieldName);
@@ -681,7 +681,7 @@ void parseChannelSecurityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedLifetime);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSignedSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSignedSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SignedSoftwareCertificate, &ti, "%s: SignedSoftwareCertificate", szFieldName);
@@ -689,7 +689,7 @@ void parseSignedSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_Signature);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSignatureData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSignatureData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SignatureData, &ti, "%s: SignatureData", szFieldName);
@@ -697,21 +697,21 @@ void parseSignatureData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_Signature);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseUserIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseUserIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_UserIdentityToken, &ti, "%s: UserIdentityToken", szFieldName);
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_PolicyId);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAnonymousIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAnonymousIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AnonymousIdentityToken, &ti, "%s: AnonymousIdentityToken", szFieldName);
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_PolicyId);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseUserNameIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseUserNameIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_UserNameIdentityToken, &ti, "%s: UserNameIdentityToken", szFieldName);
@@ -721,7 +721,7 @@ void parseUserNameIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_EncryptionAlgorithm);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseX509IdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseX509IdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_X509IdentityToken, &ti, "%s: X509IdentityToken", szFieldName);
@@ -729,7 +729,7 @@ void parseX509IdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_CertificateData);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseKerberosIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseKerberosIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_KerberosIdentityToken, &ti, "%s: KerberosIdentityToken", szFieldName);
@@ -737,7 +737,7 @@ void parseKerberosIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_TicketData);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseIssuedIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseIssuedIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_IssuedIdentityToken, &ti, "%s: IssuedIdentityToken", szFieldName);
@@ -746,7 +746,7 @@ void parseIssuedIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_EncryptionAlgorithm);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseNodeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseNodeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_NodeAttributes, &ti, "%s: NodeAttributes", szFieldName);
@@ -757,7 +757,7 @@ void parseNodeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_UserWriteMask);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseObjectAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseObjectAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ObjectAttributes, &ti, "%s: ObjectAttributes", szFieldName);
@@ -769,7 +769,7 @@ void parseObjectAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_EventNotifier);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseVariableAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseVariableAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_VariableAttributes, &ti, "%s: VariableAttributes", szFieldName);
@@ -789,7 +789,7 @@ void parseVariableAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_Historizing);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMethodAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMethodAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MethodAttributes, &ti, "%s: MethodAttributes", szFieldName);
@@ -802,7 +802,7 @@ void parseMethodAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_UserExecutable);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseObjectTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseObjectTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ObjectTypeAttributes, &ti, "%s: ObjectTypeAttributes", szFieldName);
@@ -814,7 +814,7 @@ void parseObjectTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_IsAbstract);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseVariableTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseVariableTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_VariableTypeAttributes, &ti, "%s: VariableTypeAttributes", szFieldName);
@@ -831,7 +831,7 @@ void parseVariableTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_IsAbstract);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReferenceTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReferenceTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReferenceTypeAttributes, &ti, "%s: ReferenceTypeAttributes", szFieldName);
@@ -845,7 +845,7 @@ void parseReferenceTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *
parseLocalizedText(subtree, tvb, pinfo, pOffset, "InverseName");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDataTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDataTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DataTypeAttributes, &ti, "%s: DataTypeAttributes", szFieldName);
@@ -857,7 +857,7 @@ void parseDataTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_IsAbstract);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseViewAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseViewAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ViewAttributes, &ti, "%s: ViewAttributes", szFieldName);
@@ -870,7 +870,7 @@ void parseViewAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_EventNotifier);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAddNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAddNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AddNodesItem, &ti, "%s: AddNodesItem", szFieldName);
@@ -883,7 +883,7 @@ void parseAddNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseExpandedNodeId(subtree, tvb, pinfo, pOffset, "TypeDefinition");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAddNodesResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAddNodesResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AddNodesResult, &ti, "%s: AddNodesResult", szFieldName);
@@ -891,7 +891,7 @@ void parseAddNodesResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseNodeId(subtree, tvb, pinfo, pOffset, "AddedNodeId");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAddReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAddReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AddReferencesItem, &ti, "%s: AddReferencesItem", szFieldName);
@@ -903,7 +903,7 @@ void parseAddReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseNodeClass(subtree, tvb, pinfo, pOffset);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDeleteNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DeleteNodesItem, &ti, "%s: DeleteNodesItem", szFieldName);
@@ -911,7 +911,7 @@ void parseDeleteNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_DeleteTargetReferences);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDeleteReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DeleteReferencesItem, &ti, "%s: DeleteReferencesItem", szFieldName);
@@ -922,7 +922,7 @@ void parseDeleteReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_DeleteBidirectional);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseViewDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseViewDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ViewDescription, &ti, "%s: ViewDescription", szFieldName);
@@ -931,7 +931,7 @@ void parseViewDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_ViewVersion);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowseDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseBrowseDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_BrowseDescription, &ti, "%s: BrowseDescription", szFieldName);
@@ -943,7 +943,7 @@ void parseBrowseDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseResultMask(subtree, tvb, pinfo, pOffset);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReferenceDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReferenceDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReferenceDescription, &ti, "%s: ReferenceDescription", szFieldName);
@@ -956,7 +956,7 @@ void parseReferenceDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseExpandedNodeId(subtree, tvb, pinfo, pOffset, "TypeDefinition");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowseResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseBrowseResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_BrowseResult, &ti, "%s: BrowseResult", szFieldName);
@@ -966,7 +966,7 @@ void parseBrowseResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "References", "ReferenceDescription", parseReferenceDescription, ett_opcua_array_ReferenceDescription);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRelativePathElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseRelativePathElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_RelativePathElement, &ti, "%s: RelativePathElement", szFieldName);
@@ -976,7 +976,7 @@ void parseRelativePathElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseQualifiedName(subtree, tvb, pinfo, pOffset, "TargetName");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRelativePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseRelativePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_RelativePath, &ti, "%s: RelativePath", szFieldName);
@@ -984,7 +984,7 @@ void parseRelativePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Elements", "RelativePathElement", parseRelativePathElement, ett_opcua_array_RelativePathElement);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowsePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseBrowsePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_BrowsePath, &ti, "%s: BrowsePath", szFieldName);
@@ -992,7 +992,7 @@ void parseBrowsePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *
parseRelativePath(subtree, tvb, pinfo, pOffset, "RelativePath");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowsePathTarget(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseBrowsePathTarget(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_BrowsePathTarget, &ti, "%s: BrowsePathTarget", szFieldName);
@@ -1000,7 +1000,7 @@ void parseBrowsePathTarget(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RemainingPathIndex);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowsePathResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseBrowsePathResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_BrowsePathResult, &ti, "%s: BrowsePathResult", szFieldName);
@@ -1009,7 +1009,7 @@ void parseBrowsePathResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Targets", "BrowsePathTarget", parseBrowsePathTarget, ett_opcua_array_BrowsePathTarget);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEndpointConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEndpointConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EndpointConfiguration, &ti, "%s: EndpointConfiguration", szFieldName);
@@ -1024,7 +1024,7 @@ void parseEndpointConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SecurityTokenLifetime);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSupportedProfile(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSupportedProfile(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SupportedProfile, &ti, "%s: SupportedProfile", szFieldName);
@@ -1037,7 +1037,7 @@ void parseSupportedProfile(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArraySimple(subtree, tvb, pinfo, pOffset, "UnsupportedUnitIds", "String", hf_opcua_UnsupportedUnitIds, parseString, ett_opcua_array_String);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SoftwareCertificate, &ti, "%s: SoftwareCertificate", szFieldName);
@@ -1054,7 +1054,7 @@ void parseSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "SupportedProfiles", "SupportedProfile", parseSupportedProfile, ett_opcua_array_SupportedProfile);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseQueryDataDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseQueryDataDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_QueryDataDescription, &ti, "%s: QueryDataDescription", szFieldName);
@@ -1063,7 +1063,7 @@ void parseQueryDataDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_IndexRange);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseNodeTypeDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseNodeTypeDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_NodeTypeDescription, &ti, "%s: NodeTypeDescription", szFieldName);
@@ -1073,7 +1073,7 @@ void parseNodeTypeDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DataToReturn", "QueryDataDescription", parseQueryDataDescription, ett_opcua_array_QueryDataDescription);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseQueryDataSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseQueryDataSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_QueryDataSet, &ti, "%s: QueryDataSet", szFieldName);
@@ -1083,7 +1083,7 @@ void parseQueryDataSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Values", "Variant", parseVariant, ett_opcua_array_Variant);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseNodeReference(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseNodeReference(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_NodeReference, &ti, "%s: NodeReference", szFieldName);
@@ -1094,7 +1094,7 @@ void parseNodeReference(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "ReferencedNodeIds", "NodeId", parseNodeId, ett_opcua_array_NodeId);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseContentFilterElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseContentFilterElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ContentFilterElement, &ti, "%s: ContentFilterElement", szFieldName);
@@ -1103,7 +1103,7 @@ void parseContentFilterElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "FilterOperands", "ExtensionObject", parseExtensionObject, ett_opcua_array_ExtensionObject);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseContentFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseContentFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ContentFilter, &ti, "%s: ContentFilter", szFieldName);
@@ -1111,21 +1111,21 @@ void parseContentFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Elements", "ContentFilterElement", parseContentFilterElement, ett_opcua_array_ContentFilterElement);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseElementOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseElementOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ElementOperand, &ti, "%s: ElementOperand", szFieldName);
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_Index);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseLiteralOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseLiteralOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_LiteralOperand, &ti, "%s: LiteralOperand", szFieldName);
parseVariant(subtree, tvb, pinfo, pOffset, "Value");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AttributeOperand, &ti, "%s: AttributeOperand", szFieldName);
@@ -1136,7 +1136,7 @@ void parseAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_IndexRange);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSimpleAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSimpleAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SimpleAttributeOperand, &ti, "%s: SimpleAttributeOperand", szFieldName);
@@ -1147,7 +1147,7 @@ void parseSimpleAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_IndexRange);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseContentFilterElementResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseContentFilterElementResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ContentFilterElementResult, &ti, "%s: ContentFilterElementResult", szFieldName);
@@ -1158,7 +1158,7 @@ void parseContentFilterElementResult(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "OperandDiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseContentFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseContentFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ContentFilterResult, &ti, "%s: ContentFilterResult", szFieldName);
@@ -1168,7 +1168,7 @@ void parseContentFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "ElementDiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseParsingResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseParsingResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ParsingResult, &ti, "%s: ParsingResult", szFieldName);
@@ -1179,7 +1179,7 @@ void parseParsingResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DataDiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReadValueId, &ti, "%s: ReadValueId", szFieldName);
@@ -1189,7 +1189,7 @@ void parseReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseQualifiedName(subtree, tvb, pinfo, pOffset, "DataEncoding");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseHistoryReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_HistoryReadValueId, &ti, "%s: HistoryReadValueId", szFieldName);
@@ -1199,7 +1199,7 @@ void parseHistoryReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ContinuationPoint);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryReadResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseHistoryReadResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_HistoryReadResult, &ti, "%s: HistoryReadResult", szFieldName);
@@ -1208,7 +1208,7 @@ void parseHistoryReadResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseExtensionObject(subtree, tvb, pinfo, pOffset, "HistoryData");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReadEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReadEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReadEventDetails, &ti, "%s: ReadEventDetails", szFieldName);
@@ -1218,7 +1218,7 @@ void parseReadEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseEventFilter(subtree, tvb, pinfo, pOffset, "Filter");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReadRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReadRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReadRawModifiedDetails, &ti, "%s: ReadRawModifiedDetails", szFieldName);
@@ -1229,7 +1229,7 @@ void parseReadRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_ReturnBounds);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReadProcessedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReadProcessedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReadProcessedDetails, &ti, "%s: ReadProcessedDetails", szFieldName);
@@ -1241,7 +1241,7 @@ void parseReadProcessedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseAggregateConfiguration(subtree, tvb, pinfo, pOffset, "AggregateConfiguration");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReadAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseReadAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ReadAtTimeDetails, &ti, "%s: ReadAtTimeDetails", szFieldName);
@@ -1250,7 +1250,7 @@ void parseReadAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_UseSimpleBounds);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseHistoryData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_HistoryData, &ti, "%s: HistoryData", szFieldName);
@@ -1258,7 +1258,7 @@ void parseHistoryData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DataValues", "DataValue", parseDataValue, ett_opcua_array_DataValue);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseModificationInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseModificationInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ModificationInfo, &ti, "%s: ModificationInfo", szFieldName);
@@ -1267,7 +1267,7 @@ void parseModificationInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_UserName);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryModifiedData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseHistoryModifiedData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_HistoryModifiedData, &ti, "%s: HistoryModifiedData", szFieldName);
@@ -1277,7 +1277,7 @@ void parseHistoryModifiedData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "ModificationInfos", "ModificationInfo", parseModificationInfo, ett_opcua_array_ModificationInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryEvent(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseHistoryEvent(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_HistoryEvent, &ti, "%s: HistoryEvent", szFieldName);
@@ -1285,7 +1285,7 @@ void parseHistoryEvent(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Events", "HistoryEventFieldList", parseHistoryEventFieldList, ett_opcua_array_HistoryEventFieldList);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseWriteValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseWriteValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_WriteValue, &ti, "%s: WriteValue", szFieldName);
@@ -1295,14 +1295,14 @@ void parseWriteValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *
parseDataValue(subtree, tvb, pinfo, pOffset, "Value");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryUpdateDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseHistoryUpdateDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_HistoryUpdateDetails, &ti, "%s: HistoryUpdateDetails", szFieldName);
parseNodeId(subtree, tvb, pinfo, pOffset, "NodeId");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseUpdateDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseUpdateDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_UpdateDataDetails, &ti, "%s: UpdateDataDetails", szFieldName);
@@ -1312,7 +1312,7 @@ void parseUpdateDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArrayComplex(subtree, tvb, pinfo, pOffset, "UpdateValues", "DataValue", parseDataValue, ett_opcua_array_DataValue);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseUpdateStructureDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseUpdateStructureDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_UpdateStructureDataDetails, &ti, "%s: UpdateStructureDataDetails", szFieldName);
@@ -1322,7 +1322,7 @@ void parseUpdateStructureDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "UpdateValues", "DataValue", parseDataValue, ett_opcua_array_DataValue);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseUpdateEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseUpdateEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_UpdateEventDetails, &ti, "%s: UpdateEventDetails", szFieldName);
@@ -1333,7 +1333,7 @@ void parseUpdateEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseArrayComplex(subtree, tvb, pinfo, pOffset, "EventData", "HistoryEventFieldList", parseHistoryEventFieldList, ett_opcua_array_HistoryEventFieldList);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDeleteRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DeleteRawModifiedDetails, &ti, "%s: DeleteRawModifiedDetails", szFieldName);
@@ -1343,7 +1343,7 @@ void parseDeleteRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info
parseDateTime(subtree, tvb, pinfo, pOffset, hf_opcua_EndTime);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDeleteAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DeleteAtTimeDetails, &ti, "%s: DeleteAtTimeDetails", szFieldName);
@@ -1352,7 +1352,7 @@ void parseDeleteAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArraySimple(subtree, tvb, pinfo, pOffset, "ReqTimes", "DateTime", hf_opcua_ReqTimes, parseDateTime, ett_opcua_array_DateTime);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDeleteEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DeleteEventDetails, &ti, "%s: DeleteEventDetails", szFieldName);
@@ -1361,7 +1361,7 @@ void parseDeleteEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseArraySimple(subtree, tvb, pinfo, pOffset, "EventIds", "ByteString", hf_opcua_EventIds, parseByteString, ett_opcua_array_ByteString);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryUpdateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseHistoryUpdateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_HistoryUpdateResult, &ti, "%s: HistoryUpdateResult", szFieldName);
@@ -1372,7 +1372,7 @@ void parseHistoryUpdateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCallMethodRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseCallMethodRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_CallMethodRequest, &ti, "%s: CallMethodRequest", szFieldName);
@@ -1382,7 +1382,7 @@ void parseCallMethodRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArrayComplex(subtree, tvb, pinfo, pOffset, "InputArguments", "Variant", parseVariant, ett_opcua_array_Variant);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCallMethodResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseCallMethodResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_CallMethodResult, &ti, "%s: CallMethodResult", szFieldName);
@@ -1395,7 +1395,7 @@ void parseCallMethodResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArrayComplex(subtree, tvb, pinfo, pOffset, "OutputArguments", "Variant", parseVariant, ett_opcua_array_Variant);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDataChangeFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDataChangeFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DataChangeFilter, &ti, "%s: DataChangeFilter", szFieldName);
@@ -1404,7 +1404,7 @@ void parseDataChangeFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_DeadbandValue);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEventFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEventFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EventFilter, &ti, "%s: EventFilter", szFieldName);
@@ -1413,7 +1413,7 @@ void parseEventFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseContentFilter(subtree, tvb, pinfo, pOffset, "WhereClause");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAggregateConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAggregateConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AggregateConfiguration, &ti, "%s: AggregateConfiguration", szFieldName);
@@ -1424,7 +1424,7 @@ void parseAggregateConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_UseSlopedExtrapolation);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAggregateFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAggregateFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AggregateFilter, &ti, "%s: AggregateFilter", szFieldName);
@@ -1434,7 +1434,7 @@ void parseAggregateFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseAggregateConfiguration(subtree, tvb, pinfo, pOffset, "AggregateConfiguration");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEventFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEventFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EventFilterResult, &ti, "%s: EventFilterResult", szFieldName);
@@ -1445,7 +1445,7 @@ void parseEventFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseContentFilterResult(subtree, tvb, pinfo, pOffset, "WhereClauseResult");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAggregateFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAggregateFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AggregateFilterResult, &ti, "%s: AggregateFilterResult", szFieldName);
@@ -1454,7 +1454,7 @@ void parseAggregateFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseAggregateConfiguration(subtree, tvb, pinfo, pOffset, "RevisedAggregateConfiguration");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMonitoringParameters(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMonitoringParameters(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MonitoringParameters, &ti, "%s: MonitoringParameters", szFieldName);
@@ -1465,7 +1465,7 @@ void parseMonitoringParameters(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_DiscardOldest);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMonitoredItemCreateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMonitoredItemCreateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MonitoredItemCreateRequest, &ti, "%s: MonitoredItemCreateRequest", szFieldName);
@@ -1474,7 +1474,7 @@ void parseMonitoredItemCreateRequest(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseMonitoringParameters(subtree, tvb, pinfo, pOffset, "RequestedParameters");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMonitoredItemCreateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMonitoredItemCreateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MonitoredItemCreateResult, &ti, "%s: MonitoredItemCreateResult", szFieldName);
@@ -1485,7 +1485,7 @@ void parseMonitoredItemCreateResult(proto_tree *tree, tvbuff_t *tvb, packet_info
parseExtensionObject(subtree, tvb, pinfo, pOffset, "FilterResult");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMonitoredItemModifyRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMonitoredItemModifyRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MonitoredItemModifyRequest, &ti, "%s: MonitoredItemModifyRequest", szFieldName);
@@ -1493,7 +1493,7 @@ void parseMonitoredItemModifyRequest(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseMonitoringParameters(subtree, tvb, pinfo, pOffset, "RequestedParameters");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMonitoredItemModifyResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMonitoredItemModifyResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MonitoredItemModifyResult, &ti, "%s: MonitoredItemModifyResult", szFieldName);
@@ -1503,7 +1503,7 @@ void parseMonitoredItemModifyResult(proto_tree *tree, tvbuff_t *tvb, packet_info
parseExtensionObject(subtree, tvb, pinfo, pOffset, "FilterResult");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseNotificationMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseNotificationMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_NotificationMessage, &ti, "%s: NotificationMessage", szFieldName);
@@ -1513,7 +1513,7 @@ void parseNotificationMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NotificationData", "ExtensionObject", parseExtensionObject, ett_opcua_array_ExtensionObject);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDataChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDataChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DataChangeNotification, &ti, "%s: DataChangeNotification", szFieldName);
@@ -1523,7 +1523,7 @@ void parseDataChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseMonitoredItemNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseMonitoredItemNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_MonitoredItemNotification, &ti, "%s: MonitoredItemNotification", szFieldName);
@@ -1531,7 +1531,7 @@ void parseMonitoredItemNotification(proto_tree *tree, tvbuff_t *tvb, packet_info
parseDataValue(subtree, tvb, pinfo, pOffset, "Value");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEventNotificationList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEventNotificationList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EventNotificationList, &ti, "%s: EventNotificationList", szFieldName);
@@ -1539,7 +1539,7 @@ void parseEventNotificationList(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Events", "EventFieldList", parseEventFieldList, ett_opcua_array_EventFieldList);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EventFieldList, &ti, "%s: EventFieldList", szFieldName);
@@ -1548,7 +1548,7 @@ void parseEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "EventFields", "Variant", parseVariant, ett_opcua_array_Variant);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseHistoryEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_HistoryEventFieldList, &ti, "%s: HistoryEventFieldList", szFieldName);
@@ -1556,7 +1556,7 @@ void parseHistoryEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "EventFields", "Variant", parseVariant, ett_opcua_array_Variant);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseStatusChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseStatusChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_StatusChangeNotification, &ti, "%s: StatusChangeNotification", szFieldName);
@@ -1564,7 +1564,7 @@ void parseStatusChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info
parseDiagnosticInfo(subtree, tvb, pinfo, pOffset, "DiagnosticInfo");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSubscriptionAcknowledgement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSubscriptionAcknowledgement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SubscriptionAcknowledgement, &ti, "%s: SubscriptionAcknowledgement", szFieldName);
@@ -1572,7 +1572,7 @@ void parseSubscriptionAcknowledgement(proto_tree *tree, tvbuff_t *tvb, packet_in
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_SequenceNumber);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTransferResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseTransferResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_TransferResult, &ti, "%s: TransferResult", szFieldName);
@@ -1581,7 +1581,7 @@ void parseTransferResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseArraySimple(subtree, tvb, pinfo, pOffset, "AvailableSequenceNumbers", "UInt32", hf_opcua_AvailableSequenceNumbers, parseUInt32, ett_opcua_array_UInt32);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseScalarTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseScalarTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ScalarTestType, &ti, "%s: ScalarTestType", szFieldName);
@@ -1612,7 +1612,7 @@ void parseScalarTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseEnumeratedTestType(subtree, tvb, pinfo, pOffset);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseArrayTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseArrayTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ArrayTestType, &ti, "%s: ArrayTestType", szFieldName);
@@ -1668,7 +1668,7 @@ void parseArrayTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseArrayEnum(subtree, tvb, pinfo, pOffset, "EnumeratedValues", "EnumeratedTestType", parseEnumeratedTestType, ett_opcua_array_EnumeratedTestType);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCompositeTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseCompositeTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_CompositeTestType, &ti, "%s: CompositeTestType", szFieldName);
@@ -1676,7 +1676,7 @@ void parseCompositeTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArrayTestType(subtree, tvb, pinfo, pOffset, "Field2");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBuildInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseBuildInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_BuildInfo, &ti, "%s: BuildInfo", szFieldName);
@@ -1688,7 +1688,7 @@ void parseBuildInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *p
parseDateTime(subtree, tvb, pinfo, pOffset, hf_opcua_BuildDate);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRedundantServerDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseRedundantServerDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_RedundantServerDataType, &ti, "%s: RedundantServerDataType", szFieldName);
@@ -1697,7 +1697,7 @@ void parseRedundantServerDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *
parseServerState(subtree, tvb, pinfo, pOffset);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEndpointUrlListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEndpointUrlListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EndpointUrlListDataType, &ti, "%s: EndpointUrlListDataType", szFieldName);
@@ -1705,7 +1705,7 @@ void parseEndpointUrlListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *
parseArraySimple(subtree, tvb, pinfo, pOffset, "EndpointUrlList", "String", hf_opcua_EndpointUrlList, parseString, ett_opcua_array_String);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseNetworkGroupDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseNetworkGroupDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_NetworkGroupDataType, &ti, "%s: NetworkGroupDataType", szFieldName);
@@ -1714,7 +1714,7 @@ void parseNetworkGroupDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NetworkPaths", "EndpointUrlListDataType", parseEndpointUrlListDataType, ett_opcua_array_EndpointUrlListDataType);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSamplingIntervalDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSamplingIntervalDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SamplingIntervalDiagnosticsDataType, &ti, "%s: SamplingIntervalDiagnosticsDataType", szFieldName);
@@ -1724,7 +1724,7 @@ void parseSamplingIntervalDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, p
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_DisabledMonitoredItemCount);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseServerDiagnosticsSummaryDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseServerDiagnosticsSummaryDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ServerDiagnosticsSummaryDataType, &ti, "%s: ServerDiagnosticsSummaryDataType", szFieldName);
@@ -1742,7 +1742,7 @@ void parseServerDiagnosticsSummaryDataType(proto_tree *tree, tvbuff_t *tvb, pack
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RejectedRequestsCount);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseServerStatusDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseServerStatusDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ServerStatusDataType, &ti, "%s: ServerStatusDataType", szFieldName);
@@ -1754,7 +1754,7 @@ void parseServerStatusDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseLocalizedText(subtree, tvb, pinfo, pOffset, "ShutdownReason");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSessionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSessionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SessionDiagnosticsDataType, &ti, "%s: SessionDiagnosticsDataType", szFieldName);
@@ -1804,7 +1804,7 @@ void parseSessionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseServiceCounterDataType(subtree, tvb, pinfo, pOffset, "UnregisterNodesCount");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSessionSecurityDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSessionSecurityDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SessionSecurityDiagnosticsDataType, &ti, "%s: SessionSecurityDiagnosticsDataType", szFieldName);
@@ -1820,7 +1820,7 @@ void parseSessionSecurityDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, pa
parseCertificate(subtree, tvb, pinfo, pOffset, hf_opcua_ClientCertificate);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseServiceCounterDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseServiceCounterDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ServiceCounterDataType, &ti, "%s: ServiceCounterDataType", szFieldName);
@@ -1828,7 +1828,7 @@ void parseServiceCounterDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_ErrorCount);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseStatusResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseStatusResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_StatusResult, &ti, "%s: StatusResult", szFieldName);
@@ -1836,7 +1836,7 @@ void parseStatusResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseDiagnosticInfo(subtree, tvb, pinfo, pOffset, "DiagnosticInfo");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSubscriptionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSubscriptionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SubscriptionDiagnosticsDataType, &ti, "%s: SubscriptionDiagnosticsDataType", szFieldName);
@@ -1873,7 +1873,7 @@ void parseSubscriptionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packe
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_EventQueueOverFlowCount);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseModelChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseModelChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ModelChangeStructureDataType, &ti, "%s: ModelChangeStructureDataType", szFieldName);
@@ -1882,7 +1882,7 @@ void parseModelChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_i
parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_Verb);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSemanticChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseSemanticChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_SemanticChangeStructureDataType, &ti, "%s: SemanticChangeStructureDataType", szFieldName);
@@ -1890,7 +1890,7 @@ void parseSemanticChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packe
parseNodeId(subtree, tvb, pinfo, pOffset, "AffectedType");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRange(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseRange(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_Range, &ti, "%s: Range", szFieldName);
@@ -1898,7 +1898,7 @@ void parseRange(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffs
parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_High);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseEUInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseEUInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_EUInformation, &ti, "%s: EUInformation", szFieldName);
@@ -1908,7 +1908,7 @@ void parseEUInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseLocalizedText(subtree, tvb, pinfo, pOffset, "Description");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ComplexNumberType, &ti, "%s: ComplexNumberType", szFieldName);
@@ -1916,7 +1916,7 @@ void parseComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseFloat(subtree, tvb, pinfo, pOffset, hf_opcua_Imaginary);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDoubleComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseDoubleComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_DoubleComplexNumberType, &ti, "%s: DoubleComplexNumberType", szFieldName);
@@ -1924,7 +1924,7 @@ void parseDoubleComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *
parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_Imaginary);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAxisInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAxisInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_AxisInformation, &ti, "%s: AxisInformation", szFieldName);
@@ -1936,7 +1936,7 @@ void parseAxisInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseArraySimple(subtree, tvb, pinfo, pOffset, "AxisSteps", "Double", hf_opcua_AxisSteps, parseDouble, ett_opcua_array_Double);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseXVType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseXVType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_XVType, &ti, "%s: XVType", szFieldName);
@@ -1944,7 +1944,7 @@ void parseXVType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOff
parseFloat(subtree, tvb, pinfo, pOffset, hf_opcua_Value);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseProgramDiagnosticDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseProgramDiagnosticDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_ProgramDiagnosticDataType, &ti, "%s: ProgramDiagnosticDataType", szFieldName);
@@ -1962,7 +1962,7 @@ void parseProgramDiagnosticDataType(proto_tree *tree, tvbuff_t *tvb, packet_info
parseStatusResult(subtree, tvb, pinfo, pOffset, "LastMethodReturnStatus");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAnnotation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseAnnotation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_Annotation, &ti, "%s: Annotation", szFieldName);
@@ -1973,7 +1973,7 @@ void parseAnnotation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *
}
/** Setup protocol subtree array */
-static gint *ett[] =
+static int *ett[] =
{
&ett_opcua_TrustListDataType,
&ett_opcua_array_TrustListDataType,
diff --git a/plugins/epan/opcua/opcua_complextypeparser.h b/plugins/epan/opcua/opcua_complextypeparser.h
index 48ef060f2c..3ceb066b08 100644
--- a/plugins/epan/opcua/opcua_complextypeparser.h
+++ b/plugins/epan/opcua/opcua_complextypeparser.h
@@ -20,426 +20,426 @@
#include <glib.h>
#include <epan/packet.h>
-extern gint ett_opcua_TrustListDataType;
-extern gint ett_opcua_array_TrustListDataType;
-extern gint ett_opcua_Node;
-extern gint ett_opcua_array_Node;
-extern gint ett_opcua_InstanceNode;
-extern gint ett_opcua_array_InstanceNode;
-extern gint ett_opcua_TypeNode;
-extern gint ett_opcua_array_TypeNode;
-extern gint ett_opcua_ObjectNode;
-extern gint ett_opcua_array_ObjectNode;
-extern gint ett_opcua_ObjectTypeNode;
-extern gint ett_opcua_array_ObjectTypeNode;
-extern gint ett_opcua_VariableNode;
-extern gint ett_opcua_array_VariableNode;
-extern gint ett_opcua_VariableTypeNode;
-extern gint ett_opcua_array_VariableTypeNode;
-extern gint ett_opcua_ReferenceTypeNode;
-extern gint ett_opcua_array_ReferenceTypeNode;
-extern gint ett_opcua_MethodNode;
-extern gint ett_opcua_array_MethodNode;
-extern gint ett_opcua_ViewNode;
-extern gint ett_opcua_array_ViewNode;
-extern gint ett_opcua_DataTypeNode;
-extern gint ett_opcua_array_DataTypeNode;
-extern gint ett_opcua_ReferenceNode;
-extern gint ett_opcua_array_ReferenceNode;
-extern gint ett_opcua_Argument;
-extern gint ett_opcua_array_Argument;
-extern gint ett_opcua_EnumValueType;
-extern gint ett_opcua_array_EnumValueType;
-extern gint ett_opcua_OptionSet;
-extern gint ett_opcua_array_OptionSet;
-extern gint ett_opcua_TimeZoneDataType;
-extern gint ett_opcua_array_TimeZoneDataType;
-extern gint ett_opcua_ApplicationDescription;
-extern gint ett_opcua_array_ApplicationDescription;
-extern gint ett_opcua_RequestHeader;
-extern gint ett_opcua_array_RequestHeader;
-extern gint ett_opcua_ResponseHeader;
-extern gint ett_opcua_array_ResponseHeader;
-extern gint ett_opcua_ServerOnNetwork;
-extern gint ett_opcua_array_ServerOnNetwork;
-extern gint ett_opcua_UserTokenPolicy;
-extern gint ett_opcua_array_UserTokenPolicy;
-extern gint ett_opcua_EndpointDescription;
-extern gint ett_opcua_array_EndpointDescription;
-extern gint ett_opcua_RegisteredServer;
-extern gint ett_opcua_array_RegisteredServer;
-extern gint ett_opcua_MdnsDiscoveryConfiguration;
-extern gint ett_opcua_array_MdnsDiscoveryConfiguration;
-extern gint ett_opcua_ChannelSecurityToken;
-extern gint ett_opcua_array_ChannelSecurityToken;
-extern gint ett_opcua_SignedSoftwareCertificate;
-extern gint ett_opcua_array_SignedSoftwareCertificate;
-extern gint ett_opcua_SignatureData;
-extern gint ett_opcua_array_SignatureData;
-extern gint ett_opcua_UserIdentityToken;
-extern gint ett_opcua_array_UserIdentityToken;
-extern gint ett_opcua_AnonymousIdentityToken;
-extern gint ett_opcua_array_AnonymousIdentityToken;
-extern gint ett_opcua_UserNameIdentityToken;
-extern gint ett_opcua_array_UserNameIdentityToken;
-extern gint ett_opcua_X509IdentityToken;
-extern gint ett_opcua_array_X509IdentityToken;
-extern gint ett_opcua_KerberosIdentityToken;
-extern gint ett_opcua_array_KerberosIdentityToken;
-extern gint ett_opcua_IssuedIdentityToken;
-extern gint ett_opcua_array_IssuedIdentityToken;
-extern gint ett_opcua_NodeAttributes;
-extern gint ett_opcua_array_NodeAttributes;
-extern gint ett_opcua_ObjectAttributes;
-extern gint ett_opcua_array_ObjectAttributes;
-extern gint ett_opcua_VariableAttributes;
-extern gint ett_opcua_array_VariableAttributes;
-extern gint ett_opcua_MethodAttributes;
-extern gint ett_opcua_array_MethodAttributes;
-extern gint ett_opcua_ObjectTypeAttributes;
-extern gint ett_opcua_array_ObjectTypeAttributes;
-extern gint ett_opcua_VariableTypeAttributes;
-extern gint ett_opcua_array_VariableTypeAttributes;
-extern gint ett_opcua_ReferenceTypeAttributes;
-extern gint ett_opcua_array_ReferenceTypeAttributes;
-extern gint ett_opcua_DataTypeAttributes;
-extern gint ett_opcua_array_DataTypeAttributes;
-extern gint ett_opcua_ViewAttributes;
-extern gint ett_opcua_array_ViewAttributes;
-extern gint ett_opcua_AddNodesItem;
-extern gint ett_opcua_array_AddNodesItem;
-extern gint ett_opcua_AddNodesResult;
-extern gint ett_opcua_array_AddNodesResult;
-extern gint ett_opcua_AddReferencesItem;
-extern gint ett_opcua_array_AddReferencesItem;
-extern gint ett_opcua_DeleteNodesItem;
-extern gint ett_opcua_array_DeleteNodesItem;
-extern gint ett_opcua_DeleteReferencesItem;
-extern gint ett_opcua_array_DeleteReferencesItem;
-extern gint ett_opcua_ViewDescription;
-extern gint ett_opcua_array_ViewDescription;
-extern gint ett_opcua_BrowseDescription;
-extern gint ett_opcua_array_BrowseDescription;
-extern gint ett_opcua_ReferenceDescription;
-extern gint ett_opcua_array_ReferenceDescription;
-extern gint ett_opcua_BrowseResult;
-extern gint ett_opcua_array_BrowseResult;
-extern gint ett_opcua_RelativePathElement;
-extern gint ett_opcua_array_RelativePathElement;
-extern gint ett_opcua_RelativePath;
-extern gint ett_opcua_array_RelativePath;
-extern gint ett_opcua_BrowsePath;
-extern gint ett_opcua_array_BrowsePath;
-extern gint ett_opcua_BrowsePathTarget;
-extern gint ett_opcua_array_BrowsePathTarget;
-extern gint ett_opcua_BrowsePathResult;
-extern gint ett_opcua_array_BrowsePathResult;
-extern gint ett_opcua_EndpointConfiguration;
-extern gint ett_opcua_array_EndpointConfiguration;
-extern gint ett_opcua_SupportedProfile;
-extern gint ett_opcua_array_SupportedProfile;
-extern gint ett_opcua_SoftwareCertificate;
-extern gint ett_opcua_array_SoftwareCertificate;
-extern gint ett_opcua_QueryDataDescription;
-extern gint ett_opcua_array_QueryDataDescription;
-extern gint ett_opcua_NodeTypeDescription;
-extern gint ett_opcua_array_NodeTypeDescription;
-extern gint ett_opcua_QueryDataSet;
-extern gint ett_opcua_array_QueryDataSet;
-extern gint ett_opcua_NodeReference;
-extern gint ett_opcua_array_NodeReference;
-extern gint ett_opcua_ContentFilterElement;
-extern gint ett_opcua_array_ContentFilterElement;
-extern gint ett_opcua_ContentFilter;
-extern gint ett_opcua_array_ContentFilter;
-extern gint ett_opcua_ElementOperand;
-extern gint ett_opcua_array_ElementOperand;
-extern gint ett_opcua_LiteralOperand;
-extern gint ett_opcua_array_LiteralOperand;
-extern gint ett_opcua_AttributeOperand;
-extern gint ett_opcua_array_AttributeOperand;
-extern gint ett_opcua_SimpleAttributeOperand;
-extern gint ett_opcua_array_SimpleAttributeOperand;
-extern gint ett_opcua_ContentFilterElementResult;
-extern gint ett_opcua_array_ContentFilterElementResult;
-extern gint ett_opcua_ContentFilterResult;
-extern gint ett_opcua_array_ContentFilterResult;
-extern gint ett_opcua_ParsingResult;
-extern gint ett_opcua_array_ParsingResult;
-extern gint ett_opcua_ReadValueId;
-extern gint ett_opcua_array_ReadValueId;
-extern gint ett_opcua_HistoryReadValueId;
-extern gint ett_opcua_array_HistoryReadValueId;
-extern gint ett_opcua_HistoryReadResult;
-extern gint ett_opcua_array_HistoryReadResult;
-extern gint ett_opcua_ReadEventDetails;
-extern gint ett_opcua_array_ReadEventDetails;
-extern gint ett_opcua_ReadRawModifiedDetails;
-extern gint ett_opcua_array_ReadRawModifiedDetails;
-extern gint ett_opcua_ReadProcessedDetails;
-extern gint ett_opcua_array_ReadProcessedDetails;
-extern gint ett_opcua_ReadAtTimeDetails;
-extern gint ett_opcua_array_ReadAtTimeDetails;
-extern gint ett_opcua_HistoryData;
-extern gint ett_opcua_array_HistoryData;
-extern gint ett_opcua_ModificationInfo;
-extern gint ett_opcua_array_ModificationInfo;
-extern gint ett_opcua_HistoryModifiedData;
-extern gint ett_opcua_array_HistoryModifiedData;
-extern gint ett_opcua_HistoryEvent;
-extern gint ett_opcua_array_HistoryEvent;
-extern gint ett_opcua_WriteValue;
-extern gint ett_opcua_array_WriteValue;
-extern gint ett_opcua_HistoryUpdateDetails;
-extern gint ett_opcua_array_HistoryUpdateDetails;
-extern gint ett_opcua_UpdateDataDetails;
-extern gint ett_opcua_array_UpdateDataDetails;
-extern gint ett_opcua_UpdateStructureDataDetails;
-extern gint ett_opcua_array_UpdateStructureDataDetails;
-extern gint ett_opcua_UpdateEventDetails;
-extern gint ett_opcua_array_UpdateEventDetails;
-extern gint ett_opcua_DeleteRawModifiedDetails;
-extern gint ett_opcua_array_DeleteRawModifiedDetails;
-extern gint ett_opcua_DeleteAtTimeDetails;
-extern gint ett_opcua_array_DeleteAtTimeDetails;
-extern gint ett_opcua_DeleteEventDetails;
-extern gint ett_opcua_array_DeleteEventDetails;
-extern gint ett_opcua_HistoryUpdateResult;
-extern gint ett_opcua_array_HistoryUpdateResult;
-extern gint ett_opcua_CallMethodRequest;
-extern gint ett_opcua_array_CallMethodRequest;
-extern gint ett_opcua_CallMethodResult;
-extern gint ett_opcua_array_CallMethodResult;
-extern gint ett_opcua_DataChangeFilter;
-extern gint ett_opcua_array_DataChangeFilter;
-extern gint ett_opcua_EventFilter;
-extern gint ett_opcua_array_EventFilter;
-extern gint ett_opcua_AggregateConfiguration;
-extern gint ett_opcua_array_AggregateConfiguration;
-extern gint ett_opcua_AggregateFilter;
-extern gint ett_opcua_array_AggregateFilter;
-extern gint ett_opcua_EventFilterResult;
-extern gint ett_opcua_array_EventFilterResult;
-extern gint ett_opcua_AggregateFilterResult;
-extern gint ett_opcua_array_AggregateFilterResult;
-extern gint ett_opcua_MonitoringParameters;
-extern gint ett_opcua_array_MonitoringParameters;
-extern gint ett_opcua_MonitoredItemCreateRequest;
-extern gint ett_opcua_array_MonitoredItemCreateRequest;
-extern gint ett_opcua_MonitoredItemCreateResult;
-extern gint ett_opcua_array_MonitoredItemCreateResult;
-extern gint ett_opcua_MonitoredItemModifyRequest;
-extern gint ett_opcua_array_MonitoredItemModifyRequest;
-extern gint ett_opcua_MonitoredItemModifyResult;
-extern gint ett_opcua_array_MonitoredItemModifyResult;
-extern gint ett_opcua_NotificationMessage;
-extern gint ett_opcua_array_NotificationMessage;
-extern gint ett_opcua_DataChangeNotification;
-extern gint ett_opcua_array_DataChangeNotification;
-extern gint ett_opcua_MonitoredItemNotification;
-extern gint ett_opcua_array_MonitoredItemNotification;
-extern gint ett_opcua_EventNotificationList;
-extern gint ett_opcua_array_EventNotificationList;
-extern gint ett_opcua_EventFieldList;
-extern gint ett_opcua_array_EventFieldList;
-extern gint ett_opcua_HistoryEventFieldList;
-extern gint ett_opcua_array_HistoryEventFieldList;
-extern gint ett_opcua_StatusChangeNotification;
-extern gint ett_opcua_array_StatusChangeNotification;
-extern gint ett_opcua_SubscriptionAcknowledgement;
-extern gint ett_opcua_array_SubscriptionAcknowledgement;
-extern gint ett_opcua_TransferResult;
-extern gint ett_opcua_array_TransferResult;
-extern gint ett_opcua_ScalarTestType;
-extern gint ett_opcua_array_ScalarTestType;
-extern gint ett_opcua_ArrayTestType;
-extern gint ett_opcua_array_ArrayTestType;
-extern gint ett_opcua_CompositeTestType;
-extern gint ett_opcua_array_CompositeTestType;
-extern gint ett_opcua_BuildInfo;
-extern gint ett_opcua_array_BuildInfo;
-extern gint ett_opcua_RedundantServerDataType;
-extern gint ett_opcua_array_RedundantServerDataType;
-extern gint ett_opcua_EndpointUrlListDataType;
-extern gint ett_opcua_array_EndpointUrlListDataType;
-extern gint ett_opcua_NetworkGroupDataType;
-extern gint ett_opcua_array_NetworkGroupDataType;
-extern gint ett_opcua_SamplingIntervalDiagnosticsDataType;
-extern gint ett_opcua_array_SamplingIntervalDiagnosticsDataType;
-extern gint ett_opcua_ServerDiagnosticsSummaryDataType;
-extern gint ett_opcua_array_ServerDiagnosticsSummaryDataType;
-extern gint ett_opcua_ServerStatusDataType;
-extern gint ett_opcua_array_ServerStatusDataType;
-extern gint ett_opcua_SessionDiagnosticsDataType;
-extern gint ett_opcua_array_SessionDiagnosticsDataType;
-extern gint ett_opcua_SessionSecurityDiagnosticsDataType;
-extern gint ett_opcua_array_SessionSecurityDiagnosticsDataType;
-extern gint ett_opcua_ServiceCounterDataType;
-extern gint ett_opcua_array_ServiceCounterDataType;
-extern gint ett_opcua_StatusResult;
-extern gint ett_opcua_array_StatusResult;
-extern gint ett_opcua_SubscriptionDiagnosticsDataType;
-extern gint ett_opcua_array_SubscriptionDiagnosticsDataType;
-extern gint ett_opcua_ModelChangeStructureDataType;
-extern gint ett_opcua_array_ModelChangeStructureDataType;
-extern gint ett_opcua_SemanticChangeStructureDataType;
-extern gint ett_opcua_array_SemanticChangeStructureDataType;
-extern gint ett_opcua_Range;
-extern gint ett_opcua_array_Range;
-extern gint ett_opcua_EUInformation;
-extern gint ett_opcua_array_EUInformation;
-extern gint ett_opcua_ComplexNumberType;
-extern gint ett_opcua_array_ComplexNumberType;
-extern gint ett_opcua_DoubleComplexNumberType;
-extern gint ett_opcua_array_DoubleComplexNumberType;
-extern gint ett_opcua_AxisInformation;
-extern gint ett_opcua_array_AxisInformation;
-extern gint ett_opcua_XVType;
-extern gint ett_opcua_array_XVType;
-extern gint ett_opcua_ProgramDiagnosticDataType;
-extern gint ett_opcua_array_ProgramDiagnosticDataType;
-extern gint ett_opcua_Annotation;
-extern gint ett_opcua_array_Annotation;
+extern int ett_opcua_TrustListDataType;
+extern int ett_opcua_array_TrustListDataType;
+extern int ett_opcua_Node;
+extern int ett_opcua_array_Node;
+extern int ett_opcua_InstanceNode;
+extern int ett_opcua_array_InstanceNode;
+extern int ett_opcua_TypeNode;
+extern int ett_opcua_array_TypeNode;
+extern int ett_opcua_ObjectNode;
+extern int ett_opcua_array_ObjectNode;
+extern int ett_opcua_ObjectTypeNode;
+extern int ett_opcua_array_ObjectTypeNode;
+extern int ett_opcua_VariableNode;
+extern int ett_opcua_array_VariableNode;
+extern int ett_opcua_VariableTypeNode;
+extern int ett_opcua_array_VariableTypeNode;
+extern int ett_opcua_ReferenceTypeNode;
+extern int ett_opcua_array_ReferenceTypeNode;
+extern int ett_opcua_MethodNode;
+extern int ett_opcua_array_MethodNode;
+extern int ett_opcua_ViewNode;
+extern int ett_opcua_array_ViewNode;
+extern int ett_opcua_DataTypeNode;
+extern int ett_opcua_array_DataTypeNode;
+extern int ett_opcua_ReferenceNode;
+extern int ett_opcua_array_ReferenceNode;
+extern int ett_opcua_Argument;
+extern int ett_opcua_array_Argument;
+extern int ett_opcua_EnumValueType;
+extern int ett_opcua_array_EnumValueType;
+extern int ett_opcua_OptionSet;
+extern int ett_opcua_array_OptionSet;
+extern int ett_opcua_TimeZoneDataType;
+extern int ett_opcua_array_TimeZoneDataType;
+extern int ett_opcua_ApplicationDescription;
+extern int ett_opcua_array_ApplicationDescription;
+extern int ett_opcua_RequestHeader;
+extern int ett_opcua_array_RequestHeader;
+extern int ett_opcua_ResponseHeader;
+extern int ett_opcua_array_ResponseHeader;
+extern int ett_opcua_ServerOnNetwork;
+extern int ett_opcua_array_ServerOnNetwork;
+extern int ett_opcua_UserTokenPolicy;
+extern int ett_opcua_array_UserTokenPolicy;
+extern int ett_opcua_EndpointDescription;
+extern int ett_opcua_array_EndpointDescription;
+extern int ett_opcua_RegisteredServer;
+extern int ett_opcua_array_RegisteredServer;
+extern int ett_opcua_MdnsDiscoveryConfiguration;
+extern int ett_opcua_array_MdnsDiscoveryConfiguration;
+extern int ett_opcua_ChannelSecurityToken;
+extern int ett_opcua_array_ChannelSecurityToken;
+extern int ett_opcua_SignedSoftwareCertificate;
+extern int ett_opcua_array_SignedSoftwareCertificate;
+extern int ett_opcua_SignatureData;
+extern int ett_opcua_array_SignatureData;
+extern int ett_opcua_UserIdentityToken;
+extern int ett_opcua_array_UserIdentityToken;
+extern int ett_opcua_AnonymousIdentityToken;
+extern int ett_opcua_array_AnonymousIdentityToken;
+extern int ett_opcua_UserNameIdentityToken;
+extern int ett_opcua_array_UserNameIdentityToken;
+extern int ett_opcua_X509IdentityToken;
+extern int ett_opcua_array_X509IdentityToken;
+extern int ett_opcua_KerberosIdentityToken;
+extern int ett_opcua_array_KerberosIdentityToken;
+extern int ett_opcua_IssuedIdentityToken;
+extern int ett_opcua_array_IssuedIdentityToken;
+extern int ett_opcua_NodeAttributes;
+extern int ett_opcua_array_NodeAttributes;
+extern int ett_opcua_ObjectAttributes;
+extern int ett_opcua_array_ObjectAttributes;
+extern int ett_opcua_VariableAttributes;
+extern int ett_opcua_array_VariableAttributes;
+extern int ett_opcua_MethodAttributes;
+extern int ett_opcua_array_MethodAttributes;
+extern int ett_opcua_ObjectTypeAttributes;
+extern int ett_opcua_array_ObjectTypeAttributes;
+extern int ett_opcua_VariableTypeAttributes;
+extern int ett_opcua_array_VariableTypeAttributes;
+extern int ett_opcua_ReferenceTypeAttributes;
+extern int ett_opcua_array_ReferenceTypeAttributes;
+extern int ett_opcua_DataTypeAttributes;
+extern int ett_opcua_array_DataTypeAttributes;
+extern int ett_opcua_ViewAttributes;
+extern int ett_opcua_array_ViewAttributes;
+extern int ett_opcua_AddNodesItem;
+extern int ett_opcua_array_AddNodesItem;
+extern int ett_opcua_AddNodesResult;
+extern int ett_opcua_array_AddNodesResult;
+extern int ett_opcua_AddReferencesItem;
+extern int ett_opcua_array_AddReferencesItem;
+extern int ett_opcua_DeleteNodesItem;
+extern int ett_opcua_array_DeleteNodesItem;
+extern int ett_opcua_DeleteReferencesItem;
+extern int ett_opcua_array_DeleteReferencesItem;
+extern int ett_opcua_ViewDescription;
+extern int ett_opcua_array_ViewDescription;
+extern int ett_opcua_BrowseDescription;
+extern int ett_opcua_array_BrowseDescription;
+extern int ett_opcua_ReferenceDescription;
+extern int ett_opcua_array_ReferenceDescription;
+extern int ett_opcua_BrowseResult;
+extern int ett_opcua_array_BrowseResult;
+extern int ett_opcua_RelativePathElement;
+extern int ett_opcua_array_RelativePathElement;
+extern int ett_opcua_RelativePath;
+extern int ett_opcua_array_RelativePath;
+extern int ett_opcua_BrowsePath;
+extern int ett_opcua_array_BrowsePath;
+extern int ett_opcua_BrowsePathTarget;
+extern int ett_opcua_array_BrowsePathTarget;
+extern int ett_opcua_BrowsePathResult;
+extern int ett_opcua_array_BrowsePathResult;
+extern int ett_opcua_EndpointConfiguration;
+extern int ett_opcua_array_EndpointConfiguration;
+extern int ett_opcua_SupportedProfile;
+extern int ett_opcua_array_SupportedProfile;
+extern int ett_opcua_SoftwareCertificate;
+extern int ett_opcua_array_SoftwareCertificate;
+extern int ett_opcua_QueryDataDescription;
+extern int ett_opcua_array_QueryDataDescription;
+extern int ett_opcua_NodeTypeDescription;
+extern int ett_opcua_array_NodeTypeDescription;
+extern int ett_opcua_QueryDataSet;
+extern int ett_opcua_array_QueryDataSet;
+extern int ett_opcua_NodeReference;
+extern int ett_opcua_array_NodeReference;
+extern int ett_opcua_ContentFilterElement;
+extern int ett_opcua_array_ContentFilterElement;
+extern int ett_opcua_ContentFilter;
+extern int ett_opcua_array_ContentFilter;
+extern int ett_opcua_ElementOperand;
+extern int ett_opcua_array_ElementOperand;
+extern int ett_opcua_LiteralOperand;
+extern int ett_opcua_array_LiteralOperand;
+extern int ett_opcua_AttributeOperand;
+extern int ett_opcua_array_AttributeOperand;
+extern int ett_opcua_SimpleAttributeOperand;
+extern int ett_opcua_array_SimpleAttributeOperand;
+extern int ett_opcua_ContentFilterElementResult;
+extern int ett_opcua_array_ContentFilterElementResult;
+extern int ett_opcua_ContentFilterResult;
+extern int ett_opcua_array_ContentFilterResult;
+extern int ett_opcua_ParsingResult;
+extern int ett_opcua_array_ParsingResult;
+extern int ett_opcua_ReadValueId;
+extern int ett_opcua_array_ReadValueId;
+extern int ett_opcua_HistoryReadValueId;
+extern int ett_opcua_array_HistoryReadValueId;
+extern int ett_opcua_HistoryReadResult;
+extern int ett_opcua_array_HistoryReadResult;
+extern int ett_opcua_ReadEventDetails;
+extern int ett_opcua_array_ReadEventDetails;
+extern int ett_opcua_ReadRawModifiedDetails;
+extern int ett_opcua_array_ReadRawModifiedDetails;
+extern int ett_opcua_ReadProcessedDetails;
+extern int ett_opcua_array_ReadProcessedDetails;
+extern int ett_opcua_ReadAtTimeDetails;
+extern int ett_opcua_array_ReadAtTimeDetails;
+extern int ett_opcua_HistoryData;
+extern int ett_opcua_array_HistoryData;
+extern int ett_opcua_ModificationInfo;
+extern int ett_opcua_array_ModificationInfo;
+extern int ett_opcua_HistoryModifiedData;
+extern int ett_opcua_array_HistoryModifiedData;
+extern int ett_opcua_HistoryEvent;
+extern int ett_opcua_array_HistoryEvent;
+extern int ett_opcua_WriteValue;
+extern int ett_opcua_array_WriteValue;
+extern int ett_opcua_HistoryUpdateDetails;
+extern int ett_opcua_array_HistoryUpdateDetails;
+extern int ett_opcua_UpdateDataDetails;
+extern int ett_opcua_array_UpdateDataDetails;
+extern int ett_opcua_UpdateStructureDataDetails;
+extern int ett_opcua_array_UpdateStructureDataDetails;
+extern int ett_opcua_UpdateEventDetails;
+extern int ett_opcua_array_UpdateEventDetails;
+extern int ett_opcua_DeleteRawModifiedDetails;
+extern int ett_opcua_array_DeleteRawModifiedDetails;
+extern int ett_opcua_DeleteAtTimeDetails;
+extern int ett_opcua_array_DeleteAtTimeDetails;
+extern int ett_opcua_DeleteEventDetails;
+extern int ett_opcua_array_DeleteEventDetails;
+extern int ett_opcua_HistoryUpdateResult;
+extern int ett_opcua_array_HistoryUpdateResult;
+extern int ett_opcua_CallMethodRequest;
+extern int ett_opcua_array_CallMethodRequest;
+extern int ett_opcua_CallMethodResult;
+extern int ett_opcua_array_CallMethodResult;
+extern int ett_opcua_DataChangeFilter;
+extern int ett_opcua_array_DataChangeFilter;
+extern int ett_opcua_EventFilter;
+extern int ett_opcua_array_EventFilter;
+extern int ett_opcua_AggregateConfiguration;
+extern int ett_opcua_array_AggregateConfiguration;
+extern int ett_opcua_AggregateFilter;
+extern int ett_opcua_array_AggregateFilter;
+extern int ett_opcua_EventFilterResult;
+extern int ett_opcua_array_EventFilterResult;
+extern int ett_opcua_AggregateFilterResult;
+extern int ett_opcua_array_AggregateFilterResult;
+extern int ett_opcua_MonitoringParameters;
+extern int ett_opcua_array_MonitoringParameters;
+extern int ett_opcua_MonitoredItemCreateRequest;
+extern int ett_opcua_array_MonitoredItemCreateRequest;
+extern int ett_opcua_MonitoredItemCreateResult;
+extern int ett_opcua_array_MonitoredItemCreateResult;
+extern int ett_opcua_MonitoredItemModifyRequest;
+extern int ett_opcua_array_MonitoredItemModifyRequest;
+extern int ett_opcua_MonitoredItemModifyResult;
+extern int ett_opcua_array_MonitoredItemModifyResult;
+extern int ett_opcua_NotificationMessage;
+extern int ett_opcua_array_NotificationMessage;
+extern int ett_opcua_DataChangeNotification;
+extern int ett_opcua_array_DataChangeNotification;
+extern int ett_opcua_MonitoredItemNotification;
+extern int ett_opcua_array_MonitoredItemNotification;
+extern int ett_opcua_EventNotificationList;
+extern int ett_opcua_array_EventNotificationList;
+extern int ett_opcua_EventFieldList;
+extern int ett_opcua_array_EventFieldList;
+extern int ett_opcua_HistoryEventFieldList;
+extern int ett_opcua_array_HistoryEventFieldList;
+extern int ett_opcua_StatusChangeNotification;
+extern int ett_opcua_array_StatusChangeNotification;
+extern int ett_opcua_SubscriptionAcknowledgement;
+extern int ett_opcua_array_SubscriptionAcknowledgement;
+extern int ett_opcua_TransferResult;
+extern int ett_opcua_array_TransferResult;
+extern int ett_opcua_ScalarTestType;
+extern int ett_opcua_array_ScalarTestType;
+extern int ett_opcua_ArrayTestType;
+extern int ett_opcua_array_ArrayTestType;
+extern int ett_opcua_CompositeTestType;
+extern int ett_opcua_array_CompositeTestType;
+extern int ett_opcua_BuildInfo;
+extern int ett_opcua_array_BuildInfo;
+extern int ett_opcua_RedundantServerDataType;
+extern int ett_opcua_array_RedundantServerDataType;
+extern int ett_opcua_EndpointUrlListDataType;
+extern int ett_opcua_array_EndpointUrlListDataType;
+extern int ett_opcua_NetworkGroupDataType;
+extern int ett_opcua_array_NetworkGroupDataType;
+extern int ett_opcua_SamplingIntervalDiagnosticsDataType;
+extern int ett_opcua_array_SamplingIntervalDiagnosticsDataType;
+extern int ett_opcua_ServerDiagnosticsSummaryDataType;
+extern int ett_opcua_array_ServerDiagnosticsSummaryDataType;
+extern int ett_opcua_ServerStatusDataType;
+extern int ett_opcua_array_ServerStatusDataType;
+extern int ett_opcua_SessionDiagnosticsDataType;
+extern int ett_opcua_array_SessionDiagnosticsDataType;
+extern int ett_opcua_SessionSecurityDiagnosticsDataType;
+extern int ett_opcua_array_SessionSecurityDiagnosticsDataType;
+extern int ett_opcua_ServiceCounterDataType;
+extern int ett_opcua_array_ServiceCounterDataType;
+extern int ett_opcua_StatusResult;
+extern int ett_opcua_array_StatusResult;
+extern int ett_opcua_SubscriptionDiagnosticsDataType;
+extern int ett_opcua_array_SubscriptionDiagnosticsDataType;
+extern int ett_opcua_ModelChangeStructureDataType;
+extern int ett_opcua_array_ModelChangeStructureDataType;
+extern int ett_opcua_SemanticChangeStructureDataType;
+extern int ett_opcua_array_SemanticChangeStructureDataType;
+extern int ett_opcua_Range;
+extern int ett_opcua_array_Range;
+extern int ett_opcua_EUInformation;
+extern int ett_opcua_array_EUInformation;
+extern int ett_opcua_ComplexNumberType;
+extern int ett_opcua_array_ComplexNumberType;
+extern int ett_opcua_DoubleComplexNumberType;
+extern int ett_opcua_array_DoubleComplexNumberType;
+extern int ett_opcua_AxisInformation;
+extern int ett_opcua_array_AxisInformation;
+extern int ett_opcua_XVType;
+extern int ett_opcua_array_XVType;
+extern int ett_opcua_ProgramDiagnosticDataType;
+extern int ett_opcua_array_ProgramDiagnosticDataType;
+extern int ett_opcua_Annotation;
+extern int ett_opcua_array_Annotation;
-void parseTrustListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseInstanceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseObjectNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseObjectTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseVariableNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseVariableTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReferenceTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMethodNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseViewNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDataTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReferenceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseArgument(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEnumValueType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseOptionSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseTimeZoneDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseApplicationDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseRequestHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseResponseHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseServerOnNetwork(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEndpointDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseRegisteredServer(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMdnsDiscoveryConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseChannelSecurityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSignedSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSignatureData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseUserIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAnonymousIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseUserNameIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseX509IdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseKerberosIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseIssuedIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseNodeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseObjectAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseVariableAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMethodAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseObjectTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseVariableTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReferenceTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDataTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseViewAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAddNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAddNodesResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAddReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDeleteNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDeleteReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseViewDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseBrowseDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReferenceDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseBrowseResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseRelativePathElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseRelativePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseBrowsePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseBrowsePathTarget(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseBrowsePathResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEndpointConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSupportedProfile(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseQueryDataDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseNodeTypeDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseQueryDataSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseNodeReference(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseContentFilterElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseContentFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseElementOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseLiteralOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSimpleAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseContentFilterElementResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseContentFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseParsingResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseHistoryReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseHistoryReadResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReadEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReadRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReadProcessedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseReadAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseHistoryData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseModificationInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseHistoryModifiedData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseHistoryEvent(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseWriteValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseHistoryUpdateDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseUpdateDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseUpdateStructureDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseUpdateEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDeleteRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDeleteAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDeleteEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseHistoryUpdateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseCallMethodRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseCallMethodResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDataChangeFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEventFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAggregateConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAggregateFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEventFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAggregateFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMonitoringParameters(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMonitoredItemCreateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMonitoredItemCreateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMonitoredItemModifyRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMonitoredItemModifyResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseNotificationMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDataChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseMonitoredItemNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEventNotificationList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseHistoryEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseStatusChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSubscriptionAcknowledgement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseTransferResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseScalarTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseArrayTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseCompositeTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseBuildInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseRedundantServerDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEndpointUrlListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseNetworkGroupDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSamplingIntervalDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseServerDiagnosticsSummaryDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseServerStatusDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSessionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSessionSecurityDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseServiceCounterDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseStatusResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSubscriptionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseModelChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseSemanticChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseRange(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseEUInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDoubleComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAxisInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseXVType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseProgramDiagnosticDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseAnnotation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
+void parseTrustListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseInstanceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseObjectNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseObjectTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseVariableNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseVariableTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReferenceTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMethodNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseViewNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDataTypeNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReferenceNode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseArgument(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEnumValueType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseOptionSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseTimeZoneDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseApplicationDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseRequestHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseResponseHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseServerOnNetwork(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseUserTokenPolicy(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEndpointDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseRegisteredServer(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMdnsDiscoveryConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseChannelSecurityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSignedSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSignatureData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseUserIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAnonymousIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseUserNameIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseX509IdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseKerberosIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseIssuedIdentityToken(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseNodeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseObjectAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseVariableAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMethodAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseObjectTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseVariableTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReferenceTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDataTypeAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseViewAttributes(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAddNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAddNodesResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAddReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDeleteNodesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDeleteReferencesItem(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseViewDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseBrowseDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReferenceDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseBrowseResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseRelativePathElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseRelativePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseBrowsePath(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseBrowsePathTarget(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseBrowsePathResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEndpointConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSupportedProfile(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSoftwareCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseQueryDataDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseNodeTypeDescription(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseQueryDataSet(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseNodeReference(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseContentFilterElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseContentFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseElementOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseLiteralOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSimpleAttributeOperand(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseContentFilterElementResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseContentFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseParsingResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseHistoryReadValueId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseHistoryReadResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReadEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReadRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReadProcessedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseReadAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseHistoryData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseModificationInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseHistoryModifiedData(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseHistoryEvent(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseWriteValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseHistoryUpdateDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseUpdateDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseUpdateStructureDataDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseUpdateEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDeleteRawModifiedDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDeleteAtTimeDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDeleteEventDetails(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseHistoryUpdateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseCallMethodRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseCallMethodResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDataChangeFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEventFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAggregateConfiguration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAggregateFilter(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEventFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAggregateFilterResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMonitoringParameters(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMonitoredItemCreateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMonitoredItemCreateResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMonitoredItemModifyRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMonitoredItemModifyResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseNotificationMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDataChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseMonitoredItemNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEventNotificationList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseHistoryEventFieldList(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseStatusChangeNotification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSubscriptionAcknowledgement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseTransferResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseScalarTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseArrayTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseCompositeTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseBuildInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseRedundantServerDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEndpointUrlListDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseNetworkGroupDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSamplingIntervalDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseServerDiagnosticsSummaryDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseServerStatusDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSessionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSessionSecurityDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseServiceCounterDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseStatusResult(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSubscriptionDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseModelChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseSemanticChangeStructureDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseRange(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseEUInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDoubleComplexNumberType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAxisInformation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseXVType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseProgramDiagnosticDataType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseAnnotation(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
void registerComplexTypes(void);
diff --git a/plugins/epan/opcua/opcua_enumparser.c b/plugins/epan/opcua/opcua_enumparser.c
index 7a25e18d5a..37eb1a28e9 100644
--- a/plugins/epan/opcua/opcua_enumparser.c
+++ b/plugins/epan/opcua/opcua_enumparser.c
@@ -22,34 +22,34 @@
#include "opcua_enumparser.h"
-gint ett_opcua_array_NodeIdType;
-gint ett_opcua_array_NamingRuleType;
-gint ett_opcua_array_OpenFileMode;
-gint ett_opcua_array_TrustListMasks;
-gint ett_opcua_array_IdType;
-gint ett_opcua_array_NodeClass;
-gint ett_opcua_array_ApplicationType;
-gint ett_opcua_array_MessageSecurityMode;
-gint ett_opcua_array_UserTokenType;
-gint ett_opcua_array_SecurityTokenRequestType;
-gint ett_opcua_array_NodeAttributesMask;
-gint ett_opcua_array_AttributeWriteMask;
-gint ett_opcua_array_BrowseDirection;
-gint ett_opcua_array_BrowseResultMask;
-gint ett_opcua_array_ComplianceLevel;
-gint ett_opcua_array_FilterOperator;
-gint ett_opcua_array_TimestampsToReturn;
-gint ett_opcua_array_HistoryUpdateType;
-gint ett_opcua_array_PerformUpdateType;
-gint ett_opcua_array_MonitoringMode;
-gint ett_opcua_array_DataChangeTrigger;
-gint ett_opcua_array_DeadbandType;
-gint ett_opcua_array_EnumeratedTestType;
-gint ett_opcua_array_RedundancySupport;
-gint ett_opcua_array_ServerState;
-gint ett_opcua_array_ModelChangeStructureVerbMask;
-gint ett_opcua_array_AxisScaleEnumeration;
-gint ett_opcua_array_ExceptionDeviationFormat;
+int ett_opcua_array_NodeIdType;
+int ett_opcua_array_NamingRuleType;
+int ett_opcua_array_OpenFileMode;
+int ett_opcua_array_TrustListMasks;
+int ett_opcua_array_IdType;
+int ett_opcua_array_NodeClass;
+int ett_opcua_array_ApplicationType;
+int ett_opcua_array_MessageSecurityMode;
+int ett_opcua_array_UserTokenType;
+int ett_opcua_array_SecurityTokenRequestType;
+int ett_opcua_array_NodeAttributesMask;
+int ett_opcua_array_AttributeWriteMask;
+int ett_opcua_array_BrowseDirection;
+int ett_opcua_array_BrowseResultMask;
+int ett_opcua_array_ComplianceLevel;
+int ett_opcua_array_FilterOperator;
+int ett_opcua_array_TimestampsToReturn;
+int ett_opcua_array_HistoryUpdateType;
+int ett_opcua_array_PerformUpdateType;
+int ett_opcua_array_MonitoringMode;
+int ett_opcua_array_DataChangeTrigger;
+int ett_opcua_array_DeadbandType;
+int ett_opcua_array_EnumeratedTestType;
+int ett_opcua_array_RedundancySupport;
+int ett_opcua_array_ServerState;
+int ett_opcua_array_ModelChangeStructureVerbMask;
+int ett_opcua_array_AxisScaleEnumeration;
+int ett_opcua_array_ExceptionDeviationFormat;
/** NodeIdType enum table */
static const value_string g_NodeIdTypeTable[] = {
@@ -63,7 +63,7 @@ static const value_string g_NodeIdTypeTable[] = {
};
static int hf_opcua_NodeIdType;
-void parseNodeIdType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseNodeIdType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_NodeIdType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -76,7 +76,7 @@ static const value_string g_NamingRuleTypeTable[] = {
};
static int hf_opcua_NamingRuleType;
-void parseNamingRuleType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseNamingRuleType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_NamingRuleType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -90,7 +90,7 @@ static const value_string g_OpenFileModeTable[] = {
};
static int hf_opcua_OpenFileMode;
-void parseOpenFileMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseOpenFileMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_OpenFileMode, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -106,7 +106,7 @@ static const value_string g_TrustListMasksTable[] = {
};
static int hf_opcua_TrustListMasks;
-void parseTrustListMasks(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseTrustListMasks(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_TrustListMasks, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -120,7 +120,7 @@ static const value_string g_IdTypeTable[] = {
};
static int hf_opcua_IdType;
-void parseIdType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseIdType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_IdType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -139,7 +139,7 @@ static const value_string g_NodeClassTable[] = {
};
static int hf_opcua_NodeClass;
-void parseNodeClass(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseNodeClass(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_NodeClass, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -153,7 +153,7 @@ static const value_string g_ApplicationTypeTable[] = {
};
static int hf_opcua_ApplicationType;
-void parseApplicationType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseApplicationType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_ApplicationType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -167,7 +167,7 @@ static const value_string g_MessageSecurityModeTable[] = {
};
static int hf_opcua_MessageSecurityMode;
-void parseMessageSecurityMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseMessageSecurityMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_MessageSecurityMode, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -182,7 +182,7 @@ static const value_string g_UserTokenTypeTable[] = {
};
static int hf_opcua_UserTokenType;
-void parseUserTokenType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseUserTokenType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_UserTokenType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -194,7 +194,7 @@ static const value_string g_SecurityTokenRequestTypeTable[] = {
};
static int hf_opcua_SecurityTokenRequestType;
-void parseSecurityTokenRequestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseSecurityTokenRequestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_SecurityTokenRequestType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -236,7 +236,7 @@ static const value_string g_NodeAttributesMaskTable[] = {
};
static int hf_opcua_NodeAttributesMask;
-void parseNodeAttributesMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseNodeAttributesMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_NodeAttributesMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -273,7 +273,7 @@ static const value_string g_AttributeWriteMaskTable[] = {
};
static int hf_opcua_AttributeWriteMask;
-void parseAttributeWriteMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseAttributeWriteMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_AttributeWriteMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -287,7 +287,7 @@ static const value_string g_BrowseDirectionTable[] = {
};
static int hf_opcua_BrowseDirection;
-void parseBrowseDirection(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseBrowseDirection(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_BrowseDirection, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -302,7 +302,7 @@ static const value_string g_ComplianceLevelTable[] = {
};
static int hf_opcua_ComplianceLevel;
-void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_ComplianceLevel, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -330,7 +330,7 @@ static const value_string g_FilterOperatorTable[] = {
};
static int hf_opcua_FilterOperator;
-void parseFilterOperator(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseFilterOperator(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_FilterOperator, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -345,7 +345,7 @@ static const value_string g_TimestampsToReturnTable[] = {
};
static int hf_opcua_TimestampsToReturn;
-void parseTimestampsToReturn(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseTimestampsToReturn(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_TimestampsToReturn, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -359,7 +359,7 @@ static const value_string g_HistoryUpdateTypeTable[] = {
};
static int hf_opcua_HistoryUpdateType;
-void parseHistoryUpdateType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseHistoryUpdateType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_HistoryUpdateType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -373,7 +373,7 @@ static const value_string g_PerformUpdateTypeTable[] = {
};
static int hf_opcua_PerformUpdateType;
-void parsePerformUpdateType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parsePerformUpdateType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_PerformUpdateType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -386,7 +386,7 @@ static const value_string g_MonitoringModeTable[] = {
};
static int hf_opcua_MonitoringMode;
-void parseMonitoringMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseMonitoringMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_MonitoringMode, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -399,7 +399,7 @@ static const value_string g_DataChangeTriggerTable[] = {
};
static int hf_opcua_DataChangeTrigger;
-void parseDataChangeTrigger(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseDataChangeTrigger(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_DataChangeTrigger, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -412,7 +412,7 @@ static const value_string g_DeadbandTypeTable[] = {
};
static int hf_opcua_DeadbandType;
-void parseDeadbandType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseDeadbandType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_DeadbandType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -425,7 +425,7 @@ static const value_string g_EnumeratedTestTypeTable[] = {
};
static int hf_opcua_EnumeratedTestType;
-void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_EnumeratedTestType, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -441,7 +441,7 @@ static const value_string g_RedundancySupportTable[] = {
};
static int hf_opcua_RedundancySupport;
-void parseRedundancySupport(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseRedundancySupport(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_RedundancySupport, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -459,7 +459,7 @@ static const value_string g_ServerStateTable[] = {
};
static int hf_opcua_ServerState;
-void parseServerState(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseServerState(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_ServerState, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -474,7 +474,7 @@ static const value_string g_ModelChangeStructureVerbMaskTable[] = {
};
static int hf_opcua_ModelChangeStructureVerbMask;
-void parseModelChangeStructureVerbMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseModelChangeStructureVerbMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_ModelChangeStructureVerbMask, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -487,7 +487,7 @@ static const value_string g_AxisScaleEnumerationTable[] = {
};
static int hf_opcua_AxisScaleEnumeration;
-void parseAxisScaleEnumeration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseAxisScaleEnumeration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_AxisScaleEnumeration, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -502,7 +502,7 @@ static const value_string g_ExceptionDeviationFormatTable[] = {
};
static int hf_opcua_ExceptionDeviationFormat;
-void parseExceptionDeviationFormat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseExceptionDeviationFormat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_ExceptionDeviationFormat, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
@@ -539,13 +539,13 @@ static const value_string g_AttributeIdTable[] = {
};
static int hf_opcua_AttributeId;
-void parseAttributeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseAttributeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
proto_tree_add_item(tree, hf_opcua_AttributeId, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset += 4;
}
/** Setup enum subtree array */
-static gint *ett[] =
+static int *ett[] =
{
&ett_opcua_array_NodeIdType,
&ett_opcua_array_NamingRuleType,
diff --git a/plugins/epan/opcua/opcua_enumparser.h b/plugins/epan/opcua/opcua_enumparser.h
index c52aa9a3a9..eecf636695 100644
--- a/plugins/epan/opcua/opcua_enumparser.h
+++ b/plugins/epan/opcua/opcua_enumparser.h
@@ -20,62 +20,62 @@
#include <glib.h>
#include <epan/packet.h>
-extern gint ett_opcua_array_NodeIdType;
-extern gint ett_opcua_array_NamingRuleType;
-extern gint ett_opcua_array_OpenFileMode;
-extern gint ett_opcua_array_TrustListMasks;
-extern gint ett_opcua_array_IdType;
-extern gint ett_opcua_array_NodeClass;
-extern gint ett_opcua_array_ApplicationType;
-extern gint ett_opcua_array_MessageSecurityMode;
-extern gint ett_opcua_array_UserTokenType;
-extern gint ett_opcua_array_SecurityTokenRequestType;
-extern gint ett_opcua_array_NodeAttributesMask;
-extern gint ett_opcua_array_AttributeWriteMask;
-extern gint ett_opcua_array_BrowseDirection;
-extern gint ett_opcua_array_BrowseResultMask;
-extern gint ett_opcua_array_ComplianceLevel;
-extern gint ett_opcua_array_FilterOperator;
-extern gint ett_opcua_array_TimestampsToReturn;
-extern gint ett_opcua_array_HistoryUpdateType;
-extern gint ett_opcua_array_PerformUpdateType;
-extern gint ett_opcua_array_MonitoringMode;
-extern gint ett_opcua_array_DataChangeTrigger;
-extern gint ett_opcua_array_DeadbandType;
-extern gint ett_opcua_array_EnumeratedTestType;
-extern gint ett_opcua_array_RedundancySupport;
-extern gint ett_opcua_array_ServerState;
-extern gint ett_opcua_array_ModelChangeStructureVerbMask;
-extern gint ett_opcua_array_AxisScaleEnumeration;
-extern gint ett_opcua_array_ExceptionDeviationFormat;
-extern gint ett_opcua_array_AttributeId;
+extern int ett_opcua_array_NodeIdType;
+extern int ett_opcua_array_NamingRuleType;
+extern int ett_opcua_array_OpenFileMode;
+extern int ett_opcua_array_TrustListMasks;
+extern int ett_opcua_array_IdType;
+extern int ett_opcua_array_NodeClass;
+extern int ett_opcua_array_ApplicationType;
+extern int ett_opcua_array_MessageSecurityMode;
+extern int ett_opcua_array_UserTokenType;
+extern int ett_opcua_array_SecurityTokenRequestType;
+extern int ett_opcua_array_NodeAttributesMask;
+extern int ett_opcua_array_AttributeWriteMask;
+extern int ett_opcua_array_BrowseDirection;
+extern int ett_opcua_array_BrowseResultMask;
+extern int ett_opcua_array_ComplianceLevel;
+extern int ett_opcua_array_FilterOperator;
+extern int ett_opcua_array_TimestampsToReturn;
+extern int ett_opcua_array_HistoryUpdateType;
+extern int ett_opcua_array_PerformUpdateType;
+extern int ett_opcua_array_MonitoringMode;
+extern int ett_opcua_array_DataChangeTrigger;
+extern int ett_opcua_array_DeadbandType;
+extern int ett_opcua_array_EnumeratedTestType;
+extern int ett_opcua_array_RedundancySupport;
+extern int ett_opcua_array_ServerState;
+extern int ett_opcua_array_ModelChangeStructureVerbMask;
+extern int ett_opcua_array_AxisScaleEnumeration;
+extern int ett_opcua_array_ExceptionDeviationFormat;
+extern int ett_opcua_array_AttributeId;
-void parseNodeIdType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseNamingRuleType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseOpenFileMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTrustListMasks(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseIdType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseNodeClass(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseApplicationType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseMessageSecurityMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseUserTokenType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseSecurityTokenRequestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseNodeAttributesMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseAttributeWriteMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseBrowseDirection(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseFilterOperator(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTimestampsToReturn(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseHistoryUpdateType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parsePerformUpdateType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseMonitoringMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDataChangeTrigger(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeadbandType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRedundancySupport(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseServerState(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseModelChangeStructureVerbMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseAxisScaleEnumeration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseExceptionDeviationFormat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseAttributeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
+void parseNodeIdType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseNamingRuleType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseOpenFileMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTrustListMasks(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseIdType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseNodeClass(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseApplicationType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseMessageSecurityMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseUserTokenType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseSecurityTokenRequestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseNodeAttributesMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseAttributeWriteMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseBrowseDirection(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseComplianceLevel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseFilterOperator(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTimestampsToReturn(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseHistoryUpdateType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parsePerformUpdateType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseMonitoringMode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDataChangeTrigger(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeadbandType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseEnumeratedTestType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRedundancySupport(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseServerState(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseModelChangeStructureVerbMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseAxisScaleEnumeration(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseExceptionDeviationFormat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseAttributeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
void registerEnumTypes(int proto);
diff --git a/plugins/epan/opcua/opcua_extensionobjecttable.c b/plugins/epan/opcua/opcua_extensionobjecttable.c
index 2b9ae3c923..e2d4e2db19 100644
--- a/plugins/epan/opcua/opcua_extensionobjecttable.c
+++ b/plugins/epan/opcua/opcua_extensionobjecttable.c
@@ -167,21 +167,20 @@ ExtensionObjectParserEntry g_arExtensionObjectParserTable[] = {
{ OpcUaId_ProgramDiagnosticDataType_Encoding_DefaultBinary, parseProgramDiagnosticDataType, "ProgramDiagnosticDataType" },
{ OpcUaId_Annotation_Encoding_DefaultBinary, parseAnnotation, "Annotation" },
};
-const int g_NumTypes = sizeof(g_arExtensionObjectParserTable) / sizeof(ExtensionObjectParserEntry);
/** Dispatch all extension objects to a special parser function. */
-void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int TypeId)
+void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int TypeId)
{
- gint iOffset = *pOffset;
- int indx = 0;
- int bFound = 0;
- gint32 iLen = 0;
+ int iOffset = *pOffset;
+ unsigned indx = 0;
+ int bFound = 0;
+ int32_t iLen = 0;
/* get the length of the body */
iLen = tvb_get_letohl(tvb, iOffset);
iOffset += 4;
- while (indx < g_NumTypes)
+ while (indx < array_length(g_arExtensionObjectParserTable))
{
if (g_arExtensionObjectParserTable[indx].iRequestId == TypeId)
{
diff --git a/plugins/epan/opcua/opcua_identifiers.h b/plugins/epan/opcua/opcua_identifiers.h
index 2cff1b299b..aaad89ec2c 100644
--- a/plugins/epan/opcua/opcua_identifiers.h
+++ b/plugins/epan/opcua/opcua_identifiers.h
@@ -21,13 +21,13 @@
#include <epan/packet.h>
/* declare service parser function prototype */
-typedef void (*fctServiceParser)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
+typedef void (*fctServiceParser)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
/* declare enum parser function prototype */
-typedef void (*fctEnumParser)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
+typedef void (*fctEnumParser)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
/* declare type parser function prototype */
-typedef void (*fctComplexTypeParser)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
+typedef void (*fctComplexTypeParser)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
/* declare type parser function prototype */
-typedef proto_item* (*fctSimpleTypeParser)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
+typedef proto_item* (*fctSimpleTypeParser)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
typedef struct _ParserEntry
{
@@ -39,5 +39,5 @@ typedef struct _ExtensionObjectParserEntry
{
int iRequestId;
fctComplexTypeParser pParser;
- const gchar *typeName;
+ const char *typeName;
} ExtensionObjectParserEntry;
diff --git a/plugins/epan/opcua/opcua_keyset.h b/plugins/epan/opcua/opcua_keyset.h
index 0492427b4c..faa1bea6d2 100644
--- a/plugins/epan/opcua/opcua_keyset.h
+++ b/plugins/epan/opcua/opcua_keyset.h
@@ -28,8 +28,8 @@ struct ua_keyset {
unsigned char server_key[32]; /**< server encryption key */
unsigned int client_key_len; /**< AES key length: 16 (AES-128) or 32 (AES-256) */
unsigned int server_key_len; /**< AES key length: 16 (AES-128) or 32 (AES-256) */
- unsigned int client_sig_len; /**< Client side symmetric signture length. */
- unsigned int server_sig_len; /**< Server side symmetric signture length. */
+ unsigned int client_sig_len; /**< Client side symmetric signature length. */
+ unsigned int server_sig_len; /**< Server side symmetric signature length. */
};
int ua_keysets_init(void);
diff --git a/plugins/epan/opcua/opcua_security_layer.c b/plugins/epan/opcua/opcua_security_layer.c
index 5e66c1a194..4b5a630355 100644
--- a/plugins/epan/opcua/opcua_security_layer.c
+++ b/plugins/epan/opcua/opcua_security_layer.c
@@ -52,13 +52,13 @@ void registerSequenceLayerTypes(int proto)
}
/* The symmetric security header consists only of one field. */
-void parseSecurityHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, struct ua_metadata *data _U_)
+void parseSecurityHeader(proto_tree *tree, tvbuff_t *tvb, int *pOffset, struct ua_metadata *data _U_)
{
proto_tree_add_item(tree, hf_opcua_security_tokenid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
}
/* Sequence header can optionally be encrypted. */
-void parseSequenceHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, struct ua_metadata *data)
+void parseSequenceHeader(proto_tree *tree, tvbuff_t *tvb, int *pOffset, struct ua_metadata *data)
{
if (!data->encrypted) {
proto_tree_add_item(tree, hf_opcua_sequence_seqno, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
@@ -67,13 +67,13 @@ void parseSequenceHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, struct
}
/* Parse symmetric security footer (signed only) */
-void parseSecurityFooterSO(proto_tree *tree, tvbuff_t *tvb, gint offset, guint sig_len)
+void parseSecurityFooterSO(proto_tree *tree, tvbuff_t *tvb, int offset, unsigned sig_len)
{
proto_tree_add_item(tree, hf_opcua_security_signature, tvb, offset, sig_len, ENC_NA);
}
/* Parse symmetric security footer (signed and encrypted) */
-void parseSecurityFooterSAE(proto_tree *tree, tvbuff_t *tvb, gint offset, guint pad_len, guint sig_len)
+void parseSecurityFooterSAE(proto_tree *tree, tvbuff_t *tvb, int offset, unsigned pad_len, unsigned sig_len)
{
proto_tree_add_item(tree, hf_opcua_security_padding, tvb, offset, pad_len + 1, ENC_NA);
proto_tree_add_item(tree, hf_opcua_security_signature, tvb, offset + pad_len + 1, sig_len, ENC_NA);
diff --git a/plugins/epan/opcua/opcua_security_layer.h b/plugins/epan/opcua/opcua_security_layer.h
index c05a2d7242..c4dc2fe643 100644
--- a/plugins/epan/opcua/opcua_security_layer.h
+++ b/plugins/epan/opcua/opcua_security_layer.h
@@ -18,7 +18,7 @@ struct ua_metadata;
void registerSecurityLayerTypes(int proto);
void registerSequenceLayerTypes(int proto);
-void parseSecurityHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, struct ua_metadata *data);
-void parseSequenceHeader(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, struct ua_metadata *data);
-void parseSecurityFooterSO(proto_tree *tree, tvbuff_t *tvb, gint offset, guint sig_len);
-void parseSecurityFooterSAE(proto_tree *tree, tvbuff_t *tvb, gint offset, guint pad_len, guint sig_len);
+void parseSecurityHeader(proto_tree *tree, tvbuff_t *tvb, int *pOffset, struct ua_metadata *data);
+void parseSequenceHeader(proto_tree *tree, tvbuff_t *tvb, int *pOffset, struct ua_metadata *data);
+void parseSecurityFooterSO(proto_tree *tree, tvbuff_t *tvb, int offset, unsigned sig_len);
+void parseSecurityFooterSAE(proto_tree *tree, tvbuff_t *tvb, int offset, unsigned pad_len, unsigned sig_len);
diff --git a/plugins/epan/opcua/opcua_serviceparser.c b/plugins/epan/opcua/opcua_serviceparser.c
index a38c86e836..408cb3edb0 100644
--- a/plugins/epan/opcua/opcua_serviceparser.c
+++ b/plugins/epan/opcua/opcua_serviceparser.c
@@ -25,174 +25,174 @@
#include "opcua_hfindeces.h"
#include "opcua_serviceparser.h"
-gint ett_opcua_ServiceFault;
-gint ett_opcua_array_ServiceFault;
-gint ett_opcua_FindServersRequest;
-gint ett_opcua_array_FindServersRequest;
-gint ett_opcua_FindServersResponse;
-gint ett_opcua_array_FindServersResponse;
-gint ett_opcua_FindServersOnNetworkRequest;
-gint ett_opcua_array_FindServersOnNetworkRequest;
-gint ett_opcua_FindServersOnNetworkResponse;
-gint ett_opcua_array_FindServersOnNetworkResponse;
-gint ett_opcua_GetEndpointsRequest;
-gint ett_opcua_array_GetEndpointsRequest;
-gint ett_opcua_GetEndpointsResponse;
-gint ett_opcua_array_GetEndpointsResponse;
-gint ett_opcua_RegisterServerRequest;
-gint ett_opcua_array_RegisterServerRequest;
-gint ett_opcua_RegisterServerResponse;
-gint ett_opcua_array_RegisterServerResponse;
-gint ett_opcua_RegisterServer2Request;
-gint ett_opcua_array_RegisterServer2Request;
-gint ett_opcua_RegisterServer2Response;
-gint ett_opcua_array_RegisterServer2Response;
-gint ett_opcua_OpenSecureChannelRequest;
-gint ett_opcua_array_OpenSecureChannelRequest;
-gint ett_opcua_OpenSecureChannelResponse;
-gint ett_opcua_array_OpenSecureChannelResponse;
-gint ett_opcua_CloseSecureChannelRequest;
-gint ett_opcua_array_CloseSecureChannelRequest;
-gint ett_opcua_CloseSecureChannelResponse;
-gint ett_opcua_array_CloseSecureChannelResponse;
-gint ett_opcua_CreateSessionRequest;
-gint ett_opcua_array_CreateSessionRequest;
-gint ett_opcua_CreateSessionResponse;
-gint ett_opcua_array_CreateSessionResponse;
-gint ett_opcua_ActivateSessionRequest;
-gint ett_opcua_array_ActivateSessionRequest;
-gint ett_opcua_ActivateSessionResponse;
-gint ett_opcua_array_ActivateSessionResponse;
-gint ett_opcua_CloseSessionRequest;
-gint ett_opcua_array_CloseSessionRequest;
-gint ett_opcua_CloseSessionResponse;
-gint ett_opcua_array_CloseSessionResponse;
-gint ett_opcua_CancelRequest;
-gint ett_opcua_array_CancelRequest;
-gint ett_opcua_CancelResponse;
-gint ett_opcua_array_CancelResponse;
-gint ett_opcua_AddNodesRequest;
-gint ett_opcua_array_AddNodesRequest;
-gint ett_opcua_AddNodesResponse;
-gint ett_opcua_array_AddNodesResponse;
-gint ett_opcua_AddReferencesRequest;
-gint ett_opcua_array_AddReferencesRequest;
-gint ett_opcua_AddReferencesResponse;
-gint ett_opcua_array_AddReferencesResponse;
-gint ett_opcua_DeleteNodesRequest;
-gint ett_opcua_array_DeleteNodesRequest;
-gint ett_opcua_DeleteNodesResponse;
-gint ett_opcua_array_DeleteNodesResponse;
-gint ett_opcua_DeleteReferencesRequest;
-gint ett_opcua_array_DeleteReferencesRequest;
-gint ett_opcua_DeleteReferencesResponse;
-gint ett_opcua_array_DeleteReferencesResponse;
-gint ett_opcua_BrowseRequest;
-gint ett_opcua_array_BrowseRequest;
-gint ett_opcua_BrowseResponse;
-gint ett_opcua_array_BrowseResponse;
-gint ett_opcua_BrowseNextRequest;
-gint ett_opcua_array_BrowseNextRequest;
-gint ett_opcua_BrowseNextResponse;
-gint ett_opcua_array_BrowseNextResponse;
-gint ett_opcua_TranslateBrowsePathsToNodeIdsRequest;
-gint ett_opcua_array_TranslateBrowsePathsToNodeIdsRequest;
-gint ett_opcua_TranslateBrowsePathsToNodeIdsResponse;
-gint ett_opcua_array_TranslateBrowsePathsToNodeIdsResponse;
-gint ett_opcua_RegisterNodesRequest;
-gint ett_opcua_array_RegisterNodesRequest;
-gint ett_opcua_RegisterNodesResponse;
-gint ett_opcua_array_RegisterNodesResponse;
-gint ett_opcua_UnregisterNodesRequest;
-gint ett_opcua_array_UnregisterNodesRequest;
-gint ett_opcua_UnregisterNodesResponse;
-gint ett_opcua_array_UnregisterNodesResponse;
-gint ett_opcua_QueryFirstRequest;
-gint ett_opcua_array_QueryFirstRequest;
-gint ett_opcua_QueryFirstResponse;
-gint ett_opcua_array_QueryFirstResponse;
-gint ett_opcua_QueryNextRequest;
-gint ett_opcua_array_QueryNextRequest;
-gint ett_opcua_QueryNextResponse;
-gint ett_opcua_array_QueryNextResponse;
-gint ett_opcua_ReadRequest;
-gint ett_opcua_array_ReadRequest;
-gint ett_opcua_ReadResponse;
-gint ett_opcua_array_ReadResponse;
-gint ett_opcua_HistoryReadRequest;
-gint ett_opcua_array_HistoryReadRequest;
-gint ett_opcua_HistoryReadResponse;
-gint ett_opcua_array_HistoryReadResponse;
-gint ett_opcua_WriteRequest;
-gint ett_opcua_array_WriteRequest;
-gint ett_opcua_WriteResponse;
-gint ett_opcua_array_WriteResponse;
-gint ett_opcua_HistoryUpdateRequest;
-gint ett_opcua_array_HistoryUpdateRequest;
-gint ett_opcua_HistoryUpdateResponse;
-gint ett_opcua_array_HistoryUpdateResponse;
-gint ett_opcua_CallRequest;
-gint ett_opcua_array_CallRequest;
-gint ett_opcua_CallResponse;
-gint ett_opcua_array_CallResponse;
-gint ett_opcua_CreateMonitoredItemsRequest;
-gint ett_opcua_array_CreateMonitoredItemsRequest;
-gint ett_opcua_CreateMonitoredItemsResponse;
-gint ett_opcua_array_CreateMonitoredItemsResponse;
-gint ett_opcua_ModifyMonitoredItemsRequest;
-gint ett_opcua_array_ModifyMonitoredItemsRequest;
-gint ett_opcua_ModifyMonitoredItemsResponse;
-gint ett_opcua_array_ModifyMonitoredItemsResponse;
-gint ett_opcua_SetMonitoringModeRequest;
-gint ett_opcua_array_SetMonitoringModeRequest;
-gint ett_opcua_SetMonitoringModeResponse;
-gint ett_opcua_array_SetMonitoringModeResponse;
-gint ett_opcua_SetTriggeringRequest;
-gint ett_opcua_array_SetTriggeringRequest;
-gint ett_opcua_SetTriggeringResponse;
-gint ett_opcua_array_SetTriggeringResponse;
-gint ett_opcua_DeleteMonitoredItemsRequest;
-gint ett_opcua_array_DeleteMonitoredItemsRequest;
-gint ett_opcua_DeleteMonitoredItemsResponse;
-gint ett_opcua_array_DeleteMonitoredItemsResponse;
-gint ett_opcua_CreateSubscriptionRequest;
-gint ett_opcua_array_CreateSubscriptionRequest;
-gint ett_opcua_CreateSubscriptionResponse;
-gint ett_opcua_array_CreateSubscriptionResponse;
-gint ett_opcua_ModifySubscriptionRequest;
-gint ett_opcua_array_ModifySubscriptionRequest;
-gint ett_opcua_ModifySubscriptionResponse;
-gint ett_opcua_array_ModifySubscriptionResponse;
-gint ett_opcua_SetPublishingModeRequest;
-gint ett_opcua_array_SetPublishingModeRequest;
-gint ett_opcua_SetPublishingModeResponse;
-gint ett_opcua_array_SetPublishingModeResponse;
-gint ett_opcua_PublishRequest;
-gint ett_opcua_array_PublishRequest;
-gint ett_opcua_PublishResponse;
-gint ett_opcua_array_PublishResponse;
-gint ett_opcua_RepublishRequest;
-gint ett_opcua_array_RepublishRequest;
-gint ett_opcua_RepublishResponse;
-gint ett_opcua_array_RepublishResponse;
-gint ett_opcua_TransferSubscriptionsRequest;
-gint ett_opcua_array_TransferSubscriptionsRequest;
-gint ett_opcua_TransferSubscriptionsResponse;
-gint ett_opcua_array_TransferSubscriptionsResponse;
-gint ett_opcua_DeleteSubscriptionsRequest;
-gint ett_opcua_array_DeleteSubscriptionsRequest;
-gint ett_opcua_DeleteSubscriptionsResponse;
-gint ett_opcua_array_DeleteSubscriptionsResponse;
-gint ett_opcua_TestStackRequest;
-gint ett_opcua_array_TestStackRequest;
-gint ett_opcua_TestStackResponse;
-gint ett_opcua_array_TestStackResponse;
-gint ett_opcua_TestStackExRequest;
-gint ett_opcua_array_TestStackExRequest;
-gint ett_opcua_TestStackExResponse;
-gint ett_opcua_array_TestStackExResponse;
-
-void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+int ett_opcua_ServiceFault;
+int ett_opcua_array_ServiceFault;
+int ett_opcua_FindServersRequest;
+int ett_opcua_array_FindServersRequest;
+int ett_opcua_FindServersResponse;
+int ett_opcua_array_FindServersResponse;
+int ett_opcua_FindServersOnNetworkRequest;
+int ett_opcua_array_FindServersOnNetworkRequest;
+int ett_opcua_FindServersOnNetworkResponse;
+int ett_opcua_array_FindServersOnNetworkResponse;
+int ett_opcua_GetEndpointsRequest;
+int ett_opcua_array_GetEndpointsRequest;
+int ett_opcua_GetEndpointsResponse;
+int ett_opcua_array_GetEndpointsResponse;
+int ett_opcua_RegisterServerRequest;
+int ett_opcua_array_RegisterServerRequest;
+int ett_opcua_RegisterServerResponse;
+int ett_opcua_array_RegisterServerResponse;
+int ett_opcua_RegisterServer2Request;
+int ett_opcua_array_RegisterServer2Request;
+int ett_opcua_RegisterServer2Response;
+int ett_opcua_array_RegisterServer2Response;
+int ett_opcua_OpenSecureChannelRequest;
+int ett_opcua_array_OpenSecureChannelRequest;
+int ett_opcua_OpenSecureChannelResponse;
+int ett_opcua_array_OpenSecureChannelResponse;
+int ett_opcua_CloseSecureChannelRequest;
+int ett_opcua_array_CloseSecureChannelRequest;
+int ett_opcua_CloseSecureChannelResponse;
+int ett_opcua_array_CloseSecureChannelResponse;
+int ett_opcua_CreateSessionRequest;
+int ett_opcua_array_CreateSessionRequest;
+int ett_opcua_CreateSessionResponse;
+int ett_opcua_array_CreateSessionResponse;
+int ett_opcua_ActivateSessionRequest;
+int ett_opcua_array_ActivateSessionRequest;
+int ett_opcua_ActivateSessionResponse;
+int ett_opcua_array_ActivateSessionResponse;
+int ett_opcua_CloseSessionRequest;
+int ett_opcua_array_CloseSessionRequest;
+int ett_opcua_CloseSessionResponse;
+int ett_opcua_array_CloseSessionResponse;
+int ett_opcua_CancelRequest;
+int ett_opcua_array_CancelRequest;
+int ett_opcua_CancelResponse;
+int ett_opcua_array_CancelResponse;
+int ett_opcua_AddNodesRequest;
+int ett_opcua_array_AddNodesRequest;
+int ett_opcua_AddNodesResponse;
+int ett_opcua_array_AddNodesResponse;
+int ett_opcua_AddReferencesRequest;
+int ett_opcua_array_AddReferencesRequest;
+int ett_opcua_AddReferencesResponse;
+int ett_opcua_array_AddReferencesResponse;
+int ett_opcua_DeleteNodesRequest;
+int ett_opcua_array_DeleteNodesRequest;
+int ett_opcua_DeleteNodesResponse;
+int ett_opcua_array_DeleteNodesResponse;
+int ett_opcua_DeleteReferencesRequest;
+int ett_opcua_array_DeleteReferencesRequest;
+int ett_opcua_DeleteReferencesResponse;
+int ett_opcua_array_DeleteReferencesResponse;
+int ett_opcua_BrowseRequest;
+int ett_opcua_array_BrowseRequest;
+int ett_opcua_BrowseResponse;
+int ett_opcua_array_BrowseResponse;
+int ett_opcua_BrowseNextRequest;
+int ett_opcua_array_BrowseNextRequest;
+int ett_opcua_BrowseNextResponse;
+int ett_opcua_array_BrowseNextResponse;
+int ett_opcua_TranslateBrowsePathsToNodeIdsRequest;
+int ett_opcua_array_TranslateBrowsePathsToNodeIdsRequest;
+int ett_opcua_TranslateBrowsePathsToNodeIdsResponse;
+int ett_opcua_array_TranslateBrowsePathsToNodeIdsResponse;
+int ett_opcua_RegisterNodesRequest;
+int ett_opcua_array_RegisterNodesRequest;
+int ett_opcua_RegisterNodesResponse;
+int ett_opcua_array_RegisterNodesResponse;
+int ett_opcua_UnregisterNodesRequest;
+int ett_opcua_array_UnregisterNodesRequest;
+int ett_opcua_UnregisterNodesResponse;
+int ett_opcua_array_UnregisterNodesResponse;
+int ett_opcua_QueryFirstRequest;
+int ett_opcua_array_QueryFirstRequest;
+int ett_opcua_QueryFirstResponse;
+int ett_opcua_array_QueryFirstResponse;
+int ett_opcua_QueryNextRequest;
+int ett_opcua_array_QueryNextRequest;
+int ett_opcua_QueryNextResponse;
+int ett_opcua_array_QueryNextResponse;
+int ett_opcua_ReadRequest;
+int ett_opcua_array_ReadRequest;
+int ett_opcua_ReadResponse;
+int ett_opcua_array_ReadResponse;
+int ett_opcua_HistoryReadRequest;
+int ett_opcua_array_HistoryReadRequest;
+int ett_opcua_HistoryReadResponse;
+int ett_opcua_array_HistoryReadResponse;
+int ett_opcua_WriteRequest;
+int ett_opcua_array_WriteRequest;
+int ett_opcua_WriteResponse;
+int ett_opcua_array_WriteResponse;
+int ett_opcua_HistoryUpdateRequest;
+int ett_opcua_array_HistoryUpdateRequest;
+int ett_opcua_HistoryUpdateResponse;
+int ett_opcua_array_HistoryUpdateResponse;
+int ett_opcua_CallRequest;
+int ett_opcua_array_CallRequest;
+int ett_opcua_CallResponse;
+int ett_opcua_array_CallResponse;
+int ett_opcua_CreateMonitoredItemsRequest;
+int ett_opcua_array_CreateMonitoredItemsRequest;
+int ett_opcua_CreateMonitoredItemsResponse;
+int ett_opcua_array_CreateMonitoredItemsResponse;
+int ett_opcua_ModifyMonitoredItemsRequest;
+int ett_opcua_array_ModifyMonitoredItemsRequest;
+int ett_opcua_ModifyMonitoredItemsResponse;
+int ett_opcua_array_ModifyMonitoredItemsResponse;
+int ett_opcua_SetMonitoringModeRequest;
+int ett_opcua_array_SetMonitoringModeRequest;
+int ett_opcua_SetMonitoringModeResponse;
+int ett_opcua_array_SetMonitoringModeResponse;
+int ett_opcua_SetTriggeringRequest;
+int ett_opcua_array_SetTriggeringRequest;
+int ett_opcua_SetTriggeringResponse;
+int ett_opcua_array_SetTriggeringResponse;
+int ett_opcua_DeleteMonitoredItemsRequest;
+int ett_opcua_array_DeleteMonitoredItemsRequest;
+int ett_opcua_DeleteMonitoredItemsResponse;
+int ett_opcua_array_DeleteMonitoredItemsResponse;
+int ett_opcua_CreateSubscriptionRequest;
+int ett_opcua_array_CreateSubscriptionRequest;
+int ett_opcua_CreateSubscriptionResponse;
+int ett_opcua_array_CreateSubscriptionResponse;
+int ett_opcua_ModifySubscriptionRequest;
+int ett_opcua_array_ModifySubscriptionRequest;
+int ett_opcua_ModifySubscriptionResponse;
+int ett_opcua_array_ModifySubscriptionResponse;
+int ett_opcua_SetPublishingModeRequest;
+int ett_opcua_array_SetPublishingModeRequest;
+int ett_opcua_SetPublishingModeResponse;
+int ett_opcua_array_SetPublishingModeResponse;
+int ett_opcua_PublishRequest;
+int ett_opcua_array_PublishRequest;
+int ett_opcua_PublishResponse;
+int ett_opcua_array_PublishResponse;
+int ett_opcua_RepublishRequest;
+int ett_opcua_array_RepublishRequest;
+int ett_opcua_RepublishResponse;
+int ett_opcua_array_RepublishResponse;
+int ett_opcua_TransferSubscriptionsRequest;
+int ett_opcua_array_TransferSubscriptionsRequest;
+int ett_opcua_TransferSubscriptionsResponse;
+int ett_opcua_array_TransferSubscriptionsResponse;
+int ett_opcua_DeleteSubscriptionsRequest;
+int ett_opcua_array_DeleteSubscriptionsRequest;
+int ett_opcua_DeleteSubscriptionsResponse;
+int ett_opcua_array_DeleteSubscriptionsResponse;
+int ett_opcua_TestStackRequest;
+int ett_opcua_array_TestStackRequest;
+int ett_opcua_TestStackResponse;
+int ett_opcua_array_TestStackResponse;
+int ett_opcua_TestStackExRequest;
+int ett_opcua_array_TestStackExRequest;
+int ett_opcua_TestStackExResponse;
+int ett_opcua_array_TestStackExResponse;
+
+void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ServiceFault, &ti, "ServiceFault");
@@ -200,7 +200,7 @@ void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_FindServersRequest, &ti, "FindServersRequest");
@@ -213,7 +213,7 @@ void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseArraySimple(subtree, tvb, pinfo, pOffset, "ServerUris", "String", hf_opcua_ServerUris, parseString, ett_opcua_array_String);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseFindServersResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseFindServersResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_FindServersResponse, &ti, "FindServersResponse");
@@ -223,7 +223,7 @@ void parseFindServersResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Servers", "ApplicationDescription", parseApplicationDescription, ett_opcua_array_ApplicationDescription);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseFindServersOnNetworkRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseFindServersOnNetworkRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_FindServersOnNetworkRequest, &ti, "FindServersOnNetworkRequest");
@@ -235,7 +235,7 @@ void parseFindServersOnNetworkRequest(proto_tree *tree, tvbuff_t *tvb, packet_in
parseArraySimple(subtree, tvb, pinfo, pOffset, "ServerCapabilityFilter", "String", hf_opcua_ServerCapabilityFilter, parseString, ett_opcua_array_String);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseFindServersOnNetworkResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseFindServersOnNetworkResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_FindServersOnNetworkResponse, &ti, "FindServersOnNetworkResponse");
@@ -246,7 +246,7 @@ void parseFindServersOnNetworkResponse(proto_tree *tree, tvbuff_t *tvb, packet_i
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Servers", "ServerOnNetwork", parseServerOnNetwork, ett_opcua_array_ServerOnNetwork);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseGetEndpointsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseGetEndpointsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_GetEndpointsRequest, &ti, "GetEndpointsRequest");
@@ -259,7 +259,7 @@ void parseGetEndpointsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArraySimple(subtree, tvb, pinfo, pOffset, "ProfileUris", "String", hf_opcua_ProfileUris, parseString, ett_opcua_array_String);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseGetEndpointsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseGetEndpointsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_GetEndpointsResponse, &ti, "GetEndpointsResponse");
@@ -269,7 +269,7 @@ void parseGetEndpointsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "Endpoints", "EndpointDescription", parseEndpointDescription, ett_opcua_array_EndpointDescription);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRegisterServerRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseRegisterServerRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterServerRequest, &ti, "RegisterServerRequest");
@@ -278,7 +278,7 @@ void parseRegisterServerRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseRegisteredServer(subtree, tvb, pinfo, pOffset, "Server");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRegisterServerResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseRegisterServerResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterServerResponse, &ti, "RegisterServerResponse");
@@ -286,7 +286,7 @@ void parseRegisterServerResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRegisterServer2Request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseRegisterServer2Request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterServer2Request, &ti, "RegisterServer2Request");
@@ -297,7 +297,7 @@ void parseRegisterServer2Request(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiscoveryConfiguration", "ExtensionObject", parseExtensionObject, ett_opcua_array_ExtensionObject);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRegisterServer2Response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseRegisterServer2Response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterServer2Response, &ti, "RegisterServer2Response");
@@ -309,7 +309,7 @@ void parseRegisterServer2Response(proto_tree *tree, tvbuff_t *tvb, packet_info *
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseOpenSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseOpenSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_OpenSecureChannelRequest, &ti, "OpenSecureChannelRequest");
@@ -322,7 +322,7 @@ void parseOpenSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedLifetime);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseOpenSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseOpenSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_OpenSecureChannelResponse, &ti, "OpenSecureChannelResponse");
@@ -333,7 +333,7 @@ void parseOpenSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerNonce);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCloseSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCloseSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CloseSecureChannelRequest, &ti, "CloseSecureChannelRequest");
@@ -341,7 +341,7 @@ void parseCloseSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info
parseRequestHeader(subtree, tvb, pinfo, pOffset, "RequestHeader");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCloseSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCloseSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CloseSecureChannelResponse, &ti, "CloseSecureChannelResponse");
@@ -349,7 +349,7 @@ void parseCloseSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCreateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCreateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateSessionRequest, &ti, "CreateSessionRequest");
@@ -365,7 +365,7 @@ void parseCreateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxResponseMessageSize);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCreateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCreateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateSessionResponse, &ti, "CreateSessionResponse");
@@ -384,7 +384,7 @@ void parseCreateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxRequestMessageSize);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseActivateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseActivateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ActivateSessionRequest, &ti, "ActivateSessionRequest");
@@ -399,7 +399,7 @@ void parseActivateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseSignatureData(subtree, tvb, pinfo, pOffset, "UserTokenSignature");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseActivateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseActivateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ActivateSessionResponse, &ti, "ActivateSessionResponse");
@@ -412,7 +412,7 @@ void parseActivateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCloseSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCloseSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CloseSessionRequest, &ti, "CloseSessionRequest");
@@ -421,7 +421,7 @@ void parseCloseSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_DeleteSubscriptions);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCloseSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCloseSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CloseSessionResponse, &ti, "CloseSessionResponse");
@@ -429,7 +429,7 @@ void parseCloseSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCancelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCancelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CancelRequest, &ti, "CancelRequest");
@@ -438,7 +438,7 @@ void parseCancelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RequestHandle);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCancelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCancelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CancelResponse, &ti, "CancelResponse");
@@ -447,7 +447,7 @@ void parseCancelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_CancelCount);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAddNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseAddNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_AddNodesRequest, &ti, "AddNodesRequest");
@@ -457,7 +457,7 @@ void parseAddNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToAdd", "AddNodesItem", parseAddNodesItem, ett_opcua_array_AddNodesItem);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAddNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseAddNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_AddNodesResponse, &ti, "AddNodesResponse");
@@ -469,7 +469,7 @@ void parseAddNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAddReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseAddReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_AddReferencesRequest, &ti, "AddReferencesRequest");
@@ -479,7 +479,7 @@ void parseAddReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "ReferencesToAdd", "AddReferencesItem", parseAddReferencesItem, ett_opcua_array_AddReferencesItem);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseAddReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseAddReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_AddReferencesResponse, &ti, "AddReferencesResponse");
@@ -491,7 +491,7 @@ void parseAddReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseDeleteNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteNodesRequest, &ti, "DeleteNodesRequest");
@@ -501,7 +501,7 @@ void parseDeleteNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToDelete", "DeleteNodesItem", parseDeleteNodesItem, ett_opcua_array_DeleteNodesItem);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseDeleteNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteNodesResponse, &ti, "DeleteNodesResponse");
@@ -513,7 +513,7 @@ void parseDeleteNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseDeleteReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteReferencesRequest, &ti, "DeleteReferencesRequest");
@@ -523,7 +523,7 @@ void parseDeleteReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *
parseArrayComplex(subtree, tvb, pinfo, pOffset, "ReferencesToDelete", "DeleteReferencesItem", parseDeleteReferencesItem, ett_opcua_array_DeleteReferencesItem);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseDeleteReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteReferencesResponse, &ti, "DeleteReferencesResponse");
@@ -535,7 +535,7 @@ void parseDeleteReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowseRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseBrowseRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_BrowseRequest, &ti, "BrowseRequest");
@@ -547,7 +547,7 @@ void parseBrowseRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToBrowse", "BrowseDescription", parseBrowseDescription, ett_opcua_array_BrowseDescription);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowseResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseBrowseResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_BrowseResponse, &ti, "BrowseResponse");
@@ -559,7 +559,7 @@ void parseBrowseResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowseNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseBrowseNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_BrowseNextRequest, &ti, "BrowseNextRequest");
@@ -570,7 +570,7 @@ void parseBrowseNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseArraySimple(subtree, tvb, pinfo, pOffset, "ContinuationPoints", "ByteString", hf_opcua_ContinuationPoints, parseByteString, ett_opcua_array_ByteString);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseBrowseNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseBrowseNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_BrowseNextResponse, &ti, "BrowseNextResponse");
@@ -582,7 +582,7 @@ void parseBrowseNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTranslateBrowsePathsToNodeIdsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseTranslateBrowsePathsToNodeIdsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TranslateBrowsePathsToNodeIdsRequest, &ti, "TranslateBrowsePathsToNodeIdsRequest");
@@ -592,7 +592,7 @@ void parseTranslateBrowsePathsToNodeIdsRequest(proto_tree *tree, tvbuff_t *tvb,
parseArrayComplex(subtree, tvb, pinfo, pOffset, "BrowsePaths", "BrowsePath", parseBrowsePath, ett_opcua_array_BrowsePath);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTranslateBrowsePathsToNodeIdsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseTranslateBrowsePathsToNodeIdsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TranslateBrowsePathsToNodeIdsResponse, &ti, "TranslateBrowsePathsToNodeIdsResponse");
@@ -604,7 +604,7 @@ void parseTranslateBrowsePathsToNodeIdsResponse(proto_tree *tree, tvbuff_t *tvb,
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRegisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseRegisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterNodesRequest, &ti, "RegisterNodesRequest");
@@ -614,7 +614,7 @@ void parseRegisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToRegister", "NodeId", parseNodeId, ett_opcua_array_NodeId);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRegisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseRegisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RegisterNodesResponse, &ti, "RegisterNodesResponse");
@@ -624,7 +624,7 @@ void parseRegisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "RegisteredNodeIds", "NodeId", parseNodeId, ett_opcua_array_NodeId);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseUnregisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseUnregisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_UnregisterNodesRequest, &ti, "UnregisterNodesRequest");
@@ -634,7 +634,7 @@ void parseUnregisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *p
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToUnregister", "NodeId", parseNodeId, ett_opcua_array_NodeId);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseUnregisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseUnregisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_UnregisterNodesResponse, &ti, "UnregisterNodesResponse");
@@ -642,7 +642,7 @@ void parseUnregisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *
parseResponseHeader(subtree, tvb, pinfo, pOffset, "ResponseHeader");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseQueryFirstRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseQueryFirstRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_QueryFirstRequest, &ti, "QueryFirstRequest");
@@ -656,7 +656,7 @@ void parseQueryFirstRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_MaxReferencesToReturn);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseQueryFirstResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseQueryFirstResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_QueryFirstResponse, &ti, "QueryFirstResponse");
@@ -672,7 +672,7 @@ void parseQueryFirstResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseContentFilterResult(subtree, tvb, pinfo, pOffset, "FilterResult");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseQueryNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseQueryNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_QueryNextRequest, &ti, "QueryNextRequest");
@@ -682,7 +682,7 @@ void parseQueryNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ContinuationPoint);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseQueryNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseQueryNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_QueryNextResponse, &ti, "QueryNextResponse");
@@ -693,7 +693,7 @@ void parseQueryNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedContinuationPoint);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ReadRequest, &ti, "ReadRequest");
@@ -705,7 +705,7 @@ void parseReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToRead", "ReadValueId", parseReadValueId, ett_opcua_array_ReadValueId);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ReadResponse, &ti, "ReadResponse");
@@ -717,7 +717,7 @@ void parseReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseHistoryReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_HistoryReadRequest, &ti, "HistoryReadRequest");
@@ -730,7 +730,7 @@ void parseHistoryReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToRead", "HistoryReadValueId", parseHistoryReadValueId, ett_opcua_array_HistoryReadValueId);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseHistoryReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_HistoryReadResponse, &ti, "HistoryReadResponse");
@@ -742,7 +742,7 @@ void parseHistoryReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseWriteRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseWriteRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_WriteRequest, &ti, "WriteRequest");
@@ -752,7 +752,7 @@ void parseWriteRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "NodesToWrite", "WriteValue", parseWriteValue, ett_opcua_array_WriteValue);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseWriteResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseWriteResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_WriteResponse, &ti, "WriteResponse");
@@ -764,7 +764,7 @@ void parseWriteResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryUpdateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseHistoryUpdateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_HistoryUpdateRequest, &ti, "HistoryUpdateRequest");
@@ -774,7 +774,7 @@ void parseHistoryUpdateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseArrayComplex(subtree, tvb, pinfo, pOffset, "HistoryUpdateDetails", "ExtensionObject", parseExtensionObject, ett_opcua_array_ExtensionObject);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseHistoryUpdateResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseHistoryUpdateResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_HistoryUpdateResponse, &ti, "HistoryUpdateResponse");
@@ -786,7 +786,7 @@ void parseHistoryUpdateResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCallRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCallRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CallRequest, &ti, "CallRequest");
@@ -796,7 +796,7 @@ void parseCallRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "MethodsToCall", "CallMethodRequest", parseCallMethodRequest, ett_opcua_array_CallMethodRequest);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCallResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCallResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CallResponse, &ti, "CallResponse");
@@ -808,7 +808,7 @@ void parseCallResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCreateMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCreateMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateMonitoredItemsRequest, &ti, "CreateMonitoredItemsRequest");
@@ -820,7 +820,7 @@ void parseCreateMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_in
parseArrayComplex(subtree, tvb, pinfo, pOffset, "ItemsToCreate", "MonitoredItemCreateRequest", parseMonitoredItemCreateRequest, ett_opcua_array_MonitoredItemCreateRequest);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCreateMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCreateMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateMonitoredItemsResponse, &ti, "CreateMonitoredItemsResponse");
@@ -832,7 +832,7 @@ void parseCreateMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_i
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseModifyMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseModifyMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ModifyMonitoredItemsRequest, &ti, "ModifyMonitoredItemsRequest");
@@ -844,7 +844,7 @@ void parseModifyMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_in
parseArrayComplex(subtree, tvb, pinfo, pOffset, "ItemsToModify", "MonitoredItemModifyRequest", parseMonitoredItemModifyRequest, ett_opcua_array_MonitoredItemModifyRequest);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseModifyMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseModifyMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ModifyMonitoredItemsResponse, &ti, "ModifyMonitoredItemsResponse");
@@ -856,7 +856,7 @@ void parseModifyMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_i
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSetMonitoringModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseSetMonitoringModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetMonitoringModeRequest, &ti, "SetMonitoringModeRequest");
@@ -868,7 +868,7 @@ void parseSetMonitoringModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info
parseArraySimple(subtree, tvb, pinfo, pOffset, "MonitoredItemIds", "UInt32", hf_opcua_MonitoredItemIds, parseUInt32, ett_opcua_array_UInt32);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSetMonitoringModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseSetMonitoringModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetMonitoringModeResponse, &ti, "SetMonitoringModeResponse");
@@ -880,7 +880,7 @@ void parseSetMonitoringModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSetTriggeringRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseSetTriggeringRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetTriggeringRequest, &ti, "SetTriggeringRequest");
@@ -894,7 +894,7 @@ void parseSetTriggeringRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseArraySimple(subtree, tvb, pinfo, pOffset, "LinksToRemove", "UInt32", hf_opcua_LinksToRemove, parseUInt32, ett_opcua_array_UInt32);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSetTriggeringResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseSetTriggeringResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetTriggeringResponse, &ti, "SetTriggeringResponse");
@@ -910,7 +910,7 @@ void parseSetTriggeringResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "RemoveDiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseDeleteMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteMonitoredItemsRequest, &ti, "DeleteMonitoredItemsRequest");
@@ -921,7 +921,7 @@ void parseDeleteMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_in
parseArraySimple(subtree, tvb, pinfo, pOffset, "MonitoredItemIds", "UInt32", hf_opcua_MonitoredItemIds, parseUInt32, ett_opcua_array_UInt32);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseDeleteMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteMonitoredItemsResponse, &ti, "DeleteMonitoredItemsResponse");
@@ -933,7 +933,7 @@ void parseDeleteMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_i
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCreateSubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCreateSubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateSubscriptionRequest, &ti, "CreateSubscriptionRequest");
@@ -947,7 +947,7 @@ void parseCreateSubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info
parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_Priority);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCreateSubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseCreateSubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_CreateSubscriptionResponse, &ti, "CreateSubscriptionResponse");
@@ -959,7 +959,7 @@ void parseCreateSubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedMaxKeepAliveCount);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseModifySubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseModifySubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ModifySubscriptionRequest, &ti, "ModifySubscriptionRequest");
@@ -973,7 +973,7 @@ void parseModifySubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info
parseByte(subtree, tvb, pinfo, pOffset, hf_opcua_Priority);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseModifySubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseModifySubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_ModifySubscriptionResponse, &ti, "ModifySubscriptionResponse");
@@ -984,7 +984,7 @@ void parseModifySubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedMaxKeepAliveCount);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSetPublishingModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseSetPublishingModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetPublishingModeRequest, &ti, "SetPublishingModeRequest");
@@ -995,7 +995,7 @@ void parseSetPublishingModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info
parseArraySimple(subtree, tvb, pinfo, pOffset, "SubscriptionIds", "UInt32", hf_opcua_SubscriptionIds, parseUInt32, ett_opcua_array_UInt32);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseSetPublishingModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseSetPublishingModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_SetPublishingModeResponse, &ti, "SetPublishingModeResponse");
@@ -1007,7 +1007,7 @@ void parseSetPublishingModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parsePublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parsePublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_PublishRequest, &ti, "PublishRequest");
@@ -1017,7 +1017,7 @@ void parsePublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
parseArrayComplex(subtree, tvb, pinfo, pOffset, "SubscriptionAcknowledgements", "SubscriptionAcknowledgement", parseSubscriptionAcknowledgement, ett_opcua_array_SubscriptionAcknowledgement);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parsePublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parsePublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_PublishResponse, &ti, "PublishResponse");
@@ -1034,7 +1034,7 @@ void parsePublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRepublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseRepublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RepublishRequest, &ti, "RepublishRequest");
@@ -1044,7 +1044,7 @@ void parseRepublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseUInt32(subtree, tvb, pinfo, pOffset, hf_opcua_RetransmitSequenceNumber);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseRepublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseRepublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_RepublishResponse, &ti, "RepublishResponse");
@@ -1053,7 +1053,7 @@ void parseRepublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseNotificationMessage(subtree, tvb, pinfo, pOffset, "NotificationMessage");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTransferSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseTransferSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TransferSubscriptionsRequest, &ti, "TransferSubscriptionsRequest");
@@ -1064,7 +1064,7 @@ void parseTransferSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_i
parseBoolean(subtree, tvb, pinfo, pOffset, hf_opcua_SendInitialValues);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTransferSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseTransferSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TransferSubscriptionsResponse, &ti, "TransferSubscriptionsResponse");
@@ -1076,7 +1076,7 @@ void parseTransferSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseDeleteSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteSubscriptionsRequest, &ti, "DeleteSubscriptionsRequest");
@@ -1086,7 +1086,7 @@ void parseDeleteSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_inf
parseArraySimple(subtree, tvb, pinfo, pOffset, "SubscriptionIds", "UInt32", hf_opcua_SubscriptionIds, parseUInt32, ett_opcua_array_UInt32);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseDeleteSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseDeleteSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_DeleteSubscriptionsResponse, &ti, "DeleteSubscriptionsResponse");
@@ -1098,7 +1098,7 @@ void parseDeleteSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_in
parseArrayComplex(subtree, tvb, pinfo, pOffset, "DiagnosticInfos", "DiagnosticInfo", parseDiagnosticInfo, ett_opcua_array_DiagnosticInfo);
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTestStackRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseTestStackRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TestStackRequest, &ti, "TestStackRequest");
@@ -1109,7 +1109,7 @@ void parseTestStackRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseVariant(subtree, tvb, pinfo, pOffset, "Input");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTestStackResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseTestStackResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TestStackResponse, &ti, "TestStackResponse");
@@ -1118,7 +1118,7 @@ void parseTestStackResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
parseVariant(subtree, tvb, pinfo, pOffset, "Output");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTestStackExRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseTestStackExRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TestStackExRequest, &ti, "TestStackExRequest");
@@ -1129,7 +1129,7 @@ void parseTestStackExRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
parseCompositeTestType(subtree, tvb, pinfo, pOffset, "Input");
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseTestStackExResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+void parseTestStackExResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_TestStackExResponse, &ti, "TestStackExResponse");
@@ -1140,7 +1140,7 @@ void parseTestStackExResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
}
/** Setup protocol subtree array */
-static gint *ett[] =
+static int *ett[] =
{
&ett_opcua_ServiceFault,
&ett_opcua_array_ServiceFault,
diff --git a/plugins/epan/opcua/opcua_serviceparser.h b/plugins/epan/opcua/opcua_serviceparser.h
index db8e6c42a0..86dfe3d500 100644
--- a/plugins/epan/opcua/opcua_serviceparser.h
+++ b/plugins/epan/opcua/opcua_serviceparser.h
@@ -20,254 +20,254 @@
#include <glib.h>
#include <epan/packet.h>
-extern gint ett_opcua_ServiceFault;
-extern gint ett_opcua_array_ServiceFault;
-extern gint ett_opcua_FindServersRequest;
-extern gint ett_opcua_array_FindServersRequest;
-extern gint ett_opcua_FindServersResponse;
-extern gint ett_opcua_array_FindServersResponse;
-extern gint ett_opcua_FindServersOnNetworkRequest;
-extern gint ett_opcua_array_FindServersOnNetworkRequest;
-extern gint ett_opcua_FindServersOnNetworkResponse;
-extern gint ett_opcua_array_FindServersOnNetworkResponse;
-extern gint ett_opcua_GetEndpointsRequest;
-extern gint ett_opcua_array_GetEndpointsRequest;
-extern gint ett_opcua_GetEndpointsResponse;
-extern gint ett_opcua_array_GetEndpointsResponse;
-extern gint ett_opcua_RegisterServerRequest;
-extern gint ett_opcua_array_RegisterServerRequest;
-extern gint ett_opcua_RegisterServerResponse;
-extern gint ett_opcua_array_RegisterServerResponse;
-extern gint ett_opcua_RegisterServer2Request;
-extern gint ett_opcua_array_RegisterServer2Request;
-extern gint ett_opcua_RegisterServer2Response;
-extern gint ett_opcua_array_RegisterServer2Response;
-extern gint ett_opcua_OpenSecureChannelRequest;
-extern gint ett_opcua_array_OpenSecureChannelRequest;
-extern gint ett_opcua_OpenSecureChannelResponse;
-extern gint ett_opcua_array_OpenSecureChannelResponse;
-extern gint ett_opcua_CloseSecureChannelRequest;
-extern gint ett_opcua_array_CloseSecureChannelRequest;
-extern gint ett_opcua_CloseSecureChannelResponse;
-extern gint ett_opcua_array_CloseSecureChannelResponse;
-extern gint ett_opcua_CreateSessionRequest;
-extern gint ett_opcua_array_CreateSessionRequest;
-extern gint ett_opcua_CreateSessionResponse;
-extern gint ett_opcua_array_CreateSessionResponse;
-extern gint ett_opcua_ActivateSessionRequest;
-extern gint ett_opcua_array_ActivateSessionRequest;
-extern gint ett_opcua_ActivateSessionResponse;
-extern gint ett_opcua_array_ActivateSessionResponse;
-extern gint ett_opcua_CloseSessionRequest;
-extern gint ett_opcua_array_CloseSessionRequest;
-extern gint ett_opcua_CloseSessionResponse;
-extern gint ett_opcua_array_CloseSessionResponse;
-extern gint ett_opcua_CancelRequest;
-extern gint ett_opcua_array_CancelRequest;
-extern gint ett_opcua_CancelResponse;
-extern gint ett_opcua_array_CancelResponse;
-extern gint ett_opcua_AddNodesRequest;
-extern gint ett_opcua_array_AddNodesRequest;
-extern gint ett_opcua_AddNodesResponse;
-extern gint ett_opcua_array_AddNodesResponse;
-extern gint ett_opcua_AddReferencesRequest;
-extern gint ett_opcua_array_AddReferencesRequest;
-extern gint ett_opcua_AddReferencesResponse;
-extern gint ett_opcua_array_AddReferencesResponse;
-extern gint ett_opcua_DeleteNodesRequest;
-extern gint ett_opcua_array_DeleteNodesRequest;
-extern gint ett_opcua_DeleteNodesResponse;
-extern gint ett_opcua_array_DeleteNodesResponse;
-extern gint ett_opcua_DeleteReferencesRequest;
-extern gint ett_opcua_array_DeleteReferencesRequest;
-extern gint ett_opcua_DeleteReferencesResponse;
-extern gint ett_opcua_array_DeleteReferencesResponse;
-extern gint ett_opcua_BrowseRequest;
-extern gint ett_opcua_array_BrowseRequest;
-extern gint ett_opcua_BrowseResponse;
-extern gint ett_opcua_array_BrowseResponse;
-extern gint ett_opcua_BrowseNextRequest;
-extern gint ett_opcua_array_BrowseNextRequest;
-extern gint ett_opcua_BrowseNextResponse;
-extern gint ett_opcua_array_BrowseNextResponse;
-extern gint ett_opcua_TranslateBrowsePathsToNodeIdsRequest;
-extern gint ett_opcua_array_TranslateBrowsePathsToNodeIdsRequest;
-extern gint ett_opcua_TranslateBrowsePathsToNodeIdsResponse;
-extern gint ett_opcua_array_TranslateBrowsePathsToNodeIdsResponse;
-extern gint ett_opcua_RegisterNodesRequest;
-extern gint ett_opcua_array_RegisterNodesRequest;
-extern gint ett_opcua_RegisterNodesResponse;
-extern gint ett_opcua_array_RegisterNodesResponse;
-extern gint ett_opcua_UnregisterNodesRequest;
-extern gint ett_opcua_array_UnregisterNodesRequest;
-extern gint ett_opcua_UnregisterNodesResponse;
-extern gint ett_opcua_array_UnregisterNodesResponse;
-extern gint ett_opcua_QueryFirstRequest;
-extern gint ett_opcua_array_QueryFirstRequest;
-extern gint ett_opcua_QueryFirstResponse;
-extern gint ett_opcua_array_QueryFirstResponse;
-extern gint ett_opcua_QueryNextRequest;
-extern gint ett_opcua_array_QueryNextRequest;
-extern gint ett_opcua_QueryNextResponse;
-extern gint ett_opcua_array_QueryNextResponse;
-extern gint ett_opcua_ReadRequest;
-extern gint ett_opcua_array_ReadRequest;
-extern gint ett_opcua_ReadResponse;
-extern gint ett_opcua_array_ReadResponse;
-extern gint ett_opcua_HistoryReadRequest;
-extern gint ett_opcua_array_HistoryReadRequest;
-extern gint ett_opcua_HistoryReadResponse;
-extern gint ett_opcua_array_HistoryReadResponse;
-extern gint ett_opcua_WriteRequest;
-extern gint ett_opcua_array_WriteRequest;
-extern gint ett_opcua_WriteResponse;
-extern gint ett_opcua_array_WriteResponse;
-extern gint ett_opcua_HistoryUpdateRequest;
-extern gint ett_opcua_array_HistoryUpdateRequest;
-extern gint ett_opcua_HistoryUpdateResponse;
-extern gint ett_opcua_array_HistoryUpdateResponse;
-extern gint ett_opcua_CallRequest;
-extern gint ett_opcua_array_CallRequest;
-extern gint ett_opcua_CallResponse;
-extern gint ett_opcua_array_CallResponse;
-extern gint ett_opcua_CreateMonitoredItemsRequest;
-extern gint ett_opcua_array_CreateMonitoredItemsRequest;
-extern gint ett_opcua_CreateMonitoredItemsResponse;
-extern gint ett_opcua_array_CreateMonitoredItemsResponse;
-extern gint ett_opcua_ModifyMonitoredItemsRequest;
-extern gint ett_opcua_array_ModifyMonitoredItemsRequest;
-extern gint ett_opcua_ModifyMonitoredItemsResponse;
-extern gint ett_opcua_array_ModifyMonitoredItemsResponse;
-extern gint ett_opcua_SetMonitoringModeRequest;
-extern gint ett_opcua_array_SetMonitoringModeRequest;
-extern gint ett_opcua_SetMonitoringModeResponse;
-extern gint ett_opcua_array_SetMonitoringModeResponse;
-extern gint ett_opcua_SetTriggeringRequest;
-extern gint ett_opcua_array_SetTriggeringRequest;
-extern gint ett_opcua_SetTriggeringResponse;
-extern gint ett_opcua_array_SetTriggeringResponse;
-extern gint ett_opcua_DeleteMonitoredItemsRequest;
-extern gint ett_opcua_array_DeleteMonitoredItemsRequest;
-extern gint ett_opcua_DeleteMonitoredItemsResponse;
-extern gint ett_opcua_array_DeleteMonitoredItemsResponse;
-extern gint ett_opcua_CreateSubscriptionRequest;
-extern gint ett_opcua_array_CreateSubscriptionRequest;
-extern gint ett_opcua_CreateSubscriptionResponse;
-extern gint ett_opcua_array_CreateSubscriptionResponse;
-extern gint ett_opcua_ModifySubscriptionRequest;
-extern gint ett_opcua_array_ModifySubscriptionRequest;
-extern gint ett_opcua_ModifySubscriptionResponse;
-extern gint ett_opcua_array_ModifySubscriptionResponse;
-extern gint ett_opcua_SetPublishingModeRequest;
-extern gint ett_opcua_array_SetPublishingModeRequest;
-extern gint ett_opcua_SetPublishingModeResponse;
-extern gint ett_opcua_array_SetPublishingModeResponse;
-extern gint ett_opcua_PublishRequest;
-extern gint ett_opcua_array_PublishRequest;
-extern gint ett_opcua_PublishResponse;
-extern gint ett_opcua_array_PublishResponse;
-extern gint ett_opcua_RepublishRequest;
-extern gint ett_opcua_array_RepublishRequest;
-extern gint ett_opcua_RepublishResponse;
-extern gint ett_opcua_array_RepublishResponse;
-extern gint ett_opcua_TransferSubscriptionsRequest;
-extern gint ett_opcua_array_TransferSubscriptionsRequest;
-extern gint ett_opcua_TransferSubscriptionsResponse;
-extern gint ett_opcua_array_TransferSubscriptionsResponse;
-extern gint ett_opcua_DeleteSubscriptionsRequest;
-extern gint ett_opcua_array_DeleteSubscriptionsRequest;
-extern gint ett_opcua_DeleteSubscriptionsResponse;
-extern gint ett_opcua_array_DeleteSubscriptionsResponse;
-extern gint ett_opcua_TestStackRequest;
-extern gint ett_opcua_array_TestStackRequest;
-extern gint ett_opcua_TestStackResponse;
-extern gint ett_opcua_array_TestStackResponse;
-extern gint ett_opcua_TestStackExRequest;
-extern gint ett_opcua_array_TestStackExRequest;
-extern gint ett_opcua_TestStackExResponse;
-extern gint ett_opcua_array_TestStackExResponse;
+extern int ett_opcua_ServiceFault;
+extern int ett_opcua_array_ServiceFault;
+extern int ett_opcua_FindServersRequest;
+extern int ett_opcua_array_FindServersRequest;
+extern int ett_opcua_FindServersResponse;
+extern int ett_opcua_array_FindServersResponse;
+extern int ett_opcua_FindServersOnNetworkRequest;
+extern int ett_opcua_array_FindServersOnNetworkRequest;
+extern int ett_opcua_FindServersOnNetworkResponse;
+extern int ett_opcua_array_FindServersOnNetworkResponse;
+extern int ett_opcua_GetEndpointsRequest;
+extern int ett_opcua_array_GetEndpointsRequest;
+extern int ett_opcua_GetEndpointsResponse;
+extern int ett_opcua_array_GetEndpointsResponse;
+extern int ett_opcua_RegisterServerRequest;
+extern int ett_opcua_array_RegisterServerRequest;
+extern int ett_opcua_RegisterServerResponse;
+extern int ett_opcua_array_RegisterServerResponse;
+extern int ett_opcua_RegisterServer2Request;
+extern int ett_opcua_array_RegisterServer2Request;
+extern int ett_opcua_RegisterServer2Response;
+extern int ett_opcua_array_RegisterServer2Response;
+extern int ett_opcua_OpenSecureChannelRequest;
+extern int ett_opcua_array_OpenSecureChannelRequest;
+extern int ett_opcua_OpenSecureChannelResponse;
+extern int ett_opcua_array_OpenSecureChannelResponse;
+extern int ett_opcua_CloseSecureChannelRequest;
+extern int ett_opcua_array_CloseSecureChannelRequest;
+extern int ett_opcua_CloseSecureChannelResponse;
+extern int ett_opcua_array_CloseSecureChannelResponse;
+extern int ett_opcua_CreateSessionRequest;
+extern int ett_opcua_array_CreateSessionRequest;
+extern int ett_opcua_CreateSessionResponse;
+extern int ett_opcua_array_CreateSessionResponse;
+extern int ett_opcua_ActivateSessionRequest;
+extern int ett_opcua_array_ActivateSessionRequest;
+extern int ett_opcua_ActivateSessionResponse;
+extern int ett_opcua_array_ActivateSessionResponse;
+extern int ett_opcua_CloseSessionRequest;
+extern int ett_opcua_array_CloseSessionRequest;
+extern int ett_opcua_CloseSessionResponse;
+extern int ett_opcua_array_CloseSessionResponse;
+extern int ett_opcua_CancelRequest;
+extern int ett_opcua_array_CancelRequest;
+extern int ett_opcua_CancelResponse;
+extern int ett_opcua_array_CancelResponse;
+extern int ett_opcua_AddNodesRequest;
+extern int ett_opcua_array_AddNodesRequest;
+extern int ett_opcua_AddNodesResponse;
+extern int ett_opcua_array_AddNodesResponse;
+extern int ett_opcua_AddReferencesRequest;
+extern int ett_opcua_array_AddReferencesRequest;
+extern int ett_opcua_AddReferencesResponse;
+extern int ett_opcua_array_AddReferencesResponse;
+extern int ett_opcua_DeleteNodesRequest;
+extern int ett_opcua_array_DeleteNodesRequest;
+extern int ett_opcua_DeleteNodesResponse;
+extern int ett_opcua_array_DeleteNodesResponse;
+extern int ett_opcua_DeleteReferencesRequest;
+extern int ett_opcua_array_DeleteReferencesRequest;
+extern int ett_opcua_DeleteReferencesResponse;
+extern int ett_opcua_array_DeleteReferencesResponse;
+extern int ett_opcua_BrowseRequest;
+extern int ett_opcua_array_BrowseRequest;
+extern int ett_opcua_BrowseResponse;
+extern int ett_opcua_array_BrowseResponse;
+extern int ett_opcua_BrowseNextRequest;
+extern int ett_opcua_array_BrowseNextRequest;
+extern int ett_opcua_BrowseNextResponse;
+extern int ett_opcua_array_BrowseNextResponse;
+extern int ett_opcua_TranslateBrowsePathsToNodeIdsRequest;
+extern int ett_opcua_array_TranslateBrowsePathsToNodeIdsRequest;
+extern int ett_opcua_TranslateBrowsePathsToNodeIdsResponse;
+extern int ett_opcua_array_TranslateBrowsePathsToNodeIdsResponse;
+extern int ett_opcua_RegisterNodesRequest;
+extern int ett_opcua_array_RegisterNodesRequest;
+extern int ett_opcua_RegisterNodesResponse;
+extern int ett_opcua_array_RegisterNodesResponse;
+extern int ett_opcua_UnregisterNodesRequest;
+extern int ett_opcua_array_UnregisterNodesRequest;
+extern int ett_opcua_UnregisterNodesResponse;
+extern int ett_opcua_array_UnregisterNodesResponse;
+extern int ett_opcua_QueryFirstRequest;
+extern int ett_opcua_array_QueryFirstRequest;
+extern int ett_opcua_QueryFirstResponse;
+extern int ett_opcua_array_QueryFirstResponse;
+extern int ett_opcua_QueryNextRequest;
+extern int ett_opcua_array_QueryNextRequest;
+extern int ett_opcua_QueryNextResponse;
+extern int ett_opcua_array_QueryNextResponse;
+extern int ett_opcua_ReadRequest;
+extern int ett_opcua_array_ReadRequest;
+extern int ett_opcua_ReadResponse;
+extern int ett_opcua_array_ReadResponse;
+extern int ett_opcua_HistoryReadRequest;
+extern int ett_opcua_array_HistoryReadRequest;
+extern int ett_opcua_HistoryReadResponse;
+extern int ett_opcua_array_HistoryReadResponse;
+extern int ett_opcua_WriteRequest;
+extern int ett_opcua_array_WriteRequest;
+extern int ett_opcua_WriteResponse;
+extern int ett_opcua_array_WriteResponse;
+extern int ett_opcua_HistoryUpdateRequest;
+extern int ett_opcua_array_HistoryUpdateRequest;
+extern int ett_opcua_HistoryUpdateResponse;
+extern int ett_opcua_array_HistoryUpdateResponse;
+extern int ett_opcua_CallRequest;
+extern int ett_opcua_array_CallRequest;
+extern int ett_opcua_CallResponse;
+extern int ett_opcua_array_CallResponse;
+extern int ett_opcua_CreateMonitoredItemsRequest;
+extern int ett_opcua_array_CreateMonitoredItemsRequest;
+extern int ett_opcua_CreateMonitoredItemsResponse;
+extern int ett_opcua_array_CreateMonitoredItemsResponse;
+extern int ett_opcua_ModifyMonitoredItemsRequest;
+extern int ett_opcua_array_ModifyMonitoredItemsRequest;
+extern int ett_opcua_ModifyMonitoredItemsResponse;
+extern int ett_opcua_array_ModifyMonitoredItemsResponse;
+extern int ett_opcua_SetMonitoringModeRequest;
+extern int ett_opcua_array_SetMonitoringModeRequest;
+extern int ett_opcua_SetMonitoringModeResponse;
+extern int ett_opcua_array_SetMonitoringModeResponse;
+extern int ett_opcua_SetTriggeringRequest;
+extern int ett_opcua_array_SetTriggeringRequest;
+extern int ett_opcua_SetTriggeringResponse;
+extern int ett_opcua_array_SetTriggeringResponse;
+extern int ett_opcua_DeleteMonitoredItemsRequest;
+extern int ett_opcua_array_DeleteMonitoredItemsRequest;
+extern int ett_opcua_DeleteMonitoredItemsResponse;
+extern int ett_opcua_array_DeleteMonitoredItemsResponse;
+extern int ett_opcua_CreateSubscriptionRequest;
+extern int ett_opcua_array_CreateSubscriptionRequest;
+extern int ett_opcua_CreateSubscriptionResponse;
+extern int ett_opcua_array_CreateSubscriptionResponse;
+extern int ett_opcua_ModifySubscriptionRequest;
+extern int ett_opcua_array_ModifySubscriptionRequest;
+extern int ett_opcua_ModifySubscriptionResponse;
+extern int ett_opcua_array_ModifySubscriptionResponse;
+extern int ett_opcua_SetPublishingModeRequest;
+extern int ett_opcua_array_SetPublishingModeRequest;
+extern int ett_opcua_SetPublishingModeResponse;
+extern int ett_opcua_array_SetPublishingModeResponse;
+extern int ett_opcua_PublishRequest;
+extern int ett_opcua_array_PublishRequest;
+extern int ett_opcua_PublishResponse;
+extern int ett_opcua_array_PublishResponse;
+extern int ett_opcua_RepublishRequest;
+extern int ett_opcua_array_RepublishRequest;
+extern int ett_opcua_RepublishResponse;
+extern int ett_opcua_array_RepublishResponse;
+extern int ett_opcua_TransferSubscriptionsRequest;
+extern int ett_opcua_array_TransferSubscriptionsRequest;
+extern int ett_opcua_TransferSubscriptionsResponse;
+extern int ett_opcua_array_TransferSubscriptionsResponse;
+extern int ett_opcua_DeleteSubscriptionsRequest;
+extern int ett_opcua_array_DeleteSubscriptionsRequest;
+extern int ett_opcua_DeleteSubscriptionsResponse;
+extern int ett_opcua_array_DeleteSubscriptionsResponse;
+extern int ett_opcua_TestStackRequest;
+extern int ett_opcua_array_TestStackRequest;
+extern int ett_opcua_TestStackResponse;
+extern int ett_opcua_array_TestStackResponse;
+extern int ett_opcua_TestStackExRequest;
+extern int ett_opcua_array_TestStackExRequest;
+extern int ett_opcua_TestStackExResponse;
+extern int ett_opcua_array_TestStackExResponse;
-void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseFindServersResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseFindServersOnNetworkRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseFindServersOnNetworkResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseGetEndpointsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseGetEndpointsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRegisterServerRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRegisterServerResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRegisterServer2Request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRegisterServer2Response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseOpenSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseOpenSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCloseSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCloseSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCreateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCreateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseActivateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseActivateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCloseSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCloseSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCancelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCancelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseAddNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseAddNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseAddReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseAddReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeleteNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeleteNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeleteReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeleteReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseBrowseRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseBrowseResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseBrowseNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseBrowseNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTranslateBrowsePathsToNodeIdsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTranslateBrowsePathsToNodeIdsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRegisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRegisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseUnregisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseUnregisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseQueryFirstRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseQueryFirstResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseQueryNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseQueryNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseHistoryReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseHistoryReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseWriteRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseWriteResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseHistoryUpdateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseHistoryUpdateResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCallRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCallResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCreateMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCreateMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseModifyMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseModifyMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseSetMonitoringModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseSetMonitoringModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseSetTriggeringRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseSetTriggeringResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeleteMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeleteMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCreateSubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseCreateSubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseModifySubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseModifySubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseSetPublishingModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseSetPublishingModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parsePublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parsePublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRepublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseRepublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTransferSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTransferSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeleteSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseDeleteSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTestStackRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTestStackResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTestStackExRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseTestStackExResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
+void parseServiceFault(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseFindServersRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseFindServersResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseFindServersOnNetworkRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseFindServersOnNetworkResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseGetEndpointsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseGetEndpointsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRegisterServerRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRegisterServerResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRegisterServer2Request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRegisterServer2Response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseOpenSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseOpenSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCloseSecureChannelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCloseSecureChannelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCreateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCreateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseActivateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseActivateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCloseSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCloseSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCancelRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCancelResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseAddNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseAddNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseAddReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseAddReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeleteNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeleteNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeleteReferencesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeleteReferencesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseBrowseRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseBrowseResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseBrowseNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseBrowseNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTranslateBrowsePathsToNodeIdsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTranslateBrowsePathsToNodeIdsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRegisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRegisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseUnregisterNodesRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseUnregisterNodesResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseQueryFirstRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseQueryFirstResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseQueryNextRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseQueryNextResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseHistoryReadRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseHistoryReadResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseWriteRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseWriteResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseHistoryUpdateRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseHistoryUpdateResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCallRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCallResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCreateMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCreateMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseModifyMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseModifyMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseSetMonitoringModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseSetMonitoringModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseSetTriggeringRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseSetTriggeringResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeleteMonitoredItemsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeleteMonitoredItemsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCreateSubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseCreateSubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseModifySubscriptionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseModifySubscriptionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseSetPublishingModeRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseSetPublishingModeResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parsePublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parsePublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRepublishRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseRepublishResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTransferSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTransferSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeleteSubscriptionsRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseDeleteSubscriptionsResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTestStackRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTestStackResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTestStackExRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseTestStackExResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
void registerServiceTypes(void);
diff --git a/plugins/epan/opcua/opcua_servicetable.c b/plugins/epan/opcua/opcua_servicetable.c
index b800da9264..0559c47609 100644
--- a/plugins/epan/opcua/opcua_servicetable.c
+++ b/plugins/epan/opcua/opcua_servicetable.c
@@ -109,7 +109,6 @@ ParserEntry g_arParserTable[] = {
{ OpcUaId_TestStackExRequest_Encoding_DefaultBinary, parseTestStackExRequest },
{ OpcUaId_TestStackExResponse_Encoding_DefaultBinary, parseTestStackExResponse },
};
-const int g_NumServices = sizeof(g_arParserTable) / sizeof(ParserEntry);
/** Service type table */
const value_string g_requesttypes[] = {
@@ -283,11 +282,11 @@ const value_string g_requesttypes[] = {
};
/** Dispatch all services to a special parser function. */
-void dispatchService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int ServiceId)
+void dispatchService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int ServiceId)
{
- int indx = 0;
+ unsigned indx = 0;
- while (indx < g_NumServices)
+ while (indx < array_length(g_arParserTable))
{
if (g_arParserTable[indx].iRequestId == ServiceId)
{
diff --git a/plugins/epan/opcua/opcua_servicetable.h b/plugins/epan/opcua/opcua_servicetable.h
index 0b614ae6c5..8b4881b80d 100644
--- a/plugins/epan/opcua/opcua_servicetable.h
+++ b/plugins/epan/opcua/opcua_servicetable.h
@@ -13,5 +13,5 @@
**
******************************************************************************/
-void dispatchService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int ServiceId);
+void dispatchService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int ServiceId);
diff --git a/plugins/epan/opcua/opcua_simpletypes.c b/plugins/epan/opcua/opcua_simpletypes.c
index da98a823f5..7f440147d8 100644
--- a/plugins/epan/opcua/opcua_simpletypes.c
+++ b/plugins/epan/opcua/opcua_simpletypes.c
@@ -345,52 +345,52 @@ static const value_string g_ResultMask[] = {
};
/* trees */
-static gint ett_opcua_diagnosticinfo;
-static gint ett_opcua_diagnosticinfo_encodingmask;
-static gint ett_opcua_nodeid;
-static gint ett_opcua_expandednodeid;
-static gint ett_opcua_expandednodeid_encodingmask;
-static gint ett_opcua_localizedtext;
-static gint ett_opcua_localizedtext_encodingmask;
-static gint ett_opcua_qualifiedname;
-static gint ett_opcua_datavalue;
-static gint ett_opcua_datavalue_encodingmask;
-static gint ett_opcua_variant;
-static gint ett_opcua_variant_arraydims;
-static gint ett_opcua_extensionobject;
-static gint ett_opcua_extensionobject_encodingmask;
-static gint ett_opcua_statuscode;
-static gint ett_opcua_statuscode_info;
-gint ett_opcua_array_Boolean;
-gint ett_opcua_array_SByte;
-gint ett_opcua_array_Byte;
-gint ett_opcua_array_Int16;
-gint ett_opcua_array_UInt16;
-gint ett_opcua_array_Int32;
-gint ett_opcua_array_UInt32;
-gint ett_opcua_array_Int64;
-gint ett_opcua_array_UInt64;
-gint ett_opcua_array_Float;
-gint ett_opcua_array_Double;
-gint ett_opcua_array_String;
-gint ett_opcua_array_DateTime;
-gint ett_opcua_array_Guid;
-gint ett_opcua_array_ByteString;
-gint ett_opcua_array_XmlElement;
-gint ett_opcua_array_NodeId;
-gint ett_opcua_array_ExpandedNodeId;
-gint ett_opcua_array_StatusCode;
-gint ett_opcua_array_DiagnosticInfo;
-gint ett_opcua_array_QualifiedName;
-gint ett_opcua_array_LocalizedText;
-gint ett_opcua_array_ExtensionObject;
-gint ett_opcua_array_DataValue;
-gint ett_opcua_array_Variant;
-gint ett_opcua_returnDiagnostics;
-gint ett_opcua_nodeClassMask;
-gint ett_opcua_resultMask;
-
-static gint *ett[] =
+static int ett_opcua_diagnosticinfo;
+static int ett_opcua_diagnosticinfo_encodingmask;
+static int ett_opcua_nodeid;
+static int ett_opcua_expandednodeid;
+static int ett_opcua_expandednodeid_encodingmask;
+static int ett_opcua_localizedtext;
+static int ett_opcua_localizedtext_encodingmask;
+static int ett_opcua_qualifiedname;
+static int ett_opcua_datavalue;
+static int ett_opcua_datavalue_encodingmask;
+static int ett_opcua_variant;
+static int ett_opcua_variant_arraydims;
+static int ett_opcua_extensionobject;
+static int ett_opcua_extensionobject_encodingmask;
+static int ett_opcua_statuscode;
+static int ett_opcua_statuscode_info;
+int ett_opcua_array_Boolean;
+int ett_opcua_array_SByte;
+int ett_opcua_array_Byte;
+int ett_opcua_array_Int16;
+int ett_opcua_array_UInt16;
+int ett_opcua_array_Int32;
+int ett_opcua_array_UInt32;
+int ett_opcua_array_Int64;
+int ett_opcua_array_UInt64;
+int ett_opcua_array_Float;
+int ett_opcua_array_Double;
+int ett_opcua_array_String;
+int ett_opcua_array_DateTime;
+int ett_opcua_array_Guid;
+int ett_opcua_array_ByteString;
+int ett_opcua_array_XmlElement;
+int ett_opcua_array_NodeId;
+int ett_opcua_array_ExpandedNodeId;
+int ett_opcua_array_StatusCode;
+int ett_opcua_array_DiagnosticInfo;
+int ett_opcua_array_QualifiedName;
+int ett_opcua_array_LocalizedText;
+int ett_opcua_array_ExtensionObject;
+int ett_opcua_array_DataValue;
+int ett_opcua_array_Variant;
+int ett_opcua_returnDiagnostics;
+int ett_opcua_nodeClassMask;
+int ett_opcua_resultMask;
+
+static int *ett[] =
{
&ett_opcua_diagnosticinfo,
&ett_opcua_diagnosticinfo_encodingmask,
@@ -544,75 +544,75 @@ void registerSimpleTypes(int proto)
expert_register_field_array(expert_proto, ei, array_length(ei));
}
-proto_item* parseBoolean(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseBoolean(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 1, ENC_LITTLE_ENDIAN);
*pOffset+=1;
return item;
}
-proto_item* parseByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 1, ENC_LITTLE_ENDIAN);
*pOffset+=1;
return item;
}
-proto_item* parseSByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseSByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 1, ENC_LITTLE_ENDIAN);
*pOffset+=1;
return item;
}
-proto_item* parseUInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseUInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 2, ENC_LITTLE_ENDIAN);
*pOffset+=2;
return item;
}
-proto_item* parseInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 2, ENC_LITTLE_ENDIAN);
*pOffset+=2;
return item;
}
-proto_item* parseUInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseUInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN);
*pOffset+=4;
return item;
}
-proto_item* parseInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN);
*pOffset+=4;
return item;
}
-proto_item* parseUInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseUInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 8, ENC_LITTLE_ENDIAN);
*pOffset+=8;
return item;
}
-proto_item* parseInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 8, ENC_LITTLE_ENDIAN);
*pOffset+=8;
return item;
}
-proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = NULL;
char *szValue;
- gint iOffset = *pOffset;
- gint32 iLen = tvb_get_letohl(tvb, *pOffset);
+ int iOffset = *pOffset;
+ int32_t iLen = tvb_get_letohl(tvb, *pOffset);
iOffset+=4;
if (iLen == -1)
@@ -644,12 +644,12 @@ proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
return item;
}
-proto_item* parseString_ret_string_and_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex, const guint8 **retval, gint *lenretval)
+proto_item* parseString_ret_string_and_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex, const uint8_t **retval, int *lenretval)
{
proto_item *item = NULL;
char *szValue;
- gint iOffset = *pOffset;
- gint32 iLen = tvb_get_letohl(tvb, *pOffset);
+ int iOffset = *pOffset;
+ int32_t iLen = tvb_get_letohl(tvb, *pOffset);
iOffset+=4;
if (retval) {
@@ -688,11 +688,11 @@ proto_item* parseString_ret_string_and_length(proto_tree *tree, tvbuff_t *tvb, p
return item;
}
-proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = NULL;
- guint32 uStatusCode = 0;
- const gchar *szStatusCode = NULL;
+ uint32_t uStatusCode = 0;
+ const char *szStatusCode = NULL;
item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN);
@@ -703,7 +703,7 @@ proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
/* check for status code info flags */
if (uStatusCode & 0x0000FFFF)
{
- gint iOffset = *pOffset;
+ int iOffset = *pOffset;
proto_tree *flags_tree;
proto_item *ti_inner;
@@ -738,21 +738,21 @@ proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
return item;
}
-void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
static int * const loctext_mask[] = {&hf_opcua_loctext_mask_localeflag,
&hf_opcua_loctext_mask_textflag,
NULL};
- gint iOffset = *pOffset;
- guint8 EncodingMask;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
proto_tree *subtree;
proto_item *ti;
subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_localizedtext, &ti, "%s: LocalizedText", szFieldName);
/* parse encoding mask */
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
proto_tree_add_bitmask(subtree, tvb, iOffset, hf_opcua_loctext_mask, ett_opcua_localizedtext_encodingmask, loctext_mask, ENC_LITTLE_ENDIAN);
iOffset++;
@@ -770,19 +770,19 @@ void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
*pOffset = iOffset;
}
-proto_item* parseGuid(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseGuid(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, GUID_LEN, ENC_LITTLE_ENDIAN);
*pOffset+=GUID_LEN;
return item;
}
-proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
proto_item *item = NULL;
char *szValue;
int iOffset = *pOffset;
- gint32 iLen = tvb_get_letohl(tvb, iOffset);
+ int32_t iLen = tvb_get_letohl(tvb, iOffset);
iOffset += 4;
if (iLen == -1)
@@ -814,33 +814,34 @@ proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
return item;
}
-proto_item* parseXmlElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex)
+proto_item* parseXmlElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex)
{
return parseByteString(tree, tvb, pinfo, pOffset, hfIndex);
}
-proto_item* parseFloat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseFloat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
- proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, (int)sizeof(gfloat), ENC_LITTLE_ENDIAN);
- *pOffset += (int)sizeof(gfloat);
+ proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, (int)sizeof(float), ENC_LITTLE_ENDIAN);
+ *pOffset += (int)sizeof(float);
return item;
}
-proto_item* parseDouble(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseDouble(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
- proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, (int)sizeof(gdouble), ENC_LITTLE_ENDIAN);
- *pOffset += (int)sizeof(gdouble);
+ proto_item *item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, (int)sizeof(double), ENC_LITTLE_ENDIAN);
+ *pOffset += (int)sizeof(double);
return item;
}
-proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex)
+proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex)
{
- proto_item *item = NULL;
- *pOffset = dissect_nt_64bit_time_ex(tvb, tree, *pOffset, hfIndex, &item, FALSE);
+ proto_item *item = dissect_nttime(tvb, tree, *pOffset, hfIndex, ENC_LITTLE_ENDIAN);
+ *pOffset += 8;
return item;
}
-void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+// NOLINTNEXTLINE(misc-no-recursion)
+void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
static int * const diag_mask[] = {&hf_opcua_diag_mask_symbolicflag,
&hf_opcua_diag_mask_namespaceflag,
@@ -851,11 +852,11 @@ void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
&hf_opcua_diag_mask_innerdiaginfoflag,
NULL};
- gint iOffset = *pOffset;
- guint8 EncodingMask;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
proto_tree *subtree;
proto_item *ti;
- guint opcua_nested_count;
+ unsigned opcua_nested_count;
subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_diagnosticinfo, &ti, "%s: DiagnosticInfo", szFieldName);
@@ -870,10 +871,11 @@ void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
p_add_proto_data(pinfo->pool, pinfo, proto_opcua, 0, GUINT_TO_POINTER(opcua_nested_count));
/* parse encoding mask */
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
proto_tree_add_bitmask(subtree, tvb, iOffset, hf_opcua_diag_mask, ett_opcua_diagnosticinfo_encodingmask, diag_mask, ENC_LITTLE_ENDIAN);
iOffset++;
+ increment_dissection_depth(pinfo);
if (EncodingMask & DIAGNOSTICINFO_ENCODINGMASK_SYMBOLICID_FLAG)
{
parseInt32(subtree, tvb, pinfo, &iOffset, hf_opcua_diag_symbolicid);
@@ -902,6 +904,7 @@ void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
{
parseDiagnosticInfo(subtree, tvb, pinfo, &iOffset, "Inner DiagnosticInfo");
}
+ decrement_dissection_depth(pinfo);
proto_item_set_end(ti, tvb, iOffset);
*pOffset = iOffset;
@@ -910,7 +913,7 @@ void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
p_add_proto_data(pinfo->pool, pinfo, proto_opcua, 0, GUINT_TO_POINTER(opcua_nested_count));
}
-void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1,
@@ -922,12 +925,12 @@ void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gin
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex)
+void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex)
{
proto_item *item = NULL;
char *szValue;
int iOffset = *pOffset;
- gint32 iLen = tvb_get_letohl(tvb, iOffset);
+ int32_t iLen = tvb_get_letohl(tvb, iOffset);
iOffset += 4;
if (iLen == -1)
@@ -943,8 +946,8 @@ void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
else if (iLen > 0)
{
asn1_ctx_t asn1_ctx;
- asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- dissect_x509af_Certificate(FALSE, tvb, iOffset, &asn1_ctx, tree, hfIndex);
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
+ dissect_x509af_Certificate(false, tvb, iOffset, &asn1_ctx, tree, hfIndex);
iOffset += iLen; /* eat the whole bytestring */
}
else
@@ -957,7 +960,8 @@ void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
*pOffset = iOffset;
}
-void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+// NOLINTNEXTLINE(misc-no-recursion)
+void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
static int * const datavalue_mask[] = {&hf_opcua_datavalue_mask_valueflag,
&hf_opcua_datavalue_mask_statuscodeflag,
@@ -970,13 +974,14 @@ void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *p
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1,
ett_opcua_datavalue, &ti, "%s: DataValue", szFieldName);
- gint iOffset = *pOffset;
- guint8 EncodingMask;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
proto_tree_add_bitmask(subtree, tvb, iOffset, hf_opcua_datavalue_mask, ett_opcua_datavalue_encodingmask, datavalue_mask, ENC_LITTLE_ENDIAN);
iOffset++;
+ increment_dissection_depth(pinfo);
if (EncodingMask & DATAVALUE_ENCODINGBYTE_VALUE)
{
parseVariant(subtree, tvb, pinfo, &iOffset, "Value");
@@ -1001,20 +1006,22 @@ void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *p
{
parseUInt16(subtree, tvb, pinfo, &iOffset, hf_opcua_ServerPicoseconds);
}
+ decrement_dissection_depth(pinfo);
proto_item_set_end(ti, tvb, iOffset);
*pOffset = iOffset;
}
-void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+// NOLINTNEXTLINE(misc-no-recursion)
+void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1,
ett_opcua_variant, &ti, "%s: Variant", szFieldName);
- gint iOffset = *pOffset;
- guint8 EncodingMask;
- gint32 ArrayDimensions = 0;
- guint opcua_nested_count;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
+ int32_t ArrayDimensions = 0;
+ unsigned opcua_nested_count;
/* prevent a too high nesting depth */
opcua_nested_count = GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_opcua, 0));
@@ -1026,13 +1033,14 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf
opcua_nested_count++;
p_add_proto_data(pinfo->pool, pinfo, proto_opcua, 0, GUINT_TO_POINTER(opcua_nested_count));
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
proto_tree_add_item(subtree, hf_opcua_variant_encodingmask, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);
iOffset++;
if (EncodingMask & VARIANT_ARRAYMASK)
{
/* type is encoded in bits 0-5 */
+ increment_dissection_depth(pinfo);
switch(EncodingMask & 0x3f)
{
case OpcUaType_Null: break;
@@ -1062,6 +1070,7 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf
case OpcUaType_DataValue: parseArrayComplex(subtree, tvb, pinfo, &iOffset, "DataValue", "DataValue", parseDataValue, ett_opcua_array_DataValue); break;
case OpcUaType_Variant: parseArrayComplex(subtree, tvb, pinfo, &iOffset, "Variant", "Variant", parseVariant, ett_opcua_array_Variant); break;
}
+ decrement_dissection_depth(pinfo);
if (EncodingMask & VARIANT_ARRAYDIMENSIONS)
{
@@ -1091,6 +1100,7 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf
else
{
/* type is encoded in bits 0-5 */
+ increment_dissection_depth(pinfo);
switch(EncodingMask & 0x3f)
{
case OpcUaType_Null: break;
@@ -1120,6 +1130,7 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf
case OpcUaType_DataValue: parseDataValue(subtree, tvb, pinfo, &iOffset, "Value"); break;
case OpcUaType_Variant: parseVariant(subtree, tvb, pinfo, &iOffset, "Value"); break;
}
+ decrement_dissection_depth(pinfo);
}
proto_item_set_end(ti, tvb, iOffset);
@@ -1133,12 +1144,12 @@ void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOf
* All arrays have one 4 byte signed integer length information,
* followed by n data elements.
*/
-void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, int hfIndex, fctSimpleTypeParser pParserFunction, const gint idx)
+void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, int hfIndex, fctSimpleTypeParser pParserFunction, const int idx)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, idx, &ti, "%s: Array of %s", szFieldName, szTypeName);
int i;
- gint32 iLen;
+ int32_t iLen;
/* read array length */
iLen = tvb_get_letohl(tvb, *pOffset);
@@ -1166,12 +1177,12 @@ void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
* All arrays have one 4 byte signed integer length information,
* followed by n data elements.
*/
-void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, fctEnumParser pParserFunction, const gint idx)
+void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctEnumParser pParserFunction, const int idx)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, idx, &ti, "%s: Array of %s", szFieldName, szTypeName);
int i;
- gint32 iLen;
+ int32_t iLen;
/* read array length */
iLen = tvb_get_letohl(tvb, *pOffset);
@@ -1195,12 +1206,12 @@ void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *p
* All arrays have one 4 byte signed integer length information,
* followed by n data elements.
*/
-void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, fctComplexTypeParser pParserFunction, const gint idx)
+void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctComplexTypeParser pParserFunction, const int idx)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, idx, &ti, "%s: Array of %s", szFieldName, szTypeName);
int i;
- gint32 iLen;
+ int32_t iLen;
/* read array length */
iLen = tvb_get_letohl(tvb, *pOffset);
@@ -1222,14 +1233,14 @@ void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
proto_item_set_end(ti, tvb, *pOffset);
}
-void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_nodeid, &ti, "%s: NodeId", szFieldName);
- gint iOffset = *pOffset;
- guint8 EncodingMask;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
proto_tree_add_item(subtree, hf_opcua_nodeid_encodingmask, tvb, iOffset, 1, ENC_LITTLE_ENDIAN);
iOffset++;
@@ -1272,18 +1283,18 @@ void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOff
*pOffset = iOffset;
}
-void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
static int * const extobj_mask[] = {&hf_opcua_extobj_mask_binbodyflag,
&hf_opcua_extobj_mask_xmlbodyflag,
NULL};
- gint iOffset = *pOffset;
- guint8 EncodingMask;
- guint32 TypeId;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
+ uint32_t TypeId;
proto_tree *extobj_tree;
proto_item *ti;
- guint opcua_nested_count;
+ unsigned opcua_nested_count;
/* add extension object subtree */
extobj_tree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1, ett_opcua_extensionobject, &ti, "%s: ExtensionObject", szFieldName);
@@ -1303,7 +1314,7 @@ void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
parseNodeId(extobj_tree, tvb, pinfo, &iOffset, "TypeId");
/* parse encoding mask */
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
proto_tree_add_bitmask(extobj_tree, tvb, iOffset, hf_opcua_extobj_mask, ett_opcua_extensionobject_encodingmask, extobj_mask, ENC_LITTLE_ENDIAN);
iOffset++;
@@ -1319,7 +1330,7 @@ void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, g
p_add_proto_data(pinfo->pool, pinfo, proto_opcua, 0, GUINT_TO_POINTER(opcua_nested_count));
}
-void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName)
{
static int * const expandednodeid_mask[] = {&hf_opcua_nodeid_encodingmask,
&hf_opcua_expandednodeid_mask_serverindex,
@@ -1329,10 +1340,10 @@ void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
proto_item *ti;
proto_tree *subtree = proto_tree_add_subtree_format(tree, tvb, *pOffset, -1,
ett_opcua_expandednodeid, &ti, "%s: ExpandedNodeId", szFieldName);
- gint iOffset = *pOffset;
- guint8 EncodingMask;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
proto_tree_add_bitmask(subtree, tvb, iOffset, hf_opcua_expandednodeid_mask, ett_opcua_expandednodeid_encodingmask, expandednodeid_mask, ENC_LITTLE_ENDIAN);
iOffset++;
@@ -1384,19 +1395,19 @@ void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gi
*pOffset = iOffset;
}
-guint32 getExtensionObjectType(tvbuff_t *tvb, gint *pOffset)
+uint32_t getExtensionObjectType(tvbuff_t *tvb, int *pOffset)
{
- gint iOffset = *pOffset;
- guint8 EncodingMask;
- guint32 Numeric = 0;
+ int iOffset = *pOffset;
+ uint8_t EncodingMask;
+ uint32_t Numeric = 0;
- EncodingMask = tvb_get_guint8(tvb, iOffset);
+ EncodingMask = tvb_get_uint8(tvb, iOffset);
iOffset++;
switch(EncodingMask)
{
case 0x00: /* two byte node id */
- Numeric = tvb_get_guint8(tvb, iOffset);
+ Numeric = tvb_get_uint8(tvb, iOffset);
/*iOffset+=1;*/
break;
case 0x01: /* four byte node id */
@@ -1418,7 +1429,7 @@ guint32 getExtensionObjectType(tvbuff_t *tvb, gint *pOffset)
return Numeric;
}
-void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
static int * const nodeclass_mask[] = {
&hf_opcua_nodeClassMask_object,
@@ -1431,7 +1442,7 @@ void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
&hf_opcua_nodeClassMask_view,
NULL};
- guint8 NodeClassMask = tvb_get_guint8(tvb, *pOffset);
+ uint8_t NodeClassMask = tvb_get_uint8(tvb, *pOffset);
if(NodeClassMask == NODECLASSMASK_ALL)
{
proto_tree_add_item(tree, hf_opcua_nodeClassMask_all, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN);
@@ -1443,7 +1454,7 @@ void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
*pOffset+=4;
}
-void parseResultMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+void parseResultMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset)
{
static int * const browseresult_mask[] = {
&hf_opcua_resultMask_referencetype,
@@ -1454,7 +1465,7 @@ void parseResultMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gi
&hf_opcua_resultMask_typedefinition,
NULL};
- guint8 ResultMask = tvb_get_guint8(tvb, *pOffset);
+ uint8_t ResultMask = tvb_get_uint8(tvb, *pOffset);
if(ResultMask == RESULTMASK_ALL)
{
proto_tree_add_item(tree, hf_opcua_resultMask_all, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN);
diff --git a/plugins/epan/opcua/opcua_simpletypes.h b/plugins/epan/opcua/opcua_simpletypes.h
index 72b2f0cfd7..6f5336da31 100644
--- a/plugins/epan/opcua/opcua_simpletypes.h
+++ b/plugins/epan/opcua/opcua_simpletypes.h
@@ -39,32 +39,32 @@ extern int hf_opcua_nodeClassMask_datatype;
extern int hf_opcua_nodeClassMask_view;
/* simple types trees */
-extern gint ett_opcua_array_Boolean;
-extern gint ett_opcua_array_SByte;
-extern gint ett_opcua_array_Byte;
-extern gint ett_opcua_array_Int16;
-extern gint ett_opcua_array_UInt16;
-extern gint ett_opcua_array_Int32;
-extern gint ett_opcua_array_UInt32;
-extern gint ett_opcua_array_Int64;
-extern gint ett_opcua_array_UInt64;
-extern gint ett_opcua_array_Float;
-extern gint ett_opcua_array_Double;
-extern gint ett_opcua_array_String;
-extern gint ett_opcua_array_DateTime;
-extern gint ett_opcua_array_Guid;
-extern gint ett_opcua_array_ByteString;
-extern gint ett_opcua_array_XmlElement;
-extern gint ett_opcua_array_NodeId;
-extern gint ett_opcua_array_ExpandedNodeId;
-extern gint ett_opcua_array_StatusCode;
-extern gint ett_opcua_array_DiagnosticInfo;
-extern gint ett_opcua_array_QualifiedName;
-extern gint ett_opcua_array_LocalizedText;
-extern gint ett_opcua_array_ExtensionObject;
-extern gint ett_opcua_array_DataValue;
-extern gint ett_opcua_array_Variant;
-extern gint ett_opcua_returnDiagnostics;
+extern int ett_opcua_array_Boolean;
+extern int ett_opcua_array_SByte;
+extern int ett_opcua_array_Byte;
+extern int ett_opcua_array_Int16;
+extern int ett_opcua_array_UInt16;
+extern int ett_opcua_array_Int32;
+extern int ett_opcua_array_UInt32;
+extern int ett_opcua_array_Int64;
+extern int ett_opcua_array_UInt64;
+extern int ett_opcua_array_Float;
+extern int ett_opcua_array_Double;
+extern int ett_opcua_array_String;
+extern int ett_opcua_array_DateTime;
+extern int ett_opcua_array_Guid;
+extern int ett_opcua_array_ByteString;
+extern int ett_opcua_array_XmlElement;
+extern int ett_opcua_array_NodeId;
+extern int ett_opcua_array_ExpandedNodeId;
+extern int ett_opcua_array_StatusCode;
+extern int ett_opcua_array_DiagnosticInfo;
+extern int ett_opcua_array_QualifiedName;
+extern int ett_opcua_array_LocalizedText;
+extern int ett_opcua_array_ExtensionObject;
+extern int ett_opcua_array_DataValue;
+extern int ett_opcua_array_Variant;
+extern int ett_opcua_returnDiagnostics;
enum ua_message_mode {
UA_MessageMode_Unknown = 0,
@@ -75,41 +75,41 @@ enum ua_message_mode {
};
/* simple types */
-proto_item* parseBoolean(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseSByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseUInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseUInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseUInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseString_ret_string_and_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, int hfIndex, const guint8 **retval, gint *lenretval);
-proto_item* parseGuid(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseXmlElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseFloat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseDouble(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
+proto_item* parseBoolean(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseSByte(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseUInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseInt16(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseUInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseInt32(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseUInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseInt64(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseString_ret_string_and_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, int hfIndex, const uint8_t **retval, int *lenretval);
+proto_item* parseGuid(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseByteString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseXmlElement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseFloat(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseDouble(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseDateTime(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
/* complex types */
-void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int hfIndex);
-void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName);
-void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, int hfIndex, fctSimpleTypeParser pParserFunction, const gint idx);
-void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, fctEnumParser pParserFunction, const gint idx);
-void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName, const char *szTypeName, fctComplexTypeParser pParserFunction, const gint idx);
+void parseLocalizedText(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseDiagnosticInfo(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseExtensionObject(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseQualifiedName(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseCertificate(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int hfIndex);
+void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseVariant(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseExpandedNodeId(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName);
+void parseArraySimple(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, int hfIndex, fctSimpleTypeParser pParserFunction, const int idx);
+void parseArrayEnum(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctEnumParser pParserFunction, const int idx);
+void parseArrayComplex(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, const char *szFieldName, const char *szTypeName, fctComplexTypeParser pParserFunction, const int idx);
void registerSimpleTypes(int proto);
-guint32 getExtensionObjectType(tvbuff_t *tvb, gint *pOffset);
-void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-void parseResultMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
+uint32_t getExtensionObjectType(tvbuff_t *tvb, int *pOffset);
+void parseNodeClassMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
+void parseResultMask(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset);
-void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, int TypeId);
+void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, int TypeId);
diff --git a/plugins/epan/opcua/opcua_statuscode.c b/plugins/epan/opcua/opcua_statuscode.c
index 78447d77aa..c999948140 100644
--- a/plugins/epan/opcua/opcua_statuscode.c
+++ b/plugins/epan/opcua/opcua_statuscode.c
@@ -22,7 +22,55 @@
const value_string g_statusCodes[] = {
{0x00000000, "Good"},
+ {0x002D0000, "GoodSubscriptionTransferred"},
+ {0x002E0000, "GoodCompletesAsynchronously"},
+ {0x002F0000, "GoodOverload"},
+ {0x00300000, "GoodClamped"},
+ {0x00960000, "GoodLocalOverride"},
+ {0x00A20000, "GoodEntryInserted"},
+ {0x00A30000, "GoodEntryReplaced"},
+ {0x00A50000, "GoodNoData"},
+ {0x00A60000, "GoodMoreData"},
+ {0x00A70000, "GoodCommunicationEvent"},
+ {0x00A80000, "GoodShutdownEvent"},
+ {0x00A90000, "GoodCallAgain"},
+ {0x00AA0000, "GoodNonCriticalTimeout"},
+ {0x00BA0000, "GoodResultsMayBeIncomplete"},
+ {0x00D90000, "GoodDataIgnored"},
+ {0x00DC0000, "GoodEdited"},
+ {0x00DD0000, "GoodPostActionFailed"},
+ {0x00DF0000, "GoodRetransmissionQueueNotSupported"},
+ {0x00E00000, "GoodDependentValueChanged"},
+ {0x00EB0000, "GoodSubNormal"},
+ {0x00EF0000, "GoodPasswordChangeRequired"},
+ {0x01160000, "GoodEdited_DependentValueChanged"},
+ {0x01170000, "GoodEdited_DominantValueChanged"},
+ {0x01180000, "GoodEdited_DominantValueChanged_DependentValueChanged"},
+ {0x04010000, "GoodCascadeInitializationAcknowledged"},
+ {0x04020000, "GoodCascadeInitializationRequest"},
+ {0x04030000, "GoodCascadeNotInvited"},
+ {0x04040000, "GoodCascadeNotSelected"},
+ {0x04070000, "GoodFaultStateActive"},
+ {0x04080000, "GoodInitiateFaultState"},
+ {0x04090000, "GoodCascade"},
{0x40000000, "Uncertain"},
+ {0x406C0000, "UncertainReferenceOutOfServer"},
+ {0x408F0000, "UncertainNoCommunicationLastUsableValue"},
+ {0x40900000, "UncertainLastUsableValue"},
+ {0x40910000, "UncertainSubstituteValue"},
+ {0x40920000, "UncertainInitialValue"},
+ {0x40930000, "UncertainSensorNotAccurate"},
+ {0x40940000, "UncertainEngineeringUnitsExceeded"},
+ {0x40950000, "UncertainSubNormal"},
+ {0x40A40000, "UncertainDataSubNormal"},
+ {0x40BC0000, "UncertainReferenceNotDeleted"},
+ {0x40C00000, "UncertainNotAllNodesAvailable"},
+ {0x40DE0000, "UncertainDominantValueChanged"},
+ {0x40E20000, "UncertainDependentValueChanged"},
+ {0x42080000, "UncertainTransducerInManual"},
+ {0x42090000, "UncertainSimulatedValue"},
+ {0x420A0000, "UncertainSensorCalibration"},
+ {0x420F0000, "UncertainConfigurationError"},
{0x80000000, "Bad"},
{0x80010000, "BadUnexpectedError"},
{0x80020000, "BadInternalError"},
@@ -32,8 +80,6 @@ const value_string g_statusCodes[] = {
{0x80060000, "BadEncodingError"},
{0x80070000, "BadDecodingError"},
{0x80080000, "BadEncodingLimitsExceeded"},
- {0x80B80000, "BadRequestTooLarge"},
- {0x80B90000, "BadResponseTooLarge"},
{0x80090000, "BadUnknownResponse"},
{0x800A0000, "BadTimeout"},
{0x800B0000, "BadServiceUnsupported"},
@@ -42,7 +88,6 @@ const value_string g_statusCodes[] = {
{0x800E0000, "BadServerHalted"},
{0x800F0000, "BadNothingToDo"},
{0x80100000, "BadTooManyOperations"},
- {0x80DB0000, "BadTooManyMonitoredItems"},
{0x80110000, "BadDataTypeIdUnknown"},
{0x80120000, "BadCertificateInvalid"},
{0x80130000, "BadSecurityChecksFailed"},
@@ -57,7 +102,6 @@ const value_string g_statusCodes[] = {
{0x801C0000, "BadCertificateIssuerRevocationUnknown"},
{0x801D0000, "BadCertificateRevoked"},
{0x801E0000, "BadCertificateIssuerRevoked"},
- {0x810D0000, "BadCertificateChainIncomplete"},
{0x801F0000, "BadUserAccessDenied"},
{0x80200000, "BadIdentityTokenInvalid"},
{0x80210000, "BadIdentityTokenRejected"},
@@ -71,11 +115,6 @@ const value_string g_statusCodes[] = {
{0x802A0000, "BadRequestHeaderInvalid"},
{0x802B0000, "BadTimestampsToReturnInvalid"},
{0x802C0000, "BadRequestCancelledByClient"},
- {0x80E50000, "BadTooManyArguments"},
- {0x002D0000, "GoodSubscriptionTransferred"},
- {0x002E0000, "GoodCompletesAsynchronously"},
- {0x002F0000, "GoodOverload"},
- {0x00300000, "GoodClamped"},
{0x80310000, "BadNoCommunication"},
{0x80320000, "BadWaitingForInitialData"},
{0x80330000, "BadNodeIdInvalid"},
@@ -100,12 +139,7 @@ const value_string g_statusCodes[] = {
{0x80460000, "BadStructureMissing"},
{0x80470000, "BadEventFilterInvalid"},
{0x80480000, "BadContentFilterInvalid"},
- {0x80C10000, "BadFilterOperatorInvalid"},
- {0x80C20000, "BadFilterOperatorUnsupported"},
- {0x80C30000, "BadFilterOperandCountMismatch"},
{0x80490000, "BadFilterOperandInvalid"},
- {0x80C40000, "BadFilterElementInvalid"},
- {0x80C50000, "BadFilterLiteralInvalid"},
{0x804A0000, "BadContinuationPointInvalid"},
{0x804B0000, "BadNoContinuationPoints"},
{0x804C0000, "BadReferenceTypeIdInvalid"},
@@ -122,7 +156,6 @@ const value_string g_statusCodes[] = {
{0x80570000, "BadUserSignatureInvalid"},
{0x80580000, "BadApplicationSignatureInvalid"},
{0x80590000, "BadNoValidCertificates"},
- {0x80C60000, "BadIdentityChangeNotSupported"},
{0x805A0000, "BadRequestCancelledByRequest"},
{0x805B0000, "BadParentNodeIdInvalid"},
{0x805C0000, "BadReferenceNotAllowed"},
@@ -139,24 +172,14 @@ const value_string g_statusCodes[] = {
{0x80670000, "BadInvalidSelfReference"},
{0x80680000, "BadReferenceLocalOnly"},
{0x80690000, "BadNoDeleteRights"},
- {0x40BC0000, "UncertainReferenceNotDeleted"},
{0x806A0000, "BadServerIndexInvalid"},
{0x806B0000, "BadViewIdUnknown"},
- {0x80C90000, "BadViewTimestampInvalid"},
- {0x80CA0000, "BadViewParameterMismatch"},
- {0x80CB0000, "BadViewVersionInvalid"},
- {0x40C00000, "UncertainNotAllNodesAvailable"},
- {0x00BA0000, "GoodResultsMayBeIncomplete"},
- {0x80C80000, "BadNotTypeDefinition"},
- {0x406C0000, "UncertainReferenceOutOfServer"},
{0x806D0000, "BadTooManyMatches"},
{0x806E0000, "BadQueryTooComplex"},
{0x806F0000, "BadNoMatch"},
{0x80700000, "BadMaxAgeInvalid"},
- {0x80E60000, "BadSecurityModeInsufficient"},
{0x80710000, "BadHistoryOperationInvalid"},
{0x80720000, "BadHistoryOperationUnsupported"},
- {0x80BD0000, "BadInvalidTimestampArgument"},
{0x80730000, "BadWriteNotSupported"},
{0x80740000, "BadTypeMismatch"},
{0x80750000, "BadMethodInvalid"},
@@ -167,7 +190,6 @@ const value_string g_statusCodes[] = {
{0x807A0000, "BadSequenceNumberUnknown"},
{0x807B0000, "BadMessageNotAvailable"},
{0x807C0000, "BadInsufficientClientProfile"},
- {0x80BF0000, "BadStateNotActive"},
{0x807D0000, "BadTcpServerTooBusy"},
{0x807E0000, "BadTcpMessageTypeInvalid"},
{0x807F0000, "BadTcpSecureChannelUnknown"},
@@ -180,64 +202,22 @@ const value_string g_statusCodes[] = {
{0x80860000, "BadSecureChannelClosed"},
{0x80870000, "BadSecureChannelTokenUnknown"},
{0x80880000, "BadSequenceNumberInvalid"},
- {0x80BE0000, "BadProtocolVersionUnsupported"},
{0x80890000, "BadConfigurationError"},
{0x808A0000, "BadNotConnected"},
{0x808B0000, "BadDeviceFailure"},
{0x808C0000, "BadSensorFailure"},
{0x808D0000, "BadOutOfService"},
{0x808E0000, "BadDeadbandFilterInvalid"},
- {0x408F0000, "UncertainNoCommunicationLastUsableValue"},
- {0x40900000, "UncertainLastUsableValue"},
- {0x40910000, "UncertainSubstituteValue"},
- {0x40920000, "UncertainInitialValue"},
- {0x40930000, "UncertainSensorNotAccurate"},
- {0x40940000, "UncertainEngineeringUnitsExceeded"},
- {0x40950000, "UncertainSubNormal"},
- {0x00960000, "GoodLocalOverride"},
{0x80970000, "BadRefreshInProgress"},
{0x80980000, "BadConditionAlreadyDisabled"},
- {0x80CC0000, "BadConditionAlreadyEnabled"},
{0x80990000, "BadConditionDisabled"},
{0x809A0000, "BadEventIdUnknown"},
- {0x80BB0000, "BadEventNotAcknowledgeable"},
- {0x80CD0000, "BadDialogNotActive"},
- {0x80CE0000, "BadDialogResponseInvalid"},
- {0x80CF0000, "BadConditionBranchAlreadyAcked"},
- {0x80D00000, "BadConditionBranchAlreadyConfirmed"},
- {0x80D10000, "BadConditionAlreadyShelved"},
- {0x80D20000, "BadConditionNotShelved"},
- {0x80D30000, "BadShelvingTimeOutOfRange"},
{0x809B0000, "BadNoData"},
- {0x80D70000, "BadBoundNotFound"},
- {0x80D80000, "BadBoundNotSupported"},
{0x809D0000, "BadDataLost"},
{0x809E0000, "BadDataUnavailable"},
{0x809F0000, "BadEntryExists"},
{0x80A00000, "BadNoEntryExists"},
{0x80A10000, "BadTimestampNotSupported"},
- {0x00A20000, "GoodEntryInserted"},
- {0x00A30000, "GoodEntryReplaced"},
- {0x40A40000, "UncertainDataSubNormal"},
- {0x00A50000, "GoodNoData"},
- {0x00A60000, "GoodMoreData"},
- {0x80D40000, "BadAggregateListMismatch"},
- {0x80D50000, "BadAggregateNotSupported"},
- {0x80D60000, "BadAggregateInvalidInputs"},
- {0x80DA0000, "BadAggregateConfigurationRejected"},
- {0x00D90000, "GoodDataIgnored"},
- {0x80E40000, "BadRequestNotAllowed"},
- {0x00DC0000, "GoodEdited"},
- {0x00DD0000, "GoodPostActionFailed"},
- {0x40DE0000, "UncertainDominantValueChanged"},
- {0x00E00000, "GoodDependentValueChanged"},
- {0x80E10000, "BadDominantValueChanged"},
- {0x40E20000, "UncertainDependentValueChanged"},
- {0x80E30000, "BadDependentValueChanged"},
- {0x00A70000, "GoodCommunicationEvent"},
- {0x00A80000, "GoodShutdownEvent"},
- {0x00A90000, "GoodCallAgain"},
- {0x00AA0000, "GoodNonCriticalTimeout"},
{0x80AB0000, "BadInvalidArgument"},
{0x80AC0000, "BadConnectionRejected"},
{0x80AD0000, "BadDisconnect"},
@@ -251,17 +231,66 @@ const value_string g_statusCodes[] = {
{0x80B50000, "BadWouldBlock"},
{0x80B60000, "BadSyntaxError"},
{0x80B70000, "BadMaxConnectionsReached"},
- {0x81000000, "StartOfStackStatusCodes"},
- {0x81010000, "BadSignatureInvalid"},
- {0x81040000, "BadExtensibleParameterInvalid"},
- {0x81050000, "BadExtensibleParameterUnsupported"},
- {0x81060000, "BadHostUnknown"},
- {0x81070000, "BadTooManyPosts"},
- {0x81080000, "BadSecurityConfig"},
- {0x81090000, "BadFileNotFound"},
- {0x810A0000, "BadContinue"},
- {0x810B0000, "BadHttpMethodNotAllowed"},
- {0x810C0000, "BadFileExists"},
+ {0x80B80000, "BadRequestTooLarge"},
+ {0x80B90000, "BadResponseTooLarge"},
+ {0x80BB0000, "BadEventNotAcknowledgeable"},
+ {0x80BD0000, "BadInvalidTimestampArgument"},
+ {0x80BE0000, "BadProtocolVersionUnsupported"},
+ {0x80BF0000, "BadStateNotActive"},
+ {0x80C10000, "BadFilterOperatorInvalid"},
+ {0x80C20000, "BadFilterOperatorUnsupported"},
+ {0x80C30000, "BadFilterOperandCountMismatch"},
+ {0x80C40000, "BadFilterElementInvalid"},
+ {0x80C50000, "BadFilterLiteralInvalid"},
+ {0x80C60000, "BadIdentityChangeNotSupported"},
+ {0x80C80000, "BadNotTypeDefinition"},
+ {0x80C90000, "BadViewTimestampInvalid"},
+ {0x80CA0000, "BadViewParameterMismatch"},
+ {0x80CB0000, "BadViewVersionInvalid"},
+ {0x80CC0000, "BadConditionAlreadyEnabled"},
+ {0x80CD0000, "BadDialogNotActive"},
+ {0x80CE0000, "BadDialogResponseInvalid"},
+ {0x80CF0000, "BadConditionBranchAlreadyAcked"},
+ {0x80D00000, "BadConditionBranchAlreadyConfirmed"},
+ {0x80D10000, "BadConditionAlreadyShelved"},
+ {0x80D20000, "BadConditionNotShelved"},
+ {0x80D30000, "BadShelvingTimeOutOfRange"},
+ {0x80D40000, "BadAggregateListMismatch"},
+ {0x80D50000, "BadAggregateNotSupported"},
+ {0x80D60000, "BadAggregateInvalidInputs"},
+ {0x80D70000, "BadBoundNotFound"},
+ {0x80D80000, "BadBoundNotSupported"},
+ {0x80DA0000, "BadAggregateConfigurationRejected"},
+ {0x80DB0000, "BadTooManyMonitoredItems"},
+ {0x80E10000, "BadDominantValueChanged"},
+ {0x80E30000, "BadDependentValueChanged"},
+ {0x80E40000, "BadRequestNotAllowed"},
+ {0x80E50000, "BadTooManyArguments"},
+ {0x80E60000, "BadSecurityModeInsufficient"},
+ {0x80E70000, "BadDataSetIdInvalid"},
+ {0x80E80000, "BadTransactionPending"},
+ {0x80E90000, "BadLocked"},
+ {0x80EA0000, "BadIndexRangeDataMismatch"},
+ {0x80EC0000, "BadRequiresLock"},
+ {0x80ED0000, "BadLocaleNotSupported"},
+ {0x80EE0000, "BadServerTooBusy"},
+ {0x80F00000, "BadNoValue"},
{0x810D0000, "BadCertificateChainIncomplete"},
+ {0x810E0000, "BadLicenseExpired"},
+ {0x810F0000, "BadLicenseLimitsExceeded"},
+ {0x81100000, "BadLicenseNotAvailable"},
+ {0x81110000, "BadNotExecutable"},
+ {0x81120000, "BadNumericOverflow"},
+ {0x81130000, "BadRequestNotComplete"},
+ {0x81140000, "BadCertificatePolicyCheckFailed"},
+ {0x81150000, "BadAlreadyExists"},
+ {0x81190000, "BadEdited_OutOfRange"},
+ {0x811A0000, "BadInitialValue_OutOfRange"},
+ {0x811B0000, "BadOutOfRange_DominantValueChanged"},
+ {0x811C0000, "BadEdited_OutOfRange_DominantValueChanged"},
+ {0x811D0000, "BadOutOfRange_DominantValueChanged_DependentValueChanged"},
+ {0x811E0000, "BadEdited_OutOfRange_DominantValueChanged_DependentValueChanged"},
+ {0x811F0000, "BadTicketRequired"},
+ {0x81200000, "BadTicketInvalid"},
{0, NULL}
};
diff --git a/plugins/epan/opcua/opcua_transport_layer.c b/plugins/epan/opcua/opcua_transport_layer.c
index 7769d07a5c..64867c924b 100644
--- a/plugins/epan/opcua/opcua_transport_layer.c
+++ b/plugins/epan/opcua/opcua_transport_layer.c
@@ -46,9 +46,9 @@ static int hf_opcua_transport_seq;
static int hf_opcua_transport_rqid;
/** subtree types */
-extern gint ett_opcua_nodeid;
-extern gint ett_opcua_extensionobject;
-extern gint proto_opcua;
+extern int ett_opcua_nodeid;
+extern int ett_opcua_extensionobject;
+extern int proto_opcua;
/** Defined security policy URL from Part 7 OPC UA Specification. */
#define UA_SECURITY_POLICY_NONE_STRING "http://opcfoundation.org/UA/SecurityPolicy#None"
@@ -92,7 +92,7 @@ void registerTransportLayerTypes(int proto)
proto_register_field_array(proto, hf, array_length(hf));
}
-void parseMessageHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, struct ua_metadata *data _U_)
+void parseMessageHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, struct ua_metadata *data _U_)
{
proto_tree_add_item(tree, hf_opcua_transport_type, tvb, *pOffset, 3, ENC_ASCII|ENC_NA); *pOffset+=3;
proto_tree_add_item(tree, hf_opcua_transport_chunk, tvb, *pOffset, 1, ENC_ASCII|ENC_NA); *pOffset+=1;
@@ -100,7 +100,7 @@ void parseMessageHeader(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
}
/* Transport Layer: message parsers */
-int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data _U_)
+int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data _U_)
{
parseMessageHeader(tree, tvb, pinfo, pOffset, data);
proto_tree_add_item(tree, hf_opcua_transport_ver, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
@@ -112,7 +112,7 @@ int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffse
return -1;
}
-int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, struct ua_metadata *data _U_)
+int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, struct ua_metadata *data _U_)
{
parseMessageHeader(tree, tvb, pinfo, pOffset, data);
proto_tree_add_item(tree, hf_opcua_transport_ver, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
@@ -123,7 +123,7 @@ int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gi
return -1;
}
-int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data _U_)
+int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data _U_)
{
parseMessageHeader(tree, tvb, pinfo, pOffset, data);
parseStatusCode(tree, tvb, pinfo, pOffset, hf_opcua_transport_error);
@@ -131,7 +131,7 @@ int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffse
return -1;
}
-int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data _U_)
+int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data _U_)
{
parseMessageHeader(tree, tvb, pinfo, pOffset, data);
parseString(tree, tvb, pinfo, pOffset, hf_opcua_transport_suri);
@@ -139,7 +139,7 @@ int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
return -1;
}
-int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, struct ua_metadata *data _U_)
+int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, struct ua_metadata *data _U_)
{
parseMessageHeader(tree, tvb, pinfo, pOffset, data);
proto_tree_add_item(tree, hf_opcua_transport_scid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
@@ -147,7 +147,7 @@ int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *
return -1;
}
-int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset, struct ua_metadata *data _U_)
+int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int *pOffset, struct ua_metadata *data _U_)
{
parseMessageHeader(tree, tvb, pinfo, pOffset, data);
parseStatusCode(tree, tvb, pinfo, pOffset, hf_opcua_transport_error);
@@ -156,7 +156,7 @@ int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pO
return -1;
}
-int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data _U_)
+int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data _U_)
{
proto_item *ti;
proto_item *ti_inner;
@@ -190,7 +190,7 @@ void store_encryption_info(packet_info *pinfo, enum ua_message_mode mode, uint8_
if (conv) {
uintptr_t data = (uintptr_t)mode;
data |= ((uintptr_t)sig_len << 8);
- conversation_add_proto_data(conv, proto_opcua, (gpointer)data);
+ conversation_add_proto_data(conv, proto_opcua, (void *)data);
}
}
@@ -219,18 +219,18 @@ void get_encryption_info(packet_info *pinfo, enum ua_message_mode *mode, uint8_t
*
* @return 0 if equal, -1 if not.
*/
-static int opcua_string_compare(const char *text, gint text_len, const char *ref_text)
+static int opcua_string_compare(const char *text, int text_len, const char *ref_text)
{
- gint len = (gint)strlen(ref_text);
+ int len = (int)strlen(ref_text);
if (text_len == len && memcmp(text, ref_text, len) == 0) return 0;
return -1;
}
-int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data)
+int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data)
{
- const guint8 *sec_policy = NULL;
- gint sec_policy_len = 0;
+ const uint8_t *sec_policy = NULL;
+ int sec_policy_len = 0;
int ServiceId = -1;
bool encrypted = false;
@@ -247,7 +247,7 @@ int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
if (opcua_string_compare(sec_policy, sec_policy_len, UA_SECURITY_POLICY_NONE_STRING ) == 0) {
store_encryption_info(pinfo, UA_MessageMode_None, 0);
} else {
- guint8 sig_len = 0;
+ uint8_t sig_len = 0;
// OPN is always encrypted for Policies != None, for both message modes Sign and SignAndEncrypted
encrypted = true;
// determine signature length based on security policy
@@ -277,7 +277,7 @@ int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
return ServiceId;
}
-int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data _U_)
+int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data _U_)
{
parseMessageHeader(tree, tvb, pinfo, pOffset, data);
proto_tree_add_item(tree, hf_opcua_transport_scid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
diff --git a/plugins/epan/opcua/opcua_transport_layer.h b/plugins/epan/opcua/opcua_transport_layer.h
index cd2089d71b..ce30cfbdab 100644
--- a/plugins/epan/opcua/opcua_transport_layer.h
+++ b/plugins/epan/opcua/opcua_transport_layer.h
@@ -22,15 +22,15 @@ struct ua_metadata {
extern int g_opcua_default_sig_len;
/* Transport Layer: message parsers */
-int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
-int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
-int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
-int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
-int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
-int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
-int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
-int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
-int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, struct ua_metadata *data);
+int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
+int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
+int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
+int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
+int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
+int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
+int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
+int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
+int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
void registerTransportLayerTypes(int proto);
enum ua_message_mode;
diff --git a/plugins/epan/pluginifdemo/CMakeLists.txt b/plugins/epan/pluginifdemo/CMakeLists.txt
index 3180c9c91a..95c05a032a 100644
--- a/plugins/epan/pluginifdemo/CMakeLists.txt
+++ b/plugins/epan/pluginifdemo/CMakeLists.txt
@@ -53,11 +53,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "Qt demonstration plugin"
${DISSECTOR_SRC}
)
-add_wireshark_epan_plugin_library(pluginifdemo)
+add_wireshark_plugin_library(pluginifdemo epan)
target_link_libraries(pluginifdemo epan Qt${qtver}::Core Qt${qtver}::Widgets Qt${qtver}::PrintSupport)
diff --git a/plugins/epan/pluginifdemo/pluginifdemo.c b/plugins/epan/pluginifdemo/pluginifdemo.c
index 3f0fea1fa5..e34d7e1154 100644
--- a/plugins/epan/pluginifdemo/pluginifdemo.c
+++ b/plugins/epan/pluginifdemo/pluginifdemo.c
@@ -26,16 +26,16 @@ void proto_reg_handoff_pluginifdemo(void);
static int proto_pluginifdemo;
-void toolbar_cb(gpointer object, gpointer item_data, gpointer user_data);
+void toolbar_cb(void *object, void *item_data, void *user_data);
void
-menu_cb(ext_menubar_gui_type gui_type, gpointer gui_data, gpointer user_data _U_)
+menu_cb(ext_menubar_gui_type gui_type, void *gui_data, void *user_data _U_)
{
pluginifdemo_ui_main(gui_type, gui_data);
}
void
-about_cb(ext_menubar_gui_type gui_type _U_, gpointer gui_data _U_, gpointer user_data _U_)
+about_cb(ext_menubar_gui_type gui_type _U_, void *gui_data _U_, void *user_data _U_)
{
pluginifdemo_ui_about(gui_type, gui_data);
}
@@ -51,7 +51,7 @@ proto_register_pluginifdemo(void)
proto_pluginifdemo = proto_register_protocol("Plugin IF Demo Protocol", "Pluginifdemo", "pluginifdemo");
- ext_menu = ext_menubar_register_menu ( proto_pluginifdemo, "Plugin IF Demonstration", TRUE );
+ ext_menu = ext_menubar_register_menu ( proto_pluginifdemo, "Plugin IF Demonstration", true );
ext_menubar_set_parentmenu (ext_menu, "Tools");
ext_menubar_add_entry(ext_menu, "Toolbar Action Demonstrator", "Action demonstrator for the plugin toolbar", menu_cb, NULL);
@@ -66,21 +66,21 @@ proto_register_pluginifdemo(void)
ext_toolbar_t * tb = ext_toolbar_register_toolbar("Plugin Interface Demo Toolbar");
- ext_toolbar_add_entry(tb, EXT_TOOLBAR_BUTTON, "Button 1", 0, "Button 1 to press", FALSE, 0, FALSE, 0, toolbar_cb, 0);
- ext_toolbar_add_entry(tb, EXT_TOOLBAR_BUTTON, "Button 2", 0, "Button 2 to press", TRUE, 0, FALSE, 0, toolbar_cb, 0);
- ext_toolbar_add_entry(tb, EXT_TOOLBAR_BOOLEAN, "Checkbox", 0, "Checkbox to Select", FALSE, 0, FALSE, 0, toolbar_cb, 0);
- ext_toolbar_add_entry(tb, EXT_TOOLBAR_STRING, "String 1", "Default String", "String without validation", FALSE, 0, TRUE, 0, toolbar_cb, 0);
- ext_toolbar_add_entry(tb, EXT_TOOLBAR_STRING, "String 2", "ABC", "String with validation", FALSE, 0, FALSE, "^[A-Z]+", toolbar_cb, 0);
+ ext_toolbar_add_entry(tb, EXT_TOOLBAR_BUTTON, "Button 1", 0, "Button 1 to press", false, 0, false, 0, toolbar_cb, 0);
+ ext_toolbar_add_entry(tb, EXT_TOOLBAR_BUTTON, "Button 2", 0, "Button 2 to press", true, 0, false, 0, toolbar_cb, 0);
+ ext_toolbar_add_entry(tb, EXT_TOOLBAR_BOOLEAN, "Checkbox", 0, "Checkbox to Select", false, 0, false, 0, toolbar_cb, 0);
+ ext_toolbar_add_entry(tb, EXT_TOOLBAR_STRING, "String 1", "Default String", "String without validation", false, 0, true, 0, toolbar_cb, 0);
+ ext_toolbar_add_entry(tb, EXT_TOOLBAR_STRING, "String 2", "ABC", "String with validation", false, 0, false, "^[A-Z]+", toolbar_cb, 0);
GList * entries = 0;
- entries = ext_toolbar_add_val( entries, "1", "ABCD", FALSE );
- entries = ext_toolbar_add_val(entries, "2", "EFG", FALSE );
- entries = ext_toolbar_add_val(entries, "3", "HIJ", TRUE );
- entries = ext_toolbar_add_val(entries, "4", "KLM", FALSE );
- entries = ext_toolbar_add_val(entries, "5", "NOP", FALSE );
- entries = ext_toolbar_add_val(entries, "6", "QRS", FALSE );
- entries = ext_toolbar_add_val(entries, "7", "TUVW", FALSE );
- entries = ext_toolbar_add_val(entries, "8", "XYZ", FALSE );
- ext_toolbar_add_entry(tb, EXT_TOOLBAR_SELECTOR, "Selector", 0, "Selector to choose from", FALSE, entries, FALSE, 0, toolbar_cb, 0);
+ entries = ext_toolbar_add_val( entries, "1", "ABCD", false );
+ entries = ext_toolbar_add_val(entries, "2", "EFG", false );
+ entries = ext_toolbar_add_val(entries, "3", "HIJ", true );
+ entries = ext_toolbar_add_val(entries, "4", "KLM", false );
+ entries = ext_toolbar_add_val(entries, "5", "NOP", false );
+ entries = ext_toolbar_add_val(entries, "6", "QRS", false );
+ entries = ext_toolbar_add_val(entries, "7", "TUVW", false );
+ entries = ext_toolbar_add_val(entries, "8", "XYZ", false );
+ ext_toolbar_add_entry(tb, EXT_TOOLBAR_SELECTOR, "Selector", 0, "Selector to choose from", false, entries, false, 0, toolbar_cb, 0);
pluginifdemo_toolbar_register(tb);
}
@@ -93,22 +93,22 @@ void* get_capture_file_cb(capture_file* cf, void* user_data _U_) {
return cf->filename;
}
-void toolbar_cb(gpointer toolbar_item, gpointer item_data, gpointer user_data _U_)
+void toolbar_cb(void *toolbar_item, void *item_data, void *user_data _U_)
{
if ( ! toolbar_item )
return;
- gchar * message = 0;
+ char * message = 0;
ext_toolbar_t * entry = (ext_toolbar_t *)toolbar_item;
if (entry->item_type == EXT_TOOLBAR_BUTTON) {
pluginifdemo_toolbar_log("Button pressed at toolbar");
- guint32 fnum = GPOINTER_TO_UINT(plugin_if_get_frame_data(get_frame_data_cb, NULL));
+ uint32_t fnum = GPOINTER_TO_UINT(plugin_if_get_frame_data(get_frame_data_cb, NULL));
if (fnum) {
message = ws_strdup_printf("Current frame is: %u", fnum);
pluginifdemo_toolbar_log(message);
}
- const gchar* fnm = (const gchar*)plugin_if_get_capture_file(get_capture_file_cb, NULL);
+ const char* fnm = (const char*)plugin_if_get_capture_file(get_capture_file_cb, NULL);
if (fnm) {
message = ws_strdup_printf("Capture file name is: %s", fnm);
pluginifdemo_toolbar_log(message);
@@ -116,13 +116,13 @@ void toolbar_cb(gpointer toolbar_item, gpointer item_data, gpointer user_data _U
}
else if ( entry->item_type == EXT_TOOLBAR_BOOLEAN )
{
- gboolean data = *((gboolean *)item_data);
+ bool data = *((bool *)item_data);
message = ws_strdup_printf( "Checkbox selected value: %d", (int) (data) );
pluginifdemo_toolbar_log(message);
}
else if ( entry->item_type == EXT_TOOLBAR_STRING )
{
- gchar * data = (gchar *)item_data;
+ char * data = (char *)item_data;
message = ws_strdup_printf( "String entered in toolbar: %s", data );
pluginifdemo_toolbar_log(message);
}
diff --git a/plugins/epan/profinet/CMakeLists.txt b/plugins/epan/profinet/CMakeLists.txt
index 005d7c3a82..7e6ca56bba 100644
--- a/plugins/epan/profinet/CMakeLists.txt
+++ b/plugins/epan/profinet/CMakeLists.txt
@@ -43,12 +43,11 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "PROFINET dissector"
${DISSECTOR_SRC}
${DISSECTOR_SUPPORT_SRC}
)
-add_wireshark_epan_plugin_library(profinet)
+add_wireshark_plugin_library(profinet epan)
target_link_libraries(profinet epan)
diff --git a/plugins/epan/profinet/packet-dcerpc-pn-io.c b/plugins/epan/profinet/packet-dcerpc-pn-io.c
index 6ce81e760e..9c378528e6 100644
--- a/plugins/epan/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/epan/profinet/packet-dcerpc-pn-io.c
@@ -64,7 +64,9 @@
#include <epan/expert.h>
#include <epan/conversation_filter.h>
#include <epan/proto_data.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include <wsutil/file_util.h>
#include <epan/prefs.h>
@@ -855,6 +857,55 @@ static int hf_pn_io_peer_to_peer_boundary_value_otherbits;
static int hf_pn_io_mau_type_extension;
+static int hf_pn_io_pe_service_request_id;
+static int hf_pn_io_pe_service_request_reference;
+static int hf_pn_io_pe_service_modifier;
+static int hf_pn_io_pe_service_status;
+static int hf_pn_io_pe_service_structure_id;
+static int hf_pn_io_pe_service_errorcode;
+static int hf_pn_io_pe_service_datarequest;
+static int hf_pn_io_pe_service_dataresponse;
+static int hf_pn_io_pe_data_count;
+static int hf_pn_io_pe_pause_time;
+static int hf_pn_io_pe_time_min_pause;
+static int hf_pn_io_pe_time_to_pause;
+static int hf_pn_io_pe_time_min_length_of_stay;
+static int hf_pn_io_pe_time_max_length_of_stay;
+static int hf_pn_io_pe_regular_time_to_operate;
+static int hf_pn_io_pe_current_time_to_operate;
+static int hf_pn_io_pe_current_time_to_destination;
+static int hf_pn_io_pe_mode_power_consumption;
+static int hf_pn_io_pe_energy_to_destination;
+static int hf_pn_io_pe_energy_to_operate;
+static int hf_pn_io_pe_energy_to_pause;
+static int hf_pn_io_pe_version_major;
+static int hf_pn_io_pe_version_minor;
+static int hf_pn_io_pe_entity_class;
+static int hf_pn_io_pe_entity_subclass;
+static int hf_pn_io_pe_entity_dyn_t_and_e;
+static int hf_pn_io_pe_entity_pe_ase;
+static int hf_pn_io_pe_maximum_command_respond_time;
+static int hf_pn_io_pe_mode_id;
+static int hf_pn_io_pe_mode_attributes_value;
+static int hf_pn_io_pe_mode_attributes_value_bit0;
+static int hf_pn_io_pe_mode_attributes_value_otherbits;
+static int hf_pn_io_pe_wol_wake_up_method;
+static int hf_pn_io_pe_wol_wake_up_data_length;
+static int hf_pn_io_pe_mode_id_source;
+static int hf_pn_io_pe_mode_id_destination;
+static int hf_pn_io_pe_measurement;
+static int hf_pn_io_pe_measurement_id;
+static int hf_pn_io_pe_measurement_object_number;
+static int hf_pn_io_pe_measurement_accuracy_domain;
+static int hf_pn_io_pe_measurement_accuracy_class;
+static int hf_pn_io_pe_measurement_range;
+static int hf_pn_io_pe_measurement_structure_length;
+static int hf_pn_io_pe_measurement_structure_id;
+static int hf_pn_io_pe_measurement_status;
+static int hf_pn_io_pe_measurement_value;
+static int hf_pn_io_pe_measurement_value_uint32;
+static int hf_pn_io_pe_measurement_value_float32;
+static int hf_pn_io_pe_measurement_value_float64;
static int hf_pn_io_pe_operational_mode;
static int hf_pn_io_snmp_community_name_length;
@@ -865,91 +916,98 @@ static int hf_pn_io_snmp_write_community_name;
static int hf_pn_io_snmp_control;
/* static int hf_pn_io_packedframe_SFCRC; */
-static gint ett_pn_io;
-static gint ett_pn_io_block;
-static gint ett_pn_io_block_header;
-static gint ett_pn_io_rtc;
-static gint ett_pn_io_rta;
-static gint ett_pn_io_pdu_type;
-static gint ett_pn_io_add_flags;
-static gint ett_pn_io_control_command;
-static gint ett_pn_io_ioxs;
-static gint ett_pn_io_api;
-static gint ett_pn_io_data_description;
-static gint ett_pn_io_module;
-static gint ett_pn_io_submodule;
-static gint ett_pn_io_io_data_object;
-static gint ett_pn_io_io_cs;
-static gint ett_pn_io_ar_properties;
-static gint ett_pn_io_iocr_properties;
-static gint ett_pn_io_submodule_properties;
-static gint ett_pn_io_alarmcr_properties;
-static gint ett_pn_io_submodule_state;
-static gint ett_pn_io_channel_properties;
-static gint ett_pn_io_slot;
-static gint ett_pn_io_subslot;
-static gint ett_pn_io_maintenance_status;
-static gint ett_pn_io_data_status;
-static gint ett_pn_io_iocr;
-static gint ett_pn_io_mrp_rtmode;
-static gint ett_pn_io_control_block_properties;
-static gint ett_pn_io_check_sync_mode;
-static gint ett_pn_io_ir_frame_data;
-static gint ett_pn_FrameDataProperties;
-static gint ett_pn_io_ar_info;
-static gint ett_pn_io_ar_data;
-static gint ett_pn_io_ir_begin_end_port;
-static gint ett_pn_io_ir_tx_phase;
-static gint ett_pn_io_ir_rx_phase;
-static gint ett_pn_io_subframe_data;
-static gint ett_pn_io_SFIOCRProperties;
-static gint ett_pn_io_frame_defails;
-static gint ett_pn_io_profisafe_f_parameter;
-static gint ett_pn_io_profisafe_f_parameter_prm_flag1;
-static gint ett_pn_io_profisafe_f_parameter_prm_flag2;
-static gint ett_pn_io_profidrive_parameter_request;
-static gint ett_pn_io_profidrive_parameter_response;
-static gint ett_pn_io_profidrive_parameter_address;
-static gint ett_pn_io_profidrive_parameter_value;
-static gint ett_pn_io_rs_alarm_info;
-static gint ett_pn_io_rs_event_info;
-static gint ett_pn_io_rs_event_block;
-static gint ett_pn_io_rs_adjust_block;
-static gint ett_pn_io_rs_event_data_extension;
-static gint ett_pn_io_rs_specifier;
-static gint ett_pn_io_rs_time_stamp;
-static gint ett_pn_io_am_device_identification;
-static gint ett_pn_io_rs_reason_code;
-static gint ett_pn_io_soe_digital_input_current_value;
-static gint ett_pn_io_rs_adjust_info;
-static gint ett_pn_io_soe_adjust_specifier;
-static gint ett_pn_io_sr_properties;
-static gint ett_pn_io_line_delay;
-static gint ett_pn_io_counter_status;
-static gint ett_pn_io_neighbor;
-
-static gint ett_pn_io_GroupProperties;
-
-static gint ett_pn_io_asset_management_info;
-static gint ett_pn_io_asset_management_block;
-static gint ett_pn_io_am_location;
-
-static gint ett_pn_io_dcp_boundary;
-static gint ett_pn_io_peer_to_peer_boundary;
-
-static gint ett_pn_io_mau_type_extension;
-
-static gint ett_pn_io_pe_operational_mode;
-
-static gint ett_pn_io_tsn_domain_port_config;
-static gint ett_pn_io_tsn_domain_port_ingress_rate_limiter;
-static gint ett_pn_io_tsn_domain_queue_rate_limiter;
-static gint ett_pn_io_tsn_domain_vid_config;
-static gint ett_pn_io_tsn_domain_queue_config;
-static gint ett_pn_io_time_sync_properties;
-static gint ett_pn_io_tsn_domain_port_id;
-
-static gint ett_pn_io_snmp_command_name;
+static int ett_pn_io;
+static int ett_pn_io_block;
+static int ett_pn_io_block_header;
+static int ett_pn_io_rtc;
+static int ett_pn_io_rta;
+static int ett_pn_io_pdu_type;
+static int ett_pn_io_add_flags;
+static int ett_pn_io_control_command;
+static int ett_pn_io_ioxs;
+static int ett_pn_io_api;
+static int ett_pn_io_data_description;
+static int ett_pn_io_module;
+static int ett_pn_io_submodule;
+static int ett_pn_io_io_data_object;
+static int ett_pn_io_io_cs;
+static int ett_pn_io_ar_properties;
+static int ett_pn_io_iocr_properties;
+static int ett_pn_io_submodule_properties;
+static int ett_pn_io_alarmcr_properties;
+static int ett_pn_io_submodule_state;
+static int ett_pn_io_channel_properties;
+static int ett_pn_io_slot;
+static int ett_pn_io_subslot;
+static int ett_pn_io_maintenance_status;
+static int ett_pn_io_data_status;
+static int ett_pn_io_iocr;
+static int ett_pn_io_mrp_rtmode;
+static int ett_pn_io_control_block_properties;
+static int ett_pn_io_check_sync_mode;
+static int ett_pn_io_ir_frame_data;
+static int ett_pn_FrameDataProperties;
+static int ett_pn_io_ar_info;
+static int ett_pn_io_ar_data;
+static int ett_pn_io_ir_begin_end_port;
+static int ett_pn_io_ir_tx_phase;
+static int ett_pn_io_ir_rx_phase;
+static int ett_pn_io_subframe_data;
+static int ett_pn_io_SFIOCRProperties;
+static int ett_pn_io_frame_defails;
+static int ett_pn_io_profisafe_f_parameter;
+static int ett_pn_io_profisafe_f_parameter_prm_flag1;
+static int ett_pn_io_profisafe_f_parameter_prm_flag2;
+static int ett_pn_io_profidrive_parameter_request;
+static int ett_pn_io_profidrive_parameter_response;
+static int ett_pn_io_profidrive_parameter_address;
+static int ett_pn_io_profidrive_parameter_value;
+static int ett_pn_io_rs_alarm_info;
+static int ett_pn_io_rs_event_info;
+static int ett_pn_io_rs_event_block;
+static int ett_pn_io_rs_adjust_block;
+static int ett_pn_io_rs_event_data_extension;
+static int ett_pn_io_rs_specifier;
+static int ett_pn_io_rs_time_stamp;
+static int ett_pn_io_am_device_identification;
+static int ett_pn_io_rs_reason_code;
+static int ett_pn_io_soe_digital_input_current_value;
+static int ett_pn_io_rs_adjust_info;
+static int ett_pn_io_soe_adjust_specifier;
+static int ett_pn_io_sr_properties;
+static int ett_pn_io_line_delay;
+static int ett_pn_io_counter_status;
+static int ett_pn_io_neighbor;
+
+static int ett_pn_io_GroupProperties;
+
+static int ett_pn_io_asset_management_info;
+static int ett_pn_io_asset_management_block;
+static int ett_pn_io_am_location;
+
+static int ett_pn_io_dcp_boundary;
+static int ett_pn_io_peer_to_peer_boundary;
+
+static int ett_pn_io_mau_type_extension;
+
+static int ett_pn_io_pe_service_request;
+static int ett_pn_io_pe_service_response;
+static int ett_pn_io_pe_service_datarequest;
+static int ett_pn_io_pe_service_dataresponse;
+static int ett_pn_io_pe_mode_attributes;
+static int ett_pn_io_pe_measurement_id;
+static int ett_pn_io_pe_measurement_value;
+static int ett_pn_io_pe_operational_mode;
+
+static int ett_pn_io_tsn_domain_port_config;
+static int ett_pn_io_tsn_domain_port_ingress_rate_limiter;
+static int ett_pn_io_tsn_domain_queue_rate_limiter;
+static int ett_pn_io_tsn_domain_vid_config;
+static int ett_pn_io_tsn_domain_queue_config;
+static int ett_pn_io_time_sync_properties;
+static int ett_pn_io_tsn_domain_port_id;
+
+static int ett_pn_io_snmp_command_name;
#define PD_SUB_FRAME_BLOCK_FIOCR_PROPERTIES_LENGTH 4
@@ -968,16 +1026,16 @@ static expert_field ei_pn_io_nr_of_tx_port_groups;
static expert_field ei_pn_io_max_recursion_depth_reached;
static e_guid_t uuid_pn_io_device = { 0xDEA00001, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } };
-static guint16 ver_pn_io_device = 1;
+static uint16_t ver_pn_io_device = 1;
static e_guid_t uuid_pn_io_controller = { 0xDEA00002, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } };
-static guint16 ver_pn_io_controller = 1;
+static uint16_t ver_pn_io_controller = 1;
static e_guid_t uuid_pn_io_supervisor = { 0xDEA00003, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } };
-static guint16 ver_pn_io_supervisor = 1;
+static uint16_t ver_pn_io_supervisor = 1;
static e_guid_t uuid_pn_io_parameterserver = { 0xDEA00004, 0x6C97, 0x11D1, { 0x82, 0x71, 0x00, 0xA0, 0x24, 0x42, 0xDF, 0x7D } };
-static guint16 ver_pn_io_parameterserver = 1;
+static uint16_t ver_pn_io_parameterserver = 1;
/* According to specification:
* Value(UUID): 00000000-0000-0000-0000-000000000000
@@ -985,14 +1043,14 @@ static guint16 ver_pn_io_parameterserver = 1;
* Use: The value NIL indicates the usage of the implicit AR.
*/
static e_guid_t uuid_pn_io_implicitar = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
-static guint16 ver_pn_io_implicitar = 1;
+static uint16_t ver_pn_io_implicitar = 1;
/* PNIO Preference Variables */
-gboolean pnio_ps_selection = TRUE;
+bool pnio_ps_selection = true;
static const char *pnio_ps_networkpath = "";
-wmem_list_t *aruuid_frame_setup_list = NULL;
-static wmem_map_t *pnio_time_aware_frame_map = NULL;
+wmem_list_t *aruuid_frame_setup_list;
+static wmem_map_t *pnio_time_aware_frame_map;
/* Allow heuristic dissection */
@@ -1180,6 +1238,8 @@ static const value_string pn_io_block_type[] = {
{ 0x0701, "AutoConfiguration Communication"},
{ 0x0702, "AutoConfiguration Configuration"},
{ 0x0703, "AutoConfiguration Isochronous"},
+ { 0x0800, "PROFIenergy ServiceRequest" },
+ { 0x0801, "PROFIenergy ServiceResponse" },
{ 0x0810, "PE_EntityFilterData"},
{ 0x0811, "PE_EntityStatusData"},
{ 0x0900, "RS_AdjustObserver" },
@@ -1409,7 +1469,7 @@ static const value_string pn_io_arproperties_combined_object_container_with_lega
{ 0, NULL }
};
-/* bit 29 for advanced statup mode*/
+/* bit 29 for advanced startup mode*/
static const value_string pn_io_arproperties_combined_object_container_with_advanced_startupmode[] = {
{ 0x00000000, "CombinedObjectContainer not used" },
{ 0x00000001, "Usage of CombinedObjectContainer required" },
@@ -1653,7 +1713,7 @@ static const value_string pn_io_index[] = {
/*0x8081 - 0x808F reserved */
{ 0x8090, "PDInterfaceFSUDataAdjust" },
/*0x8091 - 0x809F reserved */
- { 0x80A0, "Profiles covering energy saving - Record_0" },
+ { 0x80A0, "PROFIenergy ServiceRecord" },
/*0x80A1 - 0x80AE reserved */
{ 0x80AF, "PE_EntityStatusData for one subslot" },
{ 0x80B0, "CombinedObjectContainer" },
@@ -2706,6 +2766,120 @@ static const range_string pn_io_mau_type_extension[] = {
{ 0, 0, NULL }
};
+static const value_string pn_io_pe_entity_classes[] = {
+ { 0x01, "PE Standby" },
+ { 0x02, "PE Measurement" },
+ { 0x03, "PE Standby and PE Measurement" },
+ { 0, NULL }
+};
+
+static const value_string pn_io_pe_entity_subclasses[] = {
+ { 0x00, "No subclass" },
+ { 0x01, "PESAP does not support PE_energy_saving_disabled" },
+ { 0x02, "PESAP does support PE_energy_saving_disabled" },
+ { 0, NULL }
+};
+
+static const value_string pn_io_pe_dyn_t_and_e_values[] = {
+ { 0x00, "none" },
+ { 0x01, "static values" },
+ { 0x02, "dynamic values" },
+ { 0, NULL }
+};
+
+static const value_string pn_io_pe_use_pe_ase[] = {
+ { 0x01, "PE Entity uses PE ASE" },
+ { 0x02, "PE Entity does not use PE ASE" },
+ { 0, NULL }
+};
+
+static const range_string pn_io_pe_services[] = {
+ { 0x00, 0x00, "reserved" },
+ { 0x01, 0x01, "Start_Pause" },
+ { 0x02, 0x02, "End_Pause" },
+ { 0x03, 0x03, "Query_Modes"},
+ { 0x04, 0x04, "PEM_Status" },
+ { 0x05, 0x05, "PE_Identify" },
+ { 0x06, 0x06, "Query_Version" },
+ { 0x07, 0x07, "Query_Attributes" },
+ { 0x08, 0x0F, "reserved" },
+ { 0x10, 0x10, "Query_Measurement" },
+ { 0x11 ,0x11, "Reset_Energy_Meter" },
+ { 0x12, 0x12, "Set_Meter" },
+ { 0x13, 0x1F, "reserved" },
+ { 0x20, 0x20, "Info_Sleep_Mode_WOL" },
+ { 0x21, 0x21, "Go_Sleep_Mode_WOL" },
+ { 0x22, 0xCF, "reserved" },
+ { 0xD0, 0xFF, "manufacturer_specific" },
+ { 0, 0, NULL }
+};
+
+static const value_string pn_io_pe_services_modifier[] = {
+ { 0x0000, "unknown" },
+ { 0x0100, "Start_Pause" },
+ { 0x0101, "Start_Pause_with_time_response" },
+ { 0x0200, "End_Pause" },
+ { 0x0301, "List_Energy_Saving_Modes" },
+ { 0x0302, "Get_Mode" },
+ { 0x0400, "PEM_Status" },
+ { 0x0401, "PEM_Status_Ext1" },
+ { 0x0500, "PE_Identify" },
+ { 0x0600, "Query_Version" },
+ { 0x0700, "Query_Attributes" },
+ { 0x1001, "Get_Measurement_List" },
+ { 0x1002, "Get_Measurement_Values" },
+ { 0x1003, "Get_Measurement_List_with_Object_Number" },
+ { 0x1004, "Get_Measurement_Values_with_Object_Number" },
+ { 0x1100, "Reset_Energy_Meter_All" },
+ { 0x1101, "Reset_Energy_Meter_MeasurementID" },
+ { 0x1102, "Reset_Energy_Meter_ObjectNumber" },
+ { 0x1103, "Reset_Energy_Meter_MeasurementID_ObjectNumber" },
+ { 0x11FE, "Reset_Energy_Meter" },
+ { 0x1200, "Set_Energy_Meter" },
+ { 0x2000, "Info_Sleep_Mode_WOL" },
+ { 0x2100, "Go_Sleep_Mode_WOL" },
+ { 0x2101, "Go_Sleep_Mode_WOL_with_pause_time" },
+ { 0, NULL }
+};
+
+static const value_string pn_io_pe_services_modifier_with_details[] = {
+ { 0x1100, "Reset_Energy_Meter all, ignore Measurement ID and ignore Object Number" },
+ { 0x1101, "Reset_Energy_Meter all meters with this Measurement ID" },
+ { 0x1102, "Reset_Energy_Meter all meters with this Object Number" },
+ { 0x1103, "Reset_Energy_Meter specific meter with this Measurement ID and this Object Number" },
+ { 0, NULL }
+};
+
+static const range_string pn_io_pe_service_status[] = {
+ { 0x00, 0x00, "reserved" },
+ { 0x01, 0x01, "ready" },
+ { 0x02, 0x02, "ready_with_error" },
+ { 0x03, 0x03, "data_incomplete" },
+ { 0x04, 0xCF, "reserved" },
+ { 0xD0, 0xFF, "manufacturer specific" },
+ { 0, 0, NULL }
+};
+
+static const range_string pn_io_pe_service_errorcode[] = {
+ { 0x01, 0x01, "Invalid Service_Request_ID" },
+ { 0x02, 0x02, "Bad Request_Reference" },
+ { 0x03, 0x03, "Invalid Modifier" },
+ { 0x04, 0x04, "Invalid Data_Structure_Identifier_RQ" },
+ { 0x05, 0x05, "Invalid Data_Structure_Identifier_RS" },
+ { 0x06, 0x06, "No PE energy-saving mode supported" },
+ { 0x07, 0x07, "Response too long" },
+ { 0x08, 0x08, "Invalid Block Header" },
+ { 0x09, 0x4F, "reserved" },
+ { 0x50, 0x50, "No suitable energy-saving mode available" },
+ { 0x51, 0x51, "Time is not supported" },
+ { 0x52, 0x52, "Impermissible PE_Mode_ID" },
+ { 0x53, 0x53, "No switch to energy saving mode because of state operate" },
+ { 0x54, 0x54, "Service or function temporarily not available" },
+ { 0x55, 0x55, "Set or reset function for requested measurement not available" },
+ { 0x56, 0xFF, "reserved", },
+ { 0, 0, NULL }
+};
+
static const range_string pn_io_pe_operational_mode[] = {
{ 0x00, 0x00, "PE_PowerOff" },
{ 0x01, 0x1F, "PE_EnergySavingMode" },
@@ -2717,6 +2891,25 @@ static const range_string pn_io_pe_operational_mode[] = {
{ 0, 0, NULL }
};
+static const value_string pn_io_pe_mode_attributes_bit0[] = {
+ { 0x00, "only static time and energy values available" },
+ { 0x01, "dynamic time and energy values available" },
+ { 0, NULL }
+};
+
+static const value_string pn_io_pe_wol_wake_up_method[] = {
+ { 0x01, "Wake-up based on magic packet" },
+ { 0x02, "Wake-up based on vendor specific data (PE Version < V1.3)" },
+ { 0, NULL }
+};
+
+static const value_string pn_io_pe_measurement_status[] = {
+ { 0x01, "valid" },
+ { 0x02, "not available" },
+ { 0x03, "temporarily not available" },
+ { 0, NULL }
+};
+
static const value_string pn_io_port_state[] = {
{ 0x0000, "reserved" },
{ 0x0001, "up" },
@@ -2956,7 +3149,7 @@ static const value_string pn_io_f_crc_seed[] = {
{ 0, NULL }
};
-/* F_Block_ID dissection due to ver2.6 specifikation of PI */
+/* F_Block_ID dissection due to ver2.6 specification of PI */
static const value_string pn_io_f_block_id[] = {
{ 0x00, "No F_WD_Time_2, no F_iPar_CRC" },
{ 0x01, "No F_WD_Time_2, F_iPar_CRC" },
@@ -3734,12 +3927,12 @@ static const value_string pn_io_snmp_control[] = {
};
static int
-dissect_profidrive_value(tvbuff_t *tvb, gint offset, packet_info *pinfo,
- proto_tree *tree, guint8 *drep, guint8 format_val)
+dissect_profidrive_value(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ proto_tree *tree, uint8_t *drep, uint8_t format_val)
{
- guint32 value32;
- guint16 value16;
- guint8 value8;
+ uint32_t value32;
+ uint16_t value16;
+ uint8_t value8;
switch(format_val)
{
@@ -3770,8 +3963,8 @@ dissect_profidrive_value(tvbuff_t *tvb, gint offset, packet_info *pinfo,
break;
case 9:
{
- gint sLen;
- sLen = (gint)tvb_strnlen( tvb, offset, -1);
+ int sLen;
+ sLen = (int)tvb_strnlen( tvb, offset, -1);
proto_tree_add_item(tree, hf_pn_io_profidrive_param_value_string, tvb, offset, sLen, ENC_ASCII);
offset = (offset + sLen);
break;
@@ -3789,18 +3982,18 @@ static GList *pnio_ars;
typedef struct pnio_ar_s {
/* generic */
e_guid_t aruuid;
- guint16 inputframeid;
- guint16 outputframeid;
+ uint16_t inputframeid;
+ uint16_t outputframeid;
/* controller only */
/*const char controllername[33];*/
- guint8 controllermac[6];
- guint16 controlleralarmref;
+ uint8_t controllermac[6];
+ uint16_t controlleralarmref;
/* device only */
- guint8 devicemac[6];
- guint16 devicealarmref;
- guint16 arType;
+ uint8_t devicemac[6];
+ uint16_t devicealarmref;
+ uint16_t arType;
} pnio_ar_t;
@@ -3852,13 +4045,13 @@ pnio_ar_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pnio_ar_t *ar)
static int dissect_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar);
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar);
static int dissect_a_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep);
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep);
static int dissect_PNIO_IOxS(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, int hfindex);
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, int hfindex);
@@ -3905,13 +4098,13 @@ pnio_ar_new(e_guid_t *aruuid)
/* dissect the alarm specifier */
static int
dissect_Alarm_specifier(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint16 u16AlarmSpecifierSequence;
- guint16 u16AlarmSpecifierChannel;
- guint16 u16AlarmSpecifierManufacturer;
- guint16 u16AlarmSpecifierSubmodule;
- guint16 u16AlarmSpecifierAR;
+ uint16_t u16AlarmSpecifierSequence;
+ uint16_t u16AlarmSpecifierChannel;
+ uint16_t u16AlarmSpecifierManufacturer;
+ uint16_t u16AlarmSpecifierSubmodule;
+ uint16_t u16AlarmSpecifierAR;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -3947,12 +4140,12 @@ dissect_Alarm_specifier(tvbuff_t *tvb, int offset,
/* dissect the alarm header */
static int
dissect_Alarm_header(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep)
{
- guint16 u16AlarmType;
- guint32 u32Api;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
+ uint16_t u16AlarmType;
+ uint32_t u32Api;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_alarm_type, &u16AlarmType);
@@ -3977,11 +4170,11 @@ dissect_Alarm_header(tvbuff_t *tvb, int offset,
static int
dissect_ChannelProperties(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16ChannelProperties;
+ uint16_t u16ChannelProperties;
sub_item = proto_tree_add_item(tree, hf_pn_io_channel_properties, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -4003,12 +4196,12 @@ dissect_ChannelProperties(tvbuff_t *tvb, int offset,
/* dissect the RS_BlockHeader */
static int
dissect_RS_BlockHeader(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep,
- guint16 *u16RSBodyLength, guint16 *u16RSBlockType)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep,
+ uint16_t *u16RSBodyLength, uint16_t *u16RSBlockType)
{
- guint16 u16RSBlockLength;
- guint8 u8BlockVersionHigh;
- guint8 u8BlockVersionLow;
+ uint16_t u16RSBlockLength;
+ uint8_t u8BlockVersionHigh;
+ uint8_t u8BlockVersionLow;
/* u16RSBlockType is needed for further dissection */
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
@@ -4041,13 +4234,13 @@ dissect_RS_BlockHeader(tvbuff_t *tvb, int offset,
static int
dissect_RS_AddressInfo(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep, guint16 *u16RSBodyLength)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep, uint16_t *u16RSBodyLength)
{
e_guid_t IM_UniqueIdentifier;
- guint32 u32Api;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16ChannelNumber;
+ uint32_t u32Api;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16ChannelNumber;
/* IM_UniqueIdentifier */
offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
@@ -4080,19 +4273,19 @@ dissect_RS_AddressInfo(tvbuff_t *tvb, int offset,
/* dissect the RS_EventDataCommon */
static int
dissect_RS_EventDataCommon(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep, guint16 *u16RSBodyLength)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep, uint16_t *u16RSBodyLength)
{
- guint16 u16RSSpecifierSequenceNumber;
- guint16 u16RSSpecifierReserved;
- guint16 u16RSSpecifierSpecifier;
- guint16 u16RSMinorError;
- guint16 u16RSPlusError;
+ uint16_t u16RSSpecifierSequenceNumber;
+ uint16_t u16RSSpecifierReserved;
+ uint16_t u16RSSpecifierSpecifier;
+ uint16_t u16RSMinorError;
+ uint16_t u16RSPlusError;
proto_item *sub_item;
proto_tree *sub_tree;
proto_item *sub_item_time_stamp;
proto_tree *sub_tree_time_stamp;
nstime_t timestamp;
- guint16 u16RSTimeStampStatus;
+ uint16_t u16RSTimeStampStatus;
/* RS_AddressInfo */
offset = dissect_RS_AddressInfo(tvb, offset, pinfo, tree, drep, u16RSBodyLength);
@@ -4151,14 +4344,14 @@ dissect_RS_EventDataCommon(tvbuff_t *tvb, int offset,
/* dissect the RS_IdentificationInfo */
static int
dissect_RS_IdentificationInfo(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
dcerpc_info di; /* fake dcerpc_info struct */
dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
- guint64 u64AMDeviceIdentificationDeviceSubID;
- guint64 u64AMDeviceIdentificationDeviceID;
- guint64 u64AMDeviceIdentificationVendorID;
- guint64 u64AM_DeviceIdentificationOrganization;
+ uint64_t u64AMDeviceIdentificationDeviceSubID;
+ uint64_t u64AMDeviceIdentificationDeviceID;
+ uint64_t u64AMDeviceIdentificationVendorID;
+ uint64_t u64AM_DeviceIdentificationOrganization;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -4192,20 +4385,20 @@ dissect_RS_IdentificationInfo(tvbuff_t *tvb, int offset,
/* dissect the RS_EventDataExtension_Data */
static int
dissect_RS_EventDataExtension_Data(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep,
- guint8 *u8RSExtensionBlockLength, guint16 *u16RSBlockType)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep,
+ uint8_t *u8RSExtensionBlockLength, uint16_t *u16RSBlockType)
{
- guint32 u32RSReasonCodeReason;
- guint32 u32RSReasonCodeDetail;
- guint8 u8LengthRSDomainIdentification = 16;
- guint8 u8LengthRSMasterIdentification = 8;
- guint16 u16SoE_DigitalInputCurrentValueValue;
- guint16 u16SoE_DigitalInputCurrentValueReserved;
+ uint32_t u32RSReasonCodeReason;
+ uint32_t u32RSReasonCodeDetail;
+ uint8_t u8LengthRSDomainIdentification = 16;
+ uint8_t u8LengthRSMasterIdentification = 8;
+ uint16_t u16SoE_DigitalInputCurrentValueValue;
+ uint16_t u16SoE_DigitalInputCurrentValueReserved;
proto_item *sub_item;
proto_tree *sub_tree;
nstime_t timestamp;
- guint16 u16RSTimeStampStatus;
+ uint16_t u16RSTimeStampStatus;
proto_item *sub_item_time_stamp;
proto_tree *sub_tree_time_stamp;
@@ -4294,10 +4487,10 @@ dissect_RS_EventDataExtension_Data(tvbuff_t *tvb, int offset,
/* dissect the RS_EventDataExtension */
static int
dissect_RS_EventDataExtension(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint8 *drep, guint16 *u16RSBlockLength, guint16 *u16RSBlockType)
+ proto_tree *tree, uint8_t *drep, uint16_t *u16RSBlockLength, uint16_t *u16RSBlockType)
{
- guint8 u8RSExtensionBlockType;
- guint8 u8RSExtensionBlockLength;
+ uint8_t u8RSExtensionBlockType;
+ uint8_t u8RSExtensionBlockLength;
/* RS_ExtensionBlockType */
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep,
@@ -4322,8 +4515,8 @@ dissect_RS_EventDataExtension(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* dissect the RS_EventData */
static int
dissect_RS_EventData(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep,
- guint16 *u16RSBodyLength, guint16 *u16RSBlockType)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep,
+ uint16_t *u16RSBodyLength, uint16_t *u16RSBlockType)
{
proto_item *sub_item;
proto_tree *sub_tree;
@@ -4345,13 +4538,13 @@ dissect_RS_EventData(tvbuff_t *tvb, int offset,
/* dissect the RS_EventBlock */
static int
dissect_RS_EventBlock(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16RSBodyLength;
- guint16 u16RSBlockType;
+ uint16_t u16RSBodyLength;
+ uint16_t u16RSBlockType;
sub_item = proto_tree_add_item(tree, hf_pn_io_rs_event_block, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_event_block);
@@ -4369,11 +4562,11 @@ dissect_RS_EventBlock(tvbuff_t *tvb, int offset,
/* dissect the RS_AlarmInfo */
static int
dissect_RS_AlarmInfo(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16RSAlarmInfo;
+ uint16_t u16RSAlarmInfo;
sub_item = proto_tree_add_item(tree, hf_pn_io_rs_alarm_info, tvb, offset, 2, ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_alarm_info);
@@ -4390,11 +4583,11 @@ dissect_RS_AlarmInfo(tvbuff_t *tvb, int offset,
/* dissect the RS_EventInfo */
static int
dissect_RS_EventInfo(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16NumberofEntries;
+ uint16_t u16NumberofEntries;
sub_item = proto_tree_add_item(tree, hf_pn_io_rs_event_info, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_event_info);
@@ -4411,13 +4604,13 @@ dissect_RS_EventInfo(tvbuff_t *tvb, int offset,
static int
dissect_Diagnosis(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, proto_item *item, guint8 *drep, guint16 u16UserStructureIdentifier)
+ proto_tree *tree, proto_item *item, uint8_t *drep, uint16_t u16UserStructureIdentifier)
{
- guint16 u16ChannelNumber;
- guint16 u16ChannelErrorType;
- guint16 u16ExtChannelErrorType;
- guint32 u32ExtChannelAddValue;
- guint32 u32QualifiedChannelQualifier;
+ uint16_t u16ChannelNumber;
+ uint16_t u16ChannelErrorType;
+ uint16_t u16ExtChannelErrorType;
+ uint32_t u32ExtChannelAddValue;
+ uint32_t u32QualifiedChannelQualifier;
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_channel_number, &u16ChannelNumber);
@@ -4519,12 +4712,13 @@ dissect_Diagnosis(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_AlarmUserStructure(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
- guint16 *body_length, guint16 u16UserStructureIdentifier)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+ uint16_t *body_length, uint16_t u16UserStructureIdentifier)
{
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
switch (u16UserStructureIdentifier) {
@@ -4580,13 +4774,14 @@ dissect_AlarmUserStructure(tvbuff_t *tvb, int offset,
/* dissect the alarm notification block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_AlarmNotification_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 body_length)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t body_length)
{
- guint32 u32ModuleIdentNumber;
- guint32 u32SubmoduleIdentNumber;
- guint16 u16UserStructureIdentifier;
+ uint32_t u32ModuleIdentNumber;
+ uint32_t u32SubmoduleIdentNumber;
+ uint16_t u16UserStructureIdentifier;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -4595,6 +4790,8 @@ dissect_AlarmNotification_block(tvbuff_t *tvb, int offset,
return offset;
}
+ increment_dissection_depth(pinfo);
+
offset = dissect_Alarm_header(tvb, offset, pinfo, tree, item, drep);
offset = dissect_dcerpc_uint32(tvb, offset, pinfo, tree, drep,
@@ -4619,27 +4816,29 @@ dissect_AlarmNotification_block(tvbuff_t *tvb, int offset,
offset = dissect_AlarmUserStructure(tvb, offset, pinfo, tree, item, drep, &body_length, u16UserStructureIdentifier);
}
+ decrement_dissection_depth(pinfo);
+
return offset;
}
static int
dissect_IandM0_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint8 u8VendorIDHigh;
- guint8 u8VendorIDLow;
- guint16 u16IMHardwareRevision;
- guint8 u8SWRevisionPrefix;
- guint8 u8IMSWRevisionFunctionalEnhancement;
- guint8 u8IMSWRevisionBugFix;
- guint8 u8IMSWRevisionInternalChange;
- guint16 u16IMRevisionCounter;
- guint16 u16IMProfileID;
- guint16 u16IMProfileSpecificType;
- guint8 u8IMVersionMajor;
- guint8 u8IMVersionMinor;
- guint16 u16IMSupported;
+ uint8_t u8VendorIDHigh;
+ uint8_t u8VendorIDLow;
+ uint16_t u16IMHardwareRevision;
+ uint8_t u8SWRevisionPrefix;
+ uint8_t u8IMSWRevisionFunctionalEnhancement;
+ uint8_t u8IMSWRevisionBugFix;
+ uint8_t u8IMSWRevisionInternalChange;
+ uint16_t u16IMRevisionCounter;
+ uint16_t u16IMProfileID;
+ uint16_t u16IMProfileSpecificType;
+ uint8_t u8IMVersionMajor;
+ uint8_t u8IMVersionMinor;
+ uint16_t u16IMSupported;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -4702,7 +4901,7 @@ dissect_IandM0_block(tvbuff_t *tvb, int offset,
static int
dissect_IandM1_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
char *pTagFunction;
char *pTagLocation;
@@ -4729,7 +4928,7 @@ dissect_IandM1_block(tvbuff_t *tvb, int offset,
static int
dissect_IandM2_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
char *pDate;
@@ -4751,7 +4950,7 @@ dissect_IandM2_block(tvbuff_t *tvb, int offset,
static int
dissect_IandM3_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
char *pDescriptor;
@@ -4773,7 +4972,7 @@ dissect_IandM3_block(tvbuff_t *tvb, int offset,
static int
dissect_IandM4_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -4788,10 +4987,11 @@ dissect_IandM4_block(tvbuff_t *tvb, int offset,
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_IandM5_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberofEntries;
+ uint16_t u16NumberofEntries;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -4810,21 +5010,21 @@ dissect_IandM5_block(tvbuff_t *tvb, int offset,
static int
dissect_IandM0FilterData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberOfAPIs;
- guint32 u32Api;
- guint16 u16NumberOfModules;
- guint16 u16SlotNr;
- guint32 u32ModuleIdentNumber;
- guint16 u16NumberOfSubmodules;
- guint16 u16SubslotNr;
- guint32 u32SubmoduleIdentNumber;
+ uint16_t u16NumberOfAPIs;
+ uint32_t u32Api;
+ uint16_t u16NumberOfModules;
+ uint16_t u16SlotNr;
+ uint32_t u32ModuleIdentNumber;
+ uint16_t u16NumberOfSubmodules;
+ uint16_t u16SubslotNr;
+ uint32_t u32SubmoduleIdentNumber;
proto_item *subslot_item;
proto_tree *subslot_tree;
proto_item *module_item;
proto_tree *module_tree;
- guint32 u32ModuleStart;
+ uint32_t u32ModuleStart;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -4889,15 +5089,15 @@ dissect_IandM0FilterData_block(tvbuff_t *tvb, int offset,
static int
dissect_IandM5Data_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep)
{
- guint8 u8VendorIDHigh;
- guint8 u8VendorIDLow;
- guint16 u16IMHardwareRevision;
- guint8 u8SWRevisionPrefix;
- guint8 u8IMSWRevisionFunctionalEnhancement;
- guint8 u8IMSWRevisionBugFix;
- guint8 u8IMSWRevisionInternalChange;
+ uint8_t u8VendorIDHigh;
+ uint8_t u8VendorIDLow;
+ uint16_t u16IMHardwareRevision;
+ uint8_t u8SWRevisionPrefix;
+ uint8_t u8IMSWRevisionFunctionalEnhancement;
+ uint8_t u8IMSWRevisionBugFix;
+ uint8_t u8IMSWRevisionInternalChange;
/* c8[64] IM Annotation */
proto_tree_add_item(tree, hf_pn_io_im_annotation, tvb, offset, 64, ENC_ASCII);
@@ -4940,25 +5140,25 @@ dissect_IandM5Data_block(tvbuff_t *tvb, int offset,
static int
dissect_AM_Location(tvbuff_t *tvb, int offset,
-packet_info *pinfo, proto_tree *tree, guint8 *drep)
+packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint8 am_location_structtype;
+ uint8_t am_location_structtype;
int bit_offset;
- guint8 am_location_reserved1;
- guint16 am_location_begin_slot_number;
- guint16 am_location_begin_subslot_number;
- guint16 am_location_end_slot_number;
- guint16 am_location_end_subslot_number;
- guint16 am_location_reserved2;
- guint16 am_location_reserved3;
- guint16 am_location_reserved4;
+ uint8_t am_location_reserved1;
+ uint16_t am_location_begin_slot_number;
+ uint16_t am_location_begin_subslot_number;
+ uint16_t am_location_end_slot_number;
+ uint16_t am_location_end_subslot_number;
+ uint16_t am_location_reserved2;
+ uint16_t am_location_reserved3;
+ uint16_t am_location_reserved4;
sub_item = proto_tree_add_item(tree, hf_pn_io_am_location, tvb, offset, 16, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_am_location);
- am_location_structtype = tvb_get_guint8(tvb, offset+15);
+ am_location_structtype = tvb_get_uint8(tvb, offset+15);
bit_offset = offset << 3;
switch (am_location_structtype)
@@ -5067,12 +5267,12 @@ packet_info *pinfo, proto_tree *tree, guint8 *drep)
static int
dissect_IM_software_revision(tvbuff_t *tvb, int offset,
-packet_info *pinfo, proto_tree *tree, guint8 *drep)
+packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint8 u8SWRevisionPrefix;
- guint8 u8IMSWRevisionFunctionalEnhancement;
- guint8 u8IMSWRevisionBugFix;
- guint8 u8IMSWRevisionInternalChange;
+ uint8_t u8SWRevisionPrefix;
+ uint8_t u8IMSWRevisionFunctionalEnhancement;
+ uint8_t u8IMSWRevisionBugFix;
+ uint8_t u8IMSWRevisionInternalChange;
/* SWRevisionPrefix */
offset = dissect_dcerpc_char(tvb, offset, pinfo, tree, drep,
@@ -5095,14 +5295,14 @@ packet_info *pinfo, proto_tree *tree, guint8 *drep)
static int
dissect_AM_device_identification(tvbuff_t *tvb, int offset,
-packet_info *pinfo, proto_tree *tree, guint8 *drep)
+packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
dcerpc_info di; /* fake dcerpc_info struct */
dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
- guint64 u64AMDeviceIdentificationDeviceSubID;
- guint64 u64AMDeviceIdentificationDeviceID;
- guint64 u64AMDeviceIdentificationVendorID;
- guint64 u64AM_DeviceIdentificationOrganization;
+ uint64_t u64AMDeviceIdentificationDeviceSubID;
+ uint64_t u64AMDeviceIdentificationDeviceID;
+ uint64_t u64AMDeviceIdentificationVendorID;
+ uint64_t u64AM_DeviceIdentificationOrganization;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -5125,12 +5325,12 @@ packet_info *pinfo, proto_tree *tree, guint8 *drep)
static int
dissect_AM_FullInformation_block(tvbuff_t *tvb, int offset,
-packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
-guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
e_guid_t IM_UniqueIdentifier;
- guint16 u16AM_TypeIdentification;
- guint16 u16IMHardwareRevision;
+ uint16_t u16AM_TypeIdentification;
+ uint16_t u16IMHardwareRevision;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -5187,12 +5387,12 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
static int
dissect_AM_HardwareOnlyInformation_block(tvbuff_t *tvb, int offset,
-packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
-guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
e_guid_t IM_UniqueIdentifier;
- guint16 u16AM_TypeIdentification;
- guint16 u16IMHardwareRevision;
+ uint16_t u16AM_TypeIdentification;
+ uint16_t u16IMHardwareRevision;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -5242,12 +5442,12 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
static int
dissect_AM_FirmwareOnlyInformation_block(tvbuff_t *tvb, int offset,
-packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
-guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
e_guid_t IM_UniqueIdentifier;
- guint16 u16AM_TypeIdentification;
- guint16 u16AM_Reserved;
+ uint16_t u16AM_TypeIdentification;
+ uint16_t u16AM_Reserved;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -5299,12 +5499,13 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
/* dissect the AssetManagementInfo */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_AssetManagementInfo(tvbuff_t *tvb, int offset,
-packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
+packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16NumberofEntries;
+ uint16_t u16NumberofEntries;
sub_item = proto_tree_add_item(tree, hf_pn_io_asset_management_info, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_asset_management_info);
@@ -5321,35 +5522,38 @@ packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
/* dissect the AssetManagementData block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_AssetManagementData_block(tvbuff_t *tvb, int offset,
-packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
-guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
"Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
return offset;
}
+ increment_dissection_depth(pinfo);
offset = dissect_AssetManagementInfo(tvb, offset, pinfo, tree, drep);
+ decrement_dissection_depth(pinfo);
return offset;
}
/* dissect the IdentificationData block */
static int
dissect_IdentificationData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberOfAPIs = 1;
- guint32 u32Api;
- guint16 u16NumberOfSlots;
- guint16 u16SlotNr;
- guint32 u32ModuleIdentNumber;
- guint16 u16NumberOfSubslots;
- guint32 u32SubmoduleIdentNumber;
- guint16 u16SubslotNr;
+ uint16_t u16NumberOfAPIs = 1;
+ uint32_t u32Api;
+ uint16_t u16NumberOfSlots;
+ uint16_t u16SlotNr;
+ uint32_t u32ModuleIdentNumber;
+ uint16_t u16NumberOfSubslots;
+ uint32_t u32SubmoduleIdentNumber;
+ uint16_t u16SubslotNr;
proto_item *slot_item;
proto_tree *slot_tree;
- guint32 u32SlotStart;
+ uint32_t u32SlotStart;
proto_item *subslot_item;
proto_tree *subslot_tree;
@@ -5425,10 +5629,10 @@ dissect_IdentificationData_block(tvbuff_t *tvb, int offset,
/* dissect the substitute value block */
static int
dissect_SubstituteValue_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint16 u16SubstitutionMode;
+ uint16_t u16SubstitutionMode;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -5455,11 +5659,11 @@ dissect_SubstituteValue_block(tvbuff_t *tvb, int offset,
/* dissect the RecordInputDataObjectElement block */
static int
dissect_RecordInputDataObjectElement_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint8 u8LengthIOCS;
- guint8 u8LengthIOPS;
- guint16 u16LengthData;
+ uint8_t u8LengthIOCS;
+ uint8_t u8LengthIOPS;
+ uint16_t u16LengthData;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -5490,15 +5694,16 @@ dissect_RecordInputDataObjectElement_block(tvbuff_t *tvb, int offset,
/* dissect the RecordOutputDataObjectElement block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_RecordOutputDataObjectElement_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16SubstituteActiveFlag;
- guint8 u8LengthIOCS;
- guint8 u8LengthIOPS;
- guint16 u16LengthData;
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint16_t u16SubstituteActiveFlag;
+ uint8_t u8LengthIOCS;
+ uint8_t u8LengthIOPS;
+ uint16_t u16LengthData;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
@@ -5538,7 +5743,7 @@ dissect_RecordOutputDataObjectElement_block(tvbuff_t *tvb, int offset,
/* dissect the alarm acknowledge block */
static int
dissect_Alarm_ack_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -5561,11 +5766,11 @@ dissect_Alarm_ack_block(tvbuff_t *tvb, int offset,
/* dissect the maintenance block */
static int
dissect_Maintenance_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32MaintenanceStatus;
+ uint32_t u32MaintenanceStatus;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -5600,11 +5805,11 @@ dissect_Maintenance_block(tvbuff_t *tvb, int offset,
/* dissect the pe_alarm block */
static int
dissect_PE_Alarm_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint8 u8PEOperationalMode;
+ uint8_t u8PEOperationalMode;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -5626,12 +5831,12 @@ dissect_PE_Alarm_block(tvbuff_t* tvb, int offset,
/* dissect the read/write header */
static int
dissect_ReadWrite_header(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint16 *u16Index, e_guid_t *aruuid)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint16_t *u16Index, e_guid_t *aruuid)
{
- guint32 u32Api;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16SeqNr;
+ uint32_t u32Api;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16SeqNr;
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_seq_number, &u16SeqNr);
@@ -5664,8 +5869,8 @@ dissect_ReadWrite_header(tvbuff_t *tvb, int offset,
/* dissect the write request block */
static int
dissect_IODWriteReqHeader_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t ** ar)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t ** ar)
{
e_guid_t aruuid;
e_guid_t null_uuid;
@@ -5705,8 +5910,8 @@ dissect_IODWriteReqHeader_block(tvbuff_t *tvb, int offset,
/* dissect the read request block */
static int
dissect_IODReadReqHeader_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar)
{
e_guid_t aruuid;
e_guid_t null_uuid;
@@ -5747,13 +5952,13 @@ dissect_IODReadReqHeader_block(tvbuff_t *tvb, int offset,
/* dissect the write response block */
static int
dissect_IODWriteResHeader_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar)
{
e_guid_t aruuid;
- guint16 u16AddVal1;
- guint16 u16AddVal2;
- guint32 u32Status;
+ uint16_t u16AddVal1;
+ uint16_t u16AddVal2;
+ uint32_t u32Status;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -5798,12 +6003,12 @@ dissect_IODWriteResHeader_block(tvbuff_t *tvb, int offset,
/* dissect the read response block */
static int
dissect_IODReadResHeader_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar)
{
e_guid_t aruuid;
- guint16 u16AddVal1;
- guint16 u16AddVal2;
+ uint16_t u16AddVal1;
+ uint16_t u16AddVal2;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -5842,15 +6047,15 @@ dissect_IODReadResHeader_block(tvbuff_t *tvb, int offset,
/* dissect the control/connect and control/connect block */
static int
dissect_ControlPlugOrConnect_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- pnio_ar_t **ar, guint16 blocktype)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ pnio_ar_t **ar, uint16_t blocktype)
{
e_guid_t ar_uuid;
- guint16 u16SessionKey;
+ uint16_t u16SessionKey;
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16Command;
- guint16 u16Properties;
+ uint16_t u16Command;
+ uint16_t u16Properties;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -5958,12 +6163,12 @@ dissect_ControlPlugOrConnect_block(tvbuff_t *tvb, int offset,
/* dissect the ControlBlockPrmBegin block */
static int
dissect_ControlBlockPrmBegin(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint32 u32RecDataLen,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint32_t u32RecDataLen,
pnio_ar_t **ar)
{
e_guid_t ar_uuid;
- guint16 u16SessionKey;
- guint16 u16Command;
+ uint16_t u16SessionKey;
+ uint16_t u16Command;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -6025,13 +6230,13 @@ dissect_ControlBlockPrmBegin(tvbuff_t *tvb, int offset,
/* dissect the SubmoduleListBlock block */
static int
dissect_SubmoduleListBlock(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint32 u32RecDataLen _U_,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint32_t u32RecDataLen _U_,
pnio_ar_t **ar _U_)
{
- guint16 u16Entries;
- guint32 u32API;
- guint16 u16SlotNumber;
- guint16 u16SubSlotNumber;
+ uint16_t u16Entries;
+ uint32_t u32API;
+ uint16_t u16SlotNumber;
+ uint16_t u16SubSlotNumber;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -6056,8 +6261,9 @@ dissect_SubmoduleListBlock(tvbuff_t *tvb, int offset,
/* dissect the PDevData block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDevData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -6076,10 +6282,10 @@ dissect_PDevData_block(tvbuff_t *tvb, int offset,
/* dissect the AdjustPreambleLength block */
static int
dissect_AdjustPreambleLength_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16AdjustProperties;
- guint16 u16PreambleLength;
+ uint16_t u16AdjustProperties;
+ uint16_t u16PreambleLength;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -6104,9 +6310,9 @@ dissect_AdjustPreambleLength_block(tvbuff_t *tvb, int offset,
/* dissect the dissect_CheckMAUTypeExtension_block block */
static int
dissect_CheckMAUTypeExtension_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16MauTypeExtension;
+ uint16_t u16MauTypeExtension;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -6122,12 +6328,13 @@ dissect_CheckMAUTypeExtension_block(tvbuff_t *tvb, int offset,
/* dissect the PDPortDataAdjust block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDPortData_Adjust_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
tvbuff_t *new_tvb;
@@ -6162,12 +6369,13 @@ dissect_PDPortData_Adjust_block(tvbuff_t *tvb, int offset,
/* dissect the PDPortDataCheck blocks */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDPortData_Check_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
tvbuff_t *new_tvb;
@@ -6201,13 +6409,13 @@ dissect_PDPortData_Check_block(tvbuff_t *tvb, int offset,
/* dissect the Line Delay */
static int
-dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep,
- guint32 *u32LineDelayValue)
+dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, uint8_t *drep,
+ uint32_t *u32LineDelayValue)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32FormatIndicator;
- guint8 isFormatIndicatorEnabled;
+ uint32_t u32FormatIndicator;
+ uint8_t isFormatIndicatorEnabled;
sub_item = proto_tree_add_item(tree, hf_pn_io_line_delay, tvb, offset, 4, ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_line_delay);
@@ -6215,7 +6423,7 @@ dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
hf_pn_io_line_delay_format_indicator, &u32FormatIndicator);
- isFormatIndicatorEnabled = (guint8)((u32FormatIndicator >> 31) & 0x01);
+ isFormatIndicatorEnabled = (uint8_t)((u32FormatIndicator >> 31) & 0x01);
if (isFormatIndicatorEnabled)
{
offset = dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
@@ -6233,28 +6441,28 @@ dissect_Line_Delay(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
/* dissect the PDPortDataReal blocks */
static int
dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint8 u8LengthOwnPortID;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint8_t u8LengthOwnPortID;
char *pOwnPortID;
proto_item *sub_item;
proto_tree *sub_tree;
- guint8 u8NumberOfPeers;
- guint8 u8I;
- guint8 u8LengthPeerPortID;
- guint8 u8LengthPeerChassisID;
- guint8 mac[6];
+ uint8_t u8NumberOfPeers;
+ uint8_t u8I;
+ uint8_t u8LengthPeerPortID;
+ uint8_t u8LengthPeerChassisID;
+ uint8_t mac[6];
char *pPeerChassisId;
char *pPeerPortId;
- guint16 u16MAUType;
- guint32 u32DomainBoundary;
- guint32 u32MulticastBoundary;
- guint8 u8LinkStatePort;
- guint8 u8LinkStateLink;
- guint32 u32MediaType;
- guint32 u32LineDelayValue;
+ uint16_t u16MAUType;
+ uint32_t u32DomainBoundary;
+ uint32_t u32MulticastBoundary;
+ uint8_t u8LinkStatePort;
+ uint8_t u8LinkStateLink;
+ uint32_t u32MediaType;
+ uint32_t u32LineDelayValue;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -6359,13 +6567,14 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
/* dissect the PDPortDataRealExtended blocks */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDPortDataRealExtended_block(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
- proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
+ proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength)
{
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
int endoffset = offset + u16BodyLength;
@@ -6395,13 +6604,14 @@ dissect_PDPortDataRealExtended_block(tvbuff_t *tvb, int offset, packet_info *pin
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength)
{
e_guid_t uuid;
- guint16 u16Role;
- guint8 u8LengthDomainName;
- guint8 u8NumberOfMrpInstances;
+ uint16_t u16Role;
+ uint8_t u8LengthDomainName;
+ uint8_t u8NumberOfMrpInstances;
int endoffset = offset + u16BodyLength;
@@ -6479,14 +6689,15 @@ dissect_PDInterfaceMrpDataAdjust_block(tvbuff_t *tvb, int offset,
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength)
{
e_guid_t uuid;
- guint16 u16Role;
- guint16 u16Version;
- guint8 u8LengthDomainName;
- guint8 u8NumberOfMrpInstances;
+ uint16_t u16Role;
+ uint16_t u16Version;
+ uint8_t u8LengthDomainName;
+ uint8_t u8NumberOfMrpInstances;
int endoffset = offset + u16BodyLength;
/* added blockversion 1 */
@@ -6556,12 +6767,13 @@ dissect_PDInterfaceMrpDataReal_block(tvbuff_t *tvb, int offset,
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDInterfaceMrpDataCheck_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
e_guid_t uuid;
- guint32 u32Check;
- guint8 u8NumberOfMrpInstances;
+ uint32_t u32Check;
+ uint8_t u8NumberOfMrpInstances;
/* BlockVersionLow == 1 added */
if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) {
@@ -6614,10 +6826,10 @@ dissect_PDInterfaceMrpDataCheck_block(tvbuff_t *tvb, int offset,
static int
dissect_PDPortMrpData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
e_guid_t uuid;
- guint8 u8MrpInstance;
+ uint8_t u8MrpInstance;
/* added BlockVersionLow == 1 */
if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) {
@@ -6645,14 +6857,14 @@ dissect_PDPortMrpData_block(tvbuff_t *tvb, int offset,
static int
dissect_MrpManagerParams_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16Prio;
- guint16 u16TOPchgT;
- guint16 u16TOPNRmax;
- guint16 u16TSTshortT;
- guint16 u16TSTdefaultT;
- guint16 u16TSTNRmax;
+ uint16_t u16Prio;
+ uint16_t u16TOPchgT;
+ uint16_t u16TOPNRmax;
+ uint16_t u16TSTshortT;
+ uint16_t u16TSTdefaultT;
+ uint16_t u16TSTNRmax;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -6688,11 +6900,11 @@ dissect_MrpManagerParams_block(tvbuff_t *tvb, int offset,
static int
dissect_MrpRTMode(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32RTMode;
+ uint32_t u32RTMode;
/* MRP_RTMode */
@@ -6714,10 +6926,10 @@ dissect_MrpRTMode(tvbuff_t *tvb, int offset,
static int
dissect_MrpRTModeManagerData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16TSTNRmax;
- guint16 u16TSTdefaultT;
+ uint16_t u16TSTNRmax;
+ uint16_t u16TSTdefaultT;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -6744,9 +6956,9 @@ dissect_MrpRTModeManagerData_block(tvbuff_t *tvb, int offset,
static int
dissect_MrpRingStateData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16RingState;
+ uint16_t u16RingState;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -6765,9 +6977,9 @@ dissect_MrpRingStateData_block(tvbuff_t *tvb, int offset,
static int
dissect_MrpRTStateData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16RTState;
+ uint16_t u16RTState;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -6786,11 +6998,11 @@ dissect_MrpRTStateData_block(tvbuff_t *tvb, int offset,
static int
dissect_MrpClientParams_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16MRP_LNKdownT;
- guint16 u16MRP_LNKupT;
- guint16 u16MRP_LNKNRmax;
+ uint16_t u16MRP_LNKdownT;
+ uint16_t u16MRP_LNKupT;
+ uint16_t u16MRP_LNKNRmax;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -6815,7 +7027,7 @@ dissect_MrpClientParams_block(tvbuff_t *tvb, int offset,
static int
dissect_MrpRTModeClientData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
offset = dissect_pn_align4(tvb, offset, pinfo, tree);
@@ -6834,11 +7046,11 @@ dissect_MrpRTModeClientData_block(tvbuff_t *tvb, int offset,
static int
dissect_CheckSyncDifference_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16CheckSyncMode;
+ uint16_t u16CheckSyncMode;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -6870,9 +7082,9 @@ dissect_CheckSyncDifference_block(tvbuff_t *tvb, int offset,
static int
dissect_CheckMAUTypeDifference_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16MAUTypeMode;
+ uint16_t u16MAUTypeMode;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -6893,12 +7105,12 @@ dissect_CheckMAUTypeDifference_block(tvbuff_t *tvb, int offset,
/* dissect the AdjustDomainBoundary blocks */
static int
dissect_AdjustDomainBoundary_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32DomainBoundary;
- guint32 u32DomainBoundaryIngress;
- guint32 u32DomainBoundaryEgress;
- guint16 u16AdjustProperties;
+ uint32_t u32DomainBoundary;
+ uint32_t u32DomainBoundaryIngress;
+ uint32_t u32DomainBoundaryEgress;
+ uint16_t u16AdjustProperties;
if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
@@ -6955,10 +7167,10 @@ dissect_AdjustDomainBoundary_block(tvbuff_t *tvb, int offset,
/* dissect the AdjustMulticastBoundary blocks */
static int
dissect_AdjustMulticastBoundary_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32MulticastBoundary;
- guint16 u16AdjustProperties;
+ uint32_t u32MulticastBoundary;
+ uint16_t u16AdjustProperties;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -6986,10 +7198,10 @@ dissect_AdjustMulticastBoundary_block(tvbuff_t *tvb, int offset,
/* dissect the AdjustMAUType block */
static int
dissect_AdjustMAUType_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16MAUType;
- guint16 u16AdjustProperties;
+ uint16_t u16MAUType;
+ uint16_t u16AdjustProperties;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7018,9 +7230,9 @@ dissect_AdjustMAUType_block(tvbuff_t *tvb, int offset,
/* dissect the CheckMAUType block */
static int
dissect_CheckMAUType_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16MAUType;
+ uint16_t u16MAUType;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7043,9 +7255,9 @@ dissect_CheckMAUType_block(tvbuff_t *tvb, int offset,
/* dissect the CheckLineDelay block */
static int
dissect_CheckLineDelay_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32LineDelay;
+ uint32_t u32LineDelay;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7068,12 +7280,12 @@ dissect_CheckLineDelay_block(tvbuff_t *tvb, int offset,
/* dissect the CheckPeers block */
static int
dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint8 u8NumberOfPeers;
- guint8 u8I;
- guint8 u8LengthPeerPortID;
- guint8 u8LengthPeerChassisID;
+ uint8_t u8NumberOfPeers;
+ uint8_t u8I;
+ uint8_t u8LengthPeerPortID;
+ uint8_t u8LengthPeerChassisID;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7112,10 +7324,10 @@ dissect_CheckPeers_block(tvbuff_t *tvb, int offset,
/* dissect the AdjustPortState block */
static int
dissect_AdjustPortState_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16PortState;
- guint16 u16AdjustProperties;
+ uint16_t u16PortState;
+ uint16_t u16AdjustProperties;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7144,9 +7356,9 @@ dissect_AdjustPortState_block(tvbuff_t *tvb, int offset,
/* dissect the CheckPortState block */
static int
dissect_CheckPortState_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16PortState;
+ uint16_t u16PortState;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7167,14 +7379,15 @@ dissect_CheckPortState_block(tvbuff_t *tvb, int offset,
/* dissect the PDPortFODataReal block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDPortFODataReal_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint32 u32FiberOpticType;
- guint32 u32FiberOpticCableType;
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint32_t u32FiberOpticType;
+ uint32_t u32FiberOpticCableType;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
@@ -7207,12 +7420,12 @@ dissect_PDPortFODataReal_block(tvbuff_t *tvb, int offset,
/* dissect the FiberOpticManufacturerSpecific block */
static int
dissect_FiberOpticManufacturerSpecific_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint8 u8VendorIDHigh;
- guint8 u8VendorIDLow;
- guint16 u16VendorBlockType;
+ uint8_t u8VendorIDHigh;
+ uint8_t u8VendorIDLow;
+ uint16_t u16VendorBlockType;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7241,9 +7454,9 @@ dissect_FiberOpticManufacturerSpecific_block(tvbuff_t *tvb, int offset,
/* dissect the FiberOpticDiagnosisInfo block */
static int
dissect_FiberOpticDiagnosisInfo_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32FiberOpticPowerBudget;
+ uint32_t u32FiberOpticPowerBudget;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7264,10 +7477,10 @@ dissect_FiberOpticDiagnosisInfo_block(tvbuff_t *tvb, int offset,
/* dissect the AdjustMAUTypeExtension block */
static int
dissect_AdjustMAUTypeExtension_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16MauTypeExtension;
- guint16 u16AdjustProperties;
+ uint16_t u16MauTypeExtension;
+ uint16_t u16AdjustProperties;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -7291,10 +7504,10 @@ dissect_AdjustMAUTypeExtension_block(tvbuff_t *tvb, int offset,
/* dissect the PDPortFODataAdjust block */
static int
dissect_PDPortFODataAdjust_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32FiberOpticType;
- guint32 u32FiberOpticCableType;
+ uint32_t u32FiberOpticType;
+ uint32_t u32FiberOpticCableType;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7325,9 +7538,9 @@ dissect_PDPortFODataAdjust_block(tvbuff_t *tvb, int offset,
/* dissect the PDPortFODataCheck block */
static int
dissect_PDPortFODataCheck_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32FiberOpticPowerBudget;
+ uint32_t u32FiberOpticPowerBudget;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7362,12 +7575,12 @@ dissect_PDPortFODataCheck_block(tvbuff_t *tvb, int offset,
/* dissect the AdjustPeerToPeerBoundary block */
static int
dissect_AdjustPeerToPeerBoundary_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32PeerToPeerBoundary;
- guint16 u16AdjustProperties;
+ uint32_t u32PeerToPeerBoundary;
+ uint16_t u16AdjustProperties;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -7404,12 +7617,12 @@ dissect_AdjustPeerToPeerBoundary_block(tvbuff_t *tvb, int offset,
/* dissect the AdjustDCPBoundary block */
static int
dissect_AdjustDCPBoundary_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32DcpBoundary;
- guint16 u16AdjustProperties;
+ uint32_t u32DcpBoundary;
+ uint16_t u16AdjustProperties;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -7440,13 +7653,14 @@ dissect_AdjustDCPBoundary_block(tvbuff_t *tvb, int offset,
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength)
{
- guint8 u8MrpInstance;
+ uint8_t u8MrpInstance;
e_guid_t uuid;
- guint16 u16Role;
- guint8 u8LengthDomainName;
+ uint16_t u16Role;
+ uint8_t u8LengthDomainName;
int endoffset = offset + u16BodyLength;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7485,14 +7699,15 @@ dissect_MrpInstanceDataAdjust_block(tvbuff_t *tvb, int offset,
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_MrpInstanceDataReal_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength)
{
- guint8 u8MrpInstance;
+ uint8_t u8MrpInstance;
e_guid_t uuid;
- guint16 u16Role;
- guint16 u16Version;
- guint8 u8LengthDomainName;
+ uint16_t u16Role;
+ uint16_t u16Version;
+ uint8_t u8LengthDomainName;
int endoffset = offset + u16BodyLength;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7533,10 +7748,10 @@ dissect_MrpInstanceDataReal_block(tvbuff_t *tvb, int offset,
static int
dissect_MrpInstanceDataCheck_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength _U_)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength _U_)
{
- guint8 u8MrpInstance;
- guint32 u32Check;
+ uint8_t u8MrpInstance;
+ uint32_t u32Check;
e_guid_t uuid;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -7572,9 +7787,9 @@ dissect_MrpInstanceDataCheck_block(tvbuff_t *tvb, int offset,
/* PDInterfaceAdjust */
static int
dissect_PDInterfaceAdjust_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32SMultipleInterfaceMode;
+ uint32_t u32SMultipleInterfaceMode;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -7595,18 +7810,19 @@ dissect_PDInterfaceAdjust_block(tvbuff_t *tvb, int offset,
/* TSNNetworkControlDataReal */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_TSNNetworkControlDataReal_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item* sub_item;
proto_tree* sub_tree;
e_guid_t nme_parameter_uuid;
- guint32 u32NetworkDeadline;
- guint16 u16SendClockFactor;
- guint16 u16NumberofEntries;
- guint16 u16TSNNMENameLength;
- guint16 u16TSNDomainNameLength;
+ uint32_t u32NetworkDeadline;
+ uint16_t u16SendClockFactor;
+ uint16_t u16NumberofEntries;
+ uint16_t u16TSNNMENameLength;
+ uint16_t u16TSNDomainNameLength;
e_guid_t tsn_nme_name_uuid;
e_guid_t tsn_domain_uuid;
@@ -7707,17 +7923,18 @@ dissect_TSNNetworkControlDataReal_block(tvbuff_t* tvb, int offset,
/* TSNNetworkControlDataAdjust */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_TSNNetworkControlDataAdjust_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item* sub_item;
proto_tree* sub_tree;
e_guid_t nme_parameter_uuid;
- guint32 u32NetworkDeadline;
- guint16 u16SendClockFactor;
- guint16 u16NumberofEntries;
- guint16 u16TSNNMENameLength;
+ uint32_t u32NetworkDeadline;
+ uint16_t u16SendClockFactor;
+ uint16_t u16NumberofEntries;
+ uint16_t u16TSNNMENameLength;
e_guid_t tsn_nme_name_uuid;
int bit_offset;
@@ -7805,14 +8022,14 @@ dissect_TSNNetworkControlDataAdjust_block(tvbuff_t* tvb, int offset,
/* TSNStreamPathData */
static int
dissect_TSNStreamPathDataReal_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, gboolean real)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, bool real)
{
- guint8 u8FDBCommand;
- guint16 u16NumberofEntries;
- guint8 dstAdd[6];
- guint16 u16StreamClass;
- guint16 u16SlotNumber;
- guint16 u16SubSlotNumber;
+ uint8_t u8FDBCommand;
+ uint16_t u16NumberofEntries;
+ uint8_t dstAdd[6];
+ uint16_t u16StreamClass;
+ uint16_t u16SlotNumber;
+ uint16_t u16SubSlotNumber;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -7864,13 +8081,13 @@ dissect_TSNStreamPathDataReal_block(tvbuff_t* tvb, int offset,
/* TSNSyncTreeData */
static int
dissect_TSNSyncTreeData_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberofEntries;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16TimeDomainNumber;
- guint8 u8SyncPortRole;
+ uint16_t u16NumberofEntries;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16TimeDomainNumber;
+ uint8_t u8SyncPortRole;
proto_item* sub_item;
proto_tree* sub_tree;
@@ -7906,15 +8123,16 @@ dissect_TSNSyncTreeData_block(tvbuff_t* tvb, int offset,
/* TSNDomainPortConfigBlock */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_TSNDomainPortConfig_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberofEntries;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
+ uint16_t u16NumberofEntries;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
proto_item* sub_item_port_config;
proto_tree* sub_tree_port_config;
- guint8 u8TSNDomainPortConfig;
+ uint8_t u8TSNDomainPortConfig;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -7964,12 +8182,12 @@ dissect_TSNDomainPortConfig_block(tvbuff_t* tvb, int offset,
/* TSNDomainQueueConfigBlock */
static int
dissect_TSNDomainQueueConfig_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberofEntries;
+ uint16_t u16NumberofEntries;
proto_item* sub_item;
proto_tree* sub_tree;
- guint64 u64TSNDomainQueueConfig;
+ uint64_t u64TSNDomainQueueConfig;
dcerpc_info di; /* fake dcerpc_info struct */
dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
di.call_data = &dcv;
@@ -8009,14 +8227,14 @@ dissect_TSNDomainQueueConfig_block(tvbuff_t* tvb, int offset,
/* TSNTimeDataBlock */
static int
dissect_TSNTimeData_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16TimeDomainNumber;
- guint32 u32TimePLLWindow;
- guint32 u32MessageIntervalFactor;
- guint16 u16MessageTimeoutFactor;
- guint16 u16TimeSyncProperties;
- guint8 u8TimeDomainNameLength;
+ uint16_t u16TimeDomainNumber;
+ uint32_t u32TimePLLWindow;
+ uint32_t u32MessageIntervalFactor;
+ uint16_t u16MessageTimeoutFactor;
+ uint16_t u16TimeSyncProperties;
+ uint8_t u8TimeDomainNameLength;
e_guid_t time_domain_uuid;
proto_item* sub_item;
proto_tree* sub_tree;
@@ -8066,12 +8284,13 @@ dissect_TSNTimeData_block(tvbuff_t* tvb, int offset,
/* TSNUploadNetworkAttributesBlock */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_TSNUploadNetworkAttributes_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32TransferTimeTX;
- guint32 u32TransferTimeRX;
- guint32 u32MaxSupportedRecordSize;
+ uint32_t u32TransferTimeTX;
+ uint32_t u32TransferTimeRX;
+ uint32_t u32MaxSupportedRecordSize;
if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -8104,16 +8323,16 @@ dissect_TSNUploadNetworkAttributes_block(tvbuff_t* tvb, int offset,
/* TSNExpectedNeighborBlock */
static int
dissect_TSNExpectedNeighbor_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint8 u8NumberOfPeers;
- guint8 u8I;
- guint8 u8LengthPeerPortName;
- guint8 u8LengthPeerStationName;
- guint16 u16NumberOfEntries;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint32 u32LineDelayValue;
+ uint8_t u8NumberOfPeers;
+ uint8_t u8I;
+ uint8_t u8LengthPeerPortName;
+ uint8_t u8LengthPeerStationName;
+ uint16_t u16NumberOfEntries;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint32_t u32LineDelayValue;
if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -8171,8 +8390,9 @@ dissect_TSNExpectedNeighbor_block(tvbuff_t* tvb, int offset,
/* TSNExpectedNetworkAttributesBlock */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_TSNExpectedNetworkAttributes_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -8198,12 +8418,12 @@ dissect_TSNExpectedNetworkAttributes_block(tvbuff_t* tvb, int offset,
/* TSNDomainPortIngressRateLimiterBlock */
static int
dissect_TSNDomainPortIngressRateLimiter_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberofEntries;
+ uint16_t u16NumberofEntries;
proto_item* sub_item_port_ingress;
proto_tree* sub_tree_port_ingress;
- guint64 u64TSNDomainPortIngressRateLimiter;
+ uint64_t u64TSNDomainPortIngressRateLimiter;
dcerpc_info di; /* fake dcerpc_info struct */
dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
di.call_data = &dcv;
@@ -8239,12 +8459,12 @@ dissect_TSNDomainPortIngressRateLimiter_block(tvbuff_t* tvb, int offset,
/* TSNDomainQueueRateLimiterBlock */
static int
dissect_TSNDomainQueueRateLimiter_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberofEntries;
+ uint16_t u16NumberofEntries;
proto_item* sub_item;
proto_tree* sub_tree;
- guint64 u64TSNDomainQueueRateLimiter;
+ uint64_t u64TSNDomainQueueRateLimiter;
dcerpc_info di; /* fake dcerpc_info struct */
dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
di.call_data = &dcv;
@@ -8284,16 +8504,16 @@ dissect_TSNDomainQueueRateLimiter_block(tvbuff_t* tvb, int offset,
/* TSNPortIDBlock */
static int
dissect_TSNPortID_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint8 u8NumberOfQueues;
- guint8 u8ForwardingGroup;
- guint8 u8TSNPortCapabilities;
- guint16 u16NumberOfEntries;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16MAUType;
- guint16 u16MAUTypeExtension;
+ uint8_t u8NumberOfQueues;
+ uint8_t u8ForwardingGroup;
+ uint8_t u8TSNPortCapabilities;
+ uint16_t u16NumberOfEntries;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16MAUType;
+ uint16_t u16MAUTypeExtension;
if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -8357,14 +8577,14 @@ dissect_TSNPortID_block(tvbuff_t* tvb, int offset,
/* TSNForwardingDelayBlock */
static int
dissect_TSNForwardingDelay_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint8 u8ForwardingGroupIngress;
- guint8 u8ForwardingGroupEgress;
- guint16 u16NumberOfEntries;
- guint16 u16StreamClass;
- guint32 u32DependentForwardingDelay;
- guint32 u32IndependentForwardingDelay;
+ uint8_t u8ForwardingGroupIngress;
+ uint8_t u8ForwardingGroupEgress;
+ uint16_t u16NumberOfEntries;
+ uint16_t u16StreamClass;
+ uint32_t u32DependentForwardingDelay;
+ uint32_t u32IndependentForwardingDelay;
if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -8404,10 +8624,10 @@ dissect_TSNForwardingDelay_block(tvbuff_t* tvb, int offset,
/* PDPortStatistic for one subslot */
static int
dissect_PDPortStatistic_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32StatValue;
- guint16 u16CounterStatus;
+ uint32_t u32StatValue;
+ uint16_t u16CounterStatus;
proto_item *sub_item;
proto_tree *sub_tree;
if (u8BlockVersionHigh != 1 || (u8BlockVersionLow != 0 && u8BlockVersionLow != 1)) {
@@ -8470,18 +8690,18 @@ dissect_PDPortStatistic_block(tvbuff_t *tvb, int offset,
/* OwnPort */
static int
dissect_OwnPort_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint8 u8LengthOwnPortID;
+ uint8_t u8LengthOwnPortID;
char *pOwnPortID;
- guint16 u16MAUType;
- guint16 u16MAUTypeExtension;
- guint32 u32MulticastBoundary;
- guint8 u8LinkStatePort;
- guint8 u8LinkStateLink;
- guint32 u32MediaType;
- guint32 u32LineDelayValue;
- guint16 u16PortStatus;
+ uint16_t u16MAUType;
+ uint16_t u16MAUTypeExtension;
+ uint32_t u32MulticastBoundary;
+ uint8_t u8LinkStatePort;
+ uint8_t u8LinkStateLink;
+ uint32_t u32MediaType;
+ uint32_t u32LineDelayValue;
+ uint16_t u16PortStatus;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -8545,20 +8765,20 @@ dissect_OwnPort_block(tvbuff_t *tvb, int offset,
/* Neighbors */
static int
dissect_Neighbors_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint8 u8NumberOfPeers;
- guint8 u8I;
- guint8 mac[6];
+ uint8_t u8NumberOfPeers;
+ uint8_t u8I;
+ uint8_t mac[6];
char *pPeerStationName;
char *pPeerPortName;
- guint8 u8LengthPeerPortName;
- guint8 u8LengthPeerStationName;
- guint16 u16MAUType;
- guint16 u16MAUTypeExtension;
- guint32 u32LineDelayValue;
+ uint8_t u8LengthPeerPortName;
+ uint8_t u8LengthPeerStationName;
+ uint16_t u16MAUType;
+ uint16_t u16MAUTypeExtension;
+ uint32_t u32LineDelayValue;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -8622,11 +8842,11 @@ dissect_Neighbors_block(tvbuff_t *tvb, int offset,
/* dissect the PDInterfaceDataReal block */
static int
dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint8 u8LengthOwnChassisID;
- guint8 mac[6];
- guint32 ip;
+ uint8_t u8LengthOwnChassisID;
+ uint8_t mac[6];
+ uint32_t ip;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -8653,15 +8873,15 @@ dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset,
/* IPAddress */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_ip_address, &ip);
- /*proto_item_append_text(block_item, ", IP: %s", ip_to_str((guint8*)&ip));*/
+ /*proto_item_append_text(block_item, ", IP: %s", ip_to_str((uint8_t*)&ip));*/
/* Subnetmask */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_subnetmask, &ip);
- /*proto_item_append_text(block_item, ", Subnet: %s", ip_to_str((guint8*)&ip));*/
+ /*proto_item_append_text(block_item, ", Subnet: %s", ip_to_str((uint8_t*)&ip));*/
/* StandardGateway */
offset = dissect_pn_ipv4(tvb, offset, pinfo, tree, hf_pn_io_standard_gateway, &ip);
- /*proto_item_append_text(block_item, ", Router: %s", ip_to_str((guint8*)&ip));*/
+ /*proto_item_append_text(block_item, ", Router: %s", ip_to_str((uint8_t*)&ip));*/
return offset;
@@ -8671,24 +8891,24 @@ dissect_PDInterfaceDataReal_block(tvbuff_t *tvb, int offset,
/* dissect the PDSyncData block */
static int
dissect_PDSyncData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
e_guid_t uuid;
- guint32 u32ReservedIntervalBegin;
- guint32 u32ReservedIntervalEnd;
- guint32 u32PLLWindow;
- guint32 u32SyncSendFactor;
- guint16 u16SendClockFactor;
- guint16 u16SyncProperties;
- guint16 u16SyncFrameAddress;
- guint16 u16PTCPTimeoutFactor;
- guint16 u16PTCPTakeoverTimeoutFactor;
- guint16 u16PTCPMasterStartupTime;
- guint8 u8MasterPriority1;
- guint8 u8MasterPriority2;
- guint8 u8LengthSubdomainName;
+ uint32_t u32ReservedIntervalBegin;
+ uint32_t u32ReservedIntervalEnd;
+ uint32_t u32PLLWindow;
+ uint32_t u32SyncSendFactor;
+ uint16_t u16SendClockFactor;
+ uint16_t u16SyncProperties;
+ uint16_t u16SyncFrameAddress;
+ uint16_t u16PTCPTimeoutFactor;
+ uint16_t u16PTCPTakeoverTimeoutFactor;
+ uint16_t u16PTCPMasterStartupTime;
+ uint8_t u8MasterPriority1;
+ uint8_t u8MasterPriority2;
+ uint8_t u8LengthSubdomainName;
if (u8BlockVersionHigh != 1) {
@@ -8805,13 +9025,14 @@ dissect_PDSyncData_block(tvbuff_t *tvb, int offset,
/* dissect the PDIRData block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDIRData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
/* versions decoded are High: 1 and LOW 0..2 */
@@ -8856,16 +9077,16 @@ dissect_PDIRData_block(tvbuff_t *tvb, int offset,
/* dissect the PDIRGlobalData block */
static int
dissect_PDIRGlobalData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
e_guid_t uuid;
- guint32 u32MaxBridgeDelay;
- guint32 u32NumberOfPorts;
- guint32 u32MaxPortTxDelay;
- guint32 u32MaxPortRxDelay;
- guint32 u32MaxLineRxDelay;
- guint32 u32YellowTime;
- guint32 u32Tmp;
+ uint32_t u32MaxBridgeDelay;
+ uint32_t u32NumberOfPorts;
+ uint32_t u32MaxPortTxDelay;
+ uint32_t u32MaxPortRxDelay;
+ uint32_t u32MaxLineRxDelay;
+ uint32_t u32YellowTime;
+ uint32_t u32Tmp;
/* added blockversion 2 */
if (u8BlockVersionHigh != 1 || (u8BlockVersionLow > 2)) {
@@ -8916,23 +9137,23 @@ dissect_PDIRGlobalData_block(tvbuff_t *tvb, int offset,
/* dissect the PDIRFrameData block */
static int
dissect_PDIRFrameData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint32 u32FrameSendOffset;
- guint32 u32FrameDataProperties;
- guint16 u16DataLength;
- guint16 u16ReductionRatio;
- guint16 u16Phase;
- guint16 u16FrameID;
- guint16 u16Ethertype;
- guint8 u8RXPort;
- guint8 u8FrameDetails;
- guint8 u8NumberOfTxPortGroups;
- guint8 u8TxPortGroupArray;
- guint16 u16TxPortGroupArraySize;
- guint16 u16EndOffset;
- guint16 n = 0;
+ uint32_t u32FrameSendOffset;
+ uint32_t u32FrameDataProperties;
+ uint16_t u16DataLength;
+ uint16_t u16ReductionRatio;
+ uint16_t u16Phase;
+ uint16_t u16FrameID;
+ uint16_t u16Ethertype;
+ uint8_t u8RXPort;
+ uint8_t u8FrameDetails;
+ uint8_t u8NumberOfTxPortGroups;
+ uint8_t u8TxPortGroupArray;
+ uint16_t u16TxPortGroupArraySize;
+ uint16_t u16EndOffset;
+ uint16_t n = 0;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -9006,7 +9227,7 @@ dissect_PDIRFrameData_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint8(tvb, offset, pinfo, sub_tree, drep,
hf_pn_io_frame_details_reserved, &u8FrameDetails);
/* TxPortGroup */
- u8NumberOfTxPortGroups = tvb_get_guint8(tvb, offset);
+ u8NumberOfTxPortGroups = tvb_get_uint8(tvb, offset);
sub_item = proto_tree_add_uint(ir_frame_data_tree, hf_pn_io_nr_of_tx_port_groups,
tvb, offset, 1, u8NumberOfTxPortGroups);
offset++;
@@ -9050,29 +9271,29 @@ dissect_PDIRFrameData_block(tvbuff_t *tvb, int offset,
static int
dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint16 u16StartOfRedFrameID;
- guint16 u16EndOfRedFrameID;
- guint32 u32NumberOfPorts;
- guint32 u32NumberOfAssignments;
- guint32 u32NumberOfPhases;
- guint32 u32RedOrangePeriodBegin;
- guint32 u32OrangePeriodBegin;
- guint32 u32GreenPeriodBegin;
- guint16 u16TXPhaseAssignment;
- guint16 u16RXPhaseAssignment;
- guint32 u32SubStart;
- guint32 u32Tmp;
- guint32 u32Tmp2;
- guint32 u32TxRedOrangePeriodBegin[0x11] = {0};
- guint32 u32TxOrangePeriodBegin [0x11] = {0};
- guint32 u32TxGreenPeriodBegin [0x11] = {0};
- guint32 u32RxRedOrangePeriodBegin[0x11] = {0};
- guint32 u32RxOrangePeriodBegin [0x11] = {0};
- guint32 u32RxGreenPeriodBegin [0x11] = {0};
- guint32 u32PortIndex;
+ uint16_t u16StartOfRedFrameID;
+ uint16_t u16EndOfRedFrameID;
+ uint32_t u32NumberOfPorts;
+ uint32_t u32NumberOfAssignments;
+ uint32_t u32NumberOfPhases;
+ uint32_t u32RedOrangePeriodBegin;
+ uint32_t u32OrangePeriodBegin;
+ uint32_t u32GreenPeriodBegin;
+ uint16_t u16TXPhaseAssignment;
+ uint16_t u16RXPhaseAssignment;
+ uint32_t u32SubStart;
+ uint32_t u32Tmp;
+ uint32_t u32Tmp2;
+ uint32_t u32TxRedOrangePeriodBegin[0x11] = {0};
+ uint32_t u32TxOrangePeriodBegin [0x11] = {0};
+ uint32_t u32TxGreenPeriodBegin [0x11] = {0};
+ uint32_t u32RxRedOrangePeriodBegin[0x11] = {0};
+ uint32_t u32RxOrangePeriodBegin [0x11] = {0};
+ uint32_t u32RxGreenPeriodBegin [0x11] = {0};
+ uint32_t u32PortIndex;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -9209,15 +9430,16 @@ dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset,
/* dissect the DiagnosisData block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_DiagnosisData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 body_length)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t body_length)
{
- guint32 u32Api;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16ChannelNumber;
- guint16 u16UserStructureIdentifier;
+ uint32_t u32Api;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16ChannelNumber;
+ uint16_t u16UserStructureIdentifier;
proto_item *sub_item;
@@ -9257,6 +9479,7 @@ dissect_DiagnosisData_block(tvbuff_t *tvb, int offset,
proto_item_append_text(sub_item, " reserved");
}
offset = offset +2; /* Advance behind ChannelNumber */
+ increment_dissection_depth(pinfo);
/* ChannelProperties */
offset = dissect_ChannelProperties(tvb, offset, pinfo, tree, item, drep);
body_length-=8;
@@ -9281,19 +9504,20 @@ dissect_DiagnosisData_block(tvbuff_t *tvb, int offset,
offset = dissect_AlarmUserStructure(tvb, offset, pinfo, tree, item, drep,
&body_length, u16UserStructureIdentifier);
}
+ decrement_dissection_depth(pinfo);
return offset;
}
static int
dissect_ARProperties(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32ARProperties;
- guint8 startupMode;
- guint8 isTimeAware;
+ uint32_t u32ARProperties;
+ uint8_t startupMode;
+ uint8_t isTimeAware;
sub_item = proto_tree_add_item(tree, hf_pn_io_ar_properties, tvb, offset, 4, ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_ar_properties);
@@ -9301,7 +9525,7 @@ dissect_ARProperties(tvbuff_t *tvb, int offset,
hf_pn_io_ar_properties_pull_module_alarm_allowed, &u32ARProperties);
dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
hf_pn_io_arproperties_StartupMode, &u32ARProperties);
- startupMode = (guint8)((u32ARProperties >> 30) & 0x01);
+ startupMode = (uint8_t)((u32ARProperties >> 30) & 0x01);
/* Advanced startup mode */
if (startupMode)
{
@@ -9317,7 +9541,7 @@ dissect_ARProperties(tvbuff_t *tvb, int offset,
dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep,
hf_pn_io_ar_properties_time_aware_system, &u32ARProperties);
- isTimeAware = (guint8)((u32ARProperties >> 28) & 0x01);
+ isTimeAware = (uint8_t)((u32ARProperties >> 28) & 0x01);
wmem_map_insert(pnio_time_aware_frame_map, GUINT_TO_POINTER(pinfo->num), GUINT_TO_POINTER(isTimeAware));
@@ -9348,11 +9572,11 @@ dissect_ARProperties(tvbuff_t *tvb, int offset,
/* dissect the IOCRProperties */
static int
dissect_IOCRProperties(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32IOCRProperties;
+ uint32_t u32IOCRProperties;
sub_item = proto_tree_add_item(tree, hf_pn_io_iocr_properties, tvb, offset, 4, ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_iocr_properties);
@@ -9379,36 +9603,37 @@ dissect_IOCRProperties(tvbuff_t *tvb, int offset,
/* dissect the ARData block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_ARData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BlockLength)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BlockLength)
{
- guint16 u16NumberOfARs;
- guint16 u16NumberofEntries;
+ uint16_t u16NumberOfARs;
+ uint16_t u16NumberofEntries;
e_guid_t aruuid;
e_guid_t uuid;
- guint16 u16ARType;
- guint16 u16NameLength;
- guint16 u16NumberOfIOCRs;
- guint16 u16IOCRType;
- guint16 u16FrameID;
- guint16 u16CycleCounter;
- guint8 u8DataStatus;
- guint8 u8TransferStatus;
+ uint16_t u16ARType;
+ uint16_t u16NameLength;
+ uint16_t u16NumberOfIOCRs;
+ uint16_t u16IOCRType;
+ uint16_t u16FrameID;
+ uint16_t u16CycleCounter;
+ uint8_t u8DataStatus;
+ uint8_t u8TransferStatus;
proto_item *ds_item;
proto_tree *ds_tree;
- guint16 u16UDPRTPort;
- guint16 u16AlarmCRType;
- guint16 u16LocalAlarmReference;
- guint16 u16RemoteAlarmReference;
- guint16 u16NumberOfAPIs;
- guint32 u32Api;
+ uint16_t u16UDPRTPort;
+ uint16_t u16AlarmCRType;
+ uint16_t u16LocalAlarmReference;
+ uint16_t u16RemoteAlarmReference;
+ uint16_t u16NumberOfAPIs;
+ uint32_t u32Api;
proto_item *iocr_item;
proto_tree *iocr_tree;
proto_item *ar_item;
proto_tree *ar_tree;
- guint32 u32IOCRStart;
- gint32 i32EndOffset;
- guint32 u32ARDataStart;
+ uint32_t u32IOCRStart;
+ int32_t i32EndOffset;
+ uint32_t u32ARDataStart;
/* added BlockversionLow == 1 */
if (u8BlockVersionHigh != 1 || u8BlockVersionLow > 1) {
@@ -9419,6 +9644,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
i32EndOffset = offset + u16BlockLength;
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
hf_pn_io_number_of_ars, &u16NumberOfARs);
+ increment_dissection_depth(pinfo);
/* BlockversionLow: 0 */
if (u8BlockVersionLow == 0) {
while (u16NumberOfARs--) {
@@ -9463,8 +9689,8 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep,
hf_pn_io_cycle_counter, &u16CycleCounter);
- u8DataStatus = tvb_get_guint8(tvb, offset);
- u8TransferStatus = tvb_get_guint8(tvb, offset+1);
+ u8DataStatus = tvb_get_uint8(tvb, offset);
+ u8TransferStatus = tvb_get_uint8(tvb, offset+1);
/* add data status subtree */
ds_item = proto_tree_add_uint_format(iocr_tree, hf_pn_io_data_status,
@@ -9611,8 +9837,8 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, iocr_tree, drep,
hf_pn_io_cycle_counter, &u16CycleCounter);
- u8DataStatus = tvb_get_guint8(tvb, offset);
- u8TransferStatus = tvb_get_guint8(tvb, offset+1);
+ u8DataStatus = tvb_get_uint8(tvb, offset);
+ u8TransferStatus = tvb_get_uint8(tvb, offset+1);
/* add data status subtree */
ds_item = proto_tree_add_uint_format(iocr_tree, hf_pn_io_data_status,
@@ -9667,6 +9893,7 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
proto_item_set_len(ar_item, offset - u32ARDataStart);
}
}
+ decrement_dissection_depth(pinfo);
return offset;
}
@@ -9674,10 +9901,10 @@ dissect_ARData_block(tvbuff_t *tvb, int offset,
/* dissect the APIData block */
static int
dissect_APIData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberOfAPIs;
- guint32 u32Api;
+ uint16_t u16NumberOfAPIs;
+ uint32_t u32Api;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -9702,9 +9929,9 @@ dissect_APIData_block(tvbuff_t *tvb, int offset,
/* dissect the SLRData block */
static int
dissect_SRLData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 RedundancyInfo;
+ uint16_t RedundancyInfo;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -9722,13 +9949,13 @@ dissect_SRLData_block(tvbuff_t *tvb, int offset,
/* dissect the LogData block */
static int
dissect_LogData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint64 u64ActualLocaltimeStamp;
- guint16 u16NumberOfLogEntries;
- guint64 u64LocaltimeStamp;
+ uint64_t u64ActualLocaltimeStamp;
+ uint16_t u16NumberOfLogEntries;
+ uint64_t u64LocaltimeStamp;
e_guid_t aruuid;
- guint32 u32EntryDetail;
+ uint32_t u32EntryDetail;
dcerpc_info di; /* fake dcerpc_info struct */
dcerpc_call_value call_data;
@@ -9777,12 +10004,12 @@ dissect_LogData_block(tvbuff_t *tvb, int offset,
/* dissect the FS Hello block */
static int
dissect_FSHello_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32FSHelloMode;
- guint32 u32FSHelloInterval;
- guint32 u32FSHelloRetry;
- guint32 u32FSHelloDelay;
+ uint32_t u32FSHelloMode;
+ uint32_t u32FSHelloInterval;
+ uint32_t u32FSHelloRetry;
+ uint32_t u32FSHelloDelay;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -9817,9 +10044,9 @@ dissect_FSHello_block(tvbuff_t *tvb, int offset,
/* dissect the FS Parameter block */
static int
dissect_FSParameter_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint32 u32FSParameterMode;
+ uint32_t u32FSParameterMode;
e_guid_t FSParameterUUID;
@@ -9849,9 +10076,10 @@ dissect_FSParameter_block(tvbuff_t *tvb, int offset,
/* dissect the FSUDataAdjust block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDInterfaceFSUDataAdjust_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
tvbuff_t *new_tvb;
@@ -9878,9 +10106,10 @@ dissect_PDInterfaceFSUDataAdjust_block(tvbuff_t *tvb, int offset,
/* dissect the ARFSUDataAdjust block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_ARFSUDataAdjust_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
tvbuff_t *new_tvb;
@@ -9904,28 +10133,573 @@ dissect_ARFSUDataAdjust_block(tvbuff_t *tvb, int offset,
return offset;
}
+/* dissect the PROFIenergy Service Request block */
+static int
+dissect_PE_ServiceRequest_block(tvbuff_t* tvb, int offset,
+ packet_info* pinfo, proto_tree* tree, proto_item* item, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength)
+{
+ uint8_t service_request_id;
+ uint8_t request_ref;
+ uint8_t modifier;
+ uint8_t structure_id;
+ uint16_t service_modifier;
+ bool col_add = false;
+
+ if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
+ expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
+ "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
+ return offset;
+ }
+
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_request_id, &service_request_id);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_request_reference, &request_ref);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_modifier, &modifier);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_structure_id, &structure_id);
+ u16BodyLength -= 4;
+
+ /* for proper decoding the PE service request use a combination of service ID and service modifier */
+ service_modifier = (service_request_id << 8) | modifier;
+
+ proto_item_append_text(item, ": %s", val_to_str_const(service_modifier, pn_io_pe_services_modifier, "Unknown"));
+
+ if (u16BodyLength > 0) {
+ proto_item *pedata_item;
+ proto_tree *pedata_tree;
+ uint32_t u32PauseTime;
+ uint8_t u8ModeID;
+ uint8_t u8Count;
+ uint16_t u16MeasurementID;
+ uint16_t u16ObjectNumber;
+ uint32_t value32;
+ uint64_t value64;
+
+ pedata_item = proto_tree_add_item(tree, hf_pn_io_pe_service_datarequest, tvb, offset, u16BodyLength, ENC_NA);
+ pedata_tree = proto_item_add_subtree(pedata_item, ett_pn_io_pe_service_datarequest);
+
+ switch (service_modifier) {
+ case 0x0100: /* Start_Pause */
+ case 0x0101:
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_pause_time, &u32PauseTime);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceRequest, Ref:0x%02x, Start Pause %u msec",
+ request_ref, u32PauseTime);
+ col_add = true;
+ break;
+ case 0x0302: /* Get_Mode */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_id, &u8ModeID);
+ offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceRequest, Ref:0x%02x, Get_Mode:0x%02x",
+ request_ref, u8ModeID);
+ col_add = true;
+ break;
+ case 0x1002: /* Get_Measurement_Values */
+ case 0x1004: /* Get_Measurement_Values_with_Object_Number */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_data_count, &u8Count);
+ /* align padding */
+ offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1);
+ while (u8Count--) {
+ if (service_modifier == 0x1004) {
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_measurement_object_number, &u16ObjectNumber);
+ }
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_measurement_id, &u16MeasurementID);
+ }
+ break;
+ case 0x1100: /* Reset_Energy_Meter all */
+ case 0x1101: /* Reset_Energy_Meter all meters with this ID */
+ case 0x1102: /* Reset_Energy_Meter all meters with this Object Number */
+ case 0x1103: /* Reset_Energy_Meter meter with this ID and this Object Number */
+ /* rewrite item text with detailed information */
+ proto_item_set_text(pedata_item, "%s", val_to_str_const(service_modifier, pn_io_pe_services_modifier_with_details, "Unknown"));
+
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_measurement_object_number, &u16ObjectNumber);
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_measurement_id, &u16MeasurementID);
+ break;
+ case 0x1200: /* Set_Meter */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_data_count, &u8Count);
+ /* align padding */
+ offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1);
+ while (u8Count--) {
+ proto_item *measurement_item;
+ proto_tree *measurement_tree;
+ int byte_length = 4;
+
+ /* depending on measurement ID we may encounter differing byte lengths for value */
+ u16MeasurementID = tvb_get_uint16(tvb, offset+2, ENC_BIG_ENDIAN);
+ if ((u16MeasurementID >= 210) && (u16MeasurementID <= 219)) {
+ byte_length = 8;
+ }
+
+ measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, 4+byte_length, ENC_NA);
+ measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id);
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_object_number, &u16ObjectNumber);
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_id, &u16MeasurementID);
+ if (byte_length == 8) {
+ dcerpc_info di; /* fake dcerpc_info struct */
+ dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
+ di.call_data = &dcv;
+ offset = dissect_dcerpc_uint64(tvb, offset, pinfo, measurement_tree, &di, drep,
+ hf_pn_io_pe_measurement_value_float64, &value64);
+ } else if ((u16MeasurementID >= 220) && (u16MeasurementID <= 229)) {
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_value_uint32, &value32);
+ } else {
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_value_float32, &value32);
+ }
+ }
+ break;
+ case 0x2101: /* Go_Sleep_Mode_WOL_with_pause_time */
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_pause_time, &u32PauseTime);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceRequest, Ref:0x%02x, Go_Sleep_Mode_WOL %u msec",
+ request_ref, u32PauseTime);
+ col_add = true;
+ break;
+ default:
+ offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16BodyLength, "RequestData");
+ break;
+ }
+ }
+
+ if (!col_add) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceRequest, Ref:0x%02x, %s",
+ request_ref, val_to_str_const(service_modifier, pn_io_pe_services_modifier, "Unknown"));
+ }
+
+ return offset;
+}
+
+/* dissect the PE_ServiceResponse block */
+static int
+dissect_PE_ServiceResponse_block(tvbuff_t* tvb, int offset,
+ packet_info* pinfo, proto_tree* tree, proto_item* item, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength)
+{
+ uint8_t service_response_id;
+ uint8_t request_ref;
+ uint8_t status;
+ uint8_t structure_id;
+ uint16_t service_modifier;
+ bool col_add = false;
+
+ if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
+ expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
+ "Block version %u.%u not implemented yet!", u8BlockVersionHigh, u8BlockVersionLow);
+ return offset;
+ }
+
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_request_id, &service_response_id);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_request_reference, &request_ref);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_status, &status);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_structure_id, &structure_id);
+ u16BodyLength -= 4;
+
+ /* Init service_modifier even when not used, to avoid gcc may by used initialized error/warning */
+ service_modifier = (service_response_id << 8);
+
+ if (structure_id == 0xFF) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, tree, drep, hf_pn_io_pe_service_errorcode, &status);
+ /* align padding */
+ offset = dissect_pn_padding(tvb, offset, pinfo, tree, 1);
+
+ proto_item_append_text(item, ": %s", rval_to_str_const(service_response_id, pn_io_pe_services, "Unknown"));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref:0x%02x, %s (ERROR)",
+ request_ref, rval_to_str_const(service_response_id, pn_io_pe_services, "Unknown"));
+ col_add = true;
+ } else {
+ /*
+ * In the response we do not have modifier as in the request.
+ * To properly decode the service name we have to use response structure ID based on service ID.
+ * There is no easy 1 to 1 mapping.
+ */
+ if (service_response_id == 0x01) {
+ service_modifier = (service_response_id << 8) | (structure_id-1);
+ } else if (service_response_id == 0x03) {
+ service_modifier = (service_response_id << 8) | (structure_id);
+ } else if (service_response_id == 0x04) {
+ service_modifier = (service_response_id << 8) | (structure_id-1);
+ } else if (service_response_id == 0x10) {
+ if (structure_id == 0x02) {
+ service_modifier = (service_response_id << 8) | 0x01;
+ } else if (structure_id == 0x04) {
+ service_modifier = (service_response_id << 8) | 0x03;
+ } else if (structure_id == 0x01) {
+ service_modifier = (service_response_id << 8) | 0x02;
+ } else if (structure_id == 0x03) {
+ service_modifier = (service_response_id << 8) | 0x04;
+ } else {
+ service_modifier = (service_response_id << 8);
+ }
+ } else if (service_response_id == 0x11) {
+ /* no match to reset_meter_* possible, use generic text */
+ service_modifier = (service_response_id << 8) | 0xFE;
+ } else {
+ service_modifier = (service_response_id << 8);
+ }
+ proto_item_append_text(item, ": %s", val_to_str_const(service_modifier, pn_io_pe_services_modifier, "Unknown"));
+ }
+
+ if ((u16BodyLength > 0) && (structure_id != 0xFF)) {
+ proto_item *pedata_item;
+ proto_tree *pedata_tree;
+ uint8_t u8Count;
+ uint8_t u8ServiceID;
+ uint8_t u8ModeID;
+ uint8_t u8ModeSource;
+ uint8_t u8ModeDestination;
+ uint8_t u8ModeAttributes;
+ uint32_t u32CTTD;
+ uint32_t u32CTTO;
+ uint32_t u32MaxCRT;
+ uint32_t u32RTTO;
+ uint32_t u32TMinP;
+ uint32_t u32TMinLS;
+ uint32_t u32TMaxLS;
+ uint32_t u32TTP;
+ uint32_t u32ModePower;
+ uint32_t u32EnergyConsumption;
+ uint8_t u8VersionMajor;
+ uint8_t u8VersionMinor;
+ uint8_t u8EntityClass;
+ uint8_t u8EntitySubClass;
+ uint8_t u8EntityDynTEValues;
+ uint8_t u8EntityPEASE;
+ uint8_t u8WOLMethod;
+ uint16_t u16WOLDataLength;
+ uint16_t u16MeasurementID;
+ uint16_t u16ObjectNumber;
+ uint8_t u8Accuracy;
+ uint16_t u16StructureLength;
+ uint8_t u8StructureID;
+ uint8_t value8;
+ uint16_t value16;
+ uint32_t value32;
+ uint64_t value64;
+
+ pedata_item = proto_tree_add_item(tree, hf_pn_io_pe_service_dataresponse, tvb, offset, u16BodyLength, ENC_NA);
+ pedata_tree = proto_item_add_subtree(pedata_item, ett_pn_io_pe_service_dataresponse);
+
+ switch (service_response_id) {
+ case 0x01: /* Start_Pause */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_id, &u8ModeID);
+ /* align padding */
+ offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1);
+ if (structure_id == 0x02) {
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_current_time_to_destination, &u32CTTD);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_regular_time_to_operate, &u32RTTO);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_time_min_length_of_stay, &u32TMinLS);
+ }
+ break;
+ case 0x02: /* End_Pause */
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_current_time_to_operate, &u32CTTO);
+ break;
+ case 0x03: /* Query_Modes */
+ if (structure_id == 0x01) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_data_count, &u8Count);
+ while (u8Count--) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_id, &u8ModeID);
+ }
+ } else if (structure_id == 0x02) {
+ proto_item *attributes_item;
+ proto_tree *attributes_tree;
+
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep, hf_pn_io_pe_mode_id, &u8ModeID);
+ attributes_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_mode_attributes_value, tvb, offset, 1, ENC_NA);
+ attributes_tree = proto_item_add_subtree(attributes_item, ett_pn_io_pe_mode_attributes);
+ /* Attributes.Bit0 */
+ dissect_dcerpc_uint8(tvb, offset, pinfo, attributes_tree, drep,
+ hf_pn_io_pe_mode_attributes_value_bit0, &u8ModeAttributes);
+ /* Attributes.OtherBits */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, attributes_tree, drep,
+ hf_pn_io_pe_mode_attributes_value_otherbits, &u8ModeAttributes);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_time_min_pause, &u32TMinP);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_time_to_pause, &u32TTP);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_regular_time_to_operate, &u32RTTO);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_time_min_length_of_stay, &u32TMinLS);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_time_max_length_of_stay, &u32TMaxLS);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_power_consumption, &u32ModePower);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_energy_to_pause, &u32EnergyConsumption);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_energy_to_operate, &u32EnergyConsumption);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref:0x%02x, Get_Mode:0x%02x",
+ request_ref, u8ModeID);
+ col_add = true;
+ } else {
+ /* ... */
+ offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16BodyLength, "PE ResponseData not decoded [invalid StructID]");
+ }
+ break;
+ case 0x04: /* PEM_Status */
+ if (structure_id == 0x01) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_id_source, &u8ModeSource);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_id_destination, &u8ModeDestination);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_current_time_to_operate, &u32CTTO);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_current_time_to_destination, &u32CTTD);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_power_consumption, &u32ModePower);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_energy_to_destination, &u32EnergyConsumption);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_energy_to_operate, &u32EnergyConsumption);
+ } else if (structure_id == 0x02) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_id_source, &u8ModeSource);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_id_destination, &u8ModeDestination);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_regular_time_to_operate, &u32RTTO);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_current_time_to_operate, &u32CTTO);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_current_time_to_destination, &u32CTTD);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_power_consumption, &u32ModePower);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_energy_to_destination, &u32EnergyConsumption);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_energy_to_operate, &u32EnergyConsumption);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref:0x%02x, PEM_Status_Ext1", request_ref);
+ col_add = true;
+ } else {
+ /* ... */
+ offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16BodyLength, "PE ResponseData not decoded [invalid StructID]");
+ }
+ break;
+ case 0x05: /* PE_Identify */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_data_count, &u8Count);
+ while (u8Count--) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_service_request_id, &u8ServiceID);
+ }
+ break;
+ case 0x06: /* Query_Version */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_version_major, &u8VersionMajor);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_version_minor, &u8VersionMinor);
+ proto_item_append_text(item, " V%u.%u", u8VersionMajor, u8VersionMinor);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref: 0x%02x, PE Version V%u.%u",
+ request_ref, u8VersionMajor, u8VersionMinor);
+ col_add = true;
+ break;
+ case 0x07: /* Query_Attributes */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_version_major, &u8VersionMajor);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_version_minor, &u8VersionMinor);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_entity_class, &u8EntityClass);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_entity_subclass, &u8EntitySubClass);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_entity_dyn_t_and_e, &u8EntityDynTEValues);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_entity_pe_ase, &u8EntityPEASE);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_maximum_command_respond_time, &u32MaxCRT);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref: 0x%02x, Query_Attributes PE Version V%u.%u Class 0x%02x",
+ request_ref, u8VersionMajor, u8VersionMinor, u8EntityClass);
+ col_add = true;
+ break;
+ case 0x10: /* Query_Measurement */
+ /*
+ * structures:
+ * 0x01: Measurement Values
+ * 0x02: Measurement List
+ * 0x03: Measurement Values with Object Number
+ * 0x04: Measurement List with Object Number
+ */
+ if ((structure_id == 0x02) || (structure_id == 0x04)) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_data_count, &u8Count);
+ /* align padding */
+ offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1);
+ while (u8Count--) {
+ proto_item *measurement_item;
+ proto_tree *measurement_tree;
+
+ if (structure_id == 0x04) {
+ measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, 10, ENC_NA);
+ measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id);
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_object_number, &u16ObjectNumber);
+ } else {
+ measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, 8, ENC_NA);
+ measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id);
+ }
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_id, &u16MeasurementID);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_accuracy_domain, &u8Accuracy);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_accuracy_class, &u8Accuracy);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_range, &value32);
+ }
+ } else if ((structure_id == 0x01) || (structure_id == 0x03)) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_data_count, &u8Count);
+ /* align padding */
+ offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1);
+ while (u8Count--) {
+ proto_item *measurement_item;
+ proto_tree *measurement_tree;
+
+ /* peek for structure length */
+ u16StructureLength = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
+ measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset,
+ u16StructureLength, ENC_NA);
+ measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id);
+
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_structure_length, &value16);
+ u16StructureLength -= 2;
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_structure_id, &u8StructureID);
+ u16StructureLength -= 1;
+ if (u8StructureID == 2) {
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_status, &value8);
+ u16StructureLength -= 1;
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_object_number, &u16ObjectNumber);
+ u16StructureLength -= 2;
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_id, &u16MeasurementID);
+ u16StructureLength -= 2;
+ } else {
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_id, &u16MeasurementID);
+ u16StructureLength -= 2;
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_status, &value8);
+ u16StructureLength -= 1;
+ }
+
+ if ((u16MeasurementID >= 210) && (u16MeasurementID <= 219)) {
+ dcerpc_info di; /* fake dcerpc_info struct */
+ dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
+ di.call_data = &dcv;
+ offset = dissect_dcerpc_uint64(tvb, offset, pinfo, measurement_tree, &di, drep,
+ hf_pn_io_pe_measurement_value_float64, &value64);
+ u16StructureLength -= 8;
+ } else if ((u16MeasurementID >= 220) && (u16MeasurementID <= 229)) {
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_value_uint32, &value32);
+ u16StructureLength -= 4;
+ } else {
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_value_float32, &value32);
+ u16StructureLength -= 4;
+ }
+
+ if (u16StructureLength > 0) {
+ /* remainder is optional timestamp */
+ offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16StructureLength, "Timestamp");
+ }
+ }
+ }
+ break;
+ case 0x12: /* Set_Meter */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_data_count, &u8Count);
+ /* align padding */
+ offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1);
+ while (u8Count--) {
+ proto_item *measurement_item;
+ proto_tree *measurement_tree;
+
+ measurement_item = proto_tree_add_item(pedata_tree, hf_pn_io_pe_measurement, tvb, offset, 4, ENC_NA);
+ measurement_tree = proto_item_add_subtree(measurement_item, ett_pn_io_pe_measurement_id);
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_object_number, &u16ObjectNumber);
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, measurement_tree, drep,
+ hf_pn_io_pe_measurement_id, &u16MeasurementID);
+ }
+ break;
+ case 0x20: /* Info_Sleep_Mode_WOL */
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_regular_time_to_operate, &u32RTTO);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_time_min_pause, &u32TMinP);
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_wol_wake_up_method, &u8WOLMethod);
+ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_wol_wake_up_data_length, &u16WOLDataLength);
+ offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16WOLDataLength, "Wake_Up_Data");
+ break;
+ case 0x21: /* Go_Sleep_Mode_WOL */
+ offset = dissect_dcerpc_uint8(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_mode_id, &u8ModeID);
+ /* align padding */
+ offset = dissect_pn_padding(tvb, offset, pinfo, pedata_tree, 1);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_current_time_to_destination, &u32CTTD);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_regular_time_to_operate, &u32RTTO);
+ offset = dissect_dcerpc_uint32(tvb, offset, pinfo, pedata_tree, drep,
+ hf_pn_io_pe_time_min_length_of_stay, &u32TMinLS);
+ break;
+ default:
+ /* ... */
+ offset = dissect_pn_user_data(tvb, offset, pinfo, pedata_tree, u16BodyLength, "ResponseData");
+ break;
+ }
+ }
+
+ if (!col_add) {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "PROFIenergy ServiceResponse, Ref:0x%02x, %s",
+ request_ref, val_to_str_const(service_modifier, pn_io_pe_services_modifier, "Unknown"));
+ }
+
+ return offset;
+}
+
/* dissect the PE_EntityFilterData block */
static int
dissect_PE_EntityFilterData_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberOfAPIs;
- guint32 u32Api;
- guint16 u16NumberOfModules;
- guint16 u16SlotNr;
- guint32 u32ModuleIdentNumber;
- guint16 u16NumberOfSubmodules;
- guint16 u16SubslotNr;
- guint32 u32SubmoduleIdentNumber;
+ uint16_t u16NumberOfAPIs;
+ uint32_t u32Api;
+ uint16_t u16NumberOfModules;
+ uint16_t u16SlotNr;
+ uint32_t u32ModuleIdentNumber;
+ uint16_t u16NumberOfSubmodules;
+ uint16_t u16SubslotNr;
+ uint32_t u32SubmoduleIdentNumber;
proto_item* api_item;
proto_tree* api_tree;
- guint32 u32ApiStart;
+ uint32_t u32ApiStart;
proto_item* module_item;
proto_tree* module_tree;
- guint32 u32ModuleStart;
+ uint32_t u32ModuleStart;
proto_item* sub_item;
proto_tree* sub_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -10011,24 +10785,24 @@ dissect_PE_EntityFilterData_block(tvbuff_t* tvb, int offset,
/* dissect the PE_EntityStatusData block */
static int
dissect_PE_EntityStatusData_block(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, proto_item* item _U_, guint8* drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info* pinfo, proto_tree* tree, proto_item* item _U_, uint8_t* drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberOfAPIs;
- guint32 u32Api;
- guint16 u16NumberOfModules;
- guint16 u16SlotNr;
- guint16 u16NumberOfSubmodules;
- guint16 u16SubslotNr;
+ uint16_t u16NumberOfAPIs;
+ uint32_t u32Api;
+ uint16_t u16NumberOfModules;
+ uint16_t u16SlotNr;
+ uint16_t u16NumberOfSubmodules;
+ uint16_t u16SubslotNr;
proto_item* api_item;
proto_tree* api_tree;
- guint32 u32ApiStart;
+ uint32_t u32ApiStart;
proto_item* module_item;
proto_tree* module_tree;
- guint32 u32ModuleStart;
+ uint32_t u32ModuleStart;
proto_item* sub_item;
proto_tree* sub_tree;
- guint32 u32SubStart;
- guint8 u8PEOperationalMode;
+ uint32_t u32SubStart;
+ uint8_t u8PEOperationalMode;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -10112,7 +10886,7 @@ dissect_PE_EntityStatusData_block(tvbuff_t* tvb, int offset,
}
static const char *
-decode_ARType_spezial(guint16 ARType, guint16 ARAccess)
+decode_ARType_spezial(uint16_t ARType, uint16_t ARAccess)
{
if (ARType == 0x0001)
return ("IO Controller AR");
@@ -10124,7 +10898,7 @@ decode_ARType_spezial(guint16 ARType, guint16 ARAccess)
return("IO Controller AR (sysred/CiR)");
else if (ARType == 0x0006)
{
- if (ARAccess) /*TRUE */
+ if (ARAccess) /*true */
return("DeviceAccess AR");
else
return("IO Supervisor AR");
@@ -10136,26 +10910,26 @@ decode_ARType_spezial(guint16 ARType, guint16 ARAccess)
/* dissect the ARBlockReq */
static int
dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
pnio_ar_t ** ar)
{
- guint16 u16ARType;
- guint32 u32ARProperties;
- gboolean have_aruuid = FALSE;
+ uint16_t u16ARType;
+ uint32_t u32ARProperties;
+ bool have_aruuid = false;
e_guid_t aruuid;
e_guid_t uuid;
- guint16 u16SessionKey;
- guint8 mac[6];
- guint16 u16TimeoutFactor;
- guint16 u16UDPRTPort;
- guint16 u16NameLength;
+ uint16_t u16SessionKey;
+ uint8_t mac[6];
+ uint16_t u16TimeoutFactor;
+ uint16_t u16UDPRTPort;
+ uint16_t u16NameLength;
char *pStationName;
pnio_ar_t *par;
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16ArNumber;
- guint16 u16ArResource;
- guint16 u16ArReserved;
+ uint16_t u16ArNumber;
+ uint16_t u16ArResource;
+ uint16_t u16ArReserved;
proto_item *sub_item_selector;
proto_tree *sub_tree_selector;
conversation_t *conversation;
@@ -10222,13 +10996,13 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
apdu_status_switch = wmem_new0(wmem_file_scope(), apduStatusSwitch);
copy_address_shallow(&apdu_status_switch->dl_src, conversation_key_addr1(conversation->key_ptr));
copy_address_shallow(&apdu_status_switch->dl_dst, conversation_key_addr2(conversation->key_ptr));
- apdu_status_switch->isRedundancyActive = TRUE;
+ apdu_status_switch->isRedundancyActive = true;
conversation_add_proto_data(conversation, proto_pn_io_apdu_status, apdu_status_switch);
}
else {
copy_address_shallow(&apdu_status_switch->dl_src, conversation_key_addr1(conversation->key_ptr));
copy_address_shallow(&apdu_status_switch->dl_dst, conversation_key_addr2(conversation->key_ptr));
- apdu_status_switch->isRedundancyActive = TRUE;
+ apdu_status_switch->isRedundancyActive = true;
}
}
}
@@ -10236,7 +11010,7 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
{
offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
hf_pn_io_ar_uuid, &aruuid);
- have_aruuid = TRUE;
+ have_aruuid = true;
}
if (!PINFO_FD_VISITED(pinfo)) {
@@ -10292,14 +11066,14 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset,
/* dissect the ARBlockRes */
static int
dissect_ARBlockRes_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
pnio_ar_t **ar)
{
- guint16 u16ARType;
+ uint16_t u16ARType;
e_guid_t uuid;
- guint16 u16SessionKey;
- guint8 mac[6];
- guint16 u16UDPRTPort;
+ uint16_t u16SessionKey;
+ uint8_t mac[6];
+ uint16_t u16UDPRTPort;
pnio_ar_t *par;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -10345,40 +11119,40 @@ dissect_ARBlockRes_block(tvbuff_t *tvb, int offset,
/* dissect the IOCRBlockReq */
static int
dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
pnio_ar_t *ar)
{
- guint16 u16IOCRType;
- guint16 u16IOCRReference;
- guint16 u16LT;
- guint16 u16DataLength;
- guint16 u16FrameID;
- guint16 u16SendClockFactor;
- guint16 u16ReductionRatio;
- guint16 u16Phase;
- guint16 u16Sequence;
- guint32 u32FrameSendOffset;
- guint16 u16WatchdogFactor;
- guint16 u16DataHoldFactor;
- guint16 u16IOCRTagHeader;
- guint8 mac[6];
- guint16 u16NumberOfAPIs;
- guint32 u32Api;
- guint16 u16NumberOfIODataObjectsInAPI;
- guint16 u16NumberOfIODataObjectsInCR = 0U;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16IODataObjectFrameOffset;
- guint16 u16NumberOfIOCSInAPI;
- guint16 u16NumberOfIOCSInCR = 0U;
- guint16 u16IOCSFrameOffset;
+ uint16_t u16IOCRType;
+ uint16_t u16IOCRReference;
+ uint16_t u16LT;
+ uint16_t u16DataLength;
+ uint16_t u16FrameID;
+ uint16_t u16SendClockFactor;
+ uint16_t u16ReductionRatio;
+ uint16_t u16Phase;
+ uint16_t u16Sequence;
+ uint32_t u32FrameSendOffset;
+ uint16_t u16WatchdogFactor;
+ uint16_t u16DataHoldFactor;
+ uint16_t u16IOCRTagHeader;
+ uint8_t mac[6];
+ uint16_t u16NumberOfAPIs;
+ uint32_t u32Api;
+ uint16_t u16NumberOfIODataObjectsInAPI;
+ uint16_t u16NumberOfIODataObjectsInCR = 0U;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16IODataObjectFrameOffset;
+ uint16_t u16NumberOfIOCSInAPI;
+ uint16_t u16NumberOfIOCSInCR = 0U;
+ uint16_t u16IOCSFrameOffset;
proto_item *api_item;
proto_tree *api_tree;
- guint32 u32ApiStart;
- guint16 u16Tmp;
+ uint32_t u32ApiStart;
+ uint16_t u16Tmp;
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
conversation_t *conversation;
conversation_t *conversation_time_aware;
@@ -10391,7 +11165,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
wmem_list_t *iocs_list;
ARUUIDFrame *current_aruuid_frame = NULL;
- guint32 current_aruuid = 0;
+ uint32_t current_aruuid = 0;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -10532,7 +11306,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
io_data_object->f_dest_adr = 0;
io_data_object->f_par_crc1 = 0;
io_data_object->f_src_adr = 0;
- io_data_object->f_crc_seed = FALSE;
+ io_data_object->f_crc_seed = false;
io_data_object->f_crc_len = 0;
/* Reset as a PNIO Connect Request of a known module appears */
io_data_object->last_sb_cb = 0;
@@ -10564,7 +11338,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, api_tree, drep,
hf_pn_io_number_of_iocs, &u16NumberOfIOCSInAPI);
- /* Set global Vairant for NumberOfIOCS */
+ /* Set global Variant for NumberOfIOCS */
if (!PINFO_FD_VISITED(pinfo)) {
u16NumberOfIOCSInCR += u16NumberOfIOCSInAPI;
}
@@ -10669,18 +11443,18 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
/* dissect the AlarmCRBlockReq */
static int
dissect_AlarmCRBlockReq_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
pnio_ar_t *ar)
{
- guint16 u16AlarmCRType;
- guint16 u16LT;
- guint32 u32AlarmCRProperties;
- guint16 u16RTATimeoutFactor;
- guint16 u16RTARetries;
- guint16 u16LocalAlarmReference;
- guint16 u16MaxAlarmDataLength;
- guint16 u16AlarmCRTagHeaderHigh;
- guint16 u16AlarmCRTagHeaderLow;
+ uint16_t u16AlarmCRType;
+ uint16_t u16LT;
+ uint32_t u32AlarmCRProperties;
+ uint16_t u16RTATimeoutFactor;
+ uint16_t u16RTARetries;
+ uint16_t u16LocalAlarmReference;
+ uint16_t u16MaxAlarmDataLength;
+ uint16_t u16AlarmCRTagHeaderHigh;
+ uint16_t u16AlarmCRTagHeaderLow;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -10739,12 +11513,12 @@ dissect_AlarmCRBlockReq_block(tvbuff_t *tvb, int offset,
/* dissect the AlarmCRBlockRes */
static int
dissect_AlarmCRBlockRes_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
pnio_ar_t *ar)
{
- guint16 u16AlarmCRType;
- guint16 u16LocalAlarmReference;
- guint16 u16MaxAlarmDataLength;
+ uint16_t u16AlarmCRType;
+ uint16_t u16LocalAlarmReference;
+ uint16_t u16MaxAlarmDataLength;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -10779,9 +11553,9 @@ dissect_AlarmCRBlockRes_block(tvbuff_t *tvb, int offset,
/* dissect the ARServerBlock */
static int
dissect_ARServerBlock(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength)
{
- guint16 u16NameLength, u16padding;
+ uint16_t u16NameLength, u16padding;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -10806,12 +11580,12 @@ dissect_ARServerBlock(tvbuff_t *tvb, int offset,
/* dissect the IOCRBlockRes */
static int
dissect_IOCRBlockRes_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
pnio_ar_t *ar)
{
- guint16 u16IOCRType;
- guint16 u16IOCRReference;
- guint16 u16FrameID;
+ uint16_t u16IOCRType;
+ uint16_t u16IOCRReference;
+ uint16_t u16FrameID;
ARUUIDFrame *current_aruuid_frame = NULL;
@@ -10873,12 +11647,12 @@ dissect_IOCRBlockRes_block(tvbuff_t *tvb, int offset,
/* dissect the MCRBlockReq */
static int
dissect_MCRBlockReq_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16IOCRReference;
- guint32 u32AddressResolutionProperties;
- guint16 u16MCITimeoutFactor;
- guint16 u16NameLength;
+ uint16_t u16IOCRReference;
+ uint32_t u32AddressResolutionProperties;
+ uint16_t u16MCITimeoutFactor;
+ uint16_t u16NameLength;
char *pStationName;
@@ -10912,13 +11686,13 @@ dissect_MCRBlockReq_block(tvbuff_t *tvb, int offset,
/* dissect the SubFrameBlock */
static int
dissect_SubFrameBlock_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint16 u16IOCRReference;
- guint8 mac[6];
- guint32 u32SubFrameData;
- guint16 u16Tmp;
+ uint16_t u16IOCRReference;
+ uint8_t mac[6];
+ uint32_t u32SubFrameData;
+ uint16_t u16Tmp;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -10970,15 +11744,15 @@ dissect_SubFrameBlock_block(tvbuff_t *tvb, int offset,
/* dissect the (PD)SubFrameBlock 0x022B */
static int
dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint32 u32SFIOCRProperties;
- guint32 u32SubFrameData;
- guint16 u16FrameID;
+ uint32_t u32SFIOCRProperties;
+ uint32_t u32SubFrameData;
+ uint16_t u16FrameID;
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16RemainingLength;
+ uint16_t u16RemainingLength;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -11019,7 +11793,7 @@ dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset,
u16RemainingLength = u16BodyLength - PD_SUB_FRAME_BLOCK_FIOCR_PROPERTIES_LENGTH - PD_SUB_FRAME_BLOCK_FRAME_ID_LENGTH;
while (u16RemainingLength >= PD_SUB_FRAME_BLOCK_SUB_FRAME_DATA_LENGTH)
{
- guint8 Position,
+ uint8_t Position,
DataLength;
sub_item = proto_tree_add_item(tree, hf_pn_io_subframe_data, tvb, offset, 4, ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_subframe_data);
@@ -11033,8 +11807,8 @@ dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset,
/* Bit 16 - 31: SubframeData.reserved_2 */
offset =
dissect_dcerpc_uint32(tvb, offset, pinfo, sub_tree, drep, hf_pn_io_subframe_reserved2, &u32SubFrameData);
- Position = (guint8) (u32SubFrameData & 0x7F); /* the lower 6 bits */
- DataLength =(guint8) ((u32SubFrameData >>8) & 0x0ff); /* bit 8 to 15 */
+ Position = (uint8_t) (u32SubFrameData & 0x7F); /* the lower 6 bits */
+ DataLength =(uint8_t) ((u32SubFrameData >>8) & 0x0ff); /* bit 8 to 15 */
proto_item_append_text(sub_item, ", Length:%u (0x%x), Pos:%u",
DataLength,DataLength, Position);
u16RemainingLength = u16RemainingLength - 4;
@@ -11046,13 +11820,13 @@ dissect_PDSubFrameBlock_block(tvbuff_t *tvb, int offset,
/* dissect the IRInfoBlock */
static int
dissect_IRInfoBlock_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength _U_)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength _U_)
{
- guint16 u16NumberOfIOCR;
- guint16 u16SubframeOffset;
- guint32 u32SubframeData;
- guint16 u16IOCRReference;
+ uint16_t u16NumberOfIOCR;
+ uint16_t u16SubframeOffset;
+ uint32_t u32SubframeData;
+ uint16_t u16IOCRReference;
e_guid_t IRDataUUID;
@@ -11088,12 +11862,12 @@ dissect_IRInfoBlock_block(tvbuff_t *tvb, int offset,
/* dissect the SRInfoBlock */
static int
dissect_SRInfoBlock_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength _U_)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength _U_)
{
- guint16 u16RedundancyDataHoldFactor;
- guint32 u32sr_properties;
- guint8 u8SRPropertiesMode;
+ uint16_t u16RedundancyDataHoldFactor;
+ uint32_t u32sr_properties;
+ uint8_t u8SRPropertiesMode;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -11104,11 +11878,11 @@ dissect_SRInfoBlock_block(tvbuff_t *tvb, int offset,
}
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, hf_pn_io_RedundancyDataHoldFactor, &u16RedundancyDataHoldFactor);
- u32sr_properties = tvb_get_guint32(tvb, offset, ENC_BIG_ENDIAN);
+ u32sr_properties = tvb_get_uint32(tvb, offset, ENC_BIG_ENDIAN);
sub_item = proto_tree_add_item(tree, hf_pn_io_sr_properties, tvb, offset, 4, ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_sr_properties);
- u8SRPropertiesMode = (guint8)((u32sr_properties >> 2) & 0x01);
+ u8SRPropertiesMode = (uint8_t)((u32sr_properties >> 2) & 0x01);
/* SRProperties.InputValidOnBackupAR with SRProperties.Mode == 1 */
if (u8SRPropertiesMode)
@@ -11134,10 +11908,10 @@ dissect_SRInfoBlock_block(tvbuff_t *tvb, int offset,
/* dissect the RSInfoBlock */
static int
dissect_RSInfoBlock_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
- guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow, guint16 u16BodyLength _U_)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+ uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow, uint16_t u16BodyLength _U_)
{
- guint32 u32RSProperties;
+ uint32_t u32RSProperties;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -11159,10 +11933,11 @@ dissect_RSInfoBlock_block(tvbuff_t *tvb, int offset,
/* dissect the PDIRSubframeData block 0x022a */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_PDIRSubframeData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberOfSubframeBlocks;
+ uint16_t u16NumberOfSubframeBlocks;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -11181,12 +11956,12 @@ dissect_PDIRSubframeData_block(tvbuff_t *tvb, int offset,
static int
dissect_ARVendorBlockReq_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength _U_)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength _U_)
{
- guint16 APStructureIdentifier;
- guint32 gu32API;
- guint32 guDataBytes;
+ uint16_t APStructureIdentifier;
+ uint32_t gu32API;
+ uint32_t guDataBytes;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -11240,15 +12015,15 @@ dissect_ARVendorBlockReq_block(tvbuff_t *tvb, int offset,
/* dissect the DataDescription */
static int
dissect_DataDescription(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, ioDataObject *tmp_io_data_object)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, ioDataObject *tmp_io_data_object)
{
- guint16 u16DataDescription;
- guint16 u16SubmoduleDataLength;
- guint8 u8LengthIOCS;
- guint8 u8LengthIOPS;
+ uint16_t u16DataDescription;
+ uint16_t u16SubmoduleDataLength;
+ uint8_t u8LengthIOCS;
+ uint8_t u8LengthIOPS;
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
conversation_t *conversation;
stationInfo *station_info = NULL;
@@ -11257,7 +12032,7 @@ dissect_DataDescription(tvbuff_t *tvb, int offset,
wmem_list_t *ioobject_list;
ARUUIDFrame *current_aruuid_frame = NULL;
- guint32 current_aruuid = 0;
+ uint32_t current_aruuid = 0;
sub_item = proto_tree_add_item(tree, hf_pn_io_data_description_tree, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_data_description);
@@ -11347,10 +12122,10 @@ resolve_pa_profile_submodule_name(ioDataObject *io_data_object)
const uint8_t parent_class = (u32SubmoduleIdentNumber >> 8u) & 0xFFu;
const uint8_t class = (u32SubmoduleIdentNumber) & 0xFFu;
- const gchar* parent_class_name = NULL;
- const gchar* class_name = NULL;
+ const char* parent_class_name = NULL;
+ const char* class_name = NULL;
- const gchar* block_object_name = try_val_to_str(block_object, pn_io_pa_profile_block_object_vals);
+ const char* block_object_name = try_val_to_str(block_object, pn_io_pa_profile_block_object_vals);
if (block_object_name != NULL)
{
@@ -11442,25 +12217,25 @@ resolve_pa_profile_submodule_name(ioDataObject *io_data_object)
/* dissect the ExpectedSubmoduleBlockReq */
static int
dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberOfAPIs;
- guint32 u32Api;
- guint16 u16SlotNr;
- guint32 u32ModuleIdentNumber;
- guint16 u16ModuleProperties;
- guint16 u16NumberOfSubmodules;
- guint16 u16SubslotNr;
- guint32 u32SubmoduleIdentNumber;
- guint16 u16SubmoduleProperties;
+ uint16_t u16NumberOfAPIs;
+ uint32_t u32Api;
+ uint16_t u16SlotNr;
+ uint32_t u32ModuleIdentNumber;
+ uint16_t u16ModuleProperties;
+ uint16_t u16NumberOfSubmodules;
+ uint16_t u16SubslotNr;
+ uint32_t u32SubmoduleIdentNumber;
+ uint16_t u16SubmoduleProperties;
proto_item *api_item;
proto_tree *api_tree;
- guint32 u32ApiStart;
+ uint32_t u32ApiStart;
proto_item *sub_item;
proto_tree *sub_tree;
proto_item *submodule_item;
proto_tree *submodule_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
/* Variable for the search of gsd file */
const char vendorIdStr[] = "VendorID=\"";
@@ -11473,51 +12248,51 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
const char moduleNameInfo[] = "<Name";
const char moduleValueInfo[] = "Value=\"";
- guint16 searchVendorID = 0;
- guint16 searchDeviceID = 0;
- gboolean vendorMatch;
- gboolean deviceMatch;
+ uint16_t searchVendorID = 0;
+ uint16_t searchDeviceID = 0;
+ bool vendorMatch;
+ bool deviceMatch;
conversation_t *conversation;
stationInfo *station_info = NULL;
ioDataObject *io_data_object = NULL; /* Used to transfer data to fct. "dissect_DataDescription()" */
/* Variable for the search of GSD-file */
- guint32 read_vendor_id;
- guint32 read_device_id;
- guint32 read_module_id;
- guint32 read_submodule_id;
- gboolean gsdmlFoundFlag;
- gchar tmp_moduletext[MAX_NAMELENGTH];
- gchar *convertStr; /* GSD-file search */
- gchar *pch; /* helppointer, to save temp. the found Networkpath of GSD-file */
- gchar *puffer; /* used for fgets() during GSD-file search */
- gchar *temp; /* used for fgets() during GSD-file search */
- gchar *diropen = NULL; /* saves the final networkpath to open for GSD-files */
+ uint32_t read_vendor_id;
+ uint32_t read_device_id;
+ uint32_t read_module_id;
+ uint32_t read_submodule_id;
+ bool gsdmlFoundFlag;
+ char tmp_moduletext[MAX_NAMELENGTH];
+ char *convertStr; /* GSD-file search */
+ char *pch; /* helppointer, to save temp. the found Networkpath of GSD-file */
+ char *puffer; /* used for fgets() during GSD-file search */
+ char *temp; /* used for fgets() during GSD-file search */
+ char *diropen = NULL; /* saves the final networkpath to open for GSD-files */
GDir *dir;
FILE *fp = NULL; /* filepointer */
- const gchar *filename; /* saves the found GSD-file name */
+ const char *filename; /* saves the found GSD-file name */
ARUUIDFrame *current_aruuid_frame = NULL;
- guint32 current_aruuid = 0;
+ uint32_t current_aruuid = 0;
/* Helppointer initial */
- convertStr = (gchar*)wmem_alloc(pinfo->pool, MAX_NAMELENGTH);
+ convertStr = (char*)wmem_alloc(pinfo->pool, MAX_NAMELENGTH);
convertStr[0] = '\0';
- pch = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
+ pch = (char*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
pch[0] = '\0';
- puffer = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
+ puffer = (char*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
puffer[0] = '\0';
- temp = (gchar*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
+ temp = (char*)wmem_alloc(pinfo->pool, MAX_LINE_LENGTH);
temp[0] = '\0';
/* Initial */
io_data_object = wmem_new0(wmem_file_scope(), ioDataObject);
- io_data_object->profisafeSupported = FALSE;
- io_data_object->moduleNameStr = (gchar*)wmem_alloc(wmem_file_scope(), MAX_NAMELENGTH);
+ io_data_object->profisafeSupported = false;
+ io_data_object->moduleNameStr = (char*)wmem_alloc(wmem_file_scope(), MAX_NAMELENGTH);
(void) g_strlcpy(io_data_object->moduleNameStr, "Unknown", MAX_NAMELENGTH);
- vendorMatch = FALSE;
- deviceMatch = FALSE;
- gsdmlFoundFlag = FALSE;
+ vendorMatch = false;
+ deviceMatch = false;
+ gsdmlFoundFlag = false;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -11552,8 +12327,8 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
if (station_info != NULL) {
pn_find_dcp_station_info(station_info, conversation);
- station_info->gsdFound = FALSE;
- station_info->gsdPathLength = FALSE;
+ station_info->gsdFound = false;
+ station_info->gsdPathLength = false;
/* Set searchVendorID and searchDeviceID for GSDfile search */
searchVendorID = station_info->u16Vendor_id;
@@ -11561,7 +12336,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
/* Use the given GSD-file networkpath of the PNIO-Preference */
if(pnio_ps_networkpath[0] != '\0') { /* check the length of the given networkpath (array overflow protection) */
- station_info->gsdPathLength = TRUE;
+ station_info->gsdPathLength = true;
if ((dir = g_dir_open(pnio_ps_networkpath, 0, NULL)) != NULL) {
/* Find all GSD-files within directory */
@@ -11581,10 +12356,10 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
memset (convertStr, 0, sizeof(*convertStr));
pch = strstr(puffer, vendorIdStr);
if (pch!= NULL && sscanf(pch, "VendorID=\"%199[^\"]", convertStr) == 1) {
- read_vendor_id = (guint32) strtoul (convertStr, NULL, 0);
+ read_vendor_id = (uint32_t) strtoul (convertStr, NULL, 0);
if(read_vendor_id == searchVendorID) {
- vendorMatch = TRUE; /* found correct VendorID */
+ vendorMatch = true; /* found correct VendorID */
}
}
}
@@ -11594,10 +12369,10 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
memset(convertStr, 0, sizeof(*convertStr));
pch = strstr(puffer, deviceIdStr);
if (pch != NULL && sscanf(pch, "DeviceID=\"%199[^\"]", convertStr) == 1) {
- read_device_id = (guint32)strtoul(convertStr, NULL, 0);
+ read_device_id = (uint32_t)strtoul(convertStr, NULL, 0);
if(read_device_id == searchDeviceID) {
- deviceMatch = TRUE; /* found correct DeviceID */
+ deviceMatch = true; /* found correct DeviceID */
}
}
}
@@ -11611,9 +12386,9 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
}
else {
/* Couldn't find the correct GSD-file to the corresponding device */
- vendorMatch = FALSE;
- deviceMatch = FALSE;
- gsdmlFoundFlag = FALSE;
+ vendorMatch = false;
+ deviceMatch = false;
+ gsdmlFoundFlag = false;
diropen = ""; /* reset array for next search */
}
}
@@ -11624,8 +12399,8 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
/* ---- Found the correct GSD-file -> set Flag and save the completed path ---- */
if(vendorMatch && deviceMatch) {
- gsdmlFoundFlag = TRUE;
- station_info->gsdFound = TRUE;
+ gsdmlFoundFlag = true;
+ station_info->gsdFound = true;
station_info->gsdLocation = wmem_strdup(wmem_file_scope(), diropen);
}
else {
@@ -11635,7 +12410,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
}
else {
/* will be used later on in cyclic RTC1 data dissection for detailed output message */
- station_info->gsdPathLength = FALSE;
+ station_info->gsdPathLength = false;
}
}
@@ -11727,7 +12502,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
io_data_object->amountInGSDML = 0;
io_data_object->fParameterIndexNr = 0;
- io_data_object->profisafeSupported = FALSE;
+ io_data_object->profisafeSupported = false;
if (diropen != NULL) {
fp = ws_fopen(diropen, "r");
@@ -11745,7 +12520,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
pch = strstr(temp, fParameterIndexStr);
if (pch != NULL && sscanf(pch, "Index=\"%199[^\"]", convertStr) == 1) {
- io_data_object->fParameterIndexNr = (guint32)strtoul(convertStr, NULL, 0);
+ io_data_object->fParameterIndexNr = (uint32_t)strtoul(convertStr, NULL, 0);
}
break; /* found Indexnumber -> break search loop */
}
@@ -11759,7 +12534,7 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
memset (convertStr, 0, sizeof(*convertStr));
pch = strstr(temp, moduleStr); /* search for "ModuleIdentNumber=\"" within GSD-file */
if (pch != NULL && sscanf(pch, "ModuleIdentNumber=\"%199[^\"]", convertStr) == 1) { /* Change format of Value string-->numeric string */
- read_module_id = (guint32)strtoul(convertStr, NULL, 0); /* Change numeric string --> unsigned long; read_module_id contains the Value of the ModuleIdentNumber */
+ read_module_id = (uint32_t)strtoul(convertStr, NULL, 0); /* Change numeric string --> unsigned long; read_module_id contains the Value of the ModuleIdentNumber */
/* If the found ModuleID matches with the wanted ModuleID, search for the Submodule and break */
if (read_module_id == io_data_object->moduleIdentNr) {
@@ -11793,18 +12568,18 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
memset (convertStr, 0, sizeof(*convertStr));
pch = strstr(temp, subModuleStr);
if (pch != NULL && sscanf(pch, "SubmoduleIdentNumber=\"%199[^\"]", convertStr) == 1) {
- read_submodule_id = (guint32) strtoul (convertStr, NULL, 0); /* read_submodule_id contains the Value of the SubModuleIdentNumber */
+ read_submodule_id = (uint32_t) strtoul (convertStr, NULL, 0); /* read_submodule_id contains the Value of the SubModuleIdentNumber */
/* Find "PROFIsafeSupported" flag of the module in GSD-file */
if(read_submodule_id == io_data_object->subModuleIdentNr) {
if((strstr(temp, profisafeStr)) != NULL) {
- io_data_object->profisafeSupported = TRUE; /* flag is in the same line as SubmoduleIdentNr */
+ io_data_object->profisafeSupported = true; /* flag is in the same line as SubmoduleIdentNr */
break;
}
else { /* flag is not in the same line as Submoduleidentnumber -> search for it */
while(pn_fgets(temp, MAX_LINE_LENGTH, fp, pinfo->pool) != NULL) {
if((strstr(temp, profisafeStr)) != NULL) {
- io_data_object->profisafeSupported = TRUE;
+ io_data_object->profisafeSupported = true;
break; /* Found the PROFIsafeSupported flag of the module */
}
@@ -11866,29 +12641,29 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset,
/* dissect the ModuleDiffBlock */
static int
dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16NumberOfAPIs;
- guint32 u32Api;
- guint16 u16NumberOfModules;
- guint16 u16SlotNr;
- guint32 u32ModuleIdentNumber;
- guint16 u16ModuleState;
- guint16 u16NumberOfSubmodules;
- guint16 u16SubslotNr;
- guint32 u32SubmoduleIdentNumber;
- guint16 u16SubmoduleState;
+ uint16_t u16NumberOfAPIs;
+ uint32_t u32Api;
+ uint16_t u16NumberOfModules;
+ uint16_t u16SlotNr;
+ uint32_t u32ModuleIdentNumber;
+ uint16_t u16ModuleState;
+ uint16_t u16NumberOfSubmodules;
+ uint16_t u16SubslotNr;
+ uint32_t u32SubmoduleIdentNumber;
+ uint16_t u16SubmoduleState;
proto_item *api_item;
proto_tree *api_tree;
- guint32 u32ApiStart;
+ uint32_t u32ApiStart;
proto_item *module_item;
proto_tree *module_tree;
- guint32 u32ModuleStart;
+ uint32_t u32ModuleStart;
proto_item *sub_item;
proto_tree *sub_tree;
proto_item *submodule_item;
proto_tree *submodule_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
conversation_t *conversation;
stationInfo *station_info;
@@ -11897,7 +12672,7 @@ dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset,
moduleDiffInfo *cmp_module_diff_info;
ARUUIDFrame *current_aruuid_frame = NULL;
- guint32 current_aruuid = 0;
+ uint32_t current_aruuid = 0;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -12045,16 +12820,16 @@ dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset,
/* dissect the IsochronousModeData block */
static int
dissect_IsochronousModeData_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
- guint16 u16ControllerApplicationCycleFactor;
- guint16 u16TimeDataCycle;
- guint32 u32TimeIOInput;
- guint32 u32TimeIOOutput;
- guint32 u32TimeIOInputValid;
- guint32 u32TimeIOOutputValid;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
+ uint16_t u16ControllerApplicationCycleFactor;
+ uint16_t u16TimeDataCycle;
+ uint32_t u32TimeIOInput;
+ uint32_t u32TimeIOOutput;
+ uint32_t u32TimeIOInputValid;
+ uint32_t u32TimeIOOutputValid;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -12097,14 +12872,14 @@ dissect_IsochronousModeData_block(tvbuff_t *tvb, int offset,
static int
dissect_CommunityName_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, const guint8 *drep _U_, int hfindex)
+ packet_info *pinfo, proto_tree *tree, const uint8_t *drep _U_, int hfindex)
{
- guint8 u8CommunityNameLength;
+ uint8_t u8CommunityNameLength;
proto_item* sub_item;
proto_item* sub_tree;
/* CommunityNameLength */
- u8CommunityNameLength = tvb_get_guint8(tvb, offset);
+ u8CommunityNameLength = tvb_get_uint8(tvb, offset);
sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, u8CommunityNameLength + 1, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_snmp_command_name);
@@ -12124,11 +12899,11 @@ dissect_CommunityName_block(tvbuff_t *tvb, int offset,
/* dissect the CIMSNMPAdjust block */
static int
dissect_CIMSNMPAdjust_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint16 u16StartsAtOffset = offset;
- guint16 u16padding;
+ uint16_t u16StartsAtOffset = offset;
+ uint16_t u16padding;
if (u8BlockVersionHigh!=1 || u8BlockVersionLow!=0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -12152,13 +12927,14 @@ dissect_CIMSNMPAdjust_block(tvbuff_t *tvb, int offset,
/* dissect the MultipleBlockHeader block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_MultipleBlockHeader_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16BodyLength)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16BodyLength)
{
- guint32 u32Api;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
+ uint32_t u32Api;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
tvbuff_t *new_tvb;
@@ -12190,13 +12966,14 @@ dissect_MultipleBlockHeader_block(tvbuff_t *tvb, int offset,
/* dissect Combined Object Container Content block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_COContainerContent_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar)
{
- guint32 u32Api;
- guint16 u16SlotNr;
- guint16 u16SubslotNr;
+ uint32_t u32Api;
+ uint16_t u16SlotNr;
+ uint16_t u16SubslotNr;
if(u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -12231,8 +13008,8 @@ dissect_COContainerContent_block(tvbuff_t *tvb, int offset,
}
-static const gchar *
-indexReservedForProfiles(guint16 u16Index)
+static const char *
+indexReservedForProfiles(uint16_t u16Index)
{
/* "reserved for profiles" */
if (u16Index >= 0xb000 && u16Index <= 0xbfff) {
@@ -12258,10 +13035,10 @@ indexReservedForProfiles(guint16 u16Index)
/* dissect the RecordDataReadQuery block */
static int
dissect_RecordDataReadQuery_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, guint8 *drep _U_, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow,
- guint16 u16Index, guint16 u16BodyLength)
+ packet_info *pinfo _U_, proto_tree *tree, proto_item *item _U_, uint8_t *drep _U_, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow,
+ uint16_t u16Index, uint16_t u16BodyLength)
{
- const gchar *userProfile;
+ const char *userProfile;
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
@@ -12289,8 +13066,8 @@ dissect_RecordDataReadQuery_block(tvbuff_t *tvb, int offset,
/* dissect the RS_GetEvent block */
static int
dissect_RS_GetEvent_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
- guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+ uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -12304,15 +13081,15 @@ dissect_RS_GetEvent_block(tvbuff_t *tvb, int offset,
/* dissect the RS_AdjustControl */
static int
dissect_RS_AdjustControl(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep,
- guint16 *u16RSBodyLength, guint16 *u16RSBlockType)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep,
+ uint16_t *u16RSBodyLength, uint16_t *u16RSBlockType)
{
- guint16 u16ChannelNumber;
- guint16 u16SoEMaxScanDelay;
+ uint16_t u16ChannelNumber;
+ uint16_t u16SoEMaxScanDelay;
proto_item *sub_item;
proto_tree *sub_tree;
- guint8 u8SoEAdjustSpecifierReserved;
- guint8 u8SoEAdjustSpecifierIndicent;
+ uint8_t u8SoEAdjustSpecifierReserved;
+ uint8_t u8SoEAdjustSpecifierIndicent;
switch (*u16RSBlockType) {
case(0xc010): /* SoE_DigitalInputObserver */
@@ -12349,13 +13126,13 @@ dissect_RS_AdjustControl(tvbuff_t *tvb, int offset,
/* dissect the RS_AdjustBlock */
static int
dissect_RS_AdjustBlock(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16RSBodyLength;
- guint16 u16RSBlockType;
+ uint16_t u16RSBodyLength;
+ uint16_t u16RSBlockType;
sub_item = proto_tree_add_item(tree, hf_pn_io_rs_adjust_block, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_adjust_block);
@@ -12374,11 +13151,11 @@ dissect_RS_AdjustBlock(tvbuff_t *tvb, int offset,
/* dissect the RS_AdjustInfo */
static int
dissect_RS_AdjustInfo(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16NumberofEntries;
+ uint16_t u16NumberofEntries;
sub_item = proto_tree_add_item(tree, hf_pn_io_rs_adjust_info, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_rs_adjust_info);
@@ -12396,8 +13173,8 @@ dissect_RS_AdjustInfo(tvbuff_t *tvb, int offset,
/* dissect the RS_AdjustObserver block */
static int
dissect_RS_AdjustObserver_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
- guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+ uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -12410,9 +13187,9 @@ dissect_RS_AdjustObserver_block(tvbuff_t *tvb, int offset,
static int
dissect_RS_AckInfo(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep)
{
- guint16 u16RSSpecifierSequenceNumber;
+ uint16_t u16RSSpecifierSequenceNumber;
/* RS_Specifier.SequenceNumber */
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep,
@@ -12424,8 +13201,8 @@ dissect_RS_AckInfo(tvbuff_t *tvb, int offset,
/* dissect the RS_AckEvent block */
static int
dissect_RS_AckEvent_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 *drep,
- guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t *drep,
+ uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) {
expert_add_info_format(pinfo, item, &ei_pn_io_block_version,
@@ -12438,20 +13215,21 @@ dissect_RS_AckEvent_block(tvbuff_t *tvb, int offset,
/* dissect one PN-IO block (depending on the block type) */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 *u16Index, guint32 *u32RecDataLen, pnio_ar_t **ar)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t *u16Index, uint32_t *u32RecDataLen, pnio_ar_t **ar)
{
- guint16 u16BlockType;
- guint16 u16BlockLength;
- guint8 u8BlockVersionHigh;
- guint8 u8BlockVersionLow;
+ uint16_t u16BlockType;
+ uint16_t u16BlockLength;
+ uint8_t u8BlockVersionHigh;
+ uint8_t u8BlockVersionLow;
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32SubStart;
- guint16 u16BodyLength;
+ uint32_t u32SubStart;
+ uint16_t u16BodyLength;
proto_item *header_item;
proto_tree *header_tree;
- gint remainingBytes;
+ int remainingBytes;
/* from here, we only have big endian (network byte ordering)!!! */
drep[0] &= ~DREP_LITTLE_ENDIAN;
@@ -12493,6 +13271,7 @@ dissect_block(tvbuff_t *tvb, int offset,
proto_item_append_text(sub_item, " Block_Length: %d greater than remaining Bytes, trying with Blocklen = remaining (%d)", u16BodyLength, remainingBytes);
u16BodyLength = remainingBytes;
}
+ increment_dissection_depth(pinfo);
switch (u16BlockType) {
case(0x0001):
case(0x0002):
@@ -12813,7 +13592,7 @@ dissect_block(tvbuff_t *tvb, int offset,
dissect_TSNTimeData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
break;
case(0x0275):
- dissect_TSNStreamPathDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, FALSE);
+ dissect_TSNStreamPathDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, false);
break;
case(0x0276):
dissect_TSNSyncTreeData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
@@ -12828,7 +13607,7 @@ dissect_block(tvbuff_t *tvb, int offset,
dissect_TSNExpectedNetworkAttributes_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
break;
case(0x027A):
- dissect_TSNStreamPathDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, TRUE);
+ dissect_TSNStreamPathDataReal_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, true);
break;
case(0x027B):
dissect_TSNDomainPortIngressRateLimiter_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
@@ -12867,6 +13646,12 @@ dissect_block(tvbuff_t *tvb, int offset,
case(0x0609):
dissect_ARFSUDataAdjust_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
break;
+ case(0x0800):
+ dissect_PE_ServiceRequest_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
+ break;
+ case(0x0801):
+ dissect_PE_ServiceResponse_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow, u16BodyLength);
+ break;
case(0x0810):
dissect_PE_EntityFilterData_block(tvb, offset, pinfo, sub_tree, sub_item, drep, u8BlockVersionHigh, u8BlockVersionLow);
break;
@@ -12928,6 +13713,7 @@ dissect_block(tvbuff_t *tvb, int offset,
default:
dissect_pn_undecoded(tvb, offset, pinfo, sub_tree, u16BodyLength);
}
+ decrement_dissection_depth(pinfo);
offset += u16BodyLength;
proto_item_set_len(sub_item, offset - u32SubStart);
@@ -12938,11 +13724,12 @@ dissect_block(tvbuff_t *tvb, int offset,
/* dissect any PN-IO block */
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_a_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
@@ -12956,15 +13743,16 @@ dissect_a_block(tvbuff_t *tvb, int offset,
/* dissect any number of PN-IO blocks */
int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_blocks(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
- while (tvb_captured_length(tvb) > (guint) offset) {
+ while (tvb_captured_length(tvb) > (unsigned) offset) {
offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, &ar);
u16Index++;
}
@@ -12980,17 +13768,17 @@ dissect_blocks(tvbuff_t *tvb, int offset,
/* dissect a PN-IO (DCE-RPC) request header */
static int
dissect_IPNIO_rqst_header(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32ArgsMax;
- guint32 u32ArgsLen;
- guint32 u32MaxCount;
- guint32 u32Offset;
- guint32 u32ArraySize;
+ uint32_t u32ArgsMax;
+ uint32_t u32ArgsLen;
+ uint32_t u32MaxCount;
+ uint32_t u32Offset;
+ uint32_t u32ArraySize;
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO-CM");
@@ -13025,16 +13813,16 @@ dissect_IPNIO_rqst_header(tvbuff_t *tvb, int offset,
/* dissect a PN-IO (DCE-RPC) response header */
static int
dissect_IPNIO_resp_header(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32ArgsLen;
- guint32 u32MaxCount;
- guint32 u32Offset;
- guint32 u32ArraySize;
+ uint32_t u32ArgsLen;
+ uint32_t u32MaxCount;
+ uint32_t u32Offset;
+ uint32_t u32ArraySize;
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO-CM");
@@ -13068,7 +13856,7 @@ dissect_IPNIO_resp_header(tvbuff_t *tvb, int offset,
/* dissect a PN-IO request */
static int
dissect_IPNIO_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
offset = dissect_IPNIO_rqst_header(tvb, offset, pinfo, tree, di, drep);
@@ -13082,7 +13870,7 @@ dissect_IPNIO_rqst(tvbuff_t *tvb, int offset,
/* dissect a PN-IO response */
static int
dissect_IPNIO_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep);
@@ -13095,13 +13883,13 @@ dissect_IPNIO_resp(tvbuff_t *tvb, int offset,
/* dissect a PROFIDrive parameter request */
static int
dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint8 request_reference;
- guint8 request_id;
- guint8 do_id;
- guint8 no_of_parameters;
- guint8 addr_idx;
+ uint8_t request_reference;
+ uint8_t request_id;
+ uint8_t do_id;
+ uint8_t no_of_parameters;
+ uint8_t addr_idx;
proto_item *profidrive_item;
proto_tree *profidrive_tree;
@@ -13131,10 +13919,10 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset,
/* Parameter address list */
for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) {
- guint8 attribute;
- guint8 no_of_elems;
- guint16 parameter;
- guint16 idx;
+ uint8_t attribute;
+ uint8_t no_of_elems;
+ uint16_t parameter;
+ uint16_t idx;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -13166,8 +13954,8 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset,
/* in case of change request parameter value list */
if (request_id == 0x02) {
for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) {
- guint8 format;
- guint8 no_of_vals;
+ uint8_t format;
+ uint8_t no_of_vals;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -13195,13 +13983,13 @@ dissect_ProfiDriveParameterRequest(tvbuff_t *tvb, int offset,
static int
dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint8 request_reference;
- guint8 response_id;
- guint8 do_id;
- guint8 no_of_parameters;
- guint8 addr_idx;
+ uint8_t request_reference;
+ uint8_t response_id;
+ uint8_t do_id;
+ uint8_t no_of_parameters;
+ uint8_t addr_idx;
proto_item *profidrive_item;
proto_tree *profidrive_tree;
@@ -13225,8 +14013,8 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset,
/* in case of parameter response value list */
if (response_id == 0x01) {
for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) {
- guint8 format;
- guint8 no_of_vals;
+ uint8_t format;
+ uint8_t no_of_vals;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -13255,9 +14043,9 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset,
if(response_id == 0x81){
for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) {
- guint8 format;
- guint8 no_of_vals;
- guint16 value16;
+ uint8_t format;
+ uint8_t no_of_vals;
+ uint16_t value16;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -13311,9 +14099,9 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset,
if(response_id == 0x82){
for(addr_idx=0; addr_idx<no_of_parameters; addr_idx++) {
- guint8 format;
- guint8 no_of_vals;
- guint16 value16;
+ uint8_t format;
+ uint8_t no_of_vals;
+ uint16_t value16;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -13368,9 +14156,9 @@ dissect_ProfiDriveParameterResponse(tvbuff_t *tvb, int offset,
static int
dissect_RecordDataRead(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, guint32 u32RecDataLen)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16Index, uint32_t u32RecDataLen)
{
- const gchar *userProfile;
+ const char *userProfile;
pnio_ar_t *ar = NULL;
/* profidrive parameter access response */
@@ -13422,6 +14210,7 @@ dissect_RecordDataRead(tvbuff_t *tvb, int offset,
case(0x8071): /* PDPortStatistic for one subslot */
case(0x8080): /* PDInterfaceDataReal */
case(0x8090): /* PDInterfaceFSUDataAdjust */
+ case(0x80A0): /* PROFIenergy ServiceRecord */
case(0x80AF): /* PE_EntityStatusData for one subslot */
case(0x80CF): /* RS_AdjustObserver */
@@ -13575,10 +14364,10 @@ dissect_RecordDataRead(tvbuff_t *tvb, int offset,
/* dissect a PN-IO read response */
static int
dissect_IPNIO_Read_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16Index = 0;
- guint32 u32RecDataLen = 0;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen = 0;
pnio_ar_t *ar = NULL;
offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep);
@@ -13605,7 +14394,7 @@ dissect_IPNIO_Read_resp(tvbuff_t *tvb, int offset,
/* F-Parameter record data object */
static int
dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, wmem_list_frame_t *frame)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16Index, wmem_list_frame_t *frame)
{
proto_item *f_item;
proto_tree *f_tree;
@@ -13613,22 +14402,22 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset,
proto_tree *flags1_tree;
proto_item *flags2_item;
proto_tree *flags2_tree;
- guint16 src_addr;
- guint16 dst_addr;
- guint16 wd_time;
- guint16 par_crc;
- guint32 ipar_crc = 0;
- guint8 prm_flag1;
- guint8 prm_flag1_chck_seq;
- guint8 prm_flag1_chck_ipar;
- guint8 prm_flag1_sil;
- guint8 prm_flag1_crc_len;
- guint8 prm_flag1_crc_seed;
- guint8 prm_flag1_reserved;
- guint8 prm_flag2;
- guint8 prm_flag2_reserved;
- guint8 prm_flag2_f_block_id;
- guint8 prm_flag2_f_par_version;
+ uint16_t src_addr;
+ uint16_t dst_addr;
+ uint16_t wd_time;
+ uint16_t par_crc;
+ uint32_t ipar_crc = 0;
+ uint8_t prm_flag1;
+ uint8_t prm_flag1_chck_seq;
+ uint8_t prm_flag1_chck_ipar;
+ uint8_t prm_flag1_sil;
+ uint8_t prm_flag1_crc_len;
+ uint8_t prm_flag1_crc_seed;
+ uint8_t prm_flag1_reserved;
+ uint8_t prm_flag2;
+ uint8_t prm_flag2_reserved;
+ uint8_t prm_flag2_f_block_id;
+ uint8_t prm_flag2_f_par_version;
conversation_t *conversation;
stationInfo *station_info;
@@ -13636,7 +14425,7 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset,
wmem_list_frame_t *frame_out;
ARUUIDFrame *current_aruuid_frame = NULL;
- guint32 current_aruuid = 0;
+ uint32_t current_aruuid = 0;
f_item = proto_tree_add_item(tree, hf_pn_io_block, tvb, offset, 0, ENC_NA);
f_tree = proto_item_add_subtree(f_item, ett_pn_io_profisafe_f_parameter);
@@ -13691,7 +14480,7 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset,
hf_pn_io_ps_f_par_crc, &par_crc);
- /* Differniate between ipar_crc and no_ipar_crc */
+ /* Differentiate between ipar_crc and no_ipar_crc */
if( (prm_flag2_f_block_id & 0x08) && !(prm_flag2_f_block_id & 0x20) ) { /* include ipar_crc display */
col_append_fstr(pinfo->cinfo, COL_INFO,
", F-Parameter record, prm_flag1:0x%02x, prm_flag2:0x%02x, src:0x%04x,"
@@ -13778,18 +14567,18 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset,
static int
dissect_RecordDataWrite(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16Index, guint32 u32RecDataLen)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16Index, uint32_t u32RecDataLen)
{
conversation_t *conversation;
stationInfo *station_info;
wmem_list_frame_t *frame;
ioDataObject *io_data_object;
- const gchar *userProfile;
+ const char *userProfile;
pnio_ar_t *ar = NULL;
ARUUIDFrame *current_aruuid_frame = NULL;
- guint32 current_aruuid = 0;
+ uint32_t current_aruuid = 0;
/* PROFISafe */
/* Get current conversation endpoints using MAC addresses */
@@ -13889,6 +14678,7 @@ dissect_RecordDataWrite(tvbuff_t *tvb, int offset,
case(0x8070): /* PDNCDataCheck for one subslot */
case(0x8071): /* PDInterfaceAdjust */
case(0x8090): /* PDInterfaceFSUDataAdjust */
+ case(0x80A0): /* PROFIenergy ServiceRecord */
case(0x80B0): /* CombinedObjectContainer*/
case(0x80CF): /* RS_AdjustObserver */
case(0x8200): /* CIMSNMPAdjust */
@@ -13909,11 +14699,12 @@ dissect_RecordDataWrite(tvbuff_t *tvb, int offset,
#define PN_IO_MAX_RECURSION_DEPTH 100
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_IODWriteReq(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, pnio_ar_t **ar, guint recursion_count)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, pnio_ar_t **ar, unsigned recursion_count)
{
- guint16 u16Index = 0;
- guint32 u32RecDataLen = 0;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen = 0;
if (++recursion_count >= PN_IO_MAX_RECURSION_DEPTH) {
proto_tree_add_expert(tree, pinfo, &ei_pn_io_max_recursion_depth_reached,
@@ -13921,6 +14712,8 @@ dissect_IODWriteReq(tvbuff_t *tvb, int offset,
return tvb_captured_length(tvb);
}
+ increment_dissection_depth(pinfo);
+
/* IODWriteHeader */
offset = dissect_block(tvb, offset, pinfo, tree, drep, &u16Index, &u32RecDataLen, ar);
@@ -13950,16 +14743,18 @@ dissect_IODWriteReq(tvbuff_t *tvb, int offset,
}
}
+ decrement_dissection_depth(pinfo);
+
return offset;
}
/* dissect a PN-IO write request */
static int
dissect_IPNIO_Write_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
pnio_ar_t *ar = NULL;
- guint recursion_count = 0;
+ unsigned recursion_count = 0;
offset = dissect_IPNIO_rqst_header(tvb, offset, pinfo, tree, di, drep);
@@ -13976,10 +14771,10 @@ dissect_IPNIO_Write_rqst(tvbuff_t *tvb, int offset,
static int
dissect_IODWriteRes(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
@@ -14004,7 +14799,7 @@ dissect_IODWriteRes(tvbuff_t *tvb, int offset,
/* dissect a PN-IO write response */
static int
dissect_IPNIO_Write_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
offset = dissect_IPNIO_resp_header(tvb, offset, pinfo, tree, di, drep);
@@ -14018,12 +14813,12 @@ dissect_IPNIO_Write_resp(tvbuff_t *tvb, int offset,
/* dissect any number of PN-RSI blocks */
int
dissect_rsi_blocks(tvbuff_t* tvb, int offset,
- packet_info* pinfo, proto_tree* tree, guint8* drep, guint32 u32FOpnumOffsetOpnum, int type)
+ packet_info* pinfo, proto_tree* tree, uint8_t* drep, uint32_t u32FOpnumOffsetOpnum, int type)
{
pnio_ar_t* ar = NULL;
- guint recursion_count = 0;
- guint16 u16Index = 0;
- guint32 u32RecDataLen = 0;
+ unsigned recursion_count = 0;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen = 0;
switch (u32FOpnumOffsetOpnum) {
@@ -14080,15 +14875,15 @@ dissect_rsi_blocks(tvbuff_t* tvb, int offset,
/* dissect the IOxS (IOCS, IOPS) field */
static int
dissect_PNIO_IOxS(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep _U_, int hfindex)
{
if (tree) {
- guint8 u8IOxS;
+ uint8_t u8IOxS;
proto_item *ioxs_item;
proto_tree *ioxs_tree;
- u8IOxS = tvb_get_guint8(tvb, offset);
+ u8IOxS = tvb_get_uint8(tvb, offset);
/* add ioxs subtree */
ioxs_item = proto_tree_add_uint(tree, hfindex, tvb, offset, 1, u8IOxS);
@@ -14111,11 +14906,11 @@ dissect_PNIO_IOxS(tvbuff_t *tvb, int offset,
/* dissect a PN-IO Cyclic Service Data Unit (on top of PN-RT protocol) */
static int
dissect_PNIO_C_SDU(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep _U_)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep _U_)
{
proto_tree *data_tree = NULL;
- /* gint iTotalLen = 0; */
- /* gint iSubFrameLen = 0; */
+ /* int iTotalLen = 0; */
+ /* int iSubFrameLen = 0; */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO");
@@ -14146,20 +14941,20 @@ dissect_PNIO_C_SDU(tvbuff_t *tvb, int offset,
/* dissect a PN-IO RTA PDU (on top of PN-RT protocol) */
static int
dissect_PNIO_RTA(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint16 u16AlarmDstEndpoint;
- guint16 u16AlarmSrcEndpoint;
- guint8 u8PDUType;
- guint8 u8PDUVersion;
- guint8 u8WindowSize;
- guint8 u8Tack;
- guint16 u16SendSeqNum;
- guint16 u16AckSeqNum;
- guint16 u16VarPartLen;
+ uint16_t u16AlarmDstEndpoint;
+ uint16_t u16AlarmSrcEndpoint;
+ uint8_t u8PDUType;
+ uint8_t u8PDUVersion;
+ uint8_t u8WindowSize;
+ uint8_t u8Tack;
+ uint16_t u16SendSeqNum;
+ uint16_t u16AckSeqNum;
+ uint16_t u16VarPartLen;
int start_offset = offset;
- guint16 u16Index = 0;
- guint32 u32RecDataLen;
+ uint16_t u16Index = 0;
+ uint32_t u32RecDataLen;
pnio_ar_t *ar = NULL;
@@ -14244,17 +15039,17 @@ dissect_PNIO_RTA(tvbuff_t *tvb, int offset,
/* possibly dissect a PN-IO related PN-RT packet */
-static gboolean
+static bool
dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *data)
{
- guint8 drep_data = 0;
- guint8 *drep = &drep_data;
+ uint8_t drep_data = 0;
+ uint8_t *drep = &drep_data;
/* the sub tvb will NOT contain the frame_id here! */
- guint16 u16FrameID = GPOINTER_TO_UINT(data);
+ uint16_t u16FrameID = GPOINTER_TO_UINT(data);
heur_dtbl_entry_t *hdtbl_entry;
conversation_t* conversation;
- guint8 isTimeAware = FALSE;
+ uint8_t isTimeAware = false;
/*
* In case the packet is a protocol encoded in the basic PNIO transport stream,
@@ -14262,7 +15057,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* to dissect it as a normal PNIO packet.
*/
if (dissector_try_heuristic(heur_pn_subdissector_list, tvb, pinfo, tree, &hdtbl_entry, NULL))
- return TRUE;
+ return true;
/* TimeAwareness Information needed for dissecting RTC3 - RTSteam frames */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0);
@@ -14277,7 +15072,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
(u16FrameID >= 0x0700 && u16FrameID <= 0x0fff)) && /* RTC3 redundant */
!isTimeAware) {
dissect_CSF_SDU_heur(tvb, pinfo, tree, data);
- return TRUE;
+ return true;
}
/* is this a PNIO class stream data packet? */
@@ -14286,7 +15081,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
(u16FrameID >= 0x3800 && u16FrameID <= 0x3FFF)) &&
isTimeAware) {
dissect_CSF_SDU_heur(tvb, pinfo, tree, data);
- return TRUE;
+ return true;
}
/* The following range is reserved for following developments */
@@ -14294,7 +15089,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* first byte (CBA version field) has to be != 0x11 */
if (u16FrameID >= 0x4000 && u16FrameID <= 0x7fff) {
dissect_PNIO_C_SDU(tvb, 0, pinfo, tree, drep);
- return TRUE;
+ return true;
}
/* is this a PNIO class 1 data packet? */
@@ -14302,7 +15097,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* first byte (CBA version field) has to be != 0x11 */
if (u16FrameID >= 0x8000 && u16FrameID < 0xbfff) {
dissect_PNIO_C_SDU_RTC1(tvb, 0, pinfo, tree, drep, u16FrameID);
- return TRUE;
+ return true;
}
/* is this a PNIO class 1 (legacy) data packet? */
@@ -14310,7 +15105,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* first byte (CBA version field) has to be != 0x11 */
if (u16FrameID >= 0xc000 && u16FrameID < 0xfbff) {
dissect_PNIO_C_SDU_RTC1(tvb, 0, pinfo, tree, drep, u16FrameID);
- return TRUE;
+ return true;
}
/* is this a PNIO high priority alarm packet? */
@@ -14318,7 +15113,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
col_set_str(pinfo->cinfo, COL_INFO, "Alarm High");
dissect_PNIO_RTA(tvb, 0, pinfo, tree, drep);
- return TRUE;
+ return true;
}
/* is this a PNIO low priority alarm packet? */
@@ -14326,22 +15121,26 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
col_set_str(pinfo->cinfo, COL_INFO, "Alarm Low");
dissect_PNIO_RTA(tvb, 0, pinfo, tree, drep);
- return TRUE;
+ return true;
}
/* is this a Remote Service Interface (RSI) packet*/
if (u16FrameID == 0xfe02) {
dissect_PNIO_RSI(tvb, 0, pinfo, tree, drep);
- return TRUE;
+ return true;
}
/* this PN-RT packet doesn't seem to be PNIO specific */
- return FALSE;
+ return false;
}
+static int
+dissect_PNIO(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
+{
+ return dissect_PNIO_heur(tvb, pinfo, tree, data) ? tvb_captured_length(tvb) : 0;
+}
-
-static gboolean
+static bool
pn_io_ar_conv_valid(packet_info *pinfo, void *user_data _U_)
{
void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_pn_io, 0);
@@ -14349,7 +15148,7 @@ pn_io_ar_conv_valid(packet_info *pinfo, void *user_data _U_)
return ((profinet_type != NULL) && (GPOINTER_TO_UINT(profinet_type) == 10));
}
-static gchar *
+static char *
pn_io_ar_conv_filter(packet_info *pinfo, void *user_data _U_)
{
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
@@ -14374,7 +15173,7 @@ pn_io_ar_conv_filter(packet_info *pinfo, void *user_data _U_)
return buf;
}
-static gchar *
+static char *
pn_io_ar_conv_data_filter(packet_info *pinfo, void *user_data _U_)
{
pnio_ar_t *ar = (pnio_ar_t *)p_get_proto_data(wmem_file_scope(), pinfo, proto_pn_io, 0);
@@ -14424,7 +15223,7 @@ pn_io_ar_conv_data_filter(packet_info *pinfo, void *user_data _U_)
/* the PNIO dcerpc interface table */
-static dcerpc_sub_dissector pn_io_dissectors[] = {
+static const dcerpc_sub_dissector pn_io_dissectors[] = {
{ 0, "Connect", dissect_IPNIO_rqst, dissect_IPNIO_resp },
{ 1, "Release", dissect_IPNIO_rqst, dissect_IPNIO_resp },
{ 2, "Read", dissect_IPNIO_rqst, dissect_IPNIO_Read_resp },
@@ -17636,22 +18435,22 @@ proto_register_pn_io (void)
NULL, HFILL }
},
{ &hf_pn_io_am_location_beginslotnum,
- { "AM_Location.BeginSlotNumber", "pn_io.slot_nr",
+ { "AM_Location.BeginSlotNumber", "pn_io.am_location.beginslotnumber",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pn_io_am_location_beginsubslotnum,
- { "AM_Location.BeginSubSlotNumber", "pn_io.subslot_nr",
+ { "AM_Location.BeginSubSlotNumber", "pn_io.am_location.beginsubslotnumber",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pn_io_am_location_endslotnum,
- { "AM_Location.EndSlotNumber", "pn_io.slot_nr",
+ { "AM_Location.EndSlotNumber", "pn_io.am_location.endslotnumber",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_pn_io_am_location_endsubslotnum,
- { "AM_Location.EndSubSlotNumber", "pn_io.subslot_nr",
+ { "AM_Location.EndSubSlotNumber", "pn_io.am_location.endsubslotnumber",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
@@ -17680,6 +18479,251 @@ proto_register_pn_io (void)
FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_mau_type_extension), 0x0,
NULL, HFILL }
},
+ { &hf_pn_io_pe_service_request_id,
+ { "PE ServiceID", "pn_io.profienergy.service.id",
+ FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_services), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_service_request_reference,
+ { "PE RequestRef", "pn_io.profienergy.service.request_reference",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_service_modifier,
+ { "PE ServiceModifier", "pn_io.profienergy.service.modifier",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_service_status,
+ { "PE ServiceStatus", "pn_io.profienergy.service.status",
+ FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_service_status), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_service_structure_id,
+ { "PE StructID", "pn_io.profienergy.service.structure_id",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_service_errorcode,
+ { "PE ServiceError", "pn_io.profienergy.service.errorcode",
+ FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_service_errorcode), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_service_datarequest,
+ { "PE DataRequest", "pn_io.profienergy.datarerequest",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_service_dataresponse,
+ { "PE DataResponse", "pn_io.profienergy.dataresponse",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_data_count,
+ { "Count", "pn_io.profienergy.data.count",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_pause_time,
+ { "Pause_time in msec", "pn_io.profienergy.time.pause",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_time_min_pause,
+ { "Time_min_Pause in msec", "pn_io.profienergy.time.min_pause",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_time_to_pause,
+ { "Time_to_Pause in msec", "pn_io.profienergy.time.to_pause",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_time_min_length_of_stay,
+ { "Time_min_length_of_stay in msec", "pn_io.profienergy.time.min_length_of_stay",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_time_max_length_of_stay,
+ { "Time_max_length_of_stay in msec", "pn_io.profienergy.time.max_length_of_stay",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_regular_time_to_operate,
+ { "Regular_time_to_operate in msec", "pn_io.profienergy.time.regular_to_operate",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_current_time_to_operate,
+ { "Current_time_to_operate in msec", "pn_io.profienergy.time.current_to_operate",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_current_time_to_destination,
+ { "Current_time_to_destination in msec", "pn_io.profienergy.time.current_to_destination",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_mode_power_consumption,
+ { "Mode PowerConsumption in kW", "pn_io.profienergy.mode.power_consumption",
+ FT_FLOAT, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_energy_to_destination,
+ { "Energy Consumption_to_destination in kWh", "pn_io.profienergy.energy.to_destination",
+ FT_FLOAT, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_energy_to_operate,
+ { "Energy Consumption_to_operate in kWh", "pn_io.profienergy.energy.to_operate",
+ FT_FLOAT, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_energy_to_pause,
+ { "Energy Consumption_to_pause in kWh", "pn_io.profienergy.energy.to_pause",
+ FT_FLOAT, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_version_major,
+ { "PE VersionMajor", "pn_io.profienergy.version.major",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_version_minor,
+ { "PE VersionMinor", "pn_io.profienergy.version.minor",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_entity_class,
+ { "PE Entity Class", "pn_io.profienergy.entity.class",
+ FT_UINT8, BASE_HEX, VALS(pn_io_pe_entity_classes), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_entity_subclass,
+ { "PE Entity Subclass", "pn_io.profienergy.entity.subclass",
+ FT_UINT8, BASE_HEX, VALS(pn_io_pe_entity_subclasses), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_entity_dyn_t_and_e,
+ { "PE Dyn_T_and_E_values", "pn_io.profienergy.entity.dyn_t_and_e",
+ FT_UINT8, BASE_HEX, VALS(pn_io_pe_dyn_t_and_e_values), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_entity_pe_ase,
+ { "PE ASE", "pn_io.profienergy.entity.use_pease",
+ FT_UINT8, BASE_HEX, VALS(pn_io_pe_use_pe_ase), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_maximum_command_respond_time,
+ { "PE Max_command_respond_time in msec", "pn_io.profienergy.time.max_respond_time",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_mode_id,
+ { "ModeID", "pn_io.profienergy.mode.id",
+ FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_operational_mode), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_mode_attributes_value,
+ { "ModeAttributes", "pn_io.profienergy.mode.attributes",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_mode_attributes_value_bit0,
+ { "ModeAttributes", "pn_io.profienergy.mode.attributes_bit0",
+ FT_UINT8, BASE_HEX, VALS(pn_io_pe_mode_attributes_bit0), 0x1,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_mode_attributes_value_otherbits,
+ { "ModeAttributes", "pn_io.profienergy.mode.attributes_otherbits",
+ FT_UINT8, BASE_HEX, NULL, 0xFE,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_wol_wake_up_method,
+ { "Wake_Up_Method", "pn_io.profienergy.wol.wake_up_method",
+ FT_UINT8, BASE_HEX, VALS(pn_io_pe_wol_wake_up_method), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_wol_wake_up_data_length,
+ { "Wake_Up_Data_Length", "pn_io.profienergy.wol.wake_up_data_length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_mode_id_source,
+ { "ModeID Source", "pn_io.profienergy.mode.id_source",
+ FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_operational_mode), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_mode_id_destination,
+ { "ModeID Destination", "pn_io.profienergy.mode.id_destination",
+ FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_operational_mode), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement,
+ { "Measurement", "pn_io.profienergy.measurement",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_id,
+ { "ID", "pn_io.profienergy.measurement.id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_object_number,
+ { "Object_Number", "pn_io.profienergy.measurement.object_number",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_accuracy_domain,
+ { "Accuracy_Domain", "pn_io.profienergy.measurement.accuracy_domain",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_accuracy_class,
+ { "Accuracy_Class", "pn_io.profienergy.measurement.accuracy_class",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_range,
+ { "Range", "pn_io.profienergy.measurement.range",
+ FT_FLOAT, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_structure_length,
+ { "Structure Length", "pn_io.profienergy.measurement.structure_length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_structure_id,
+ { "Structure ID", "pn_io.profienergy.measurement.structure_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_status,
+ { "Status", "pn_io.profienergy.measurement.status",
+ FT_UINT8, BASE_DEC, VALS(pn_io_pe_measurement_status), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_value,
+ { "Measurement Value", "pn_io.profienergy.measurement.value",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_value_uint32,
+ { "Value", "pn_io.profienergy.measurement.value_uint32",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_value_float32,
+ { "Value", "pn_io.profienergy.measurement.value_float32",
+ FT_FLOAT, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_pn_io_pe_measurement_value_float64,
+ { "Value", "pn_io.profienergy.measurement.value_float64",
+ FT_DOUBLE, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
{ &hf_pn_io_pe_operational_mode,
{ "PE_OperationalMode", "pn_io.pe_operationalmode",
FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(pn_io_pe_operational_mode), 0x0,
@@ -17712,7 +18756,7 @@ proto_register_pn_io (void)
},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_io,
&ett_pn_io_block,
&ett_pn_io_block_header,
@@ -17781,6 +18825,13 @@ proto_register_pn_io (void)
&ett_pn_io_dcp_boundary,
&ett_pn_io_peer_to_peer_boundary,
&ett_pn_io_mau_type_extension,
+ &ett_pn_io_pe_service_request,
+ &ett_pn_io_pe_service_response,
+ &ett_pn_io_pe_service_datarequest,
+ &ett_pn_io_pe_service_dataresponse,
+ &ett_pn_io_pe_mode_attributes,
+ &ett_pn_io_pe_measurement_id,
+ &ett_pn_io_pe_measurement_value,
&ett_pn_io_pe_operational_mode,
&ett_pn_io_neighbor,
&ett_pn_io_tsn_domain_vid_config,
@@ -17812,7 +18863,7 @@ proto_register_pn_io (void)
proto_pn_io = proto_register_protocol ("PROFINET IO", "PNIO", "pn_io");
/* Register by name */
- register_dissector("pnio", dissect_PNIO_heur, proto_pn_io);
+ register_dissector("pnio", dissect_PNIO, proto_pn_io);
/* Created to remove Decode As confusion */
proto_pn_io_device = proto_register_protocol_in_name_only("PROFINET IO (Device)", "PNIO (Device Interface)", "pn_io_device", proto_pn_io, FT_PROTOCOL);
@@ -17836,11 +18887,11 @@ proto_register_pn_io (void)
&pnio_ps_selection);
prefs_register_directory_preference(pnio_module, "pnio_ps_networkpath",
"Folder containing GSD files", /* Title */
- "Place GSD files in this folder.", /* Descreption */
+ "Place GSD files in this folder.", /* Description */
&pnio_ps_networkpath); /* Variable in which to save the GSD file folder path */
/* subdissector code */
- register_dissector("pn_io", dissect_PNIO_heur, proto_pn_io);
+ register_dissector("pn_io", dissect_PNIO, proto_pn_io);
heur_pn_subdissector_list = register_heur_dissector_list_with_description("pn_io", "PROFINET IO payload", proto_pn_io);
/* Initialise RTC1 dissection */
diff --git a/plugins/epan/profinet/packet-dcom-cba-acco.c b/plugins/epan/profinet/packet-dcom-cba-acco.c
index 3fe5fd5998..db3e175316 100644
--- a/plugins/epan/profinet/packet-dcom-cba-acco.c
+++ b/plugins/epan/profinet/packet-dcom-cba-acco.c
@@ -20,7 +20,8 @@
#include <epan/dissectors/packet-dcerpc.h>
#include <epan/dissectors/packet-dcom.h>
#include "packet-dcom-cba-acco.h"
-#include <epan/ws_printf.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
void proto_register_dcom_cba_acco(void);
void proto_reg_handoff_dcom_cba_acco(void);
@@ -119,20 +120,20 @@ static int hf_cba_acco_diag_data;
static int hf_cba_acco_dcom_call;
static int hf_cba_acco_srt_call;
-gint ett_cba_connectincr;
-gint ett_cba_connectoutcr;
-gint ett_cba_connectin;
-gint ett_cba_connectout;
-gint ett_cba_getprovconnout;
-gint ett_cba_addconnectionin;
-gint ett_cba_addconnectionout;
-gint ett_cba_getidout;
-gint ett_cba_getconnectionout;
-gint ett_cba_readitemout;
-gint ett_cba_writeitemin;
-gint ett_cba_acco_serversrt_cr_flags;
-gint ett_cba_frame_info;
-gint ett_cba_conn_info;
+int ett_cba_connectincr;
+int ett_cba_connectoutcr;
+int ett_cba_connectin;
+int ett_cba_connectout;
+int ett_cba_getprovconnout;
+int ett_cba_addconnectionin;
+int ett_cba_addconnectionout;
+int ett_cba_getidout;
+int ett_cba_getconnectionout;
+int ett_cba_readitemout;
+int ett_cba_writeitemin;
+int ett_cba_acco_serversrt_cr_flags;
+int ett_cba_frame_info;
+int ett_cba_conn_info;
static expert_field ei_cba_acco_pdev_find;
static expert_field ei_cba_acco_prov_crid;
@@ -146,43 +147,43 @@ static expert_field ei_cba_acco_disconnect;
static expert_field ei_cba_acco_connect;
static int proto_ICBAAccoMgt;
-static gint ett_ICBAAccoMgt;
+static int ett_ICBAAccoMgt;
static e_guid_t uuid_ICBAAccoMgt = { 0xcba00041, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAAccoMgt = 0;
+static uint16_t ver_ICBAAccoMgt;
static int proto_ICBAAccoMgt2;
static e_guid_t uuid_ICBAAccoMgt2 = { 0xcba00046, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAAccoMgt2 = 0;
+static uint16_t ver_ICBAAccoMgt2;
static int proto_ICBAAccoCallback;
-static gint ett_ICBAAccoCallback;
-static gint ett_ICBAAccoCallback_Buffer;
-static gint ett_ICBAAccoCallback_Item;
+static int ett_ICBAAccoCallback;
+static int ett_ICBAAccoCallback_Buffer;
+static int ett_ICBAAccoCallback_Item;
static e_guid_t uuid_ICBAAccoCallback = { 0xcba00042, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAAccoCallback = 0;
+static uint16_t ver_ICBAAccoCallback;
static int proto_ICBAAccoCallback2;
static e_guid_t uuid_ICBAAccoCallback2 = { 0xcba00047, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAAccoCallback2 = 0;
+static uint16_t ver_ICBAAccoCallback2;
static int proto_ICBAAccoServer;
-static gint ett_ICBAAccoServer;
+static int ett_ICBAAccoServer;
static e_guid_t uuid_ICBAAccoServer = { 0xcba00043, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAAccoServer = 0;
+static uint16_t ver_ICBAAccoServer;
static int proto_ICBAAccoServer2;
static e_guid_t uuid_ICBAAccoServer2 = { 0xcba00048, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAAccoServer2 = 0;
+static uint16_t ver_ICBAAccoServer2;
static int proto_ICBAAccoServerSRT;
-static gint ett_ICBAAccoServerSRT;
+static int ett_ICBAAccoServerSRT;
static e_guid_t uuid_ICBAAccoServerSRT = { 0xcba00045, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAAccoServerSRT = 0;
+static uint16_t ver_ICBAAccoServerSRT;
static int proto_ICBAAccoSync;
-static gint ett_ICBAAccoSync;
+static int ett_ICBAAccoSync;
static e_guid_t uuid_ICBAAccoSync = { 0xcba00044, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAAccoSync = 0;
+static uint16_t ver_ICBAAccoSync;
@@ -246,8 +247,8 @@ static const value_string cba_acco_diag_req_vals[] = {
};
static const true_false_string cba_acco_call_flags = {
- "Consumer calls Provider (TRUE)",
- "Provider calls Consumer (FALSE)"
+ "Consumer calls Provider (true)",
+ "Provider calls Consumer (false)"
};
static const value_string cba_qos_type_short_vals[] = {
@@ -265,53 +266,53 @@ typedef struct cba_frame_s {
cba_ldev_t *consparent;
cba_ldev_t *provparent;
GList *conns;
- guint packet_connect;
- guint packet_disconnect;
- guint packet_disconnectme;
- guint packet_first;
- guint packet_last;
-
- guint16 length;
- guint8 consmac[6];
- guint16 conscrid;
- guint32 provcrid;
- guint32 conncrret;
- guint16 qostype;
- guint16 qosvalue;
- guint16 offset;
+ unsigned packet_connect;
+ unsigned packet_disconnect;
+ unsigned packet_disconnectme;
+ unsigned packet_first;
+ unsigned packet_last;
+
+ uint16_t length;
+ uint8_t consmac[6];
+ uint16_t conscrid;
+ uint32_t provcrid;
+ uint32_t conncrret;
+ uint16_t qostype;
+ uint16_t qosvalue;
+ uint16_t offset;
} cba_frame_t;
typedef struct cba_connection_s {
cba_ldev_t *consparentacco;
cba_ldev_t *provparentacco;
cba_frame_t *parentframe;
- guint packet_connect;
- guint packet_disconnect;
- guint packet_disconnectme;
- guint packet_first;
- guint packet_last;
-
- guint16 length;
- guint32 consid;
- guint32 provid;
- const gchar *provitem;
- guint32 connret;
- guint16 typedesclen;
- guint16 *typedesc;
- guint16 qostype;
- guint16 qosvalue;
- guint16 frame_offset;
+ unsigned packet_connect;
+ unsigned packet_disconnect;
+ unsigned packet_disconnectme;
+ unsigned packet_first;
+ unsigned packet_last;
+
+ uint16_t length;
+ uint32_t consid;
+ uint32_t provid;
+ const char *provitem;
+ uint32_t connret;
+ uint16_t typedesclen;
+ uint16_t *typedesc;
+ uint16_t qostype;
+ uint16_t qosvalue;
+ uint16_t frame_offset;
} cba_connection_t;
typedef struct server_frame_call_s {
- guint frame_count;
+ unsigned frame_count;
cba_frame_t **frames;
} server_frame_call_t;
typedef struct server_connect_call_s {
- guint conn_count;
+ unsigned conn_count;
cba_frame_t *frame;
cba_connection_t **conns;
} server_connect_call_t;
@@ -327,7 +328,7 @@ GList *cba_pdevs;
/* as we are a plugin, we cannot get this from libwireshark! */
const true_false_string acco_flags_set_truth = { "Set", "Not set" };
-static gboolean
+static bool
cba_filter_valid(packet_info *pinfo, void *user_data _U_)
{
void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0);
@@ -335,10 +336,10 @@ cba_filter_valid(packet_info *pinfo, void *user_data _U_)
return ((profinet_type != NULL) && (GPOINTER_TO_UINT(profinet_type) < 10));
}
-static gchar*
+static char*
cba_build_filter(packet_info *pinfo, void *user_data _U_)
{
- gboolean is_tcp = proto_is_frame_protocol(pinfo->layers, "tcp");
+ bool is_tcp = proto_is_frame_protocol(pinfo->layers, "tcp");
void* profinet_type = p_get_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0);
if ((pinfo->net_src.type == AT_IPv4) && (pinfo->net_dst.type == AT_IPv4) && is_tcp) {
@@ -614,7 +615,7 @@ cba_acco_add(packet_info *pinfo, const char *acco)
{
char *ip_str;
char *delim;
- guint32 ip;
+ uint32_t ip;
cba_pdev_t *pdev;
cba_ldev_t *ldev;
address addr;
@@ -645,8 +646,8 @@ cba_acco_add(packet_info *pinfo, const char *acco)
}
-static gboolean
-cba_packet_in_range(packet_info *pinfo, guint packet_connect, guint packet_disconnect, guint packet_disconnectme)
+static bool
+cba_packet_in_range(packet_info *pinfo, unsigned packet_connect, unsigned packet_disconnect, unsigned packet_disconnectme)
{
if (packet_connect == 0) {
@@ -654,16 +655,16 @@ cba_packet_in_range(packet_info *pinfo, guint packet_connect, guint packet_disco
}
if (packet_connect == 0 || pinfo->num < packet_connect) {
- return FALSE;
+ return false;
}
if (packet_disconnect != 0 && pinfo->num > packet_disconnect) {
- return FALSE;
+ return false;
}
if (packet_disconnectme != 0 && pinfo->num > packet_disconnectme) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
@@ -724,7 +725,7 @@ cba_frame_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, cba_fram
static cba_frame_t *
cba_frame_connect(packet_info *pinfo, cba_ldev_t *cons_ldev, cba_ldev_t *prov_ldev,
- guint16 qostype, guint16 qosvalue, const guint8 *consmac, guint16 conscrid, guint16 length)
+ uint16_t qostype, uint16_t qosvalue, const uint8_t *consmac, uint16_t conscrid, uint16_t length)
{
GList *cba_iter;
cba_frame_t *frame;
@@ -751,7 +752,7 @@ cba_frame_connect(packet_info *pinfo, cba_ldev_t *cons_ldev, cba_ldev_t *prov_ld
frame->packet_last = 0;
frame->length = length;
- memcpy( (guint8 *) (frame->consmac), consmac, sizeof(frame->consmac));
+ memcpy( (uint8_t *) (frame->consmac), consmac, sizeof(frame->consmac));
frame->conscrid = conscrid;
frame->qostype = qostype;
frame->qosvalue = qosvalue;
@@ -813,7 +814,7 @@ cba_frame_disconnectme(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, cba_
static cba_frame_t *
-cba_frame_find_by_cons(packet_info *pinfo, const guint8 *consmac, guint16 conscrid)
+cba_frame_find_by_cons(packet_info *pinfo, const uint8_t *consmac, uint16_t conscrid)
{
GList *pdevs;
GList *ldevs;
@@ -849,7 +850,7 @@ cba_frame_find_by_cons(packet_info *pinfo, const guint8 *consmac, guint16 conscr
static cba_frame_t *
-cba_frame_find_by_provcrid(packet_info *pinfo, cba_ldev_t *prov_ldev, guint32 provcrid)
+cba_frame_find_by_provcrid(packet_info *pinfo, cba_ldev_t *prov_ldev, uint32_t provcrid)
{
GList *frames;
cba_frame_t *frame;
@@ -946,8 +947,8 @@ cba_connection_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, cba
static cba_connection_t *
cba_connection_connect(packet_info *pinfo, cba_ldev_t *cons_ldev, cba_ldev_t *prov_ldev, cba_frame_t *cons_frame,
- guint16 qostype, guint16 qosvalue, const char *provitem, guint32 consid, guint16 length,
- guint16 *typedesc, guint16 typedesclen)
+ uint16_t qostype, uint16_t qosvalue, const char *provitem, uint32_t consid, uint16_t length,
+ uint16_t *typedesc, uint16_t typedesclen)
{
GList *cba_iter;
cba_connection_t *conn;
@@ -1055,7 +1056,7 @@ cba_connection_disconnectme(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static cba_connection_t *
-cba_connection_find_by_provid(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree _U_, cba_ldev_t *prov_ldev, guint32 provid)
+cba_connection_find_by_provid(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree _U_, cba_ldev_t *prov_ldev, uint32_t provid)
{
GList *cba_iter;
cba_connection_t *conn;
@@ -1089,13 +1090,13 @@ cba_connection_incoming_data(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *
/* dissect a response containing an array of hresults (e.g: ICBAAccoMgt::RemoveConnections) */
static int
dissect_HResultArray_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- guint32 u32Pointer;
- guint32 u32ArraySize = 0;
- guint32 u32Idx;
- guint32 u32Tmp;
+ uint32_t u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32Idx;
+ uint32_t u32Tmp;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -1129,19 +1130,19 @@ dissect_HResultArray_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_SetActivation_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- guint32 u32Pointer;
- guint32 u32ArraySize = 0;
- guint32 u32Idx;
- guint32 u32Tmp;
+ uint32_t u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32Idx;
+ uint32_t u32Tmp;
proto_item *item;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(1));
@@ -1174,19 +1175,19 @@ dissect_ICBAAccoServer_SetActivation_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_Disconnect_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- guint32 u32Pointer;
- guint32 u32ArraySize = 0;
- guint32 u32Idx;
- guint32 u32Tmp;
+ uint32_t u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32Idx;
+ uint32_t u32Tmp;
proto_item *item;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(3));
@@ -1219,19 +1220,19 @@ dissect_ICBAAccoServerSRT_Disconnect_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_SetActivation_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- guint32 u32Pointer;
- guint32 u32ArraySize = 0;
- guint32 u32Idx;
- guint32 u32Tmp;
+ uint32_t u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32Idx;
+ uint32_t u32Tmp;
proto_item *item;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(3));
@@ -1264,24 +1265,24 @@ dissect_ICBAAccoServerSRT_SetActivation_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_Connect_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16QoSType;
- guint16 u16QoSValue;
- guint8 u8State;
- guint32 u32Count;
- guint32 u32ArraySize;
-
- guint32 u32VariableOffset;
- guint32 u32SubStart;
- guint32 u32Pointer;
- guint16 u16VarType;
- guint32 u32ConsID;
- gchar szItem[1000] = { 0 };
- guint32 u32MaxItemLen = sizeof(szItem);
- gchar szCons[1000] = { 0 };
- guint32 u32MaxConsLen = sizeof(szCons);
- guint32 u32Idx;
+ uint16_t u16QoSType;
+ uint16_t u16QoSValue;
+ uint8_t u8State;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+
+ uint32_t u32VariableOffset;
+ uint32_t u32SubStart;
+ uint32_t u32Pointer;
+ uint16_t u16VarType;
+ uint32_t u32ConsID;
+ char szItem[1000] = { 0 };
+ uint32_t u32MaxItemLen = sizeof(szItem);
+ char szCons[1000] = { 0 };
+ uint32_t u32MaxConsLen = sizeof(szCons);
+ uint32_t u32Idx;
proto_item *item;
dcom_interface_t *cons_interf;
@@ -1296,7 +1297,7 @@ dissect_ICBAAccoServer_Connect_rqst(tvbuff_t *tvb, int offset,
/* get corresponding provider ldev */
prov_ldev = cba_ldev_find(pinfo, &pinfo->net_dst, &di->call_data->object_uuid);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(2));
@@ -1381,7 +1382,7 @@ dissect_ICBAAccoServer_Connect_rqst(tvbuff_t *tvb, int offset,
conn = cba_connection_connect(pinfo, cons_ldev, prov_ldev, /*cons_frame*/ NULL,
u16QoSType, u16QoSValue, szItem, u32ConsID, 0,
/* XXX - VarType must be translated to new type description if it includes an array (0x2000) */
- (guint16 *)wmem_memdup(wmem_file_scope(), &u16VarType, 2), 1);
+ (uint16_t *)wmem_memdup(wmem_file_scope(), &u16VarType, 2), 1);
cba_connection_info(tvb, pinfo, sub_tree, conn);
} else {
@@ -1410,36 +1411,36 @@ dissect_ICBAAccoServer_Connect_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer2_Connect2_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16QoSType;
- guint16 u16QoSValue;
- guint8 u8State;
- guint32 u32Count;
- guint32 u32ArraySize;
-
- guint32 u32VariableOffset;
- guint32 u32SubStart;
- guint32 u32Pointer;
- guint16 u16VarType;
- guint32 u32ConsID;
- gchar szItem[1000] = { 0 };
- guint32 u32MaxItemLen = sizeof(szItem);
- gchar szCons[1000] = { 0 };
- guint32 u32MaxConsLen = sizeof(szCons);
- guint32 u32Idx;
- guint16 u16TypeDescLen;
- guint32 u32ArraySize2;
- guint32 u32Idx2;
- guint16 u16VarType2 = -1;
+ uint16_t u16QoSType;
+ uint16_t u16QoSValue;
+ uint8_t u8State;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+
+ uint32_t u32VariableOffset;
+ uint32_t u32SubStart;
+ uint32_t u32Pointer;
+ uint16_t u16VarType;
+ uint32_t u32ConsID;
+ char szItem[1000] = { 0 };
+ uint32_t u32MaxItemLen = sizeof(szItem);
+ char szCons[1000] = { 0 };
+ uint32_t u32MaxConsLen = sizeof(szCons);
+ uint32_t u32Idx;
+ uint16_t u16TypeDescLen;
+ uint32_t u32ArraySize2;
+ uint32_t u32Idx2;
+ uint16_t u16VarType2 = -1;
proto_item *item;
dcom_interface_t *cons_interf;
cba_ldev_t *prov_ldev;
cba_ldev_t *cons_ldev;
cba_connection_t *conn;
- guint16 typedesclen = 0;
- guint16 *typedesc = NULL;
+ uint16_t typedesclen = 0;
+ uint16_t *typedesc = NULL;
server_connect_call_t *call = NULL;
@@ -1448,7 +1449,7 @@ dissect_ICBAAccoServer2_Connect2_rqst(tvbuff_t *tvb, int offset,
/* get corresponding provider ldev */
prov_ldev = cba_ldev_find(pinfo, &pinfo->net_dst, &di->call_data->object_uuid);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(2));
@@ -1533,7 +1534,7 @@ dissect_ICBAAccoServer2_Connect2_rqst(tvbuff_t *tvb, int offset,
/* limit the allocation to a reasonable size */
if (u32ArraySize2 < 1000) {
- typedesc = (guint16 *)wmem_alloc0(wmem_file_scope(), u32ArraySize2 * 2);
+ typedesc = (uint16_t *)wmem_alloc0(wmem_file_scope(), u32ArraySize2 * 2);
typedesclen = u32ArraySize2;
} else {
typedesc = NULL;
@@ -1605,15 +1606,15 @@ dissect_ICBAAccoServer2_Connect2_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_Connect_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint8 u8FirstConnect;
- guint32 u32Pointer;
- guint32 u32ArraySize = 0;
- guint32 u32HResult;
- guint32 u32Idx = 1;
- guint32 u32ProvID;
- guint32 u32SubStart;
+ uint8_t u8FirstConnect;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32HResult;
+ uint32_t u32Idx = 1;
+ uint32_t u32ProvID;
+ uint32_t u32SubStart;
proto_item *item;
cba_connection_t *conn;
@@ -1626,7 +1627,7 @@ dissect_ICBAAccoServer_Connect_resp(tvbuff_t *tvb, int offset,
expert_add_info(pinfo, NULL, &ei_cba_acco_no_request_info);
}
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(1));
@@ -1695,12 +1696,12 @@ dissect_ICBAAccoServer_Connect_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_Disconnect_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ProvID;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ProvID;
proto_item *item;
cba_ldev_t *prov_ldev;
@@ -1710,7 +1711,7 @@ dissect_ICBAAccoServer_Disconnect_rqst(tvbuff_t *tvb, int offset,
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(2));
@@ -1758,13 +1759,13 @@ dissect_ICBAAccoServer_Disconnect_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_Disconnect_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- guint32 u32Pointer;
- guint32 u32ArraySize = 0;
- guint32 u32Idx;
- guint32 u32Tmp;
+ uint32_t u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32Idx;
+ uint32_t u32Tmp;
proto_item *item;
cba_connection_t *conn;
@@ -1777,7 +1778,7 @@ dissect_ICBAAccoServer_Disconnect_resp(tvbuff_t *tvb, int offset,
expert_add_info(pinfo, NULL, &ei_cba_acco_no_request_info);
}
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(1));
@@ -1819,18 +1820,18 @@ dissect_ICBAAccoServer_Disconnect_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_Disconnect_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ProvID;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ProvID;
proto_item *item;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(4));
@@ -1856,10 +1857,10 @@ dissect_ICBAAccoServerSRT_Disconnect_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_DisconnectMe_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
proto_item *item;
cba_ldev_t *prov_ldev;
cba_ldev_t *cons_ldev;
@@ -1871,7 +1872,7 @@ dissect_ICBAAccoServer_DisconnectMe_rqst(tvbuff_t *tvb, int offset,
/* get corresponding provider ldev */
prov_ldev = cba_ldev_find(pinfo, &pinfo->net_dst, &di->call_data->object_uuid);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(2));
@@ -1897,16 +1898,16 @@ dissect_ICBAAccoServer_DisconnectMe_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_DisconnectMe_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
+ uint32_t u32HResult;
proto_item *item;
server_disconnectme_call_t *call;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(1));
@@ -1927,10 +1928,10 @@ dissect_ICBAAccoServer_DisconnectMe_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_DisconnectMe_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
proto_item *item;
cba_ldev_t *prov_ldev;
cba_ldev_t *cons_ldev;
@@ -1942,7 +1943,7 @@ dissect_ICBAAccoServerSRT_DisconnectMe_rqst(tvbuff_t *tvb, int offset,
/* get corresponding provider ldev */
prov_ldev = cba_ldev_find(pinfo, &pinfo->net_dst, &di->call_data->object_uuid);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(4));
@@ -1968,16 +1969,16 @@ dissect_ICBAAccoServerSRT_DisconnectMe_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_DisconnectMe_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
+ uint32_t u32HResult;
proto_item *item;
server_disconnectme_call_t *call;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(3));
@@ -1998,15 +1999,15 @@ dissect_ICBAAccoServerSRT_DisconnectMe_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_Ping_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
+ uint32_t u32HResult;
proto_item *item;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(1));
@@ -2022,19 +2023,19 @@ dissect_ICBAAccoServer_Ping_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_SetActivation_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint8 u8State;
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ProvID;
+ uint8_t u8State;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ProvID;
proto_item *item;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(2));
@@ -2064,19 +2065,19 @@ dissect_ICBAAccoServer_SetActivation_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_SetActivation_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint8 u8State;
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ProvID;
+ uint8_t u8State;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ProvID;
proto_item *item;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(4));
@@ -2105,16 +2106,16 @@ dissect_ICBAAccoServerSRT_SetActivation_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer_Ping_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
proto_item *item;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(2));
@@ -2130,22 +2131,22 @@ dissect_ICBAAccoServer_Ping_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_ConnectCR_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szCons[1000] = { 0 };
- guint32 u32MaxConsLen = sizeof(szCons);
- guint16 u16QoSType;
- guint16 u16QoSValue;
- guint8 u8ConsMac[6];
- guint16 u16CRID = 0;
- guint16 u16CRLength = 0;
- guint32 u32Flags;
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
+ char szCons[1000] = { 0 };
+ uint32_t u32MaxConsLen = sizeof(szCons);
+ uint16_t u16QoSType;
+ uint16_t u16QoSValue;
+ uint8_t u8ConsMac[6];
+ uint16_t u16CRID = 0;
+ uint16_t u16CRLength = 0;
+ uint32_t u32Flags;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
proto_item *item;
proto_tree *flags_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
dcom_interface_t *cons_interf;
cba_ldev_t *prov_ldev;
cba_ldev_t *cons_ldev;
@@ -2158,7 +2159,7 @@ dissect_ICBAAccoServerSRT_ConnectCR_rqst(tvbuff_t *tvb, int offset,
/* get corresponding provider ldev */
prov_ldev = cba_ldev_find(pinfo, &pinfo->net_dst, &di->call_data->object_uuid);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(4));
@@ -2272,16 +2273,16 @@ dissect_ICBAAccoServerSRT_ConnectCR_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_ConnectCR_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint8 u8FirstConnect;
- guint8 u8ProvMac[6];
- guint32 u32ProvCRID = 0;
- guint32 u32HResult;
- guint32 u32ArraySize;
- guint32 u32Idx = 1;
- guint32 u32Pointer;
- guint32 u32SubStart;
+ uint8_t u8FirstConnect;
+ uint8_t u8ProvMac[6];
+ uint32_t u32ProvCRID = 0;
+ uint32_t u32HResult;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx = 1;
+ uint32_t u32Pointer;
+ uint32_t u32SubStart;
proto_item *item;
cba_frame_t *frame;
server_frame_call_t *call = (server_frame_call_t *)di->call_data->private_data;
@@ -2293,7 +2294,7 @@ dissect_ICBAAccoServerSRT_ConnectCR_resp(tvbuff_t *tvb, int offset,
expert_add_info(pinfo, NULL, &ei_cba_acco_no_request_info);
}
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(3));
@@ -2371,12 +2372,12 @@ dissect_ICBAAccoServerSRT_ConnectCR_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_DisconnectCR_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ProvCRID = 0;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ProvCRID = 0;
proto_item *item;
cba_ldev_t *prov_ldev;
cba_frame_t *frame;
@@ -2388,7 +2389,7 @@ dissect_ICBAAccoServerSRT_DisconnectCR_rqst(tvbuff_t *tvb, int offset,
/* get corresponding provider ldev */
prov_ldev = cba_ldev_find(pinfo, &pinfo->net_dst, &di->call_data->object_uuid);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(4));
@@ -2433,13 +2434,13 @@ dissect_ICBAAccoServerSRT_DisconnectCR_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_DisconnectCR_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- guint32 u32Pointer;
- guint32 u32ArraySize = 0;
- guint32 u32Idx;
- guint32 u32Tmp;
+ uint32_t u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32Idx;
+ uint32_t u32Tmp;
cba_frame_t *frame;
proto_item *item;
server_frame_call_t *call = (server_frame_call_t *)di->call_data->private_data;
@@ -2447,7 +2448,7 @@ dissect_ICBAAccoServerSRT_DisconnectCR_resp(tvbuff_t *tvb, int offset,
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(3));
@@ -2487,32 +2488,32 @@ dissect_ICBAAccoServerSRT_DisconnectCR_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_Connect_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32ProvCRID;
- guint8 u8State;
- guint8 u8LastConnect;
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32VariableOffset;
- guint32 u32Idx;
- guint32 u32SubStart;
- guint32 u32Pointer;
- gchar szProvItem[1000] = { 0 };
- guint32 u32MaxProvItemLen = sizeof(szProvItem);
- guint16 u16TypeDescLen;
- guint32 u32ArraySize2;
- guint32 u32Idx2;
- guint16 u16VarType2 = -1;
- guint16 u16VarType;
- guint32 u32ConsID;
- guint16 u16RecordLength;
+ uint32_t u32ProvCRID;
+ uint8_t u8State;
+ uint8_t u8LastConnect;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32VariableOffset;
+ uint32_t u32Idx;
+ uint32_t u32SubStart;
+ uint32_t u32Pointer;
+ char szProvItem[1000] = { 0 };
+ uint32_t u32MaxProvItemLen = sizeof(szProvItem);
+ uint16_t u16TypeDescLen;
+ uint32_t u32ArraySize2;
+ uint32_t u32Idx2;
+ uint16_t u16VarType2 = -1;
+ uint16_t u16VarType;
+ uint32_t u32ConsID;
+ uint16_t u16RecordLength;
proto_item *item;
cba_ldev_t *prov_ldev;
cba_frame_t *frame = NULL;
- guint16 typedesclen = 0;
- guint16 *typedesc = NULL;
+ uint16_t typedesclen = 0;
+ uint16_t *typedesc = NULL;
cba_connection_t *conn;
server_connect_call_t *call;
@@ -2523,7 +2524,7 @@ dissect_ICBAAccoServerSRT_Connect_rqst(tvbuff_t *tvb, int offset,
/* get corresponding provider ldev */
prov_ldev = cba_ldev_find(pinfo, &pinfo->net_dst, &di->call_data->object_uuid);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(4));
@@ -2591,7 +2592,7 @@ dissect_ICBAAccoServerSRT_Connect_rqst(tvbuff_t *tvb, int offset,
u32VariableOffset = dissect_dcom_dcerpc_array_size(tvb, u32VariableOffset, pinfo, sub_tree, di, drep,
&u32ArraySize2);
- typedesc = (guint16 *)wmem_alloc0(wmem_file_scope(), u32ArraySize2 * 2);
+ typedesc = (uint16_t *)wmem_alloc0(wmem_file_scope(), u32ArraySize2 * 2);
typedesclen = u32ArraySize2;
/* extended type description will build an array here */
@@ -2660,14 +2661,14 @@ dissect_ICBAAccoServerSRT_Connect_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServerSRT_Connect_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Pointer;
- guint32 u32ArraySize;
- guint32 u32Idx = 1;
- guint32 u32SubStart;
- guint32 u32ProvID;
- guint32 u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx = 1;
+ uint32_t u32SubStart;
+ uint32_t u32ProvID;
+ uint32_t u32HResult;
proto_item *item;
@@ -2681,7 +2682,7 @@ dissect_ICBAAccoServerSRT_Connect_resp(tvbuff_t *tvb, int offset,
expert_add_info(pinfo, NULL, &ei_cba_acco_no_request_info);
}
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(3));
@@ -2750,14 +2751,14 @@ dissect_ICBAAccoServerSRT_Connect_resp(tvbuff_t *tvb, int offset,
static int
dissect_Server_GetProvIDs_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32Pointer;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ProvID;
- guint32 u32HResult;
+ uint32_t u32Count;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ProvID;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -2807,12 +2808,12 @@ dissect_Server_GetProvIDs_resp(tvbuff_t *tvb, int offset,
static int
dissect_Server_GetProvConnections_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ProvID;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ProvID;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -2839,23 +2840,23 @@ dissect_Server_GetProvConnections_rqst(tvbuff_t *tvb, int offset,
static int
dissect_Server_GetProvConnections_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32TmpCount;
- guint32 u32Pointer;
- guint32 u32VariableOffset;
- guint32 u32Idx;
- guint32 u32SubStart;
- gchar szCons[1000] = { 0 };
- guint32 u32MaxConsLen = sizeof(szCons);
- gchar szProvItem[1000] = { 0 };
- guint32 u32MaxProvItemLen = sizeof(szProvItem);
- guint32 u32ConsID;
- guint16 u16QoSType;
- guint16 u16QoSValue;
- guint8 u8State;
- guint32 u32HResult;
+ uint32_t u32Count;
+ uint32_t u32TmpCount;
+ uint32_t u32Pointer;
+ uint32_t u32VariableOffset;
+ uint32_t u32Idx;
+ uint32_t u32SubStart;
+ char szCons[1000] = { 0 };
+ uint32_t u32MaxConsLen = sizeof(szCons);
+ char szProvItem[1000] = { 0 };
+ uint32_t u32MaxProvItemLen = sizeof(szProvItem);
+ uint32_t u32ConsID;
+ uint16_t u16QoSType;
+ uint16_t u16QoSValue;
+ uint8_t u8State;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -2949,22 +2950,22 @@ static int
dissect_CBA_Connection_Data(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, cba_ldev_t *cons_ldev, cba_frame_t *frame)
{
- guint8 u8Version;
- guint8 u8Flags;
- guint16 u16CountFix;
- guint16 u16Count;
- guint32 u32ItemIdx;
- guint32 u32HoleIdx;
+ uint8_t u8Version;
+ uint8_t u8Flags;
+ uint16_t u16CountFix;
+ uint16_t u16Count;
+ uint32_t u32ItemIdx;
+ uint32_t u32HoleIdx;
proto_item *conn_data_item = NULL;
proto_tree *conn_data_tree = NULL;
- guint16 u16Len;
- guint32 u32ID;
- guint8 u8QC;
- guint16 u16DataLen;
- guint16 u16HdrLen;
+ uint16_t u16Len;
+ uint32_t u32ID;
+ uint8_t u8QC;
+ uint16_t u16DataLen;
+ uint16_t u16HdrLen;
int offset = 0;
int offset_hole;
- gboolean qc_reported = FALSE;
+ bool qc_reported = false;
int qc_good = 0;
int qc_uncertain = 0;
int qc_bad = 0;
@@ -2981,13 +2982,13 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
}
/* add buffer header */
- u8Version = tvb_get_guint8 (tvb, offset);
+ u8Version = tvb_get_uint8 (tvb, offset);
if (conn_data_tree) {
proto_tree_add_item(conn_data_tree, hf_cba_acco_cb_version, tvb, offset, 1, ENC_LITTLE_ENDIAN);
}
offset += 1;
- u8Flags = tvb_get_guint8 (tvb, offset);
+ u8Flags = tvb_get_uint8 (tvb, offset);
if (conn_data_tree) {
proto_tree_add_item(conn_data_tree, hf_cba_acco_cb_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
}
@@ -3091,7 +3092,7 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
u32ID = 0;
}
- u8QC = tvb_get_guint8 (tvb, offset);
+ u8QC = tvb_get_uint8 (tvb, offset);
item = NULL;
if (sub_tree) {
item = proto_tree_add_item(sub_tree, hf_cba_acco_qc, tvb, offset, 1, ENC_LITTLE_ENDIAN);
@@ -3189,45 +3190,45 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
}
-static gboolean
+static bool
dissect_CBA_Connection_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *data)
{
- guint8 u8Version;
- guint8 u8Flags;
+ uint8_t u8Version;
+ uint8_t u8Flags;
/* the tvb will NOT contain the frame_id here! */
- guint16 u16FrameID = GPOINTER_TO_UINT(data);
+ uint16_t u16FrameID = GPOINTER_TO_UINT(data);
cba_frame_t *frame;
/* frame id must be in valid range (cyclic Real-Time, class=1 or class=2) */
if (u16FrameID < 0x8000 || u16FrameID >= 0xfb00) {
- return FALSE;
+ return false;
}
- u8Version = tvb_get_guint8 (tvb, 0);
- u8Flags = tvb_get_guint8 (tvb, 1);
+ u8Version = tvb_get_uint8 (tvb, 0);
+ u8Flags = tvb_get_uint8 (tvb, 1);
/* version and flags must be ok */
if (u8Version != 0x11 || u8Flags != 0x00) {
- return FALSE;
+ return false;
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-CBA");
- frame = cba_frame_find_by_cons(pinfo, (const guint8 *)pinfo->dl_dst.data, u16FrameID);
+ frame = cba_frame_find_by_cons(pinfo, (const uint8_t *)pinfo->dl_dst.data, u16FrameID);
dissect_CBA_Connection_Data(tvb, pinfo, tree, frame ? frame->consparent : NULL, frame);
- return TRUE;
+ return true;
}
static int
dissect_ICBAAccoCallback_OnDataChanged_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Length;
- guint32 u32ArraySize;
+ uint32_t u32Length;
+ uint32_t u32ArraySize;
tvbuff_t *next_tvb;
proto_item *item;
cba_ldev_t *cons_ldev;
@@ -3238,7 +3239,7 @@ dissect_ICBAAccoCallback_OnDataChanged_rqst(tvbuff_t *tvb, int offset,
/* get corresponding provider ldev */
cons_ldev = cba_ldev_find(pinfo, &pinfo->net_dst, &di->call_data->object_uuid);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(1));
@@ -3262,15 +3263,15 @@ dissect_ICBAAccoCallback_OnDataChanged_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoCallback_OnDataChanged_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
+ uint32_t u32HResult;
proto_item *item;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(2));
@@ -3286,14 +3287,14 @@ dissect_ICBAAccoCallback_OnDataChanged_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoCallback_Gnip_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
proto_item *item;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(3));
@@ -3303,15 +3304,15 @@ dissect_ICBAAccoCallback_Gnip_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoCallback_Gnip_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
+ uint32_t u32HResult;
proto_item *item;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_srt_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(4));
@@ -3327,10 +3328,10 @@ dissect_ICBAAccoCallback_Gnip_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer2_GetConnectionData_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
proto_item *item;
cba_ldev_t *cons_ldev;
cba_ldev_t **call;
@@ -3338,7 +3339,7 @@ dissect_ICBAAccoServer2_GetConnectionData_rqst(tvbuff_t *tvb, int offset,
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, TRUE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, true);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(2));
@@ -3363,13 +3364,13 @@ dissect_ICBAAccoServer2_GetConnectionData_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoServer2_GetConnectionData_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Length;
- guint32 u32ArraySize;
+ uint32_t u32Length;
+ uint32_t u32ArraySize;
tvbuff_t *next_tvb;
- guint32 u32Pointer;
- guint32 u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
proto_item *item;
cba_ldev_t **call = (cba_ldev_t **)di->call_data->private_data;
cba_ldev_t *cons_ldev = (call!=NULL) ? *call : NULL;
@@ -3381,7 +3382,7 @@ dissect_ICBAAccoServer2_GetConnectionData_resp(tvbuff_t *tvb, int offset,
expert_add_info(pinfo, NULL, &ei_cba_acco_no_request_info);
}
- item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, FALSE);
+ item = proto_tree_add_boolean (tree, hf_cba_acco_dcom_call, tvb, offset, 0, false);
proto_item_set_generated(item);
p_add_proto_data(pinfo->pool, pinfo, proto_ICBAAccoMgt, 0, GUINT_TO_POINTER(1));
@@ -3417,24 +3418,24 @@ dissect_ICBAAccoServer2_GetConnectionData_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_AddConnections_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szConsumer[1000] = { 0 };
- guint32 u32MaxConsLen = sizeof(szConsumer);
- guint16 u16QoSType;
- guint16 u16QoSValue;
- guint8 u8State;
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Pointer;
- guint16 u16Persistence;
- gchar szConsItem[1000] = { 0 };
- guint32 u32MaxConsItemLen = sizeof(szConsItem);
- gchar szProvItem[1000] = { 0 };
- guint32 u32MaxProvItemLen = sizeof(szProvItem);
- guint32 u32VariableOffset;
- guint32 u32SubStart;
- guint32 u32Idx;
+ char szConsumer[1000] = { 0 };
+ uint32_t u32MaxConsLen = sizeof(szConsumer);
+ uint16_t u16QoSType;
+ uint16_t u16QoSValue;
+ uint8_t u8State;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Pointer;
+ uint16_t u16Persistence;
+ char szConsItem[1000] = { 0 };
+ uint32_t u32MaxConsItemLen = sizeof(szConsItem);
+ char szProvItem[1000] = { 0 };
+ uint32_t u32MaxProvItemLen = sizeof(szProvItem);
+ uint32_t u32VariableOffset;
+ uint32_t u32SubStart;
+ uint32_t u32Idx;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -3512,16 +3513,16 @@ dissect_ICBAAccoMgt_AddConnections_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_AddConnections_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Pointer;
- guint32 u32ArraySize = 0;
- guint32 u32ConsID;
- guint16 u16ConnVersion;
- guint32 u32HResult = 0;
- guint32 u32Count = 0;
- guint32 u32Idx;
- guint32 u32SubStart;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32ConsID;
+ uint16_t u16ConnVersion;
+ uint32_t u32HResult = 0;
+ uint32_t u32Count = 0;
+ uint32_t u32Idx;
+ uint32_t u32SubStart;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -3577,12 +3578,12 @@ dissect_ICBAAccoMgt_AddConnections_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_RemoveConnections_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ConsID;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ConsID;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -3609,13 +3610,13 @@ dissect_ICBAAccoMgt_RemoveConnections_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_SetActivationState_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint8 u8State;
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ConsID;
+ uint8_t u8State;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ConsID;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -3645,11 +3646,11 @@ dissect_ICBAAccoMgt_SetActivationState_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_GetInfo_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Max;
- guint32 u32CurCnt;
- guint32 u32HResult;
+ uint32_t u32Max;
+ uint32_t u32CurCnt;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -3673,17 +3674,17 @@ dissect_ICBAAccoMgt_GetInfo_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_GetIDs_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32Pointer;
- guint32 u32ArraySize;
- guint32 u32ConsID;
- guint8 u8State;
- guint16 u16Version;
- guint32 u32HResult;
- guint32 u32Idx;
- guint32 u32SubStart;
+ uint32_t u32Count;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize;
+ uint32_t u32ConsID;
+ uint8_t u8State;
+ uint16_t u16Version;
+ uint32_t u32HResult;
+ uint32_t u32Idx;
+ uint32_t u32SubStart;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -3752,14 +3753,14 @@ dissect_ICBAAccoMgt_GetIDs_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt2_GetConsIDs_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32Pointer;
- guint32 u32ArraySize;
- guint32 u32Idx;
- guint32 u32ConsID;
- guint32 u32HResult;
+ uint32_t u32Count;
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
+ uint32_t u32ConsID;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -3809,26 +3810,26 @@ dissect_ICBAAccoMgt2_GetConsIDs_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt2_GetConsConnections_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32TmpCount;
- guint32 u32Pointer;
- guint32 u32HResult;
-
- guint16 u16QoSType;
- guint16 u16QoSValue;
- guint8 u8State;
- guint16 u16Persistence;
- guint32 u32SubStart;
- guint32 u32Idx;
- guint32 u32VariableOffset;
- gchar szProv[1000] = { 0 };
- guint32 u32MaxProvLen = sizeof(szProv);
- gchar szProvItem[1000] = { 0 };
- guint32 u32MaxProvItemLen = sizeof(szProvItem);
- gchar szConsItem[1000] = { 0 };
- guint32 u32MaxConsItemLen = sizeof(szConsItem);
+ uint32_t u32Count;
+ uint32_t u32TmpCount;
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
+
+ uint16_t u16QoSType;
+ uint16_t u16QoSValue;
+ uint8_t u8State;
+ uint16_t u16Persistence;
+ uint32_t u32SubStart;
+ uint32_t u32Idx;
+ uint32_t u32VariableOffset;
+ char szProv[1000] = { 0 };
+ uint32_t u32MaxProvLen = sizeof(szProv);
+ char szProvItem[1000] = { 0 };
+ uint32_t u32MaxProvItemLen = sizeof(szProvItem);
+ char szConsItem[1000] = { 0 };
+ uint32_t u32MaxConsItemLen = sizeof(szConsItem);
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -3918,19 +3919,19 @@ dissect_ICBAAccoMgt2_GetConsConnections_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt2_DiagConsConnections_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32TmpCount;
- guint32 u32Pointer;
- guint32 u32HResult;
- guint8 u8State;
- guint16 u16Persistence;
- guint16 u16ConnVersion;
- guint32 u32SubStart;
- guint32 u32Idx;
- guint32 u32VariableOffset;
- guint32 u32ConnErrorState;
+ uint32_t u32Count;
+ uint32_t u32TmpCount;
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
+ uint8_t u8State;
+ uint16_t u16Persistence;
+ uint16_t u16ConnVersion;
+ uint32_t u32SubStart;
+ uint32_t u32Idx;
+ uint32_t u32VariableOffset;
+ uint32_t u32ConnErrorState;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -3999,12 +4000,12 @@ dissect_ICBAAccoMgt2_DiagConsConnections_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_GetConnections_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32ConsID;
- guint32 u32Count;
- guint32 u32ArraySize;
- guint32 u32Idx;
+ uint32_t u32ConsID;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ uint32_t u32Idx;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -4028,27 +4029,27 @@ dissect_ICBAAccoMgt_GetConnections_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_GetConnections_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32TmpCount;
- guint32 u32Pointer;
- guint32 u32HResult;
-
- guint16 u16QoSType;
- guint16 u16QoSValue;
- guint8 u8State;
- guint16 u16Persistence;
- guint16 u16ConnVersion;
- guint32 u32SubStart;
- guint32 u32Idx;
- guint32 u32VariableOffset;
- gchar szProv[1000] = { 0 };
- guint32 u32MaxProvLen = sizeof(szProv);
- gchar szProvItem[1000] = { 0 };
- guint32 u32MaxProvItemLen = sizeof(szProvItem);
- gchar szConsItem[1000] = { 0 };
- guint32 u32MaxConsItemLen = sizeof(szConsItem);
+ uint32_t u32Count;
+ uint32_t u32TmpCount;
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
+
+ uint16_t u16QoSType;
+ uint16_t u16QoSValue;
+ uint8_t u8State;
+ uint16_t u16Persistence;
+ uint16_t u16ConnVersion;
+ uint32_t u32SubStart;
+ uint32_t u32Idx;
+ uint32_t u32VariableOffset;
+ char szProv[1000] = { 0 };
+ uint32_t u32MaxProvLen = sizeof(szProv);
+ char szProvItem[1000] = { 0 };
+ uint32_t u32MaxProvItemLen = sizeof(szProvItem);
+ char szConsItem[1000] = { 0 };
+ uint32_t u32MaxConsItemLen = sizeof(szConsItem);
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -4140,12 +4141,12 @@ dissect_ICBAAccoMgt_GetConnections_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_ReviseQoS_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16QoSType;
- guint16 u16QoSValue;
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
+ uint16_t u16QoSType;
+ uint16_t u16QoSValue;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -4170,10 +4171,10 @@ dissect_ICBAAccoMgt_ReviseQoS_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_ReviseQoS_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16QoSValue;
- guint32 u32HResult;
+ uint16_t u16QoSValue;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -4194,10 +4195,10 @@ dissect_ICBAAccoMgt_ReviseQoS_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_get_PingFactor_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16PF;
- guint32 u32HResult;
+ uint16_t u16PF;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -4218,9 +4219,9 @@ dissect_ICBAAccoMgt_get_PingFactor_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_put_PingFactor_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16PF;
+ uint16_t u16PF;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -4237,10 +4238,10 @@ dissect_ICBAAccoMgt_put_PingFactor_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_get_CDBCookie_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Cookie;
- guint32 u32HResult;
+ uint32_t u32Cookie;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -4261,11 +4262,11 @@ dissect_ICBAAccoMgt_get_CDBCookie_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_GetDiagnosis_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Request;
- guint32 u32InLength;
- guint32 u32ArraySize;
+ uint32_t u32Request;
+ uint32_t u32InLength;
+ uint32_t u32ArraySize;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -4293,9 +4294,9 @@ dissect_ICBAAccoMgt_GetDiagnosis_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoMgt_GetDiagnosis_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32OutLength;
+ uint32_t u32OutLength;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -4316,15 +4317,15 @@ dissect_ICBAAccoMgt_GetDiagnosis_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoSync_ReadItems_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
- guint32 u32Pointer;
- guint32 u32ArraySize;
- guint32 u32VariableOffset;
- guint32 u32Idx;
+ uint32_t u32Count;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
+ uint32_t u32Pointer;
+ uint32_t u32ArraySize;
+ uint32_t u32VariableOffset;
+ uint32_t u32Idx;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -4359,16 +4360,16 @@ dissect_ICBAAccoSync_ReadItems_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoSync_ReadItems_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Pointer;
- guint16 u16QC;
- guint32 u32ArraySize = 0;
- guint32 u32HResult;
- guint32 u32Idx;
- guint32 u32SubStart;
- guint32 u32VariableOffset;
- guint32 u32Tmp;
+ uint32_t u32Pointer;
+ uint16_t u16QC;
+ uint32_t u32ArraySize = 0;
+ uint32_t u32HResult;
+ uint32_t u32Idx;
+ uint32_t u32SubStart;
+ uint32_t u32VariableOffset;
+ uint32_t u32Tmp;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -4430,16 +4431,16 @@ dissect_ICBAAccoSync_ReadItems_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoSync_WriteItems_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32ArraySize;
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
- guint32 u32Pointer;
- guint32 u32VariableOffset;
- guint32 u32SubStart;
- guint32 u32Idx;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
+ uint32_t u32Pointer;
+ uint32_t u32VariableOffset;
+ uint32_t u32SubStart;
+ uint32_t u32Idx;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -4488,17 +4489,17 @@ dissect_ICBAAccoSync_WriteItems_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAAccoSync_WriteItemsQCD_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32ArraySize;
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
- guint32 u32Pointer;
- guint32 u32VariableOffset;
- guint32 u32SubStart;
- guint32 u32Idx;
- guint16 u16QC;
+ uint32_t u32Count;
+ uint32_t u32ArraySize;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
+ uint32_t u32Pointer;
+ uint32_t u32VariableOffset;
+ uint32_t u32SubStart;
+ uint32_t u32Idx;
+ uint16_t u16QC;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -4553,7 +4554,7 @@ dissect_ICBAAccoSync_WriteItemsQCD_rqst(tvbuff_t *tvb, int offset,
/* sub dissector table of ICBAAccoMgt / ICBAAccoMgt2 interface */
-static dcerpc_sub_dissector ICBAAccoMgt_dissectors[] = {
+static const dcerpc_sub_dissector ICBAAccoMgt_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -4581,7 +4582,7 @@ static dcerpc_sub_dissector ICBAAccoMgt_dissectors[] = {
/* sub dissector table of ICBAAccoCallback interface */
-static dcerpc_sub_dissector ICBAAccoCallback_dissectors[] = {
+static const dcerpc_sub_dissector ICBAAccoCallback_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -4594,7 +4595,7 @@ static dcerpc_sub_dissector ICBAAccoCallback_dissectors[] = {
/* sub dissector table of ICBAAccoServer interface */
-static dcerpc_sub_dissector ICBAAccoServer_dissectors[] = {
+static const dcerpc_sub_dissector ICBAAccoServer_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -4612,7 +4613,7 @@ static dcerpc_sub_dissector ICBAAccoServer_dissectors[] = {
/* sub dissector table of ICBAAccoServerSRT interface (stage 2 only) */
-static dcerpc_sub_dissector ICBAAccoServerSRT_dissectors[] = {
+static const dcerpc_sub_dissector ICBAAccoServerSRT_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -4628,7 +4629,7 @@ static dcerpc_sub_dissector ICBAAccoServerSRT_dissectors[] = {
/* sub dissector table of ICBAAccoSync interface */
-static dcerpc_sub_dissector ICBAAccoSync_dissectors[] = {
+static const dcerpc_sub_dissector ICBAAccoSync_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -4644,9 +4645,9 @@ static dcerpc_sub_dissector ICBAAccoSync_dissectors[] = {
void
proto_register_dcom_cba_acco (void)
{
- static gint *ett3[3];
- static gint *ett4[4];
- static gint *ett5[5];
+ static int *ett3[3];
+ static int *ett4[4];
+ static int *ett5[5];
static hf_register_info hf_cba_acco_array[] = {
diff --git a/plugins/epan/profinet/packet-dcom-cba-acco.h b/plugins/epan/profinet/packet-dcom-cba-acco.h
index 3171124478..0b102856df 100644
--- a/plugins/epan/profinet/packet-dcom-cba-acco.h
+++ b/plugins/epan/profinet/packet-dcom-cba-acco.h
@@ -14,9 +14,9 @@
typedef struct cba_pdev_s {
GList *ldevs;
dcom_object_t *object;
- gint first_packet;
+ int first_packet;
- guint8 ip[4];
+ uint8_t ip[4];
} cba_pdev_t;
typedef struct cba_ldev_s {
@@ -27,7 +27,7 @@ typedef struct cba_ldev_s {
dcom_object_t *ldev_object;
dcom_object_t *acco_object;
cba_pdev_t *parent;
- gint first_packet;
+ int first_packet;
const char *name;
} cba_ldev_t;
diff --git a/plugins/epan/profinet/packet-dcom-cba.c b/plugins/epan/profinet/packet-dcom-cba.c
index 26f5735b49..8a28a10d58 100644
--- a/plugins/epan/profinet/packet-dcom-cba.c
+++ b/plugins/epan/profinet/packet-dcom-cba.c
@@ -72,92 +72,92 @@ static e_guid_t uuid_coclass_CBAPhysicalDevice = { 0xcba00000, 0x6c97, 0x11d1, {
/* CBA interfaces */
static int proto_ICBAPhysicalDevice;
-static gint ett_ICBAPhysicalDevice;
+static int ett_ICBAPhysicalDevice;
static e_guid_t uuid_ICBAPhysicalDevice = { 0xcba00001, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAPhysicalDevice = 0;
+static uint16_t ver_ICBAPhysicalDevice;
static int proto_ICBAPhysicalDevice2;
static e_guid_t uuid_ICBAPhysicalDevice2 = { 0xcba00006, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAPhysicalDevice2 = 0;
+static uint16_t ver_ICBAPhysicalDevice2;
static int proto_ICBABrowse;
-static gint ett_ICBABrowse;
+static int ett_ICBABrowse;
static e_guid_t uuid_ICBABrowse = { 0xcba00002, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBABrowse = 0;
+static uint16_t ver_ICBABrowse;
static int proto_ICBABrowse2;
static e_guid_t uuid_ICBABrowse2 = { 0xcba00007, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBABrowse2 = 0;
+static uint16_t ver_ICBABrowse2;
static int proto_ICBAPhysicalDevicePC;
-static gint ett_ICBAPhysicalDevicePC;
+static int ett_ICBAPhysicalDevicePC;
static e_guid_t uuid_ICBAPhysicalDevicePC = { 0xcba00003, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAPhysicalDevicePC = 0;
+static uint16_t ver_ICBAPhysicalDevicePC;
static int proto_ICBAPhysicalDevicePCEvent;
-static gint ett_ICBAPhysicalDevicePCEvent;
+static int ett_ICBAPhysicalDevicePCEvent;
static e_guid_t uuid_ICBAPhysicalDevicePCEvent = { 0xcba00004, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAPhysicalDevicePCEvent = 0;
+static uint16_t ver_ICBAPhysicalDevicePCEvent;
static int proto_ICBAPersist;
-static gint ett_ICBAPersist;
+static int ett_ICBAPersist;
static e_guid_t uuid_ICBAPersist = { 0xcba00005, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAPersist = 0;
+static uint16_t ver_ICBAPersist;
static int proto_ICBAPersist2;
static e_guid_t uuid_ICBAPersist2 = { 0xcba00008, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAPersist2 = 0;
+static uint16_t ver_ICBAPersist2;
static int proto_ICBALogicalDevice;
-static gint ett_ICBALogicalDevice;
+static int ett_ICBALogicalDevice;
static e_guid_t uuid_ICBALogicalDevice = { 0xcba00011, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBALogicalDevice = 0;
+static uint16_t ver_ICBALogicalDevice;
static int proto_ICBALogicalDevice2;
static e_guid_t uuid_ICBALogicalDevice2 = { 0xcba00017, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBALogicalDevice2 = 0;
+static uint16_t ver_ICBALogicalDevice2;
static int proto_ICBAState;
-static gint ett_ICBAState;
+static int ett_ICBAState;
static e_guid_t uuid_ICBAState = { 0xcba00012, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAState = 0;
+static uint16_t ver_ICBAState;
static int proto_ICBAStateEvent;
-static gint ett_ICBAStateEvent;
+static int ett_ICBAStateEvent;
static e_guid_t uuid_ICBAStateEvent = { 0xcba00013, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAStateEvent = 0;
+static uint16_t ver_ICBAStateEvent;
static int proto_ICBATime;
-static gint ett_ICBATime;
+static int ett_ICBATime;
static e_guid_t uuid_ICBATime = { 0xcba00014, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBATime = 0;
+static uint16_t ver_ICBATime;
static int proto_ICBAGroupError;
-static gint ett_ICBAGroupError;
+static int ett_ICBAGroupError;
static e_guid_t uuid_ICBAGroupError = { 0xcba00015, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAGroupError = 0;
+static uint16_t ver_ICBAGroupError;
static int proto_ICBAGroupErrorEvent;
-static gint ett_ICBAGroupErrorEvent;
+static int ett_ICBAGroupErrorEvent;
static e_guid_t uuid_ICBAGroupErrorEvent = { 0xcba00016, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBAGroupErrorEvent = 0;
+static uint16_t ver_ICBAGroupErrorEvent;
static int proto_ICBARTAuto;
-static gint ett_ICBARTAuto;
+static int ett_ICBARTAuto;
static e_guid_t uuid_ICBARTAuto = { 0xcba00051, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBARTAuto = 0;
+static uint16_t ver_ICBARTAuto;
static int proto_ICBARTAuto2;
static e_guid_t uuid_ICBARTAuto2 = { 0xcba00052, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBARTAuto2 = 0;
+static uint16_t ver_ICBARTAuto2;
static int proto_ICBASystemProperties;
-static gint ett_ICBASystemProperties;
+static int ett_ICBASystemProperties;
static e_guid_t uuid_ICBASystemProperties = { 0xcba00062, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
-static guint16 ver_ICBASystemProperties = 0;
+static uint16_t ver_ICBASystemProperties;
-static gint ett_PBAddress;
+static int ett_PBAddress;
static const value_string cba_state_vals[] = {
@@ -196,10 +196,10 @@ static const value_string dcom_boolean_vals[] = {
static int
dissect_ICBABrowse_get_Count_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Count;
- guint32 u32HResult;
+ uint32_t u32Count;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -224,10 +224,10 @@ dissect_ICBABrowse_get_Count_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBABrowse_BrowseItems_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Offset;
- guint32 u32MaxReturn;
+ uint32_t u32Offset;
+ uint32_t u32MaxReturn;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -246,10 +246,10 @@ dissect_ICBABrowse_BrowseItems_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBABrowse_BrowseItems_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Pointer;
- guint32 u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -284,9 +284,9 @@ dissect_ICBABrowse_BrowseItems_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBABrowse2_get_Count2_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Selector;
+ uint32_t u32Selector;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -304,11 +304,11 @@ dissect_ICBABrowse2_get_Count2_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBABrowse2_BrowseItems2_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Selector;
- guint32 u32Offset;
- guint32 u32MaxReturn;
+ uint32_t u32Selector;
+ uint32_t u32Offset;
+ uint32_t u32MaxReturn;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -329,10 +329,10 @@ dissect_ICBABrowse2_BrowseItems2_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBABrowse2_BrowseItems2_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Pointer;
- guint32 u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -367,10 +367,10 @@ dissect_ICBABrowse2_BrowseItems2_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAPersist2_Save2_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Pointer;
- guint32 u32HResult;
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -400,12 +400,12 @@ dissect_ICBAPersist2_Save2_resp(tvbuff_t *tvb, int offset,
static int
dissect_get_BSTR_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep, int hfindex)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep, int hfindex)
{
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
- guint32 u32Pointer;
- guint32 u32HResult;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -431,10 +431,10 @@ dissect_get_BSTR_resp(tvbuff_t *tvb, int offset,
static int
dissect_get_ProductionDate_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- gdouble r8Date;
+ uint32_t u32HResult;
+ double r8Date;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -455,10 +455,10 @@ dissect_get_ProductionDate_resp(tvbuff_t *tvb, int offset,
static int
dissect_get_SerialNo_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- guint32 u32Pointer;
+ uint32_t u32HResult;
+ uint32_t u32Pointer;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -482,10 +482,10 @@ dissect_get_SerialNo_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBATime_get_Time_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- gdouble r8Date;
+ uint32_t u32HResult;
+ double r8Date;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -506,9 +506,9 @@ dissect_ICBATime_get_Time_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBATime_put_Time_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gdouble r8Date;
+ double r8Date;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -522,7 +522,7 @@ dissect_ICBATime_put_Time_rqst(tvbuff_t *tvb, int offset,
static int
dissect_get_Producer_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
return dissect_get_BSTR_resp(tvb, offset, pinfo, tree, di, drep, hf_cba_producer);
@@ -531,7 +531,7 @@ dissect_get_Producer_resp(tvbuff_t *tvb, int offset,
static int
dissect_get_Product_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
return dissect_get_BSTR_resp(tvb, offset, pinfo, tree, di, drep, hf_cba_product);
@@ -540,12 +540,12 @@ dissect_get_Product_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAPhysicalDevice_get_LogicalDevice_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Pointer;
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
- gchar *call;
+ uint32_t u32Pointer;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
+ char *call;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -572,10 +572,10 @@ dissect_ICBAPhysicalDevice_get_LogicalDevice_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAPhysicalDevice_get_LogicalDevice_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
- gchar *ldev_name = (gchar *)di->call_data->private_data;
+ uint32_t u32HResult;
+ char *ldev_name = (char *)di->call_data->private_data;
dcom_interface_t *pdev_interf;
dcom_interface_t *ldev_interf;
cba_pdev_t *pdev;
@@ -612,11 +612,11 @@ dissect_ICBAPhysicalDevice_get_LogicalDevice_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAPhysicalDevice2_Type_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16MultiApp;
- guint16 u16PROFInetDCOMStack;
- guint32 u32HResult;
+ uint16_t u16MultiApp;
+ uint16_t u16PROFInetDCOMStack;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -641,13 +641,13 @@ dissect_ICBAPhysicalDevice2_Type_resp(tvbuff_t *tvb, int offset,
static int
dissect_PROFInetRevision_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16Major;
- guint16 u16Minor;
- guint16 u16ServicePack;
- guint16 u16Build;
- guint32 u32HResult;
+ uint16_t u16Major;
+ uint16_t u16Minor;
+ uint16_t u16ServicePack;
+ uint16_t u16Build;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -674,10 +674,10 @@ dissect_PROFInetRevision_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAPhysicalDevice2_get_PDevStamp_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32PDevStamp;
- guint32 u32HResult;
+ uint32_t u32PDevStamp;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -698,11 +698,11 @@ dissect_ICBAPhysicalDevice2_get_PDevStamp_resp(tvbuff_t *tvb, int offset,
static int
dissect_Revision_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16Major;
- guint16 u16Minor;
- guint32 u32HResult;
+ uint16_t u16Major;
+ uint16_t u16Minor;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -726,12 +726,12 @@ dissect_Revision_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBALogicalDevice_get_Name_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
- guint32 u32Pointer;
- guint32 u32HResult;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
+ uint32_t u32Pointer;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -757,7 +757,7 @@ dissect_ICBALogicalDevice_get_Name_resp(tvbuff_t *tvb, int offset,
static int
dissect_RTAuto_get_Name_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
return dissect_get_BSTR_resp(tvb, offset, pinfo, tree, di, drep, hf_cba_name);
@@ -766,9 +766,9 @@ dissect_RTAuto_get_Name_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBALogicalDevice_get_ACCO_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
+ uint32_t u32HResult;
dcom_interface_t *acco_interf;
cba_ldev_t *ldev;
@@ -798,9 +798,9 @@ dissect_ICBALogicalDevice_get_ACCO_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBALogicalDevice_get_RTAuto_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -818,11 +818,11 @@ dissect_ICBALogicalDevice_get_RTAuto_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBALogicalDevice_Get_RTAuto_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
- guint32 u32Pointer;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
+ uint32_t u32Pointer;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -845,14 +845,14 @@ dissect_ICBALogicalDevice_Get_RTAuto_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ComponentInfo_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- gchar szStr[1000];
- guint32 u32MaxStr = sizeof(szStr);
- gchar szStr2[1000];
- guint32 u32MaxStr2 = sizeof(szStr2);
- guint32 u32HResult;
- guint32 u32Pointer;
+ char szStr[1000];
+ uint32_t u32MaxStr = sizeof(szStr);
+ char szStr2[1000];
+ uint32_t u32MaxStr2 = sizeof(szStr2);
+ uint32_t u32HResult;
+ uint32_t u32Pointer;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -886,12 +886,12 @@ dissect_ComponentInfo_resp(tvbuff_t *tvb, int offset,
static void
-dissect_PBAddressInfo(tvbuff_t *tvb, gint offset, packet_info *pinfo,
- proto_tree *tree, dcerpc_info *di, guint8 *drep,
- guint32 u32VarType _U_, guint32 u32ArraySize)
+dissect_PBAddressInfo(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ proto_tree *tree, dcerpc_info *di, uint8_t *drep,
+ uint32_t u32VarType _U_, uint32_t u32ArraySize)
{
- guint8 u8ID;
- guint8 u8Addr;
+ uint8_t u8ID;
+ uint8_t u8Addr;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -915,9 +915,9 @@ dissect_PBAddressInfo(tvbuff_t *tvb, gint offset, packet_info *pinfo,
static int
dissect_PBAddressInfo_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32HResult;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -934,7 +934,7 @@ dissect_PBAddressInfo_resp(tvbuff_t *tvb, int offset,
static int
dissect_Advise_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
@@ -948,10 +948,10 @@ dissect_Advise_rqst(tvbuff_t *tvb, int offset,
static int
dissect_Advise_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Cookie;
- guint32 u32HResult;
+ uint32_t u32Cookie;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -972,9 +972,9 @@ dissect_Advise_resp(tvbuff_t *tvb, int offset,
static int
dissect_Unadvise_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Cookie;
+ uint32_t u32Cookie;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -991,10 +991,10 @@ dissect_Unadvise_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAState_get_State_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16State;
- guint32 u32HResult;
+ uint16_t u16State;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -1015,10 +1015,10 @@ dissect_ICBAState_get_State_resp(tvbuff_t *tvb, int offset,
static int
dissect_ICBAStateEvent_OnStateChanged_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16NewState;
- guint16 u16OldState;
+ uint16_t u16NewState;
+ uint16_t u16OldState;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -1039,10 +1039,10 @@ dissect_ICBAStateEvent_OnStateChanged_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAGroupError_OnGroupErrorChanged_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16NewGroupError;
- guint16 u16OldGroupError;
+ uint16_t u16NewGroupError;
+ uint16_t u16OldGroupError;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -1063,10 +1063,10 @@ dissect_ICBAGroupError_OnGroupErrorChanged_rqst(tvbuff_t *tvb, int offset,
static int
dissect_ICBAPhysicalDevicePCEvent_OnLogicalDeviceAdded_rqst(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint32 u32Cookie;
- guint32 u32HResult;
+ uint32_t u32Cookie;
+ uint32_t u32HResult;
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
@@ -1089,11 +1089,11 @@ dissect_ICBAPhysicalDevicePCEvent_OnLogicalDeviceAdded_rqst(tvbuff_t *tvb, int o
static int
dissect_ICBAGroupError_GroupError_resp(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
{
- guint16 u16GroupError;
- guint32 u32Cookie;
- guint32 u32HResult;
+ uint16_t u16GroupError;
+ uint32_t u32Cookie;
+ uint32_t u32HResult;
offset = dissect_dcom_that(tvb, offset, pinfo, tree, di, drep);
@@ -1117,7 +1117,7 @@ dissect_ICBAGroupError_GroupError_resp(tvbuff_t *tvb, int offset,
/* sub dissector table of ICBAPhysicalDevice / ICBAPhysicalDevice2 interface */
-static dcerpc_sub_dissector ICBAPhysicalDevice_dissectors[] = {
+static const dcerpc_sub_dissector ICBAPhysicalDevice_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1142,7 +1142,7 @@ static dcerpc_sub_dissector ICBAPhysicalDevice_dissectors[] = {
/* sub dissector table of ICBABrowse / ICBABrowse2 interface */
-static dcerpc_sub_dissector ICBABrowse_dissectors[] = {
+static const dcerpc_sub_dissector ICBABrowse_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1162,7 +1162,7 @@ static dcerpc_sub_dissector ICBABrowse_dissectors[] = {
/* sub dissector table of ICBAPersist / ICBAPersist2 interface */
-static dcerpc_sub_dissector ICBAPersist_dissectors[] = {
+static const dcerpc_sub_dissector ICBAPersist_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1181,7 +1181,7 @@ static dcerpc_sub_dissector ICBAPersist_dissectors[] = {
/* sub dissector table of ICBAPhysicalDevicePC interface */
/* (local COM interface, not to be called over network) */
-static dcerpc_sub_dissector ICBAPhysicalDevicePC_dissectors[] = {
+static const dcerpc_sub_dissector ICBAPhysicalDevicePC_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1199,7 +1199,7 @@ static dcerpc_sub_dissector ICBAPhysicalDevicePC_dissectors[] = {
/* sub dissector table of ICBAPhysicalDevicePCEvent interface */
-static dcerpc_sub_dissector ICBAPhysicalDevicePCEvent_dissectors[] = {
+static const dcerpc_sub_dissector ICBAPhysicalDevicePCEvent_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1211,7 +1211,7 @@ static dcerpc_sub_dissector ICBAPhysicalDevicePCEvent_dissectors[] = {
/* sub dissector table of ICBALogicalDevice / ICBALogicalDevice2 interface */
-static dcerpc_sub_dissector ICBALogicalDevice_dissectors[] = {
+static const dcerpc_sub_dissector ICBALogicalDevice_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1238,7 +1238,7 @@ static dcerpc_sub_dissector ICBALogicalDevice_dissectors[] = {
/* sub dissector table of ICBAState interface */
-static dcerpc_sub_dissector ICBAState_dissectors[] = {
+static const dcerpc_sub_dissector ICBAState_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1259,7 +1259,7 @@ static dcerpc_sub_dissector ICBAState_dissectors[] = {
/* sub dissector table of ICBAStateEvent interface */
-static dcerpc_sub_dissector ICBAStateEvent_dissectors[] = {
+static const dcerpc_sub_dissector ICBAStateEvent_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1270,7 +1270,7 @@ static dcerpc_sub_dissector ICBAStateEvent_dissectors[] = {
/* sub dissector table of ICBATime interface */
-static dcerpc_sub_dissector ICBATime_dissectors[] = {
+static const dcerpc_sub_dissector ICBATime_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1287,7 +1287,7 @@ static dcerpc_sub_dissector ICBATime_dissectors[] = {
/* sub dissector table of ICBAGroupError interface */
-static dcerpc_sub_dissector ICBAGroupError_dissectors[] = {
+static const dcerpc_sub_dissector ICBAGroupError_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1305,7 +1305,7 @@ static dcerpc_sub_dissector ICBAGroupError_dissectors[] = {
/* sub dissector table of ICBAGroupErrorEvent interface */
-static dcerpc_sub_dissector ICBAGroupErrorEvent_dissectors[] = {
+static const dcerpc_sub_dissector ICBAGroupErrorEvent_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1316,7 +1316,7 @@ static dcerpc_sub_dissector ICBAGroupErrorEvent_dissectors[] = {
/* sub dissector table of ICBARTAuto interface */
-static dcerpc_sub_dissector ICBARTAuto_dissectors[] = {
+static const dcerpc_sub_dissector ICBARTAuto_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1338,7 +1338,7 @@ static dcerpc_sub_dissector ICBARTAuto_dissectors[] = {
/* the interface ICBASystemProperties will NOT be seen on the ethernet */
/* sub dissector table of ICBASystemProperties interface (stage 2 only) */
/* (usually not called over network, no dissecting needed) */
-static dcerpc_sub_dissector ICBASystemProperties_dissectors[] = {
+static const dcerpc_sub_dissector ICBASystemProperties_dissectors[] = {
{ 0, "QueryInterface", NULL, NULL },
{ 1, "AddRef", NULL, NULL },
{ 2, "Release", NULL, NULL },
@@ -1562,7 +1562,7 @@ proto_register_dcom_cba (void)
};
- static gint *ett_cba[] = {
+ static int *ett_cba[] = {
&ett_ICBAPhysicalDevice,
&ett_ICBABrowse,
&ett_ICBAPhysicalDevicePC,
diff --git a/plugins/epan/profinet/packet-pn-dcp.c b/plugins/epan/profinet/packet-pn-dcp.c
index 6de2b19c23..c946b1ead4 100644
--- a/plugins/epan/profinet/packet-pn-dcp.c
+++ b/plugins/epan/profinet/packet-pn-dcp.c
@@ -29,16 +29,15 @@
#include "config.h"
-#include <string.h>
-
#include <glib.h>
#include <epan/packet.h>
-#include <epan/exceptions.h>
#include <epan/to_str.h>
#include <epan/wmem_scopes.h>
#include <epan/expert.h>
#include <epan/conversation.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "packet-pn.h"
@@ -126,10 +125,10 @@ static int hf_pn_dcp_device_id_high;
static int hf_pn_dcp_device_id_low;
static int hf_pn_dcp_instance_id_high;
static int hf_pn_dcp_instance_id_low;
-static gint ett_pn_dcp;
-static gint ett_pn_dcp_block;
+static int ett_pn_dcp;
+static int ett_pn_dcp_block;
-static gint ett_pn_dcp_rsi_properties_value;
+static int ett_pn_dcp_rsi_properties_value;
static expert_field ei_pn_dcp_block_parse_error;
static expert_field ei_pn_dcp_block_error_unknown;
@@ -405,10 +404,10 @@ static const value_string pn_dcp_suboption_manuf[] = {
/* dissect the option field */
static int
dissect_PNDCP_Option(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, proto_item *block_item, int hfindex, gboolean append_col)
+ proto_tree *tree, proto_item *block_item, int hfindex, bool append_col)
{
- guint8 option;
- guint8 suboption;
+ uint8_t option;
+ uint8_t suboption;
const value_string *val_str;
offset = dissect_pn_uint8 (tvb, offset, pinfo, tree, hfindex, &option);
@@ -462,16 +461,16 @@ dissect_PNDCP_Option(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
dissect_PNDCP_Suboption_IP(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *block_item, proto_item *dcp_item,
- guint8 service_id, gboolean is_response)
+ uint8_t service_id, bool is_response)
{
- guint8 suboption;
- guint16 block_length;
- guint16 block_info;
- guint16 block_qualifier;
- gboolean have_block_info = FALSE;
- gboolean have_block_qualifier = FALSE;
- guint8 mac[6];
- guint32 ip;
+ uint8_t suboption;
+ uint16_t block_length;
+ uint16_t block_info;
+ uint16_t block_qualifier;
+ bool have_block_info = false;
+ bool have_block_qualifier = false;
+ uint8_t mac[6];
+ uint32_t ip;
proto_item *item = NULL;
address addr;
@@ -492,14 +491,14 @@ dissect_PNDCP_Suboption_IP(tvbuff_t *tvb, int offset, packet_info *pinfo,
((service_id == PNDCP_SERVICE_ID_HELLO) && !is_response) ||
((service_id == PNDCP_SERVICE_ID_GET) && is_response)) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_info, &block_info);
- have_block_info = TRUE;
+ have_block_info = true;
block_length -= 2;
}
/* BlockQualifier? */
if ((service_id == PNDCP_SERVICE_ID_SET) && !is_response) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_qualifier, &block_qualifier);
- have_block_qualifier = TRUE;
+ have_block_qualifier = true;
block_length -= 2;
}
@@ -571,14 +570,14 @@ dissect_PNDCP_Suboption_IP(tvbuff_t *tvb, int offset, packet_info *pinfo,
((service_id == PNDCP_SERVICE_ID_HELLO) && !is_response) ||
((service_id == PNDCP_SERVICE_ID_GET) && is_response)) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_info, &block_info);
- have_block_info = TRUE;
+ have_block_info = true;
block_length -= 2;
}
/* BlockQualifier? */
if ((service_id == PNDCP_SERVICE_ID_SET) && !is_response) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_qualifier, &block_qualifier);
- have_block_qualifier = TRUE;
+ have_block_qualifier = true;
block_length -= 2;
}
@@ -639,25 +638,25 @@ dissect_PNDCP_Suboption_IP(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *block_item, proto_item *dcp_item,
- guint8 service_id, gboolean is_response)
+ uint8_t service_id, bool is_response)
{
- guint8 suboption;
- guint16 block_length;
- gchar *info_str;
- guint8 device_role;
- guint16 vendor_id;
- guint16 device_id;
+ uint8_t suboption;
+ uint16_t block_length;
+ char *info_str;
+ uint8_t device_role;
+ uint16_t vendor_id;
+ uint16_t device_id;
char *typeofstation;
char *nameofstation;
char *aliasname;
- guint16 block_info = 0;
- guint16 block_qualifier = 0;
- gboolean have_block_info = FALSE;
- gboolean have_block_qualifier = FALSE;
- guint8 device_instance_high;
- guint8 device_instance_low;
- guint16 oem_vendor_id;
- guint16 oem_device_id;
+ uint16_t block_info = 0;
+ uint16_t block_qualifier = 0;
+ bool have_block_info = false;
+ bool have_block_qualifier = false;
+ uint8_t device_instance_high;
+ uint8_t device_instance_low;
+ uint16_t oem_vendor_id;
+ uint16_t oem_device_id;
proto_item *sub_item;
proto_tree *sub_tree;
conversation_t *conversation;
@@ -673,14 +672,14 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
((service_id == PNDCP_SERVICE_ID_HELLO) && !is_response) ||
((service_id == PNDCP_SERVICE_ID_GET) && is_response)) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_info, &block_info);
- have_block_info = TRUE;
+ have_block_info = true;
block_length -= 2;
}
/* BlockQualifier? */
if ( (service_id == PNDCP_SERVICE_ID_SET) && !is_response) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_qualifier, &block_qualifier);
- have_block_qualifier = TRUE;
+ have_block_qualifier = true;
block_length -= 2;
}
@@ -713,7 +712,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(block_item, ", DeviceVendorValue: \"%s\"", typeofstation);
- if (PINFO_FD_VISITED(pinfo) == FALSE) {
+ if (PINFO_FD_VISITED(pinfo) == false) {
/* Create a conversation between the MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -770,7 +769,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(block_item, ", \"%s\"", nameofstation);
- if (PINFO_FD_VISITED(pinfo) == FALSE) {
+ if (PINFO_FD_VISITED(pinfo) == false) {
/* Create a conversation between the MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -801,7 +800,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_vendor_id, &vendor_id);
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_device_id, &device_id);
- if (PINFO_FD_VISITED(pinfo) == FALSE) {
+ if (PINFO_FD_VISITED(pinfo) == false) {
/* Create a conversation between the MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -874,7 +873,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_item_append_text(block_item, ", %u options", block_length/2);
for( ; block_length != 0; block_length -= 2) {
offset = dissect_PNDCP_Option(tvb, offset, pinfo, tree, NULL /*block_item*/, hf_pn_dcp_option,
- FALSE /* append_col */);
+ false /* append_col */);
}
break;
case PNDCP_SUBOPTION_DEVICE_ALIAS_NAME:
@@ -968,7 +967,7 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = offset + 2;
- if (pinfo->fd->visited == FALSE) {
+ if (pinfo->fd->visited == false) {
/* Create a conversation between the MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -1005,26 +1004,26 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
dissect_PNDCP_Suboption_TSN(tvbuff_t* tvb, int offset, packet_info* pinfo,
proto_tree* tree, proto_item* block_item, proto_item* dcp_item,
- guint8 service_id, gboolean is_response)
+ uint8_t service_id, bool is_response)
{
- guint8 suboption;
- guint16 block_length;
+ uint8_t suboption;
+ uint16_t block_length;
char *domain_name;
- guint16 nme_prio;
+ uint16_t nme_prio;
e_guid_t tsn_domain_uuid;
e_guid_t nme_parameter_uuid;
e_guid_t nme_name_uuid;
- guint16 vendor_id;
- guint16 device_id;
- guint16 block_info = 0;
- guint16 block_qualifier = 0;
- gboolean have_block_info = FALSE;
- gboolean have_block_qualifier = FALSE;
- guint8 instance_id_high;
- guint8 instance_id_low;
+ uint16_t vendor_id;
+ uint16_t device_id;
+ uint16_t block_info = 0;
+ uint16_t block_qualifier = 0;
+ bool have_block_info = false;
+ bool have_block_qualifier = false;
+ uint8_t instance_id_high;
+ uint8_t instance_id_low;
conversation_t* conversation;
stationInfo* station_info;
- gboolean is_zeros = TRUE;
+ bool is_zeros = true;
/* SuboptionTSN... */
offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_tsn, &suboption);
@@ -1037,14 +1036,14 @@ dissect_PNDCP_Suboption_TSN(tvbuff_t* tvb, int offset, packet_info* pinfo,
((service_id == PNDCP_SERVICE_ID_HELLO) && !is_response) ||
((service_id == PNDCP_SERVICE_ID_GET) && is_response)) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_info, &block_info);
- have_block_info = TRUE;
+ have_block_info = true;
block_length -= 2;
}
/* BlockQualifier? */
if ((service_id == PNDCP_SERVICE_ID_SET) && !is_response) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_qualifier, &block_qualifier);
- have_block_qualifier = TRUE;
+ have_block_qualifier = true;
block_length -= 2;
}
@@ -1066,13 +1065,13 @@ dissect_PNDCP_Suboption_TSN(tvbuff_t* tvb, int offset, packet_info* pinfo,
pn_append_info(pinfo, dcp_item, wmem_strdup_printf(pinfo->pool, ", DomainName:\"%s\"", domain_name));
proto_item_append_text(block_item, ", \"%s\"", domain_name);
offset += (block_length-16);
- is_zeros = TRUE;
+ is_zeros = true;
for (int i = 0; i < 8; i++)
{
if (tsn_domain_uuid.data4[i] != 0)
{
- is_zeros = FALSE;
+ is_zeros = false;
break;
}
}
@@ -1131,13 +1130,13 @@ dissect_PNDCP_Suboption_TSN(tvbuff_t* tvb, int offset, packet_info* pinfo,
if (have_block_info)
proto_item_append_text(block_item, ", BlockInfo: %s", rval_to_str_const(block_info, pn_dcp_block_info, "Unknown"));
- is_zeros = TRUE;
+ is_zeros = true;
for (int i = 0; i < 8; i++)
{
if (nme_parameter_uuid.data4[i] != 0)
{
- is_zeros = FALSE;
+ is_zeros = false;
break;
}
}
@@ -1164,12 +1163,12 @@ dissect_PNDCP_Suboption_TSN(tvbuff_t* tvb, int offset, packet_info* pinfo,
offset = dissect_pn_uuid(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_tsn_nme_agent, &nme_name_uuid);
proto_item_append_text(block_item, ", BlockInfo: %s", rval_to_str_const(block_info, pn_dcp_block_info, "Unknown"));
- is_zeros = TRUE;
+ is_zeros = true;
for (int i = 0; i < 8; i++)
{
if (nme_name_uuid.data4[i] != 0)
{
- is_zeros = FALSE;
+ is_zeros = false;
break;
}
}
@@ -1203,7 +1202,7 @@ dissect_PNDCP_Suboption_TSN(tvbuff_t* tvb, int offset, packet_info* pinfo,
offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_instance_id_high, &instance_id_high);
offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_instance_id_low, &instance_id_low);
- if (pinfo->fd->visited == FALSE) {
+ if (pinfo->fd->visited == false) {
/* Create a conversation between the MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0);
if (conversation == NULL) {
@@ -1239,18 +1238,18 @@ dissect_PNDCP_Suboption_TSN(tvbuff_t* tvb, int offset, packet_info* pinfo,
static int
dissect_PNDCP_Suboption_DHCP(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *block_item, proto_item *dcp_item,
- guint8 service_id _U_, gboolean is_response _U_)
+ uint8_t service_id _U_, bool is_response _U_)
{
- guint8 suboption;
- guint8 option_code = 0;
- guint16 block_length;
- guint16 block_info = 0;
- guint16 block_qualifier = 0;
- guint8 dhcpparameterlength = 0;
- guint8 dhcpparameterdata = 0;
- guint8 dhcpcontrolparameterdata = 0;
- gboolean have_block_info = FALSE;
- gboolean have_block_qualifier = FALSE;
+ uint8_t suboption;
+ uint8_t option_code = 0;
+ uint16_t block_length;
+ uint16_t block_info = 0;
+ uint16_t block_qualifier = 0;
+ uint8_t dhcpparameterlength = 0;
+ uint8_t dhcpparameterdata = 0;
+ uint8_t dhcpcontrolparameterdata = 0;
+ bool have_block_info = false;
+ bool have_block_qualifier = false;
int expected_offset;
@@ -1264,13 +1263,13 @@ dissect_PNDCP_Suboption_DHCP(tvbuff_t *tvb, int offset, packet_info *pinfo,
((service_id == PNDCP_SERVICE_ID_HELLO) && !is_response) ||
((service_id == PNDCP_SERVICE_ID_GET) && is_response)) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_info, &block_info);
- have_block_info=TRUE;
+ have_block_info=true;
block_length -= 2;
}
/* BlockQualifier? */
if ( (service_id == PNDCP_SERVICE_ID_SET) && !is_response) {
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_dcp_block_qualifier, &block_qualifier);
- have_block_qualifier=TRUE;
+ have_block_qualifier=true;
block_length -= 2;
}
@@ -1347,15 +1346,15 @@ dissect_PNDCP_Suboption_DHCP(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
dissect_PNDCP_Suboption_Control(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *block_item, proto_item *dcp_item,
- guint8 service_id _U_, gboolean is_response _U_)
+ uint8_t service_id _U_, bool is_response _U_)
{
- guint8 suboption;
- guint16 block_length;
- guint16 block_qualifier;
- guint16 BlockQualifier;
- guint16 u16SignalValue;
- gchar *info_str;
- guint8 block_error;
+ uint8_t suboption;
+ uint16_t block_length;
+ uint16_t block_qualifier;
+ uint16_t BlockQualifier;
+ uint16_t u16SignalValue;
+ char *info_str;
+ uint8_t block_error;
proto_item *item = NULL;
@@ -1389,8 +1388,8 @@ dissect_PNDCP_Suboption_Control(tvbuff_t *tvb, int offset, packet_info *pinfo,
case PNDCP_SUBOPTION_CONTROL_RESPONSE:
proto_item_append_text(block_item, "Control/Response");
offset = dissect_PNDCP_Option(tvb, offset, pinfo, tree, block_item, hf_pn_dcp_suboption_control_option,
- FALSE /* append_col */);
- block_error = tvb_get_guint8(tvb, offset);
+ false /* append_col */);
+ block_error = tvb_get_uint8(tvb, offset);
if (tree) {
item = proto_tree_add_uint(tree, hf_pn_dcp_block_error, tvb, offset, 1, block_error);
}
@@ -1435,17 +1434,17 @@ dissect_PNDCP_Suboption_Control(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* dissect the "deviceinitiatve" suboption */
+/* dissect the "deviceinitiative" suboption */
static int
dissect_PNDCP_Suboption_DeviceInitiative(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *block_item, proto_item *dcp_item,
- guint8 service_id, gboolean is_response)
+ uint8_t service_id, bool is_response)
{
- guint8 suboption;
- guint16 block_length;
- guint16 block_info;
- guint16 block_qualifier;
- guint16 value;
+ uint8_t suboption;
+ uint16_t block_length;
+ uint16_t block_info;
+ uint16_t block_qualifier;
+ uint16_t value;
offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_deviceinitiative, &suboption);
@@ -1483,10 +1482,10 @@ dissect_PNDCP_Suboption_DeviceInitiative(tvbuff_t *tvb, int offset, packet_info
static int
dissect_PNDCP_Suboption_All(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *block_item, proto_item *dcp_item,
- guint8 service_id _U_, gboolean is_response _U_)
+ uint8_t service_id _U_, bool is_response _U_)
{
- guint8 suboption;
- guint16 block_length;
+ uint8_t suboption;
+ uint16_t block_length;
offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_all, &suboption);
@@ -1509,9 +1508,9 @@ dissect_PNDCP_Suboption_All(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
dissect_PNDCP_Suboption_Manuf(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *block_item, proto_item *dcp_item,
- guint8 service_id _U_, gboolean is_response _U_)
+ uint8_t service_id _U_, bool is_response _U_)
{
- guint16 block_length;
+ uint16_t block_length;
offset = dissect_pn_uint8( tvb, offset, pinfo, tree, hf_pn_dcp_suboption_manuf, NULL);
@@ -1531,9 +1530,9 @@ dissect_PNDCP_Suboption_Manuf(tvbuff_t *tvb, int offset, packet_info *pinfo,
static int
dissect_PNDCP_Block(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, proto_item *dcp_item,
- guint8 service_id, gboolean is_response)
+ uint8_t service_id, bool is_response)
{
- guint8 option;
+ uint8_t option;
proto_item *block_item;
proto_tree *block_tree;
int ori_offset = offset;
@@ -1601,14 +1600,14 @@ static void
dissect_PNDCP_PDU(tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree, proto_item *dcp_item)
{
- guint8 service_id;
- guint8 service_type;
- guint32 xid;
- guint16 response_delay;
- guint16 data_length;
+ uint8_t service_id;
+ uint8_t service_type;
+ uint32_t xid;
+ uint16_t response_delay;
+ uint16_t data_length;
int offset = 0;
- gchar *xid_str;
- gboolean is_response = FALSE;
+ char *xid_str;
+ bool is_response = false;
offset = dissect_pn_uint8 (tvb, offset, pinfo, tree, hf_pn_dcp_service_id, &service_id);
@@ -1648,11 +1647,11 @@ dissect_PNDCP_PDU(tvbuff_t *tvb,
break;
case PNDCP_SERVICE_TYPE_RESPONSE_SUCCESS:
pn_append_info(pinfo, dcp_item, " Ok ");
- is_response = TRUE;
+ is_response = true;
break;
case PNDCP_SERVICE_TYPE_RESPONSE_UNSUPPORTED:
pn_append_info(pinfo, dcp_item, " unsupported");
- is_response = TRUE;
+ is_response = true;
break;
default:
dissect_pn_undecoded(tvb, offset, pinfo, tree, tvb_captured_length_remaining(tvb, offset));
@@ -1669,7 +1668,7 @@ dissect_PNDCP_PDU(tvbuff_t *tvb,
if (service_id == PNDCP_SERVICE_ID_GET && service_type == PNDCP_SERVICE_TYPE_REQUEST) {
/* Selectors */
offset = dissect_PNDCP_Option(tvb, offset, pinfo,
- tree, dcp_item, hf_pn_dcp_option, TRUE /* append_col */);
+ tree, dcp_item, hf_pn_dcp_option, true /* append_col */);
} else {
offset = dissect_PNDCP_Block(tvb, offset, pinfo, tree, dcp_item, service_id, is_response);
}
@@ -1685,12 +1684,12 @@ dissect_PNDCP_PDU(tvbuff_t *tvb,
/* possibly dissect a PN-RT packet (frame ID must be in the appropriate range) */
-static gboolean
+static bool
dissect_PNDCP_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *data)
{
/* the tvb will NOT contain the frame_id here, so get it from dissection data! */
- guint16 u16FrameID = GPOINTER_TO_UINT(data);
+ uint16_t u16FrameID = GPOINTER_TO_UINT(data);
proto_item *item;
proto_tree *dcp_tree;
@@ -1698,7 +1697,7 @@ dissect_PNDCP_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* frame id must be in valid range (acyclic Real-Time, DCP) */
if (u16FrameID < FRAME_ID_DCP_HELLO || u16FrameID > FRAME_ID_DCP_IDENT_RES) {
/* we are not interested in this packet */
- return FALSE;
+ return false;
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-DCP");
@@ -1712,7 +1711,7 @@ dissect_PNDCP_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* dissect this PDU */
dissect_PNDCP_PDU(tvb, pinfo, dcp_tree, item);
- return TRUE;
+ return true;
}
@@ -2054,7 +2053,7 @@ proto_register_pn_dcp (void)
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_dcp,
&ett_pn_dcp_block,
&ett_pn_dcp_rsi_properties_value
diff --git a/plugins/epan/profinet/packet-pn-mrp.c b/plugins/epan/profinet/packet-pn-mrp.c
index 77da40a0c5..e522de2eef 100644
--- a/plugins/epan/profinet/packet-pn-mrp.c
+++ b/plugins/epan/profinet/packet-pn-mrp.c
@@ -48,9 +48,9 @@ static int hf_pn_mrp_other_mrm_prio;
static int hf_pn_mrp_other_mrm_sa;
static int hf_pn_mrp_manufacturer_data;
-static gint ett_pn_mrp;
-static gint ett_pn_mrp_type;
-static gint ett_pn_sub_tlv;
+static int ett_pn_mrp;
+static int ett_pn_mrp_type;
+static int ett_pn_sub_tlv;
static const value_string pn_mrp_block_type_vals[] = {
{ 0x00, "MRP_End" },
@@ -69,15 +69,6 @@ static const value_string pn_mrp_block_type_vals[] = {
{ 0, NULL },
};
-static const value_string pn_mrp_oui_vals[] = {
- { OUI_PROFINET, "PROFINET" },
- { OUI_SIEMENS, "SIEMENS" },
-
- { 0, NULL }
-};
-
-
-
static const value_string pn_mrp_port_role_vals[] = {
{ 0x0000, "Primary ring port" },
{ 0x0001, "Secondary ring port"},
@@ -143,7 +134,7 @@ static int
dissect_PNMRP_Common(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item _U_)
{
- guint16 sequence_id;
+ uint16_t sequence_id;
e_guid_t uuid;
@@ -161,10 +152,10 @@ static int
dissect_PNMRP_Link(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item _U_)
{
- guint8 mac[6];
- guint16 port_role;
- guint16 interval;
- guint16 blocked;
+ uint8_t mac[6];
+ uint16_t port_role;
+ uint16_t interval;
+ uint16_t blocked;
proto_item *sub_item;
/* MRP_SA */
@@ -202,7 +193,7 @@ dissect_PNMRP_Link(tvbuff_t *tvb, int offset,
return offset;
}
-static const char * mrp_Prio2msg(guint16 prio)
+static const char * mrp_Prio2msg(uint16_t prio)
{
if (prio == 0x0000)
@@ -229,12 +220,12 @@ static int
dissect_PNMRP_Test(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item _U_)
{
- guint16 prio;
- guint8 mac[6];
- guint16 port_role;
- guint16 ring_state;
- guint16 transition;
- guint32 time_stamp;
+ uint16_t prio;
+ uint8_t mac[6];
+ uint16_t port_role;
+ uint16_t ring_state;
+ uint16_t transition;
+ uint32_t time_stamp;
proto_item *sub_item;
@@ -270,9 +261,9 @@ static int
dissect_PNMRP_TopologyChange(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item _U_)
{
- guint16 prio;
- guint8 mac[6];
- guint16 interval;
+ uint16_t prio;
+ uint8_t mac[6];
+ uint16_t interval;
proto_item *sub_item;
@@ -302,9 +293,9 @@ dissect_PNMRP_TopologyChange(tvbuff_t *tvb, int offset,
static int
dissect_PNMRP_Ed1ManufacturerData(tvbuff_t *tvb, int offset,
-packet_info *pinfo, proto_tree *tree, guint8 *pLength)
+packet_info *pinfo, proto_tree *tree, uint8_t *pLength)
{
- guint16 u16MrpEd1ManufacturerData;
+ uint16_t u16MrpEd1ManufacturerData;
offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_ed1_manufacturer_data,
&u16MrpEd1ManufacturerData);
*pLength -= 2;
@@ -315,14 +306,14 @@ static int
dissect_PNMRP_SubOption2(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree)
{
- guint8 u8SubType;
- guint8 u8Sublength;
+ uint8_t u8SubType;
+ uint8_t u8Sublength;
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16Prio;
- guint16 u16OtherPrio;
- guint8 mac[6];
- guint8 otherMac[6];
+ uint16_t u16Prio;
+ uint16_t u16OtherPrio;
+ uint8_t mac[6];
+ uint8_t otherMac[6];
sub_item = proto_tree_add_item(tree, hf_pn_mrp_sub_option2, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_sub_tlv);
@@ -379,19 +370,19 @@ packet_info *pinfo, proto_tree *tree)
static int
dissect_PNMRP_Option(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 length)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t length)
{
- guint32 oui;
- guint8 u8MrpEd1Type;
+ uint32_t oui;
+ uint8_t u8MrpEd1Type;
/* OUI (organizational unique id) */
offset = dissect_pn_oid(tvb, offset, pinfo,tree, hf_pn_mrp_oui, &oui);
+ length -= 3;
switch (oui)
{
case OUI_SIEMENS:
proto_item_append_text(item, "(SIEMENS)");
- length -= 3;
offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_mrp_ed1type, &u8MrpEd1Type);
length -= 1;
switch (u8MrpEd1Type)
@@ -435,10 +426,10 @@ static int
dissect_PNMRP_PDU(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item)
{
- guint16 version;
- guint8 type;
- guint8 length;
- gint i;
+ uint16_t version;
+ uint8_t type;
+ uint8_t length;
+ int i;
tvbuff_t *new_tvb;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -476,7 +467,6 @@ dissect_PNMRP_PDU(tvbuff_t *tvb, int offset,
case 0x00:
/* no content */
return offset;
- break;
case 0x01:
offset = dissect_PNMRP_Common(new_tvb, offset, pinfo, sub_tree, sub_item);
break;
@@ -510,7 +500,7 @@ dissect_PNMRP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
proto_item *ti = NULL;
proto_tree *mrp_tree = NULL;
- guint32 offset = 0;
+ uint32_t offset = 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-MRP");
@@ -599,7 +589,7 @@ proto_register_pn_mrp (void)
{ &hf_pn_mrp_oui,
{ "MRP_ManufacturerOUI", "pn_mrp.oui",
- FT_UINT24, BASE_HEX, VALS(pn_mrp_oui_vals), 0x0,
+ FT_UINT24, BASE_OUI, NULL, 0x0,
NULL, HFILL }},
{ &hf_pn_mrp_ed1type,
@@ -642,7 +632,7 @@ proto_register_pn_mrp (void)
NULL, HFILL }}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_mrp,
&ett_pn_mrp_type,
&ett_pn_sub_tlv
diff --git a/plugins/epan/profinet/packet-pn-mrrt.c b/plugins/epan/profinet/packet-pn-mrrt.c
index ab1598065e..b4f2a85e44 100644
--- a/plugins/epan/profinet/packet-pn-mrrt.c
+++ b/plugins/epan/profinet/packet-pn-mrrt.c
@@ -29,7 +29,7 @@ static int hf_pn_mrrt_version;
static int hf_pn_mrrt_sa;
-static gint ett_pn_mrrt;
+static int ett_pn_mrrt;
@@ -47,9 +47,9 @@ static const value_string pn_mrrt_block_type_vals[] = {
static int
dissect_PNMRRT_Common(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 length _U_)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t length _U_)
{
- guint16 sequence_id;
+ uint16_t sequence_id;
e_guid_t uuid;
@@ -69,9 +69,9 @@ dissect_PNMRRT_Common(tvbuff_t *tvb, int offset,
static int
dissect_PNMRRT_Test(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 length _U_)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint8_t length _U_)
{
- guint8 mac[6];
+ uint8_t mac[6];
/* MRRT_SA */
@@ -91,10 +91,10 @@ static int
dissect_PNMRRT_PDU(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item)
{
- guint16 version;
- guint8 type;
- guint8 length;
- gint i = 0;
+ uint16_t version;
+ uint8_t type;
+ uint8_t length;
+ int i = 0;
/* MRRT_Version */
@@ -122,7 +122,6 @@ dissect_PNMRRT_PDU(tvbuff_t *tvb, int offset,
col_append_str(pinfo->cinfo, COL_INFO, "End");
proto_item_append_text(item, "End");
return offset;
- break;
case 0x01:
offset = dissect_PNMRRT_Common(tvb, offset, pinfo, tree, item, length);
break;
@@ -143,22 +142,22 @@ dissect_PNMRRT_PDU(tvbuff_t *tvb, int offset,
/* possibly dissect a PN-RT packet (frame ID must be in the appropriate range) */
-static gboolean
+static bool
dissect_PNMRRT_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
void *data)
{
/* the tvb will NOT contain the frame_id here, so get it from dissector data! */
- guint16 u16FrameID = GPOINTER_TO_UINT(data);
+ uint16_t u16FrameID = GPOINTER_TO_UINT(data);
proto_item *item;
proto_tree *mrrt_tree;
int offset = 0;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
/* frame id must be in valid range (MRRT) */
if (u16FrameID != 0xFF60) {
/* we are not interested in this packet */
- return FALSE;
+ return false;
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-MRRT");
@@ -173,7 +172,7 @@ dissect_PNMRRT_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item_set_len(item, offset - u32SubStart);
- return TRUE;
+ return true;
}
@@ -215,7 +214,7 @@ proto_register_pn_mrrt (void)
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_mrrt
};
diff --git a/plugins/epan/profinet/packet-pn-ptcp.c b/plugins/epan/profinet/packet-pn-ptcp.c
index 90627cb37e..56aa8366e5 100644
--- a/plugins/epan/profinet/packet-pn-ptcp.c
+++ b/plugins/epan/profinet/packet-pn-ptcp.c
@@ -68,13 +68,10 @@ static int hf_pn_ptcp_oui;
static int hf_pn_ptcp_profinet_subtype;
static int hf_pn_ptcp_irdata_uuid;
-static gint ett_pn_ptcp;
-static gint ett_pn_ptcp_header;
-static gint ett_pn_ptcp_block;
-static gint ett_pn_ptcp_block_header;
-
-#define OUI_PROFINET_MULTICAST 0x010ECF /* PROFIBUS Nutzerorganisation e.V. */
-
+static int ett_pn_ptcp;
+static int ett_pn_ptcp_header;
+static int ett_pn_ptcp_block;
+static int ett_pn_ptcp_block_header;
#define PN_PTCP_BT_END 0x00
#define PN_PTCP_BT_SUBDOMAIN 0x01
@@ -102,12 +99,6 @@ static const value_string pn_ptcp_block_type[] = {
{ 0, NULL }
};
-static const value_string pn_ptcp_oui_vals[] = {
- { OUI_PROFINET, "PROFINET" },
- { OUI_PROFINET_MULTICAST, "PROFINET" },
- { 0, NULL }
-};
-
static const value_string pn_ptcp_master_prio1_vals[] = {
{ 0x00, "Sync slave" },
{ 0x01, "Primary master" },
@@ -181,10 +172,10 @@ static const value_string pn_ptcp_profinet_subtype_vals[] = {
static int
dissect_PNPTCP_TLVHeader(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 *type, guint16 *length)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint16_t *type, uint16_t *length)
{
- guint16 tl_type;
- guint16 tl_length;
+ uint16_t tl_type;
+ uint16_t tl_length;
/* Type */
@@ -201,9 +192,9 @@ dissect_PNPTCP_TLVHeader(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_Subdomain(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 u16FrameID)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint16_t u16FrameID)
{
- guint8 mac[6];
+ uint8_t mac[6];
e_guid_t uuid;
@@ -236,9 +227,9 @@ static int
dissect_PNPTCP_Time(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item)
{
- guint16 EpochNumber;
- guint32 Seconds;
- guint32 NanoSeconds;
+ uint16_t EpochNumber;
+ uint32_t Seconds;
+ uint32_t NanoSeconds;
/* EpochNumber */
@@ -266,8 +257,8 @@ static int
dissect_PNPTCP_TimeExtension(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item)
{
- guint16 Flags;
- guint16 CurrentUTCOffset;
+ uint16_t Flags;
+ uint16_t CurrentUTCOffset;
/* Flags */
@@ -289,11 +280,11 @@ static int
dissect_PNPTCP_Master(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item)
{
- guint8 MasterPriority1;
- guint8 MasterPriority2;
- guint8 ClockClass;
- guint8 ClockAccuracy;
- gint16 ClockVariance;
+ uint8_t MasterPriority1;
+ uint8_t MasterPriority2;
+ uint8_t ClockClass;
+ uint8_t ClockAccuracy;
+ int16_t ClockVariance;
/* MasterPriority1 is a bit field */
@@ -351,8 +342,8 @@ static int
dissect_PNPTCP_PortParameter(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item)
{
- guint32 t2portrxdelay;
- guint32 t3porttxdelay;
+ uint32_t t2portrxdelay;
+ uint32_t t3porttxdelay;
/* Padding */
@@ -380,7 +371,7 @@ static int
dissect_PNPTCP_DelayParameter(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item)
{
- guint8 mac[6];
+ uint8_t mac[6];
/* PortMACAddress */
@@ -404,7 +395,7 @@ static int
dissect_PNPTCP_PortTime(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, proto_item *item)
{
- guint32 t2timestamp;
+ uint32_t t2timestamp;
/* Padding */
@@ -424,9 +415,9 @@ dissect_PNPTCP_PortTime(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_Option_PROFINET(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint16_t length)
{
- guint8 subType;
+ uint8_t subType;
e_guid_t uuid;
/* OUI already dissected! */
@@ -461,9 +452,9 @@ dissect_PNPTCP_Option_PROFINET(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_Option(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint16_t length)
{
- guint32 oui;
+ uint32_t oui;
/* verify remaining TLV length */
@@ -496,19 +487,19 @@ dissect_PNPTCP_Option(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, gboolean *end, guint16 u16FrameID)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, bool *end, uint16_t u16FrameID)
{
- guint16 type;
- guint16 length;
+ uint16_t type;
+ uint16_t length;
proto_item *sub_item;
proto_tree *sub_tree;
proto_item *tlvheader_item;
proto_tree *tlvheader_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
- *end = FALSE;
+ *end = false;
/* block subtree */
sub_item = proto_tree_add_item(tree, hf_pn_ptcp_block, tvb, offset, 0, ENC_NA);
@@ -529,7 +520,7 @@ dissect_PNPTCP_block(tvbuff_t *tvb, int offset,
switch (type) {
case 0x00: /* End, no content */
- *end = TRUE;
+ *end = true;
break;
case 0x01: /* Subdomain */
dissect_PNPTCP_Subdomain(tvb, offset, pinfo, sub_tree, sub_item, u16FrameID);
@@ -568,9 +559,9 @@ dissect_PNPTCP_block(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_blocks(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 u16FrameID)
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint16_t u16FrameID)
{
- gboolean end = FALSE;
+ bool end = false;
/* as long as we have some bytes, try a new block */
while (!end) {
@@ -583,13 +574,13 @@ dissect_PNPTCP_blocks(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_FollowUpPDU(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 u16FrameID,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint16_t u16FrameID,
const char *name, const char *name_short)
{
proto_item *header_item;
proto_tree *header_tree;
- guint16 seq_id;
- gint32 delay1ns_fup;
+ uint16_t seq_id;
+ int32_t delay1ns_fup;
/* dissect the header */
@@ -623,17 +614,17 @@ dissect_PNPTCP_FollowUpPDU(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_RTSyncPDU(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 u16FrameID,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint16_t u16FrameID,
const char *name, const char *name_short)
{
proto_item *header_item;
proto_tree *header_tree;
- guint32 delay10ns;
- guint16 seq_id;
- guint8 delay1ns_8;
- guint64 delay1ns_64;
- guint32 delay1ns_32;
- guint32 delayms;
+ uint32_t delay10ns;
+ uint16_t seq_id;
+ uint8_t delay1ns_8;
+ uint64_t delay1ns_64;
+ uint32_t delay1ns_32;
+ uint32_t delayms;
header_item = proto_tree_add_item(tree, hf_pn_ptcp_header, tvb, offset, 20 /* len */, ENC_NA);
@@ -668,8 +659,8 @@ dissect_PNPTCP_RTSyncPDU(tvbuff_t *tvb, int offset,
offset = dissect_pn_align4(tvb, offset, pinfo, tree);
- delay1ns_64 = ((guint64) delay10ns) * 10 + delay1ns_8 + delay1ns_32;
- delayms = (guint32) (delay1ns_64 / (1000 * 1000));
+ delay1ns_64 = ((uint64_t) delay10ns) * 10 + delay1ns_8 + delay1ns_32;
+ delayms = (uint32_t) (delay1ns_64 / (1000 * 1000));
col_append_fstr(pinfo->cinfo, COL_INFO, "%s, Seq=%3u, Delay=%11" PRIu64 "ns",
name, seq_id, delay1ns_64);
@@ -694,12 +685,12 @@ dissect_PNPTCP_RTSyncPDU(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_AnnouncePDU(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 u16FrameID,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint16_t u16FrameID,
const char *name, const char *name_short)
{
proto_item *header_item;
proto_tree *header_tree;
- guint16 seq_id;
+ uint16_t seq_id;
/* dissect the header */
@@ -729,13 +720,13 @@ dissect_PNPTCP_AnnouncePDU(tvbuff_t *tvb, int offset,
static int
dissect_PNPTCP_DelayPDU(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 u16FrameID,
+ packet_info *pinfo, proto_tree *tree, proto_item *item, uint16_t u16FrameID,
const char *name, const char *name_short)
{
proto_item *header_item;
proto_tree *header_tree;
- guint16 seq_id;
- guint32 delay1ns;
+ uint16_t seq_id;
+ uint32_t delay1ns;
/* dissect the header */
@@ -768,15 +759,15 @@ dissect_PNPTCP_DelayPDU(tvbuff_t *tvb, int offset,
/* possibly dissect a PN-RT packet (frame ID must be in the appropriate range) */
-static gboolean
+static bool
dissect_PNPTCP_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
/* the tvb will NOT contain the frame_id here, so get it from dissector data! */
- guint16 u16FrameID = GPOINTER_TO_UINT(data);
+ uint16_t u16FrameID = GPOINTER_TO_UINT(data);
proto_item *item;
proto_tree *ptcp_tree;
int offset = 0;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
/* frame id must be in valid range (acyclic Real-Time, PTCP) */
@@ -787,7 +778,7 @@ dissect_PNPTCP_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
/* 0xFF40 - 0xFF5F: Delay...PDU */
if ( ((u16FrameID >= 0x0100) && (u16FrameID < 0xFF00)) || (u16FrameID > 0xFF5F) ) {
/* we are not interested in this packet */
- return FALSE;
+ return false;
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-PTCP");
@@ -871,7 +862,7 @@ dissect_PNPTCP_Data_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
proto_item_set_len(item, offset - u32SubStart);
- return TRUE;
+ return true;
}
@@ -1045,7 +1036,7 @@ proto_register_pn_ptcp (void)
{ &hf_pn_ptcp_oui,
{ "Organizationally Unique Identifier", "pn_ptcp.oui",
- FT_UINT24, BASE_HEX, VALS(pn_ptcp_oui_vals), 0x0,
+ FT_UINT24, BASE_OUI, NULL, 0x0,
NULL, HFILL }},
{ &hf_pn_ptcp_profinet_subtype,
@@ -1061,7 +1052,7 @@ proto_register_pn_ptcp (void)
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_ptcp,
&ett_pn_ptcp_header,
&ett_pn_ptcp_block,
diff --git a/plugins/epan/profinet/packet-pn-rsi.c b/plugins/epan/profinet/packet-pn-rsi.c
index fe6e71ac4b..5456f456c8 100644
--- a/plugins/epan/profinet/packet-pn-rsi.c
+++ b/plugins/epan/profinet/packet-pn-rsi.c
@@ -90,14 +90,14 @@ static int hf_pn_rsi_hw_revision;
static int hf_pn_rsi_sw_revision_prefix;
static int hf_pn_rsi_sw_revision;
-static gint ett_pn_rsi;
-static gint ett_pn_rsi_pdu_type;
-static gint ett_pn_rsi_f_opnum_offset;
-static gint ett_pn_rsi_conn_block;
-static gint ett_pn_rsi_svcs_block;
-static gint ett_pn_rsi_add_flags;
-static gint ett_pn_rsi_rta;
-static gint ett_pn_io_pd_rsi_instance;
+static int ett_pn_rsi;
+static int ett_pn_rsi_pdu_type;
+static int ett_pn_rsi_f_opnum_offset;
+static int ett_pn_rsi_conn_block;
+static int ett_pn_rsi_svcs_block;
+static int ett_pn_rsi_add_flags;
+static int ett_pn_rsi_rta;
+static int ett_pn_io_pd_rsi_instance;
static expert_field ei_pn_rsi_error;
@@ -222,7 +222,7 @@ static const range_string pn_rsi_interface[] = {
static int
dissect_FOpnumOffset(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, guint32 *u32FOpnumOffset)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep _U_, uint32_t *u32FOpnumOffset)
{
proto_item *sub_item;
proto_tree *sub_tree;
@@ -261,10 +261,10 @@ pn_rsi_reassemble_init(void)
reassembly_table_register(&pn_rsi_reassembly_table, &addresses_reassembly_table_functions);
}
-static gint ett_pn_rsi_segments;
-static gint ett_pn_rsi_segment;
-//static gint ett_pn_rsi_data;
-static gint ett_pn_rsi_data_payload;
+static int ett_pn_rsi_segments;
+static int ett_pn_rsi_segment;
+//static int ett_pn_rsi_data;
+static int ett_pn_rsi_data_payload;
static const fragment_items pn_rsi_frag_items = {
&ett_pn_rsi_segment,
@@ -286,7 +286,7 @@ static const fragment_items pn_rsi_frag_items = {
static int
dissect_pn_rta_remaining_user_data_bytes(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint8 *drep, guint32 length, guint8 u8MoreFrag, guint32 u32FOpnumOffsetOpnum, int type)
+ proto_tree *tree, uint8_t *drep, uint32_t length, uint8_t u8MoreFrag, uint32_t u32FOpnumOffsetOpnum, int type)
{
fragment_head *fd_frag;
fragment_head *fd_reass;
@@ -295,7 +295,7 @@ dissect_pn_rta_remaining_user_data_bytes(tvbuff_t *tvb, int offset, packet_info
proto_item *pn_rsi_tree_item;
proto_item *payload_item = NULL;
proto_item *payload_tree = NULL;
- gboolean update_col_info = TRUE;
+ bool update_col_info = true;
if (pinfo->srcport != 0 && pinfo->destport != 0) {
/* COTP over RFC1006/TCP, try reassembling */
@@ -381,16 +381,16 @@ dissect_pn_rta_remaining_user_data_bytes(tvbuff_t *tvb, int offset, packet_info
/* dissect a PN-IO RSI SVCS block (on top of PN-RT protocol) */
static int
dissect_RSI_SVCS_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16VarPartLen, guint8 u8MoreFrag, guint32 u32FOpnumOffsetOffset, guint32 u32FOpnumOffsetOpnum)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16VarPartLen, uint8_t u8MoreFrag, uint32_t u32FOpnumOffsetOffset, uint32_t u32FOpnumOffsetOpnum)
{
proto_item* sub_item;
proto_tree *sub_tree;
- guint32 u32RsiHeaderSize = 4;
- guint32 u32RspMaxLength;
+ uint32_t u32RsiHeaderSize = 4;
+ uint32_t u32RspMaxLength;
// PDU.FOpnumOffset.Offset + PDU.VarPartLen - 4 - RsiHeaderSize
- gint32 length = u32FOpnumOffsetOffset + u16VarPartLen - 4 - u32RsiHeaderSize;
+ int32_t length = u32FOpnumOffsetOffset + u16VarPartLen - 4 - u32RsiHeaderSize;
sub_item = proto_tree_add_item(tree, hf_pn_rsi_svcs_block, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_rsi_svcs_block);
@@ -415,20 +415,20 @@ dissect_RSI_SVCS_block(tvbuff_t *tvb, int offset,
/* dissect a PN-IO RSI CONN block (on top of PN-RT protocol) */
static int
dissect_RSI_CONN_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16VarPartLen, guint8 u8MoreFrag, guint32 u32FOpnumOffsetOffset, guint32 u32FOpnumOffsetOpnum)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16VarPartLen, uint8_t u8MoreFrag, uint32_t u32FOpnumOffsetOffset, uint32_t u32FOpnumOffsetOpnum)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32RspMaxLength;
- guint16 u16VendorId;
- guint16 u16DeviceId;
- guint16 u16InstanceId;
- guint8 u8RsiInterface;
- guint32 u32RsiHeaderSize = 4;
+ uint32_t u32RspMaxLength;
+ uint16_t u16VendorId;
+ uint16_t u16DeviceId;
+ uint16_t u16InstanceId;
+ uint8_t u8RsiInterface;
+ uint32_t u32RsiHeaderSize = 4;
// PDU.FOpnumOffset.Offset + PDU.VarPartLen - 4 - RsiHeaderSize
- gint32 length = u32FOpnumOffsetOffset + u16VarPartLen - 4 - u32RsiHeaderSize;
+ int32_t length = u32FOpnumOffsetOffset + u16VarPartLen - 4 - u32RsiHeaderSize;
sub_item = proto_tree_add_item(tree, hf_pn_rsi_conn_block, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_rsi_conn_block);
@@ -464,11 +464,11 @@ dissect_RSI_CONN_block(tvbuff_t *tvb, int offset,
/* dissect a PN-IO RSI FREQ RTA PDU (on top of PN-RT protocol) */
static int
dissect_FREQ_RTA_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16VarPartLen, guint8 u8MoreFrag)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16VarPartLen, uint8_t u8MoreFrag)
{
- guint32 u32FOpnumOffset;
- guint32 u32FOpnumOffsetOpnum;
- guint32 u32FOpnumOffsetOffset;
+ uint32_t u32FOpnumOffset;
+ uint32_t u32FOpnumOffsetOpnum;
+ uint32_t u32FOpnumOffsetOffset;
offset = dissect_FOpnumOffset(tvb, offset, pinfo, tree, drep, &u32FOpnumOffset);
u32FOpnumOffsetOpnum = (u32FOpnumOffset & 0x1F000000) >> 24;
u32FOpnumOffsetOffset = u32FOpnumOffset & 0x00FFFFFF;
@@ -524,12 +524,12 @@ dissect_FREQ_RTA_block(tvbuff_t *tvb, int offset,
/* dissect a PN-IO RSI RSP block (on top of PN-RT protocol) */
static int
dissect_RSI_RSP_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16VarPartLen, guint8 u8MoreFrag, guint32 u32FOpnumOffsetOffset, guint32 u32FOpnumOffsetOpnum)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16VarPartLen, uint8_t u8MoreFrag, uint32_t u32FOpnumOffsetOffset, uint32_t u32FOpnumOffsetOpnum)
{
- guint32 u32RsiHeaderSize = 4;
+ uint32_t u32RsiHeaderSize = 4;
// PDU.FOpnumOffset.Offset + PDU.VarPartLen - 4 - RsiHeaderSize
- gint32 length = u32FOpnumOffsetOffset + u16VarPartLen - 4 - u32RsiHeaderSize;
+ int32_t length = u32FOpnumOffsetOffset + u16VarPartLen - 4 - u32RsiHeaderSize;
if (u32FOpnumOffsetOffset == 0)
{
@@ -552,11 +552,11 @@ dissect_RSI_RSP_block(tvbuff_t *tvb, int offset,
/* dissect a PN-IO RSI FRSP RTA PDU (on top of PN-RT protocol) */
static int
dissect_FRSP_RTA_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep, guint16 u16VarPartLen, guint8 u8MoreFrag)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep, uint16_t u16VarPartLen, uint8_t u8MoreFrag)
{
- guint32 u32FOpnumOffset;
- guint32 u32FOpnumOffsetOpnum;
- guint32 u32FOpnumOffsetOffset;
+ uint32_t u32FOpnumOffset;
+ uint32_t u32FOpnumOffsetOpnum;
+ uint32_t u32FOpnumOffsetOffset;
offset = dissect_FOpnumOffset(tvb, offset, pinfo, tree, drep, &u32FOpnumOffset);
u32FOpnumOffsetOpnum = (u32FOpnumOffset & 0x1F000000) >> 24;
u32FOpnumOffsetOffset = u32FOpnumOffset & 0x00FFFFFF;
@@ -601,10 +601,10 @@ dissect_FRSP_RTA_block(tvbuff_t *tvb, int offset,
static int
dissect_RSIAdditionalFlags(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, guint8 *u8AddFlags)
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep _U_, uint8_t *u8AddFlags)
{
- guint8 u8WindowSize;
- guint8 u8Tack;
+ uint8_t u8WindowSize;
+ uint8_t u8Tack;
proto_item *sub_item;
proto_tree *sub_tree;
@@ -641,17 +641,17 @@ dissect_RSIAdditionalFlags(tvbuff_t *tvb, int offset,
/* dissect a PN-IO RTA RSI PDU (on top of PN-RT protocol) */
int
dissect_PNIO_RSI(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint16 u16DestinationServiceAccessPoint;
- guint16 u16SourceServiceAccessPoint;
- guint8 u8PDUType;
- guint8 u8PDUVersion;
- guint8 u8AddFlags;
- guint8 u8MoreFrag;
- guint16 u16SendSeqNum;
- guint16 u16AckSeqNum;
- guint16 u16VarPartLen;
+ uint16_t u16DestinationServiceAccessPoint;
+ uint16_t u16SourceServiceAccessPoint;
+ uint8_t u8PDUType;
+ uint8_t u8PDUVersion;
+ uint8_t u8AddFlags;
+ uint8_t u8MoreFrag;
+ uint16_t u16SendSeqNum;
+ uint16_t u16AckSeqNum;
+ uint16_t u16VarPartLen;
int start_offset = offset;
proto_item *rta_item;
@@ -731,15 +731,15 @@ dissect_PNIO_RSI(tvbuff_t *tvb, int offset,
int
dissect_PDRsiInstances_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 u16NumberOfEntries;
- guint16 u16VendorId;
- guint16 u16DeviceId;
- guint16 u16InstanceId;
- guint8 u8RsiInterface;
+ uint16_t u16NumberOfEntries;
+ uint16_t u16VendorId;
+ uint16_t u16DeviceId;
+ uint16_t u16InstanceId;
+ uint8_t u8RsiInterface;
const int deviceType_size = 25;
const int orderID_size = 20;
const int IMserialnumber_size = 16;
@@ -1055,7 +1055,7 @@ init_pn_rsi(int proto)
}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_rsi,
&ett_pn_rsi_pdu_type,
&ett_pn_rsi_f_opnum_offset,
diff --git a/plugins/epan/profinet/packet-pn-rt.c b/plugins/epan/profinet/packet-pn-rt.c
index f7f9387d1b..0dd64326e0 100644
--- a/plugins/epan/profinet/packet-pn-rt.c
+++ b/plugins/epan/profinet/packet-pn-rt.c
@@ -18,6 +18,8 @@
#include <epan/etypes.h>
#include <epan/expert.h>
#include <epan/crc16-tvb.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include <epan/dissectors/packet-dcerpc.h>
#include <wsutil/crc16-plain.h>
@@ -31,7 +33,7 @@ void proto_reg_handoff_pn_rt(void);
/* Define the pn-rt proto */
static int proto_pn_rt;
-static gboolean pnio_desegment = TRUE;
+static bool pnio_desegment = true;
static dissector_handle_t pn_rt_handle;
@@ -89,7 +91,7 @@ static expert_field ei_pn_rt_sf_crc16;
* the various user definable characteristics of the dissection
*/
/* Place summary in proto tree */
-static gboolean pn_rt_summary_in_tree = TRUE;
+static bool pn_rt_summary_in_tree = true;
/* heuristic to find the right pn-rt payload dissector */
static heur_dissector_list_t heur_subdissector_list;
@@ -154,16 +156,16 @@ static const value_string plugin_proto_checksum_vals[] = {
};
static void
-dissect_DataStatus(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo, guint8 u8DataStatus)
+dissect_DataStatus(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo, uint8_t u8DataStatus)
{
proto_item *sub_item;
proto_tree *sub_tree;
- guint8 u8DataValid;
- guint8 u8Redundancy;
- guint8 u8State;
+ uint8_t u8DataValid;
+ uint8_t u8Redundancy;
+ uint8_t u8State;
conversation_t *conversation;
- gboolean inputFlag = FALSE;
- gboolean outputFlag = FALSE;
+ bool inputFlag = false;
+ bool outputFlag = false;
apduStatusSwitch *apdu_status_switch;
u8State = (u8DataStatus & 0x01);
@@ -178,13 +180,13 @@ dissect_DataStatus(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pin
if (apdu_status_switch != NULL && apdu_status_switch->isRedundancyActive) {
/* IOC -> IOD: OutputCR */
if (addresses_equal(&(pinfo->dst), conversation_key_addr1(conversation->key_ptr)) && addresses_equal(&(pinfo->src), conversation_key_addr2(conversation->key_ptr))) {
- outputFlag = TRUE;
- inputFlag = FALSE;
+ outputFlag = true;
+ inputFlag = false;
}
/* IOD -> IOC: InputCR */
if (addresses_equal(&(pinfo->src), conversation_key_addr1(conversation->key_ptr)) && addresses_equal(&(pinfo->dst), conversation_key_addr2(conversation->key_ptr))) {
- inputFlag = TRUE;
- outputFlag = FALSE;
+ inputFlag = true;
+ outputFlag = false;
}
}
}
@@ -268,16 +270,16 @@ dissect_DataStatus(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pin
}
-static gboolean
-IsDFP_Frame(tvbuff_t *tvb, packet_info *pinfo, guint16 u16FrameID)
+static bool
+IsDFP_Frame(tvbuff_t *tvb, packet_info *pinfo, uint16_t u16FrameID)
{
- guint16 u16SFCRC16;
- guint8 u8SFPosition;
- guint8 u8SFDataLength = 255;
+ uint16_t u16SFCRC16;
+ uint8_t u8SFPosition;
+ uint8_t u8SFDataLength = 255;
int offset = 0;
- guint32 u32SubStart;
- guint16 crc;
- gint tvb_len = 0;
+ uint32_t u32SubStart;
+ uint16_t crc;
+ int tvb_len = 0;
unsigned char virtualFramebuffer[16];
/* try to build a temporary buffer for generating this CRC */
@@ -285,7 +287,7 @@ IsDFP_Frame(tvbuff_t *tvb, packet_info *pinfo, guint16 u16FrameID)
pinfo->dst.type != AT_ETHER || pinfo->src.type != AT_ETHER) {
/* if we don't have src/dst mac addresses then we assume it's not
* to avoid various crashes */
- return FALSE;
+ return false;
}
memcpy(&virtualFramebuffer[0], pinfo->dst.data, 6);
memcpy(&virtualFramebuffer[6], pinfo->src.data, 6);
@@ -302,7 +304,7 @@ IsDFP_Frame(tvbuff_t *tvb, packet_info *pinfo, guint16 u16FrameID)
{
if (u16SFCRC16 != crc)
{
- return(FALSE);
+ return false;
}
}
/* end of first CRC check */
@@ -310,16 +312,16 @@ IsDFP_Frame(tvbuff_t *tvb, packet_info *pinfo, guint16 u16FrameID)
offset += 2; /*Skip first crc */
tvb_len = tvb_captured_length(tvb);
if (offset + 4 > tvb_len)
- return FALSE;
+ return false;
if (tvb_get_letohs(tvb, offset) == 0)
- return FALSE; /* no valid DFP frame */
+ return false; /* no valid DFP frame */
while (1) {
u32SubStart = offset;
- u8SFPosition = tvb_get_guint8(tvb, offset);
+ u8SFPosition = tvb_get_uint8(tvb, offset);
offset += 1;
- u8SFDataLength = tvb_get_guint8(tvb, offset);
+ u8SFDataLength = tvb_get_uint8(tvb, offset);
offset += 1;
if (u8SFDataLength == 0) {
@@ -330,14 +332,14 @@ IsDFP_Frame(tvbuff_t *tvb, packet_info *pinfo, guint16 u16FrameID)
offset += u8SFDataLength;
if (offset > tvb_len)
- return /*TRUE; */FALSE;
+ return /*true; */false;
u16SFCRC16 = tvb_get_letohs(tvb, offset);
if (u16SFCRC16 != 0) {
if (u8SFPosition & 0x80) {
crc = crc16_plain_tvb_offset_seed(tvb, u32SubStart, offset-u32SubStart, 0);
if (crc != u16SFCRC16) {
- return FALSE;
+ return false;
} else {
}
} else {
@@ -345,30 +347,30 @@ IsDFP_Frame(tvbuff_t *tvb, packet_info *pinfo, guint16 u16FrameID)
}
offset += 2;
}
- return TRUE;
+ return true;
}
/* possibly dissect a CSF_SDU related PN-RT packet */
-gboolean
+bool
dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
/* the sub tvb will NOT contain the frame_id here! */
- guint16 u16FrameID = GPOINTER_TO_UINT(data);
- guint16 u16SFCRC16;
- guint8 u8SFPosition;
- guint8 u8SFDataLength = 255;
- guint8 u8SFCycleCounter;
- guint8 u8SFDataStatus;
- gint offset = 0;
- guint32 u32SubStart;
+ uint16_t u16FrameID = GPOINTER_TO_UINT(data);
+ uint16_t u16SFCRC16;
+ uint8_t u8SFPosition;
+ uint8_t u8SFDataLength = 255;
+ uint8_t u8SFCycleCounter;
+ uint8_t u8SFDataStatus;
+ int offset = 0;
+ uint32_t u32SubStart;
proto_item *sub_item;
proto_tree *sub_tree;
- guint16 crc;
+ uint16_t crc;
/* possible FrameID ranges for DFP */
if ((u16FrameID < 0x0100) || (u16FrameID > 0x3FFF))
- return (FALSE);
+ return false;
if (IsDFP_Frame(tvb, pinfo, u16FrameID)) {
/* can't check this CRC, as the checked data bytes are not available */
u16SFCRC16 = tvb_get_letohs(tvb, offset);
@@ -389,11 +391,11 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
sub_tree = proto_item_add_subtree(sub_item, ett_pn_rt_sf);
u32SubStart = offset;
- u8SFPosition = tvb_get_guint8(tvb, offset);
+ u8SFPosition = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(sub_tree, hf_pn_rt_sf_position, tvb, offset, 1, u8SFPosition);
offset += 1;
- u8SFDataLength = tvb_get_guint8(tvb, offset);
+ u8SFDataLength = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(sub_tree, hf_pn_rt_sf_data_length, tvb, offset, 1, u8SFDataLength);
offset += 1;
@@ -403,11 +405,11 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
break;
}
- u8SFCycleCounter = tvb_get_guint8(tvb, offset);
+ u8SFCycleCounter = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(sub_tree, hf_pn_rt_sf_cycle_counter, tvb, offset, 1, u8SFCycleCounter);
offset += 1;
- u8SFDataStatus = tvb_get_guint8(tvb, offset);
+ u8SFDataStatus = tvb_get_uint8(tvb, offset);
dissect_DataStatus(tvb, offset, sub_tree, pinfo, u8SFDataStatus);
offset += 1;
@@ -435,7 +437,7 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
proto_item_set_len(sub_item, offset - u32SubStart);
}
- return TRUE;
+ return true;
}
else {
@@ -443,7 +445,7 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
"PROFINET IO Cyclic Service Data Unit");
}
- return FALSE;
+ return false;
}
@@ -451,18 +453,18 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
/* Register PNIO defrag table init routine. */
static reassembly_table pdu_reassembly_table;
-static GHashTable *reassembled_frag_table = NULL;
+static GHashTable *reassembled_frag_table;
static dissector_table_t ethertype_subdissector_table;
-static guint32 start_frag_OR_ID[16];
+static uint32_t start_frag_OR_ID[16];
static void
pnio_defragment_init(void)
{
- guint32 i;
- for (i=0; i < 16; i++) /* init the reasemble help array */
+ uint32_t i;
+ for (i=0; i < 16; i++) /* init the reassemble help array */
start_frag_OR_ID[i] = 0;
reassembled_frag_table = g_hash_table_new(NULL, NULL);
}
@@ -474,11 +476,11 @@ pnio_defragment_cleanup(void)
}
/* possibly dissect a FRAG_PDU related PN-RT packet */
-static gboolean
+static bool
dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
/* the sub tvb will NOT contain the frame_id here! */
- guint16 u16FrameID = GPOINTER_TO_UINT(data);
+ uint16_t u16FrameID = GPOINTER_TO_UINT(data);
int offset = 0;
@@ -488,22 +490,22 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
proto_tree *sub_tree;
proto_item *status_item;
proto_tree *status_tree;
- guint8 u8FragDataLength;
- guint8 u8FragStatus;
- gboolean bMoreFollows;
- guint8 uFragNumber;
+ uint8_t u8FragDataLength;
+ uint8_t u8FragStatus;
+ bool bMoreFollows;
+ uint8_t uFragNumber;
sub_item = proto_tree_add_item(tree, hf_pn_rt_frag, tvb, offset, 0, ENC_NA);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_rt_frag);
- u8FragDataLength = tvb_get_guint8(tvb, offset);
+ u8FragDataLength = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(sub_tree, hf_pn_rt_frag_data_length, tvb, offset, 1, u8FragDataLength);
offset += 1;
status_item = proto_tree_add_item(sub_tree, hf_pn_rt_frag_status, tvb, offset, 1, ENC_NA);
status_tree = proto_item_add_subtree(status_item, ett_pn_rt_frag_status);
- u8FragStatus = tvb_get_guint8(tvb, offset);
+ u8FragStatus = tvb_get_uint8(tvb, offset);
proto_tree_add_uint(status_tree, hf_pn_rt_frag_status_more_follows, tvb, offset, 1, u8FragStatus);
proto_tree_add_uint(status_tree, hf_pn_rt_frag_status_error, tvb, offset, 1, u8FragStatus);
proto_tree_add_uint(status_tree, hf_pn_rt_frag_status_fragment_number, tvb, offset, 1, u8FragStatus);
@@ -520,21 +522,21 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
col_append_fstr(pinfo->cinfo, COL_INFO, " Fragment Length: %d bytes", tvb_captured_length_remaining(tvb, offset));
dissect_pn_user_data_bytes(tvb, offset, pinfo, sub_tree, tvb_captured_length_remaining(tvb, offset), FRAG_DATA);
- if ((guint)tvb_captured_length_remaining(tvb, offset) < (guint)(u8FragDataLength *8)) {
+ if ((unsigned)tvb_captured_length_remaining(tvb, offset) < (unsigned)(u8FragDataLength *8)) {
proto_item_append_text(status_item, ": FragDataLength out of Framerange -> discarding!");
- return (TRUE);
+ return true;
}
/* defragmentation starts here */
if (pnio_desegment)
{
- guint32 u32FragID;
- guint32 u32ReasembleID /*= 0xfedc ??*/;
+ uint32_t u32FragID;
+ uint32_t u32ReasembleID /*= 0xfedc ??*/;
fragment_head *pdu_frag;
u32FragID = (u16FrameID & 0xf);
if (uFragNumber == 0)
{ /* this is the first "new" fragment, so set up a new key Id */
- guint32 u32FrameKey;
+ uint32_t u32FrameKey;
u32FrameKey = (pinfo->num << 2) | u32FragID;
/* store it in the array */
start_frag_OR_ID[u32FragID] = u32FrameKey;
@@ -555,7 +557,7 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
pdu_frag = (fragment_head *)g_hash_table_lookup(reassembled_frag_table, GUINT_TO_POINTER(pinfo->num));
if (pdu_frag) /* found a matching fragment; dissect it */
{
- guint16 type;
+ uint16_t type;
tvbuff_t *pdu_tvb;
/* create the new tvb for defragmented frame */
@@ -569,12 +571,12 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
call_data_dissector(pdu_tvb, pinfo, tree);
}
}
- return TRUE;
+ return true;
}
else
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -584,23 +586,23 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
static int
dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- gint pdu_len;
- gint data_len;
- guint16 u16FrameID;
- guint8 u8DataStatus;
- guint8 u8TransferStatus;
- guint16 u16CycleCounter;
- const gchar *pszProtAddInfo;
- const gchar *pszProtShort;
- const gchar *pszProtSummary;
- const gchar *pszProtComment;
+ int pdu_len;
+ int data_len;
+ uint16_t u16FrameID;
+ uint8_t u8DataStatus;
+ uint8_t u8TransferStatus;
+ uint16_t u16CycleCounter;
+ const char *pszProtAddInfo;
+ const char *pszProtShort;
+ const char *pszProtSummary;
+ const char *pszProtComment;
proto_tree *pn_rt_tree, *ti;
- gchar szFieldSummary[100];
+ char szFieldSummary[100];
tvbuff_t *next_tvb;
- gboolean bCyclic;
+ bool bCyclic;
heur_dtbl_entry_t *hdtbl_entry;
conversation_t* conversation;
- guint8 isTimeAware = FALSE;
+ uint8_t isTimeAware = false;
/* If the link-layer dissector for the protocol above us knows whether
* the packet, as handed to it, includes a link-layer FCS, what it
@@ -655,85 +657,85 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
pszProtAddInfo = "reserved, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x0000-0x001F: Reserved ID";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0x0021) {
pszProtShort = "PN-PTCP";
pszProtAddInfo = "Synchronization, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x0020-0x0021: Real-Time: Sync (with follow up)";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0x007F) {
pszProtShort = "PN-RT";
pszProtAddInfo = "reserved, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x0022-0x007F: Reserved ID";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0x0081) {
pszProtShort = "PN-PTCP";
pszProtAddInfo = "Synchronization, ";
pszProtSummary = "Isochronous-Real-Time";
pszProtComment = "0x0080-0x0081: Real-Time: Sync (without follow up)";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0x00FF) {
pszProtShort = "PN-RT";
pszProtAddInfo = "reserved, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x0082-0x00FF: Reserved ID";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0x6FF && !isTimeAware) {
pszProtShort = "PN-RTC3";
pszProtAddInfo = "RTC3, ";
pszProtSummary = "Isochronous-Real-Time";
pszProtComment = "0x0100-0x06FF: RED: Real-Time(class=3): non redundant, normal or DFP";
- bCyclic = TRUE;
+ bCyclic = true;
} else if (u16FrameID <= 0x0FFF && !isTimeAware) {
pszProtShort = "PN-RTC3";
pszProtAddInfo = "RTC3, ";
pszProtSummary = "Isochronous-Real-Time";
pszProtComment = "0x0700-0x0FFF: RED: Real-Time(class=3): redundant, normal or DFP";
- bCyclic = TRUE;
+ bCyclic = true;
} else if (u16FrameID <= 0x7FFF && !isTimeAware) {
pszProtShort = "PN-RT";
pszProtAddInfo = "reserved, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x1000-0x7FFF: Reserved ID";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0x0FFF && isTimeAware) {
pszProtShort = "PN-RT";
pszProtAddInfo = "reserved, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x0100-0x0FFF: Reserved ID";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0x2FFF && isTimeAware) {
pszProtShort = "PN-RTCS";
pszProtAddInfo = "RT_STREAM, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x1000-0x2FFF: RT_CLASS_STREAM";
- bCyclic = TRUE;
+ bCyclic = true;
} else if (u16FrameID <= 0x37FF && isTimeAware) {
pszProtShort = "PN-RT";
pszProtAddInfo = "reserved, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x3000-0x37FF: Reserved ID";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0x3FFF && isTimeAware) {
pszProtShort = "PN-RTCS";
pszProtAddInfo = "RT_STREAM, ";
pszProtSummary = "Real-Time";
pszProtComment = "0x3800-0x3FFF: RT_CLASS_STREAM";
- bCyclic = TRUE;
+ bCyclic = true;
} else if (u16FrameID <= 0xBBFF) {
pszProtShort = "PN-RTC1";
pszProtAddInfo = "RTC1, ";
pszProtSummary = "cyclic Real-Time";
pszProtComment = "0x8000-0xBBFF: Real-Time(class=1 unicast): non redundant, normal";
- bCyclic = TRUE;
+ bCyclic = true;
} else if (u16FrameID <= 0xBFFF) {
pszProtShort = "PN-RTC1";
pszProtAddInfo = "RTC1, ";
pszProtSummary = "cyclic Real-Time";
pszProtComment = "0xBC00-0xBFFF: Real-Time(class=1 multicast): non redundant, normal";
- bCyclic = TRUE;
+ bCyclic = true;
} else if (u16FrameID <= 0xF7FF) {
/* check if udp frame on PNIO port */
if (pinfo->destport == 0x8892)
@@ -749,7 +751,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
pszProtComment = "0xC000-0xF7FF: Real-Time(class=1 unicast): Cyclic";
}
pszProtSummary = "cyclic Real-Time";
- bCyclic = TRUE;
+ bCyclic = true;
} else if (u16FrameID <= 0xFBFF) {
if (pinfo->destport == 0x8892)
{ /* UDP frame */
@@ -764,13 +766,13 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
pszProtComment = "0xF800-0xFBFF: Real-Time(class=1 multicast): Cyclic";
}
pszProtSummary = "cyclic Real-Time";
- bCyclic = TRUE;
+ bCyclic = true;
} else if (u16FrameID <= 0xFDFF) {
pszProtShort = "PN-RTA";
pszProtAddInfo = "Reserved, ";
pszProtSummary = "acyclic Real-Time";
pszProtComment = "0xFC00-0xFDFF: Reserved";
- bCyclic = FALSE;
+ bCyclic = false;
if (u16FrameID == 0xfc01) {
pszProtShort = "PN-RTA";
pszProtAddInfo = "Alarm High, ";
@@ -783,7 +785,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
pszProtAddInfo = "Reserved, ";
pszProtSummary = "acyclic Real-Time";
pszProtComment = "0xFE00-0xFEFF: Real-Time: Reserved";
- bCyclic = FALSE;
+ bCyclic = false;
if (u16FrameID == 0xFE01) {
pszProtShort = "PN-RTA";
pszProtAddInfo = "Alarm Low, ";
@@ -825,57 +827,57 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
pszProtAddInfo = "RTA Sync, ";
pszProtSummary = "acyclic Real-Time";
pszProtComment = "0xFF00-0xFF01: PTCP Announce";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0xFF1F) {
pszProtShort = "PN-PTCP";
pszProtAddInfo = "RTA Sync, ";
pszProtSummary = "acyclic Real-Time";
pszProtComment = "0xFF02-0xFF1F: Reserved";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0xFF21) {
pszProtShort = "PN-PTCP";
pszProtAddInfo = "Follow Up, ";
pszProtSummary = "acyclic Real-Time";
pszProtComment = "0xFF20-0xFF21: PTCP Follow Up";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0xFF22) {
pszProtShort = "PN-PTCP";
pszProtAddInfo = "Follow Up, ";
pszProtSummary = "acyclic Real-Time";
pszProtComment = "0xFF22-0xFF3F: Reserved";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0xFF43) {
pszProtShort = "PN-PTCP";
pszProtAddInfo = "Delay, ";
pszProtSummary = "acyclic Real-Time";
pszProtComment = "0xFF40-0xFF43: Acyclic Real-Time: Delay";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0xFF7F) {
pszProtShort = "PN-RT";
pszProtAddInfo = "Reserved, ";
pszProtSummary = "Real-Time";
pszProtComment = "0xFF44-0xFF7F: reserved ID";
- bCyclic = FALSE;
+ bCyclic = false;
} else if (u16FrameID <= 0xFF8F) {
pszProtShort = "PN-RT";
pszProtAddInfo = "";
pszProtSummary = "Fragmentation";
pszProtComment = "0xFF80-0xFF8F: Fragmentation";
- bCyclic = FALSE;
+ bCyclic = false;
} else {
pszProtShort = "PN-RT";
pszProtAddInfo = "Reserved, ";
pszProtSummary = "Real-Time";
pszProtComment = "0xFF90-0xFFFF: reserved ID";
- bCyclic = FALSE;
+ bCyclic = false;
}
/* decode optional cyclic fields at the packet end and build the summary line */
if (bCyclic) {
/* cyclic transfer has cycle counter, data status and transfer status fields at the end */
u16CycleCounter = tvb_get_ntohs(tvb, pdu_len - 4);
- u8DataStatus = tvb_get_guint8(tvb, pdu_len - 2);
- u8TransferStatus = tvb_get_guint8(tvb, pdu_len - 1);
+ u8DataStatus = tvb_get_uint8(tvb, pdu_len - 2);
+ u8TransferStatus = tvb_get_uint8(tvb, pdu_len - 1);
snprintf (szFieldSummary, sizeof(szFieldSummary),
"%sID:0x%04x, Len:%4u, Cycle:%5u (%s,%s,%s,%s)",
@@ -950,7 +952,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
next_tvb = tvb_new_subset_length(tvb, 2, data_len);
/* ask heuristics, if some sub-dissector is interested in this packet payload */
- if (!dissector_try_heuristic(heur_subdissector_list, next_tvb, pinfo, tree, &hdtbl_entry, GUINT_TO_POINTER( (guint32) u16FrameID))) {
+ if (!dissector_try_heuristic(heur_subdissector_list, next_tvb, pinfo, tree, &hdtbl_entry, GUINT_TO_POINTER( (uint32_t) u16FrameID))) {
/*col_set_str(pinfo->cinfo, COL_INFO, "Unknown");*/
/* Oh, well, we don't know this; dissect it as data. */
@@ -1127,7 +1129,7 @@ proto_register_pn_rt(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_rt,
&ett_pn_rt_data_status,
&ett_pn_rt_sf,
diff --git a/plugins/epan/profinet/packet-pn-rtc-one.c b/plugins/epan/profinet/packet-pn-rtc-one.c
index af927205be..6bed963da8 100644
--- a/plugins/epan/profinet/packet-pn-rtc-one.c
+++ b/plugins/epan/profinet/packet-pn-rtc-one.c
@@ -135,10 +135,10 @@ static int hf_pn_pa_profile_value_8bit;
static int hf_pn_pa_profile_value_16bit;
static int hf_pn_pa_profile_value_float;
-static gint ett_pn_io_rtc;
-static gint ett_pn_io_ioxs;
-static gint ett_pn_io_io_data_object;
-static gint ett_pn_pa_profile_status;
+static int ett_pn_io_rtc;
+static int ett_pn_io_ioxs;
+static int ett_pn_io_io_data_object;
+static int ett_pn_pa_profile_status;
static expert_field ei_pn_io_too_many_data_objects;
@@ -257,14 +257,14 @@ static int * const pa_profile_status_fields[] = {
/* Dissector for PROFIsafe Status Byte */
static int
dissect_pn_io_ps_SB(tvbuff_t *tvb, int offset,
-packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex, int * const *fields)
+packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep _U_, int hfindex, int * const *fields)
{
if (tree) {
- guint8 u8StatusByte;
+ uint8_t u8StatusByte;
proto_item *sb_item;
- u8StatusByte = tvb_get_guint8(tvb, offset);
+ u8StatusByte = tvb_get_uint8(tvb, offset);
/* Add Status Byte subtree */
sb_item = proto_tree_add_bitmask_with_flags(tree, tvb, offset, hfindex, ett_pn_io_ioxs, fields,
@@ -279,14 +279,14 @@ packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex, int * c
/* Dissector for PROFIsafe Control Byte */
static int
dissect_pn_io_ps_CB(tvbuff_t *tvb, int offset,
-packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex, int * const *fields)
+packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep _U_, int hfindex, int * const *fields)
{
if (tree) {
- guint8 u8ControlByte;
+ uint8_t u8ControlByte;
proto_item *cb_item;
- u8ControlByte = tvb_get_guint8(tvb, offset);
+ u8ControlByte = tvb_get_uint8(tvb, offset);
/* Add Status Byte subtree */
cb_item = proto_tree_add_bitmask_with_flags(tree, tvb, offset, hfindex, ett_pn_io_ioxs, fields,
@@ -302,14 +302,14 @@ packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex, int * c
/* Dissector for IOCS (As each IOCS stands for a specific Slot & Subslot) */
static int
dissect_PNIO_IOCS(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree,
- guint8 *drep _U_, int hfindex, guint16 slotNr, guint16 subSlotNr, int * const *fields)
+ uint8_t *drep _U_, int hfindex, uint16_t slotNr, uint16_t subSlotNr, int * const *fields)
{
if (tree) {
- guint8 u8IOxS;
+ uint8_t u8IOxS;
proto_item *ioxs_item;
- u8IOxS = tvb_get_guint8(tvb, offset);
+ u8IOxS = tvb_get_uint8(tvb, offset);
/* Add ioxs subtree */
ioxs_item = proto_tree_add_bitmask_with_flags(tree, tvb, offset, hfindex,
@@ -329,14 +329,14 @@ dissect_PNIO_IOCS(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
/* dissect the IOxS (IOCS, IOPS) field */
static int
dissect_PNIO_IOxS(tvbuff_t *tvb, int offset,
-packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex, int * const *fields)
+packet_info *pinfo _U_, proto_tree *tree, uint8_t *drep _U_, int hfindex, int * const *fields)
{
if (tree) {
- guint8 u8IOxS;
+ uint8_t u8IOxS;
proto_item *ioxs_item;
- u8IOxS = tvb_get_guint8(tvb, offset);
+ u8IOxS = tvb_get_uint8(tvb, offset);
/* Add ioxs subtree */
ioxs_item = proto_tree_add_bitmask_with_flags(tree, tvb, offset, hfindex,
@@ -351,20 +351,20 @@ packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int hfindex, int * c
}
-/* Universel dissector for flexibel PROFIsafe Data 8 to 64 Bits */
+/* Universal dissector for flexibel PROFIsafe Data 8 to 64 Bits */
static int
-dissect_pn_io_ps_uint(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
- proto_tree *tree, guint8 *drep,
-int hfindex, guint8 bytelength, guint64 *pdata)
+dissect_pn_io_ps_uint(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+ proto_tree *tree, uint8_t *drep,
+int hfindex, uint8_t bytelength, uint64_t *pdata)
{
- guint64 data;
- gboolean generalDissection;
+ uint64_t data;
+ bool generalDissection;
- generalDissection = FALSE;
+ generalDissection = false;
switch (bytelength) {
case 1: /* 8 Bit Safety IO Data */
- data = tvb_get_guint8(tvb, offset);
+ data = tvb_get_uint8(tvb, offset);
if (pdata)
*pdata = data;
break;
@@ -413,11 +413,11 @@ int hfindex, guint8 bytelength, guint64 *pdata)
default: /* Safety IO Data is too big to save it into one variable */
dissect_pn_user_data(tvb, offset, pinfo, tree, bytelength, "Safety IO Data");
- generalDissection = TRUE;
+ generalDissection = true;
break;
}
- if (tree && generalDissection == FALSE) {
+ if (tree && generalDissection == false) {
proto_tree_add_item(tree, hfindex, tvb, offset, bytelength, DREP_ENC_INTEGER(drep));
}
@@ -428,16 +428,16 @@ int hfindex, guint8 bytelength, guint64 *pdata)
/* dissect a PN-IO RTC1 Cyclic Service Data Unit */
int
dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep _U_, guint16 frameid)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep _U_, uint16_t frameid)
{
proto_tree *data_tree = NULL;
/* Count & offset for comparison of the arrays */
- guint16 frameOffset;
- guint32 objectCounter;
- gboolean inputFlag;
- gboolean outputFlag;
- gboolean psInfoText; /* Used to display only once per frame the info text "PROFIsafe Device" */
+ uint16_t frameOffset;
+ uint32_t objectCounter;
+ bool inputFlag;
+ bool outputFlag;
+ bool psInfoText; /* Used to display only once per frame the info text "PROFIsafe Device" */
proto_item *data_item;
proto_item *IODataObject_item;
@@ -448,18 +448,18 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
wmem_strbuf_t *moduleName;
- guint8 toggleBitSb;
- guint8 toggleBitCb;
- guint64 f_data;
+ uint8_t toggleBitSb;
+ uint8_t toggleBitCb;
+ uint64_t f_data;
- guint8 statusbyte;
- guint8 controlbyte;
- guint8 safety_io_data_length;
+ uint8_t statusbyte;
+ uint8_t controlbyte;
+ uint8_t safety_io_data_length;
- guint16 number_io_data_objects_input_cr;
- guint16 number_iocs_input_cr;
- guint16 number_io_data_objects_output_cr;
- guint16 number_iocs_output_cr;
+ uint16_t number_io_data_objects_input_cr;
+ uint16_t number_iocs_input_cr;
+ uint16_t number_io_data_objects_output_cr;
+ uint16_t number_iocs_output_cr;
conversation_t *conversation;
stationInfo *station_info = NULL;
@@ -472,9 +472,9 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
/* Initial */
frameOffset = 0;
f_data = 0;
- inputFlag = FALSE;
- outputFlag = FALSE;
- psInfoText = FALSE;
+ inputFlag = false;
+ outputFlag = false;
+ psInfoText = false;
number_io_data_objects_input_cr = 0;
number_iocs_input_cr = 0;
number_io_data_objects_output_cr = 0;
@@ -482,7 +482,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
wmem_list_frame_t *aruuid_frame;
ARUUIDFrame *current_aruuid_frame = NULL;
- guint32 current_aruuid = 0;
+ uint32_t current_aruuid = 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO"); /* set protocol name */
@@ -491,7 +491,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
data_tree = proto_item_add_subtree(data_item, ett_pn_io_rtc);
/* dissect_dcerpc_uint16(tvb, offset, pinfo, data_tree, drep, hf_pn_io_packedframe_SFCRC, &u16SFCRC); */
- if (!(dissect_CSF_SDU_heur(tvb, pinfo, data_tree, NULL) == FALSE))
+ if (dissect_CSF_SDU_heur(tvb, pinfo, data_tree, NULL))
return(tvb_captured_length(tvb));
/* Only dissect cyclic RTC1 frames, if PN Connect Request has been read */
@@ -527,20 +527,20 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
if (station_info != NULL) {
pn_find_dcp_station_info(station_info, conversation);
- if (pnio_ps_selection == TRUE) {
+ if (pnio_ps_selection == true) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PNIO_PS"); /* set PROFISsafe protocol name */
}
if (addresses_equal(&(pinfo->src), conversation_key_addr1(conversation->key_ptr)) && addresses_equal(&(pinfo->dst), conversation_key_addr2(conversation->key_ptr))) {
- inputFlag = TRUE;
- outputFlag = FALSE;
+ inputFlag = true;
+ outputFlag = false;
number_io_data_objects_input_cr = station_info->ioDataObjectNr_in;
number_iocs_input_cr = station_info->iocsNr_in;
}
if (addresses_equal(&(pinfo->dst), conversation_key_addr1(conversation->key_ptr)) && addresses_equal(&(pinfo->src), conversation_key_addr2(conversation->key_ptr))) {
- outputFlag = TRUE;
- inputFlag = FALSE;
+ outputFlag = true;
+ inputFlag = false;
number_io_data_objects_output_cr = station_info->ioDataObjectNr_out;
number_iocs_output_cr = station_info->iocsNr_out;
}
@@ -549,7 +549,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
/* ------- Input (PNIO) / Response (PNIO_PS) Frame Handling ------- */
if (inputFlag) {
- if (pnio_ps_selection == TRUE) {
+ if (pnio_ps_selection == true) {
proto_tree_add_string_format_value(data_tree, hf_pn_io_frame_info_type, tvb,
offset, 0, "Response", "Response Frame (IO_Device -> IO_Controller)");
}
@@ -568,8 +568,8 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
0, station_info->nameofstation, "\"%s\"", station_info->nameofstation);
}
- if (station_info->gsdPathLength == TRUE) { /* given path isn't too long for the array */
- if (station_info->gsdFound == TRUE) { /* found a GSD-file */
+ if (station_info->gsdPathLength == true) { /* given path isn't too long for the array */
+ if (station_info->gsdFound == true) { /* found a GSD-file */
if (station_info->gsdLocation != NULL) {
IODataObject_item_info = proto_tree_add_item(data_tree, hf_pn_io_frame_info_gsd_found, tvb, offset, 0, ENC_NA);
proto_item_append_text(IODataObject_item_info, ": \"%s\"", station_info->gsdLocation);
@@ -590,7 +590,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
/* ---- Input IOData-/IOCS-Object Handling ---- */
objectCounter = number_io_data_objects_input_cr + number_iocs_input_cr;
- if (objectCounter > (guint)tvb_reported_length_remaining(tvb, offset)) {
+ if (objectCounter > (unsigned)tvb_reported_length_remaining(tvb, offset)) {
expert_add_info_format(pinfo, data_item, &ei_pn_io_too_many_data_objects, "Too many data objects: %d", objectCounter);
return(tvb_captured_length(tvb));
}
@@ -620,17 +620,17 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
proto_tree_add_uint(IODataObject_tree, hf_pn_io_io_data_object_info_submoduleidentnumber, tvb, 0, 0, io_data_object->subModuleIdentNr);
/* PROFIsafe Supported Inputmodule handling */
- if (io_data_object->profisafeSupported == TRUE && pnio_ps_selection == TRUE) {
- if (io_data_object->profisafeSupported == TRUE && psInfoText == FALSE) {
+ if (io_data_object->profisafeSupported == true && pnio_ps_selection == true) {
+ if (io_data_object->profisafeSupported == true && psInfoText == false) {
/* Only add one information string per device to the infotext */
col_append_str(pinfo->cinfo, COL_INFO, ", PROFIsafe Device"); /* Add string to wireshark infotext */
- psInfoText = TRUE;
+ psInfoText = true;
}
proto_tree_add_uint(IODataObject_tree, hf_pn_io_ps_f_dest_adr, tvb, 0, 0, io_data_object->f_dest_adr);
/* Get Safety IO Data */
- if (io_data_object->f_crc_seed == FALSE) {
+ if (io_data_object->f_crc_seed == false) {
safety_io_data_length = io_data_object->length - F_MESSAGE_TRAILER_4BYTE;
} else {
safety_io_data_length = io_data_object->length - F_MESSAGE_TRAILER_5BYTE;
@@ -642,7 +642,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
}
/* ---- Check for new PNIO data using togglebit ---- */
- statusbyte = tvb_get_guint8(tvb, offset);
+ statusbyte = tvb_get_uint8(tvb, offset);
toggleBitSb = statusbyte & 0x20; /* get ToggleBit of StatusByte */
if (io_data_object->lastToggleBit != toggleBitSb) { /* ToggleBit has changed --> new Data incoming */
@@ -676,7 +676,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
}
}
- if (io_data_object->discardIOXS == FALSE) {
+ if (io_data_object->discardIOXS == false) {
offset = dissect_PNIO_IOxS(tvb, offset, pinfo, IODataObject_tree, drep, hf_pn_io_iops, ioxs_fields);
proto_item_set_len(IODataObject_item, io_data_object->length + 1); /* Length = Databytes + IOXS Byte */
}
@@ -697,7 +697,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
moduleName = wmem_strbuf_new(pinfo->pool, "Module");
}
- if (io_data_object->profisafeSupported == TRUE) {
+ if (io_data_object->profisafeSupported == true) {
/* PROFIsafe */
if (io_data_object->length >= 5) { /* 5 due to 3 CRC bytes & 1 status byte & (at least) 1 data byte */
wmem_strbuf_append(moduleName, ", DI");
@@ -722,14 +722,14 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
proto_item_append_text(IODataObject_item, " ModuleName: \"%s\"", io_data_object->moduleNameStr);
/* emphasize the PROFIsafe supported Modul */
- if (io_data_object->profisafeSupported == TRUE && pnio_ps_selection == TRUE) {
+ if (io_data_object->profisafeSupported == true && pnio_ps_selection == true) {
(proto_item_append_text(IODataObject_item, " (PROFIsafe Module)"));
}
/* Set frameOffset to its new value, to find the next object */
frameOffset = frameOffset + io_data_object->length; /* frameOffset = current value + data bytes */
- if (io_data_object->discardIOXS == FALSE) {
+ if (io_data_object->discardIOXS == false) {
frameOffset = frameOffset + 1; /* frameOffset = current value + iops byte */
}
}
@@ -759,7 +759,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
/* ----- Output (PNIO) / Request (PNIO_PS) Frame Handling ------ */
else if (outputFlag) {
- if (pnio_ps_selection == TRUE) {
+ if (pnio_ps_selection == true) {
proto_tree_add_string_format_value(data_tree, hf_pn_io_frame_info_type, tvb,
offset, 0, "Request", "Request Frame (IO_Controller -> IO_Device)");
}
@@ -778,8 +778,8 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
0, station_info->nameofstation, "\"%s\"", station_info->nameofstation);
}
- if (station_info->gsdPathLength == TRUE) { /* given path isn't too long for the array */
- if (station_info->gsdFound == TRUE) { /* found a GSD-file */
+ if (station_info->gsdPathLength == true) { /* given path isn't too long for the array */
+ if (station_info->gsdFound == true) { /* found a GSD-file */
if (station_info->gsdLocation != NULL) {
IODataObject_item_info = proto_tree_add_item(data_tree, hf_pn_io_frame_info_gsd_found, tvb, offset, 0, ENC_NA);
proto_item_append_text(IODataObject_item_info, ": \"%s\"", station_info->gsdLocation);
@@ -800,7 +800,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
/* ---- Output IOData-/IOCS-Object Handling ---- */
objectCounter = number_io_data_objects_output_cr + number_iocs_output_cr;
- if (objectCounter > (guint)tvb_reported_length_remaining(tvb, offset)) {
+ if (objectCounter > (unsigned)tvb_reported_length_remaining(tvb, offset)) {
expert_add_info_format(pinfo, data_item, &ei_pn_io_too_many_data_objects, "Too many data objects: %d", objectCounter);
return(tvb_captured_length(tvb));
}
@@ -828,17 +828,17 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
proto_tree_add_uint(IODataObject_tree, hf_pn_io_io_data_object_info_moduleidentnumber, tvb, 0, 0, io_data_object->moduleIdentNr);
proto_tree_add_uint(IODataObject_tree, hf_pn_io_io_data_object_info_submoduleidentnumber, tvb, 0, 0, io_data_object->subModuleIdentNr);
- if (io_data_object->profisafeSupported == TRUE && pnio_ps_selection == TRUE) {
- if (io_data_object->profisafeSupported == TRUE && psInfoText == FALSE) {
+ if (io_data_object->profisafeSupported == true && pnio_ps_selection == true) {
+ if (io_data_object->profisafeSupported == true && psInfoText == false) {
/* Only add one information string per device to the infotext */
col_append_str(pinfo->cinfo, COL_INFO, ", PROFIsafe Device"); /* Add string to wireshark infotext */
- psInfoText = TRUE;
+ psInfoText = true;
}
proto_tree_add_uint(IODataObject_tree, hf_pn_io_ps_f_dest_adr, tvb, 0, 0, io_data_object->f_dest_adr);
/* Get Safety IO Data */
- if (io_data_object->f_crc_seed == FALSE) {
+ if (io_data_object->f_crc_seed == false) {
safety_io_data_length = io_data_object->length - F_MESSAGE_TRAILER_4BYTE;
} else {
safety_io_data_length = io_data_object->length - F_MESSAGE_TRAILER_5BYTE;
@@ -850,7 +850,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
}
/* ---- Check for new PNIO data using togglebit ---- */
- controlbyte = tvb_get_guint8(tvb, offset);
+ controlbyte = tvb_get_uint8(tvb, offset);
toggleBitCb = controlbyte & 0x20; /* get ToggleBit of Controlbyte */
if (io_data_object->lastToggleBit != toggleBitCb) { /* ToggleBit has changed --> new Data incoming */
@@ -883,7 +883,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
}
}
- if (io_data_object->discardIOXS == FALSE) {
+ if (io_data_object->discardIOXS == false) {
offset = dissect_PNIO_IOxS(tvb, offset, pinfo, IODataObject_tree, drep, hf_pn_io_iops, ioxs_fields);
proto_item_set_len(IODataObject_item, io_data_object->length + 1); /* Length = Databytes + IOXS Byte */
}
@@ -904,7 +904,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
moduleName = wmem_strbuf_new(pinfo->pool, "Module");
}
- if (io_data_object->profisafeSupported == TRUE) {
+ if (io_data_object->profisafeSupported == true) {
/* PROFIsafe */
if (io_data_object->length >= 5) { /* 5 due to 3 CRC bytes & 1 status byte & (at least) 1 data byte */
wmem_strbuf_append(moduleName, ", DO");
@@ -929,13 +929,13 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
proto_item_append_text(IODataObject_item, " ModuleName: \"%s\"", io_data_object->moduleNameStr);
/* emphasize the PROFIsafe supported Modul */
- if (io_data_object->profisafeSupported == TRUE && pnio_ps_selection == TRUE) {
+ if (io_data_object->profisafeSupported == true && pnio_ps_selection == true) {
proto_item_append_text(IODataObject_item, " (PROFIsafe Module)");
}
/* Set frameOffset to its new value, to find the next object */
frameOffset = frameOffset + io_data_object->length; /* frameOffset = current value + data bytes */
- if (io_data_object->discardIOXS == FALSE) {
+ if (io_data_object->discardIOXS == false) {
frameOffset = frameOffset + 1; /* frameOffset = current value + iops byte */
}
}
@@ -974,13 +974,13 @@ dissect_pn_pa_profile_status(tvbuff_t *tvb, int offset,
{
if (tree) {
- guint8 u8status;
- guint8 quality;
+ uint8_t u8status;
+ uint8_t quality;
proto_item *status_item;
proto_tree *status_tree;
- const gchar* quality_name = NULL;
+ const char* quality_name = NULL;
- u8status = tvb_get_guint8(tvb, offset);
+ u8status = tvb_get_uint8(tvb, offset);
quality = (u8status >> 6u) & 0x3u;
/* add status subtree */
@@ -1019,7 +1019,7 @@ dissect_pn_pa_profile_status(tvbuff_t *tvb, int offset,
int
dissect_pn_pa_profile_data(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 length, const char *text)
+ proto_tree *tree, uint32_t length, const char *text)
{
(void)text;
/*
@@ -1321,7 +1321,7 @@ init_pn_io_rtc1(int proto)
},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_io_rtc,
&ett_pn_io_ioxs,
&ett_pn_io_io_data_object,
diff --git a/plugins/epan/profinet/packet-pn.c b/plugins/epan/profinet/packet-pn.c
index 66efda6a89..e841df25cc 100644
--- a/plugins/epan/profinet/packet-pn.c
+++ b/plugins/epan/profinet/packet-pn.c
@@ -68,7 +68,7 @@ static int hf_pn_io_error_code2_pnio_77;
static int hf_pn_io_error_code2_pnio_253;
static int hf_pn_io_error_code2_pnio_255;
-static gint ett_pn_io_status;
+static int ett_pn_io_status;
static expert_field ei_pn_undecoded_data;
static expert_field ei_pn_io_error_code1;
@@ -669,12 +669,12 @@ init_pnio_rtc1_station(stationInfo *station_info) {
/* dissect an 8 bit unsigned integer */
int
-dissect_pn_uint8(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
- proto_tree *tree, int hfindex, guint8 *pdata)
+dissect_pn_uint8(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+ proto_tree *tree, int hfindex, uint8_t *pdata)
{
- guint8 data;
+ uint8_t data;
- data = tvb_get_guint8 (tvb, offset);
+ data = tvb_get_uint8 (tvb, offset);
proto_tree_add_uint(tree, hfindex, tvb, offset, 1, data);
if (pdata)
*pdata = data;
@@ -683,10 +683,10 @@ dissect_pn_uint8(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
/* dissect a 16 bit unsigned integer; return the item through a pointer as well */
int
-dissect_pn_uint16_ret_item(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
- proto_tree *tree, int hfindex, guint16 *pdata, proto_item ** new_item)
+dissect_pn_uint16_ret_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+ proto_tree *tree, int hfindex, uint16_t *pdata, proto_item ** new_item)
{
- guint16 data;
+ uint16_t data;
proto_item *item = NULL;
data = tvb_get_ntohs (tvb, offset);
@@ -701,10 +701,10 @@ dissect_pn_uint16_ret_item(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
/* dissect a 16 bit unsigned integer */
int
-dissect_pn_uint16(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
- proto_tree *tree, int hfindex, guint16 *pdata)
+dissect_pn_uint16(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+ proto_tree *tree, int hfindex, uint16_t *pdata)
{
- guint16 data;
+ uint16_t data;
data = tvb_get_ntohs (tvb, offset);
@@ -716,10 +716,10 @@ dissect_pn_uint16(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
/* dissect a 16 bit signed integer */
int
-dissect_pn_int16(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
- proto_tree *tree, int hfindex, gint16 *pdata)
+dissect_pn_int16(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+ proto_tree *tree, int hfindex, int16_t *pdata)
{
- gint16 data;
+ int16_t data;
data = tvb_get_ntohs (tvb, offset);
@@ -732,9 +732,9 @@ dissect_pn_int16(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
/* dissect a 24bit OUI (IEC organizational unique id) */
int
dissect_pn_oid(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, int hfindex, guint32 *pdata)
+ proto_tree *tree, int hfindex, uint32_t *pdata)
{
- guint32 data;
+ uint32_t data;
data = tvb_get_ntoh24(tvb, offset);
@@ -747,9 +747,9 @@ dissect_pn_oid(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* dissect a 6 byte MAC address */
int
dissect_pn_mac(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, int hfindex, guint8 *pdata)
+ proto_tree *tree, int hfindex, uint8_t *pdata)
{
- guint8 data[6];
+ uint8_t data[6];
tvb_memcpy(tvb, data, offset, 6);
proto_tree_add_ether(tree, hfindex, tvb, offset, 6, data);
@@ -763,9 +763,9 @@ dissect_pn_mac(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* dissect an IPv4 address */
int
dissect_pn_ipv4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, int hfindex, guint32 *pdata)
+ proto_tree *tree, int hfindex, uint32_t *pdata)
{
- guint32 data;
+ uint32_t data;
data = tvb_get_ipv4(tvb, offset);
proto_tree_add_ipv4(tree, hfindex, tvb, offset, 4, data);
@@ -781,7 +781,7 @@ int
dissect_pn_uuid(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree, int hfindex, e_guid_t *uuid)
{
- guint8 drep[2] = { 0,0 };
+ uint8_t drep[2] = { 0,0 };
offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep,
hfindex, uuid);
@@ -792,7 +792,7 @@ dissect_pn_uuid(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* "dissect" some bytes still undecoded (with Expert warning) */
int
dissect_pn_undecoded(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 length)
+ proto_tree *tree, uint32_t length)
{
proto_item *item;
@@ -809,7 +809,7 @@ dissect_pn_undecoded(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* "dissect" some user bytes */
int
dissect_pn_user_data_bytes(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 length, int iSelect)
+ proto_tree *tree, uint32_t length, int iSelect)
{
if(iSelect == FRAG_DATA)
proto_tree_add_item(tree, hf_pn_frag_bytes, tvb, offset, length, ENC_NA);
@@ -821,7 +821,7 @@ dissect_pn_user_data_bytes(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
int
dissect_pn_user_data(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 length, const char *text)
+ proto_tree *tree, uint32_t length, const char *text)
{
if (length != 0) {
proto_tree_add_string_format(tree, hf_pn_user_data, tvb, offset, length, "data",
@@ -833,7 +833,7 @@ dissect_pn_user_data(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* packet is malformed, mark it as such */
int
dissect_pn_malformed(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 length)
+ proto_tree *tree, uint32_t length)
{
proto_tree_add_item(tree, hf_pn_malformed, tvb, 0, 10000, ENC_NA);
@@ -856,7 +856,7 @@ dissect_pn_padding(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
int
dissect_pn_align4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint padding = 0;
+ unsigned padding = 0;
if (offset % 4) {
@@ -872,16 +872,16 @@ dissect_pn_align4(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree
/* dissect the four status (error) fields */
int
dissect_PNIO_status(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep)
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep)
{
- guint8 u8ErrorCode;
- guint8 u8ErrorDecode;
- guint8 u8ErrorCode1;
- guint8 u8ErrorCode2;
+ uint8_t u8ErrorCode;
+ uint8_t u8ErrorDecode;
+ uint8_t u8ErrorCode1;
+ uint8_t u8ErrorCode2;
proto_item *sub_item;
proto_tree *sub_tree;
- guint32 u32SubStart;
+ uint32_t u32SubStart;
int bytemask = (drep[0] & DREP_LITTLE_ENDIAN) ? 3 : 0;
const value_string *error_code1_vals;
@@ -1136,7 +1136,7 @@ pn_append_info(packet_info *pinfo, proto_item *dcp_item, const char *text)
proto_item_append_text(dcp_item, "%s", text);
}
-void pn_init_append_aruuid_frame_setup_list(e_guid_t aruuid, guint32 setup) {
+void pn_init_append_aruuid_frame_setup_list(e_guid_t aruuid, uint32_t setup) {
ARUUIDFrame* aruuid_frame;
@@ -1422,7 +1422,7 @@ init_pn (int proto)
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_io_status
};
diff --git a/plugins/epan/profinet/packet-pn.h b/plugins/epan/profinet/packet-pn.h
index 6053fc3780..c0370cda27 100644
--- a/plugins/epan/profinet/packet-pn.h
+++ b/plugins/epan/profinet/packet-pn.h
@@ -28,24 +28,24 @@ extern int proto_pn_dcp;
extern int proto_pn_io_apdu_status;
extern int proto_pn_io_time_aware_status;
-extern gboolean pnio_ps_selection; /* given by pnio preferences */
+extern bool pnio_ps_selection; /* given by pnio preferences */
/* Structure for general station information */
typedef struct tagStationInfo {
/* general information */
- gchar *typeofstation;
- gchar *nameofstation;
- guint16 u16Vendor_id;
- guint16 u16Device_id;
+ char *typeofstation;
+ char *nameofstation;
+ uint16_t u16Vendor_id;
+ uint16_t u16Device_id;
/* frame structure */
- guint16 ioDataObjectNr_in;
- guint16 ioDataObjectNr_out;
- guint16 iocsNr_in;
- guint16 iocsNr_out;
+ uint16_t ioDataObjectNr_in;
+ uint16_t ioDataObjectNr_out;
+ uint16_t iocsNr_in;
+ uint16_t iocsNr_out;
/* GSDfile station information */
- gboolean gsdFound;
- gboolean gsdPathLength;
- gchar *gsdLocation;
+ bool gsdFound;
+ bool gsdPathLength;
+ char *gsdLocation;
/* IOCS object data */
wmem_list_t *iocs_data_in;
wmem_list_t *iocs_data_out;
@@ -58,58 +58,58 @@ typedef struct tagStationInfo {
typedef struct tagApduStatusSwitch
{
- gboolean isRedundancyActive;
+ bool isRedundancyActive;
address dl_dst;
address dl_src;
}apduStatusSwitch;
/* Structure for IOCS Frames */
typedef struct tagIocsObject {
- guint16 slotNr;
- guint16 subSlotNr;
- guint16 frameOffset;
+ uint16_t slotNr;
+ uint16_t subSlotNr;
+ uint16_t frameOffset;
} iocsObject;
/* Structure for IO Data Objects */
typedef struct tagIoDataObject {
- guint16 slotNr;
- guint16 subSlotNr;
- guint32 api;
- guint32 moduleIdentNr;
- guint32 subModuleIdentNr;
- guint16 frameOffset;
- guint16 length;
- guint16 amountInGSDML;
- guint32 fParameterIndexNr;
- guint16 f_par_crc1;
- guint16 f_src_adr;
- guint16 f_dest_adr;
- gboolean f_crc_seed;
- guint8 f_crc_len;
+ uint16_t slotNr;
+ uint16_t subSlotNr;
+ uint32_t api;
+ uint32_t moduleIdentNr;
+ uint32_t subModuleIdentNr;
+ uint16_t frameOffset;
+ uint16_t length;
+ uint16_t amountInGSDML;
+ uint32_t fParameterIndexNr;
+ uint16_t f_par_crc1;
+ uint16_t f_src_adr;
+ uint16_t f_dest_adr;
+ bool f_crc_seed;
+ uint8_t f_crc_len;
address srcAddr;
address dstAddr;
- gboolean profisafeSupported;
- gboolean discardIOXS;
- gchar *moduleNameStr;
+ bool profisafeSupported;
+ bool discardIOXS;
+ char *moduleNameStr;
tvbuff_t *tvb_slot;
tvbuff_t *tvb_subslot;
/* Status- or Controlbyte data*/
- guint8 last_sb_cb;
- guint8 lastToggleBit;
+ uint8_t last_sb_cb;
+ uint8_t lastToggleBit;
} ioDataObject;
/* Structure for Modules with different ModuleIdentnumber */
typedef struct tagModuleDiffInfo {
- guint16 slotNr;
- guint32 modulID;
+ uint16_t slotNr;
+ uint32_t modulID;
} moduleDiffInfo;
typedef struct tagARUUIDFrame {
e_guid_t aruuid;
- guint32 setupframe;
- guint32 releaseframe;
- guint16 outputframe;
- guint16 inputframe;
+ uint32_t setupframe;
+ uint32_t releaseframe;
+ uint16_t outputframe;
+ uint16_t inputframe;
} ARUUIDFrame;
extern wmem_list_t *aruuid_frame_setup_list;
@@ -121,54 +121,54 @@ extern void pn_rsi_reassemble_init(void);
extern void init_pnio_rtc1_station(stationInfo *station_info);
-extern int dissect_pn_uint8(tvbuff_t *tvb, gint offset, packet_info *pinfo,
- proto_tree *tree, int hfindex, guint8 *pdata);
+extern int dissect_pn_uint8(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ proto_tree *tree, int hfindex, uint8_t *pdata);
-extern int dissect_pn_uint16_ret_item(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
- proto_tree *tree, int hfindex, guint16 *pdata, proto_item ** new_item);
-extern int dissect_pn_uint16(tvbuff_t *tvb, gint offset, packet_info *pinfo,
- proto_tree *tree, int hfindex, guint16 *pdata);
+extern int dissect_pn_uint16_ret_item(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
+ proto_tree *tree, int hfindex, uint16_t *pdata, proto_item ** new_item);
+extern int dissect_pn_uint16(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ proto_tree *tree, int hfindex, uint16_t *pdata);
-extern int dissect_pn_int16(tvbuff_t *tvb, gint offset, packet_info *pinfo,
- proto_tree *tree, int hfindex, gint16 *pdata);
+extern int dissect_pn_int16(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ proto_tree *tree, int hfindex, int16_t *pdata);
extern int dissect_pn_oid(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, int hfindex, guint32 *pdata);
+ proto_tree *tree, int hfindex, uint32_t *pdata);
extern int dissect_pn_mac(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, int hfindex, guint8 *pdata);
+ proto_tree *tree, int hfindex, uint8_t *pdata);
extern int dissect_pn_ipv4(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, int hfindex, guint32 *pdata);
+ proto_tree *tree, int hfindex, uint32_t *pdata);
extern int dissect_pn_uuid(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, int hfindex, e_guid_t *uuid);
extern int dissect_pn_undecoded(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, guint32 length);
+ proto_tree *tree, uint32_t length);
extern int dissect_pn_user_data(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 length, const char *text);
+ proto_tree *tree, uint32_t length, const char *text);
extern int dissect_pn_pa_profile_data(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 length, const char *text);
+ proto_tree *tree, uint32_t length, const char *text);
extern int dissect_blocks(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, guint8 *drep);
+ packet_info *pinfo, proto_tree *tree, uint8_t *drep);
#define PDU_TYPE_REQ 0x05
#define PDU_TYPE_RSP 0x06
-extern int dissect_rsi_blocks(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree, guint8* drep, guint32 u32FOpnumOffsetOpnum, int type);
+extern int dissect_rsi_blocks(tvbuff_t* tvb, int offset, packet_info* pinfo, proto_tree* tree, uint8_t* drep, uint32_t u32FOpnumOffsetOpnum, int type);
#define SUBST_DATA 1
#define FRAG_DATA 2
extern int dissect_pn_user_data_bytes(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
- proto_tree *tree, guint32 length, int iSelect);
+ proto_tree *tree, uint32_t length, int iSelect);
extern int dissect_pn_malformed(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, guint32 length);
+ proto_tree *tree, uint32_t length);
extern int dissect_pn_padding(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, int length);
@@ -176,26 +176,26 @@ extern int dissect_pn_padding(tvbuff_t *tvb, int offset, packet_info *pinfo,
extern int dissect_pn_align4(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
extern int dissect_PNIO_status(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, guint8 *drep);
+ proto_tree *tree, uint8_t *drep);
extern int dissect_PNIO_C_SDU_RTC1(tvbuff_t* tvb, int offset, packet_info* pinfo,
- proto_tree* tree, guint8* drep _U_, guint16 frameid);
+ proto_tree* tree, uint8_t* drep _U_, uint16_t frameid);
extern int dissect_PNIO_RSI(tvbuff_t *tvb, int offset, packet_info *pinfo,
- proto_tree *tree, guint8 *drep);
+ proto_tree *tree, uint8_t *drep);
extern int dissect_PDRsiInstances_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint8 *drep, guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow);
+ packet_info *pinfo, proto_tree *tree, proto_item *item _U_, uint8_t *drep, uint8_t u8BlockVersionHigh, uint8_t u8BlockVersionLow);
extern void pn_append_info(packet_info *pinfo, proto_item *dcp_item, const char *text);
-extern void pn_init_append_aruuid_frame_setup_list(e_guid_t aruuid, guint32 setup);
+extern void pn_init_append_aruuid_frame_setup_list(e_guid_t aruuid, uint32_t setup);
extern ARUUIDFrame* pn_find_aruuid_frame_setup(packet_info* pinfo);
extern void pn_find_dcp_station_info(stationInfo* station_info, conversation_t* conversation);
-extern gboolean dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
+extern bool dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
#define MAX_LINE_LENGTH 1024 /* used for fgets() */
diff --git a/plugins/epan/stats_tree/CMakeLists.txt b/plugins/epan/stats_tree/CMakeLists.txt
index a7a4543c7a..7986d870bb 100644
--- a/plugins/epan/stats_tree/CMakeLists.txt
+++ b/plugins/epan/stats_tree/CMakeLists.txt
@@ -29,11 +29,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin_tap
- "Statistics for ethernet frames"
${TAP_SRC}
)
-add_wireshark_epan_plugin_library(stats_tree)
+add_wireshark_plugin_library(stats_tree epan)
target_link_libraries(stats_tree epan)
diff --git a/plugins/epan/stats_tree/pinfo_stats_tree.c b/plugins/epan/stats_tree/pinfo_stats_tree.c
index 4fc04cc662..68d7322b5d 100644
--- a/plugins/epan/stats_tree/pinfo_stats_tree.c
+++ b/plugins/epan/stats_tree/pinfo_stats_tree.c
@@ -28,21 +28,9 @@ typedef struct {
range_t *packet_range;
} uat_plen_record_t;
-static range_t default_range[10] = {
- {1, {{0, 19}}},
- {1, {{20, 39}}},
- {1, {{40, 79}}},
- {1, {{80, 159}}},
- {1, {{160, 319}}},
- {1, {{320, 639}}},
- {1, {{640, 1279}}},
- {1, {{1280, 2559}}},
- {1, {{2560, 5119}}},
- {1, {{5120, 0xFFFFFFFF}}}
-};
-static uat_plen_record_t *uat_plen_records = NULL;
-static uat_t *plen_uat = NULL;
-static guint num_plen_uat = 0;
+static uat_plen_record_t *uat_plen_records;
+static uat_t *plen_uat;
+static unsigned num_plen_uat;
void register_tap_listener_pinfo_stat_tree(void);
@@ -62,11 +50,11 @@ uat_plen_record_update_cb(void *r, char **err)
uat_plen_record_t *rec = (uat_plen_record_t*)r;
if (rec->packet_range->nranges < 1) {
*err = g_strdup("Invalid range string");
- return FALSE;
+ return false;
}
*err = NULL;
- return TRUE;
+ return true;
}
static void uat_plen_record_free_cb(void*r) {
@@ -77,18 +65,31 @@ static void uat_plen_record_free_cb(void*r) {
}
static void uat_plen_record_post_update_cb(void) {
- guint i, num_default;
- uat_plen_record_t rec;
-
/* If there are no records, create default list */
if (num_plen_uat == 0) {
- num_default = sizeof(default_range)/sizeof(range_t);
+ static const char * const default_range[] = {
+ "0-19",
+ "20-39",
+ "40-79",
+ "80-159",
+ "160-319",
+ "320-639",
+ "640-1279",
+ "1280-2559",
+ "2560-5119",
+ "5120-0xFFFFFFFF"
+ };
+ unsigned i;
/* default values for packet lengths */
- for (i = 0; i < num_default; i++)
+ for (i = 0; i < array_length(default_range); i++)
{
- rec.packet_range = &default_range[i];
- uat_add_record(plen_uat, &rec, TRUE);
+ uat_plen_record_t rec;
+
+ convert_ret_t result = range_convert_str(NULL, &rec.packet_range, default_range[i], UINT32_MAX);
+ ws_assert(result == CVT_NO_ERROR);
+ uat_add_record(plen_uat, &rec, true);
+ wmem_free(NULL, rec.packet_range);
}
}
}
@@ -98,21 +99,21 @@ UAT_RANGE_CB_DEF(uat_plen_records, packet_range, uat_plen_record_t)
/* ip host stats_tree -- basic test */
static int st_node_ipv4 = -1;
static int st_node_ipv6 = -1;
-static const gchar *st_str_ipv4 = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "All Addresses";
-static const gchar *st_str_ipv6 = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "All Addresses";
+static const char *st_str_ipv4 = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "All Addresses";
+static const char *st_str_ipv6 = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "All Addresses";
static void ipv4_hosts_stats_tree_init(stats_tree *st) {
- st_node_ipv4 = stats_tree_create_node(st, st_str_ipv4, 0, STAT_DT_INT, TRUE);
+ st_node_ipv4 = stats_tree_create_node(st, st_str_ipv4, 0, STAT_DT_INT, true);
}
static void ipv6_hosts_stats_tree_init(stats_tree *st) {
- st_node_ipv6 = stats_tree_create_node(st, st_str_ipv6, 0, STAT_DT_INT, TRUE);
+ st_node_ipv6 = stats_tree_create_node(st, st_str_ipv6, 0, STAT_DT_INT, true);
}
-static tap_packet_status ip_hosts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_node, const gchar *st_str) {
- tick_stat_node(st, st_str, 0, FALSE);
- tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_src), st_node, FALSE);
- tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), st_node, FALSE);
+static tap_packet_status ip_hosts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_node, const char *st_str) {
+ tick_stat_node(st, st_str, 0, false);
+ tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_src), st_node, false);
+ tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), st_node, false);
return TAP_PACKET_REDRAW;
}
@@ -129,24 +130,24 @@ static int st_node_ipv4_src = -1;
static int st_node_ipv4_dst = -1;
static int st_node_ipv6_src = -1;
static int st_node_ipv6_dst = -1;
-static const gchar *st_str_ipv4_srcdst = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "Source and Destination Addresses";
-static const gchar *st_str_ipv6_srcdst = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "Source and Destination Addresses";
-static const gchar *st_str_ipv4_src = "Source IPv4 Addresses";
-static const gchar *st_str_ipv4_dst = "Destination IPv4 Addresses";
-static const gchar *st_str_ipv6_src = "Source IPv6 Addresses";
-static const gchar *st_str_ipv6_dst = "Destination IPv6 Addresses";
+static const char *st_str_ipv4_srcdst = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "Source and Destination Addresses";
+static const char *st_str_ipv6_srcdst = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "Source and Destination Addresses";
+static const char *st_str_ipv4_src = "Source IPv4 Addresses";
+static const char *st_str_ipv4_dst = "Destination IPv4 Addresses";
+static const char *st_str_ipv6_src = "Source IPv6 Addresses";
+static const char *st_str_ipv6_dst = "Destination IPv6 Addresses";
static void ip_srcdst_stats_tree_init(stats_tree *st,
- const gchar *st_str_src, int *st_node_src_ptr,
- const gchar *st_str_dst, int *st_node_dst_ptr) {
+ const char *st_str_src, int *st_node_src_ptr,
+ const char *st_str_dst, int *st_node_dst_ptr) {
/* create one tree branch for source */
- *st_node_src_ptr = stats_tree_create_node(st, st_str_src, 0, STAT_DT_INT, TRUE);
+ *st_node_src_ptr = stats_tree_create_node(st, st_str_src, 0, STAT_DT_INT, true);
/* set flag so this branch will always be sorted to top of tree */
- stat_node_set_flags(st, st_str_src, 0, FALSE, ST_FLG_SORT_TOP);
- /* creat another top level node for destination branch */
- *st_node_dst_ptr = stats_tree_create_node(st, st_str_dst, 0, STAT_DT_INT, TRUE);
+ stat_node_set_flags(st, st_str_src, 0, false, ST_FLG_SORT_TOP);
+ /* create another top level node for destination branch */
+ *st_node_dst_ptr = stats_tree_create_node(st, st_str_dst, 0, STAT_DT_INT, true);
/* set flag so this branch will not be expanded by default */
- stat_node_set_flags(st, st_str_dst, 0, FALSE, ST_FLG_DEF_NOEXPAND);
+ stat_node_set_flags(st, st_str_dst, 0, false, ST_FLG_DEF_NOEXPAND);
}
static void ipv4_srcdst_stats_tree_init(stats_tree *st) {
@@ -160,15 +161,15 @@ static void ipv6_srcdst_stats_tree_init(stats_tree *st) {
static tap_packet_status ip_srcdst_stats_tree_packet(stats_tree *st,
packet_info *pinfo,
int st_node_src,
- const gchar *st_str_src,
+ const char *st_str_src,
int st_node_dst,
- const gchar *st_str_dst) {
+ const char *st_str_dst) {
/* update source branch */
- tick_stat_node(st, st_str_src, 0, FALSE);
- tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_src), st_node_src, FALSE);
+ tick_stat_node(st, st_str_src, 0, false);
+ tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_src), st_node_src, false);
/* update destination branch */
- tick_stat_node(st, st_str_dst, 0, FALSE);
- tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), st_node_dst, FALSE);
+ tick_stat_node(st, st_str_dst, 0, false);
+ tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), st_node_dst, false);
return TAP_PACKET_REDRAW;
}
@@ -183,8 +184,8 @@ static tap_packet_status ipv6_srcdst_stats_tree_packet(stats_tree *st, packet_in
/* packet type stats_tree -- test pivot node */
static int st_node_ipv4_ptype = -1;
static int st_node_ipv6_ptype = -1;
-static const gchar *st_str_ipv4_ptype = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "IP Protocol Types";
-static const gchar *st_str_ipv6_ptype = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "IP Protocol Types";
+static const char *st_str_ipv4_ptype = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "IP Protocol Types";
+static const char *st_str_ipv6_ptype = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "IP Protocol Types";
static void ipv4_ptype_stats_tree_init(stats_tree *st) {
st_node_ipv4_ptype = stats_tree_create_pivot(st, st_str_ipv4_ptype, 0);
@@ -212,27 +213,27 @@ static tap_packet_status ipv6_ptype_stats_tree_packet(stats_tree *st, packet_inf
*/
static int st_node_ipv4_dsts = -1;
static int st_node_ipv6_dsts = -1;
-static const gchar *st_str_ipv4_dsts = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "Destinations and Ports";
-static const gchar *st_str_ipv6_dsts = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "Destinations and Ports";
+static const char *st_str_ipv4_dsts = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "Destinations and Ports";
+static const char *st_str_ipv6_dsts = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "Destinations and Ports";
static void ipv4_dsts_stats_tree_init(stats_tree *st) {
- st_node_ipv4_dsts = stats_tree_create_node(st, st_str_ipv4_dsts, 0, STAT_DT_INT, TRUE);
+ st_node_ipv4_dsts = stats_tree_create_node(st, st_str_ipv4_dsts, 0, STAT_DT_INT, true);
}
static void ipv6_dsts_stats_tree_init(stats_tree *st) {
- st_node_ipv6_dsts = stats_tree_create_node(st, st_str_ipv6_dsts, 0, STAT_DT_INT, TRUE);
+ st_node_ipv6_dsts = stats_tree_create_node(st, st_str_ipv6_dsts, 0, STAT_DT_INT, true);
}
-static tap_packet_status dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_node, const gchar *st_str) {
- static gchar str[128];
+static tap_packet_status dsts_stats_tree_packet(stats_tree *st, packet_info *pinfo, int st_node, const char *st_str) {
+ static char str[128];
int ip_dst_node;
int protocol_node;
- tick_stat_node(st, st_str, 0, FALSE);
- ip_dst_node = tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), st_node, TRUE);
- protocol_node = tick_stat_node(st, port_type_to_str(pinfo->ptype), ip_dst_node, TRUE);
+ tick_stat_node(st, st_str, 0, false);
+ ip_dst_node = tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), st_node, true);
+ protocol_node = tick_stat_node(st, port_type_to_str(pinfo->ptype), ip_dst_node, true);
snprintf(str, sizeof(str) - 1, "%u", pinfo->destport);
- tick_stat_node(st, str, protocol_node, TRUE);
+ tick_stat_node(st, str, protocol_node, true);
return TAP_PACKET_REDRAW;
}
@@ -246,27 +247,27 @@ static tap_packet_status ipv6_dsts_stats_tree_packet(stats_tree *st, packet_info
static int st_node_ipv4_src_ttls = -1;
static int st_node_ipv6_src_ttls = -1;
-static const gchar* st_str_ipv4_src_ttls = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "Source TTLs";
-static const gchar* st_str_ipv6_src_ttls = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "Source Hop Limits";
+static const char* st_str_ipv4_src_ttls = "IPv4 Statistics" STATS_TREE_MENU_SEPARATOR "Source TTLs";
+static const char* st_str_ipv6_src_ttls = "IPv6 Statistics" STATS_TREE_MENU_SEPARATOR "Source Hop Limits";
static void ipv4_src_ttl_stats_tree_init(stats_tree* st) {
- st_node_ipv4_src_ttls = stats_tree_create_node(st, st_str_ipv4_src_ttls, 0, STAT_DT_INT, TRUE);
+ st_node_ipv4_src_ttls = stats_tree_create_node(st, st_str_ipv4_src_ttls, 0, STAT_DT_INT, true);
}
static void ipv6_src_ttl_stats_tree_init(stats_tree* st) {
- st_node_ipv6_src_ttls = stats_tree_create_node(st, st_str_ipv6_src_ttls, 0, STAT_DT_INT, TRUE);
+ st_node_ipv6_src_ttls = stats_tree_create_node(st, st_str_ipv6_src_ttls, 0, STAT_DT_INT, true);
}
static tap_packet_status src_ttl_stats_tree_packet(stats_tree* st, packet_info* pinfo, int st_node, const char* st_str, uint8_t ttl) {
- static gchar str[128];
+ static char str[128];
int ip_src_node;
int ttl_node;
- tick_stat_node(st, st_str, 0, FALSE);
- ip_src_node = tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_src), st_node, TRUE);
+ tick_stat_node(st, st_str, 0, false);
+ ip_src_node = tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_src), st_node, true);
snprintf(str, sizeof(str) - 1, "%u", ttl);
- ttl_node = tick_stat_node(st, str, ip_src_node, TRUE);
- tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), ttl_node, TRUE);
+ ttl_node = tick_stat_node(st, str, ip_src_node, true);
+ tick_stat_node(st, address_to_str(pinfo->pool, &pinfo->net_dst), ttl_node, true);
return TAP_PACKET_REDRAW;
}
@@ -284,10 +285,10 @@ static tap_packet_status ipv6_src_ttl_stats_tree_packet(stats_tree* st, packet_i
/* packet length stats_tree -- test range node */
static int st_node_plen = -1;
-static const gchar *st_str_plen = "Packet Lengths";
+static const char *st_str_plen = "Packet Lengths";
static void plen_stats_tree_init(stats_tree *st) {
- guint i;
+ unsigned i;
char **str_range_array = (char **)wmem_alloc(NULL, num_plen_uat*sizeof(char*));
/* Convert the ranges to strings for the stats tree API */
@@ -304,7 +305,7 @@ static void plen_stats_tree_init(stats_tree *st) {
}
static tap_packet_status plen_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U_, const void *p _U_, tap_flags_t flags _U_) {
- tick_stat_node(st, st_str_plen, 0, FALSE);
+ tick_stat_node(st, st_str_plen, 0, false);
stats_tree_tick_range(st, st_str_plen, 0, pinfo->fd->pkt_len);
@@ -342,7 +343,7 @@ void register_tap_listener_pinfo_stat_tree(void)
plen_uat = uat_new("Packet Lengths",
sizeof(uat_plen_record_t), /* record size */
"packet_lengths", /* filename */
- TRUE, /* from_profile */
+ true, /* from_profile */
&uat_plen_records, /* data_ptr */
&num_plen_uat, /* numitems_ptr */
0, /* not a dissector, so affects neither dissection nor fields */
diff --git a/plugins/epan/transum/CMakeLists.txt b/plugins/epan/transum/CMakeLists.txt
index 64fd9a74a4..d26d4e464a 100644
--- a/plugins/epan/transum/CMakeLists.txt
+++ b/plugins/epan/transum/CMakeLists.txt
@@ -35,12 +35,11 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "Response time information based on the RTE model"
${DISSECTOR_SRC}
${DISSECTOR_SUPPORT_SRC}
)
-add_wireshark_epan_plugin_library(transum)
+add_wireshark_plugin_library(transum epan)
target_link_libraries(transum epan)
diff --git a/plugins/epan/transum/decoders.c b/plugins/epan/transum/decoders.c
index c430f588ec..a67db053f0 100644
--- a/plugins/epan/transum/decoders.c
+++ b/plugins/epan/transum/decoders.c
@@ -28,18 +28,18 @@ extern TSUM_PREFERENCES preferences;
int decode_syn(packet_info *pinfo _U_, proto_tree *tree _U_, PKT_INFO* pkt_info)
{
if (pkt_info->tcp_flags_ack)
- pkt_info->rrpd.c2s = FALSE;
+ pkt_info->rrpd.c2s = false;
else
{
- pkt_info->rrpd.c2s = TRUE;
+ pkt_info->rrpd.c2s = true;
add_detected_tcp_svc(pkt_info->dstport);
}
pkt_info->rrpd.session_id = 1; /* Fake session ID */
pkt_info->rrpd.msg_id = 1; /* Fake message ID */
- pkt_info->rrpd.decode_based = TRUE;
+ pkt_info->rrpd.decode_based = true;
pkt_info->rrpd.calculation = RTE_CALC_SYN;
- pkt_info->pkt_of_interest = TRUE;
+ pkt_info->pkt_of_interest = true;
return 1;
}
@@ -53,9 +53,9 @@ int decode_syn(packet_info *pinfo _U_, proto_tree *tree _U_, PKT_INFO* pkt_info)
*/
int decode_dcerpc(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info)
{
- guint32 field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
+ uint32_t field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
size_t field_value_count; /* How many entries are there in the extracted field array */
- guint32 dcerpc_cn_ctx_id = 0;
+ uint32_t dcerpc_cn_ctx_id = 0;
if (!extract_uint(tree, hf_of_interest[HF_INTEREST_DCERPC_VER].hf, field_uint, &field_value_count))
{
@@ -109,18 +109,18 @@ int decode_dcerpc(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info)
if (is_dcerpc_req_pkt_type(pkt_info->dcerpc_pkt_type))
{
- pkt_info->rrpd.c2s = TRUE;
+ pkt_info->rrpd.c2s = true;
wmem_map_insert(preferences.tcp_svc_ports, GUINT_TO_POINTER(pkt_info->dstport), GUINT_TO_POINTER(RTE_CALC_DCERPC)); /* make sure we have this DCE-RPC service port set */
}
else
{
- pkt_info->rrpd.c2s = FALSE;
+ pkt_info->rrpd.c2s = false;
wmem_map_insert(preferences.tcp_svc_ports, GUINT_TO_POINTER(pkt_info->srcport), GUINT_TO_POINTER(RTE_CALC_DCERPC)); /* make sure we have this DCE-RPC service port set */
}
- pkt_info->rrpd.decode_based = TRUE;
+ pkt_info->rrpd.decode_based = true;
pkt_info->rrpd.calculation = RTE_CALC_DCERPC;
- pkt_info->pkt_of_interest = TRUE;
+ pkt_info->pkt_of_interest = true;
return 1;
}
@@ -128,35 +128,35 @@ int decode_dcerpc(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info)
/* Returns the number of sub-packets of interest */
int decode_smb(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info, PKT_INFO* subpackets)
{
- guint32 field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
+ uint32_t field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
size_t field_value_count; /* How many entries are there in the extracted field array */
- guint64 ses_id[MAX_RETURNED_ELEMENTS];
+ uint64_t ses_id[MAX_RETURNED_ELEMENTS];
size_t ses_id_count;
- guint64 msg_id[MAX_RETURNED_ELEMENTS];
+ uint64_t msg_id[MAX_RETURNED_ELEMENTS];
size_t msg_id_count;
/* set the direction information */
if (pkt_info->dstport == 445)
- pkt_info->rrpd.c2s = TRUE;
+ pkt_info->rrpd.c2s = true;
else
- pkt_info->rrpd.c2s = FALSE;
+ pkt_info->rrpd.c2s = false;
if (!extract_uint(tree, hf_of_interest[HF_INTEREST_SMB_MID].hf, field_uint, &field_value_count))
{
if (field_value_count)
{
pkt_info->rrpd.calculation = RTE_CALC_SMB1;
- pkt_info->pkt_of_interest = FALSE; /* can't process SMB1 at the moment */
+ pkt_info->pkt_of_interest = false; /* can't process SMB1 at the moment */
return 0;
}
}
/* Default in case we don't have header information */
pkt_info->rrpd.session_id = 0;
pkt_info->rrpd.msg_id = 0;
- pkt_info->rrpd.decode_based = TRUE;
+ pkt_info->rrpd.decode_based = true;
pkt_info->rrpd.calculation = RTE_CALC_SMB2;
- pkt_info->pkt_of_interest = TRUE;
+ pkt_info->pkt_of_interest = true;
extract_ui64(tree, hf_of_interest[HF_INTEREST_SMB2_MSG_ID].hf, msg_id, &msg_id_count);
if (msg_id_count) /* test for header information */
@@ -172,9 +172,9 @@ int decode_smb(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info, PKT
subpackets[i].rrpd.session_id = ses_id[i];
subpackets[i].rrpd.msg_id = msg_id[i];
- subpackets[i].rrpd.decode_based = TRUE;
+ subpackets[i].rrpd.decode_based = true;
subpackets[i].rrpd.calculation = RTE_CALC_SMB2;
- subpackets[i].pkt_of_interest = TRUE;
+ subpackets[i].pkt_of_interest = true;
}
return (int)msg_id_count;
}
@@ -185,8 +185,8 @@ int decode_smb(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info, PKT
/* Returns the number of sub-packets of interest */
int decode_gtcp(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt_info)
{
- guint32 field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
- gboolean field_bool[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
+ uint32_t field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
+ bool field_bool[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
size_t field_value_count; /* How many entries are there in the extracted field array */
if (!extract_uint(tree, hf_of_interest[HF_INTEREST_TCP_STREAM].hf, field_uint, &field_value_count)) {
@@ -223,9 +223,9 @@ int decode_gtcp(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt_info)
*/
if (!extract_instance_count(tree, hf_of_interest[HF_INTEREST_TCP_RETRAN].hf, &field_value_count)) {
if (field_value_count)
- pkt_info->tcp_retran = TRUE;
+ pkt_info->tcp_retran = true;
else
- pkt_info->tcp_retran = FALSE;
+ pkt_info->tcp_retran = false;
}
/*
@@ -233,9 +233,9 @@ int decode_gtcp(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt_info)
*/
if (!extract_instance_count(tree, hf_of_interest[HF_INTEREST_TCP_KEEP_ALIVE].hf, &field_value_count)) {
if (field_value_count)
- pkt_info->tcp_retran = TRUE;
+ pkt_info->tcp_retran = true;
else
- pkt_info->tcp_retran = FALSE;
+ pkt_info->tcp_retran = false;
}
/* we use the SSL Content Type to detect SSL Alerts */
@@ -251,15 +251,15 @@ int decode_gtcp(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt_info)
wmem_map_lookup(preferences.tcp_svc_ports, GUINT_TO_POINTER(pkt_info->srcport)) != NULL)
{
if (wmem_map_lookup(preferences.tcp_svc_ports, GUINT_TO_POINTER(pkt_info->dstport)) != NULL)
- pkt_info->rrpd.c2s = TRUE;
+ pkt_info->rrpd.c2s = true;
pkt_info->rrpd.is_retrans = pkt_info->tcp_retran;
pkt_info->rrpd.session_id = 0;
pkt_info->rrpd.msg_id = 0;
pkt_info->rrpd.calculation = RTE_CALC_GTCP;
- pkt_info->rrpd.decode_based = FALSE;
+ pkt_info->rrpd.decode_based = false;
if (pkt_info->len > 0)
- pkt_info->pkt_of_interest = TRUE;
+ pkt_info->pkt_of_interest = true;
return 1;
}
@@ -270,7 +270,7 @@ int decode_gtcp(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt_info)
/* Returns the number of sub-packets of interest */
int decode_dns(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info)
{
- guint32 field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
+ uint32_t field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
size_t field_value_count; /* How many entries are there in the extracted field array */
if (!extract_uint(tree, hf_of_interest[HF_INTEREST_DNS_ID].hf, field_uint, &field_value_count)) {
@@ -279,9 +279,9 @@ int decode_dns(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info)
}
pkt_info->rrpd.session_id = 1;
- pkt_info->rrpd.decode_based = TRUE;
+ pkt_info->rrpd.decode_based = true;
pkt_info->rrpd.calculation = RTE_CALC_DNS;
- pkt_info->pkt_of_interest = TRUE;
+ pkt_info->pkt_of_interest = true;
return 1;
}
@@ -289,7 +289,7 @@ int decode_dns(packet_info *pinfo _U_, proto_tree *tree, PKT_INFO* pkt_info)
/* Returns the number of sub-packets of interest */
int decode_gudp(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt_info)
{
- guint32 field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
+ uint32_t field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
size_t field_value_count; /* How many entries are there in the extracted field array */
pkt_info->srcport = pinfo->srcport;
@@ -309,13 +309,13 @@ int decode_gudp(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt_info)
(wmem_map_lookup(preferences.udp_svc_ports, GUINT_TO_POINTER(pkt_info->srcport)) != NULL))
{
if (wmem_map_lookup(preferences.udp_svc_ports, GUINT_TO_POINTER(pkt_info->dstport)) != NULL)
- pkt_info->rrpd.c2s = TRUE;
+ pkt_info->rrpd.c2s = true;
pkt_info->rrpd.session_id = 0;
pkt_info->rrpd.msg_id = 0;
- pkt_info->rrpd.decode_based = FALSE;
+ pkt_info->rrpd.decode_based = false;
pkt_info->rrpd.calculation = RTE_CALC_GUDP;
- pkt_info->pkt_of_interest = TRUE;
+ pkt_info->pkt_of_interest = true;
}
return 1;
diff --git a/plugins/epan/transum/extractors.c b/plugins/epan/transum/extractors.c
index 80475ae377..92c3a14440 100644
--- a/plugins/epan/transum/extractors.c
+++ b/plugins/epan/transum/extractors.c
@@ -11,7 +11,7 @@
*/
#include "config.h"
#include <epan/prefs.h>
-#include <epan/packet.h>
+#include <wsutil/array.h>
#include "extractors.h"
/*
@@ -22,7 +22,7 @@
Return is 0 if all went well. If this function return -1 it is probably because the tree did not
include the field defined by the field_id.
*/
-int extract_uint(proto_tree *tree, int field_id, guint32 *result_array, size_t *element_count)
+int extract_uint(proto_tree *tree, int field_id, uint32_t *result_array, size_t *element_count)
{
GPtrArray *finfo_array;
@@ -47,7 +47,7 @@ int extract_uint(proto_tree *tree, int field_id, guint32 *result_array, size_t *
return 0;
}
-int extract_ui64(proto_tree *tree, int field_id, guint64 *result_array, size_t *element_count)
+int extract_ui64(proto_tree *tree, int field_id, uint64_t *result_array, size_t *element_count)
{
GPtrArray *finfo_array;
@@ -72,7 +72,7 @@ int extract_ui64(proto_tree *tree, int field_id, guint64 *result_array, size_t *
return 0;
}
-int extract_si64(proto_tree *tree, int field_id, guint64 *result_array, size_t *element_count)
+int extract_si64(proto_tree *tree, int field_id, uint64_t *result_array, size_t *element_count)
{
GPtrArray *finfo_array;
@@ -97,7 +97,7 @@ int extract_si64(proto_tree *tree, int field_id, guint64 *result_array, size_t *
return 0;
}
-int extract_bool(proto_tree *tree, int field_id, gboolean *result_array, size_t *element_count)
+int extract_bool(proto_tree *tree, int field_id, bool *result_array, size_t *element_count)
{
GPtrArray *finfo_array;
@@ -120,9 +120,9 @@ int extract_bool(proto_tree *tree, int field_id, gboolean *result_array, size_t
ws_assert(fvalue_type_ftenum(fv) == FT_BOOLEAN);
if (fvalue_get_uinteger64(fv))
- result_array[i] = TRUE;
+ result_array[i] = true;
else
- result_array[i] = FALSE;
+ result_array[i] = false;
}
return 0;
diff --git a/plugins/epan/transum/extractors.h b/plugins/epan/transum/extractors.h
index d56134a6db..c5bb5f18f6 100644
--- a/plugins/epan/transum/extractors.h
+++ b/plugins/epan/transum/extractors.h
@@ -14,8 +14,8 @@
#define MAX_RETURNED_ELEMENTS 16
-int extract_uint(proto_tree *tree, int field_id, guint32 *result_array, size_t *element_count);
-int extract_ui64(proto_tree *tree, int field_id, guint64 *result_array, size_t *element_count);
-int extract_si64(proto_tree *tree, int field_id, guint64 *result_array, size_t *element_count);
-int extract_bool(proto_tree *tree, int field_id, gboolean *result_array, size_t *element_count);
+int extract_uint(proto_tree *tree, int field_id, uint32_t *result_array, size_t *element_count);
+int extract_ui64(proto_tree *tree, int field_id, uint64_t *result_array, size_t *element_count);
+int extract_si64(proto_tree *tree, int field_id, uint64_t *result_array, size_t *element_count);
+int extract_bool(proto_tree *tree, int field_id, bool *result_array, size_t *element_count);
int extract_instance_count(proto_tree *tree, int field_id, size_t *element_count);
diff --git a/plugins/epan/transum/packet-transum.c b/plugins/epan/transum/packet-transum.c
index 87903fc58f..496e5f56c0 100644
--- a/plugins/epan/transum/packet-transum.c
+++ b/plugins/epan/transum/packet-transum.c
@@ -93,10 +93,10 @@ static wmem_map_t *detected_tcp_svc; /* this array is used to track services de
static wmem_map_t *dcerpc_req_pkt_type; /* used to indicate if a DCE-RPC pkt_type is a request */
-static wmem_map_t *dcerpc_streams = NULL; /* used to record TCP stream numbers that are carrying DCE-RPC data */
+static wmem_map_t *dcerpc_streams; /* used to record TCP stream numbers that are carrying DCE-RPC data */
/*
-This array contains calls and returns that have no TRUE context_id
+This array contains calls and returns that have no true context_id
This is needed to overcome an apparent bug in Wireshark where
the field name of context id in parameters is the same as context id
in a message header
@@ -106,7 +106,7 @@ static wmem_map_t *dcerpc_context_zero;
/*
The rrpd_list holds information about all of the APDU Request-Response Pairs seen in the trace.
*/
-static wmem_list_t *rrpd_list = NULL;
+static wmem_list_t *rrpd_list;
/*
output_rrpd is a hash of pointers to RRPDs on the rrpd_list. The index is the frame number. This hash is
@@ -122,7 +122,7 @@ static wmem_map_t *output_rrpd;
TCP Reassembly enabled. Once we receive a header packet for an APDU we migrate the entry from this array to the
main rrpd_list.
*/
-static wmem_list_t *temp_rsp_rrpd_list = NULL; /* Reuse these for speed and efficient memory use - issue a warning if we run out */
+static wmem_list_t *temp_rsp_rrpd_list; /* Reuse these for speed and efficient memory use - issue a warning if we run out */
/* Optimisation data - the following is used for various optimisation measures */
static int highest_tcp_stream_no;
@@ -130,9 +130,9 @@ static int highest_udp_stream_no;
wmem_map_t *tcp_stream_exceptions;
-static gint ett_transum;
-static gint ett_transum_header;
-static gint ett_transum_data;
+static int ett_transum;
+static int ett_transum_header;
+static int ett_transum_data;
static int proto_transum;
@@ -177,7 +177,7 @@ static const value_string rrdp_calculation_vals[] = {
{ NULL, NULL, 0}
};*/
-void add_detected_tcp_svc(guint16 port)
+void add_detected_tcp_svc(uint16_t port)
{
wmem_map_insert(detected_tcp_svc, GUINT_TO_POINTER(port), GUINT_TO_POINTER(port));
}
@@ -195,7 +195,7 @@ static void init_dcerpc_data(void)
wmem_map_insert(dcerpc_context_zero, GUINT_TO_POINTER(15), GUINT_TO_POINTER(15));
}
-static void register_dcerpc_stream(guint32 stream_no)
+static void register_dcerpc_stream(uint32_t stream_no)
{
wmem_map_insert(dcerpc_streams, GUINT_TO_POINTER(stream_no), GUINT_TO_POINTER(1));
}
@@ -528,27 +528,21 @@ static RRPD *find_latest_rrpd(RRPD *in_rrpd)
{
case RTE_CALC_DCERPC:
return find_latest_rrpd_dcerpc(in_rrpd);
- break;
case RTE_CALC_DNS:
return find_latest_rrpd_dns(in_rrpd);
- break;
case RTE_CALC_GTCP:
return find_latest_rrpd_gtcp(in_rrpd);
- break;
case RTE_CALC_GUDP:
return find_latest_rrpd_gudp(in_rrpd);
- break;
case RTE_CALC_SMB2:
return find_latest_rrpd_smb2(in_rrpd);
- break;
case RTE_CALC_SYN:
return find_latest_rrpd_syn(in_rrpd);
- break;
}
return NULL;
@@ -734,17 +728,17 @@ static void update_rrpd_rte_data(RRPD *in_rrpd)
update_rrpd_list_entry_rsp(in_rrpd);
}
-gboolean is_dcerpc_context_zero(guint32 pkt_type)
+bool is_dcerpc_context_zero(uint32_t pkt_type)
{
return (wmem_map_lookup(dcerpc_context_zero, GUINT_TO_POINTER(pkt_type)) != NULL);
}
-gboolean is_dcerpc_req_pkt_type(guint32 pkt_type)
+bool is_dcerpc_req_pkt_type(uint32_t pkt_type)
{
return (wmem_map_lookup(dcerpc_req_pkt_type, GUINT_TO_POINTER(pkt_type)) != NULL);
}
-static gboolean is_dcerpc_stream(guint32 stream_no)
+static bool is_dcerpc_stream(uint32_t stream_no)
{
return (wmem_map_lookup(dcerpc_streams, GUINT_TO_POINTER(stream_no)) != NULL);
}
@@ -768,7 +762,7 @@ static void init_globals(void)
temp_rsp_rrpd_list = wmem_list_new(wmem_file_scope());
/* Indicate what fields we're interested in. */
- GArray *wanted_fields = g_array_sized_new(FALSE, FALSE, (guint)sizeof(int), HF_INTEREST_END_OF_LIST);
+ GArray *wanted_fields = g_array_sized_new(false, false, (unsigned)sizeof(int), HF_INTEREST_END_OF_LIST);
for (int i = 0; i < HF_INTEREST_END_OF_LIST; i++)
{
if (hf_of_interest[i].hf != -1)
@@ -782,18 +776,18 @@ static void init_globals(void)
preferences.udp_svc_ports = wmem_map_new(wmem_file_scope(), g_direct_hash, g_direct_equal);
/* use the range values to populate the tcp_svc_ports list*/
- for (guint i = 0; i < tcp_svc_port_range_values->nranges; i++)
+ for (unsigned i = 0; i < tcp_svc_port_range_values->nranges; i++)
{
- for (guint32 j = tcp_svc_port_range_values->ranges[i].low; j <= tcp_svc_port_range_values->ranges[i].high; j++)
+ for (uint32_t j = tcp_svc_port_range_values->ranges[i].low; j <= tcp_svc_port_range_values->ranges[i].high; j++)
{
wmem_map_insert(preferences.tcp_svc_ports, GUINT_TO_POINTER(j), GUINT_TO_POINTER(RTE_CALC_GTCP));
}
}
/* use the range values to populate the udp_svc_ports list*/
- for (guint i = 0; i < udp_svc_port_range_values->nranges; i++)
+ for (unsigned i = 0; i < udp_svc_port_range_values->nranges; i++)
{
- for (guint32 j = udp_svc_port_range_values->ranges[i].low; j <= udp_svc_port_range_values->ranges[i].high; j++)
+ for (uint32_t j = udp_svc_port_range_values->ranges[i].low; j <= udp_svc_port_range_values->ranges[i].high; j++)
{
wmem_map_insert(preferences.udp_svc_ports, GUINT_TO_POINTER(j), GUINT_TO_POINTER(RTE_CALC_GUDP));
}
@@ -929,7 +923,7 @@ static void write_rte(RRPD *in_rrpd, tvbuff_t *tvb, packet_info *pinfo, proto_tr
*/
static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt_info, PKT_INFO* subpackets)
{
- guint32 field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
+ uint32_t field_uint[MAX_RETURNED_ELEMENTS]; /* An extracted field array for unsigned integers */
size_t field_value_count; /* How many entries are there in the extracted field array */
pkt_info->frame_number = pinfo->fd->num; /* easy access to frame number */
@@ -954,7 +948,7 @@ static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt
{
if (pkt_info->ssl_content_type == 21) /* this is an SSL Alert */
{
- pkt_info->pkt_of_interest = FALSE;
+ pkt_info->pkt_of_interest = false;
return;
}
@@ -970,7 +964,7 @@ static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt
if (pkt_info->rrpd.c2s)
wmem_map_remove(tcp_stream_exceptions, GUINT_TO_POINTER(pkt_info->rrpd.stream_no));
else
- pkt_info->pkt_of_interest = FALSE;
+ pkt_info->pkt_of_interest = false;
}
}
/* End of Optimisation Code */
@@ -983,7 +977,7 @@ static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt
the rationale being that if we saw the original in the trace the service process saw it too */
if (pkt_info->rrpd.c2s && preferences.capture_position == CAPTURE_SERVICE)
{
- pkt_info->pkt_of_interest = FALSE;
+ pkt_info->pkt_of_interest = false;
return;
}
@@ -991,7 +985,7 @@ static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt
the rationale being that if we saw the original in the trace the client process saw it too */
else if (!pkt_info->rrpd.c2s && preferences.capture_position == CAPTURE_CLIENT)
{
- pkt_info->pkt_of_interest = FALSE;
+ pkt_info->pkt_of_interest = false;
return;
}
}
@@ -999,7 +993,7 @@ static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt
/* We are not interested in TCP Keep-Alive */
if (pkt_info->tcp_keep_alive)
{
- pkt_info->pkt_of_interest = FALSE;
+ pkt_info->pkt_of_interest = false;
return;
}
@@ -1007,7 +1001,7 @@ static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt
{
if (preferences.orphan_ka_discard && pkt_info->tcp_flags_ack && pkt_info->rrpd.c2s)
{
- pkt_info->pkt_of_interest = FALSE;
+ pkt_info->pkt_of_interest = false;
return; /* It's a KEEP-ALIVE -> stop processing this packet */
}
}
@@ -1029,8 +1023,8 @@ static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt
if (is_dcerpc_stream(pkt_info->rrpd.stream_no))
{
pkt_info->rrpd.calculation = RTE_CALC_DCERPC;
- pkt_info->rrpd.decode_based = TRUE;
- pkt_info->pkt_of_interest = TRUE;
+ pkt_info->rrpd.decode_based = true;
+ pkt_info->pkt_of_interest = true;
}
if (!extract_uint(tree, hf_of_interest[HF_INTEREST_DCERPC_VER].hf, field_uint, &field_value_count))
@@ -1084,7 +1078,7 @@ static void set_proto_values(packet_info *pinfo, proto_tree *tree, PKT_INFO* pkt
/*
* This function is called for each packet
* Wireshark scans all the packets once and then once again as they are displayed
- * The pinfo.visited boolean is set to FALSE; on the first scan
+ * The pinfo.visited boolean is set to false; on the first scan
*/
static int dissect_transum(tvbuff_t *buffer, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
@@ -1222,7 +1216,7 @@ proto_register_transum(void)
};
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_transum,
&ett_transum_header,
&ett_transum_data
@@ -1236,19 +1230,19 @@ proto_register_transum(void)
/* Set User Preferences defaults */
preferences.capture_position = TRACE_CAP_CLIENT;
- preferences.reassembly = TRUE;
+ preferences.reassembly = true;
range_convert_str(wmem_epan_scope(), &tcp_svc_port_range_values, "25, 80, 443, 1433", MAX_TCP_PORT);
range_convert_str(wmem_epan_scope(), &udp_svc_port_range_values, "137-139", MAX_UDP_PORT);
- preferences.orphan_ka_discard = FALSE;
+ preferences.orphan_ka_discard = false;
preferences.time_multiplier = RTE_TIME_SEC;
- preferences.rte_on_first_req = FALSE;
- preferences.rte_on_last_req = TRUE;
- preferences.rte_on_first_rsp = FALSE;
- preferences.rte_on_last_rsp = FALSE;
+ preferences.rte_on_first_req = false;
+ preferences.rte_on_last_req = true;
+ preferences.rte_on_first_rsp = false;
+ preferences.rte_on_last_rsp = false;
- preferences.debug_enabled = FALSE;
+ preferences.debug_enabled = false;
/* no start registering stuff */
proto_register_field_array(proto_transum, hf, array_length(hf));
@@ -1265,7 +1259,7 @@ proto_register_transum(void)
"Position of the capture unit that produced this trace. This setting affects the way TRANSUM handles TCP Retransmissions. See the manual for details.",
&preferences.capture_position,
capture_position_vals,
- FALSE);
+ false);
prefs_register_bool_preference(transum_module,
"reassembly",
@@ -1300,7 +1294,7 @@ proto_register_transum(void)
"Unit of time used for APDU Response Time, Service Time and Spread Time values.",
&preferences.time_multiplier,
time_multiplier_vals,
- FALSE);
+ false);
*/
prefs_register_bool_preference(transum_module,
diff --git a/plugins/epan/transum/packet-transum.h b/plugins/epan/transum/packet-transum.h
index c8915e1454..d21b02fa08 100644
--- a/plugins/epan/transum/packet-transum.h
+++ b/plugins/epan/transum/packet-transum.h
@@ -33,18 +33,18 @@
typedef struct _RRPD
{
/*
- When a c2s is set TRUE it means that the associated packet is going from
+ When a c2s is set true it means that the associated packet is going from
client-to-service. If this value is false the associated packet is going
from service-to-client.
This value is only valid for RRPDs imbedded in subpacket structures.
*/
- gboolean c2s;
+ bool c2s;
- guint8 ip_proto;
- guint32 stream_no;
- guint64 session_id;
- guint64 msg_id;
+ uint8_t ip_proto;
+ uint32_t stream_no;
+ uint64_t session_id;
+ uint64_t msg_id;
/*
Some request-response pairs are demarked simple by a change in direction on a
@@ -53,25 +53,25 @@ typedef struct _RRPD
values to detect the start and end of APDUs. In this latter case decode_based
is set to true.
*/
- gboolean decode_based;
+ bool decode_based;
- gboolean is_retrans;
+ bool is_retrans;
- guint32 req_first_frame;
+ uint32_t req_first_frame;
nstime_t req_first_rtime;
- guint32 req_last_frame;
+ uint32_t req_last_frame;
nstime_t req_last_rtime;
- guint32 rsp_first_frame;
+ uint32_t rsp_first_frame;
nstime_t rsp_first_rtime;
- guint32 rsp_last_frame;
+ uint32_t rsp_last_frame;
nstime_t rsp_last_rtime;
- guint calculation;
+ unsigned calculation;
/* The following numbers are for tuning purposes */
- guint32 req_search_total; /* The total number of steps back through the rrpd_list when matching requests to this entry */
- guint32 rsp_search_total; /* The total number of steps back through the rrpd_list when matching responses to this entry */
+ uint32_t req_search_total; /* The total number of steps back through the rrpd_list when matching requests to this entry */
+ uint32_t rsp_search_total; /* The total number of steps back through the rrpd_list when matching responses to this entry */
} RRPD;
typedef struct _PKT_INFO
@@ -79,39 +79,39 @@ typedef struct _PKT_INFO
int frame_number;
nstime_t relative_time;
- gboolean tcp_retran; /* tcp.analysis.retransmission */
- gboolean tcp_keep_alive; /* tcp.analysis.keep_alive */
- gboolean tcp_flags_syn; /* tcp.flags.syn */
- gboolean tcp_flags_ack; /* tcp.flags.ack */
- gboolean tcp_flags_reset; /* tcp.flags.reset */
- guint32 tcp_flags_urg; /* tcp.urgent_pointer */
- guint32 tcp_seq; /* tcp.seq */
+ bool tcp_retran; /* tcp.analysis.retransmission */
+ bool tcp_keep_alive; /* tcp.analysis.keep_alive */
+ bool tcp_flags_syn; /* tcp.flags.syn */
+ bool tcp_flags_ack; /* tcp.flags.ack */
+ bool tcp_flags_reset; /* tcp.flags.reset */
+ uint32_t tcp_flags_urg; /* tcp.urgent_pointer */
+ uint32_t tcp_seq; /* tcp.seq */
/* Generic transport values */
- guint16 srcport; /* tcp.srcport or udp.srcport*/
- guint16 dstport; /* tcp.dstport or udp.dstport*/
- guint16 len; /* tcp.len or udp.len */
+ uint16_t srcport; /* tcp.srcport or udp.srcport*/
+ uint16_t dstport; /* tcp.dstport or udp.dstport*/
+ uint16_t len; /* tcp.len or udp.len */
- guint8 ssl_content_type; /*tls.record.content_type */
+ uint8_t ssl_content_type; /*tls.record.content_type */
- guint8 tds_type; /*tds.type */
- guint16 tds_length; /* tds.length */
+ uint8_t tds_type; /*tds.type */
+ uint16_t tds_length; /* tds.length */
- guint16 smb_mid; /* smb.mid */
+ uint16_t smb_mid; /* smb.mid */
- guint64 smb2_sesid; /* smb2.sesid */
- guint64 smb2_msg_id; /* smb2.msg_id */
- guint16 smb2_cmd; /* smb2.cmd */
+ uint64_t smb2_sesid; /* smb2.sesid */
+ uint64_t smb2_msg_id; /* smb2.msg_id */
+ uint16_t smb2_cmd; /* smb2.cmd */
- guint8 dcerpc_ver; /* dcerpc.ver */
- guint8 dcerpc_pkt_type; /* dcerpc.pkt_type */
- guint32 dcerpc_cn_call_id; /* dcerpc.cn_call_id */
- guint16 dcerpc_cn_ctx_id; /* dcerpc.cn_ctx_id */
+ uint8_t dcerpc_ver; /* dcerpc.ver */
+ uint8_t dcerpc_pkt_type; /* dcerpc.pkt_type */
+ uint32_t dcerpc_cn_call_id; /* dcerpc.cn_call_id */
+ uint16_t dcerpc_cn_ctx_id; /* dcerpc.cn_ctx_id */
- guint16 dns_id; /* dns.id */
+ uint16_t dns_id; /* dns.id */
/* The following values are calculated */
- gboolean pkt_of_interest;
+ bool pkt_of_interest;
/* RRPD data for this packet */
/* Complete this based on the detected protocol */
@@ -170,9 +170,9 @@ typedef struct _HF_OF_INTEREST_INFO
extern HF_OF_INTEREST_INFO hf_of_interest[HF_INTEREST_END_OF_LIST];
-void add_detected_tcp_svc(guint16 port);
-extern gboolean is_dcerpc_context_zero(guint32 pkt_type);
-extern gboolean is_dcerpc_req_pkt_type(guint32 pkt_type);
+void add_detected_tcp_svc(uint16_t port);
+extern bool is_dcerpc_context_zero(uint32_t pkt_type);
+extern bool is_dcerpc_req_pkt_type(uint32_t pkt_type);
/*
diff --git a/plugins/epan/transum/preferences.h b/plugins/epan/transum/preferences.h
index 96eea06a18..240565e11d 100644
--- a/plugins/epan/transum/preferences.h
+++ b/plugins/epan/transum/preferences.h
@@ -25,17 +25,17 @@
typedef struct _TSUM_PREFERENCES
{
int capture_position;
- gboolean reassembly;
+ bool reassembly;
wmem_map_t *tcp_svc_ports;
wmem_map_t *udp_svc_ports;
- gboolean orphan_ka_discard;
+ bool orphan_ka_discard;
int time_multiplier;
- gboolean rte_on_first_req;
- gboolean rte_on_last_req;
- gboolean rte_on_first_rsp;
- gboolean rte_on_last_rsp;
- gboolean summarisers_enabled;
- gboolean summarise_tds;
- gboolean summarisers_escape_quotes;
- gboolean debug_enabled;
+ bool rte_on_first_req;
+ bool rte_on_last_req;
+ bool rte_on_first_rsp;
+ bool rte_on_last_rsp;
+ bool summarisers_enabled;
+ bool summarise_tds;
+ bool summarisers_escape_quotes;
+ bool debug_enabled;
} TSUM_PREFERENCES;
diff --git a/plugins/epan/unistim/CMakeLists.txt b/plugins/epan/unistim/CMakeLists.txt
index ade7e6d910..b44ca8bcad 100644
--- a/plugins/epan/unistim/CMakeLists.txt
+++ b/plugins/epan/unistim/CMakeLists.txt
@@ -29,11 +29,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "Unified Networks IP Stimulus (UNIStim) dissection"
${DISSECTOR_SRC}
)
-add_wireshark_epan_plugin_library(unistim)
+add_wireshark_plugin_library(unistim epan)
target_link_libraries(unistim epan)
diff --git a/plugins/epan/unistim/packet-unistim.c b/plugins/epan/unistim/packet-unistim.c
index 58b01eccd0..c3790a6bd9 100644
--- a/plugins/epan/unistim/packet-unistim.c
+++ b/plugins/epan/unistim/packet-unistim.c
@@ -17,6 +17,8 @@
#include <epan/packet.h>
#include <epan/tap.h>
#include <epan/expert.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include <epan/dissectors/packet-rtp.h>
#include <epan/dissectors/packet-rtcp.h>
#include "packet-unistim.h"
@@ -38,40 +40,40 @@ static unistim_info_t *uinfo;
static int unistim_tap;
void proto_reg_handoff_unistim(void);
-static void dissect_payload(proto_tree *unistim_tree,tvbuff_t *tvb,gint offset, packet_info *pinfo);
-
-static gint dissect_broadcast_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_expansion_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_key_indicator_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_basic_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_network_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_broadcast_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_audio_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_expansion_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_display_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_key_indicator_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_basic_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_network_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len);
-static gint dissect_unistim_message(proto_tree *unistim_tree, packet_info *pinfo,
- tvbuff_t *tvb,gint offset);
-static gint dissect_uftp_message(proto_tree *unistim_tree, packet_info *pinfo,
- tvbuff_t *tvb,gint offset);
+static void dissect_payload(proto_tree *unistim_tree,tvbuff_t *tvb,int offset, packet_info *pinfo);
+
+static int dissect_broadcast_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_expansion_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_key_indicator_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_basic_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_network_switch(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_broadcast_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_audio_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_expansion_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_display_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_key_indicator_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_basic_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_network_phone(proto_tree *msg_tree,
+ tvbuff_t *tvb,int offset,unsigned msg_len);
+static int dissect_unistim_message(proto_tree *unistim_tree, packet_info *pinfo,
+ tvbuff_t *tvb,int offset);
+static int dissect_uftp_message(proto_tree *unistim_tree, packet_info *pinfo,
+ tvbuff_t *tvb,int offset);
static int proto_unistim;
@@ -102,7 +104,7 @@ static int hf_module_key_number;
static int hf_generic_data;
static int hf_generic_string;
-static gint ett_unistim;
+static int ett_unistim;
static expert_field ei_unistim_len;
@@ -159,18 +161,18 @@ static const value_string command_address[]={
static int
dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_){
- gint offset=0;
+ int offset=0;
proto_item *ti= NULL;
proto_tree *overall_unistim_tree = NULL;
proto_tree *rudpm_tree=NULL;
/* heuristic*/
- switch(tvb_get_guint8(tvb,offset+4)) {/*rudp packet type 0,1,2 only */
+ switch(tvb_get_uint8(tvb,offset+4)) {/*rudp packet type 0,1,2 only */
case 0x0:/*NAK*/
case 0x1:/*ACK*/
break;
case 0x2:/*PAYLOAD*/
- switch(tvb_get_guint8(tvb,offset+5)){/*payload type 0,1,2,3,ff only */
+ switch(tvb_get_uint8(tvb,offset+5)){/*payload type 0,1,2,3,ff only */
case 0x0: /*NULL*/
case 0x1: /*UNISTIM*/
case 0x2: /*UNISTIM WITH TERM ID*/
@@ -217,9 +219,9 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_
offset+=4;
proto_tree_add_item(rudpm_tree,hf_unistim_packet_type,tvb,offset,1,ENC_BIG_ENDIAN);
- uinfo->rudp_type = tvb_get_guint8(tvb,offset);
+ uinfo->rudp_type = tvb_get_uint8(tvb,offset);
- switch(tvb_get_guint8(tvb,offset)) {
+ switch(tvb_get_uint8(tvb,offset)) {
case 0x00:
/*NAK*/
col_add_fstr(pinfo->cinfo, COL_INFO, "NAK for seq - 0x%X",
@@ -238,7 +240,6 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_
break;
default:
return 0;
- break;
}
/* Queue packet for tap */
@@ -247,10 +248,10 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_
}
static void
-dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, gint offset, packet_info *pinfo){
+dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, int offset, packet_info *pinfo){
proto_item *ti;
proto_tree *unistim_tree;
- guint payload_proto=tvb_get_guint8(tvb,offset);
+ unsigned payload_proto=tvb_get_uint8(tvb,offset);
/* Payload type for tap */
uinfo->payload_type = payload_proto;
@@ -299,17 +300,17 @@ dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, gint offset, pac
}
-static gint
-dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *tvb,gint offset){
+static int
+dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *tvb,int offset){
- guint command;
- guint str_len;
- guint dat_len;
+ unsigned command;
+ unsigned str_len;
+ unsigned dat_len;
proto_tree *msg_tree;
msg_tree = proto_tree_add_subtree(unistim_tree,tvb,offset,-1,ett_unistim,NULL,"UFTP CMD");
- command=tvb_get_guint8(tvb,offset);
+ command=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_uftp_command,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -365,21 +366,21 @@ dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *t
}
-static gint
-dissect_unistim_message(proto_tree *unistim_tree,packet_info *pinfo,tvbuff_t *tvb,gint offset){
- guint addr;
- guint msg_len;
+static int
+dissect_unistim_message(proto_tree *unistim_tree,packet_info *pinfo,tvbuff_t *tvb,int offset){
+ unsigned addr;
+ unsigned msg_len;
proto_item *ti;
proto_tree *msg_tree;
msg_tree = proto_tree_add_subtree(unistim_tree,tvb,offset,-1,ett_unistim,&ti,"Unistim CMD");
- addr=tvb_get_guint8(tvb,offset);
+ addr=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_unistim_cmd_add,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;
- msg_len=tvb_get_guint8(tvb,offset);
+ msg_len=tvb_get_uint8(tvb,offset);
if (msg_len<=2)
{
@@ -480,12 +481,12 @@ dissect_unistim_message(proto_tree *unistim_tree,packet_info *pinfo,tvbuff_t *tv
/*DONE*/
-static gint
+static int
dissect_basic_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint basic_cmd;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned basic_cmd;
- basic_cmd=tvb_get_guint8(tvb,offset);
+ basic_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_basic_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -570,11 +571,11 @@ dissect_basic_phone(proto_tree *msg_tree,
return offset;
}
/*DONE*/
-static gint
+static int
dissect_basic_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len){
- guint basic_cmd;
- basic_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb,int offset,unsigned msg_len){
+ unsigned basic_cmd;
+ basic_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_basic_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(basic_cmd){
@@ -649,14 +650,14 @@ dissect_basic_switch(proto_tree *msg_tree,
/*DONE*/
-static gint
+static int
dissect_broadcast_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint bcast_cmd;
- guint year,month,day,hour,minute,second;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned bcast_cmd;
+ unsigned year,month,day,hour,minute,second;
proto_tree *date_tree;
proto_tree *time_tree;
- bcast_cmd=tvb_get_guint8(tvb,offset);
+ bcast_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_broadcast_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(bcast_cmd){
@@ -675,12 +676,12 @@ dissect_broadcast_switch(proto_tree *msg_tree,
break;
case 0x02:
/*Time and Date Download*/
- year=tvb_get_guint8(tvb,offset);
- month=tvb_get_guint8(tvb,offset+1);
- day=tvb_get_guint8(tvb,offset+2);
- hour=tvb_get_guint8(tvb,offset+3);
- minute=tvb_get_guint8(tvb,offset+4);
- second=tvb_get_guint8(tvb,offset+5);
+ year=tvb_get_uint8(tvb,offset);
+ month=tvb_get_uint8(tvb,offset+1);
+ day=tvb_get_uint8(tvb,offset+2);
+ hour=tvb_get_uint8(tvb,offset+3);
+ minute=tvb_get_uint8(tvb,offset+4);
+ second=tvb_get_uint8(tvb,offset+5);
date_tree=proto_tree_add_subtree_format(msg_tree,tvb,offset,3,ett_unistim,NULL,
"Date %i/%i/%i",month,day,year%100);
proto_tree_add_item(date_tree,hf_broadcast_year,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -721,9 +722,9 @@ dissect_broadcast_switch(proto_tree *msg_tree,
return offset;
}
/*DONE Haven't seen any phone broadcasts, wouldn't expect to*/
-static gint
+static int
dissect_broadcast_phone(proto_tree *msg_tree,
- tvbuff_t *tvb, gint offset,guint msg_len){
+ tvbuff_t *tvb, int offset,unsigned msg_len){
proto_tree_add_item(msg_tree,hf_generic_data, tvb,offset,msg_len,ENC_NA);
offset+=msg_len;
@@ -732,17 +733,17 @@ dissect_broadcast_phone(proto_tree *msg_tree,
}
/*DONE*/
-static gint
+static int
dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
- tvbuff_t *tvb, gint offset,guint msg_len){
- guint clear_mask;
- guint highlight_cmd;
- guint time_date_mask;
- guint display_cmd;
- guint address_byte;
- guint movement_byte;
+ tvbuff_t *tvb, int offset,unsigned msg_len){
+ unsigned clear_mask;
+ unsigned highlight_cmd;
+ unsigned time_date_mask;
+ unsigned display_cmd;
+ unsigned address_byte;
+ unsigned movement_byte;
proto_tree *address_tree;
- display_cmd=tvb_get_guint8(tvb,offset);
+ display_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_display_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
@@ -805,7 +806,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
case 0x0f:
/*Clear Field*/
- clear_mask=tvb_get_guint8(tvb,offset);
+ clear_mask=tvb_get_uint8(tvb,offset);
/*need to know which paths to take*/
proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_clear_numeric,
@@ -896,7 +897,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
case 0x10:
/*Cursor Control*/
- movement_byte=tvb_get_guint8(tvb,offset);
+ movement_byte=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_move_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_blink,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -906,7 +907,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
}
if((movement_byte&0x01)==0x01){
- address_byte=tvb_get_guint8(tvb,offset);
+ address_byte=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_write_address_numeric,
tvb,offset,1,ENC_BIG_ENDIAN);
@@ -968,7 +969,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
case 0x17:
/*Time and Date Format*/
- time_date_mask=tvb_get_guint8(tvb,offset);
+ time_date_mask=tvb_get_uint8(tvb,offset);
if((time_date_mask&DISPLAY_USE_TIME_FORMAT)==DISPLAY_USE_TIME_FORMAT){
proto_tree_add_item(msg_tree,hf_display_time_format,tvb,offset,1,ENC_BIG_ENDIAN);
}
@@ -993,7 +994,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
#define F_TAG 4
if((display_cmd&F_ADDR)==F_ADDR){
address_tree=proto_tree_add_subtree(msg_tree,tvb,offset,0,ett_unistim,NULL,"Address Data");
- address_byte=tvb_get_guint8(tvb,offset);
+ address_byte=tvb_get_uint8(tvb,offset);
proto_tree_add_item(address_tree,hf_basic_bit_field,
tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(address_tree,hf_display_write_address_numeric,
@@ -1088,7 +1089,7 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
break;
case 0x23:
/*Highlighted Field Definition*/
- highlight_cmd=tvb_get_guint8(tvb,offset);
+ highlight_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_display_cursor_numeric,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_context ,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_line,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -1186,12 +1187,12 @@ dissect_display_switch(proto_tree *msg_tree, packet_info *pinfo,
return offset;
}
/*DONE*/
-static gint
+static int
dissect_display_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len){
- guint display_cmd;
- guint highlight_cmd;
- display_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb,int offset,unsigned msg_len){
+ unsigned display_cmd;
+ unsigned highlight_cmd;
+ display_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_display_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(display_cmd){
@@ -1238,7 +1239,7 @@ dissect_display_phone(proto_tree *msg_tree,
break;
case 0x03:
/*Highlight Status On*/
- highlight_cmd=tvb_get_guint8(tvb,offset);
+ highlight_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_display_cursor_numeric,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_context ,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_display_cursor_line,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -1298,11 +1299,11 @@ dissect_display_phone(proto_tree *msg_tree,
}
-static gint
+static int
dissect_key_indicator_switch(proto_tree *msg_tree,
- tvbuff_t *tvb, gint offset,guint msg_len){
- guint key_cmd;
- key_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb, int offset,unsigned msg_len){
+ unsigned key_cmd;
+ key_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_key_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(key_cmd){
@@ -1416,21 +1417,21 @@ dissect_key_indicator_switch(proto_tree *msg_tree,
}
/*DONE*/
-static gint
+static int
dissect_key_indicator_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint key_cmd;
- key_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned key_cmd;
+ key_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_key_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(key_cmd){
case 0x00:
/*Key Event*/
/* Set the tap info */
- uinfo->key_state = tvb_get_guint8(tvb,offset);
+ uinfo->key_state = tvb_get_uint8(tvb,offset);
uinfo->key_state >>= 6;
/* Extract the key code */
- uinfo->key_val = (tvb_get_guint8(tvb,offset) & 0x3F);
+ uinfo->key_val = (tvb_get_uint8(tvb,offset) & 0x3F);
proto_tree_add_item(msg_tree,hf_basic_bit_field,tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(msg_tree,hf_key_code,tvb,offset,1,ENC_BIG_ENDIAN);
@@ -1511,13 +1512,13 @@ dissect_key_indicator_phone(proto_tree *msg_tree,
/*Done*/
-static gint
+static int
dissect_network_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint network_cmd;
- guint string_len;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned network_cmd;
+ unsigned string_len;
- network_cmd=tvb_get_guint8(tvb,offset);
+ network_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_network_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(network_cmd){
@@ -1654,13 +1655,13 @@ dissect_network_switch(proto_tree *msg_tree,
}
/*DONE*/
-static gint
+static int
dissect_expansion_switch(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint expansion_cmd;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned expansion_cmd;
- expansion_cmd=tvb_get_guint8(tvb,offset);
+ expansion_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_expansion_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1; msg_len-=1;
switch(expansion_cmd){
@@ -1701,16 +1702,16 @@ dissect_expansion_switch(proto_tree *msg_tree,
return offset;
}
-static gint
+static int
dissect_expansion_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint expansion_cmd;
- guint key_number;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned expansion_cmd;
+ unsigned key_number;
- expansion_cmd=tvb_get_guint8(tvb,offset);
+ expansion_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_expansion_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1; msg_len-=1;
- key_number=(tvb_get_guint8(tvb,offset))-64;
+ key_number=(tvb_get_uint8(tvb,offset))-64;
switch(expansion_cmd){
case 0x59:
@@ -1723,13 +1724,13 @@ dissect_expansion_phone(proto_tree *msg_tree,
return offset;
}
-static gint
+static int
dissect_network_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset, guint msg_len){
- guint network_cmd;
+ tvbuff_t *tvb,int offset, unsigned msg_len){
+ unsigned network_cmd;
proto_tree *server_tree;
- guint i;
- network_cmd=tvb_get_guint8(tvb,offset);
+ unsigned i;
+ network_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_network_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(network_cmd){
@@ -1768,7 +1769,7 @@ dissect_network_phone(proto_tree *msg_tree,
break;
case 0x05:
/*Network Manager Options Report*/
- proto_tree_add_boolean(msg_tree,hf_net_phone_diag,tvb,offset,1,FALSE);
+ proto_tree_add_boolean(msg_tree,hf_net_phone_diag,tvb,offset,1,false);
proto_tree_add_item(msg_tree,hf_net_phone_rudp,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;
break;
@@ -1790,7 +1791,7 @@ dissect_network_phone(proto_tree *msg_tree,
offset+=1;msg_len-=1;
for (i=1; msg_len>8; i++){
/*if less than 9 not full report so punt*/
-/* guint16 port_num;
+/* uint16_t port_num;
port_num=tvb_get_ntohs(tvb,offset);
if(port_num<1064)
break;
@@ -1834,15 +1835,15 @@ dissect_network_phone(proto_tree *msg_tree,
return offset;
}
/*DONE*/
-static gint
+static int
dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
- tvbuff_t *tvb,gint offset,guint msg_len){
+ tvbuff_t *tvb,int offset,unsigned msg_len){
proto_tree *param_tree;
- guint audio_cmd;
- guint apb_op_code;
- guint apb_data_len;
- guint vocoder_param;
- audio_cmd=tvb_get_guint8(tvb,offset);
+ unsigned audio_cmd;
+ unsigned apb_op_code;
+ unsigned apb_data_len;
+ unsigned vocoder_param;
+ audio_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_switch_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(audio_cmd){
@@ -2050,13 +2051,13 @@ dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
proto_tree_add_item(msg_tree,hf_audio_apb_number,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
while(msg_len>0){
- apb_op_code=tvb_get_guint8(tvb,offset);
+ apb_op_code=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_apb_op_code,tvb,
offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
if(apb_op_code>0x39){
/*should have a len + data*/
- apb_data_len=tvb_get_guint8(tvb,offset);
+ apb_data_len=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_apb_param_len,tvb,
offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
@@ -2112,15 +2113,15 @@ dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
proto_tree_add_item(msg_tree,hf_audio_far_ip_add,tvb,offset,4,ENC_BIG_ENDIAN);
offset+=4;msg_len-=4;
{
- guint32 far_ip_addr;
+ uint32_t far_ip_addr;
address far_addr;
- guint16 far_port;
+ uint16_t far_port;
far_ip_addr = tvb_get_ipv4(tvb, offset-4);
set_address(&far_addr, AT_IPv4, 4, &far_ip_addr);
far_port = tvb_get_ntohs(tvb, offset-8);
- rtp_add_address(pinfo, PT_UDP, &far_addr, far_port, 0, "UNISTIM", pinfo->num, FALSE, NULL);
+ rtp_add_address(pinfo, PT_UDP, &far_addr, far_port, 0, "UNISTIM", pinfo->num, false, NULL);
far_port = tvb_get_ntohs(tvb, offset-6);
rtcp_add_address(pinfo, &far_addr, far_port, 0, "UNISTIM", pinfo->num);
@@ -2178,7 +2179,7 @@ dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
offset+=1;msg_len-=1;
while(msg_len>0){
param_tree=proto_tree_add_subtree(msg_tree,tvb,offset,0,ett_unistim,NULL,"Param");
- vocoder_param=tvb_get_guint8(tvb,offset);
+ vocoder_param=tvb_get_uint8(tvb,offset);
proto_tree_add_item(param_tree,hf_basic_bit_field,
tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(param_tree,hf_audio_vocoder_param,
@@ -2270,15 +2271,15 @@ dissect_audio_switch(proto_tree *msg_tree,packet_info *pinfo,
}
/*DONE*/
-static gint
+static int
dissect_audio_phone(proto_tree *msg_tree,
- tvbuff_t *tvb,gint offset,guint msg_len){
- guint audio_cmd;
- guint apb_op_code;
- guint apb_data_len;
- guint stream_dir;
- guint stream_state;
- audio_cmd=tvb_get_guint8(tvb,offset);
+ tvbuff_t *tvb,int offset,unsigned msg_len){
+ unsigned audio_cmd;
+ unsigned apb_op_code;
+ unsigned apb_data_len;
+ unsigned stream_dir;
+ unsigned stream_state;
+ audio_cmd=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_phone_cmd,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
switch(audio_cmd){
@@ -2415,12 +2416,12 @@ dissect_audio_phone(proto_tree *msg_tree,
break;
case 0x13:
/*Audio Stream Status Report*/
- stream_dir=tvb_get_guint8(tvb,offset);
+ stream_dir=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_stream_direction_code,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
proto_tree_add_item(msg_tree,hf_audio_mgr_stream_id,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
- stream_state=tvb_get_guint8(tvb,offset);
+ stream_state=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_stream_state,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
if((AUDIO_STREAM_STATE&stream_state)!=AUDIO_STREAM_STATE)
@@ -2462,13 +2463,13 @@ dissect_audio_phone(proto_tree *msg_tree,
proto_tree_add_item(msg_tree,hf_audio_apb_number,tvb,offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
while(msg_len>0){
- apb_op_code=tvb_get_guint8(tvb,offset);
+ apb_op_code=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_apb_op_code,tvb,
offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
if(apb_op_code>0x39){
/*should have a len + data*/
- apb_data_len=tvb_get_guint8(tvb,offset);
+ apb_data_len=tvb_get_uint8(tvb,offset);
proto_tree_add_item(msg_tree,hf_audio_apb_param_len,tvb,
offset,1,ENC_BIG_ENDIAN);
offset+=1;msg_len-=1;
@@ -2744,23 +2745,23 @@ proto_register_unistim(void){
},
{ &hf_basic_switch_query_attr,
{"Query Basic Manager Attributes","unistim.basic.attrs",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_ATTRIBUTES,"Basic Query Attributes",HFILL}
+ 8,NULL,BASIC_QUERY_ATTRIBUTES,NULL,HFILL}
},
{ &hf_basic_switch_query_opts,
{"Query Basic Manager Options","unistim.basic.opts",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_OPTIONS,"Basic Query Options",HFILL}
+ 8,NULL,BASIC_QUERY_OPTIONS,NULL,HFILL}
},
{ &hf_basic_switch_query_fw,
{"Query Basic Switch Firmware","unistim.basic.fw",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_FW,"Basic Query Firmware",HFILL}
+ 8,NULL,BASIC_QUERY_FW,NULL,HFILL}
},
{ &hf_basic_switch_query_hw_id,
{"Query Basic Manager Hardware ID","unistim.basic.hwid",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_HW_ID,"Basic Query Hardware ID",HFILL}
+ 8,NULL,BASIC_QUERY_HW_ID,NULL,HFILL}
},
{ &hf_basic_switch_query_it_type,
{"Query Basic Manager Phone Type","unistim.basic.type",FT_BOOLEAN,
- 8,NULL,BASIC_QUERY_IT_TYPE,"Basic Query Phone Type",HFILL}
+ 8,NULL,BASIC_QUERY_IT_TYPE,NULL,HFILL}
},
{ &hf_basic_switch_query_prod_eng_code,
{"Query Basic Manager Prod Eng Code","unistim.basic.code",FT_BOOLEAN,
@@ -3826,7 +3827,7 @@ proto_register_unistim(void){
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_unistim
};
diff --git a/plugins/epan/unistim/packet-unistim.h b/plugins/epan/unistim/packet-unistim.h
index b1462a6ac1..0eb8db94f7 100644
--- a/plugins/epan/unistim/packet-unistim.h
+++ b/plugins/epan/unistim/packet-unistim.h
@@ -15,22 +15,22 @@
typedef struct _unistim_info_t
{
- guint8 rudp_type; /* NAK, ACK, Payload */
- guint8 payload_type; /* unistim payload type (aggregate, non-aggregate, encapsulated) */
- guint32 sequence; /* rudp sequence number */
- guint32 termid; /* termid if available */
+ uint8_t rudp_type; /* NAK, ACK, Payload */
+ uint8_t payload_type; /* unistim payload type (aggregate, non-aggregate, encapsulated) */
+ uint32_t sequence; /* rudp sequence number */
+ uint32_t termid; /* termid if available */
address it_ip; /* IP addr of it, determined by who is sending termids */
- guint32 it_port; /* port of it (phone) */
+ uint32_t it_port; /* port of it (phone) */
address ni_ip; /* IP addr of ni (server) as determined by who's sending termids */
- gint key_val; /* actual key pressed (-1 if not used) */
- gint key_state; /* Key state 1=down 0=up */
- gint hook_state; /* Hook state 1=offhook 0=onhook */
- gint stream_connect; /* Audio stream connect 1=connect 0=disconnect */
- gint trans_connect; /* Transducer connect? 1=connect 0=disconnect */
- gint set_termid; /* Set the termid 1=set termid */
- const guint8 *string_data; /* Any time a string is written to the display, this has the string */
- gint call_state; /* Not used? */
- guchar *key_buffer; /* Used in voip-calls.c tap, holds call keys pressed */
+ int key_val; /* actual key pressed (-1 if not used) */
+ int key_state; /* Key state 1=down 0=up */
+ int hook_state; /* Hook state 1=offhook 0=onhook */
+ int stream_connect; /* Audio stream connect 1=connect 0=disconnect */
+ int trans_connect; /* Transducer connect? 1=connect 0=disconnect */
+ int set_termid; /* Set the termid 1=set termid */
+ const uint8_t *string_data; /* Any time a string is written to the display, this has the string */
+ int call_state; /* Not used? */
+ unsigned char *key_buffer; /* Used in voip-calls.c tap, holds call keys pressed */
} unistim_info_t;
#endif
diff --git a/plugins/epan/wimax/CMakeLists.txt b/plugins/epan/wimax/CMakeLists.txt
index 15fee28525..50c3a7a34b 100644
--- a/plugins/epan/wimax/CMakeLists.txt
+++ b/plugins/epan/wimax/CMakeLists.txt
@@ -75,12 +75,11 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "WiMax Protocol dissector"
${DISSECTOR_SRC}
${DISSECTOR_SUPPORT_SRC}
)
-add_wireshark_epan_plugin_library(wimax)
+add_wireshark_plugin_library(wimax epan)
target_link_libraries(wimax epan)
diff --git a/plugins/epan/wimax/README.wimax b/plugins/epan/wimax/README.wimax
index 4f7981fc72..6dbe21586c 100644
--- a/plugins/epan/wimax/README.wimax
+++ b/plugins/epan/wimax/README.wimax
@@ -70,7 +70,7 @@ Example: call_dissector(mgt_msg_handle, mgt_msg_tvb, pinfo, mgt_msg_tree);
Notes
--------
-1. All the burst data has to be defraged before passing it to the
+1. All the burst data has to be defragged before passing it to the
WiMax burst dissectors.
2. The wimax_pdu_burst_handler will automatically call
diff --git a/plugins/epan/wimax/crc.c b/plugins/epan/wimax/crc.c
index 4bc74a2a49..0aacc4d652 100644
--- a/plugins/epan/wimax/crc.c
+++ b/plugins/epan/wimax/crc.c
@@ -21,10 +21,10 @@
#define CRC16_INITIAL_VALUE 0xFFFF
#ifndef STATIC_DATA
-static guint8 crc8_table[256];
-static guint32 crc32_table[256];
+static uint8_t crc8_table[256];
+static uint32_t crc32_table[256];
-extern guint16 crc16_table[256];
+extern uint16_t crc16_table[256];
/*
void wimax_mac_gen_crc32_table(void)
@@ -43,8 +43,8 @@ extern guint16 crc16_table[256];
*/
void wimax_mac_gen_crc32_table(void)
{
- guint32 i, bit;
- guint32 crc;
+ uint32_t i, bit;
+ uint32_t crc;
/* little-endian (reflected) algorithm */
for ( i = 0; i < G_N_ELEMENTS(crc32_table); i++ )
@@ -78,8 +78,8 @@ void wimax_mac_gen_crc32_table(void)
*/
void wimax_mac_gen_crc8_table(void)
{
- guint i, bit;
- guint8 crc;
+ unsigned i, bit;
+ uint8_t crc;
for ( i = 0; i < G_N_ELEMENTS(crc8_table); i++ )
{
@@ -98,7 +98,7 @@ void wimax_mac_gen_crc8_table(void)
/*
- guint32 wimax_mac_calc_crc32(guint8 *data, guint data_len)
+ uint32_t wimax_mac_calc_crc32(uint8_t *data, unsigned data_len)
REQUIRES: wimax_mac_gen_crc32_table() must be called before
@@ -112,14 +112,14 @@ void wimax_mac_gen_crc8_table(void)
SIDE EFFECTS:
*/
-guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len)
+uint32_t wimax_mac_calc_crc32(const uint8_t *data, unsigned data_len)
{
- guint32 crc=CRC32_INITIAL_VALUE;
- guint i, j;
+ uint32_t crc=CRC32_INITIAL_VALUE;
+ unsigned i, j;
for ( j = 0; j < data_len; j++ )
{
- i = ( (guint8)(crc>>24) ^ data[j] ) & 0xff;
+ i = ( (uint8_t)(crc>>24) ^ data[j] ) & 0xff;
crc = ( crc<<8 ) ^ crc32_table[i];
}
return ~crc;
@@ -127,7 +127,7 @@ guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len)
/*
- guint16 wimax_mac_calc_crc16(guint8 *data, guint data_len)
+ uint16_t wimax_mac_calc_crc16(uint8_t *data, unsigned data_len)
REQUIRES: crc16_table[] in crc_data.c
@@ -141,10 +141,10 @@ guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len)
SIDE EFFECTS:
*/
-guint16 wimax_mac_calc_crc16(const guint8 *data, guint data_len)
+uint16_t wimax_mac_calc_crc16(const uint8_t *data, unsigned data_len)
{
- guint32 crc=CRC16_INITIAL_VALUE;
- guint j;
+ uint32_t crc=CRC16_INITIAL_VALUE;
+ unsigned j;
for ( j = 0; j < data_len; j++ )
{
@@ -158,7 +158,7 @@ guint16 wimax_mac_calc_crc16(const guint8 *data, guint data_len)
/*
- guint8 wimax_mac_calc_crc8(guint8 *data, guint data_len)
+ uint8_t wimax_mac_calc_crc8(uint8_t *data, unsigned data_len)
REQUIRES: wimax_mac_gen_crc8_table() must be called before
@@ -172,10 +172,10 @@ guint16 wimax_mac_calc_crc16(const guint8 *data, guint data_len)
SIDE EFFECTS:
*/
-guint8 wimax_mac_calc_crc8(const guint8 *data, guint data_len)
+uint8_t wimax_mac_calc_crc8(const uint8_t *data, unsigned data_len)
{
- guint8 crc=0;
- guint i;
+ uint8_t crc=0;
+ unsigned i;
for(i = 0; i < data_len; i++)
{
diff --git a/plugins/epan/wimax/crc.h b/plugins/epan/wimax/crc.h
index 43c5faf186..eaf2f6f47f 100644
--- a/plugins/epan/wimax/crc.h
+++ b/plugins/epan/wimax/crc.h
@@ -16,18 +16,19 @@
#define CRC_H
#include <glib.h>
+#include <stdint.h>
/* use lookup tables to compute CRC values */
#ifdef STATIC_DATA
-extern guint8 crc8_table[];
-extern guint32 crc32_table[];
+extern uint8_t crc8_table[];
+extern uint32_t crc32_table[];
#else
void wimax_mac_gen_crc32_table(void);
void wimax_mac_gen_crc8_table(void);
#endif
-guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len);
-guint16 wimax_mac_calc_crc16(const guint8 *data, guint data_len);
-guint8 wimax_mac_calc_crc8(const guint8 *data, guint data_len);
+uint32_t wimax_mac_calc_crc32(const uint8_t *data, unsigned data_len);
+uint16_t wimax_mac_calc_crc16(const uint8_t *data, unsigned data_len);
+uint8_t wimax_mac_calc_crc8(const uint8_t *data, unsigned data_len);
#endif /* CRC_H */
diff --git a/plugins/epan/wimax/crc_data.c b/plugins/epan/wimax/crc_data.c
index 0dcc8b275e..b399cf3c39 100644
--- a/plugins/epan/wimax/crc_data.c
+++ b/plugins/epan/wimax/crc_data.c
@@ -16,9 +16,7 @@
#ifdef STATIC_DATA
-#include <glib.h>
-
-guint32 crc32_table[256] = {
+uint32_t crc32_table[256] = {
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,
0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005,
0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
@@ -86,7 +84,7 @@ guint32 crc32_table[256] = {
};
-guint8 hcs_table[256] = {
+uint8_t hcs_table[256] = {
0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15,
0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d,
0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65,
@@ -122,7 +120,7 @@ guint8 hcs_table[256] = {
};
#endif
-guint16 crc16_table[256] = {
+uint16_t crc16_table[256] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,
diff --git a/plugins/epan/wimax/mac_hd_generic_decoder.c b/plugins/epan/wimax/mac_hd_generic_decoder.c
index 6bf8bf6fa5..8c69eb7732 100644
--- a/plugins/epan/wimax/mac_hd_generic_decoder.c
+++ b/plugins/epan/wimax/mac_hd_generic_decoder.c
@@ -36,68 +36,68 @@
void proto_reg_handoff_mac_header_generic(void);
-extern gint proto_wimax;
+extern int proto_wimax;
-extern gint seen_a_service_type;
-extern gboolean first_gmh; /* defined in wimax_pdu_decoder.c */
+extern int seen_a_service_type;
+extern bool first_gmh; /* defined in wimax_pdu_decoder.c */
-extern gint8 arq_enabled; /* declared in packet-wmx.c */
-extern gint scheduling_service_type; /* declared in packet-wmx.c */
+extern int8_t arq_enabled; /* declared in packet-wmx.c */
+extern int scheduling_service_type; /* declared in packet-wmx.c */
extern address bs_address; /* declared in packet-wmx.c */
-extern guint max_logical_bands; /* declared in wimax_compact_dlmap_ie_decoder.c */
+extern unsigned max_logical_bands; /* declared in wimax_compact_dlmap_ie_decoder.c */
-static dissector_handle_t mac_mgmt_msg_decoder_handle = NULL;
-static dissector_handle_t mac_ip_handle = NULL;
+static dissector_handle_t mac_mgmt_msg_decoder_handle;
+static dissector_handle_t mac_ip_handle;
/* global variables */
-gboolean include_cor2_changes = FALSE;
+bool include_cor2_changes;
/* Well-known CIDs */
-guint cid_initial_ranging = 0x0000;
-guint global_cid_max_basic = 320;
-guint cid_max_primary = 640;
-guint cid_aas_ranging = 0xFeFF;
-guint cid_normal_multicast = 0xFFFa;
-guint cid_sleep_multicast = 0xFFFb;
-guint cid_idle_multicast = 0xFFFc;
-guint cid_frag_broadcast = 0xFFFd;
-guint cid_padding = 0xFFFe;
-guint cid_broadcast = 0xFFFF;
+unsigned cid_initial_ranging = 0x0000;
+unsigned global_cid_max_basic = 320;
+unsigned cid_max_primary = 640;
+unsigned cid_aas_ranging = 0xFeFF;
+unsigned cid_normal_multicast = 0xFFFa;
+unsigned cid_sleep_multicast = 0xFFFb;
+unsigned cid_idle_multicast = 0xFFFc;
+unsigned cid_frag_broadcast = 0xFFFd;
+unsigned cid_padding = 0xFFFe;
+unsigned cid_broadcast = 0xFFFF;
/* Maximum number of CID's */
#define MAX_CID 64
/* forward reference */
-static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-static gint arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *parent_item);
+static int extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+static int arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *parent_item);
/* Static variables */
static reassembly_table payload_reassembly_table;
-gint proto_mac_header_generic_decoder;
-static gint ett_mac_header_generic_decoder;
-/* static gint ett_mac_subheader_decoder; */
-static gint ett_mac_mesh_subheader_decoder;
-static gint ett_mac_frag_subheader_decoder;
-static gint ett_mac_grant_mgmt_subheader_decoder;
-static gint ett_mac_pkt_subheader_decoder;
-static gint ett_mac_fast_fb_subheader_decoder;
-static gint ett_mac_ext_subheader_decoder;
-static gint ett_mac_ext_subheader_dl_decoder;
-static gint ett_mac_ext_subheader_ul_decoder;
-static gint ett_mac_arq_fb_payload_decoder;
-static gint ett_mac_data_pdu_decoder;
-static gint hf_mac_header_generic_value_bytes;
-
-static guint frag_type, frag_len;
-static guint extended_type, arq_fb_payload, seq_number;
-
-static guint cid_adjust[MAX_CID]; /* Must not start with 0 */
-static guint cid_vernier[MAX_CID];
-static guint cid_adj_array_size = 0;
-static guint *cid_adj_array = NULL;
-static guint8 *frag_num_array = NULL;
+int proto_mac_header_generic_decoder;
+static int ett_mac_header_generic_decoder;
+/* static int ett_mac_subheader_decoder; */
+static int ett_mac_mesh_subheader_decoder;
+static int ett_mac_frag_subheader_decoder;
+static int ett_mac_grant_mgmt_subheader_decoder;
+static int ett_mac_pkt_subheader_decoder;
+static int ett_mac_fast_fb_subheader_decoder;
+static int ett_mac_ext_subheader_decoder;
+static int ett_mac_ext_subheader_dl_decoder;
+static int ett_mac_ext_subheader_ul_decoder;
+static int ett_mac_arq_fb_payload_decoder;
+static int ett_mac_data_pdu_decoder;
+static int hf_mac_header_generic_value_bytes;
+
+static unsigned frag_type, frag_len;
+static unsigned extended_type, arq_fb_payload, seq_number;
+
+static unsigned cid_adjust[MAX_CID]; /* Must not start with 0 */
+static unsigned cid_vernier[MAX_CID];
+static unsigned cid_adj_array_size;
+static unsigned *cid_adj_array;
+static uint8_t *frag_num_array;
static address save_src;
static address save_dst;
@@ -369,21 +369,21 @@ static const value_string fb_types[] =
};
/* common fields */
-static gint hf_mac_header_generic_ext_subheader_rsv;
+static int hf_mac_header_generic_ext_subheader_rsv;
/* DL sub-header */
-static gint hf_mac_header_generic_ext_subheader_type_dl;
-static gint hf_mac_header_generic_ext_subheader_sdu_sn;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_pscid;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_op;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_fswe;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_fswb;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_rsv;
-static gint hf_mac_header_generic_ext_subheader_fb_req_uiuc;
-static gint hf_mac_header_generic_ext_subheader_fb_req_fb_type;
-static gint hf_mac_header_generic_ext_subheader_fb_req_ofdma_symbol_offset;
-static gint hf_mac_header_generic_ext_subheader_fb_req_subchannel_offset;
-static gint hf_mac_header_generic_ext_subheader_fb_req_slots;
-static gint hf_mac_header_generic_ext_subheader_fb_req_frame_offset;
+static int hf_mac_header_generic_ext_subheader_type_dl;
+static int hf_mac_header_generic_ext_subheader_sdu_sn;
+static int hf_mac_header_generic_ext_subheader_dl_sleep_control_pscid;
+static int hf_mac_header_generic_ext_subheader_dl_sleep_control_op;
+static int hf_mac_header_generic_ext_subheader_dl_sleep_control_fswe;
+static int hf_mac_header_generic_ext_subheader_dl_sleep_control_fswb;
+static int hf_mac_header_generic_ext_subheader_dl_sleep_control_rsv;
+static int hf_mac_header_generic_ext_subheader_fb_req_uiuc;
+static int hf_mac_header_generic_ext_subheader_fb_req_fb_type;
+static int hf_mac_header_generic_ext_subheader_fb_req_ofdma_symbol_offset;
+static int hf_mac_header_generic_ext_subheader_fb_req_subchannel_offset;
+static int hf_mac_header_generic_ext_subheader_fb_req_slots;
+static int hf_mac_header_generic_ext_subheader_fb_req_frame_offset;
/* DL Sleep Control Operations */
static const value_string dl_sleep_control_ops[] =
@@ -394,24 +394,24 @@ static const value_string dl_sleep_control_ops[] =
};
/* UL sub-header */
-static gint hf_mac_header_generic_ext_subheader_type_ul;
-static gint hf_mac_header_generic_ext_subheader_mimo_mode_fb_type;
-static gint hf_mac_header_generic_ext_subheader_mimo_fb_content;
-static gint hf_mac_header_generic_ext_subheader_ul_tx_pwr_rep;
-static gint hf_mac_header_generic_ext_subheader_mini_fb_type;
-static gint hf_mac_header_generic_ext_subheader_mini_fb_content;
+static int hf_mac_header_generic_ext_subheader_type_ul;
+static int hf_mac_header_generic_ext_subheader_mimo_mode_fb_type;
+static int hf_mac_header_generic_ext_subheader_mimo_fb_content;
+static int hf_mac_header_generic_ext_subheader_ul_tx_pwr_rep;
+static int hf_mac_header_generic_ext_subheader_mini_fb_type;
+static int hf_mac_header_generic_ext_subheader_mini_fb_content;
/* common fields */
-static gint hf_mac_header_generic_ext_subheader_pdu_sn_short;
-static gint hf_mac_header_generic_ext_subheader_pdu_sn_long;
+static int hf_mac_header_generic_ext_subheader_pdu_sn_short;
+static int hf_mac_header_generic_ext_subheader_pdu_sn_long;
/* SN Request subheader */
#define SN_REQUEST_SUBHEADER_SN_REPORT_INDICATION_1_MASK 0x01
#define SN_REQUEST_SUBHEADER_SN_REPORT_INDICATION_2_MASK 0x02
#define SN_REQUEST_SUBHEADER_RESERVED_MASK 0xFC
-static gint hf_mac_header_generic_ext_subheader_sn_req_rep_ind_1;
-static gint hf_mac_header_generic_ext_subheader_sn_req_rep_ind_2;
-static gint hf_mac_header_generic_ext_subheader_sn_req_rsv;
+static int hf_mac_header_generic_ext_subheader_sn_req_rep_ind_1;
+static int hf_mac_header_generic_ext_subheader_sn_req_rep_ind_2;
+static int hf_mac_header_generic_ext_subheader_sn_req_rsv;
/* SN Report Indication message */
static const value_string sn_rep_msg[] =
{
@@ -421,7 +421,7 @@ static const value_string sn_rep_msg[] =
};
/* Mesh Subheader */
-static gint hf_mac_header_generic_mesh_subheader;
+static int hf_mac_header_generic_mesh_subheader;
/* Fragmentation Subheader (table 8) */
#define FRAGMENTATION_SUBHEADER_FC_MASK 0xC000 /*0x0003*/
@@ -438,13 +438,13 @@ static gint hf_mac_header_generic_mesh_subheader;
#define FIRST_FRAG 2
#define MIDDLE_FRAG 3
-static gint hf_mac_header_generic_frag_subhd_fc;
-static gint hf_mac_header_generic_frag_subhd_fc_ext;
-static gint hf_mac_header_generic_frag_subhd_bsn;
-static gint hf_mac_header_generic_frag_subhd_fsn;
-static gint hf_mac_header_generic_frag_subhd_fsn_ext;
-static gint hf_mac_header_generic_frag_subhd_rsv;
-static gint hf_mac_header_generic_frag_subhd_rsv_ext;
+static int hf_mac_header_generic_frag_subhd_fc;
+static int hf_mac_header_generic_frag_subhd_fc_ext;
+static int hf_mac_header_generic_frag_subhd_bsn;
+static int hf_mac_header_generic_frag_subhd_fsn;
+static int hf_mac_header_generic_frag_subhd_fsn_ext;
+static int hf_mac_header_generic_frag_subhd_rsv;
+static int hf_mac_header_generic_frag_subhd_rsv_ext;
/* Fragment Types */
static const value_string frag_types[] =
@@ -465,20 +465,20 @@ static const value_string frag_types[] =
#define FRAG_LENGTH_MASK 0x0007FF00
-static gint hf_mac_header_generic_packing_subhd_fc;
-static gint hf_mac_header_generic_packing_subhd_fc_ext;
-static gint hf_mac_header_generic_packing_subhd_bsn;
-static gint hf_mac_header_generic_packing_subhd_fsn;
-static gint hf_mac_header_generic_packing_subhd_fsn_ext;
-static gint hf_mac_header_generic_packing_subhd_len;
-static gint hf_mac_header_generic_packing_subhd_len_ext;
+static int hf_mac_header_generic_packing_subhd_fc;
+static int hf_mac_header_generic_packing_subhd_fc_ext;
+static int hf_mac_header_generic_packing_subhd_bsn;
+static int hf_mac_header_generic_packing_subhd_fsn;
+static int hf_mac_header_generic_packing_subhd_fsn_ext;
+static int hf_mac_header_generic_packing_subhd_len;
+static int hf_mac_header_generic_packing_subhd_len_ext;
/* Fast-feedback Allocation Subheader (table 13) */
#define FAST_FEEDBACK_ALLOCATION_OFFSET_MASK 0xFC /*0x3F*/
#define FAST_FEEDBACK_FEEDBACK_TYPE_MASK 0x03 /*0xC0*/
-static gint hf_mac_header_generic_fast_fb_subhd_alloc_offset;
-static gint hf_mac_header_generic_fast_fb_subhd_fb_type;
+static int hf_mac_header_generic_fast_fb_subhd_alloc_offset;
+static int hf_mac_header_generic_fast_fb_subhd_fb_type;
/* Grant Management Subheader (table 9 & 10) */
#define GRANT_MGMT_SUBHEADER_UGS_SI_MASK 0x8000 /*0x0001*/
@@ -501,18 +501,18 @@ typedef enum
SCHEDULE_SERVICE_TYPE_UGS
} SCHEDULE_SERVICE_TYPE_e;
-static gint hf_mac_header_generic_grant_mgmt_ugs_tree;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_si;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_pm;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_fli;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_fl;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_rsv;
-static gint hf_mac_header_generic_grant_mgmt_ext_rtps_tree;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ext_pbr;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ext_fli;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ext_fl;
-static gint hf_mac_header_generic_grant_mgmt_ext_pbr_tree;
-static gint hf_mac_header_generic_grant_mgmt_subhd_pbr;
+static int hf_mac_header_generic_grant_mgmt_ugs_tree;
+static int hf_mac_header_generic_grant_mgmt_subhd_ugs_si;
+static int hf_mac_header_generic_grant_mgmt_subhd_ugs_pm;
+static int hf_mac_header_generic_grant_mgmt_subhd_ugs_fli;
+static int hf_mac_header_generic_grant_mgmt_subhd_ugs_fl;
+static int hf_mac_header_generic_grant_mgmt_subhd_ugs_rsv;
+static int hf_mac_header_generic_grant_mgmt_ext_rtps_tree;
+static int hf_mac_header_generic_grant_mgmt_subhd_ext_pbr;
+static int hf_mac_header_generic_grant_mgmt_subhd_ext_fli;
+static int hf_mac_header_generic_grant_mgmt_subhd_ext_fl;
+static int hf_mac_header_generic_grant_mgmt_ext_pbr_tree;
+static int hf_mac_header_generic_grant_mgmt_subhd_pbr;
/* Slip Indicators */
static const value_string si_msgs[] =
@@ -555,23 +555,23 @@ static const value_string fli_msgs[] =
#define ARQ_FB_IE_SEQ2_LENGTH_6_MASK 0x007E /*0x7E00*/
#define ARQ_FB_IE_RSV_MASK 0x0001 /*0x8000*/
-static gint hf_mac_header_generic_arq_fb_ie_cid;
-static gint hf_mac_header_generic_arq_fb_ie_last;
-static gint hf_mac_header_generic_arq_fb_ie_ack_type;
-static gint hf_mac_header_generic_arq_fb_ie_bsn;
-static gint hf_mac_header_generic_arq_fb_ie_num_maps;
-static gint hf_ack_type_reserved;
-static gint hf_mac_header_generic_arq_fb_ie_sel_ack_map;
-static gint hf_mac_header_generic_arq_fb_ie_seq_format;
-static gint hf_mac_header_generic_arq_fb_ie_seq_ack_map;
-static gint hf_mac_header_generic_arq_fb_ie_seq1_length;
-static gint hf_mac_header_generic_arq_fb_ie_seq2_length;
-static gint hf_mac_header_generic_arq_fb_ie_seq3_length;
-static gint hf_mac_header_generic_arq_fb_ie_seq_ack_map_2;
-static gint hf_mac_header_generic_arq_fb_ie_seq1_length_6;
-static gint hf_mac_header_generic_arq_fb_ie_seq2_length_6;
-static gint hf_mac_header_generic_arq_fb_ie_rsv;
-static gint hf_mac_header_payload_fragment;
+static int hf_mac_header_generic_arq_fb_ie_cid;
+static int hf_mac_header_generic_arq_fb_ie_last;
+static int hf_mac_header_generic_arq_fb_ie_ack_type;
+static int hf_mac_header_generic_arq_fb_ie_bsn;
+static int hf_mac_header_generic_arq_fb_ie_num_maps;
+static int hf_ack_type_reserved;
+static int hf_mac_header_generic_arq_fb_ie_sel_ack_map;
+static int hf_mac_header_generic_arq_fb_ie_seq_format;
+static int hf_mac_header_generic_arq_fb_ie_seq_ack_map;
+static int hf_mac_header_generic_arq_fb_ie_seq1_length;
+static int hf_mac_header_generic_arq_fb_ie_seq2_length;
+static int hf_mac_header_generic_arq_fb_ie_seq3_length;
+static int hf_mac_header_generic_arq_fb_ie_seq_ack_map_2;
+static int hf_mac_header_generic_arq_fb_ie_seq1_length_6;
+static int hf_mac_header_generic_arq_fb_ie_seq2_length_6;
+static int hf_mac_header_generic_arq_fb_ie_rsv;
+static int hf_mac_header_payload_fragment;
static expert_field ei_mac_crc_malformed;
static expert_field ei_mac_crc_missing;
@@ -598,7 +598,7 @@ static const value_string plugin_proto_checksum_vals[] = {
/* Register Wimax defrag table init routine. */
static void wimax_defragment_init(void)
{
- gint i;
+ int i;
/* Init fragmentation variables. */
for (i = 0; i < MAX_CID; i++)
@@ -627,11 +627,11 @@ static void wimax_defragment_cleanup(void)
frag_num_array = NULL;
}
-static guint decode_packing_subheader(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree *tree, guint payload_length _U_, guint payload_offset, proto_item *parent_item)
+static unsigned decode_packing_subheader(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree *tree, unsigned payload_length _U_, unsigned payload_offset, proto_item *parent_item)
{
proto_item *generic_item = NULL;
proto_tree *generic_tree = NULL;
- guint starting_offset = payload_offset;
+ unsigned starting_offset = payload_offset;
/* update the info column */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Packing subhdr");
@@ -643,7 +643,7 @@ static guint decode_packing_subheader(tvbuff_t *payload_tvb, packet_info *pinfo,
generic_tree = proto_item_add_subtree(generic_item, ett_mac_pkt_subheader_decoder);
/* decode and display the Packing subheader */
/* Get the fragment type */
- frag_type = (tvb_get_guint8(payload_tvb, payload_offset) & FRAGMENT_TYPE_MASK) >> 6;
+ frag_type = (tvb_get_uint8(payload_tvb, payload_offset) & FRAGMENT_TYPE_MASK) >> 6;
/* if ARQ Feedback payload is present */
if (arq_fb_payload)
{ /* get the frag length */
@@ -675,7 +675,7 @@ static guint decode_packing_subheader(tvbuff_t *payload_tvb, packet_info *pinfo,
{ /* get the frag length */
frag_len = (tvb_get_ntohs(payload_tvb, payload_offset) & PACKING_SUBHEADER_LENGTH_MASK);
/* get the sequence number */
- seq_number = (tvb_get_guint8(payload_tvb, payload_offset) & SEQ_NUMBER_MASK) >> 3;
+ seq_number = (tvb_get_uint8(payload_tvb, payload_offset) & SEQ_NUMBER_MASK) >> 3;
proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_fc, payload_tvb, payload_offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_fsn, payload_tvb, payload_offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(generic_tree, hf_mac_header_generic_packing_subhd_len, payload_tvb, payload_offset, 2, ENC_BIG_ENDIAN);
@@ -685,7 +685,7 @@ static guint decode_packing_subheader(tvbuff_t *payload_tvb, packet_info *pinfo,
}
}
/* Prevent a crash! */
- if ((gint)frag_len < 0)
+ if ((int)frag_len < 0)
frag_len = 0;
/* Return the number of bytes decoded. */
return payload_offset - starting_offset;
@@ -694,24 +694,24 @@ static guint decode_packing_subheader(tvbuff_t *payload_tvb, packet_info *pinfo,
static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint payload_offset;
- guint payload_length = 0;
+ unsigned offset = 0;
+ unsigned payload_offset;
+ unsigned payload_length = 0;
- static guint8 frag_number[MAX_CID];
- static guint cid_list[MAX_CID];
- static guint cid_base;
+ static uint8_t frag_number[MAX_CID];
+ static unsigned cid_list[MAX_CID];
+ static unsigned cid_base;
static const char reassem_str[] = "Reassembled Data transport PDU (%u bytes)";
static const char data_str[] = "Data transport PDU (%u bytes)";
const char *str_ptr;
- gint length, i, cid_index;
- guint tvb_len, ret_length, ubyte, new_tvb_len;
- guint new_payload_len = 0;
- guint /*mac_ht,*/ mac_ec, mac_esf, mac_ci, /*mac_eks,*/ mac_len, mac_cid, cid;
- guint ffb_grant_mgmt_subheader, packing_subheader, fragment_subheader;
- guint mesh_subheader;
- guint packing_length;
- guint32 mac_crc, calculated_crc;
+ int length, i, cid_index;
+ unsigned tvb_len, ret_length, ubyte, new_tvb_len;
+ unsigned new_payload_len = 0;
+ unsigned /*mac_ht,*/ mac_ec, mac_esf, mac_ci, /*mac_eks,*/ mac_len, mac_cid, cid;
+ unsigned ffb_grant_mgmt_subheader, packing_subheader, fragment_subheader;
+ unsigned mesh_subheader;
+ unsigned packing_length;
+ uint32_t mac_crc, calculated_crc;
proto_item *parent_item = NULL;
proto_item *generic_item = NULL;
proto_tree *generic_tree = NULL;
@@ -720,7 +720,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
tvbuff_t *payload_tvb;
tvbuff_t *data_pdu_tvb;
fragment_head *payload_frag;
- gboolean first_arq_fb_payload = TRUE;
+ bool first_arq_fb_payload = true;
proto_mac_header_generic_decoder = proto_wimax;
@@ -751,7 +751,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
generic_tree = proto_item_add_subtree(generic_item, ett_mac_header_generic_decoder);
/* Decode and display the MAC header */
/* Get the first byte */
- ubyte = tvb_get_guint8(tvb, offset);
+ ubyte = tvb_get_uint8(tvb, offset);
/* get the Header Type (HT) */
/*mac_ht = ((ubyte & WIMAX_MAC_HEADER_GENERIC_HT_MASK)?1:0); XX: not used ?? */
/* get the Encryption Control (EC) */
@@ -764,7 +764,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
arq_fb_payload = ((ubyte & GENERIC_SUB_TYPE_4)?1:0);
mesh_subheader = ((ubyte & GENERIC_SUB_TYPE_5)?1:0);
/* Get the 2nd byte */
- ubyte = tvb_get_guint8(tvb, (offset+1));
+ ubyte = tvb_get_uint8(tvb, (offset+1));
/* get the Extended subheader field (ESF) */
mac_esf = ((ubyte & WIMAX_MAC_HEADER_GENERIC_ESF_MASK)?1:0);
/* get the CRC indicator (CI) */
@@ -814,7 +814,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
{
if (mac_ci)
{
- if (length >= (gint)sizeof(mac_crc))
+ if (length >= (int)sizeof(mac_crc))
{
length -= (int)sizeof(mac_crc);
}
@@ -932,7 +932,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
/* add Fragmentation subheader subtree */
generic_tree = proto_item_add_subtree(generic_item, ett_mac_frag_subheader_decoder);
/* Get the fragment type */
- frag_type = (tvb_get_guint8(tvb, offset) & FRAGMENT_TYPE_MASK) >> 6;
+ frag_type = (tvb_get_uint8(tvb, offset) & FRAGMENT_TYPE_MASK) >> 6;
if (arq_fb_payload)
{ /* get the sequence number */
seq_number = (tvb_get_ntohs(tvb, offset) & SEQ_NUMBER_MASK_11) >> 3;
@@ -959,7 +959,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
}
else
{ /* get the sequence number */
- seq_number = (tvb_get_guint8(tvb, offset) & SEQ_NUMBER_MASK) >> 3;
+ seq_number = (tvb_get_uint8(tvb, offset) & SEQ_NUMBER_MASK) >> 3;
/* decode and display the header */
proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_fc, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(generic_tree, hf_mac_header_generic_frag_subhd_fsn, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -978,7 +978,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
/* Decode the MAC payload if there is any */
if (mac_ci)
{
- if (length < (gint)sizeof(mac_crc))
+ if (length < (int)sizeof(mac_crc))
{ /* display error message */
proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Error - the frame is too short (%u bytes)", length);
return tvb_captured_length(tvb);
@@ -1026,10 +1026,10 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
while (pinfo->num > cid_adj_array_size)
{
cid_adj_array_size += 1024;
- cid_adj_array = (guint *)g_realloc(cid_adj_array, (int)sizeof(guint) * cid_adj_array_size);
- frag_num_array = (guint8 *)g_realloc(frag_num_array, (int)sizeof(guint8) * cid_adj_array_size);
+ cid_adj_array = (unsigned *)g_realloc(cid_adj_array, (int)sizeof(unsigned) * cid_adj_array_size);
+ frag_num_array = (uint8_t *)g_realloc(frag_num_array, (int)sizeof(uint8_t) * cid_adj_array_size);
/* Clear the added memory */
- memset(&cid_adj_array[cid_adj_array_size - 1024], 0, (int)sizeof(guint) * 1024);
+ memset(&cid_adj_array[cid_adj_array_size - 1024], 0, (int)sizeof(unsigned) * 1024);
}
if (first_gmh)
{
@@ -1062,7 +1062,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
}
}
/* Reset in case we stay in this while() loop to finish the packet. */
- first_gmh = FALSE;
+ first_gmh = false;
cid = cid_base + cid_adjust[cid_index] + cid_vernier[cid_index];
/* Save address pointers. */
copy_address_shallow(&save_src, &pinfo->src);
@@ -1124,7 +1124,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
/* if ARQ Feedback payload is present, it should be the first SDU */
if (first_arq_fb_payload && arq_fb_payload)
{ /* decode and display the ARQ feedback payload */
- first_arq_fb_payload = FALSE;
+ first_arq_fb_payload = false;
#ifndef DEBUG
arq_feedback_payload_decoder(tvb_new_subset_length(payload_tvb, payload_offset, new_payload_len), pinfo, generic_tree, parent_item);
#else
@@ -1187,7 +1187,7 @@ static int dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo,
/* add payload subtree */
generic_tree = proto_item_add_subtree(generic_item, ett_mac_data_pdu_decoder);
/* check the data type */
- if (tvb_get_guint8(payload_tvb, payload_offset) == IP_HEADER_BYTE)
+ if (tvb_get_uint8(payload_tvb, payload_offset) == IP_HEADER_BYTE)
{
if (mac_ip_handle)
call_dissector(mac_ip_handle, tvb_new_subset_length(payload_tvb, payload_offset, new_tvb_len), pinfo, generic_tree);
@@ -1235,10 +1235,10 @@ check_crc:
return tvb_captured_length(tvb);
}
-static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- gint offset = 0;
- gint length, ext_length, ubyte, i;
+ int offset = 0;
+ int length, ext_length, ubyte, i;
proto_item *ti = NULL;
proto_tree *sub_tree = NULL;
proto_tree *ti_tree = NULL;
@@ -1255,7 +1255,7 @@ static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
}
/* Get the length of the extended subheader group */
- ext_length = tvb_get_guint8(tvb, offset);
+ ext_length = tvb_get_uint8(tvb, offset);
/* display subheader type */
ti = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Extended subheader group (%u bytes)", ext_length);
/* add extended subheader subtree */
@@ -1263,7 +1263,7 @@ static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
/* decode and display the extended subheaders */
for (i=1; i<ext_length;)
{ /* Get the extended subheader type */
- ubyte = (tvb_get_guint8(tvb, (offset+i)) & EXTENDED_SUB_HEADER_TYPE_MASK);
+ ubyte = (tvb_get_uint8(tvb, (offset+i)) & EXTENDED_SUB_HEADER_TYPE_MASK);
/* decode and display the extended subheader type (MSB) */
proto_tree_add_item(sub_tree, hf_mac_header_generic_ext_subheader_rsv, tvb, (offset+i), 1, ENC_BIG_ENDIAN);
/* for downlink */
@@ -1364,13 +1364,13 @@ static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
return ext_length;
}
-static gint arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *parent_item)
+static int arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *parent_item)
{
- gint length, i;
- gint offset;
- gint last_ie = 0;
- gint ack_type, num_maps, seq_format;
- gint word2, word3;
+ int length, i;
+ int offset;
+ int last_ie = 0;
+ int ack_type, num_maps, seq_format;
+ int word2, word3;
proto_item *ti = NULL;
proto_item *sub_ti = NULL;
proto_tree *sub_tree = NULL;
@@ -2225,7 +2225,7 @@ void wimax_proto_register_mac_header_generic(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_header_generic_decoder,
/* &ett_mac_subheader_decoder, */
diff --git a/plugins/epan/wimax/mac_hd_type1_decoder.c b/plugins/epan/wimax/mac_hd_type1_decoder.c
index 128be653b6..3b843c0f82 100644
--- a/plugins/epan/wimax/mac_hd_type1_decoder.c
+++ b/plugins/epan/wimax/mac_hd_type1_decoder.c
@@ -28,11 +28,11 @@
#include <epan/packet.h>
#include "wimax-int.h"
-extern gint proto_mac_header_generic_decoder;
+extern int proto_mac_header_generic_decoder;
-static gint proto_mac_header_type_1_decoder;
-static gint ett_mac_header_type_1_decoder;
-static gint hf_mac_header_type_1_value_bytes;
+static int proto_mac_header_type_1_decoder;
+static int ett_mac_header_type_1_decoder;
+static int hf_mac_header_type_1_value_bytes;
#define WIMAX_MAC_HEADER_SIZE 6
@@ -195,8 +195,8 @@ static const value_string last_msgs[] =
static int dissect_mac_header_type_1_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- gint tvb_len, offset = 0;
- guint first_byte, sub_type;
+ int tvb_len, offset = 0;
+ unsigned first_byte, sub_type;
proto_item *parent_item = NULL;
proto_item *ti = NULL;
proto_tree *ti_tree = NULL;
@@ -226,7 +226,7 @@ static int dissect_mac_header_type_1_decoder(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(ti_tree, hf_mac_header_type_1_ec, tvb, offset, 3, ENC_BIG_ENDIAN);
proto_tree_add_item(ti_tree, hf_mac_header_type_1_type, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Get the first byte */
- first_byte = tvb_get_guint8(tvb, offset);
+ first_byte = tvb_get_uint8(tvb, offset);
/* get the sub Type */
sub_type = ((first_byte & WIMAX_MAC_HEADER_TYPE_1_SUB_TYPE_MASK)>>3);
if(sub_type < TYPE_I_SUBTYPE_MAX)
@@ -533,7 +533,7 @@ void wimax_proto_register_mac_header_type_1(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_header_type_1_decoder,
};
diff --git a/plugins/epan/wimax/mac_hd_type2_decoder.c b/plugins/epan/wimax/mac_hd_type2_decoder.c
index 8f241d986c..551ad369de 100644
--- a/plugins/epan/wimax/mac_hd_type2_decoder.c
+++ b/plugins/epan/wimax/mac_hd_type2_decoder.c
@@ -28,11 +28,11 @@
#include <epan/packet.h>
#include "wimax-int.h"
-extern gint proto_mac_header_generic_decoder;
+extern int proto_mac_header_generic_decoder;
-static gint proto_mac_header_type_2_decoder;
-static gint ett_mac_header_type_2_decoder;
-static gint hf_mac_header_type_2_value_bytes;
+static int proto_mac_header_type_2_decoder;
+static int ett_mac_header_type_2_decoder;
+static int hf_mac_header_type_2_value_bytes;
#define WIMAX_MAC_HEADER_SIZE 6
@@ -368,8 +368,8 @@ static const value_string ai_msgs[] =
static int dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- gint tvb_len, offset = 0;
- guint cii_bit, first_byte, fb_type, mimo_type;
+ int tvb_len, offset = 0;
+ unsigned cii_bit, first_byte, fb_type, mimo_type;
proto_item *parent_item = NULL;
proto_item *ti = NULL;
proto_tree *ti_tree = NULL;
@@ -407,7 +407,7 @@ static int dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo,
/* feedback type */
proto_tree_add_item(ti_tree, hf_mac_header_type_2_fb_type, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Get the first byte */
- first_byte = tvb_get_guint8(tvb, offset);
+ first_byte = tvb_get_uint8(tvb, offset);
/* get the CII field */
cii_bit = ((first_byte & WIMAX_MAC_HEADER_TYPE_2_CII)?1:0);
/* check the Type field */
@@ -714,7 +714,7 @@ static int dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo,
break;
case CL_MIMO_FB:
/* Get the MIMO type */
- mimo_type = ((tvb_get_guint8(tvb, offset) & 0xC0) >> 6);
+ mimo_type = ((tvb_get_uint8(tvb, offset) & 0xC0) >> 6);
/* Decode and display the MIMO type */
proto_tree_add_item(ti_tree, hf_mac_header_type_2_cl_mimo_type, tvb, offset, 2, ENC_BIG_ENDIAN);
if(mimo_type == 1)
@@ -1343,7 +1343,7 @@ void wimax_proto_register_mac_header_type_2(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_header_type_2_decoder,
};
diff --git a/plugins/epan/wimax/mac_mgmt_msg_decoder.c b/plugins/epan/wimax/mac_mgmt_msg_decoder.c
index 767dc342ce..edd2ed04a0 100644
--- a/plugins/epan/wimax/mac_mgmt_msg_decoder.c
+++ b/plugins/epan/wimax/mac_mgmt_msg_decoder.c
@@ -23,11 +23,11 @@
void proto_register_mac_mgmt_msg(void);
void proto_reg_handoff_mac_mgmt_msg(void);
-static gint proto_mac_mgmt_msg_decoder;
-static gint ett_mac_mgmt_msg_decoder;
+static int proto_mac_mgmt_msg_decoder;
+static int ett_mac_mgmt_msg_decoder;
-static gint hf_mac_mgmt_msg_type;
-static gint hf_mac_mgmt_msg_values;
+static int hf_mac_mgmt_msg_type;
+static int hf_mac_mgmt_msg_values;
static expert_field ei_empty_payload;
@@ -110,8 +110,8 @@ static value_string_ext mgt_msg_abbrv_vals_ext = VALUE_STRING_EXT_INIT(mgt_msg_a
static int dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint message_type;
+ unsigned offset = 0;
+ unsigned message_type;
proto_item *message_item;
proto_tree *message_tree;
const char* mgt_msg_str;
@@ -127,7 +127,7 @@ static int dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
}
/* Get the payload type */
- message_type = tvb_get_guint8(tvb, offset);
+ message_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(message_tree, hf_mac_mgmt_msg_type, tvb, offset, 1, ENC_NA);
mgt_msg_str = val_to_str_ext_const(message_type, &mgt_msg_abbrv_vals_ext, "Unknown");
@@ -179,7 +179,7 @@ void proto_register_mac_mgmt_msg(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_decoder,
};
diff --git a/plugins/epan/wimax/msg_aas_beam.c b/plugins/epan/wimax/msg_aas_beam.c
index 68d14900c6..48573893ea 100644
--- a/plugins/epan/wimax/msg_aas_beam.c
+++ b/plugins/epan/wimax/msg_aas_beam.c
@@ -21,7 +21,7 @@
#include <epan/packet.h>
#include "wimax_mac.h"
-extern gint proto_mac_mgmt_msg_aas_fbck_decoder;
+extern int proto_mac_mgmt_msg_aas_fbck_decoder;
#define AAS_BEAM_SELECT_AAS_BEAM_INDEX_MASK 0xFC
#define AAS_BEAM_SELECT_RESERVED_MASK 0x03
@@ -37,10 +37,10 @@ void proto_reg_handoff_mac_mgmt_msg_aas_beam(void);
static dissector_handle_t aas_handle;
-static gint proto_mac_mgmt_msg_aas_beam_decoder;
-static gint ett_mac_mgmt_msg_aas_beam_select_decoder;
-static gint ett_mac_mgmt_msg_aas_beam_req_decoder;
-static gint ett_mac_mgmt_msg_aas_beam_rsp_decoder;
+static int proto_mac_mgmt_msg_aas_beam_decoder;
+static int ett_mac_mgmt_msg_aas_beam_select_decoder;
+static int ett_mac_mgmt_msg_aas_beam_req_decoder;
+static int ett_mac_mgmt_msg_aas_beam_rsp_decoder;
#ifdef OFDM
static const value_string vals_report_types[] =
@@ -61,15 +61,15 @@ static const value_string vals_resolution_parameter[] =
#endif
/* fix fields */
-/* static gint hf_aas_beam_unknown_type; */
-static gint hf_aas_beam_select_index;
-static gint hf_aas_beam_select_reserved;
+/* static int hf_aas_beam_unknown_type; */
+static int hf_aas_beam_select_index;
+static int hf_aas_beam_select_reserved;
#ifdef OFDM
-static gint hf_aas_beam_frame_number;
-static gint hf_aas_beam_feedback_request_number;
-static gint hf_aas_beam_measurement_report_type;
-static gint hf_aas_beam_resolution_parameter;
-static gint hf_aas_beam_beam_bit_mask;
+static int hf_aas_beam_frame_number;
+static int hf_aas_beam_feedback_request_number;
+static int hf_aas_beam_measurement_report_type;
+static int hf_aas_beam_resolution_parameter;
+static int hf_aas_beam_beam_bit_mask;
static int hf_aas_beam_freq_value_re;
static int hf_aas_beam_freq_value_im;
static int hf_aas_beam_rssi_value;
@@ -79,7 +79,7 @@ static int hf_aas_beam_cinr_value;
static int dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *aas_beam_item;
proto_tree *aas_beam_tree;
@@ -102,7 +102,7 @@ static int dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_in
#ifdef OFDM
static int dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *aas_beam_item;
proto_tree *aas_beam_tree;
@@ -136,9 +136,9 @@ static int dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info
static int dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len, report_type;
- guint number_of_frequencies, indx;
+ unsigned offset = 0;
+ unsigned tvb_len, report_type;
+ unsigned number_of_frequencies, indx;
proto_item *aas_beam_item;
proto_tree *aas_beam_tree;
@@ -157,7 +157,7 @@ static int dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info
/* move to next field */
offset++;
/* get the Measurement Report Type */
- report_type = tvb_get_guint8(tvb, offset);
+ report_type = tvb_get_uint8(tvb, offset);
/* display the Feedback Request Number */
proto_tree_add_item(aas_beam_tree, hf_aas_beam_feedback_request_number, tvb, offset, 1, ENC_BIG_ENDIAN);
/* display the Measurement Report Type */
@@ -297,7 +297,7 @@ void proto_register_mac_mgmt_msg_aas_beam(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_aas_beam_select_decoder,
&ett_mac_mgmt_msg_aas_beam_req_decoder,
diff --git a/plugins/epan/wimax/msg_aas_fbck.c b/plugins/epan/wimax/msg_aas_fbck.c
index 2d0df5c47d..a82451d74e 100644
--- a/plugins/epan/wimax/msg_aas_fbck.c
+++ b/plugins/epan/wimax/msg_aas_fbck.c
@@ -36,9 +36,9 @@ void proto_reg_handoff_mac_mgmt_msg_aas(void);
static dissector_handle_t aas_req_handle;
static dissector_handle_t aas_rsp_handle;
-static gint proto_mac_mgmt_msg_aas_fbck_decoder;
-static gint ett_mac_mgmt_msg_aas_fbck_req_decoder;
-static gint ett_mac_mgmt_msg_aas_fbck_rsp_decoder;
+static int proto_mac_mgmt_msg_aas_fbck_decoder;
+static int ett_mac_mgmt_msg_aas_fbck_req_decoder;
+static int ett_mac_mgmt_msg_aas_fbck_rsp_decoder;
static const value_string vals_data_types[] =
{
@@ -87,8 +87,8 @@ static int hf_aas_fbck_cinr_value;
static int dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint data_type;
+ unsigned offset = 0;
+ unsigned data_type;
proto_item *aas_fbck_item;
proto_tree *aas_fbck_tree;
@@ -106,7 +106,7 @@ static int dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info
/* move to next field */
offset++;
/* get the data type */
- data_type = tvb_get_guint8(tvb, offset);
+ data_type = tvb_get_uint8(tvb, offset);
/* display the number of Frames */
proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_number_of_frames, tvb, offset, 1, ENC_BIG_ENDIAN);
/* display the Data Type */
@@ -128,8 +128,8 @@ static int dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info
static int dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len, data_type;
+ unsigned offset = 0;
+ unsigned tvb_len, data_type;
proto_item *aas_fbck_item;
proto_tree *aas_fbck_tree;
@@ -144,7 +144,7 @@ static int dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info
/* Display the AAS-FBCK-RSP message type */
/* get the data type */
- data_type = tvb_get_guint8(tvb, offset);
+ data_type = tvb_get_uint8(tvb, offset);
/* Decode and display the AAS-FBCK-RSP message body */
/* display the reserved fields */
proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_rsp_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -310,7 +310,7 @@ void proto_register_mac_mgmt_msg_aas_fbck(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_aas_fbck_req_decoder,
&ett_mac_mgmt_msg_aas_fbck_rsp_decoder,
diff --git a/plugins/epan/wimax/msg_arq.c b/plugins/epan/wimax/msg_arq.c
index 9753f8bdc5..e3c75bad08 100644
--- a/plugins/epan/wimax/msg_arq.c
+++ b/plugins/epan/wimax/msg_arq.c
@@ -18,6 +18,8 @@
#include <epan/packet.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "wimax_mac.h"
void proto_register_mac_mgmt_msg_arq_feedback(void);
@@ -30,43 +32,43 @@ static dissector_handle_t arq_feedback_handle;
static dissector_handle_t arq_discard_handle;
static dissector_handle_t arq_reset_handle;
-static gint proto_mac_mgmt_msg_arq_decoder;
+static int proto_mac_mgmt_msg_arq_decoder;
-static gint ett_mac_mgmt_msg_arq_decoder;
+static int ett_mac_mgmt_msg_arq_decoder;
/* Setup protocol subtree array */
-static gint *ett[] =
+static int *ett[] =
{
&ett_mac_mgmt_msg_arq_decoder,
};
/* ARQ fields */
-static gint hf_arq_cid;
-static gint hf_arq_last;
-static gint hf_arq_ack_type;
-static gint hf_ack_type_reserved;
-static gint hf_arq_bsn;
-static gint hf_arq_num_ack_maps;
-static gint hf_arq_selective_map;
-static gint hf_arq_seq_format;
-static gint hf_arq_0seq_ack_map;
-static gint hf_arq_0seq1_len;
-static gint hf_arq_0seq2_len;
-static gint hf_arq_1seq_ack_map;
-static gint hf_arq_1seq1_len;
-static gint hf_arq_1seq2_len;
-static gint hf_arq_1seq3_len;
-static gint hf_arq_reserved;
-
-static gint hf_arq_discard_cid;
-static gint hf_arq_discard_reserved;
-static gint hf_arq_discard_bsn;
-
-static gint hf_arq_reset_cid;
-static gint hf_arq_reset_type;
-static gint hf_arq_reset_direction;
-static gint hf_arq_reset_reserved;
+static int hf_arq_cid;
+static int hf_arq_last;
+static int hf_arq_ack_type;
+static int hf_ack_type_reserved;
+static int hf_arq_bsn;
+static int hf_arq_num_ack_maps;
+static int hf_arq_selective_map;
+static int hf_arq_seq_format;
+static int hf_arq_0seq_ack_map;
+static int hf_arq_0seq1_len;
+static int hf_arq_0seq2_len;
+static int hf_arq_1seq_ack_map;
+static int hf_arq_1seq1_len;
+static int hf_arq_1seq2_len;
+static int hf_arq_1seq3_len;
+static int hf_arq_reserved;
+
+static int hf_arq_discard_cid;
+static int hf_arq_discard_reserved;
+static int hf_arq_discard_bsn;
+
+static int hf_arq_reset_cid;
+static int hf_arq_reset_type;
+static int hf_arq_reset_direction;
+static int hf_arq_reset_reserved;
/* STRING RESOURCES */
@@ -298,20 +300,20 @@ void proto_register_mac_mgmt_msg_arq_feedback(void)
/* Decode ARQ-Feedback messages. */
static int dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint arq_feedback_ie_count = 0;
- guint arq_cid;
- gboolean arq_last = FALSE;
- guint arq_ack_type;
- guint arq_bsn;
- guint arq_num_ack_maps;
- guint tvb_len;
+ unsigned offset = 0;
+ unsigned arq_feedback_ie_count = 0;
+ unsigned arq_cid;
+ bool arq_last = false;
+ unsigned arq_ack_type;
+ unsigned arq_bsn;
+ unsigned arq_num_ack_maps;
+ unsigned tvb_len;
proto_item *arq_feedback_item;
proto_tree *arq_feedback_tree;
proto_item *arq_fb_item = NULL;
proto_tree *arq_fb_tree = NULL;
proto_item *ti = NULL;
- guint i, seq_format;
+ unsigned i, seq_format;
{ /* we are being asked for details */
@@ -326,10 +328,10 @@ static int dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info
{
arq_feedback_ie_count++;
arq_cid = tvb_get_ntohs(tvb, offset);
- arq_last = ((tvb_get_guint8(tvb, offset + 2) & 0x80) != 0);
- arq_ack_type = (tvb_get_guint8(tvb, offset + 2) & 0x60) >> 5;
+ arq_last = ((tvb_get_uint8(tvb, offset + 2) & 0x80) != 0);
+ arq_ack_type = (tvb_get_uint8(tvb, offset + 2) & 0x60) >> 5;
arq_bsn = (tvb_get_ntohs(tvb, offset + 2) & 0x1FFC) >> 2;
- arq_num_ack_maps = 1 + (tvb_get_guint8(tvb, offset + 3) & 0x03);
+ arq_num_ack_maps = 1 + (tvb_get_uint8(tvb, offset + 3) & 0x03);
arq_fb_item = proto_tree_add_protocol_format(arq_feedback_tree, proto_mac_mgmt_msg_arq_decoder, tvb, offset, tvb_len, "ARQ_Feedback_IE");
proto_item_append_text(arq_fb_item, ", CID: %u, %s ARQ feedback IE, %s, BSN: %u",
@@ -355,7 +357,7 @@ static int dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info
proto_tree_add_item(arq_fb_tree, hf_arq_selective_map, tvb, offset, 2, ENC_BIG_ENDIAN);
} else {
proto_tree_add_item(arq_fb_tree, hf_arq_seq_format, tvb, offset, 1, ENC_BIG_ENDIAN);
- seq_format = (tvb_get_guint8(tvb, offset) & 0x80) >> 7;
+ seq_format = (tvb_get_uint8(tvb, offset) & 0x80) >> 7;
if (seq_format == 0) {
proto_tree_add_item(arq_fb_tree, hf_arq_0seq_ack_map, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(arq_fb_tree, hf_arq_0seq1_len, tvb, offset, 2, ENC_BIG_ENDIAN);
diff --git a/plugins/epan/wimax/msg_clk_cmp.c b/plugins/epan/wimax/msg_clk_cmp.c
index b57e13e8b1..95411ef08c 100644
--- a/plugins/epan/wimax/msg_clk_cmp.c
+++ b/plugins/epan/wimax/msg_clk_cmp.c
@@ -24,24 +24,24 @@ void proto_reg_handoff_mac_mgmt_msg_clk_cmp(void);
static dissector_handle_t clk_cmp_handle;
-static gint proto_mac_mgmt_msg_clk_cmp_decoder;
+static int proto_mac_mgmt_msg_clk_cmp_decoder;
-static gint ett_mac_mgmt_msg_clk_cmp_decoder;
+static int ett_mac_mgmt_msg_clk_cmp_decoder;
/* CLK_CMP fields */
-static gint hf_clk_cmp_clock_count;
-static gint hf_clk_cmp_clock_id;
-static gint hf_clk_cmp_seq_number;
-static gint hf_clk_cmp_comparison_value;
-/* static gint hf_clk_cmp_invalid_tlv; */
+static int hf_clk_cmp_clock_count;
+static int hf_clk_cmp_clock_id;
+static int hf_clk_cmp_seq_number;
+static int hf_clk_cmp_comparison_value;
+/* static int hf_clk_cmp_invalid_tlv; */
/* Decode CLK_CMP messages. */
static int dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint i;
- guint clock_count;
+ unsigned offset = 0;
+ unsigned i;
+ unsigned clock_count;
proto_item *clk_cmp_item;
proto_tree *clk_cmp_tree;
@@ -51,7 +51,7 @@ static int dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinf
/* add MAC CLK_CMP subtree */
clk_cmp_tree = proto_item_add_subtree(clk_cmp_item, ett_mac_mgmt_msg_clk_cmp_decoder);
/* get the clock count */
- clock_count = tvb_get_guint8(tvb, offset);
+ clock_count = tvb_get_uint8(tvb, offset);
/* display the clock count */
proto_tree_add_item(clk_cmp_tree, hf_clk_cmp_clock_count, tvb, offset, 1, ENC_BIG_ENDIAN);
/* set the offset for clock comparison */
@@ -114,7 +114,7 @@ void proto_register_mac_mgmt_msg_clk_cmp(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_clk_cmp_decoder,
};
diff --git a/plugins/epan/wimax/msg_dcd.c b/plugins/epan/wimax/msg_dcd.c
index 91c62751ae..787cd0af38 100644
--- a/plugins/epan/wimax/msg_dcd.c
+++ b/plugins/epan/wimax/msg_dcd.c
@@ -21,102 +21,103 @@
*/
#include <epan/packet.h>
+#include <epan/unit_strings.h>
+
+#include <wsutil/array.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
-
-/* Delete the following variable as soon as possible */
-extern gboolean include_cor2_changes;
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_dcd(void);
void proto_reg_handoff_mac_mgmt_msg_dcd(void);
static dissector_handle_t dcd_handle;
-static gint proto_mac_mgmt_msg_dcd_decoder;
-static gint ett_mac_mgmt_msg_dcd_decoder;
+static int proto_mac_mgmt_msg_dcd_decoder;
+static int ett_mac_mgmt_msg_dcd_decoder;
/* fix fields */
-static gint hf_dcd_downlink_channel_id;
-static gint hf_dcd_config_change_count;
-static gint hf_dcd_dl_burst_profile_rsv;
-static gint hf_dcd_dl_burst_profile_diuc;
+static int hf_dcd_downlink_channel_id;
+static int hf_dcd_config_change_count;
+static int hf_dcd_dl_burst_profile_rsv;
+static int hf_dcd_dl_burst_profile_diuc;
-static gint hf_dcd_bs_eirp;
-static gint hf_dcd_frame_duration;
-static gint hf_dcd_phy_type;
-static gint hf_dcd_power_adjustment;
-static gint hf_dcd_channel_nr;
-static gint hf_dcd_ttg;
-static gint hf_dcd_rtg;
+static int hf_dcd_bs_eirp;
+static int hf_dcd_frame_duration;
+static int hf_dcd_phy_type;
+static int hf_dcd_power_adjustment;
+static int hf_dcd_channel_nr;
+static int hf_dcd_ttg;
+static int hf_dcd_rtg;
#ifdef WIMAX_16D_2004
-static gint hf_dcd_rss;
+static int hf_dcd_rss;
#endif
-static gint hf_dcd_channel_switch_frame_nr;
-static gint hf_dcd_frequency;
-static gint hf_dcd_bs_id;
-static gint hf_dcd_frame_duration_code;
-static gint hf_dcd_frame_nr;
+static int hf_dcd_channel_switch_frame_nr;
+static int hf_dcd_frequency;
+static int hf_dcd_bs_id;
+static int hf_dcd_frame_duration_code;
+static int hf_dcd_frame_nr;
#ifdef WIMAX_16D_2004
-static gint hf_dcd_size_cqich_id;
-static gint hf_dcd_h_arq_ack_delay_dl;
+static int hf_dcd_size_cqich_id;
+static int hf_dcd_h_arq_ack_delay_dl;
#else
-static gint hf_dcd_h_arq_ack_delay_ul;
+static int hf_dcd_h_arq_ack_delay_ul;
#endif
-static gint hf_dcd_mac_version;
-static gint hf_dcd_restart_count;
+static int hf_dcd_mac_version;
+static int hf_dcd_restart_count;
-/* static gint hf_dl_burst_reserved; */
-/* static gint hf_dl_burst_diuc; */
-static gint hf_dcd_burst_freq;
-static gint hf_dcd_burst_fec;
-static gint hf_dcd_burst_diuc_exit_threshold;
-static gint hf_dcd_burst_diuc_entry_threshold;
-static gint hf_dcd_burst_tcs;
-static gint hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone;
-static gint hf_dcd_tlv_t_20_maximum_retransmission;
-static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter;
-static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements;
-static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements;
-static gint hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap;
+/* static int hf_dl_burst_reserved; */
+/* static int hf_dl_burst_diuc; */
+static int hf_dcd_burst_freq;
+static int hf_dcd_burst_fec;
+static int hf_dcd_burst_diuc_exit_threshold;
+static int hf_dcd_burst_diuc_entry_threshold;
+static int hf_dcd_burst_tcs;
+static int hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone;
+static int hf_dcd_tlv_t_20_maximum_retransmission;
+static int hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter;
+static int hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements;
+static int hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements;
+static int hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap;
-static gint hf_dcd_tlv_t_34_dl_region_definition;
-static gint hf_dcd_tlv_t_34_dl_region_definition_num_region;
-static gint hf_dcd_tlv_t_34_dl_region_definition_reserved;
-static gint hf_dcd_tlv_t_34_dl_region_definition_symbol_offset;
-static gint hf_dcd_eirxp;
-static gint hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset;
-static gint hf_dcd_tlv_t_34_dl_region_definition_num_symbols;
-static gint hf_dcd_tlv_t_34_dl_region_definition_num_subchannels;
-static gint hf_dcd_tlv_t_50_ho_type_support;
-static gint hf_dcd_tlv_t_50_ho_type_support_ho;
-static gint hf_dcd_tlv_t_50_ho_type_support_mdho;
-static gint hf_dcd_tlv_t_50_ho_type_support_fbss_ho;
-static gint hf_dcd_tlv_t_50_ho_type_support_reserved;
-static gint hf_dcd_tlv_t_31_h_add_threshold;
-static gint hf_dcd_tlv_t_45_paging_interval_length;
-static gint hf_dcd_tlv_t_45_paging_interval_reserved;
-static gint hf_dcd_tlv_t_32_h_delete_threshold;
-static gint hf_dcd_tlv_t_33_asr;
-static gint hf_dcd_tlv_t_33_asr_m;
-static gint hf_dcd_tlv_t_33_asr_l;
-static gint hf_dcd_tlv_t_35_paging_group_id;
-static gint hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap;
-static gint hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap;
-static gint hf_dcd_tlv_t_51_hysteresis_margin;
-static gint hf_dcd_tlv_t_52_time_to_trigger_duration;
-static gint hf_dcd_tlv_t_60_noise_interference;
-static gint hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types;
+static int hf_dcd_tlv_t_34_dl_region_definition;
+static int hf_dcd_tlv_t_34_dl_region_definition_num_region;
+static int hf_dcd_tlv_t_34_dl_region_definition_reserved;
+static int hf_dcd_tlv_t_34_dl_region_definition_symbol_offset;
+static int hf_dcd_eirxp;
+static int hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset;
+static int hf_dcd_tlv_t_34_dl_region_definition_num_symbols;
+static int hf_dcd_tlv_t_34_dl_region_definition_num_subchannels;
+static int hf_dcd_tlv_t_50_ho_type_support;
+static int hf_dcd_tlv_t_50_ho_type_support_ho;
+static int hf_dcd_tlv_t_50_ho_type_support_mdho;
+static int hf_dcd_tlv_t_50_ho_type_support_fbss_ho;
+static int hf_dcd_tlv_t_50_ho_type_support_reserved;
+static int hf_dcd_tlv_t_31_h_add_threshold;
+static int hf_dcd_tlv_t_45_paging_interval_length;
+static int hf_dcd_tlv_t_45_paging_interval_reserved;
+static int hf_dcd_tlv_t_32_h_delete_threshold;
+static int hf_dcd_tlv_t_33_asr;
+static int hf_dcd_tlv_t_33_asr_m;
+static int hf_dcd_tlv_t_33_asr_l;
+static int hf_dcd_tlv_t_35_paging_group_id;
+static int hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap;
+static int hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap;
+static int hf_dcd_tlv_t_51_hysteresis_margin;
+static int hf_dcd_tlv_t_52_time_to_trigger_duration;
+static int hf_dcd_tlv_t_60_noise_interference;
+static int hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types;
-static gint hf_dcd_tlv_t_541_type_function_action;
-static gint hf_dcd_tlv_t_541_type;
-static gint hf_dcd_tlv_t_541_function;
-static gint hf_dcd_tlv_t_541_action;
-static gint hf_dcd_tlv_t_542_trigger_value;
-static gint hf_dcd_tlv_t_543_trigger_averaging_duration;
+static int hf_dcd_tlv_t_541_type_function_action;
+static int hf_dcd_tlv_t_541_type;
+static int hf_dcd_tlv_t_541_function;
+static int hf_dcd_tlv_t_541_action;
+static int hf_dcd_tlv_t_542_trigger_value;
+static int hf_dcd_tlv_t_543_trigger_averaging_duration;
-static gint hf_dcd_unknown_type;
-static gint hf_dcd_invalid_tlv;
+static int hf_dcd_unknown_type;
+static int hf_dcd_invalid_tlv;
/* DCD DIUC messages (table 143) */
static const value_string diuc_msgs[] =
@@ -332,14 +333,14 @@ static const value_string tfs_support[] =
/* WiMax MAC Management DCD message (table 15) dissector */
static int dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len, length;
- gint tlv_type, tlv_len, tlv_offset, tlv_value_offset;
- guint dl_burst_diuc, dl_num_regions;
+ unsigned offset = 0;
+ unsigned tvb_len, length;
+ int tlv_type, tlv_len, tlv_offset, tlv_value_offset;
+ unsigned dl_burst_diuc, dl_num_regions;
proto_item *dcd_item, *tlv_item, *sub_item;
proto_tree *dcd_tree, *tlv_tree, *sub_tree;
tlv_info_t tlv_info;
- gchar* proto_str;
+ char* proto_str;
{ /* we are being asked for details */
/* Get the tvb reported length */
@@ -385,7 +386,7 @@ static int dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
case DCD_DOWNLINK_BURST_PROFILE:
{ /* Downlink Burst Profile TLV (table 363)*/
/* get the DIUC */
- dl_burst_diuc = (tvb_get_guint8(tvb, offset) & 0x0F);
+ dl_burst_diuc = (tvb_get_uint8(tvb, offset) & 0x0F);
/* display TLV info */
/* add TLV subtree */
proto_str = wmem_strdup_printf(pinfo->pool, "Downlink_Burst_Profile (DIUC=%u)", dl_burst_diuc);
@@ -564,7 +565,7 @@ static int dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
{
tlv_item = add_tlv_subtree(&tlv_info, dcd_tree, hf_dcd_tlv_t_34_dl_region_definition, tvb, offset-tlv_value_offset, ENC_NA);
tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_dcd_decoder);
- dl_num_regions = tvb_get_guint8(tvb, offset);
+ dl_num_regions = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_num_region, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_tree, hf_dcd_tlv_t_34_dl_region_definition_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
tlv_offset = offset;
@@ -727,21 +728,21 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_tlv_t_33_asr_l,
{
"ASR Switching Period (L)", "wmx.dcd.asr.l",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0x0f, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0x0f, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_33_asr_m,
{
"ASR Slot Length (M)", "wmx.dcd.asr.m",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0xf0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0xf0, NULL, HFILL
}
},
{
&hf_dcd_bs_eirp,
{
"BS EIRP", "wmx.dcd.bs_eirp",
- FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, NULL, HFILL
+ FT_INT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_dbm), 0x00, NULL, HFILL
}
},
{
@@ -792,7 +793,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_burst_freq,
{
"Frequency", "wmx.dcd.burst.freq",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_khz, 0x00, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_khz), 0x00, NULL, HFILL
}
},
#if 0
@@ -935,7 +936,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_eirxp,
{
"EIRXP (IR, max)", "wmx.dcd.eirxp",
- FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, NULL, HFILL
+ FT_INT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_dbm), 0x00, NULL, HFILL
}
},
#endif
@@ -964,14 +965,14 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_frequency,
{
"Downlink Center Frequency", "wmx.dcd.frequency",
- FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_khz, 0x00, NULL, HFILL
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_khz), 0x00, NULL, HFILL
}
},
{
&hf_dcd_tlv_t_31_h_add_threshold,
{
"H_add Threshold", "wmx.dcd.h_add_threshold",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_db), 0x0, NULL, HFILL
}
},
#ifdef WIMAX_16D_2004
@@ -979,7 +980,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_h_arq_ack_delay_dl,
{
"H-ARQ ACK Delay for DL Burst", "wmx.dcd.h_arq_ack_delay_dl_burst",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_offset, 0x00, "", HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_offset), 0x00, "", HFILL
}
},
#else
@@ -987,7 +988,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_h_arq_ack_delay_ul,
{
"H-ARQ ACK Delay for UL Burst", "wmx.dcd.h_arq_ack_delay_ul_burst",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_offset, 0x00, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_offset), 0x00, NULL, HFILL
}
},
#endif
@@ -995,7 +996,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_tlv_t_32_h_delete_threshold,
{
"H_delete Threshold", "wmx.dcd.h_delete_threshold",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_db), 0x0, NULL, HFILL
}
},
{
@@ -1037,7 +1038,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_tlv_t_51_hysteresis_margin,
{
"Hysteresis Margin", "wmx.dcd.hysteresis_margin",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0x0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_db), 0x0, NULL, HFILL
}
},
{
@@ -1129,7 +1130,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_rss,
{
"RSS (IR, max)", "wmx.dcd.rss",
- FT_INT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_dbm, 0x00, "", HFILL
+ FT_INT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_dbm), 0x00, "", HFILL
}
},
#endif
@@ -1137,7 +1138,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_rtg,
{
"RTG", "wmx.dcd.rtg",
- FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_ps, 0x00, NULL, HFILL
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_ps), 0x00, NULL, HFILL
}
},
#ifdef WIMAX_16D_2004
@@ -1160,7 +1161,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_tlv_t_52_time_to_trigger_duration,
{
"Time to Trigger Duration", "wmx.dcd.time_trigger_duration",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_ms), 0x0, NULL, HFILL
}
},
{
@@ -1181,7 +1182,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
&hf_dcd_ttg,
{
"TTG", "wmx.dcd.ttg",
- FT_UINT16, BASE_HEX|BASE_UNIT_STRING, &wimax_units_ps, 0x00, NULL, HFILL
+ FT_UINT16, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_ps), 0x00, NULL, HFILL
}
},
{
@@ -1222,7 +1223,7 @@ void proto_register_mac_mgmt_msg_dcd(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_dcd_decoder,
};
diff --git a/plugins/epan/wimax/msg_dlmap.c b/plugins/epan/wimax/msg_dlmap.c
index 420ca1fc24..aba33af55f 100644
--- a/plugins/epan/wimax/msg_dlmap.c
+++ b/plugins/epan/wimax/msg_dlmap.c
@@ -22,8 +22,7 @@
#include "crc.h"
#include "wimax_bits.h"
#include "wimax_utils.h"
-
-extern gboolean include_cor2_changes;
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_dlmap(void);
void proto_reg_handoff_mac_mgmt_msg_dlmap(void);
@@ -56,67 +55,67 @@ static dissector_handle_t dlmap_handle;
nib += nibs; \
} while(0)
-gint harq = 0; /* 1 if HARQ enabled (TODO) */
-gint fusc = 0; /* 1 if current zone permutation is FUSC or optional FUSC (TODO) */
-gint tusc = 0; /* 1 if current zone permutation is AMC, TUSC1 or TUSC2 (TODO) */
-gint ir_type = 0; /* reduced AAS map (TODO) */
-gint RCID_Type = 0;
-gint N_layer = 0;
-gint STC_Zone_Dedicated_Pilots = 0;
-gint STC_Zone_Matrix = 0;
-gint INC_CID = 0;
-gint sub_dl_ul_map = 0;
-
-static gint proto_mac_mgmt_msg_dlmap_decoder;
-
-static gint ett_dlmap;
-static gint ett_dlmap_ie;
-/* static gint ett_dlmap_c_ie; */
-static gint ett_109x; /* SUB-DL-UL-MAP */
-static gint ett_109x_dl;
-static gint ett_109x_ul;
-static gint ett_275_phy;
-static gint ett_275_1;
-static gint ett_277;
-static gint ett_277b;
-static gint ett_278;
-static gint ett_279;
-static gint ett_280;
-static gint ett_281;
-static gint ett_282;
-static gint ett_283;
-static gint ett_284;
-static gint ett_285;
-static gint ett_286;
-static gint ett_286a;
-static gint ett_286b;
-static gint ett_286c;
-static gint ett_286d;
-static gint ett_286e;
-static gint ett_286f;
-static gint ett_286g;
-static gint ett_286h;
-static gint ett_286i;
-static gint ett_286j;
-static gint ett_286k;
-static gint ett_286l;
-static gint ett_286m;
-static gint ett_286n;
-static gint ett_286o;
-static gint ett_286p;
-static gint ett_286q;
-static gint ett_286r;
-static gint ett_286s;
-static gint ett_286t;
-static gint ett_286u;
-static gint ett_286v;
-static gint ett_286w;
-static gint ett_286x;
-static gint ett_286y;
-static gint ett_286z;
-static gint ett_305;
-/* static gint ett_305_dl; */
-static gint ett_308a;
+int harq; /* 1 if HARQ enabled (TODO) */
+int fusc; /* 1 if current zone permutation is FUSC or optional FUSC (TODO) */
+int tusc; /* 1 if current zone permutation is AMC, TUSC1 or TUSC2 (TODO) */
+int ir_type; /* reduced AAS map (TODO) */
+int RCID_Type;
+int N_layer;
+int STC_Zone_Dedicated_Pilots;
+int STC_Zone_Matrix;
+int INC_CID;
+int sub_dl_ul_map;
+
+static int proto_mac_mgmt_msg_dlmap_decoder;
+
+static int ett_dlmap;
+static int ett_dlmap_ie;
+/* static int ett_dlmap_c_ie; */
+static int ett_109x; /* SUB-DL-UL-MAP */
+static int ett_109x_dl;
+static int ett_109x_ul;
+static int ett_275_phy;
+static int ett_275_1;
+static int ett_277;
+static int ett_277b;
+static int ett_278;
+static int ett_279;
+static int ett_280;
+static int ett_281;
+static int ett_282;
+static int ett_283;
+static int ett_284;
+static int ett_285;
+static int ett_286;
+static int ett_286a;
+static int ett_286b;
+static int ett_286c;
+static int ett_286d;
+static int ett_286e;
+static int ett_286f;
+static int ett_286g;
+static int ett_286h;
+static int ett_286i;
+static int ett_286j;
+static int ett_286k;
+static int ett_286l;
+static int ett_286m;
+static int ett_286n;
+static int ett_286o;
+static int ett_286p;
+static int ett_286q;
+static int ett_286r;
+static int ett_286s;
+static int ett_286t;
+static int ett_286u;
+static int ett_286v;
+static int ett_286w;
+static int ett_286x;
+static int ett_286y;
+static int ett_286z;
+static int ett_305;
+/* static int ett_305_dl; */
+static int ett_308a;
#define DCD_DOWNLINK_BURST_PROFILE 1
#define DCD_BS_EIRP 2
@@ -234,82 +233,82 @@ static const value_string frames_per_second[] =
};
/* dl-map fields */
-static gint hf_dlmap_phy_fdur;
-static gint hf_dlmap_phy_fdur_ms;
-static gint hf_dlmap_phy_fdur_per_sec;
-static gint hf_dlmap_phy_fnum;
-/* static gint hf_dlmap_fch_expected; */
-static gint hf_dlmap_dcd;
-static gint hf_dlmap_bsid;
-static gint hf_dlmap_ofdma_sym;
-/* static gint hf_dlmap_ie; */
-static gint hf_dlmap_ie_diuc;
-static gint hf_dlmap_ie_reserved_extended2_duic;
-static gint hf_dlmap_ie_reserved_extended_duic;
-static gint hf_dlmap_ie_diuc_ext;
-static gint hf_dlmap_ie_diuc_ext2;
-static gint hf_dlmap_ie_length;
-static gint hf_dlmap_ie_bitmap;
-static gint hf_dlmap_ie_bitmap_cqi;
-static gint hf_dlmap_ie_bitmap_pusc;
-static gint hf_dlmap_ie_bitmap_opt_pusc;
-static gint hf_dlmap_ie_bitmap_amc;
-static gint hf_dlmap_ie_bitmap_aas;
-static gint hf_dlmap_ie_bitmap_periodic_ranging;
-static gint hf_dlmap_ie_bitmap_sounding;
-static gint hf_dlmap_ie_bitmap_mimo;
-static gint hf_dlmap_ie_ncid;
-static gint hf_dlmap_ie_cid;
-static gint hf_dlmap_ie_offsym;
-static gint hf_dlmap_ie_offsub;
-static gint hf_dlmap_ie_boosting;
-static gint hf_dlmap_ie_numsym;
-static gint hf_dlmap_ie_numsub;
-static gint hf_dlmap_ie_rep;
-static gint hf_dlmap_ie_offsym2;
-static gint hf_dlmap_ie_offsub2;
-static gint hf_dlmap_ie_boosting2;
-static gint hf_dlmap_ie_numsym2;
-static gint hf_dlmap_ie_numsub2;
-static gint hf_dlmap_ie_rep2;
-
-/* static gint hf_dlmap_xie_diuc; */
-/* static gint hf_dlmap_xie_len; */
-
-static gint hf_dlmapc_compr;
-static gint hf_dlmapc_ulmap;
-static gint hf_dlmapc_rsv;
-static gint hf_dlmapc_len;
-/* static gint hf_dlmapc_sync; */
-static gint hf_dlmapc_opid;
-static gint hf_dlmapc_secid;
-static gint hf_dlmapc_count;
+static int hf_dlmap_phy_fdur;
+static int hf_dlmap_phy_fdur_ms;
+static int hf_dlmap_phy_fdur_per_sec;
+static int hf_dlmap_phy_fnum;
+/* static int hf_dlmap_fch_expected; */
+static int hf_dlmap_dcd;
+static int hf_dlmap_bsid;
+static int hf_dlmap_ofdma_sym;
+/* static int hf_dlmap_ie; */
+static int hf_dlmap_ie_diuc;
+static int hf_dlmap_ie_reserved_extended2_duic;
+static int hf_dlmap_ie_reserved_extended_duic;
+static int hf_dlmap_ie_diuc_ext;
+static int hf_dlmap_ie_diuc_ext2;
+static int hf_dlmap_ie_length;
+static int hf_dlmap_ie_bitmap;
+static int hf_dlmap_ie_bitmap_cqi;
+static int hf_dlmap_ie_bitmap_pusc;
+static int hf_dlmap_ie_bitmap_opt_pusc;
+static int hf_dlmap_ie_bitmap_amc;
+static int hf_dlmap_ie_bitmap_aas;
+static int hf_dlmap_ie_bitmap_periodic_ranging;
+static int hf_dlmap_ie_bitmap_sounding;
+static int hf_dlmap_ie_bitmap_mimo;
+static int hf_dlmap_ie_ncid;
+static int hf_dlmap_ie_cid;
+static int hf_dlmap_ie_offsym;
+static int hf_dlmap_ie_offsub;
+static int hf_dlmap_ie_boosting;
+static int hf_dlmap_ie_numsym;
+static int hf_dlmap_ie_numsub;
+static int hf_dlmap_ie_rep;
+static int hf_dlmap_ie_offsym2;
+static int hf_dlmap_ie_offsub2;
+static int hf_dlmap_ie_boosting2;
+static int hf_dlmap_ie_numsym2;
+static int hf_dlmap_ie_numsub2;
+static int hf_dlmap_ie_rep2;
+
+/* static int hf_dlmap_xie_diuc; */
+/* static int hf_dlmap_xie_len; */
+
+static int hf_dlmapc_compr;
+static int hf_dlmapc_ulmap;
+static int hf_dlmapc_rsv;
+static int hf_dlmapc_len;
+/* static int hf_dlmapc_sync; */
+static int hf_dlmapc_opid;
+static int hf_dlmapc_secid;
+static int hf_dlmapc_count;
#if 0
-static gint hf_109x_cmi;
-static gint hf_109x_len;
-static gint hf_109x_rcid;
-static gint hf_109x_haoi;
-static gint hf_109x_dl;
-static gint hf_109x_ul;
-static gint hf_109x_dlie;
-static gint hf_109x_symofs;
-static gint hf_109x_subofs;
-static gint hf_109x_rsv;
+static int hf_109x_cmi;
+static int hf_109x_len;
+static int hf_109x_rcid;
+static int hf_109x_haoi;
+static int hf_109x_dl;
+static int hf_109x_ul;
+static int hf_109x_dlie;
+static int hf_109x_symofs;
+static int hf_109x_subofs;
+static int hf_109x_rsv;
#endif
-static gint hf_308a_cmi;
-static gint hf_308a_ulmap;
-static gint hf_308a_type;
-static gint hf_308a_mult;
-static gint hf_308a_rsv;
-static gint hf_mac_header_compress_dlmap_crc;
-static gint hf_mac_header_compress_dlmap_crc_status;
-static gint hf_crc16;
-static gint hf_crc16_status;
-static gint hf_padding;
-static gint hf_cid_mask;
-static gint hf_reserved;
+static int hf_308a_cmi;
+static int hf_308a_ulmap;
+static int hf_308a_type;
+static int hf_308a_mult;
+static int hf_308a_rsv;
+static int hf_mac_header_compress_dlmap_crc;
+static int hf_mac_header_compress_dlmap_crc_status;
+static int hf_crc16;
+static int hf_crc16_status;
+static int hf_padding;
+static int hf_cid_mask;
+static int hf_reserved;
/* Generated via "one time" script to help create filterable fields */
static int hf_dlmap_rcid_ie_cid;
@@ -611,15 +610,15 @@ static const value_string plugin_proto_checksum_vals[] = {
* DL-MAP Miscellaneous IEs and TLVs
*******************************************************************/
-gint RCID_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb, gint RCID_Type_lcl)
+int RCID_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb, int RCID_Type_lcl)
{
/* RCID_IE 8.4.5.3 and 8.4.5.3.20.1 */
/* offset of IE in bits, length is variable */
- gint bit = offset;
+ int bit = offset;
proto_item *ti = NULL;
proto_tree *tree = NULL;
- gint Prefix = 0;
- gint cid = 0;
+ int Prefix = 0;
+ int cid = 0;
if (RCID_Type_lcl == 0)
length = 16;
@@ -664,14 +663,14 @@ gint RCID_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb, gin
* DL-MAP Extended-2 HARQ sub-burst IEs (8.4.5.3.21)
*******************************************************************/
-static gint Dedicated_DL_Control_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Dedicated_DL_Control_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.3.20 */
/* offset of IE in nibbles, length is variable */
- gint nib;
- gint nibble;
+ int nib;
+ int nibble;
proto_tree *tree;
- gint len;
+ int len;
nib = offset;
@@ -700,13 +699,13 @@ static gint Dedicated_DL_Control_IE(proto_tree *diuc_tree, gint offset, gint len
return (length + 1);
}
-static gint Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, gint offset, gint length _U_, tvbuff_t *tvb)
+static int Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, int offset, int length _U_, tvbuff_t *tvb)
{
/* offset of IE in bits, length is variable */
- gint bit;
+ int bit;
proto_tree *tree;
- gint mci, cqi, cmi, matrix = 0, pad, CQICH_num, mimo_mode;
- gint j;
+ int mci, cqi, cmi, matrix = 0, pad, CQICH_num, mimo_mode;
+ int j;
bit = offset;
@@ -770,14 +769,14 @@ static gint Dedicated_MIMO_DL_Control_IE(proto_tree *diuc_tree, gint offset, gin
return (bit - offset);
}
-static gint DL_HARQ_Chase_sub_burst_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int DL_HARQ_Chase_sub_burst_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.3.21 DL_HARQ_Chase_sub_burst_IE */
/* offset of IE in nibbles, length is variable */
- gint bit;
+ int bit;
proto_tree *tree;
- gint nsub, ddci, dur, sbi;
- gint j;
+ int nsub, ddci, dur, sbi;
+ int j;
bit = NIB_TO_BIT(offset);
@@ -823,14 +822,14 @@ static gint DL_HARQ_Chase_sub_burst_IE(proto_tree *diuc_tree, gint offset, gint
return (BIT_TO_NIB(bit) - offset);
}
-static gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
- gint bit;
+ int bit;
proto_tree *tree;
- gint nsub, ddci, dur;
- gint j;
- guint32 calculated_crc;
+ int nsub, ddci, dur;
+ int j;
+ uint32_t calculated_crc;
bit = NIB_TO_BIT(offset);
@@ -879,14 +878,14 @@ static gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinf
return (BIT_TO_NIB(bit) - offset);
}
-static gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
- gint bit;
+ int bit;
proto_tree *tree;
- gint nsub, sbdi, ddci, dur;
- gint j;
- guint16 calculated_crc;
+ int nsub, sbdi, ddci, dur;
+ int j;
+ uint16_t calculated_crc;
bit = NIB_TO_BIT(offset);
@@ -943,15 +942,15 @@ static gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo
return (BIT_TO_NIB(bit) - offset);
}
-static gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
- gint nsub, mui, dci, akd;
- gint i, j;
- guint16 calculated_crc;
+ int nsub, mui, dci, akd;
+ int i, j;
+ uint16_t calculated_crc;
bit = NIB_TO_BIT(offset);
@@ -1004,14 +1003,14 @@ static gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *
return (BIT_TO_NIB(bit) - offset);
}
-static gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
- gint bit;
+ int bit;
proto_tree *tree;
- gint nsub, mui, dci, akd;
- gint i, j;
- guint16 calculated_crc;
+ int nsub, mui, dci, akd;
+ int i, j;
+ uint16_t calculated_crc;
bit = NIB_TO_BIT(offset);
@@ -1058,14 +1057,14 @@ static gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pin
return (BIT_TO_NIB(bit) - offset);
}
-static gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
- gint bit;
+ int bit;
proto_tree *tree;
- gint nsub, mui, dci, akd;
- gint i, j;
- guint16 calculated_crc;
+ int nsub, mui, dci, akd;
+ int i, j;
+ uint16_t calculated_crc;
bit = NIB_TO_BIT(offset);
@@ -1113,14 +1112,14 @@ static gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, packet_in
return (BIT_TO_NIB(bit) - offset);
}
-static gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* offset of IE in nibbles, length is variable */
- gint bit;
+ int bit;
proto_tree *tree;
- gint nsub, sbi, txc, akd, dmci;
- gint j;
- guint16 calculated_crc;
+ int nsub, sbi, txc, akd, dmci;
+ int j;
+ uint16_t calculated_crc;
bit = NIB_TO_BIT(offset);
@@ -1170,15 +1169,15 @@ static gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, packet_info *pi
* DL-MAP Extended-2 IEs
*******************************************************************/
-static gint MBS_MAP_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int MBS_MAP_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 0 */
/* 8.4.5.3.12 MBS_MAP_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
- gint mde, dci, s3i;
+ int mde, dci, s3i;
bit = NIB_TO_BIT(offset);
@@ -1227,13 +1226,13 @@ static gint MBS_MAP_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t
return BIT_TO_NIB(bit);
}
-static gint HO_Anchor_Active_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int HO_Anchor_Active_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 1 */
/* 8.4.5.3.14 [2] HO_Anchor_Active_DL-MAP_IE TODO 1.1 */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1246,13 +1245,13 @@ static gint HO_Anchor_Active_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo
return nib;
}
-static gint HO_Active_Anchor_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int HO_Active_Anchor_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 2 */
/* 8.4.5.3.15 HO_Active_Anchor_DL_MAP_IE TODO 1.1 */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1265,13 +1264,13 @@ static gint HO_Active_Anchor_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo
return nib;
}
-static gint HO_CID_Translation_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int HO_CID_Translation_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 3 */
/* 8.4.5.3.16 HO_CID_Translation_MAP_IE TODO 1.1 */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1284,13 +1283,13 @@ static gint HO_CID_Translation_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo,
return nib;
}
-static gint MIMO_in_another_BS_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_in_another_BS_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 4 */
/* 8.4.5.3.17 [2] MIMO_in_another_BS_IE (not implemented)*/
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1303,13 +1302,13 @@ static gint MIMO_in_another_BS_IE(proto_tree *diuc_tree, packet_info *pinfo, gin
return nib;
}
-static gint Macro_MIMO_DL_Basic_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int Macro_MIMO_DL_Basic_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* dl-map extended-2 ie = 5 */
/* 8.4.5.3.18 [2] Macro-MIMO_DL_Basic_IE (not implemented) */
/* offset of tlv in nibbles, length of tlv in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1322,13 +1321,13 @@ static gint Macro_MIMO_DL_Basic_IE(proto_tree *diuc_tree, packet_info *pinfo, gi
return nib;
}
-static gint Skip_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Skip_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 6 */
/* 8.4.5.3.20.2 Skip_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
bit = NIB_TO_BIT(offset);
@@ -1344,14 +1343,14 @@ static gint Skip_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *t
return BIT_TO_NIB(bit);
}
-static gint HARQ_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int HARQ_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 7 */
/* 8.4.5.3.21 [2] HARQ_DL_MAP_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_tree *tree;
- gint len, lastbit, rui, mode, sub_len, pad;
+ int len, lastbit, rui, mode, sub_len, pad;
bit = NIB_TO_BIT(offset);
@@ -1423,13 +1422,13 @@ static gint HARQ_DL_MAP_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offse
return BIT_TO_NIB(bit);
}
-static gint HARQ_ACK_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int HARQ_ACK_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 8 */
/* 8.4.5.3.22 HARQ_ACK IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint data;
- gint nib;
+ int data;
+ int nib;
proto_tree *tree;
nib = offset;
@@ -1444,16 +1443,16 @@ static gint HARQ_ACK_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_
return nib;
}
-static gint Enhanced_DL_MAP_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Enhanced_DL_MAP_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 9 */
/* 8.4.5.3.23 Enhanced DL MAP IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
- gint numass, n_cid;
- gint i, n;
+ int numass, n_cid;
+ int i, n;
bit = NIB_TO_BIT(offset);
@@ -1479,13 +1478,13 @@ static gint Enhanced_DL_MAP_IE(proto_tree *diuc_tree, gint offset, gint length,
return BIT_TO_NIB(bit);
}
-static gint Closed_loop_MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int Closed_loop_MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 0xA */
/* 8.4.5.3.24 Closed-loop MIMO DL Enhanced IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1498,18 +1497,18 @@ static gint Closed_loop_MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, packet_info *
return nib;
}
-static gint AAS_SDMA_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int AAS_SDMA_DL_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended-2 IE = 0xE */
/* 8.4.5.3.26 AAS_SDMA_DL_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
- gint num_region, num_users, pilot_pattern, encoding_mode, ackch_alloc, cqich_alloc;
- gint aas_preamble = 1;
- gint zone_permut = 0; /* TODO */
- gint i, j;
+ int num_region, num_users, pilot_pattern, encoding_mode, ackch_alloc, cqich_alloc;
+ int aas_preamble = 1;
+ int zone_permut = 0; /* TODO */
+ int i, j;
bit = NIB_TO_BIT(offset);
@@ -1612,13 +1611,13 @@ static gint AAS_SDMA_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbu
* DL-MAP Extended IEs
*******************************************************************/
-static gint Channel_Measurement_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Channel_Measurement_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0 */
/* 8.4.5.3.5 [1] Channel_Measurement_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1634,15 +1633,15 @@ static gint Channel_Measurement_IE(proto_tree *diuc_tree, gint offset, gint leng
return nib;
}
-static gint STC_Zone_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int STC_Zone_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 1 */
/* 8.4.5.3.4 STC_Zone_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
/* set globals: STC_Zone_Dedicated_Pilots, STC_Zone_Matrix
* used in 8.4.5.3.21.1 Dedicated MIMO Control IE 286t */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
bit = NIB_TO_BIT(offset);
@@ -1669,13 +1668,13 @@ static gint STC_Zone_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_
return BIT_TO_NIB(bit);
}
-static gint AAS_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int AAS_DL_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 2 */
/* 8.4.5.3.3 AAS_DL_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
bit = NIB_TO_BIT(offset);
@@ -1697,13 +1696,13 @@ static gint AAS_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t
return BIT_TO_NIB(bit);
}
-static gint Data_location_in_another_BS_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Data_location_in_another_BS_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 3 */
/* 8.4.5.3.6 Data_location_in_another_BS_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
bit = NIB_TO_BIT(offset);
@@ -1730,13 +1729,13 @@ static gint Data_location_in_another_BS_IE(proto_tree *diuc_tree, gint offset, g
return BIT_TO_NIB(bit);
}
-static gint CID_Switch_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int CID_Switch_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 4 */
/* 8.4.5.3.7 [1] CID_Switch_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1751,13 +1750,13 @@ static gint CID_Switch_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuf
return nib;
}
-static gint MIMO_DL_Basic_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_DL_Basic_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 5 */
/* 8.4.5.3.8 MIMO_DL_Basic_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1770,13 +1769,13 @@ static gint MIMO_DL_Basic_IE(proto_tree *diuc_tree, packet_info *pinfo, gint off
return nib;
}
-static gint MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 6 */
/* 8.4.5.3.9 MIMO_DL_Enhanced_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_tree *tree;
nib = offset;
@@ -1789,15 +1788,15 @@ static gint MIMO_DL_Enhanced_IE(proto_tree *diuc_tree, packet_info *pinfo, gint
return nib;
}
-static gint HARQ_Map_Pointer_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int HARQ_Map_Pointer_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 7 */
/* 8.4.5.3.10 [2] HARQ_Map_Pointer_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
- gint length_in_bits, map, mask_len;
+ int length_in_bits, map, mask_len;
bit = NIB_TO_BIT(offset);
@@ -1838,15 +1837,15 @@ static gint HARQ_Map_Pointer_IE(proto_tree *diuc_tree, gint offset, gint length,
return BIT_TO_NIB(bit);
}
-static gint PHYMOD_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int PHYMOD_DL_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 8 */
/* 8.4.5.3.11 PHYMOD_DL_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
- gint pmt;
+ int pmt;
bit = NIB_TO_BIT(offset);
@@ -1867,15 +1866,15 @@ static gint PHYMOD_DL_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff
return BIT_TO_NIB(bit);
}
-static gint Broadcast_Control_Pointer_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Broadcast_Control_Pointer_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0xA */
/* 8.4.5.3.25 Broadcast Control Pointer IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
- gint skip;
+ int skip;
bit = NIB_TO_BIT(offset);
@@ -1893,13 +1892,13 @@ static gint Broadcast_Control_Pointer_IE(proto_tree *diuc_tree, gint offset, gin
return BIT_TO_NIB(bit);
}
-static gint DL_PUSC_Burst_Allocation_in_Other_Segment_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int DL_PUSC_Burst_Allocation_in_Other_Segment_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0xB */
/* 8.4.5.3.13 DL PUSC Burst Allocation in Other Segment IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
bit = NIB_TO_BIT(offset);
@@ -1927,13 +1926,13 @@ static gint DL_PUSC_Burst_Allocation_in_Other_Segment_IE(proto_tree *diuc_tree,
return BIT_TO_NIB(bit);
}
-static gint PUSC_ASCA_Alloc_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int PUSC_ASCA_Alloc_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0xC */
/* 8.4.5.3.27 PUSC_ASCA_Alloc_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_tree *tree;
bit = NIB_TO_BIT(offset);
@@ -1955,14 +1954,14 @@ static gint PUSC_ASCA_Alloc_IE(proto_tree *diuc_tree, gint offset, gint length,
return BIT_TO_NIB(bit);
}
-static gint UL_interference_and_noise_level_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int UL_interference_and_noise_level_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* DL-MAP Extended IE = 0xF */
/* 8.4.5.3.19 UL_interference_and_noise_level_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
proto_tree *tree;
- gint nib = offset;
- gint bitmap, data;
+ int nib = offset;
+ int bitmap, data;
tree = proto_tree_add_subtree(diuc_tree, tvb, NIBHI(offset, length), ett_286h, NULL, "UL_interference_and_noise_level_IE");
@@ -2002,7 +2001,7 @@ static gint UL_interference_and_noise_level_IE(proto_tree *diuc_tree, gint offse
* DL-MAP Plugin
*******************************************************************/
-static gint dissect_dlmap_ie(proto_tree *ie_tree, packet_info *pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int dissect_dlmap_ie(proto_tree *ie_tree, packet_info *pinfo, int offset, int length, tvbuff_t *tvb)
{
/* decode a single DL-MAP IE and return the
* length of the IE in nibbles
@@ -2011,19 +2010,19 @@ static gint dissect_dlmap_ie(proto_tree *ie_tree, packet_info *pinfo, gint offse
proto_item *ti = NULL;
proto_tree *tree = NULL;
- gint nibble = offset;
- gint diuc;
- gint ext2_diuc;
- gint len;
- gint ext_diuc;
+ int nibble = offset;
+ int diuc;
+ int ext2_diuc;
+ int len;
+ int ext_diuc;
- gint alt_format = 0;
- guint data = 0;
- gint i;
- /*gint papr = 0;*/
- gint ie_len = 9;
+ int alt_format = 0;
+ unsigned data = 0;
+ int i;
+ /*int papr = 0;*/
+ int ie_len = 9;
- gint n_cid;
+ int n_cid;
/* 8.4.5.3 DL-MAP IE format - table 275 */
diuc = TVB_NIB_NIBBLE(nibble, tvb);
@@ -2247,13 +2246,13 @@ static gint dissect_dlmap_ie(proto_tree *ie_tree, packet_info *pinfo, gint offse
static int dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree, void* data _U_)
{
/* 6.3.2.3.2 [2] DL-MAP table 16 */
- guint offset = 0;
- gint length, nib, pad;
+ unsigned offset = 0;
+ int length, nib, pad;
proto_item *ti = NULL;
proto_tree *dlmap_tree = NULL;
proto_tree *ie_tree = NULL;
proto_tree *phy_tree = NULL;
- gint tvb_len = tvb_reported_length(tvb);
+ int tvb_len = tvb_reported_length(tvb);
INC_CID = 0;
@@ -2296,24 +2295,24 @@ static int dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo,
return tvb_captured_length(tvb);
}
-gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree)
+int wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree)
{
/* 8.4.5.6.1 [2] Compressed DL-MAP */
/* decode a compressed dl-map and return the length in bytes; */
/* if there is a compressed ul-map, also decode that and include in the length */
- guint offset = 0;
+ unsigned offset = 0;
proto_item *ti = NULL;
proto_item *ti_phy = NULL;
proto_item *ti_dlmap_ies = NULL;
proto_tree *tree = NULL;
proto_tree *ie_tree = NULL;
proto_tree *phy_tree = NULL;
- gint ulmap_appended;
- guint length, lennib, pad;
- guint mac_len, dl_ie_count;
- guint tvb_len = tvb_reported_length(tvb);
- guint nib = 0;
- guint32 mac_crc, calculated_crc;
+ int ulmap_appended;
+ unsigned length, lennib, pad;
+ unsigned mac_len, dl_ie_count;
+ unsigned tvb_len = tvb_reported_length(tvb);
+ unsigned nib = 0;
+ uint32_t mac_crc, calculated_crc;
/* update the info column */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Compressed DL-MAP");
@@ -2324,7 +2323,7 @@ gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tre
mac_len = length;
lennib = BYTE_TO_NIB(length);
- ulmap_appended = (tvb_get_guint8(tvb, offset) >> 4) & 1; /* UL MAP appended? */
+ ulmap_appended = (tvb_get_uint8(tvb, offset) >> 4) & 1; /* UL MAP appended? */
/* display MAC Compressed DL-MAP and create subtree */
ti = proto_tree_add_protocol_format(base_tree, proto_mac_mgmt_msg_dlmap_decoder, tvb, offset, length, "Compressed DL-MAP (%u bytes)", length);
@@ -2347,7 +2346,7 @@ gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tre
proto_tree_add_item(tree, hf_dlmapc_secid, tvb, offset+8, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_dlmap_ofdma_sym, tvb, offset+9, 1, ENC_BIG_ENDIAN); /* 2005 */
proto_tree_add_item(tree, hf_dlmapc_count, tvb, offset+10,1, ENC_BIG_ENDIAN);
- dl_ie_count = tvb_get_guint8(tvb, offset + 10);
+ dl_ie_count = tvb_get_uint8(tvb, offset + 10);
offset += 11;
nib = BYTE_TO_NIB(offset);
@@ -2407,20 +2406,20 @@ gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tre
return mac_len;
}
#if 0
-static gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree)
+static int wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree)
{
/* decode a SUB-DL-UL-MAP message 6.3.2.3.60 and return the length in bytes */
/* first three bits are 0x7, which following a compressed DL map indicates this message */
proto_tree *tree = NULL;
proto_tree *ie_tree = NULL;
proto_item *generic_item = NULL;
- gint data;
- gint i, numie;
- guint16 calculated_crc;
+ int data;
+ int i, numie;
+ uint16_t calculated_crc;
- gint length = tvb_reported_length(tvb);
- gint nib = 0;
- gint lennib = BYTE_TO_NIB(length);
+ int length = tvb_reported_length(tvb);
+ int nib = 0;
+ int lennib = BYTE_TO_NIB(length);
sub_dl_ul_map = 1; /* set flag */
@@ -2485,22 +2484,22 @@ static gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo, proto_
}
#endif
-gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *base_tree)
+int wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *base_tree)
{
/* 8.4.5.8.1 [2] Reduced AAS private DL-MAP */
/* if there is an appended UL-MAP, also decode that */
- guint offset = 0;
+ unsigned offset = 0;
proto_item *ti = NULL;
proto_tree *tree = NULL;
- gint ulmap_appended;
- gint length;
- gint tvb_len = tvb_reported_length(tvb);
- gint bit = 0;
- guint data, pad, mult;
- gint numie = 1;
- gint i;
- guint16 calculated_crc;
- gint smcs,cidi,dcdi,phyi,cqci;
+ int ulmap_appended;
+ int length;
+ int tvb_len = tvb_reported_length(tvb);
+ int bit = 0;
+ unsigned data, pad, mult;
+ int numie = 1;
+ int i;
+ uint16_t calculated_crc;
+ int smcs,cidi,dcdi,phyi,cqci;
length = tvb_len;
@@ -3389,7 +3388,7 @@ void proto_register_mac_mgmt_msg_dlmap(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_dlmap,
&ett_dlmap_ie,
diff --git a/plugins/epan/wimax/msg_dreg.c b/plugins/epan/wimax/msg_dreg.c
index 71f9316f1d..2428f97e88 100644
--- a/plugins/epan/wimax/msg_dreg.c
+++ b/plugins/epan/wimax/msg_dreg.c
@@ -21,8 +21,7 @@
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
-
-extern gboolean include_cor2_changes;
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_dreg_req(void);
void proto_register_mac_mgmt_msg_dreg_cmd(void);
@@ -32,45 +31,45 @@ static dissector_handle_t dreg_req_handle;
static dissector_handle_t dreg_cmd_handle;
/* Forward reference */
-static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len);
+static void dissect_dreg_tlv(proto_tree *dreg_tree, int tlv_type, tvbuff_t *tvb, unsigned tlv_offset, unsigned tlv_len);
static int dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data);
static int dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data);
-static gint proto_mac_mgmt_msg_dreg_req_decoder;
-static gint proto_mac_mgmt_msg_dreg_cmd_decoder;
+static int proto_mac_mgmt_msg_dreg_req_decoder;
+static int proto_mac_mgmt_msg_dreg_cmd_decoder;
-static gint ett_mac_mgmt_msg_dreg_decoder;
+static int ett_mac_mgmt_msg_dreg_decoder;
/* Setup protocol subtree array */
-static gint *ett[] =
+static int *ett[] =
{
&ett_mac_mgmt_msg_dreg_decoder,
};
/* DREG fields */
-/* static gint hf_ack_type_reserved; */
-static gint hf_dreg_cmd_action;
-static gint hf_dreg_cmd_action_cor2;
-static gint hf_dreg_cmd_reserved;
-static gint hf_dreg_paging_cycle;
-static gint hf_dreg_paging_offset;
-static gint hf_dreg_paging_group_id;
-static gint hf_dreg_req_duration;
-static gint hf_paging_controller_id;
-static gint hf_mac_hash_skip_threshold;
-static gint hf_dreg_paging_cycle_request;
-static gint hf_dreg_retain_ms_service_sbc;
-static gint hf_dreg_retain_ms_service_pkm;
-static gint hf_dreg_retain_ms_service_reg;
-static gint hf_dreg_retain_ms_service_network_address;
-static gint hf_dreg_retain_ms_service_tod;
-static gint hf_dreg_retain_ms_service_tftp;
-static gint hf_dreg_retain_ms_service_full_service;
-static gint hf_dreg_consider_paging_pref;
-static gint hf_tlv_value;
-static gint hf_dreg_req_action;
-static gint hf_dreg_req_reserved;
-static gint hf_dreg_invalid_tlv;
+/* static int hf_ack_type_reserved; */
+static int hf_dreg_cmd_action;
+static int hf_dreg_cmd_action_cor2;
+static int hf_dreg_cmd_reserved;
+static int hf_dreg_paging_cycle;
+static int hf_dreg_paging_offset;
+static int hf_dreg_paging_group_id;
+static int hf_dreg_req_duration;
+static int hf_paging_controller_id;
+static int hf_mac_hash_skip_threshold;
+static int hf_dreg_paging_cycle_request;
+static int hf_dreg_retain_ms_service_sbc;
+static int hf_dreg_retain_ms_service_pkm;
+static int hf_dreg_retain_ms_service_reg;
+static int hf_dreg_retain_ms_service_network_address;
+static int hf_dreg_retain_ms_service_tod;
+static int hf_dreg_retain_ms_service_tftp;
+static int hf_dreg_retain_ms_service_full_service;
+static int hf_dreg_consider_paging_pref;
+static int hf_tlv_value;
+static int hf_dreg_req_action;
+static int hf_dreg_req_reserved;
+static int hf_dreg_invalid_tlv;
/* STRING RESOURCES */
static const value_string vals_dreg_req_code[] = {
@@ -131,7 +130,7 @@ Action Code 03 cancels this restriction"},
};
/* Decode sub-TLV's of either DREG-REQ or DREG-CMD. */
-static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len)
+static void dissect_dreg_tlv(proto_tree *dreg_tree, int tlv_type, tvbuff_t *tvb, unsigned tlv_offset, unsigned tlv_len)
{
switch (tlv_type) {
case DREG_PAGING_INFO:
@@ -363,16 +362,16 @@ void proto_register_mac_mgmt_msg_dreg_cmd(void)
/* Decode DREG-REQ messages. */
static int dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tlv_offset;
- guint tvb_len;
+ unsigned offset = 0;
+ unsigned tlv_offset;
+ unsigned tvb_len;
proto_item *dreg_req_item;
proto_tree *dreg_req_tree;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
- gint tlv_type;
- gint tlv_len;
- gboolean hmac_found = FALSE;
+ int tlv_type;
+ int tlv_len;
+ bool hmac_found = false;
{ /* we are being asked for details */
@@ -410,7 +409,7 @@ static int dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pin
/* decode and display the HMAC Tuple */
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dreg_decoder, dreg_req_tree, proto_mac_mgmt_msg_dreg_req_decoder, tvb, offset, tlv_len, "HMAC Tuple");
wimax_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
- hmac_found = TRUE;
+ hmac_found = true;
break;
case CMAC_TUPLE: /* Table 348b */
/* decode and display the CMAC Tuple */
@@ -436,16 +435,16 @@ static int dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pin
/* Decode DREG-CMD messages. */
static int dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tlv_offset;
- guint tvb_len;
+ unsigned offset = 0;
+ unsigned tlv_offset;
+ unsigned tvb_len;
proto_item *dreg_cmd_item;
proto_tree *dreg_cmd_tree;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
- gint tlv_type;
- gint tlv_len;
- gboolean hmac_found = FALSE;
+ int tlv_type;
+ int tlv_len;
+ bool hmac_found = false;
{ /* we are being asked for details */
@@ -486,7 +485,7 @@ static int dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pin
/* decode and display the HMAC Tuple */
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dreg_decoder, dreg_cmd_tree, proto_mac_mgmt_msg_dreg_cmd_decoder, tvb, offset, tlv_len, "HMAC Tuple");
wimax_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
- hmac_found = TRUE;
+ hmac_found = true;
break;
case CMAC_TUPLE: /* Table 348b */
/* decode and display the CMAC Tuple */
diff --git a/plugins/epan/wimax/msg_dsa.c b/plugins/epan/wimax/msg_dsa.c
index 4f8c650e2c..e6c9e98e2e 100644
--- a/plugins/epan/wimax/msg_dsa.c
+++ b/plugins/epan/wimax/msg_dsa.c
@@ -31,18 +31,18 @@ static dissector_handle_t dsa_req_handle;
static dissector_handle_t dsa_rsp_handle;
static dissector_handle_t dsa_ack_handle;
-static gint proto_mac_mgmt_msg_dsa_decoder;
-static gint ett_mac_mgmt_msg_dsa_req_decoder;
-static gint ett_mac_mgmt_msg_dsa_rsp_decoder;
-static gint ett_mac_mgmt_msg_dsa_ack_decoder;
+static int proto_mac_mgmt_msg_dsa_decoder;
+static int ett_mac_mgmt_msg_dsa_req_decoder;
+static int ett_mac_mgmt_msg_dsa_rsp_decoder;
+static int ett_mac_mgmt_msg_dsa_ack_decoder;
/* fix fields */
-static gint hf_dsa_transaction_id;
-static gint hf_dsa_confirmation_code;
+static int hf_dsa_transaction_id;
+static int hf_dsa_confirmation_code;
static int dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *dsa_item;
proto_tree *dsa_tree;
@@ -66,7 +66,7 @@ static int dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinf
static int dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *dsa_item;
proto_tree *dsa_tree;
@@ -93,7 +93,7 @@ static int dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
static int dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *dsa_item;
proto_tree *dsa_tree;
@@ -141,7 +141,7 @@ void proto_register_mac_mgmt_msg_dsa(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_dsa_req_decoder,
&ett_mac_mgmt_msg_dsa_rsp_decoder,
diff --git a/plugins/epan/wimax/msg_dsc.c b/plugins/epan/wimax/msg_dsc.c
index e196621d8d..7ac6a290fe 100644
--- a/plugins/epan/wimax/msg_dsc.c
+++ b/plugins/epan/wimax/msg_dsc.c
@@ -31,19 +31,19 @@ static dissector_handle_t dsc_req_handle;
static dissector_handle_t dsc_rsp_handle;
static dissector_handle_t dsc_ack_handle;
-static gint proto_mac_mgmt_msg_dsc_decoder;
-static gint ett_mac_mgmt_msg_dsc_req_decoder;
-static gint ett_mac_mgmt_msg_dsc_rsp_decoder;
-static gint ett_mac_mgmt_msg_dsc_ack_decoder;
+static int proto_mac_mgmt_msg_dsc_decoder;
+static int ett_mac_mgmt_msg_dsc_req_decoder;
+static int ett_mac_mgmt_msg_dsc_rsp_decoder;
+static int ett_mac_mgmt_msg_dsc_ack_decoder;
/* fix fields */
-static gint hf_dsc_transaction_id;
-static gint hf_dsc_confirmation_code;
+static int hf_dsc_transaction_id;
+static int hf_dsc_confirmation_code;
static int dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *dsc_item;
proto_tree *dsc_tree;
@@ -67,7 +67,7 @@ static int dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinf
static int dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *dsc_item;
proto_tree *dsc_tree;
@@ -94,7 +94,7 @@ static int dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
static int dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *dsc_item;
proto_tree *dsc_tree;
@@ -142,7 +142,7 @@ void proto_register_mac_mgmt_msg_dsc(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_dsc_req_decoder,
&ett_mac_mgmt_msg_dsc_rsp_decoder,
diff --git a/plugins/epan/wimax/msg_dsd.c b/plugins/epan/wimax/msg_dsd.c
index 6433336caa..06de174b95 100644
--- a/plugins/epan/wimax/msg_dsd.c
+++ b/plugins/epan/wimax/msg_dsd.c
@@ -31,27 +31,27 @@ void proto_reg_handoff_mac_mgmt_msg_dsd(void);
static dissector_handle_t dsd_req_handle;
static dissector_handle_t dsd_rsp_handle;
-static gint proto_mac_mgmt_msg_dsd_decoder;
-static gint ett_mac_mgmt_msg_dsd_req_decoder;
-static gint ett_mac_mgmt_msg_dsd_rsp_decoder;
-/* static gint ett_dsd_ul_sfe_decoder; */
-/* static gint ett_dsd_dl_sfe_decoder; */
-/* static gint ett_dsd_hmac_tuple; */
-/* static gint ett_dsd_cmac_tuple; */
+static int proto_mac_mgmt_msg_dsd_decoder;
+static int ett_mac_mgmt_msg_dsd_req_decoder;
+static int ett_mac_mgmt_msg_dsd_rsp_decoder;
+/* static int ett_dsd_ul_sfe_decoder; */
+/* static int ett_dsd_dl_sfe_decoder; */
+/* static int ett_dsd_hmac_tuple; */
+/* static int ett_dsd_cmac_tuple; */
/* fix fields */
-static gint hf_dsd_transaction_id;
-static gint hf_dsd_service_flow_id;
-static gint hf_dsd_confirmation_code;
-static gint hf_dsd_invalid_tlv;
-static gint hf_dsd_unknown_type;
+static int hf_dsd_transaction_id;
+static int hf_dsd_service_flow_id;
+static int hf_dsd_confirmation_code;
+static int hf_dsd_invalid_tlv;
+static int hf_dsd_unknown_type;
static int dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset = 0;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
proto_item *dsd_item;
proto_tree *dsd_tree;
proto_tree *tlv_tree = NULL;
@@ -119,9 +119,9 @@ static int dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinf
static int dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset = 0;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
proto_item *dsd_item;
proto_tree *dsd_tree;
proto_tree *tlv_tree = NULL;
@@ -234,7 +234,7 @@ void proto_register_mac_mgmt_msg_dsd(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_dsd_req_decoder,
&ett_mac_mgmt_msg_dsd_rsp_decoder,
diff --git a/plugins/epan/wimax/msg_dsx_rvd.c b/plugins/epan/wimax/msg_dsx_rvd.c
index 3ae81b4dbe..8fbbfb55b1 100644
--- a/plugins/epan/wimax/msg_dsx_rvd.c
+++ b/plugins/epan/wimax/msg_dsx_rvd.c
@@ -24,18 +24,18 @@ void proto_reg_handoff_mac_mgmt_msg_dsx_rvd(void);
static dissector_handle_t dsx_rvd_handle;
-static gint proto_mac_mgmt_msg_dsx_rvd_decoder;
-static gint ett_mac_mgmt_msg_dsx_rvd_decoder;
+static int proto_mac_mgmt_msg_dsx_rvd_decoder;
+static int ett_mac_mgmt_msg_dsx_rvd_decoder;
/* fix fields */
-static gint hf_dsx_rvd_transaction_id;
-static gint hf_dsx_rvd_confirmation_code;
+static int hf_dsx_rvd_transaction_id;
+static int hf_dsx_rvd_confirmation_code;
/* Decode DSX-RVD messages. */
static int dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *dsx_rvd_item;
proto_tree *dsx_rvd_tree;
@@ -71,7 +71,7 @@ void proto_register_mac_mgmt_msg_dsx_rvd(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_dsx_rvd_decoder,
};
diff --git a/plugins/epan/wimax/msg_fpc.c b/plugins/epan/wimax/msg_fpc.c
index e1e2bfa999..9fc08769e2 100644
--- a/plugins/epan/wimax/msg_fpc.c
+++ b/plugins/epan/wimax/msg_fpc.c
@@ -25,29 +25,29 @@ void proto_reg_handoff_mac_mgmt_msg_fpc(void);
static dissector_handle_t fpc_handle;
-static gint proto_mac_mgmt_msg_fpc_decoder;
+static int proto_mac_mgmt_msg_fpc_decoder;
-static gint ett_mac_mgmt_msg_fpc_decoder;
+static int ett_mac_mgmt_msg_fpc_decoder;
/* FPC fields */
-static gint hf_fpc_number_of_stations;
-static gint hf_fpc_basic_cid;
-static gint hf_fpc_power_adjust;
-static gint hf_fpc_power_measurement_frame;
-/* static gint hf_fpc_invalid_tlv; */
+static int hf_fpc_number_of_stations;
+static int hf_fpc_basic_cid;
+static int hf_fpc_power_adjust;
+static int hf_fpc_power_measurement_frame;
+/* static int hf_fpc_invalid_tlv; */
/* Decode FPC messages. */
static int dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint i;
- guint number_stations;
- guint tvb_len;
+ unsigned offset = 0;
+ unsigned i;
+ unsigned number_stations;
+ unsigned tvb_len;
proto_item *fpc_item;
proto_tree *fpc_tree;
- gint8 value;
- gfloat power_change;
+ int8_t value;
+ float power_change;
{ /* we are being asked for details */
@@ -61,7 +61,7 @@ static int dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U
/* display the Number of stations */
proto_tree_add_item(fpc_tree, hf_fpc_number_of_stations, tvb, offset, 1, ENC_BIG_ENDIAN);
- number_stations = tvb_get_guint8(tvb, offset);
+ number_stations = tvb_get_uint8(tvb, offset);
offset++;
for (i = 0; ((i < number_stations) && (offset >= tvb_len)); i++ ) {
/* display the Basic CID*/
@@ -69,7 +69,7 @@ static int dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U
offset += 2;
/* display the Power adjust value */
- value = tvb_get_gint8(tvb, offset);
+ value = tvb_get_int8(tvb, offset);
power_change = (float)0.25 * value; /* 0.25dB incr */
/* display the Power adjust value in dB */
@@ -130,7 +130,7 @@ void proto_register_mac_mgmt_msg_fpc(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_fpc_decoder,
};
diff --git a/plugins/epan/wimax/msg_pkm.c b/plugins/epan/wimax/msg_pkm.c
index 37e61d372b..fc12f06735 100644
--- a/plugins/epan/wimax/msg_pkm.c
+++ b/plugins/epan/wimax/msg_pkm.c
@@ -32,9 +32,9 @@ static dissector_handle_t mac_mgmt_msg_pkm_req_handle;
static dissector_handle_t mac_mgmt_msg_pkm_rsp_handle;
-static gint proto_mac_mgmt_msg_pkm_decoder;
-static gint ett_mac_mgmt_msg_pkm_req_decoder;
-static gint ett_mac_mgmt_msg_pkm_rsp_decoder;
+static int proto_mac_mgmt_msg_pkm_decoder;
+static int ett_mac_mgmt_msg_pkm_req_decoder;
+static int ett_mac_mgmt_msg_pkm_rsp_decoder;
static const value_string vals_pkm_msg_code[] =
{
@@ -70,14 +70,14 @@ static const value_string vals_pkm_msg_code[] =
};
/* fix fields */
-static gint hf_pkm_msg_code;
-static gint hf_pkm_msg_pkm_id;
+static int hf_pkm_msg_code;
+static int hf_pkm_msg_pkm_id;
/* Wimax Mac PKM-REQ Message Dissector */
static int dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *pkm_item;
proto_tree *pkm_tree;
@@ -101,7 +101,7 @@ static int dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinf
/* Wimax Mac PKM-RSP Message Dissector */
static int dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *pkm_item;
proto_tree *pkm_tree;
@@ -140,7 +140,7 @@ void proto_register_mac_mgmt_msg_pkm(void)
};
/* Setup protocol subtree array */
- static gint *ett_pkm[] =
+ static int *ett_pkm[] =
{
&ett_mac_mgmt_msg_pkm_req_decoder,
&ett_mac_mgmt_msg_pkm_rsp_decoder,
diff --git a/plugins/epan/wimax/msg_pmc.c b/plugins/epan/wimax/msg_pmc.c
index c11c709a07..75e95b6337 100644
--- a/plugins/epan/wimax/msg_pmc.c
+++ b/plugins/epan/wimax/msg_pmc.c
@@ -19,8 +19,7 @@
#include <epan/packet.h>
#include "wimax_mac.h"
-
-extern gboolean include_cor2_changes;
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_pmc_req(void);
void proto_register_mac_mgmt_msg_pmc_rsp(void);
@@ -31,26 +30,26 @@ static int dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
static dissector_handle_t pmc_req_handle;
static dissector_handle_t pmc_rsp_handle;
-static gint proto_mac_mgmt_msg_pmc_req_decoder;
-static gint proto_mac_mgmt_msg_pmc_rsp_decoder;
+static int proto_mac_mgmt_msg_pmc_req_decoder;
+static int proto_mac_mgmt_msg_pmc_rsp_decoder;
-static gint ett_mac_mgmt_msg_pmc_decoder;
+static int ett_mac_mgmt_msg_pmc_decoder;
/* Setup protocol subtree array */
-static gint *ett[] =
+static int *ett[] =
{
&ett_mac_mgmt_msg_pmc_decoder,
};
/* PMC fields */
-static gint hf_pmc_req_pwr_control_mode_change;
-static gint hf_pmc_req_pwr_control_mode_change_cor2;
-static gint hf_pmc_req_tx_power_level;
-static gint hf_pmc_req_confirmation;
-static gint hf_pmc_req_reserved;
-static gint hf_pmc_rsp_start_frame;
-static gint hf_pmc_rsp_power_adjust;
-static gint hf_pmc_rsp_offset_BS_per_MS;
+static int hf_pmc_req_pwr_control_mode_change;
+static int hf_pmc_req_pwr_control_mode_change_cor2;
+static int hf_pmc_req_tx_power_level;
+static int hf_pmc_req_confirmation;
+static int hf_pmc_req_reserved;
+static int hf_pmc_rsp_start_frame;
+static int hf_pmc_rsp_power_adjust;
+static int hf_pmc_rsp_offset_BS_per_MS;
/* STRING RESOURCES */
static const value_string vals_pmc_req_pwr[] = {
@@ -164,7 +163,7 @@ void proto_register_mac_mgmt_msg_pmc_rsp(void)
/* Decode PMC-REQ messages. */
static int dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *pmc_req_item;
proto_tree *pmc_req_tree;
@@ -189,12 +188,12 @@ static int dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinf
/* Decode PMC-RSP messages. */
static int dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *pmc_rsp_item;
proto_tree *pmc_rsp_tree;
- guint8 pwr_control_mode;
- gint8 value;
- gfloat power_change;
+ uint8_t pwr_control_mode;
+ int8_t value;
+ float power_change;
{ /* we are being asked for details */
@@ -210,10 +209,10 @@ static int dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
proto_tree_add_item(pmc_rsp_tree, hf_pmc_req_pwr_control_mode_change, tvb, offset, 2, ENC_BIG_ENDIAN);
/* display the Power Adjust start frame */
proto_tree_add_item(pmc_rsp_tree, hf_pmc_rsp_start_frame, tvb, offset, 2, ENC_BIG_ENDIAN);
- pwr_control_mode = 0xC0 & tvb_get_guint8(tvb, offset);
+ pwr_control_mode = 0xC0 & tvb_get_uint8(tvb, offset);
offset++;
- value = tvb_get_gint8(tvb, offset);
+ value = tvb_get_int8(tvb, offset);
power_change = (float)0.25 * value; /* 0.25dB incr */
/* Check if Power Control Mode is 0 */
if (pwr_control_mode == 0) {
diff --git a/plugins/epan/wimax/msg_prc_lt_ctrl.c b/plugins/epan/wimax/msg_prc_lt_ctrl.c
index 084d5ba0c3..b6599ca716 100644
--- a/plugins/epan/wimax/msg_prc_lt_ctrl.c
+++ b/plugins/epan/wimax/msg_prc_lt_ctrl.c
@@ -25,14 +25,14 @@ void proto_reg_handoff_mac_mgmt_msg_prc_lt_ctrl(void);
static dissector_handle_t prc_handle;
-static gint proto_mac_mgmt_msg_prc_lt_ctrl_decoder;
+static int proto_mac_mgmt_msg_prc_lt_ctrl_decoder;
-static gint ett_mac_mgmt_msg_prc_lt_ctrl_decoder;
+static int ett_mac_mgmt_msg_prc_lt_ctrl_decoder;
/* PRC-LT-CTRL fields */
-static gint hf_prc_lt_ctrl_precoding;
-static gint hf_prc_lt_ctrl_precoding_delay;
-/* static gint hf_prc_lt_ctrl_invalid_tlv; */
+static int hf_prc_lt_ctrl_precoding;
+static int hf_prc_lt_ctrl_precoding_delay;
+/* static int hf_prc_lt_ctrl_invalid_tlv; */
static const value_string vals_turn_on[] = {
{0, "Turn off"},
@@ -44,7 +44,7 @@ static const value_string vals_turn_on[] = {
/* Decode PRC-LT-CTRL messages. */
static int dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
+ unsigned offset = 0;
proto_item *prc_lt_ctrl_item;
proto_tree *prc_lt_ctrl_tree;
@@ -100,7 +100,7 @@ void proto_register_mac_mgmt_msg_prc_lt_ctrl(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_prc_lt_ctrl_decoder,
};
diff --git a/plugins/epan/wimax/msg_reg_req.c b/plugins/epan/wimax/msg_reg_req.c
index 3387776498..6c3f8f5019 100644
--- a/plugins/epan/wimax/msg_reg_req.c
+++ b/plugins/epan/wimax/msg_reg_req.c
@@ -19,132 +19,133 @@
#define WIMAX_16E_2005
#include <epan/packet.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
-
-extern gboolean include_cor2_changes;
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_reg_req(void);
void proto_reg_handoff_mac_mgmt_msg_reg_req(void);
static dissector_handle_t reg_req_handle;
-static gint proto_mac_mgmt_msg_reg_req_decoder;
-static gint ett_mac_mgmt_msg_reg_req_decoder;
+static int proto_mac_mgmt_msg_reg_req_decoder;
+static int ett_mac_mgmt_msg_reg_req_decoder;
/* REG-REQ fields */
-static gint hf_reg_ss_mgmt_support;
-static gint hf_reg_ip_mgmt_mode;
-static gint hf_reg_ip_version;
-static gint hf_reg_req_secondary_mgmt_cid;
-static gint hf_reg_ul_cids;
-static gint hf_reg_max_classifiers;
-static gint hf_reg_phs;
-static gint hf_reg_arq;
-static gint hf_reg_dsx_flow_control;
-static gint hf_reg_mac_crc_support;
-static gint hf_reg_mca_flow_control;
-static gint hf_reg_mcast_polling_cids;
-static gint hf_reg_num_dl_trans_cid;
-static gint hf_reg_mac_address;
-static gint hf_reg_tlv_t_20_1_max_mac_level_data_per_dl_frame;
-static gint hf_reg_tlv_t_20_2_max_mac_level_data_per_ul_frame;
-static gint hf_reg_tlv_t_21_packing_support;
-static gint hf_reg_tlv_t_22_mac_extended_rtps_support;
-static gint hf_reg_tlv_t_23_max_num_bursts_concurrently_to_the_ms;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcp;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_mobile_ipv4;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcpv6;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_ipv6;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_rsvd;
-static gint hf_reg_tlv_t_27_handover_fbss_mdho_ho_disable;
-static gint hf_reg_tlv_t_27_handover_fbss_mdho_dl_rf_monitoring_maps;
-static gint hf_reg_tlv_t_27_handover_mdho_dl_monitoring_single_map;
-static gint hf_reg_tlv_t_27_handover_mdho_dl_monitoring_maps;
-static gint hf_reg_tlv_t_27_handover_mdho_ul_multiple;
-static gint hf_reg_tlv_t_27_handover_reserved;
-static gint hf_reg_tlv_t_29_ho_process_opt_ms_timer;
-static gint hf_reg_tlv_t_31_mobility_handover;
-static gint hf_reg_tlv_t_31_mobility_sleep_mode;
-static gint hf_reg_tlv_t_31_mobility_idle_mode;
-static gint hf_reg_req_tlv_t_32_sleep_mode_recovery_time;
-static gint hf_ms_previous_ip_address_v4;
-static gint hf_ms_previous_ip_address_v6;
-static gint hf_idle_mode_timeout;
-static gint hf_reg_req_tlv_t_45_ms_periodic_ranging_timer;
-static gint hf_reg_tlv_t_40_arq_ack_type_selective_ack_entry;
-static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_entry;
-static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_with_selective_ack_entry;
-static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_with_block_sequence_ack;
-static gint hf_reg_tlv_t_40_arq_ack_type_reserved;
-static gint hf_reg_tlv_t_41_ho_connections_param_processing_time;
-static gint hf_reg_tlv_t_42_ho_tek_processing_time;
-static gint hf_reg_tlv_t_43_bandwidth_request_ul_tx_power_report_header_support;
-static gint hf_reg_tlv_t_43_bandwidth_request_cinr_report_header_support;
-static gint hf_reg_tlv_t_43_cqich_allocation_request_header_support;
-static gint hf_reg_tlv_t_43_phy_channel_report_header_support;
-static gint hf_reg_tlv_t_43_bandwidth_request_ul_sleep_control_header_support;
-static gint hf_reg_tlv_t_43_sn_report_header_support;
-static gint hf_reg_tlv_t_43_feedback_header_support;
-static gint hf_reg_tlv_t_43_sdu_sn_extended_subheader_support_and_parameter;
-static gint hf_reg_tlv_t_43_sdu_sn_parameter;
-static gint hf_reg_tlv_t_43_dl_sleep_control_extended_subheader;
-static gint hf_reg_tlv_t_43_feedback_request_extended_subheader;
-static gint hf_reg_tlv_t_43_mimo_mode_feedback_extended_subheader;
-static gint hf_reg_tlv_t_43_ul_tx_power_report_extended_subheader;
-static gint hf_reg_tlv_t_43_mini_feedback_extended_subheader;
-static gint hf_reg_tlv_t_43_sn_request_extended_subheader;
-static gint hf_reg_tlv_t_43_pdu_sn_short_extended_subheader;
-static gint hf_reg_tlv_t_43_pdu_sn_long_extended_subheader;
-static gint hf_reg_tlv_t_43_reserved;
-static gint hf_reg_tlv_t_46_handover_indication_readiness_timer;
-static gint hf_reg_req_min_time_for_intra_fa;
-static gint hf_reg_req_min_time_for_inter_fa;
-static gint hf_reg_encap_atm_4;
-static gint hf_reg_encap_ipv4_4;
-static gint hf_reg_encap_ipv6_4;
-static gint hf_reg_encap_802_3_4;
-static gint hf_reg_encap_802_1q_4;
-static gint hf_reg_encap_ipv4_802_3_4;
-static gint hf_reg_encap_ipv6_802_3_4;
-static gint hf_reg_encap_ipv4_802_1q_4;
-static gint hf_reg_encap_ipv6_802_1q_4;
-static gint hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_4;
-static gint hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_4;
-static gint hf_reg_encap_packet_ip_rohc_header_compression_4;
-static gint hf_reg_encap_packet_ip_ecrtp_header_compression_4;
-static gint hf_reg_encap_rsvd_4;
-static gint hf_reg_encap_atm_2;
-static gint hf_reg_encap_ipv4_2;
-static gint hf_reg_encap_ipv6_2;
-static gint hf_reg_encap_802_3_2;
-static gint hf_reg_encap_802_1q_2;
-static gint hf_reg_encap_ipv4_802_3_2;
-static gint hf_reg_encap_ipv6_802_3_2;
-static gint hf_reg_encap_ipv4_802_1q_2;
-static gint hf_reg_encap_ipv6_802_1q_2;
-static gint hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_2;
-static gint hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_2;
-static gint hf_reg_encap_packet_ip_rohc_header_compression_2;
-static gint hf_reg_encap_packet_ip_ecrtp_header_compression_2;
-static gint hf_reg_encap_rsvd_2;
-static gint hf_tlv_type;
-static gint hf_reg_invalid_tlv;
-static gint hf_reg_power_saving_class_type_i;
-static gint hf_reg_power_saving_class_type_ii;
-static gint hf_reg_power_saving_class_type_iii;
-static gint hf_reg_multi_active_power_saving_classes;
-static gint hf_reg_total_power_saving_class_instances;
-static gint hf_reg_power_saving_class_reserved;
-static gint hf_reg_power_saving_class_capability;
-static gint hf_reg_ip_phs_sdu_encap;
-static gint hf_reg_tlv_t_26_method_alloc_ip_addr_secondary_mgmnt_conn;
-static gint hf_reg_tlv_t_27_handover_supported;
-static gint hf_reg_tlv_t_31_mobility_features_supported;
-static gint hf_reg_tlv_t_40_arq_ack_type;
-static gint hf_reg_tlv_t_43_mac_header_ext_header_support;
-static gint hf_reg_req_bs_switching_timer;
+static int hf_reg_ss_mgmt_support;
+static int hf_reg_ip_mgmt_mode;
+static int hf_reg_ip_version;
+static int hf_reg_req_secondary_mgmt_cid;
+static int hf_reg_ul_cids;
+static int hf_reg_max_classifiers;
+static int hf_reg_phs;
+static int hf_reg_arq;
+static int hf_reg_dsx_flow_control;
+static int hf_reg_mac_crc_support;
+static int hf_reg_mca_flow_control;
+static int hf_reg_mcast_polling_cids;
+static int hf_reg_num_dl_trans_cid;
+static int hf_reg_mac_address;
+static int hf_reg_tlv_t_20_1_max_mac_level_data_per_dl_frame;
+static int hf_reg_tlv_t_20_2_max_mac_level_data_per_ul_frame;
+static int hf_reg_tlv_t_21_packing_support;
+static int hf_reg_tlv_t_22_mac_extended_rtps_support;
+static int hf_reg_tlv_t_23_max_num_bursts_concurrently_to_the_ms;
+static int hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcp;
+static int hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_mobile_ipv4;
+static int hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcpv6;
+static int hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_ipv6;
+static int hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_rsvd;
+static int hf_reg_tlv_t_27_handover_fbss_mdho_ho_disable;
+static int hf_reg_tlv_t_27_handover_fbss_mdho_dl_rf_monitoring_maps;
+static int hf_reg_tlv_t_27_handover_mdho_dl_monitoring_single_map;
+static int hf_reg_tlv_t_27_handover_mdho_dl_monitoring_maps;
+static int hf_reg_tlv_t_27_handover_mdho_ul_multiple;
+static int hf_reg_tlv_t_27_handover_reserved;
+static int hf_reg_tlv_t_29_ho_process_opt_ms_timer;
+static int hf_reg_tlv_t_31_mobility_handover;
+static int hf_reg_tlv_t_31_mobility_sleep_mode;
+static int hf_reg_tlv_t_31_mobility_idle_mode;
+static int hf_reg_req_tlv_t_32_sleep_mode_recovery_time;
+static int hf_ms_previous_ip_address_v4;
+static int hf_ms_previous_ip_address_v6;
+static int hf_idle_mode_timeout;
+static int hf_reg_req_tlv_t_45_ms_periodic_ranging_timer;
+static int hf_reg_tlv_t_40_arq_ack_type_selective_ack_entry;
+static int hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_entry;
+static int hf_reg_tlv_t_40_arq_ack_type_cumulative_with_selective_ack_entry;
+static int hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_with_block_sequence_ack;
+static int hf_reg_tlv_t_40_arq_ack_type_reserved;
+static int hf_reg_tlv_t_41_ho_connections_param_processing_time;
+static int hf_reg_tlv_t_42_ho_tek_processing_time;
+static int hf_reg_tlv_t_43_bandwidth_request_ul_tx_power_report_header_support;
+static int hf_reg_tlv_t_43_bandwidth_request_cinr_report_header_support;
+static int hf_reg_tlv_t_43_cqich_allocation_request_header_support;
+static int hf_reg_tlv_t_43_phy_channel_report_header_support;
+static int hf_reg_tlv_t_43_bandwidth_request_ul_sleep_control_header_support;
+static int hf_reg_tlv_t_43_sn_report_header_support;
+static int hf_reg_tlv_t_43_feedback_header_support;
+static int hf_reg_tlv_t_43_sdu_sn_extended_subheader_support_and_parameter;
+static int hf_reg_tlv_t_43_sdu_sn_parameter;
+static int hf_reg_tlv_t_43_dl_sleep_control_extended_subheader;
+static int hf_reg_tlv_t_43_feedback_request_extended_subheader;
+static int hf_reg_tlv_t_43_mimo_mode_feedback_extended_subheader;
+static int hf_reg_tlv_t_43_ul_tx_power_report_extended_subheader;
+static int hf_reg_tlv_t_43_mini_feedback_extended_subheader;
+static int hf_reg_tlv_t_43_sn_request_extended_subheader;
+static int hf_reg_tlv_t_43_pdu_sn_short_extended_subheader;
+static int hf_reg_tlv_t_43_pdu_sn_long_extended_subheader;
+static int hf_reg_tlv_t_43_reserved;
+static int hf_reg_tlv_t_46_handover_indication_readiness_timer;
+static int hf_reg_req_min_time_for_intra_fa;
+static int hf_reg_req_min_time_for_inter_fa;
+static int hf_reg_encap_atm_4;
+static int hf_reg_encap_ipv4_4;
+static int hf_reg_encap_ipv6_4;
+static int hf_reg_encap_802_3_4;
+static int hf_reg_encap_802_1q_4;
+static int hf_reg_encap_ipv4_802_3_4;
+static int hf_reg_encap_ipv6_802_3_4;
+static int hf_reg_encap_ipv4_802_1q_4;
+static int hf_reg_encap_ipv6_802_1q_4;
+static int hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_4;
+static int hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_4;
+static int hf_reg_encap_packet_ip_rohc_header_compression_4;
+static int hf_reg_encap_packet_ip_ecrtp_header_compression_4;
+static int hf_reg_encap_rsvd_4;
+static int hf_reg_encap_atm_2;
+static int hf_reg_encap_ipv4_2;
+static int hf_reg_encap_ipv6_2;
+static int hf_reg_encap_802_3_2;
+static int hf_reg_encap_802_1q_2;
+static int hf_reg_encap_ipv4_802_3_2;
+static int hf_reg_encap_ipv6_802_3_2;
+static int hf_reg_encap_ipv4_802_1q_2;
+static int hf_reg_encap_ipv6_802_1q_2;
+static int hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_2;
+static int hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_2;
+static int hf_reg_encap_packet_ip_rohc_header_compression_2;
+static int hf_reg_encap_packet_ip_ecrtp_header_compression_2;
+static int hf_reg_encap_rsvd_2;
+static int hf_tlv_type;
+static int hf_reg_invalid_tlv;
+static int hf_reg_power_saving_class_type_i;
+static int hf_reg_power_saving_class_type_ii;
+static int hf_reg_power_saving_class_type_iii;
+static int hf_reg_multi_active_power_saving_classes;
+static int hf_reg_total_power_saving_class_instances;
+static int hf_reg_power_saving_class_reserved;
+static int hf_reg_power_saving_class_capability;
+static int hf_reg_ip_phs_sdu_encap;
+static int hf_reg_tlv_t_26_method_alloc_ip_addr_secondary_mgmnt_conn;
+static int hf_reg_tlv_t_27_handover_supported;
+static int hf_reg_tlv_t_31_mobility_features_supported;
+static int hf_reg_tlv_t_40_arq_ack_type;
+static int hf_reg_tlv_t_43_mac_header_ext_header_support;
+static int hf_reg_req_bs_switching_timer;
/* STRING RESOURCES */
@@ -213,15 +214,15 @@ static const value_string unique_no_limit[] = {
};
/* Decode REG-REQ sub-TLV's. */
-void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len, packet_info *pinfo, guint offset, gint proto_registry)
+void dissect_extended_tlv(proto_tree *reg_req_tree, int tlv_type, tvbuff_t *tvb, unsigned tlv_offset, unsigned tlv_len, packet_info *pinfo, unsigned offset, int proto_registry)
{
proto_item *tlv_item;
proto_tree *tlv_tree;
- guint tvb_len;
+ unsigned tvb_len;
tlv_info_t tlv_info;
- guint tlv_end;
- guint length;
- guint nblocks;
+ unsigned tlv_end;
+ unsigned length;
+ unsigned nblocks;
/* Get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
@@ -482,16 +483,16 @@ void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb
/* Decode REG-REQ messages. */
static int dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tlv_offset;
- guint tvb_len;
+ unsigned offset = 0;
+ unsigned tlv_offset;
+ unsigned tvb_len;
proto_item *reg_req_item = NULL;
proto_tree *reg_req_tree = NULL;
proto_tree *tlv_tree = NULL;
- gboolean hmac_found = FALSE;
+ bool hmac_found = false;
tlv_info_t tlv_info;
- gint tlv_type;
- gint tlv_len;
+ int tlv_type;
+ int tlv_len;
{ /* we are being asked for details */
@@ -595,7 +596,7 @@ static int dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinf
/* decode and display the HMAC Tuple */
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_req_decoder, reg_req_tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tlv_len, "HMAC Tuple");
wimax_hmac_tuple_decoder(tlv_tree, tvb, tlv_offset, tlv_len);
- hmac_found = TRUE;
+ hmac_found = true;
break;
case CMAC_TUPLE: /* Table 348b */
/* decode and display the CMAC Tuple */
@@ -1404,7 +1405,7 @@ void proto_register_mac_mgmt_msg_reg_req(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_reg_req_decoder
};
diff --git a/plugins/epan/wimax/msg_reg_rsp.c b/plugins/epan/wimax/msg_reg_rsp.c
index 1f4efd1577..3c7fe131fc 100644
--- a/plugins/epan/wimax/msg_reg_rsp.c
+++ b/plugins/epan/wimax/msg_reg_rsp.c
@@ -24,32 +24,31 @@
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_reg_rsp(void);
void proto_reg_handoff_mac_mgmt_msg_reg_rsp(void);
static dissector_handle_t reg_rsp_handle;
-extern gboolean include_cor2_changes;
+static dissector_handle_t dsc_rsp_handle;
-static dissector_handle_t dsc_rsp_handle = NULL;
-
-static gint proto_mac_mgmt_msg_reg_rsp_decoder;
-static gint ett_mac_mgmt_msg_reg_rsp_decoder;
-static gint ett_reg_rsp_message_tree;
+static int proto_mac_mgmt_msg_reg_rsp_decoder;
+static int ett_mac_mgmt_msg_reg_rsp_decoder;
+static int ett_reg_rsp_message_tree;
/* NCT messages */
/* REG-RSP fields */
-static gint hf_reg_rsp_status;
-static gint hf_tlv_type;
-/* static gint hf_tlv_value; */
-static gint hf_reg_rsp_secondary_mgmt_cid;
-static gint hf_reg_invalid_tlv;
-static gint hf_reg_rsp_new_cid_after_ho;
-static gint hf_reg_rsp_service_flow_id;
-static gint hf_reg_rsp_system_resource_retain_time;
-static gint hf_reg_total_provisioned_sf;
+static int hf_reg_rsp_status;
+static int hf_tlv_type;
+/* static int hf_tlv_value; */
+static int hf_reg_rsp_secondary_mgmt_cid;
+static int hf_reg_invalid_tlv;
+static int hf_reg_rsp_new_cid_after_ho;
+static int hf_reg_rsp_service_flow_id;
+static int hf_reg_rsp_system_resource_retain_time;
+static int hf_reg_total_provisioned_sf;
/* STRING RESOURCES */
@@ -64,23 +63,23 @@ static const value_string vals_reg_rsp_status [] = {
/* Decode REG-RSP messages. */
static int dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tlv_offset;
- guint tvb_len;
+ unsigned offset = 0;
+ unsigned tlv_offset;
+ unsigned tvb_len;
proto_item *reg_rsp_item;
proto_tree *reg_rsp_tree;
proto_item *tlv_item = NULL;
proto_tree *tlv_tree = NULL;
proto_tree *sub_tree = NULL;
- gboolean hmac_found = FALSE;
+ bool hmac_found = false;
tlv_info_t tlv_info;
- gint tlv_type;
- guint tlv_len;
- guint this_offset = 0;
+ int tlv_type;
+ unsigned tlv_len;
+ unsigned this_offset = 0;
tlv_info_t sub_tlv_info;
- gint sub_tlv_type;
- gint sub_tlv_len;
- guint sub_tlv_offset;
+ int sub_tlv_type;
+ int sub_tlv_len;
+ unsigned sub_tlv_offset;
{ /* we are being asked for details */
@@ -216,7 +215,7 @@ static int dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
/* decode and display the HMAC Tuple */
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_reg_rsp_decoder, reg_rsp_tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tlv_len, "HMAC Tuple");
wimax_hmac_tuple_decoder(tlv_tree, tvb, offset+2, tlv_len);
- hmac_found = TRUE;
+ hmac_found = true;
break;
case CMAC_TUPLE: /* Table 348b */
/* decode and display the CMAC Tuple */
@@ -327,7 +326,7 @@ void proto_register_mac_mgmt_msg_reg_rsp(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_reg_rsp_decoder,
&ett_reg_rsp_message_tree
diff --git a/plugins/epan/wimax/msg_rep.c b/plugins/epan/wimax/msg_rep.c
index 7f4b582514..707d4231b3 100644
--- a/plugins/epan/wimax/msg_rep.c
+++ b/plugins/epan/wimax/msg_rep.c
@@ -31,9 +31,9 @@ void proto_reg_handoff_mac_mgmt_msg_rep(void);
static dissector_handle_t rep_req_handle;
static dissector_handle_t rep_rsp_handle;
-static gint proto_mac_mgmt_msg_rep_decoder;
-static gint ett_mac_mgmt_msg_rep_req_decoder;
-static gint ett_mac_mgmt_msg_rep_rsp_decoder;
+static int proto_mac_mgmt_msg_rep_decoder;
+static int ett_mac_mgmt_msg_rep_req_decoder;
+static int ett_mac_mgmt_msg_rep_rsp_decoder;
static const value_string vals_channel_types[] =
{
@@ -81,112 +81,112 @@ static const value_string vals_type_of_measurements[] =
};
/* fix fields */
-static gint hf_rep_unknown_type;
-static gint hf_rep_invalid_tlv;
+static int hf_rep_unknown_type;
+static int hf_rep_invalid_tlv;
-static gint hf_rep_req_report_request;
-static gint hf_rep_req_report_type;
-static gint hf_rep_req_rep_type_bit0;
-static gint hf_rep_req_rep_type_bit1;
-static gint hf_rep_req_rep_type_bit2;
-static gint hf_rep_req_rep_type_bit3_6;
-static gint hf_rep_req_rep_type_bit7;
-static gint hf_rep_req_channel_number;
-static gint hf_rep_req_channel_type;
-static gint hf_rep_req_channel_type_request;
-static gint hf_rep_req_channel_type_reserved;
-static gint hf_rep_req_zone_spec_phy_cinr_request;
-static gint hf_rep_req_preamble_phy_cinr_request;
-static gint hf_rep_req_zone_spec_effective_cinr_request;
-static gint hf_rep_req_preamble_effective_cinr_request;
-static gint hf_rep_req_channel_selectivity_report;
+static int hf_rep_req_report_request;
+static int hf_rep_req_report_type;
+static int hf_rep_req_rep_type_bit0;
+static int hf_rep_req_rep_type_bit1;
+static int hf_rep_req_rep_type_bit2;
+static int hf_rep_req_rep_type_bit3_6;
+static int hf_rep_req_rep_type_bit7;
+static int hf_rep_req_channel_number;
+static int hf_rep_req_channel_type;
+static int hf_rep_req_channel_type_request;
+static int hf_rep_req_channel_type_reserved;
+static int hf_rep_req_zone_spec_phy_cinr_request;
+static int hf_rep_req_preamble_phy_cinr_request;
+static int hf_rep_req_zone_spec_effective_cinr_request;
+static int hf_rep_req_preamble_effective_cinr_request;
+static int hf_rep_req_channel_selectivity_report;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit0_2;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit3;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit4;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit5_6;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit7;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit8_13;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit14_17;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit18;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit19_23;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit0_2;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit3;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit4;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit5_6;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit7;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit8_13;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit14_17;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit18;
+static int hf_rep_req_zone_spec_phy_cinr_req_bit19_23;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit0_2;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit3;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit4;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit5_6;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit7;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit8_13;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit14_15;
+static int hf_rep_req_zone_spec_effective_cinr_req_bit0_2;
+static int hf_rep_req_zone_spec_effective_cinr_req_bit3;
+static int hf_rep_req_zone_spec_effective_cinr_req_bit4;
+static int hf_rep_req_zone_spec_effective_cinr_req_bit5_6;
+static int hf_rep_req_zone_spec_effective_cinr_req_bit7;
+static int hf_rep_req_zone_spec_effective_cinr_req_bit8_13;
+static int hf_rep_req_zone_spec_effective_cinr_req_bit14_15;
-static gint hf_rep_req_preamble_phy_cinr_req_bit0_1;
-static gint hf_rep_req_preamble_phy_cinr_req_bit2_5;
-static gint hf_rep_req_preamble_phy_cinr_req_bit6;
-static gint hf_rep_req_preamble_phy_cinr_req_bit7;
+static int hf_rep_req_preamble_phy_cinr_req_bit0_1;
+static int hf_rep_req_preamble_phy_cinr_req_bit2_5;
+static int hf_rep_req_preamble_phy_cinr_req_bit6;
+static int hf_rep_req_preamble_phy_cinr_req_bit7;
-static gint hf_rep_req_preamble_effective_cinr_req_bit0_1;
-static gint hf_rep_req_preamble_effective_cinr_req_bit2_7;
+static int hf_rep_req_preamble_effective_cinr_req_bit0_1;
+static int hf_rep_req_preamble_effective_cinr_req_bit2_7;
-static gint hf_rep_req_channel_selectivity_rep_bit0;
-static gint hf_rep_req_channel_selectivity_rep_bit1_7;
+static int hf_rep_req_channel_selectivity_rep_bit0;
+static int hf_rep_req_channel_selectivity_rep_bit1_7;
-static gint hf_rep_rsp_report_type;
-static gint hf_rep_rsp_report_type_channel_number;
-static gint hf_rep_rsp_report_type_frame_number;
-static gint hf_rep_rsp_report_type_duration;
-static gint hf_rep_rsp_report_type_basic_report;
-static gint hf_rep_rsp_report_type_basic_report_bit0;
-static gint hf_rep_rsp_report_type_basic_report_bit1;
-static gint hf_rep_rsp_report_type_basic_report_bit2;
-static gint hf_rep_rsp_report_type_basic_report_bit3;
-static gint hf_rep_rsp_report_type_basic_report_reserved;
-static gint hf_rep_rsp_report_type_cinr_report;
-static gint hf_rep_rsp_report_type_cinr_report_mean;
-static gint hf_rep_rsp_report_type_cinr_report_deviation;
-static gint hf_rep_rsp_report_type_rssi_report;
-static gint hf_rep_rsp_report_type_rssi_report_mean;
-static gint hf_rep_rsp_report_type_rssi_report_deviation;
-static gint hf_rep_rsp_current_transmitted_power;
-static gint hf_rep_rsp_channel_type_report;
-static gint hf_rep_rsp_channel_type_subchannel;
-static gint hf_rep_rsp_channel_type_band_amc;
-static gint hf_rep_rsp_channel_type_safety_channel;
-static gint hf_rep_rsp_channel_type_enhanced_band_amc;
-static gint hf_rep_rsp_channel_type_sounding;
+static int hf_rep_rsp_report_type;
+static int hf_rep_rsp_report_type_channel_number;
+static int hf_rep_rsp_report_type_frame_number;
+static int hf_rep_rsp_report_type_duration;
+static int hf_rep_rsp_report_type_basic_report;
+static int hf_rep_rsp_report_type_basic_report_bit0;
+static int hf_rep_rsp_report_type_basic_report_bit1;
+static int hf_rep_rsp_report_type_basic_report_bit2;
+static int hf_rep_rsp_report_type_basic_report_bit3;
+static int hf_rep_rsp_report_type_basic_report_reserved;
+static int hf_rep_rsp_report_type_cinr_report;
+static int hf_rep_rsp_report_type_cinr_report_mean;
+static int hf_rep_rsp_report_type_cinr_report_deviation;
+static int hf_rep_rsp_report_type_rssi_report;
+static int hf_rep_rsp_report_type_rssi_report_mean;
+static int hf_rep_rsp_report_type_rssi_report_deviation;
+static int hf_rep_rsp_current_transmitted_power;
+static int hf_rep_rsp_channel_type_report;
+static int hf_rep_rsp_channel_type_subchannel;
+static int hf_rep_rsp_channel_type_band_amc;
+static int hf_rep_rsp_channel_type_safety_channel;
+static int hf_rep_rsp_channel_type_enhanced_band_amc;
+static int hf_rep_rsp_channel_type_sounding;
-static gint hf_rep_rsp_zone_spec_phy_cinr_report;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_mean;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_report_type;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_deviation;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc0;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_fusc;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_optional_fusc;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_safety_channel;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_amc;
-static gint hf_rep_rsp_preamble_phy_cinr_report;
-static gint hf_rep_rsp_preamble_phy_cinr_rep_configuration_1;
-static gint hf_rep_rsp_preamble_phy_cinr_rep_configuration_3;
-static gint hf_rep_rsp_preamble_phy_cinr_rep_band_amc_zone;
-static gint hf_rep_rsp_zone_spec_effective_cinr_report;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_report_type;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id;
-static gint hf_rep_rsp_preamble_effective_cinr_report;
-static gint hf_rep_rsp_preamble_effective_cinr_rep_cqich_id;
-static gint hf_rep_rsp_channel_selectivity_report;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc0;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_fusc;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_optional_fusc;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_amc_aas;
-static gint hf_rep_rsp_preamble_effective_cinr_rep_configuration_1;
-static gint hf_rep_rsp_preamble_effective_cinr_rep_configuration_3;
-static gint hf_rep_rsp_channel_selectivity_rep_frequency_a;
-static gint hf_rep_rsp_channel_selectivity_rep_frequency_b;
-static gint hf_rep_rsp_channel_selectivity_rep_frequency_c;
+static int hf_rep_rsp_zone_spec_phy_cinr_report;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_mean;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_report_type;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_deviation;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc0;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc1;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_fusc;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_optional_fusc;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_safety_channel;
+static int hf_rep_rsp_zone_spec_phy_cinr_rep_amc;
+static int hf_rep_rsp_preamble_phy_cinr_report;
+static int hf_rep_rsp_preamble_phy_cinr_rep_configuration_1;
+static int hf_rep_rsp_preamble_phy_cinr_rep_configuration_3;
+static int hf_rep_rsp_preamble_phy_cinr_rep_band_amc_zone;
+static int hf_rep_rsp_zone_spec_effective_cinr_report;
+static int hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr;
+static int hf_rep_rsp_zone_spec_effective_cinr_rep_report_type;
+static int hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id;
+static int hf_rep_rsp_preamble_effective_cinr_report;
+static int hf_rep_rsp_preamble_effective_cinr_rep_cqich_id;
+static int hf_rep_rsp_channel_selectivity_report;
+static int hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc0;
+static int hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc1;
+static int hf_rep_rsp_zone_spec_effective_cinr_rep_fusc;
+static int hf_rep_rsp_zone_spec_effective_cinr_rep_optional_fusc;
+static int hf_rep_rsp_zone_spec_effective_cinr_rep_amc_aas;
+static int hf_rep_rsp_preamble_effective_cinr_rep_configuration_1;
+static int hf_rep_rsp_preamble_effective_cinr_rep_configuration_3;
+static int hf_rep_rsp_channel_selectivity_rep_frequency_a;
+static int hf_rep_rsp_channel_selectivity_rep_frequency_b;
+static int hf_rep_rsp_channel_selectivity_rep_frequency_c;
/* bit masks */
#define REP_REQ_REPORT_TYPE_BIT0 0x01
@@ -248,9 +248,9 @@ static gint hf_rep_rsp_channel_selectivity_rep_frequency_c;
/* Wimax Mac REP-REQ Message Dissector */
static int dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len;
- gint tlv_type, tlv_len, tlv_value_offset, length, tlv_offset;
+ unsigned offset = 0;
+ unsigned tvb_len;
+ int tlv_type, tlv_len, tlv_value_offset, length, tlv_offset;
proto_item *rep_item, *tlv_item, *ti_item;
proto_tree *rep_tree, *tlv_tree, *ti_tree;
tlv_info_t tlv_info;
@@ -289,7 +289,7 @@ static int dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinf
{
case REP_REQ_REPORT_REQUEST:
/* process the REP-REQ report request TLVs */
- tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_req_report_request, tvb, offset-tlv_value_offset, FALSE);
+ tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_req_report_request, tvb, offset-tlv_value_offset, false);
tlv_tree = proto_item_add_subtree(tlv_item, ett_mac_mgmt_msg_rep_req_decoder);
for( tlv_offset = 0; tlv_offset < tlv_len; )
{ /* get the TLV information */
@@ -405,14 +405,14 @@ static int dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinf
/* Wimax Mac REP-RSP Message Dissector */
static int dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len, length, value;
- gint tlv_type, tlv_len, tlv_value_offset, tlv_offset;
- gint db_val;
+ unsigned offset = 0;
+ unsigned tvb_len, length, value;
+ int tlv_type, tlv_len, tlv_value_offset, tlv_offset;
+ int db_val;
proto_item *rep_item, *tlv_item, *ti, *ti_item;
proto_tree *rep_tree, *tlv_tree, *ti_tree;
tlv_info_t tlv_info;
- gfloat current_power;
+ float current_power;
{ /* we are being asked for details */
/* Get the tvb reported length */
@@ -489,12 +489,12 @@ static int dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
case REP_RSP_REPORT_CINR_REPORT:
ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_report_type_cinr_report, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
- db_val = tvb_get_guint8(tvb, offset + tlv_offset) - 20;
+ db_val = tvb_get_uint8(tvb, offset + tlv_offset) - 20;
if (db_val > 37)
db_val = 37;
proto_item_append_text(ti_item, " (%d dBm)", db_val);
ti = proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_cinr_report_deviation, tvb, (offset + tlv_offset +1), 1, ENC_BIG_ENDIAN);
- db_val = tvb_get_guint8(tvb, offset + tlv_offset + 1) - 20;
+ db_val = tvb_get_uint8(tvb, offset + tlv_offset + 1) - 20;
if (db_val > 37)
db_val = 37;
proto_item_append_text(ti, " (%d dBm)", db_val);
@@ -503,12 +503,12 @@ static int dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
ti_item = add_tlv_subtree(&tlv_info, tlv_tree, hf_rep_rsp_report_type_rssi_report, tvb, (offset + tlv_offset)-get_tlv_value_offset(&tlv_info), ENC_NA);
ti_tree = proto_item_add_subtree(ti_item, ett_mac_mgmt_msg_rep_rsp_decoder);
ti = proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_rssi_report_mean, tvb, (offset + tlv_offset), 1, ENC_BIG_ENDIAN);
- db_val = tvb_get_guint8(tvb, offset + tlv_offset) - 123;
+ db_val = tvb_get_uint8(tvb, offset + tlv_offset) - 123;
if (db_val > -40)
db_val = -40;
proto_item_append_text(ti, " (%d dBm)", db_val);
ti = proto_tree_add_item(ti_tree, hf_rep_rsp_report_type_rssi_report_deviation, tvb, (offset + tlv_offset +1), 1, ENC_BIG_ENDIAN);
- db_val = tvb_get_guint8(tvb, offset + tlv_offset + 1) - 123;
+ db_val = tvb_get_uint8(tvb, offset + tlv_offset + 1) - 123;
if (db_val > -40)
db_val = -40;
proto_item_append_text(ti, " (%d dBm)", db_val);
@@ -814,8 +814,8 @@ static int dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
break;
case CURRENT_TX_POWER:
tlv_item = add_tlv_subtree(&tlv_info, rep_tree, hf_rep_rsp_current_transmitted_power, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
- value = tvb_get_guint8(tvb, offset);
- current_power = ((gfloat)value - 128) / 2;
+ value = tvb_get_uint8(tvb, offset);
+ current_power = ((float)value - 128) / 2;
proto_item_append_text(tlv_item, " (%.1f dBm)", current_power);
break;
default:
@@ -1525,7 +1525,7 @@ void proto_register_mac_mgmt_msg_rep(void)
};
/* Setup protocol subtree array */
- static gint *ett_rep[] =
+ static int *ett_rep[] =
{
&ett_mac_mgmt_msg_rep_req_decoder,
&ett_mac_mgmt_msg_rep_rsp_decoder,
diff --git a/plugins/epan/wimax/msg_res_cmd.c b/plugins/epan/wimax/msg_res_cmd.c
index 50212474f2..9ac732f554 100644
--- a/plugins/epan/wimax/msg_res_cmd.c
+++ b/plugins/epan/wimax/msg_res_cmd.c
@@ -30,20 +30,20 @@ void proto_reg_handoff_mac_mgmt_msg_res_cmd(void);
static dissector_handle_t res_cmd_handle;
-static gint proto_mac_mgmt_msg_res_cmd_decoder;
-static gint ett_mac_mgmt_msg_res_cmd_decoder;
+static int proto_mac_mgmt_msg_res_cmd_decoder;
+static int ett_mac_mgmt_msg_res_cmd_decoder;
/* fix fields */
-static gint hf_res_cmd_unknown_type;
-static gint hf_res_cmd_invalid_tlv;
+static int hf_res_cmd_unknown_type;
+static int hf_res_cmd_invalid_tlv;
/* Wimax Mac RES-CMD Message Dissector */
static int dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len;
- gint tlv_type, tlv_len, tlv_value_offset;
+ unsigned offset = 0;
+ unsigned tvb_len;
+ int tlv_type, tlv_len, tlv_value_offset;
proto_item *res_cmd_item;
proto_tree *res_cmd_tree;
proto_tree *tlv_tree = NULL;
@@ -118,7 +118,7 @@ void proto_register_mac_mgmt_msg_res_cmd(void)
};
/* Setup protocol subtree array */
- static gint *ett_res_cmd[] =
+ static int *ett_res_cmd[] =
{
&ett_mac_mgmt_msg_res_cmd_decoder,
};
diff --git a/plugins/epan/wimax/msg_rng_req.c b/plugins/epan/wimax/msg_rng_req.c
index 0d14cd672f..ef68fd306a 100644
--- a/plugins/epan/wimax/msg_rng_req.c
+++ b/plugins/epan/wimax/msg_rng_req.c
@@ -17,59 +17,60 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_rng_req(void);
void proto_reg_handoff_mac_mgmt_msg_rng_req(void);
static dissector_handle_t rng_req_handle;
-extern gboolean include_cor2_changes;
-
-static gint proto_mac_mgmt_msg_rng_req_decoder;
-static gint ett_mac_mgmt_msg_rng_req_decoder;
+static int proto_mac_mgmt_msg_rng_req_decoder;
+static int ett_mac_mgmt_msg_rng_req_decoder;
/* RNG-REQ fields */
-static gint hf_rng_req_reserved;
-static gint hf_rng_req_dl_burst_profile_diuc;
-static gint hf_rng_req_dl_burst_profile_lsb_ccc;
-static gint hf_rng_req_ss_mac_address;
-static gint hf_rng_req_ranging_anomalies_max_power;
-static gint hf_rng_req_ranging_anomalies_min_power;
-static gint hf_rng_req_ranging_anomalies_timing_adj;
-static gint hf_rng_req_aas_broadcast;
-static gint hf_rng_req_serving_bs_id;
-static gint hf_rng_req_ranging_purpose_ho_indication;
-static gint hf_rng_req_ranging_purpose_location_update_request;
-static gint hf_rng_req_ranging_purpose_reserved;
-static gint hf_rng_req_ho_id;
-static gint hf_rng_req_power_down_indicator;
-static gint hf_rng_req_repetition_coding_level;
-static gint hf_rng_req_requested_downlink_repetition_coding_level_reserved;
-static gint hf_rng_req_cmac_key_count;
-static gint hf_rng_definition_of_power_saving_class_present;
-static gint hf_rng_activation_of_power_saving_class;
-static gint hf_rng_trf_ind_required;
-static gint hf_rng_power_saving_class_reserved;
-static gint hf_rng_power_saving_class_id;
-static gint hf_rng_power_saving_class_type;
-static gint hf_rng_power_saving_first_sleep_window_frame;
-static gint hf_rng_power_saving_initial_sleep_window;
-static gint hf_rng_power_saving_listening_window;
-static gint hf_rng_power_saving_final_sleep_window_base;
-static gint hf_rng_power_saving_final_sleep_window_exp;
-static gint hf_rng_power_saving_slpid;
-static gint hf_rng_power_saving_included_cid;
-static gint hf_rng_power_saving_mgmt_connection_direction;
-static gint hf_tlv_type;
-static gint hf_rng_invalid_tlv;
-static gint hf_rng_power_saving_class_flags;
-static gint hf_rng_req_dl_burst_profile;
-static gint hf_rng_req_ranging_anomalies;
-static gint hf_rng_req_ranging_purpose_indication;
-static gint hf_rng_req_requested_rep_coding_level;
+static int hf_rng_req_reserved;
+static int hf_rng_req_dl_burst_profile_diuc;
+static int hf_rng_req_dl_burst_profile_lsb_ccc;
+static int hf_rng_req_ss_mac_address;
+static int hf_rng_req_ranging_anomalies_max_power;
+static int hf_rng_req_ranging_anomalies_min_power;
+static int hf_rng_req_ranging_anomalies_timing_adj;
+static int hf_rng_req_aas_broadcast;
+static int hf_rng_req_serving_bs_id;
+static int hf_rng_req_ranging_purpose_ho_indication;
+static int hf_rng_req_ranging_purpose_location_update_request;
+static int hf_rng_req_ranging_purpose_reserved;
+static int hf_rng_req_ho_id;
+static int hf_rng_req_power_down_indicator;
+static int hf_rng_req_repetition_coding_level;
+static int hf_rng_req_requested_downlink_repetition_coding_level_reserved;
+static int hf_rng_req_cmac_key_count;
+static int hf_rng_definition_of_power_saving_class_present;
+static int hf_rng_activation_of_power_saving_class;
+static int hf_rng_trf_ind_required;
+static int hf_rng_power_saving_class_reserved;
+static int hf_rng_power_saving_class_id;
+static int hf_rng_power_saving_class_type;
+static int hf_rng_power_saving_first_sleep_window_frame;
+static int hf_rng_power_saving_initial_sleep_window;
+static int hf_rng_power_saving_listening_window;
+static int hf_rng_power_saving_final_sleep_window_base;
+static int hf_rng_power_saving_final_sleep_window_exp;
+static int hf_rng_power_saving_slpid;
+static int hf_rng_power_saving_included_cid;
+static int hf_rng_power_saving_mgmt_connection_direction;
+static int hf_tlv_type;
+static int hf_rng_invalid_tlv;
+static int hf_rng_power_saving_class_flags;
+static int hf_rng_req_dl_burst_profile;
+static int hf_rng_req_ranging_anomalies;
+static int hf_rng_req_ranging_purpose_indication;
+static int hf_rng_req_requested_rep_coding_level;
/* STRING RESOURCES */
@@ -112,13 +113,13 @@ static const true_false_string tfs_rng_timing_adj = {
};
/* Decode RNG Power Saving Class parameters (Sub TLV's). */
-void dissect_power_saving_class(proto_tree *rng_req_tree, gint tlv_type, tvbuff_t *tvb, guint compound_tlv_len, packet_info *pinfo, guint offset)
+void dissect_power_saving_class(proto_tree *rng_req_tree, int tlv_type, tvbuff_t *tvb, unsigned compound_tlv_len, packet_info *pinfo, unsigned offset)
{
proto_item *tlv_item;
proto_tree *tlv_tree;
proto_tree *power_saving_class_tree = NULL;
- guint tlv_len;
- guint tlv_offset;
+ unsigned tlv_len;
+ unsigned tlv_offset;
tlv_info_t tlv_info;
/* Add a subtree for the power saving class parameters */
@@ -199,14 +200,14 @@ void dissect_power_saving_class(proto_tree *rng_req_tree, gint tlv_type, tvbuff_
/* Decode RNG-REQ messages. */
static int dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tlv_offset;
- guint tvb_len;
+ unsigned offset = 0;
+ unsigned tlv_offset;
+ unsigned tvb_len;
proto_item *rng_req_item, *tlv_item;
proto_tree *rng_req_tree, *tlv_tree;
tlv_info_t tlv_info;
- gint tlv_type;
- gint tlv_len;
+ int tlv_type;
+ int tlv_len;
{ /* we are being asked for details */
@@ -595,7 +596,7 @@ void proto_register_mac_mgmt_msg_rng_req(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_rng_req_decoder,
};
diff --git a/plugins/epan/wimax/msg_rng_rsp.c b/plugins/epan/wimax/msg_rng_rsp.c
index b1d859b62a..6b3506e04e 100644
--- a/plugins/epan/wimax/msg_rng_rsp.c
+++ b/plugins/epan/wimax/msg_rng_rsp.c
@@ -17,83 +17,84 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/tfs.h>
+
+#include <wsutil/array.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_rng_rsp(void);
void proto_reg_handoff_mac_mgmt_msg_rng_rsp(void);
-extern gboolean include_cor2_changes;
-
-
-static dissector_handle_t rng_rsp_handle = NULL;
-static dissector_handle_t sbc_rsp_handle = NULL;
-static dissector_handle_t reg_rsp_handle = NULL;
+static dissector_handle_t rng_rsp_handle;
+static dissector_handle_t sbc_rsp_handle;
+static dissector_handle_t reg_rsp_handle;
-static gint proto_mac_mgmt_msg_rng_rsp_decoder;
-static gint ett_mac_mgmt_msg_rng_rsp_decoder;
-static gint ett_rng_rsp_message_tree;
+static int proto_mac_mgmt_msg_rng_rsp_decoder;
+static int ett_mac_mgmt_msg_rng_rsp_decoder;
+static int ett_rng_rsp_message_tree;
/* RNG-RSP fields */
-static gint hf_rng_req_reserved;
-/* static gint hf_rng_rsp_ul_channel_id; */
-static gint hf_rng_rsp_timing_adjust;
-static gint hf_rng_rsp_power_level_adjust;
-static gint hf_rng_rsp_offset_freq_adjust;
-static gint hf_rng_rsp_ranging_status;
-static gint hf_rng_rsp_dl_freq_override;
-static gint hf_rng_rsp_ul_chan_id_override;
-static gint hf_rng_rsp_dl_operational_burst_profile;
-static gint hf_rng_rsp_dl_operational_burst_profile_diuc;
-static gint hf_rng_rsp_dl_operational_burst_profile_ccc;
-static gint hf_rng_rsp_ss_mac_address;
-static gint hf_rng_rsp_basic_cid;
-static gint hf_rng_rsp_primary_mgmt_cid;
-static gint hf_rng_rsp_broadcast;
-static gint hf_rng_rsp_frame_number;
-static gint hf_rng_rsp_opportunity_number;
-static gint hf_rng_rsp_service_level_prediction;
-static gint hf_rng_rsp_resource_retain_flag;
-static gint hf_rng_rsp_ho_process_optimization;
-static gint hf_rng_rsp_ho_process_optimization_0;
-static gint hf_rng_rsp_ho_process_optimization_1_2;
-static gint hf_rng_rsp_ho_process_optimization_3;
-static gint hf_rng_rsp_ho_process_optimization_4;
-static gint hf_rng_rsp_ho_process_optimization_5;
-static gint hf_rng_rsp_ho_process_optimization_6;
-static gint hf_rng_rsp_ho_process_optimization_7;
-static gint hf_rng_rsp_ho_process_optimization_8;
-static gint hf_rng_rsp_ho_process_optimization_9;
-static gint hf_rng_rsp_ho_process_optimization_10;
-static gint hf_rng_rsp_ho_process_optimization_11;
-static gint hf_rng_rsp_ho_process_optimization_12;
-static gint hf_rng_rsp_ho_process_optimization_13;
-static gint hf_rng_rsp_ho_process_optimization_14;
-static gint hf_rng_rsp_ho_process_optimization_15;
+static int hf_rng_req_reserved;
+/* static int hf_rng_rsp_ul_channel_id; */
+static int hf_rng_rsp_timing_adjust;
+static int hf_rng_rsp_power_level_adjust;
+static int hf_rng_rsp_offset_freq_adjust;
+static int hf_rng_rsp_ranging_status;
+static int hf_rng_rsp_dl_freq_override;
+static int hf_rng_rsp_ul_chan_id_override;
+static int hf_rng_rsp_dl_operational_burst_profile;
+static int hf_rng_rsp_dl_operational_burst_profile_diuc;
+static int hf_rng_rsp_dl_operational_burst_profile_ccc;
+static int hf_rng_rsp_ss_mac_address;
+static int hf_rng_rsp_basic_cid;
+static int hf_rng_rsp_primary_mgmt_cid;
+static int hf_rng_rsp_broadcast;
+static int hf_rng_rsp_frame_number;
+static int hf_rng_rsp_opportunity_number;
+static int hf_rng_rsp_service_level_prediction;
+static int hf_rng_rsp_resource_retain_flag;
+static int hf_rng_rsp_ho_process_optimization;
+static int hf_rng_rsp_ho_process_optimization_0;
+static int hf_rng_rsp_ho_process_optimization_1_2;
+static int hf_rng_rsp_ho_process_optimization_3;
+static int hf_rng_rsp_ho_process_optimization_4;
+static int hf_rng_rsp_ho_process_optimization_5;
+static int hf_rng_rsp_ho_process_optimization_6;
+static int hf_rng_rsp_ho_process_optimization_7;
+static int hf_rng_rsp_ho_process_optimization_8;
+static int hf_rng_rsp_ho_process_optimization_9;
+static int hf_rng_rsp_ho_process_optimization_10;
+static int hf_rng_rsp_ho_process_optimization_11;
+static int hf_rng_rsp_ho_process_optimization_12;
+static int hf_rng_rsp_ho_process_optimization_13;
+static int hf_rng_rsp_ho_process_optimization_14;
+static int hf_rng_rsp_ho_process_optimization_15;
/* Added the following to help implement RNG-RSP message encoding 33 (Table 367 in IEEE 802.16e-2007) */
-static gint hf_rng_rsp_dl_op_burst_profile_ofdma;
-static gint hf_rng_rsp_least_robust_diuc;
-static gint hf_rng_rsp_repetition_coding_indication;
-static gint hf_rng_rsp_config_change_count_of_dcd;
+static int hf_rng_rsp_dl_op_burst_profile_ofdma;
+static int hf_rng_rsp_least_robust_diuc;
+static int hf_rng_rsp_repetition_coding_indication;
+static int hf_rng_rsp_config_change_count_of_dcd;
/* Added the following to help implement RNG-RSP message encoding 22 (Table 367 in IEEE 802.16e-2007) */
-static gint hf_rng_rsp_ho_id;
-static gint hf_rng_rsp_location_update_response;
+static int hf_rng_rsp_ho_id;
+static int hf_rng_rsp_location_update_response;
/* Added the following to help implement RNG-RSP message encoding 24 (Table 367 in IEEE 802.16e-2007) */
-static gint hf_rng_rsp_paging_information;
-static gint hf_rng_rsp_paging_cycle;
-static gint hf_rng_rsp_paging_offset;
-static gint hf_rng_rsp_paging_group_id;
-static gint hf_rng_rsp_bs_random;
-static gint hf_rng_rsp_akid;
-static gint hf_rng_rsp_ranging_subchan;
-static gint hf_rng_rsp_time_symbol_reference;
-static gint hf_rng_rsp_subchannel_reference;
-static gint hf_rng_rsp_ranging_code_index;
-static gint hf_rng_rsp_frame_number2;
-static gint hf_tlv_type;
-/* static gint hf_tlv_value; */
-static gint hf_rng_invalid_tlv;
+static int hf_rng_rsp_paging_information;
+static int hf_rng_rsp_paging_cycle;
+static int hf_rng_rsp_paging_offset;
+static int hf_rng_rsp_paging_group_id;
+static int hf_rng_rsp_bs_random;
+static int hf_rng_rsp_akid;
+static int hf_rng_rsp_ranging_subchan;
+static int hf_rng_rsp_time_symbol_reference;
+static int hf_rng_rsp_subchannel_reference;
+static int hf_rng_rsp_ranging_code_index;
+static int hf_rng_rsp_frame_number2;
+static int hf_tlv_type;
+/* static int hf_tlv_value; */
+static int hf_rng_invalid_tlv;
/* STRING RESOURCES */
@@ -260,21 +261,21 @@ static int dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
proto_item *frame_number_item = NULL;
proto_item *opportunity_number_item = NULL;
- guint offset = 0;
- guint tlv_offset;
- guint tvb_len;
+ unsigned offset = 0;
+ unsigned tlv_offset;
+ unsigned tvb_len;
proto_item *rng_rsp_item, *sub_item;
proto_item *tlv_item = NULL;
proto_tree *rng_rsp_tree;
proto_tree *sub_tree = NULL;
tlv_info_t tlv_info;
- gint tlv_type;
- guint tlv_len;
- guint this_offset = 0;
+ int tlv_type;
+ unsigned tlv_len;
+ unsigned this_offset = 0;
tlv_info_t sub_tlv_info;
- gint sub_tlv_type;
- gint sub_tlv_len;
- guint sub_tlv_offset;
+ int sub_tlv_type;
+ int sub_tlv_len;
+ unsigned sub_tlv_offset;
float timing_adjust;
float power_level_adjust;
@@ -319,7 +320,7 @@ static int dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
}
case RNG_RSP_POWER_LEVEL_ADJUST: {
sub_tree = add_tlv_subtree_no_item(&tlv_info, rng_rsp_tree, hf_rng_rsp_power_level_adjust, tvb, offset);
- power_level_adjust = (float)(tvb_get_guint8(tvb, tlv_offset) / 4.0);
+ power_level_adjust = (float)(tvb_get_uint8(tvb, tlv_offset) / 4.0);
proto_tree_add_float_format_value(sub_tree, hf_rng_rsp_power_level_adjust, tvb, tlv_offset, 1,
power_level_adjust, " %.2f dB", power_level_adjust);
break;
@@ -568,7 +569,7 @@ void proto_register_mac_mgmt_msg_rng_rsp(void)
&hf_rng_rsp_dl_freq_override,
{
"Downlink Frequency Override", "wmx.rng_rsp.dl_freq_override",
- FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_hz, 0x00, NULL, HFILL
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_hz), 0x00, NULL, HFILL
}
},
{
@@ -759,7 +760,7 @@ void proto_register_mac_mgmt_msg_rng_rsp(void)
&hf_rng_rsp_offset_freq_adjust,
{
"Offset Frequency Adjust", "wmx.rng_rsp.offset_freq_adjust",
- FT_INT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_hz, 0x00, NULL, HFILL
+ FT_INT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_hz), 0x00, NULL, HFILL
}
},
{
@@ -923,7 +924,7 @@ void proto_register_mac_mgmt_msg_rng_rsp(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_rng_rsp_decoder,
&ett_rng_rsp_message_tree
diff --git a/plugins/epan/wimax/msg_sbc.c b/plugins/epan/wimax/msg_sbc.c
index a605756f62..5cc2aa8f32 100644
--- a/plugins/epan/wimax/msg_sbc.c
+++ b/plugins/epan/wimax/msg_sbc.c
@@ -21,9 +21,12 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_sbc(void);
@@ -32,260 +35,256 @@ void proto_reg_handoff_mac_mgmt_msg_sbc(void);
static dissector_handle_t sbc_req_handle;
static dissector_handle_t sbc_rsp_handle;
-/* This is a global variable declared in mac_hd_generic_decoder.c, which determines whether
- * or not cor2 changes are included */
-extern gboolean include_cor2_changes;
-
-static gint proto_mac_mgmt_msg_sbc_decoder;
-static gint ett_mac_mgmt_msg_sbc_decoder;
-static gint ett_sbc_req_tlv_subtree;
-static gint ett_sbc_rsp_tlv_subtree;
+static int proto_mac_mgmt_msg_sbc_decoder;
+static int ett_mac_mgmt_msg_sbc_decoder;
+static int ett_sbc_req_tlv_subtree;
+static int ett_sbc_rsp_tlv_subtree;
/* fix fields */
-static gint hf_sbc_unknown_type;
+static int hf_sbc_unknown_type;
-static gint hf_sbc_bw_alloc_support;
-static gint hf_sbc_bw_alloc_support_rsvd0;
-static gint hf_sbc_bw_alloc_support_duplex;
-static gint hf_sbc_bw_alloc_support_rsvd1;
-static gint hf_sbc_curr_transmit_power;
-static gint hf_sbc_transition_gaps;
-static gint hf_sbc_ssttg;
-static gint hf_sbc_ssrtg;
-static gint hf_sbc_mac_pdu;
-static gint hf_sbc_mac_pdu_piggybacked;
-static gint hf_sbc_mac_pdu_fsn;
-static gint hf_sbc_mac_pdu_rsvd;
-static gint hf_sbc_max_transmit_power;
-static gint hf_sbc_bpsk;
-static gint hf_sbc_qpsk;
-static gint hf_sbc_qam16;
-static gint hf_sbc_qam64;
-static gint hf_sbc_current_transmitted_power;
-static gint hf_sbc_ss_fft_sizes;
-static gint hf_sbc_ss_fft_256;
-static gint hf_sbc_ss_fft_2048;
-static gint hf_sbc_ss_fft_128;
-static gint hf_sbc_ss_fft_512;
-static gint hf_sbc_ss_fft_1024;
-static gint hf_sbc_ss_cinr_measure_capability;
-static gint hf_sbc_ss_phy_cinr_measurement_preamble;
-static gint hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_pilot_subcarriers;
-static gint hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_data_subcarriers;
-static gint hf_sbc_ss_effective_cinr_measurement_preamble;
-static gint hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_pilot_subcarriers;
-static gint hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_data_subcarriers;
-static gint hf_sbc_ss_support_2_concurrent_cqi_channels;
-static gint hf_sbc_ss_frequency_selectivity_characterization_report;
+static int hf_sbc_bw_alloc_support;
+static int hf_sbc_bw_alloc_support_rsvd0;
+static int hf_sbc_bw_alloc_support_duplex;
+static int hf_sbc_bw_alloc_support_rsvd1;
+static int hf_sbc_curr_transmit_power;
+static int hf_sbc_transition_gaps;
+static int hf_sbc_ssttg;
+static int hf_sbc_ssrtg;
+static int hf_sbc_mac_pdu;
+static int hf_sbc_mac_pdu_piggybacked;
+static int hf_sbc_mac_pdu_fsn;
+static int hf_sbc_mac_pdu_rsvd;
+static int hf_sbc_max_transmit_power;
+static int hf_sbc_bpsk;
+static int hf_sbc_qpsk;
+static int hf_sbc_qam16;
+static int hf_sbc_qam64;
+static int hf_sbc_current_transmitted_power;
+static int hf_sbc_ss_fft_sizes;
+static int hf_sbc_ss_fft_256;
+static int hf_sbc_ss_fft_2048;
+static int hf_sbc_ss_fft_128;
+static int hf_sbc_ss_fft_512;
+static int hf_sbc_ss_fft_1024;
+static int hf_sbc_ss_cinr_measure_capability;
+static int hf_sbc_ss_phy_cinr_measurement_preamble;
+static int hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_pilot_subcarriers;
+static int hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_data_subcarriers;
+static int hf_sbc_ss_effective_cinr_measurement_preamble;
+static int hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_pilot_subcarriers;
+static int hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_data_subcarriers;
+static int hf_sbc_ss_support_2_concurrent_cqi_channels;
+static int hf_sbc_ss_frequency_selectivity_characterization_report;
-static gint hf_sbc_ss_fft_rsvd1;
-static gint hf_sbc_ss_fft_rsvd2;
-static gint hf_sbc_ss_demodulator;
-static gint hf_sbc_ss_demodulator_64qam;
-static gint hf_sbc_ss_demodulator_btc;
-static gint hf_sbc_ss_demodulator_ctc;
-static gint hf_sbc_ss_demodulator_stc;
-static gint hf_sbc_ss_demodulator_cc_with_optional_interleaver;
-static gint hf_sbc_ss_demodulator_harq_chase;
-static gint hf_sbc_ss_demodulator_harq_ctc_ir;
-static gint hf_sbc_ss_demodulator_reserved;
-/* static gint hf_sbc_ss_demodulator_reserved1; */
-static gint hf_sbc_ss_demodulator_64qam_2;
-static gint hf_sbc_ss_demodulator_btc_2;
-static gint hf_sbc_ss_demodulator_ctc_2;
-static gint hf_sbc_ss_demodulator_stc_2;
-static gint hf_sbc_ss_demodulator_cc_with_optional_interleaver_2;
-static gint hf_sbc_ss_demodulator_harq_chase_2;
-static gint hf_sbc_ss_demodulator_harq_ctc_ir_2;
-static gint hf_sbc_ss_demodulator_reserved_2;
-static gint hf_sbc_ss_demodulator_harq_cc_ir_2;
-static gint hf_sbc_ss_demodulator_ldpc_2;
-static gint hf_sbc_ss_demodulator_dedicated_pilots_2;
-static gint hf_sbc_ss_demodulator_reserved1_2;
+static int hf_sbc_ss_fft_rsvd1;
+static int hf_sbc_ss_fft_rsvd2;
+static int hf_sbc_ss_demodulator;
+static int hf_sbc_ss_demodulator_64qam;
+static int hf_sbc_ss_demodulator_btc;
+static int hf_sbc_ss_demodulator_ctc;
+static int hf_sbc_ss_demodulator_stc;
+static int hf_sbc_ss_demodulator_cc_with_optional_interleaver;
+static int hf_sbc_ss_demodulator_harq_chase;
+static int hf_sbc_ss_demodulator_harq_ctc_ir;
+static int hf_sbc_ss_demodulator_reserved;
+/* static int hf_sbc_ss_demodulator_reserved1; */
+static int hf_sbc_ss_demodulator_64qam_2;
+static int hf_sbc_ss_demodulator_btc_2;
+static int hf_sbc_ss_demodulator_ctc_2;
+static int hf_sbc_ss_demodulator_stc_2;
+static int hf_sbc_ss_demodulator_cc_with_optional_interleaver_2;
+static int hf_sbc_ss_demodulator_harq_chase_2;
+static int hf_sbc_ss_demodulator_harq_ctc_ir_2;
+static int hf_sbc_ss_demodulator_reserved_2;
+static int hf_sbc_ss_demodulator_harq_cc_ir_2;
+static int hf_sbc_ss_demodulator_ldpc_2;
+static int hf_sbc_ss_demodulator_dedicated_pilots_2;
+static int hf_sbc_ss_demodulator_reserved1_2;
-static gint hf_sbc_ss_modulator;
-static gint hf_sbc_ss_modulator_64qam;
-static gint hf_sbc_ss_modulator_btc;
-static gint hf_sbc_ss_modulator_ctc;
-static gint hf_sbc_ss_modulator_stc;
-static gint hf_sbc_ss_modulator_harq_chase;
-static gint hf_sbc_ss_modulator_ctc_ir;
-static gint hf_sbc_ss_modulator_cc_ir;
-static gint hf_sbc_ss_modulator_ldpc;
+static int hf_sbc_ss_modulator;
+static int hf_sbc_ss_modulator_64qam;
+static int hf_sbc_ss_modulator_btc;
+static int hf_sbc_ss_modulator_ctc;
+static int hf_sbc_ss_modulator_stc;
+static int hf_sbc_ss_modulator_harq_chase;
+static int hf_sbc_ss_modulator_ctc_ir;
+static int hf_sbc_ss_modulator_cc_ir;
+static int hf_sbc_ss_modulator_ldpc;
-static gint hf_sbc_number_ul_arq_ack_channel;
-static gint hf_sbc_number_dl_arq_ack_channel;
-static gint hf_sbc_ss_permutation_support;
-static gint hf_sbc_ss_optimal_pusc;
-static gint hf_sbc_ss_optimal_fusc;
-static gint hf_sbc_ss_amc_1x6;
-static gint hf_sbc_ss_amc_2x3;
-static gint hf_sbc_ss_amc_3x2;
-static gint hf_sbc_ss_amc_with_harq_map;
-static gint hf_sbc_ss_tusc1_support;
-static gint hf_sbc_ss_tusc2_support;
-static gint hf_sbc_ss_ofdma_aas_private;
-static gint hf_sbc_ofdma_aas_harq_map_capability;
-static gint hf_sbc_ofdma_aas_private_map_support;
-static gint hf_sbc_ofdma_aas_reduced_private_map_support;
-static gint hf_sbc_ofdma_aas_private_chain_enable;
-static gint hf_sbc_ofdma_aas_private_map_dl_frame_offset;
-static gint hf_sbc_ofdma_aas_private_ul_frame_offset;
-static gint hf_sbc_ofdma_aas_private_map_concurrency;
-static gint hf_sbc_ofdma_aas_capabilities;
-static gint hf_sbc_ss_ofdma_aas_zone;
-static gint hf_sbc_ss_ofdma_aas_diversity_map_scan;
-static gint hf_sbc_ss_ofdma_aas_fbck_rsp_support;
-static gint hf_sbc_ss_ofdma_downlink_aas_preamble;
-static gint hf_sbc_ss_ofdma_uplink_aas_preamble;
-static gint hf_sbc_ss_ofdma_aas_capabilities_rsvd;
+static int hf_sbc_number_ul_arq_ack_channel;
+static int hf_sbc_number_dl_arq_ack_channel;
+static int hf_sbc_ss_permutation_support;
+static int hf_sbc_ss_optimal_pusc;
+static int hf_sbc_ss_optimal_fusc;
+static int hf_sbc_ss_amc_1x6;
+static int hf_sbc_ss_amc_2x3;
+static int hf_sbc_ss_amc_3x2;
+static int hf_sbc_ss_amc_with_harq_map;
+static int hf_sbc_ss_tusc1_support;
+static int hf_sbc_ss_tusc2_support;
+static int hf_sbc_ss_ofdma_aas_private;
+static int hf_sbc_ofdma_aas_harq_map_capability;
+static int hf_sbc_ofdma_aas_private_map_support;
+static int hf_sbc_ofdma_aas_reduced_private_map_support;
+static int hf_sbc_ofdma_aas_private_chain_enable;
+static int hf_sbc_ofdma_aas_private_map_dl_frame_offset;
+static int hf_sbc_ofdma_aas_private_ul_frame_offset;
+static int hf_sbc_ofdma_aas_private_map_concurrency;
+static int hf_sbc_ofdma_aas_capabilities;
+static int hf_sbc_ss_ofdma_aas_zone;
+static int hf_sbc_ss_ofdma_aas_diversity_map_scan;
+static int hf_sbc_ss_ofdma_aas_fbck_rsp_support;
+static int hf_sbc_ss_ofdma_downlink_aas_preamble;
+static int hf_sbc_ss_ofdma_uplink_aas_preamble;
+static int hf_sbc_ss_ofdma_aas_capabilities_rsvd;
-static gint hf_sbc_tlv_t_167_association_type_support;
-static gint hf_sbc_tlv_t_167_association_type_support_bit0;
-static gint hf_sbc_tlv_t_167_association_type_support_bit1;
-static gint hf_sbc_tlv_t_167_association_type_support_bit2;
-static gint hf_sbc_tlv_t_167_association_type_support_bit3;
-static gint hf_sbc_tlv_t_167_association_type_support_bit4;
-static gint hf_sbc_tlv_t_167_association_type_support_reserved;
-static gint hf_sbc_ofdma_ss_uplink_power_control_support;
-static gint hf_sbc_ofdma_ss_uplink_power_control_support_open_loop;
-static gint hf_sbc_ofdma_ss_uplink_power_control_support_aas_preamble;
-static gint hf_sbc_ofdma_ss_uplink_power_control_support_rsvd;
-/* static gint hf_sbc_ofdm_ss_minimum_num_of_frames; */
-static gint hf_sbc_tlv_t_27_extension_capability;
-static gint hf_sbc_tlv_t_27_extension_capability_bit0;
-static gint hf_sbc_tlv_t_27_extension_capability_reserved;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit0;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit1;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit2;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit3;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_reserved;
-static gint hf_sbc_tlv_t_171_minimum_num_of_frames;
-static gint hf_sbc_tlv_t_172_harq_map_capability;
-static gint hf_sbc_tlv_t_172_extended_harq_ie_capability;
-static gint hf_sbc_tlv_t_172_sub_map_capability_first_zone;
-static gint hf_sbc_tlv_t_172_sub_map_capability_other_zones;
-static gint hf_sbc_tlv_t_172_dl_region_definition_support;
-static gint hf_sbc_tlv_t_172_reserved;
-static gint hf_sbc_tlv_t_172;
-static gint hf_sbc_tlv_t_173_ul_ctl_channel_support;
-static gint hf_sbc_tlv_t_173_3_bit_mimo_fast_feedback;
-static gint hf_sbc_tlv_t_173_enhanced_fast_feedback;
-static gint hf_sbc_tlv_t_173_ul_ack;
-static gint hf_sbc_tlv_t_173_reserved;
-static gint hf_sbc_tlv_t_173_uep_fast_feedback;
-static gint hf_sbc_tlv_t_173_measurement_report;
-static gint hf_sbc_tlv_t_173_primary_secondary_fast_feedback;
-static gint hf_sbc_tlv_t_173_diuc_cqi_fast_feedback;
-static gint hf_sbc_tlv_t_174_ofdma_ms_csit_capability;
-static gint hf_sbc_tlv_t_174_csit_compatibility_type_a;
-static gint hf_sbc_tlv_t_174_csit_compatibility_type_b;
-static gint hf_sbc_tlv_t_174_power_assignment_capability;
-static gint hf_sbc_tlv_t_174_sounding_rsp_time_capability;
-static gint hf_sbc_tlv_t_174_max_num_simultanous_sounding_instructions;
-static gint hf_sbc_tlv_t_174_ss_csit_type_a_support;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_a;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_b;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_harq_parameters_set;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_a;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_b;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_reserved;
-static gint hf_sbc_tlv_t_174_ss_csit_reserved;
-static gint hf_sbc_tlv_t_175_max_num_bst_per_frm_capability_harq;
-static gint hf_sbc_tlv_t_175_max_num_ul_harq_bst;
-static gint hf_sbc_tlv_t_175_max_num_ul_harq_per_frm_include_one_non_harq_bst;
-static gint hf_sbc_tlv_t_175_max_num_dl_harq_bst_per_harq_per_frm;
-static gint hf_sbc_tlv_t_176;
-static gint hf_sbc_tlv_t_176_bit0;
-static gint hf_sbc_tlv_t_176_bit1;
-static gint hf_sbc_tlv_t_176_bit2;
-/* static gint hf_sbc_tlv_t_176_bit2_cor2; */
-static gint hf_sbc_tlv_t_176_bit3;
-static gint hf_sbc_tlv_t_176_bit4;
-static gint hf_sbc_tlv_t_176_bit5;
-static gint hf_sbc_tlv_t_176_bit6;
-static gint hf_sbc_tlv_t_176_bit7;
-static gint hf_sbc_tlv_t_176_bit8;
-static gint hf_sbc_tlv_t_176_bit9;
-static gint hf_sbc_tlv_t_176_bit10;
-static gint hf_sbc_tlv_t_176_bit11;
-static gint hf_sbc_tlv_t_176_bit12;
-static gint hf_sbc_tlv_t_176_bit13;
-static gint hf_sbc_tlv_t_176_bit14;
-static gint hf_sbc_tlv_t_176_bit15;
-static gint hf_sbc_tlv_t_176_bit16;
-static gint hf_sbc_tlv_t_176_bit17;
-static gint hf_sbc_tlv_t_176_bit18;
-static gint hf_sbc_tlv_t_176_bit19;
-static gint hf_sbc_tlv_t_176_reserved;
-static gint hf_sbc_tlv_t_177_ofdma_ss_modulator_for_mimo_support;
-static gint hf_sbc_tlv_t_177_stc_matrix_a;
-static gint hf_sbc_tlv_t_177_stc_matrix_b_vertical;
-static gint hf_sbc_tlv_t_177_stc_matrix_b_horizontal;
-static gint hf_sbc_tlv_t_177_two_transmit_antennas;
-static gint hf_sbc_tlv_t_177_capable_of_transmit_diversity;
-static gint hf_sbc_tlv_t_177_capable_of_spacial_multiplexing;
-static gint hf_sbc_tlv_t_177_beamforming;
-static gint hf_sbc_tlv_t_177_adaptive_rate_ctl;
-static gint hf_sbc_tlv_t_177_single_antenna;
-static gint hf_sbc_tlv_t_177_collaborative_sm_with_one_antenna;
-static gint hf_sbc_tlv_t_177_collaborative_sm_with_two_antennas;
-static gint hf_sbc_tlv_t_177_capable_of_two_antenna;
-static gint hf_sbc_tlv_t_177_rsvd;
-static gint hf_sbc_tlv_t_178_sdma_pilot_capability;
-static gint hf_sbc_tlv_t_178_sdma_pilot_pattern_support_for_amc_zone;
-static gint hf_sbc_tlv_t_178_reserved;
-static gint hf_sbc_tlv_t_179_ofdma_multiple_dl_burst_profile_support;
-static gint hf_sbc_tlv_t_179_dl_bst_profile_for_multiple_fec;
-static gint hf_sbc_tlv_t_179_ul_bst_profile_for_multiple_fec;
-static gint hf_sbc_tlv_t_179_reserved;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_NEP;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_dl;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_ul;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved1;
-static gint hf_sbc_tlv_t_162_ul_harq_incremental_redundancy_buffer_capability_NEP;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved2;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability;
-static gint hf_sbc_tlv_t_163_dl_harq_buffering_capability_for_chase_combining;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_dl;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved1;
-static gint hf_sbc_tlv_t_163_ul_harq_buffering_capability_for_chase_combining;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_ul;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved2;
+static int hf_sbc_tlv_t_167_association_type_support;
+static int hf_sbc_tlv_t_167_association_type_support_bit0;
+static int hf_sbc_tlv_t_167_association_type_support_bit1;
+static int hf_sbc_tlv_t_167_association_type_support_bit2;
+static int hf_sbc_tlv_t_167_association_type_support_bit3;
+static int hf_sbc_tlv_t_167_association_type_support_bit4;
+static int hf_sbc_tlv_t_167_association_type_support_reserved;
+static int hf_sbc_ofdma_ss_uplink_power_control_support;
+static int hf_sbc_ofdma_ss_uplink_power_control_support_open_loop;
+static int hf_sbc_ofdma_ss_uplink_power_control_support_aas_preamble;
+static int hf_sbc_ofdma_ss_uplink_power_control_support_rsvd;
+/* static int hf_sbc_ofdm_ss_minimum_num_of_frames; */
+static int hf_sbc_tlv_t_27_extension_capability;
+static int hf_sbc_tlv_t_27_extension_capability_bit0;
+static int hf_sbc_tlv_t_27_extension_capability_reserved;
+static int hf_sbc_tlv_t_28_ho_trigger_metric_support;
+static int hf_sbc_tlv_t_28_ho_trigger_metric_support_bit0;
+static int hf_sbc_tlv_t_28_ho_trigger_metric_support_bit1;
+static int hf_sbc_tlv_t_28_ho_trigger_metric_support_bit2;
+static int hf_sbc_tlv_t_28_ho_trigger_metric_support_bit3;
+static int hf_sbc_tlv_t_28_ho_trigger_metric_support_reserved;
+static int hf_sbc_tlv_t_171_minimum_num_of_frames;
+static int hf_sbc_tlv_t_172_harq_map_capability;
+static int hf_sbc_tlv_t_172_extended_harq_ie_capability;
+static int hf_sbc_tlv_t_172_sub_map_capability_first_zone;
+static int hf_sbc_tlv_t_172_sub_map_capability_other_zones;
+static int hf_sbc_tlv_t_172_dl_region_definition_support;
+static int hf_sbc_tlv_t_172_reserved;
+static int hf_sbc_tlv_t_172;
+static int hf_sbc_tlv_t_173_ul_ctl_channel_support;
+static int hf_sbc_tlv_t_173_3_bit_mimo_fast_feedback;
+static int hf_sbc_tlv_t_173_enhanced_fast_feedback;
+static int hf_sbc_tlv_t_173_ul_ack;
+static int hf_sbc_tlv_t_173_reserved;
+static int hf_sbc_tlv_t_173_uep_fast_feedback;
+static int hf_sbc_tlv_t_173_measurement_report;
+static int hf_sbc_tlv_t_173_primary_secondary_fast_feedback;
+static int hf_sbc_tlv_t_173_diuc_cqi_fast_feedback;
+static int hf_sbc_tlv_t_174_ofdma_ms_csit_capability;
+static int hf_sbc_tlv_t_174_csit_compatibility_type_a;
+static int hf_sbc_tlv_t_174_csit_compatibility_type_b;
+static int hf_sbc_tlv_t_174_power_assignment_capability;
+static int hf_sbc_tlv_t_174_sounding_rsp_time_capability;
+static int hf_sbc_tlv_t_174_max_num_simultanous_sounding_instructions;
+static int hf_sbc_tlv_t_174_ss_csit_type_a_support;
+static int hf_sbc_tlv_t_204_ofdma_parameters_sets;
+static int hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_a;
+static int hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_b;
+static int hf_sbc_tlv_t_204_ofdma_parameters_sets_harq_parameters_set;
+static int hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_a;
+static int hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_b;
+static int hf_sbc_tlv_t_204_ofdma_parameters_sets_reserved;
+static int hf_sbc_tlv_t_174_ss_csit_reserved;
+static int hf_sbc_tlv_t_175_max_num_bst_per_frm_capability_harq;
+static int hf_sbc_tlv_t_175_max_num_ul_harq_bst;
+static int hf_sbc_tlv_t_175_max_num_ul_harq_per_frm_include_one_non_harq_bst;
+static int hf_sbc_tlv_t_175_max_num_dl_harq_bst_per_harq_per_frm;
+static int hf_sbc_tlv_t_176;
+static int hf_sbc_tlv_t_176_bit0;
+static int hf_sbc_tlv_t_176_bit1;
+static int hf_sbc_tlv_t_176_bit2;
+/* static int hf_sbc_tlv_t_176_bit2_cor2; */
+static int hf_sbc_tlv_t_176_bit3;
+static int hf_sbc_tlv_t_176_bit4;
+static int hf_sbc_tlv_t_176_bit5;
+static int hf_sbc_tlv_t_176_bit6;
+static int hf_sbc_tlv_t_176_bit7;
+static int hf_sbc_tlv_t_176_bit8;
+static int hf_sbc_tlv_t_176_bit9;
+static int hf_sbc_tlv_t_176_bit10;
+static int hf_sbc_tlv_t_176_bit11;
+static int hf_sbc_tlv_t_176_bit12;
+static int hf_sbc_tlv_t_176_bit13;
+static int hf_sbc_tlv_t_176_bit14;
+static int hf_sbc_tlv_t_176_bit15;
+static int hf_sbc_tlv_t_176_bit16;
+static int hf_sbc_tlv_t_176_bit17;
+static int hf_sbc_tlv_t_176_bit18;
+static int hf_sbc_tlv_t_176_bit19;
+static int hf_sbc_tlv_t_176_reserved;
+static int hf_sbc_tlv_t_177_ofdma_ss_modulator_for_mimo_support;
+static int hf_sbc_tlv_t_177_stc_matrix_a;
+static int hf_sbc_tlv_t_177_stc_matrix_b_vertical;
+static int hf_sbc_tlv_t_177_stc_matrix_b_horizontal;
+static int hf_sbc_tlv_t_177_two_transmit_antennas;
+static int hf_sbc_tlv_t_177_capable_of_transmit_diversity;
+static int hf_sbc_tlv_t_177_capable_of_spacial_multiplexing;
+static int hf_sbc_tlv_t_177_beamforming;
+static int hf_sbc_tlv_t_177_adaptive_rate_ctl;
+static int hf_sbc_tlv_t_177_single_antenna;
+static int hf_sbc_tlv_t_177_collaborative_sm_with_one_antenna;
+static int hf_sbc_tlv_t_177_collaborative_sm_with_two_antennas;
+static int hf_sbc_tlv_t_177_capable_of_two_antenna;
+static int hf_sbc_tlv_t_177_rsvd;
+static int hf_sbc_tlv_t_178_sdma_pilot_capability;
+static int hf_sbc_tlv_t_178_sdma_pilot_pattern_support_for_amc_zone;
+static int hf_sbc_tlv_t_178_reserved;
+static int hf_sbc_tlv_t_179_ofdma_multiple_dl_burst_profile_support;
+static int hf_sbc_tlv_t_179_dl_bst_profile_for_multiple_fec;
+static int hf_sbc_tlv_t_179_ul_bst_profile_for_multiple_fec;
+static int hf_sbc_tlv_t_179_reserved;
+static int hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability;
+static int hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_NEP;
+static int hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_dl;
+static int hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_ul;
+static int hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved1;
+static int hf_sbc_tlv_t_162_ul_harq_incremental_redundancy_buffer_capability_NEP;
+static int hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved2;
+static int hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability;
+static int hf_sbc_tlv_t_163_dl_harq_buffering_capability_for_chase_combining;
+static int hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_dl;
+static int hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved1;
+static int hf_sbc_tlv_t_163_ul_harq_buffering_capability_for_chase_combining;
+static int hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_ul;
+static int hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved2;
-static gint hf_sbc_ss_demodulator_mimo_support;
-static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_a;
-static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_vertical;
-static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_horizontal;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_a;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_vertical;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_horizontal;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_vertical;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_horizontal;
-static gint hf_sbc_ss_demodulator_mimo_rsvd;
-static gint hf_sbc_ss_mimo_uplink_support;
-static gint hf_sbc_ss_mimo_uplink_support_2_ann_sttd;
-static gint hf_sbc_ss_mimo_uplink_support_2_ann_sm_vertical;
-static gint hf_sbc_ss_mimo_uplink_support_1_ann_coop_sm;
-static gint hf_sbc_ss_mimo_uplink_support_rsvd;
+static int hf_sbc_ss_demodulator_mimo_support;
+static int hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_a;
+static int hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_vertical;
+static int hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_horizontal;
+static int hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_a;
+static int hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_vertical;
+static int hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_horizontal;
+static int hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_vertical;
+static int hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_horizontal;
+static int hf_sbc_ss_demodulator_mimo_rsvd;
+static int hf_sbc_ss_mimo_uplink_support;
+static int hf_sbc_ss_mimo_uplink_support_2_ann_sttd;
+static int hf_sbc_ss_mimo_uplink_support_2_ann_sm_vertical;
+static int hf_sbc_ss_mimo_uplink_support_1_ann_coop_sm;
+static int hf_sbc_ss_mimo_uplink_support_rsvd;
-static gint hf_sbc_power_save_class_types_capability;
-static gint hf_sbc_power_save_class_types_capability_bit0;
-static gint hf_sbc_power_save_class_types_capability_bit1;
-static gint hf_sbc_power_save_class_types_capability_bit2;
-static gint hf_sbc_power_save_class_types_capability_bits34;
-static gint hf_sbc_power_save_class_types_capability_bits567;
+static int hf_sbc_power_save_class_types_capability;
+static int hf_sbc_power_save_class_types_capability_bit0;
+static int hf_sbc_power_save_class_types_capability_bit1;
+static int hf_sbc_power_save_class_types_capability_bit2;
+static int hf_sbc_power_save_class_types_capability_bits34;
+static int hf_sbc_power_save_class_types_capability_bits567;
-static gint hf_sbc_pkm_flow_control;
-static gint hf_sbc_auth_policy;
-static gint hf_sbc_privacy_802_16;
-static gint hf_sbc_privacy_rsvd;
-static gint hf_sbc_max_security_associations;
+static int hf_sbc_pkm_flow_control;
+static int hf_sbc_auth_policy;
+static int hf_sbc_privacy_802_16;
+static int hf_sbc_privacy_rsvd;
+static int hf_sbc_max_security_associations;
-static gint hf_sbc_invalid_tlv;
+static int hf_sbc_invalid_tlv;
static const true_false_string tfs_sbc_bw_alloc_support_duplex =
{
@@ -559,18 +558,18 @@ static const value_string vals_sbc_sdma_str[ ] =
};
-static void sbc_tlv_decoder(tlv_info_t* tlv_info, int ett, proto_tree* sbc_tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint tlv_offset)
+static void sbc_tlv_decoder(tlv_info_t* tlv_info, int ett, proto_tree* sbc_tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned tlv_offset)
{
proto_item *tlv_item, *ti;
proto_tree *tlv_tree;
- gint tlv_type = get_tlv_type(tlv_info),
+ int tlv_type = get_tlv_type(tlv_info),
tlv_len = get_tlv_length(tlv_info),
value;
- gfloat power_bpsk;
- gfloat power_qpsk;
- gfloat power_qam16;
- gfloat power_qam64;
- gfloat current_power;
+ float power_bpsk;
+ float power_qpsk;
+ float power_qam16;
+ float power_qam64;
+ float current_power;
/* process SBC TLV Encoded information */
switch (tlv_type)
@@ -608,23 +607,23 @@ static void sbc_tlv_decoder(tlv_info_t* tlv_info, int ett, proto_tree* sbc_tree,
tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_max_transmit_power, tvb, tlv_offset, ENC_BIG_ENDIAN);
tlv_tree = proto_item_add_subtree(tlv_item, ett);
/* display the detail meanings of the TLV value */
- power_bpsk = (gfloat)(tvb_get_guint8(tvb, offset) - 128) / 2;
- power_qpsk = (gfloat)(tvb_get_guint8(tvb, (offset + 1)) - 128) / 2;
- power_qam16 = (gfloat)(tvb_get_guint8(tvb, (offset + 2)) - 128) / 2;
- power_qam64 = (gfloat)(tvb_get_guint8(tvb, (offset + 3)) - 128) / 2;
- proto_tree_add_float_format_value(tlv_tree, hf_sbc_bpsk, tvb, offset, 1, power_bpsk, "%.2f dBm", (gdouble)power_bpsk);
- proto_tree_add_float_format_value(tlv_tree, hf_sbc_qpsk, tvb, (offset + 1), 1, power_qpsk, "%.2f dBm", (gdouble)power_qpsk);
- proto_tree_add_float_format_value(tlv_tree, hf_sbc_qam16, tvb, (offset + 2), 1, power_qam16, "%.2f dBm", (gdouble)power_qam16);
- proto_tree_add_float_format_value(tlv_tree, hf_sbc_qam64, tvb, (offset + 3), 1, power_qam64, "%.2f dBm", (gdouble)power_qam64);
+ power_bpsk = (float)(tvb_get_uint8(tvb, offset) - 128) / 2;
+ power_qpsk = (float)(tvb_get_uint8(tvb, (offset + 1)) - 128) / 2;
+ power_qam16 = (float)(tvb_get_uint8(tvb, (offset + 2)) - 128) / 2;
+ power_qam64 = (float)(tvb_get_uint8(tvb, (offset + 3)) - 128) / 2;
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_bpsk, tvb, offset, 1, power_bpsk, "%.2f dBm", (double)power_bpsk);
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_qpsk, tvb, (offset + 1), 1, power_qpsk, "%.2f dBm", (double)power_qpsk);
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_qam16, tvb, (offset + 2), 1, power_qam16, "%.2f dBm", (double)power_qam16);
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_qam64, tvb, (offset + 3), 1, power_qam64, "%.2f dBm", (double)power_qam64);
break;
case SBC_REQ_CURR_TRANSMITTED_POWER:
/* add TLV subtree */
tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_curr_transmit_power, tvb, tlv_offset, ENC_BIG_ENDIAN);
tlv_tree = proto_item_add_subtree(tlv_item, ett);
/* display the detail meanings of the TLV value */
- value = tvb_get_guint8(tvb, offset);
- current_power = (gfloat)(value - 128) / 2;
- proto_tree_add_float_format_value(tlv_tree, hf_sbc_current_transmitted_power, tvb, offset, 1, current_power, "%.2f dBm (Value: 0x%x)", (gdouble)current_power, value);
+ value = tvb_get_uint8(tvb, offset);
+ current_power = (float)(value - 128) / 2;
+ proto_tree_add_float_format_value(tlv_tree, hf_sbc_current_transmitted_power, tvb, offset, 1, current_power, "%.2f dBm (Value: 0x%x)", (double)current_power, value);
break;
case SBC_SS_FFT_SIZES:
/* add TLV subtree */
@@ -778,7 +777,7 @@ static void sbc_tlv_decoder(tlv_info_t* tlv_info, int ett, proto_tree* sbc_tree,
case SBC_PKM_FLOW_CONTROL:
/* add TLV subtree */
tlv_item = add_tlv_subtree(tlv_info, sbc_tree, hf_sbc_pkm_flow_control, tvb, tlv_offset, ENC_BIG_ENDIAN);
- if(tvb_get_guint8(tvb, offset) == 0)
+ if(tvb_get_uint8(tvb, offset) == 0)
proto_item_append_text(tlv_item, " (default - no limit)");
break;
case SBC_AUTH_POLICY_SUPPORT:
@@ -1023,9 +1022,9 @@ static void sbc_tlv_decoder(tlv_info_t* tlv_info, int ett, proto_tree* sbc_tree,
/* Wimax Mac SBC-REQ Message Dissector */
static int dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len;
- gint tlv_type, tlv_len, tlv_value_offset;
+ unsigned offset = 0;
+ unsigned tvb_len;
+ int tlv_type, tlv_len, tlv_value_offset;
proto_item *sbc_item;
proto_tree *sbc_tree;
tlv_info_t tlv_info;
@@ -1077,9 +1076,9 @@ static int dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinf
/* Wimax Mac SBC-RSP Message Dissector */
static int dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len;
- gint tlv_type, tlv_len, tlv_value_offset;
+ unsigned offset = 0;
+ unsigned tvb_len;
+ int tlv_type, tlv_len, tlv_value_offset;
proto_item *sbc_item;
proto_tree *sbc_tree;
tlv_info_t tlv_info;
@@ -2794,7 +2793,7 @@ void proto_register_mac_mgmt_msg_sbc(void)
};
/* Setup protocol subtree array */
- static gint *ett_sbc[] =
+ static int *ett_sbc[] =
{
&ett_mac_mgmt_msg_sbc_decoder,
&ett_sbc_req_tlv_subtree,
diff --git a/plugins/epan/wimax/msg_ucd.c b/plugins/epan/wimax/msg_ucd.c
index 5ad333cf77..0779f4ab5f 100644
--- a/plugins/epan/wimax/msg_ucd.c
+++ b/plugins/epan/wimax/msg_ucd.c
@@ -21,103 +21,106 @@
*/
#include <epan/packet.h>
+#include <epan/tfs.h>
+#include <epan/unit_strings.h>
+
+#include <wsutil/array.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
#include "wimax_utils.h"
+#include "wimax_prefs.h"
void proto_register_mac_mgmt_msg_ucd(void);
void proto_reg_handoff_mac_mgmt_msg_ucd(void);
static dissector_handle_t ucd_handle;
-extern gboolean include_cor2_changes;
-
-guint cqich_id_size; /* Set for CQICH_Alloc_IE */
+unsigned cqich_id_size; /* Set for CQICH_Alloc_IE */
-static gint proto_mac_mgmt_msg_ucd_decoder;
-static gint ett_mac_mgmt_msg_ucd_decoder;
+static int proto_mac_mgmt_msg_ucd_decoder;
+static int ett_mac_mgmt_msg_ucd_decoder;
/* fix fields */
-static gint hf_ucd_res_timeout;
-static gint hf_ucd_bw_req_size;
-static gint hf_ucd_ranging_req_size;
-static gint hf_ucd_freq;
-/* static gint hf_ucd_subchan_params_num_chan; */
-static gint hf_ucd_ul_allocated_subchannles_bitmap;
-/* static gint hf_ucd_subchan_params_num_sym; */
-/* static gint hf_ucd_subchan_codes; */
+static int hf_ucd_res_timeout;
+static int hf_ucd_bw_req_size;
+static int hf_ucd_ranging_req_size;
+static int hf_ucd_freq;
+/* static int hf_ucd_subchan_params_num_chan; */
+static int hf_ucd_ul_allocated_subchannles_bitmap;
+/* static int hf_ucd_subchan_params_num_sym; */
+/* static int hf_ucd_subchan_codes; */
-static gint hf_ucd_ul_burst_reserved;
-static gint hf_ucd_ul_burst_uiuc;
-static gint hf_ucd_burst_fec;
-static gint hf_ucd_burst_ranging_data_ratio;
-/*static gint hf_ucd_burst_power_boost;
-*static gint hf_ucd_burst_tcs_enable;
+static int hf_ucd_ul_burst_reserved;
+static int hf_ucd_ul_burst_uiuc;
+static int hf_ucd_burst_fec;
+static int hf_ucd_burst_ranging_data_ratio;
+/*static int hf_ucd_burst_power_boost;
+*static int hf_ucd_burst_tcs_enable;
*/
-static gint hf_ucd_tlv_t_159_band_amc_allocation_threshold;
-static gint hf_ucd_tlv_t_158_optional_permutation_ul_allocated_subchannels_bitmap;
-static gint hf_ucd_tlv_t_160_band_amc_release_threshold;
-static gint hf_ucd_tlv_t_161_band_amc_allocation_timer;
-static gint hf_ucd_tlv_t_162_band_amc_release_timer;
-static gint hf_ucd_tlv_t_163_band_status_report_max_period;
-static gint hf_ucd_tlv_t_164_band_amc_retry_timer;
-static gint hf_ucd_tlv_t_171_harq_ack_delay_dl_burst;
-static gint hf_ucd_tlv_t_170_safety_channel_retry_timer;
-static gint hf_ucd_tlv_t_172_cqich_band_amc_transition_delay;
-static gint hf_ucd_tlv_t_174_maximum_retransmission;
-static gint hf_ucd_tlv_t_177_normalized_cn_override2;
-static gint hf_ucd_tlv_t_177_normalized_cn_override2_first_line;
-static gint hf_ucd_tlv_t_177_normalized_cn_override2_list;
-static gint hf_ucd_tlv_t_176_size_of_cqich_id_field;
-static gint hf_ucd_tlv_t_186_upper_bound_aas_preamble;
-static gint hf_ucd_tlv_t_187_lower_bound_aas_preamble;
-static gint hf_ucd_tlv_t_188_allow_aas_beam_select_message;
-static gint hf_ucd_tlv_t_189_use_cqich_indication_flag;
-static gint hf_ucd_tlv_t_190_ms_specific_up_power_addjustment_step;
-static gint hf_ucd_tlv_t_191_ms_specific_down_power_addjustment_step;
-static gint hf_ucd_tlv_t_192_min_level_power_offset_adjustment;
-static gint hf_ucd_tlv_t_193_max_level_power_offset_adjustment;
-static gint hf_ucd_tlv_t_194_handover_ranging_codes;
-static gint hf_ucd_tlv_t_195_initial_ranging_interval;
-static gint hf_ucd_tlv_t_196_tx_power_report;
-static gint hf_ucd_tlv_t_196_tx_power_report_threshold;
-static gint hf_ucd_tlv_t_196_tx_power_report_interval;
-static gint hf_ucd_tlv_t_196_tx_power_report_a_p_avg;
-static gint hf_ucd_tlv_t_196_tx_power_report_threshold_icqch;
-static gint hf_ucd_tlv_t_196_tx_power_report_interval_icqch;
-static gint hf_ucd_tlv_t_196_tx_power_report_a_p_avg_icqch;
-/* static gint hf_ucd_tlv_t_197_normalized_cn_channel_sounding; */
-static gint hf_ucd_tlv_t_202_uplink_burst_profile_for_multiple_fec_types;
-static gint hf_ucd_tlv_t_203_ul_pusc_subchannel_rotation;
-static gint hf_ucd_tlv_t_205_relative_power_offset_ul_harq_burst;
-static gint hf_ucd_tlv_t_206_relative_power_offset_ul_burst_containing_mac_mgmt_msg;
-static gint hf_ucd_tlv_t_207_ul_initial_transmit_timing;
-static gint hf_ucd_tlv_t_210_fast_feedback_region;
-static gint hf_ucd_tlv_t_211_harq_ack_region;
-static gint hf_ucd_tlv_t_212_ranging_region;
-static gint hf_ucd_tlv_t_213_sounding_region;
-static gint hf_ucd_tlv_t_150_initial_ranging_codes;
-static gint hf_ucd_tlv_t_151_periodic_ranging_codes;
-static gint hf_ucd_tlv_t_152_bandwidth_request_codes;
-static gint hf_ucd_tlv_t_155_start_of_ranging_codes_group;
-static gint hf_ucd_tlv_t_156_permutation_base;
-static gint hf_ucd_ho_ranging_start;
-static gint hf_ucd_ho_ranging_end;
-static gint hf_ucd_initial_range_backoff_start;
-static gint hf_ucd_initial_range_backoff_end;
-static gint hf_ucd_bandwidth_backoff_start;
-static gint hf_ucd_bandwidth_backoff_end;
-static gint hf_ucd_periodic_ranging_backoff_start;
-static gint hf_ucd_periodic_ranging_backoff_end;
-static gint hf_ucd_config_change_count;
-static gint hf_ucd_ranging_backoff_start;
-static gint hf_ucd_ranging_backoff_end;
-static gint hf_ucd_request_backoff_start;
-static gint hf_ucd_request_backoff_end;
+static int hf_ucd_tlv_t_159_band_amc_allocation_threshold;
+static int hf_ucd_tlv_t_158_optional_permutation_ul_allocated_subchannels_bitmap;
+static int hf_ucd_tlv_t_160_band_amc_release_threshold;
+static int hf_ucd_tlv_t_161_band_amc_allocation_timer;
+static int hf_ucd_tlv_t_162_band_amc_release_timer;
+static int hf_ucd_tlv_t_163_band_status_report_max_period;
+static int hf_ucd_tlv_t_164_band_amc_retry_timer;
+static int hf_ucd_tlv_t_171_harq_ack_delay_dl_burst;
+static int hf_ucd_tlv_t_170_safety_channel_retry_timer;
+static int hf_ucd_tlv_t_172_cqich_band_amc_transition_delay;
+static int hf_ucd_tlv_t_174_maximum_retransmission;
+static int hf_ucd_tlv_t_177_normalized_cn_override2;
+static int hf_ucd_tlv_t_177_normalized_cn_override2_first_line;
+static int hf_ucd_tlv_t_177_normalized_cn_override2_list;
+static int hf_ucd_tlv_t_176_size_of_cqich_id_field;
+static int hf_ucd_tlv_t_186_upper_bound_aas_preamble;
+static int hf_ucd_tlv_t_187_lower_bound_aas_preamble;
+static int hf_ucd_tlv_t_188_allow_aas_beam_select_message;
+static int hf_ucd_tlv_t_189_use_cqich_indication_flag;
+static int hf_ucd_tlv_t_190_ms_specific_up_power_addjustment_step;
+static int hf_ucd_tlv_t_191_ms_specific_down_power_addjustment_step;
+static int hf_ucd_tlv_t_192_min_level_power_offset_adjustment;
+static int hf_ucd_tlv_t_193_max_level_power_offset_adjustment;
+static int hf_ucd_tlv_t_194_handover_ranging_codes;
+static int hf_ucd_tlv_t_195_initial_ranging_interval;
+static int hf_ucd_tlv_t_196_tx_power_report;
+static int hf_ucd_tlv_t_196_tx_power_report_threshold;
+static int hf_ucd_tlv_t_196_tx_power_report_interval;
+static int hf_ucd_tlv_t_196_tx_power_report_a_p_avg;
+static int hf_ucd_tlv_t_196_tx_power_report_threshold_icqch;
+static int hf_ucd_tlv_t_196_tx_power_report_interval_icqch;
+static int hf_ucd_tlv_t_196_tx_power_report_a_p_avg_icqch;
+/* static int hf_ucd_tlv_t_197_normalized_cn_channel_sounding; */
+static int hf_ucd_tlv_t_202_uplink_burst_profile_for_multiple_fec_types;
+static int hf_ucd_tlv_t_203_ul_pusc_subchannel_rotation;
+static int hf_ucd_tlv_t_205_relative_power_offset_ul_harq_burst;
+static int hf_ucd_tlv_t_206_relative_power_offset_ul_burst_containing_mac_mgmt_msg;
+static int hf_ucd_tlv_t_207_ul_initial_transmit_timing;
+static int hf_ucd_tlv_t_210_fast_feedback_region;
+static int hf_ucd_tlv_t_211_harq_ack_region;
+static int hf_ucd_tlv_t_212_ranging_region;
+static int hf_ucd_tlv_t_213_sounding_region;
+static int hf_ucd_tlv_t_150_initial_ranging_codes;
+static int hf_ucd_tlv_t_151_periodic_ranging_codes;
+static int hf_ucd_tlv_t_152_bandwidth_request_codes;
+static int hf_ucd_tlv_t_155_start_of_ranging_codes_group;
+static int hf_ucd_tlv_t_156_permutation_base;
+static int hf_ucd_ho_ranging_start;
+static int hf_ucd_ho_ranging_end;
+static int hf_ucd_initial_range_backoff_start;
+static int hf_ucd_initial_range_backoff_end;
+static int hf_ucd_bandwidth_backoff_start;
+static int hf_ucd_bandwidth_backoff_end;
+static int hf_ucd_periodic_ranging_backoff_start;
+static int hf_ucd_periodic_ranging_backoff_end;
+static int hf_ucd_config_change_count;
+static int hf_ucd_ranging_backoff_start;
+static int hf_ucd_ranging_backoff_end;
+static int hf_ucd_request_backoff_start;
+static int hf_ucd_request_backoff_end;
-/* static gint hf_ucd_unknown_type; */
-static gint hf_ucd_invalid_tlv;
+/* static int hf_ucd_unknown_type; */
+static int hf_ucd_invalid_tlv;
#if 0
static const value_string vals_dcd_burst_tcs[] =
@@ -210,19 +213,19 @@ static const value_string vals_yes_no_str[] =
/* UCD dissector */
static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len, length;
- gint tlv_type, tlv_len, tlv_offset, tlv_value_offset;
+ unsigned offset = 0;
+ unsigned tvb_len, length;
+ int tlv_type, tlv_len, tlv_offset, tlv_value_offset;
tlv_info_t tlv_info;
- gchar* proto_str;
+ char* proto_str;
{ /* we are being asked for details */
proto_item *ucd_item;
proto_tree *ucd_tree;
- guint ucd_ranging_backoff_start;
- guint ucd_ranging_backoff_end;
- guint ucd_request_backoff_start;
- guint ucd_request_backoff_end;
+ unsigned ucd_ranging_backoff_start;
+ unsigned ucd_ranging_backoff_end;
+ unsigned ucd_request_backoff_start;
+ unsigned ucd_request_backoff_end;
tvb_len = tvb_reported_length(tvb);
/* display MAC payload type UCD */
@@ -235,22 +238,22 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
offset++;
/* get the ranging backoff start */
- ucd_ranging_backoff_start = tvb_get_guint8(tvb, offset);
+ ucd_ranging_backoff_start = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(ucd_tree, hf_ucd_ranging_backoff_start, tvb, offset, 1, (1 << ucd_ranging_backoff_start), "2^%u = %u", ucd_ranging_backoff_start, (1 << ucd_ranging_backoff_start));
offset++;
/* get the ranging backoff end */
- ucd_ranging_backoff_end = tvb_get_guint8(tvb, offset);
+ ucd_ranging_backoff_end = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(ucd_tree, hf_ucd_ranging_backoff_end, tvb, offset, 1, (1 << ucd_ranging_backoff_end), "2^%u = %u", ucd_ranging_backoff_end, (1 << ucd_ranging_backoff_end));
offset++;
/* get the request backoff start */
- ucd_request_backoff_start = tvb_get_guint8(tvb, offset);
+ ucd_request_backoff_start = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(ucd_tree, hf_ucd_request_backoff_start, tvb, offset, 1, (1 << ucd_request_backoff_start), "2^%u = %u", ucd_request_backoff_start, (1 << ucd_request_backoff_start));
offset++;
/* get the request backoff end */
- ucd_request_backoff_end = tvb_get_guint8(tvb, offset);
+ ucd_request_backoff_end = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(ucd_tree, hf_ucd_request_backoff_end, tvb, offset, 1, (1 << ucd_request_backoff_end), "2^%u = %u", ucd_request_backoff_end, (1 << ucd_request_backoff_end));
offset++;
@@ -258,8 +261,8 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
{
proto_tree *tlv_tree;
proto_item *tlv_item1;
- guint ul_burst_uiuc;
- guint utemp;
+ unsigned ul_burst_uiuc;
+ unsigned utemp;
/* get the TLV information */
init_tlv_info(&tlv_info, tvb, offset);
/* get the TLV type */
@@ -331,7 +334,7 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
case UCD_UPLINK_BURST_PROFILE:
{
/* get the UIUC */
- ul_burst_uiuc = tvb_get_guint8(tvb, offset) & 0x0F;
+ ul_burst_uiuc = tvb_get_uint8(tvb, offset) & 0x0F;
/* add TLV subtree */
proto_str = wmem_strdup_printf(pinfo->pool, "Uplink Burst Profile (UIUC = %u)", ul_burst_uiuc);
tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_ucd_decoder, ucd_tree, proto_mac_mgmt_msg_ucd_decoder, tvb, offset-tlv_value_offset, tlv_len, proto_str);
@@ -406,14 +409,14 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
case UCD_TLV_T_7_HO_RANGING_START:
{
tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_ho_ranging_start, tvb, offset-tlv_value_offset);
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(tlv_tree, hf_ucd_ho_ranging_start, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
break;
}
case UCD_TLV_T_8_RANGING_HO_END:
{
tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_ho_ranging_end, tvb, offset-tlv_value_offset);
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(tlv_tree, hf_ucd_ho_ranging_end, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
break;
}
@@ -474,7 +477,7 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
}
case UCD_TLV_T_176_SIZE_OF_CQICH_ID_FIELD:
{
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
cqich_id_size = 0; /* Default is 0 */
if (utemp && utemp < 8) {
/* Set for CQICH_Alloc_IE */
@@ -562,28 +565,28 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
case UCD_TLV_T_198_INTIAL_RANGING_BACKOFF_START:
{
tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_initial_range_backoff_start, tvb, offset-tlv_value_offset);
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(tlv_tree, hf_ucd_initial_range_backoff_start, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
break;
}
case UCD_TLV_T_199_INITIAL_RANGING_BACKOFF_END:
{
tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_initial_range_backoff_end, tvb, offset-tlv_value_offset);
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(tlv_tree, hf_ucd_initial_range_backoff_end, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
break;
}
case UCD_TLV_T_200_BANDWIDTH_REQUESET_BACKOFF_START:
{
tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_bandwidth_backoff_start, tvb, offset-tlv_value_offset);
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(tlv_tree, hf_ucd_bandwidth_backoff_start, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
break;
}
case UCD_TLV_T_201_BANDWIDTH_REQUEST_BACKOFF_END:
{
tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_bandwidth_backoff_end, tvb, offset-tlv_value_offset);
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(tlv_tree, hf_ucd_bandwidth_backoff_end, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
break;
}
@@ -610,7 +613,7 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
case UCD_PERIODIC_RANGING_BACKOFF_START:
{
tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_periodic_ranging_backoff_start, tvb, offset-tlv_value_offset);
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(tlv_tree, hf_ucd_periodic_ranging_backoff_start, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
break;
@@ -618,7 +621,7 @@ static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, p
case UCD_PERIODIC_RANGING_BACKOFF_END:
{
tlv_tree = add_tlv_subtree_no_item(&tlv_info, ucd_tree, hf_ucd_periodic_ranging_backoff_end, tvb, offset-tlv_value_offset);
- utemp = tvb_get_guint8(tvb, offset);
+ utemp = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format_value(tlv_tree, hf_ucd_periodic_ranging_backoff_end, tvb, offset, tvb_len, utemp, "2^%u = %u", utemp, (1 << utemp));
break;
}
@@ -682,42 +685,42 @@ void proto_register_mac_mgmt_msg_ucd(void)
&hf_ucd_tlv_t_159_band_amc_allocation_threshold,
{
"Band AMC Allocation Threshold", "wmx.ucd.band_amc.allocation_threshold",
- FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_db), 0, NULL, HFILL
}
},
{
&hf_ucd_tlv_t_161_band_amc_allocation_timer,
{
"Band AMC Allocation Timer", "wmx.ucd.band_amc.allocation_timer",
- FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0, NULL, HFILL
}
},
{
&hf_ucd_tlv_t_160_band_amc_release_threshold,
{
"Band AMC Release Threshold", "wmx.ucd.band_amc.release_threshold",
- FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_db), 0, NULL, HFILL
}
},
{
&hf_ucd_tlv_t_162_band_amc_release_timer,
{
"Band AMC Release Timer", "wmx.ucd.band_amc.release_timer",
- FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0, NULL, HFILL
}
},
{
&hf_ucd_tlv_t_164_band_amc_retry_timer,
{
"Band AMC Retry Timer", "wmx.ucd.band_amc.retry_timer",
- FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0, NULL, HFILL
}
},
{
&hf_ucd_tlv_t_163_band_status_report_max_period,
{
"Band Status Report MAC Period", "wmx.ucd.band_status.report_max_period",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0, NULL, HFILL
}
},
{
@@ -738,7 +741,7 @@ void proto_register_mac_mgmt_msg_ucd(void)
&hf_ucd_burst_ranging_data_ratio,
{
"Ranging Data Ratio", "wmx.ucd.burst.ranging_data_ratio",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_db), 0, NULL, HFILL
}
},
{
@@ -758,7 +761,7 @@ void proto_register_mac_mgmt_msg_ucd(void)
#if 0
{
&hf_ucd_burst_power_boost,
- {"Focused Contention Power Boost", "wmx.ucd.burst.power_boost", FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL}
+ {"Focused Contention Power Boost", "wmx.ucd.burst.power_boost", FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_db), 0, NULL, HFILL}
},
{
&hf_ucd_burst_tcs_enable,
@@ -769,21 +772,21 @@ void proto_register_mac_mgmt_msg_ucd(void)
&hf_ucd_bw_req_size,
{
"Bandwidth Request Opportunity Size", "wmx.ucd.bw_req_size",
- FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ps, 0, NULL, HFILL
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_ps), 0, NULL, HFILL
}
},
{
&hf_ucd_tlv_t_172_cqich_band_amc_transition_delay,
{
"CQICH Band AMC-Transition Delay", "wmx.ucd.cqich_band_amc_transition_delay",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0, NULL, HFILL
}
},
{
&hf_ucd_freq,
{
"Frequency", "wmx.ucd.frequency",
- FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_khz, 0, NULL, HFILL
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_khz), 0, NULL, HFILL
}
},
{
@@ -797,7 +800,7 @@ void proto_register_mac_mgmt_msg_ucd(void)
&hf_ucd_tlv_t_171_harq_ack_delay_dl_burst,
{
"HARQ ACK Delay for DL Burst", "wmx.ucd.harq_ack_delay_dl_burst",
- FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_frame_offset, 0, NULL, HFILL
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_frame_offset), 0, NULL, HFILL
}
},
{
@@ -918,7 +921,7 @@ void proto_register_mac_mgmt_msg_ucd(void)
&hf_ucd_ranging_req_size,
{
"Ranging Request Opportunity Size", "wmx.ucd.ranging_req_size",
- FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_db, 0, NULL, HFILL
+ FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_db), 0, NULL, HFILL
}
},
{
@@ -932,7 +935,7 @@ void proto_register_mac_mgmt_msg_ucd(void)
&hf_ucd_tlv_t_170_safety_channel_retry_timer,
{
"Safety Channel Release Timer", "wmx.ucd.safety_channel_release_timer",
- FT_UINT8, BASE_HEX|BASE_UNIT_STRING, &wimax_units_frame_frames, 0, NULL, HFILL
+ FT_UINT8, BASE_HEX|BASE_UNIT_STRING, UNS(&wimax_units_frame_frames), 0, NULL, HFILL
}
},
{
@@ -1208,7 +1211,7 @@ void proto_register_mac_mgmt_msg_ucd(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_mac_mgmt_msg_ucd_decoder,
};
diff --git a/plugins/epan/wimax/msg_ulmap.c b/plugins/epan/wimax/msg_ulmap.c
index cdb0066c50..d079426664 100644
--- a/plugins/epan/wimax/msg_ulmap.c
+++ b/plugins/epan/wimax/msg_ulmap.c
@@ -21,8 +21,9 @@
#include "wimax_mac.h"
#include "wimax_bits.h"
#include "wimax_utils.h"
-
-extern gboolean include_cor2_changes;
+#if 0
+#include "wimax_prefs.h"
+#endif
static dissector_handle_t ulmap_handle;
@@ -49,62 +50,62 @@ void proto_reg_handoff_mac_mgmt_msg_ulmap(void);
} while(0)
/* from msg_ucd.c */
-extern guint cqich_id_size; /* Set for CQICH_Alloc_IE */
+extern unsigned cqich_id_size; /* Set for CQICH_Alloc_IE */
/* from msg_dlmap.c */
-extern gint harq;
-extern gint ir_type;
-extern gint N_layer;
-extern gint RCID_Type;
-
-static gint proto_mac_mgmt_msg_ulmap_decoder;
-
-static gint ett_ulmap;
-static gint ett_ulmap_ie;
-static gint ett_ulmap_ffb;
-/* static gint ett_ulmap_c; */
-/* static gint ett_ulmap_c_ie; */
-/* static gint ett_ulmap_s; */
-/* static gint ett_ulmap_s_ie; */
-static gint ett_287_1;
-static gint ett_287_2;
-static gint ett_289;
-static gint ett_290;
-static gint ett_290b;
-static gint ett_291;
-static gint ett_292;
-static gint ett_293;
-static gint ett_294;
-static gint ett_295;
-static gint ett_299;
-static gint ett_300;
-static gint ett_302;
-static gint ett_302a;
-static gint ett_302b;
-static gint ett_302c;
-static gint ett_302d;
-static gint ett_302e;
-static gint ett_302f;
-static gint ett_302g;
-static gint ett_302h;
-static gint ett_302i;
-static gint ett_302j;
-static gint ett_302k;
-static gint ett_302l;
-static gint ett_302m;
-static gint ett_302n;
-static gint ett_302o;
-static gint ett_302p;
-static gint ett_302q;
-static gint ett_302r;
-static gint ett_302s;
-static gint ett_302t;
-static gint ett_302u;
-static gint ett_302v;
-static gint ett_306;
-static gint ett_306_ul;
-static gint ett_308b;
-static gint ett_315d;
+extern int harq;
+extern int ir_type;
+extern int N_layer;
+extern int RCID_Type;
+
+static int proto_mac_mgmt_msg_ulmap_decoder;
+
+static int ett_ulmap;
+static int ett_ulmap_ie;
+static int ett_ulmap_ffb;
+/* static int ett_ulmap_c; */
+/* static int ett_ulmap_c_ie; */
+/* static int ett_ulmap_s; */
+/* static int ett_ulmap_s_ie; */
+static int ett_287_1;
+static int ett_287_2;
+static int ett_289;
+static int ett_290;
+static int ett_290b;
+static int ett_291;
+static int ett_292;
+static int ett_293;
+static int ett_294;
+static int ett_295;
+static int ett_299;
+static int ett_300;
+static int ett_302;
+static int ett_302a;
+static int ett_302b;
+static int ett_302c;
+static int ett_302d;
+static int ett_302e;
+static int ett_302f;
+static int ett_302g;
+static int ett_302h;
+static int ett_302i;
+static int ett_302j;
+static int ett_302k;
+static int ett_302l;
+static int ett_302m;
+static int ett_302n;
+static int ett_302o;
+static int ett_302p;
+static int ett_302q;
+static int ett_302r;
+static int ett_302s;
+static int ett_302t;
+static int ett_302u;
+static int ett_302v;
+static int ett_306;
+static int ett_306_ul;
+static int ett_308b;
+static int ett_315d;
#define DCD_DOWNLINK_BURST_PROFILE 1
#define DCD_BS_EIRP 2
@@ -196,63 +197,63 @@ static const value_string boost_msgs[] =
#endif
/* ul-map fields */
-static gint hf_ulmap_reserved;
-static gint hf_ulmap_ucd_count;
-static gint hf_ulmap_alloc_start_time;
-static gint hf_ulmap_ofdma_sym;
-static gint hf_ulmap_ie_diuc_ext;
-static gint hf_ulmap_ie_diuc_ext2;
-static gint hf_ulmap_ie_length;
-static gint hf_ulmap_ie_reserved_extended2_duic;
-static gint hf_ulmap_ie_reserved_extended_duic;
-/* static gint hf_ulmap_fch_expected; */
-
-/* static gint hf_ulmap_ie; */
-
-static gint hf_ulmap_ie_cid;
-static gint hf_ulmap_ie_uiuc;
-static gint hf_ulmap_uiuc12_symofs;
-static gint hf_ulmap_uiuc12_subofs;
-static gint hf_ulmap_uiuc12_numsym;
-static gint hf_ulmap_uiuc12_numsub;
-static gint hf_ulmap_uiuc12_method;
-static gint hf_ulmap_uiuc12_dri;
-static gint hf_ulmap_uiuc10_dur;
-static gint hf_ulmap_uiuc10_rep;
-static gint hf_ulmap_uiuc10_slot_offset;
-
-static gint hf_ulmap_uiuc14_dur;
-static gint hf_ulmap_uiuc14_uiuc;
-static gint hf_ulmap_uiuc14_rep;
-static gint hf_ulmap_uiuc14_idx;
-static gint hf_ulmap_uiuc14_code;
-static gint hf_ulmap_uiuc14_sym;
-static gint hf_ulmap_uiuc14_sub;
-static gint hf_ulmap_uiuc14_bwr;
-
-/* static gint hf_ulmap_uiuc11_ext; */
-/* static gint hf_ulmap_uiuc11_len; */
-/* static gint hf_ulmap_uiuc11_data; */
-/* static gint hf_ulmap_uiuc15_ext; */
-/* static gint hf_ulmap_uiuc15_len; */
-/* static gint hf_ulmap_uiuc15_data; */
-
-static gint hf_ulmap_uiuc0_symofs;
-static gint hf_ulmap_uiuc0_subofs;
-static gint hf_ulmap_uiuc0_numsym;
-static gint hf_ulmap_uiuc0_numsub;
-static gint hf_ulmap_uiuc0_rsv;
-
-static gint hf_ulmap_uiuc13_symofs;
-static gint hf_ulmap_uiuc13_subofs;
-static gint hf_ulmap_uiuc13_numsym;
-static gint hf_ulmap_uiuc13_numsub;
-static gint hf_ulmap_uiuc13_papr;
-static gint hf_ulmap_uiuc13_zone;
-static gint hf_ulmap_uiuc13_rsv;
-/* static gint hf_ulmap_crc16; */
-/* static gint hf_ulmap_crc16_status; */
-static gint hf_ulmap_padding;
+static int hf_ulmap_reserved;
+static int hf_ulmap_ucd_count;
+static int hf_ulmap_alloc_start_time;
+static int hf_ulmap_ofdma_sym;
+static int hf_ulmap_ie_diuc_ext;
+static int hf_ulmap_ie_diuc_ext2;
+static int hf_ulmap_ie_length;
+static int hf_ulmap_ie_reserved_extended2_duic;
+static int hf_ulmap_ie_reserved_extended_duic;
+/* static int hf_ulmap_fch_expected; */
+
+/* static int hf_ulmap_ie; */
+
+static int hf_ulmap_ie_cid;
+static int hf_ulmap_ie_uiuc;
+static int hf_ulmap_uiuc12_symofs;
+static int hf_ulmap_uiuc12_subofs;
+static int hf_ulmap_uiuc12_numsym;
+static int hf_ulmap_uiuc12_numsub;
+static int hf_ulmap_uiuc12_method;
+static int hf_ulmap_uiuc12_dri;
+static int hf_ulmap_uiuc10_dur;
+static int hf_ulmap_uiuc10_rep;
+static int hf_ulmap_uiuc10_slot_offset;
+
+static int hf_ulmap_uiuc14_dur;
+static int hf_ulmap_uiuc14_uiuc;
+static int hf_ulmap_uiuc14_rep;
+static int hf_ulmap_uiuc14_idx;
+static int hf_ulmap_uiuc14_code;
+static int hf_ulmap_uiuc14_sym;
+static int hf_ulmap_uiuc14_sub;
+static int hf_ulmap_uiuc14_bwr;
+
+/* static int hf_ulmap_uiuc11_ext; */
+/* static int hf_ulmap_uiuc11_len; */
+/* static int hf_ulmap_uiuc11_data; */
+/* static int hf_ulmap_uiuc15_ext; */
+/* static int hf_ulmap_uiuc15_len; */
+/* static int hf_ulmap_uiuc15_data; */
+
+static int hf_ulmap_uiuc0_symofs;
+static int hf_ulmap_uiuc0_subofs;
+static int hf_ulmap_uiuc0_numsym;
+static int hf_ulmap_uiuc0_numsub;
+static int hf_ulmap_uiuc0_rsv;
+
+static int hf_ulmap_uiuc13_symofs;
+static int hf_ulmap_uiuc13_subofs;
+static int hf_ulmap_uiuc13_numsym;
+static int hf_ulmap_uiuc13_numsub;
+static int hf_ulmap_uiuc13_papr;
+static int hf_ulmap_uiuc13_zone;
+static int hf_ulmap_uiuc13_rsv;
+/* static int hf_ulmap_crc16; */
+/* static int hf_ulmap_crc16_status; */
+static int hf_ulmap_padding;
/* Generated via "one time" script to help create filterable fields */
static int hf_ulmap_dedicated_ul_control_length;
@@ -555,13 +556,13 @@ void init_wimax_globals(void)
* these functions take offset/length in bits
*******************************************************************/
-static gint Dedicated_UL_Control_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Dedicated_UL_Control_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24.1 Dedicated_UL_Control_IE -- table 302r */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
- gint sdma;
+ int sdma;
bit = offset;
@@ -576,11 +577,11 @@ static gint Dedicated_UL_Control_IE(proto_tree *uiuc_tree, gint offset, gint len
return (bit - offset); /* length in bits */
}
-static gint Dedicated_MIMO_UL_Control_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Dedicated_MIMO_UL_Control_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24.2 Dedicated_MIMO_UL_Control_IE -- table 302s */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
bit = offset;
@@ -595,15 +596,15 @@ static gint Dedicated_MIMO_UL_Control_IE(proto_tree *uiuc_tree, gint offset, gin
/* begin Sub-Burst IEs */
-static gint UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 UL_HARQ_Chase_sub_burst_IE -- table 302k */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
/*proto_item *generic_item = NULL;*/
- gint duci;
- /*guint16 calculated_crc;*/
+ int duci;
+ /*uint16_t calculated_crc;*/
bit = offset;
@@ -625,7 +626,7 @@ static gint UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint
#if 0
if (include_cor2_changes)
{
- calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ calculated_crc = wimax_mac_calc_crc16((uint8_t *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
bit += 16;
@@ -635,15 +636,15 @@ static gint UL_HARQ_Chase_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint
return (bit - offset); /* length in bits */
}
-static gint UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 UL_HARQ_IR_CTC_sub_burst_IE -- table 302l */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
/*proto_item *generic_item = NULL;*/
- gint duci;
- /*guint16 calculated_crc;*/
+ int duci;
+ /*uint16_t calculated_crc;*/
bit = offset;
@@ -666,7 +667,7 @@ static gint UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint
if (include_cor2_changes)
{
/* CRC-16 is always appended */
- calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ calculated_crc = wimax_mac_calc_crc16((uint8_t *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
bit += 16;
@@ -676,15 +677,15 @@ static gint UL_HARQ_IR_CTC_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint
return (bit - offset); /* length in bits */
}
-static gint UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 UL_HARQ_IR_CC_sub_burst_IE -- table 302m */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
/*proto_item *generic_item = NULL;*/
- gint duci;
- /*guint16 calculated_crc;*/
+ int duci;
+ /*uint16_t calculated_crc;*/
bit = offset;
@@ -708,7 +709,7 @@ static gint UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint
if (include_cor2_changes)
{
/* CRC-16 is always appended */
- calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ calculated_crc = wimax_mac_calc_crc16((uint8_t *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
@@ -719,15 +720,15 @@ static gint UL_HARQ_IR_CC_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint
return (bit - offset); /* length in bits */
}
-static gint MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 MIMO_UL_Chase_HARQ_Sub_Burst_IE -- table 302n */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
/*proto_item *generic_item = NULL;*/
- gint muin,dmci,ackd,i;
- /*guint16 calculated_crc;*/
+ int muin,dmci,ackd,i;
+ /*uint16_t calculated_crc;*/
bit = offset;
@@ -761,7 +762,7 @@ static gint MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset,
if (include_cor2_changes)
{
/* CRC-16 is always appended */
- calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ calculated_crc = wimax_mac_calc_crc16((uint8_t *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
@@ -772,15 +773,15 @@ static gint MIMO_UL_Chase_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset,
return (bit - offset); /* length in bits */
}
-static gint MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 MIMO_UL_IR_HARQ__Sub_Burst_IE -- table 302o */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
/*proto_item *generic_item = NULL;*/
- gint muin,dmci,ackd,i;
- /*guint16 calculated_crc;*/
+ int muin,dmci,ackd,i;
+ /*uint16_t calculated_crc;*/
bit = offset;
@@ -814,7 +815,7 @@ static gint MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gi
if (include_cor2_changes)
{
/* CRC-16 is always appended */
- calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ calculated_crc = wimax_mac_calc_crc16((uint8_t *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
@@ -825,15 +826,15 @@ static gint MIMO_UL_IR_HARQ__Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gi
return (bit - offset); /* length in bits */
}
-static gint MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE -- table 302p */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
/*proto_item *generic_item = NULL;*/
- gint muin,dmci,ackd,i;
- /*guint16 calculated_crc;*/
+ int muin,dmci,ackd,i;
+ /*uint16_t calculated_crc;*/
bit = offset;
@@ -868,7 +869,7 @@ static gint MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, gint off
if (include_cor2_changes)
{
/* CRC-16 is always appended */
- calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ calculated_crc = wimax_mac_calc_crc16((uint8_t *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
@@ -879,15 +880,15 @@ static gint MIMO_UL_IR_HARQ_for_CC_Sub_Burst_UIE(proto_tree *uiuc_tree, gint off
return (bit - offset); /* length in bits */
}
-static gint MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.4.24 MIMO_UL_STC_HARQ_Sub_Burst_IE -- table 302q */
/* UL-MAP HARQ Sub-Burst IE * offset/length are in bits */
- gint bit;
+ int bit;
proto_item *tree;
/*proto_item *generic_item = NULL;*/
- gint ackd,txct,sboi;
- /*guint16 calculated_crc;*/
+ int ackd,txct,sboi;
+ /*uint16_t calculated_crc;*/
bit = offset;
@@ -914,7 +915,7 @@ static gint MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gi
if (include_cor2_changes)
{
/* CRC-16 is always appended */
- calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
+ calculated_crc = wimax_mac_calc_crc16((uint8_t *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit));
proto_tree_add_checksum(tree, tvb, BITHI(bit,16), hf_ulmap_crc16, hf_ulmap_crc16_status, &ei_ulmap_crc16, pinfo, calculated_crc,
ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
@@ -930,13 +931,13 @@ static gint MIMO_UL_STC_HARQ_Sub_Burst_IE(proto_tree *uiuc_tree, gint offset, gi
* table 290a
*******************************************************************/
-static gint Power_Control_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Power_Control_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 0 */
/* 8.4.5.4.5 Power_Control_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_item *tree;
nib = offset;
@@ -951,17 +952,17 @@ static gint Power_Control_IE(proto_tree *uiuc_tree, gint offset, gint length, tv
return nib;
}
-static gint Mini_Subchannel_allocation_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Mini_Subchannel_allocation_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 1 */
/* 8.4.5.4.8 [2] Mini-Subchannel_allocation_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
- guint idx;
+ int bit;
+ int data;
+ unsigned idx;
proto_item *tree;
- gint j, M;
- const gint m_table[4] = { 2, 2, 3, 6 };
+ int j, M;
+ const int m_table[4] = { 2, 2, 3, 6 };
bit = NIB_TO_BIT(offset);
@@ -991,12 +992,12 @@ static gint Mini_Subchannel_allocation_IE(proto_tree *uiuc_tree, gint offset, gi
return BIT_TO_NIB(bit);
}
-static gint AAS_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int AAS_UL_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 2 */
/* 8.4.5.4.6 [2] AAS_UL_IE*/
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
bit = NIB_TO_BIT(offset);
@@ -1016,16 +1017,16 @@ static gint AAS_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t
return BIT_TO_NIB(bit);
}
-static gint CQICH_Alloc_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int CQICH_Alloc_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 3 */
/* 8.4.5.4.12 [2] CQICH_Alloc_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
- gint target;
+ int bit;
+ int data;
+ int target;
proto_item *tree;
- gint rci, rtype, ftype, zperm, mgi, api, pad;
+ int rci, rtype, ftype, zperm, mgi, api, pad;
bit = NIB_TO_BIT(offset);
@@ -1086,12 +1087,12 @@ static gint CQICH_Alloc_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbu
return BIT_TO_NIB(bit); /* Return position in nibbles. */
}
-static gint UL_Zone_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int UL_Zone_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 4 */
/* 8.4.5.4.7 [2] UL_Zone_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
bit = NIB_TO_BIT(offset);
@@ -1111,14 +1112,14 @@ static gint UL_Zone_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t
return BIT_TO_NIB(bit);
}
-static gint PHYMOD_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int PHYMOD_UL_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 5 */
/* 8.4.5.4.14 [2] PHYMOD_UL_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
- gint pmt;
+ int pmt;
bit = NIB_TO_BIT(offset);
@@ -1138,13 +1139,13 @@ static gint PHYMOD_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff
return BIT_TO_NIB(bit);
}
-static gint MIMO_UL_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_UL_IE(proto_tree *uiuc_tree, packet_info* pinfo, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 6 */
/* 8.4.5.4.11 MIMO_UL_Basic_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_item *tree;
nib = offset;
@@ -1157,12 +1158,12 @@ static gint MIMO_UL_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, g
return nib;
}
-static gint ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 7 */
/* 8.4.5.4.22 [2] ULMAP_Fast_Tracking_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
bit = NIB_TO_BIT(offset);
@@ -1184,12 +1185,12 @@ static gint ULMAP_Fast_Tracking_IE(proto_tree *uiuc_tree, gint offset, gint leng
return BIT_TO_NIB(bit);
}
-static gint UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 8 */
/* 8.4.5.4.17 [2] UL_PUSC_Burst_Allocation_in_other_segment_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
bit = NIB_TO_BIT(offset);
@@ -1210,14 +1211,14 @@ static gint UL_PUSC_Burst_Allocation_in_other_segment_IE(proto_tree *uiuc_tree,
return BIT_TO_NIB(bit);
}
-static gint Fast_Ranging_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Fast_Ranging_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 9 */
/* 8.4.5.4.21 [2] Fast_Ranging_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
- gint hidi;
+ int hidi;
bit = NIB_TO_BIT(offset);
@@ -1241,12 +1242,12 @@ static gint Fast_Ranging_IE(proto_tree *uiuc_tree, gint offset, gint length, tvb
return BIT_TO_NIB(bit);
}
-static gint UL_Allocation_Start_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int UL_Allocation_Start_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended IE = 0xA */
/* 8.4.5.4.15 [2] UL_Allocation_Start_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
bit = NIB_TO_BIT(offset);
@@ -1268,16 +1269,16 @@ static gint UL_Allocation_Start_IE(proto_tree *uiuc_tree, gint offset, gint leng
* table 290c
*******************************************************************/
-static gint CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 0 */
/* 8.4.5.4.16 [2] CQICH_Enhanced_Allocation_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_item *tree;
- gint i, cnum, bapm;
- guint pad;
+ int i, cnum, bapm;
+ unsigned pad;
bit = NIB_TO_BIT(offset);
@@ -1319,13 +1320,13 @@ static gint CQICH_Enhanced_Allocation_IE(proto_tree *uiuc_tree, gint offset, gin
return BIT_TO_NIB(bit);
}
-static gint HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, packet_info* pinfo, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 1 */
/* 8.4.5.4.18 [2] HO_Anchor_Active_UL_MAP_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_item *tree;
nib = offset;
@@ -1338,13 +1339,13 @@ static gint HO_Anchor_Active_UL_MAP_IE(proto_tree *uiuc_tree, packet_info* pinfo
return nib;
}
-static gint HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, packet_info* pinfo, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 2 */
/* 8.4.5.4.19 [2] HO_Active_Anchor_UL_MAP_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_item *tree;
nib = offset;
@@ -1357,16 +1358,16 @@ static gint HO_Active_Anchor_UL_MAP_IE(proto_tree *uiuc_tree, packet_info* pinfo
return nib;
}
-static gint Anchor_BS_switch_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Anchor_BS_switch_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 3 */
/* 8.4.5.4.23 [2] Anchor_BS_switch_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
- gint data;
+ int bit;
+ int data;
proto_item *tree;
- gint nbss, acod, cqai, pad;
- gint i;
+ int nbss, acod, cqai, pad;
+ int i;
bit = NIB_TO_BIT(offset);
@@ -1415,16 +1416,16 @@ static gint Anchor_BS_switch_IE(proto_tree *uiuc_tree, gint offset, gint length,
return BIT_TO_NIB(bit);
}
-static gint UL_sounding_command_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int UL_sounding_command_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 4 */
/* 8.4.5.4.26 [2] UL_sounding_command_IE */
/* see 8.4.6.2.7.1 */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
- gint stype, srlf, iafb, pad, sept, nssym, ncid, amod;
- gint i, j;
+ int stype, srlf, iafb, pad, sept, nssym, ncid, amod;
+ int i, j;
bit = NIB_TO_BIT(offset);
@@ -1519,13 +1520,13 @@ static gint UL_sounding_command_IE(proto_tree *uiuc_tree, gint offset, gint leng
return BIT_TO_NIB(bit);
}
-static gint MIMO_UL_Enhanced_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+static int MIMO_UL_Enhanced_IE(proto_tree *uiuc_tree, packet_info* pinfo, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 6 */
/* 8.4.5.4.20 [2] MIMO_UL_Enhanced_IE (not implemented) */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint nib;
- gint data;
+ int nib;
+ int data;
proto_item *tree;
nib = offset;
@@ -1538,17 +1539,17 @@ static gint MIMO_UL_Enhanced_IE(proto_tree *uiuc_tree, packet_info* pinfo, gint
return nib;
}
-static gint HARQ_ULMAP_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int HARQ_ULMAP_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 7 */
/* 8.4.5.4.24 HARQ_ULMAP_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
- gint bitlength;
- gint lastbit;
- gint pad, mode, alsi, nsub;
- gint i;
+ int bitlength;
+ int lastbit;
+ int pad, mode, alsi, nsub;
+ int i;
bit = NIB_TO_BIT(offset);
bitlength = NIB_TO_BIT(length);
@@ -1598,12 +1599,12 @@ static gint HARQ_ULMAP_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuf
return BIT_TO_NIB(bit);
}
-static gint HARQ_ACKCH_Region_Allocation_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int HARQ_ACKCH_Region_Allocation_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 8 */
/* 8.4.5.4.25 [2] HARQ_ACKCH_Region_Allocation_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
bit = NIB_TO_BIT(offset);
@@ -1620,16 +1621,16 @@ static gint HARQ_ACKCH_Region_Allocation_IE(proto_tree *uiuc_tree, gint offset,
return BIT_TO_NIB(bit);
}
-static gint AAS_SDMA_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int AAS_SDMA_UL_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 0xE */
/* 8.4.5.4.27 [2] AAS_SDMA_UL_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
- gint nreg, pad, user, encm, ppmd, padj;
- gint aasp = 0; /* TODO AAS UL preamble used */
- gint ii, jj;
+ int nreg, pad, user, encm, ppmd, padj;
+ int aasp = 0; /* TODO AAS UL preamble used */
+ int ii, jj;
bit = NIB_TO_BIT(offset);
@@ -1701,15 +1702,15 @@ static gint AAS_SDMA_UL_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbu
return BIT_TO_NIB(bit);
}
-static gint Feedback_Polling_IE(proto_tree *uiuc_tree, gint offset, gint length, tvbuff_t *tvb)
+static int Feedback_Polling_IE(proto_tree *uiuc_tree, int offset, int length, tvbuff_t *tvb)
{
/* UL-MAP Extended-2 IE = 0xF */
/* 8.4.5.4.28 [2] Feedback_Polling_IE */
/* offset of TLV in nibbles, length of TLV in nibbles */
- gint bit;
+ int bit;
proto_item *tree;
- gint nalloc, dula, pad, adur;
- gint i;
+ int nalloc, dula, pad, adur;
+ int i;
bit = NIB_TO_BIT(offset);
@@ -1750,7 +1751,7 @@ static gint Feedback_Polling_IE(proto_tree *uiuc_tree, gint offset, gint length,
* UL-MAP Miscellany
*******************************************************************/
-gint dissect_ulmap_ie( proto_tree *ie_tree, packet_info* pinfo, gint offset, gint length _U_, tvbuff_t *tvb)
+int dissect_ulmap_ie( proto_tree *ie_tree, packet_info* pinfo, int offset, int length _U_, tvbuff_t *tvb)
{
/* decode a single UL-MAP IE and return the
* length of the IE in nibbles
@@ -1758,11 +1759,11 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, packet_info* pinfo, gint offset, gin
* length = total length of tvb (nibbles) */
proto_item *ti;
proto_tree *tree;
- gint nibble;
- gint uiuc, ext_uiuc, ext2_uiuc, len, aas_or_amc;
- guint cid;
- guint data;
- guint32 data32;
+ int nibble;
+ int uiuc, ext_uiuc, ext2_uiuc, len, aas_or_amc;
+ unsigned cid;
+ unsigned data;
+ uint32_t data32;
nibble = offset;
@@ -2041,13 +2042,13 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, packet_info* pinfo, gint offset, gin
static int dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
/* 6.3.2.3.4 [2] UL-MAP table 18 */
- guint offset = 0;
- guint length;
- guint nib, pad;
+ unsigned offset = 0;
+ unsigned length;
+ unsigned nib, pad;
proto_item *ti = NULL;
proto_tree *ulmap_tree = NULL;
proto_tree *ie_tree = NULL;
- guint tvb_len;
+ unsigned tvb_len;
tvb_len = tvb_reported_length(tvb);
@@ -2081,13 +2082,13 @@ static int dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo
return tvb_captured_length(tvb);
}
-/*gint wimax_decode_ulmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)*/
-gint wimax_decode_ulmapc(proto_tree *base_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb)
+/*int wimax_decode_ulmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)*/
+int wimax_decode_ulmapc(proto_tree *base_tree, packet_info* pinfo, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.6.2 [2] Compressed UL-MAP */
/* returns length in nibbles */
- gint nib;
- guint data;
+ int nib;
+ unsigned data;
proto_item *ti = NULL;
proto_tree *tree = NULL;
proto_tree *ie_tree = NULL;
@@ -2125,16 +2126,16 @@ gint wimax_decode_ulmapc(proto_tree *base_tree, packet_info* pinfo, gint offset,
}
-gint wimax_decode_ulmap_reduced_aas(proto_tree *base_tree, gint offset, gint length, tvbuff_t *tvb)
+int wimax_decode_ulmap_reduced_aas(proto_tree *base_tree, int offset, int length, tvbuff_t *tvb)
{
/* 8.4.5.8.2 Reduced AAS private UL-MAP */
/* offset and length are in bits since this is called from within
* the Reduced AAS private DL-MAP
* return length in bits */
- gint bit;
- guint data;
+ int bit;
+ unsigned data;
proto_tree *tree;
- gint azci, azpi, umii, phmi, powi;
+ int azci, azpi, umii, phmi, powi;
bit = offset;
@@ -2816,7 +2817,7 @@ void proto_register_mac_mgmt_msg_ulmap(void)
{ &hf_ulmap_feedback_polling_allocation_duration, { "Allocation Duration (d)", "wmx.ulmap.feedback_polling.allocation_duration", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
{ &hf_ulmap_feedback_polling_type, { "Feedback type", "wmx.ulmap.feedback_polling.feedback_polling.type", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
{ &hf_ulmap_feedback_polling_frame_offset, { "Frame Offset", "wmx.ulmap.feedback_polling.frame_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
- { &hf_ulmap_feedback_polling_period, { "Period (p)", "wmx.ulmap.feedback_polling.perio", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
+ { &hf_ulmap_feedback_polling_period, { "Period (p)", "wmx.ulmap.feedback_polling.period", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
{ &hf_ulmap_feedback_polling_uiuc, { "UIUC", "wmx.ulmap.feedback_polling.uiuc", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
{ &hf_ulmap_feedback_polling_ofdma_symbol_offset, { "OFDMA Symbol Offset", "wmx.ulmap.feedback_polling.ofdma_symbol_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
{ &hf_ulmap_feedback_polling_subchannel_offset, { "Subchannel offset", "wmx.ulmap.feedback_polling.subchannel_offset", FT_UINT16, BASE_DEC, NULL, 0x00, NULL, HFILL }},
@@ -2854,7 +2855,7 @@ void proto_register_mac_mgmt_msg_ulmap(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_ulmap,
&ett_ulmap_ie,
diff --git a/plugins/epan/wimax/packet-m2m.c b/plugins/epan/wimax/packet-m2m.c
index c536b309f5..d14f3e1996 100644
--- a/plugins/epan/wimax/packet-m2m.c
+++ b/plugins/epan/wimax/packet-m2m.c
@@ -25,14 +25,14 @@
/* forward reference */
void proto_reg_handoff_m2m(void);
void proto_register_m2m(void);
-static void fch_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
-static void cdma_code_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
-static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo, gint burst_number, gint frag_type, gint frag_number);
-static void fast_feedback_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
-static void harq_ack_bursts_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
-static void physical_attributes_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo);
+static void fch_burst_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo);
+static void cdma_code_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo);
+static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo, int burst_number, int frag_type, int frag_number);
+static void fast_feedback_burst_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo);
+static void harq_ack_bursts_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo);
+static void physical_attributes_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo);
static void extended_tlv_decoder(packet_info *pinfo);
-void proto_tree_add_tlv(tlv_info_t *self, tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree, gint hf, guint encoding);
+void proto_tree_add_tlv(tlv_info_t *self, tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree, int hf, unsigned encoding);
/* Global variables */
static dissector_handle_t m2m_handle;
@@ -45,13 +45,13 @@ static dissector_handle_t wimax_phy_attributes_burst_handle;
static reassembly_table pdu_reassembly_table;
-static gint proto_m2m;
+static int proto_m2m;
-static gint ett_m2m;
-static gint ett_m2m_tlv;
-static gint ett_m2m_fch;
-static gint ett_m2m_cdma;
-static gint ett_m2m_ffb;
+static int ett_m2m;
+static int ett_m2m_tlv;
+static int ett_m2m_fch;
+static int ett_m2m_cdma;
+static int ett_m2m_ffb;
/* TLV types (rev:0.2) */
#define TLV_PROTO_VER 1
@@ -118,29 +118,29 @@ static const value_string tlv_crc16_status[] =
{ 0, NULL }
};
-static gint hf_m2m_sequence_number;
-static gint hf_m2m_frame_number;
-static gint hf_m2m_tlv_count;
-
-static gint hf_m2m_type;
-static gint hf_m2m_len;
-static gint hf_m2m_len_size;
-/* static gint hf_m2m_value_bytes; */
-static gint hf_wimax_invalid_tlv;
-static gint hf_m2m_value_protocol_vers_uint8;
-static gint hf_m2m_value_burst_num_uint8;
-static gint hf_m2m_value_frag_type_uint8;
-static gint hf_m2m_value_frag_num_uint8;
-static gint hf_m2m_value_pdu_burst;
-static gint hf_m2m_value_fast_fb;
-static gint hf_m2m_value_fch_burst_uint24;
-static gint hf_m2m_value_cdma_code_uint24;
-static gint hf_m2m_value_crc16_status_uint8;
-static gint hf_m2m_value_burst_power_uint16;
-static gint hf_m2m_value_burst_cinr_uint16;
-static gint hf_m2m_value_preamble_uint16;
-static gint hf_m2m_value_harq_ack_burst_bytes;
-static gint hf_m2m_phy_attributes;
+static int hf_m2m_sequence_number;
+static int hf_m2m_frame_number;
+static int hf_m2m_tlv_count;
+
+static int hf_m2m_type;
+static int hf_m2m_len;
+static int hf_m2m_len_size;
+/* static int hf_m2m_value_bytes; */
+static int hf_wimax_invalid_tlv;
+static int hf_m2m_value_protocol_vers_uint8;
+static int hf_m2m_value_burst_num_uint8;
+static int hf_m2m_value_frag_type_uint8;
+static int hf_m2m_value_frag_num_uint8;
+static int hf_m2m_value_pdu_burst;
+static int hf_m2m_value_fast_fb;
+static int hf_m2m_value_fch_burst_uint24;
+static int hf_m2m_value_cdma_code_uint24;
+static int hf_m2m_value_crc16_status_uint8;
+static int hf_m2m_value_burst_power_uint16;
+static int hf_m2m_value_burst_cinr_uint16;
+static int hf_m2m_value_preamble_uint16;
+static int hf_m2m_value_harq_ack_burst_bytes;
+static int hf_m2m_phy_attributes;
static expert_field ei_m2m_unexpected_length;
@@ -152,16 +152,16 @@ static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
proto_item *m2m_item = NULL;
proto_tree *m2m_tree = NULL;
proto_tree *tlv_tree = NULL;
- gint burst_number = 0;
- gint length, offset = 0;
- gint tlv_count;
- gint tlv_type, tlv_len, tlv_offset, tlv_value;
- gint tlv_frag_type = 0;
- gint tlv_frag_number = 0;
+ int burst_number = 0;
+ int length, offset = 0;
+ int tlv_count;
+ int tlv_type, tlv_len, tlv_offset, tlv_value;
+ int tlv_frag_type = 0;
+ int tlv_frag_number = 0;
tlv_info_t m2m_tlv_info;
- gint hf;
- guint encoding;
- guint frame_number;
+ int hf;
+ unsigned encoding;
+ unsigned frame_number;
int expected_len;
/* display the M2M protocol name */
@@ -221,7 +221,7 @@ static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
{
case TLV_PROTO_VER:
/* get the protocol version */
- tlv_value = tvb_get_guint8( tvb, offset );
+ tlv_value = tvb_get_uint8( tvb, offset );
/* add the description */
proto_item_append_text(ti, ": %d", tlv_value);
hf = hf_m2m_value_protocol_vers_uint8;
@@ -231,7 +231,7 @@ static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
case TLV_BURST_NUM:
/* get the burst number */
- burst_number = tvb_get_guint8( tvb, offset );
+ burst_number = tvb_get_uint8( tvb, offset );
/* add the description */
proto_item_append_text(ti, ": %d", burst_number);
hf = hf_m2m_value_burst_num_uint8;
@@ -241,7 +241,7 @@ static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
case TLV_FRAG_TYPE:
/* add the description */
- tlv_frag_type = tvb_get_guint8( tvb, offset );
+ tlv_frag_type = tvb_get_uint8( tvb, offset );
proto_item_append_text(ti, ": %s", val_to_str_const(tlv_frag_type, tlv_frag_type_name, "Unknown"));
hf = hf_m2m_value_frag_type_uint8;
encoding = ENC_BIG_ENDIAN;
@@ -250,7 +250,7 @@ static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
case TLV_FRAG_NUM:
/* get the fragment number */
- tlv_frag_number = tvb_get_guint8( tvb, offset );
+ tlv_frag_number = tvb_get_uint8( tvb, offset );
/* add the description */
proto_item_append_text(ti, ": %d", tlv_frag_number);
hf = hf_m2m_value_frag_num_uint8;
@@ -308,7 +308,7 @@ static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
case TLV_CRC16_STATUS:
/* add the description */
- tlv_value = tvb_get_guint8( tvb, offset );
+ tlv_value = tvb_get_uint8( tvb, offset );
proto_item_append_text(ti, ": %s", val_to_str_const(tlv_value, tlv_crc16_status, "Unknown"));
hf = hf_m2m_value_crc16_status_uint8;
encoding = ENC_BIG_ENDIAN;
@@ -389,7 +389,7 @@ static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
}
/* Decode and display the FCH burst */
-static void fch_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+static void fch_burst_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo)
{
if(wimax_fch_burst_handle)
{ /* call FCH dissector */
@@ -402,7 +402,7 @@ static void fch_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint
}
/* Decode and display the CDMA Code Attribute */
-static void cdma_code_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+static void cdma_code_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo)
{
if(wimax_cdma_code_burst_handle)
{ /* call CDMA dissector */
@@ -415,7 +415,7 @@ static void cdma_code_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint
}
/* Decode and display the PDU Burst */
-static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo, gint burst_number, gint frag_type, gint frag_number)
+static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo, int burst_number, int frag_type, int frag_number)
{
fragment_head *pdu_frag;
tvbuff_t *pdu_tvb = NULL;
@@ -471,7 +471,7 @@ static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint
}
/* Decode and display the Fast Feedback Burst */
-static void fast_feedback_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+static void fast_feedback_burst_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo)
{
if(wimax_ffb_burst_handle)
{ /* display the TLV Fast Feedback Burst dissector info */
@@ -483,7 +483,7 @@ static void fast_feedback_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint of
}
}
-static void harq_ack_bursts_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+static void harq_ack_bursts_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo)
{
if(wimax_hack_burst_handle)
{ /* call the TLV HARQ ACK Bursts dissector */
@@ -495,7 +495,7 @@ static void harq_ack_bursts_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset
}
}
-static void physical_attributes_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint length, packet_info *pinfo)
+static void physical_attributes_decoder(proto_tree *tree, tvbuff_t *tvb, int offset, int length, packet_info *pinfo)
{
if(wimax_phy_attributes_burst_handle)
{ /* call the TLV PDU Burst Physical Attributes dissector */
@@ -515,10 +515,10 @@ static void extended_tlv_decoder(packet_info *pinfo)
}
/* Display the raw WiMax TLV */
-void proto_tree_add_tlv(tlv_info_t *self, tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree, gint hf, guint encoding)
+void proto_tree_add_tlv(tlv_info_t *self, tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree, int hf, unsigned encoding)
{
- guint tlv_offset;
- gint tlv_type, tlv_len;
+ unsigned tlv_offset;
+ int tlv_type, tlv_len;
/* make sure the TLV information is valid */
if(!self->valid)
@@ -748,7 +748,7 @@ void proto_register_m2m(void)
}
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_m2m,
&ett_m2m_tlv,
diff --git a/plugins/epan/wimax/packet-wmx.c b/plugins/epan/wimax/packet-wmx.c
index b6914b677c..b1f12509e3 100644
--- a/plugins/epan/wimax/packet-wmx.c
+++ b/plugins/epan/wimax/packet-wmx.c
@@ -23,17 +23,21 @@
#include "wimax-int.h"
#include "wimax_tlv.h"
#include "wimax_utils.h"
+#include "wimax_prefs.h"
void proto_register_wimax(void);
void proto_reg_handoff_wimax(void);
-/* Global variables */
-gint proto_wimax;
-gint8 arq_enabled = 0;
-gint scheduling_service_type = 0;
-gint mac_sdu_length = 49; /* default SDU size is 49 bytes (11.13.16) */
-extern guint global_cid_max_basic;
-extern gboolean include_cor2_changes;
+/*
+ * Global variables
+ *
+ * XXX - are these per-packet state? If so, they should be made so,
+ * rather than being global.
+ */
+int proto_wimax;
+int8_t arq_enabled;
+int scheduling_service_type;
+int mac_sdu_length = 49; /* default SDU size is 49 bytes (11.13.16) */
address bs_address = ADDRESS_INIT_NONE;
@@ -44,13 +48,13 @@ static int hf_tlv_length_size;
#define MAX_NUM_TLVS 256
/* Global TLV array to retrieve unique subtree identifiers */
-static gint ett_tlv[MAX_NUM_TLVS];
+static int ett_tlv[MAX_NUM_TLVS];
-static const gchar tlv_val_1byte[] = "TLV value: %s (0x%02x)";
-static const gchar tlv_val_2byte[] = "TLV value: %s (0x%04x)";
-static const gchar tlv_val_3byte[] = "TLV value: %s (0x%06x)";
-static const gchar tlv_val_4byte[] = "TLV value: %s (0x%08x)";
-static const gchar tlv_val_5byte[] = "TLV value: %s (0x%08x...)";
+static const char tlv_val_1byte[] = "TLV value: %s (0x%02x)";
+static const char tlv_val_2byte[] = "TLV value: %s (0x%04x)";
+static const char tlv_val_3byte[] = "TLV value: %s (0x%06x)";
+static const char tlv_val_4byte[] = "TLV value: %s (0x%08x)";
+static const char tlv_val_5byte[] = "TLV value: %s (0x%08x...)";
/*************************************************************/
/* add_tlv_subtree() */
@@ -66,14 +70,14 @@ static const gchar tlv_val_5byte[] = "TLV value: %s (0x%08x...)";
/* return: */
/* pointer to a proto_item */
/*************************************************************/
-proto_item *add_tlv_subtree(tlv_info_t *self, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, const guint encoding)
+proto_item *add_tlv_subtree(tlv_info_t *self, proto_tree *tree, int hfindex, tvbuff_t *tvb, int start, const unsigned encoding)
{
header_field_info *hf;
proto_tree *tlv_tree;
proto_item *tlv_item;
- gint tlv_value_length, tlv_val_offset;
- guint8 size_of_tlv_length_field;
- guint8 tlv_type;
+ int tlv_value_length, tlv_val_offset;
+ uint8_t size_of_tlv_length_field;
+ uint8_t tlv_type;
/* Make sure we're dealing with a valid TLV here */
if (get_tlv_type(self) < 0)
@@ -120,13 +124,13 @@ proto_item *add_tlv_subtree(tlv_info_t *self, proto_tree *tree, int hfindex, tvb
/* return: */
/* pointer to a proto_tree (to then add value) */
/*************************************************************/
-proto_tree *add_tlv_subtree_no_item(tlv_info_t *self, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start)
+proto_tree *add_tlv_subtree_no_item(tlv_info_t *self, proto_tree *tree, int hfindex, tvbuff_t *tvb, int start)
{
header_field_info *hf;
proto_tree *tlv_tree;
- gint tlv_value_length, tlv_val_offset;
- guint8 size_of_tlv_length_field;
- guint8 tlv_type;
+ int tlv_value_length, tlv_val_offset;
+ uint8_t size_of_tlv_length_field;
+ uint8_t tlv_type;
/* Make sure we're dealing with a valid TLV here */
if (get_tlv_type(self) < 0)
@@ -173,16 +177,16 @@ proto_tree *add_tlv_subtree_no_item(tlv_info_t *self, proto_tree *tree, int hfin
/* return: */
/* pointer to a proto_tree */
/*************************************************************/
-proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length _U_, const char *label)
+proto_tree *add_protocol_subtree(tlv_info_t *self, int idx, proto_tree *tree, int hfindex, tvbuff_t *tvb, int start, int length _U_, const char *label)
{
/* Declare local variables */
proto_tree *tlv_tree;
proto_item *tlv_item;
- gint tlv_value_length, tlv_val_offset;
- guint8 size_of_tlv_length_field;
- guint8 tlv_type;
- guint32 tlv_value;
- const gchar *hex_fmt;
+ int tlv_value_length, tlv_val_offset;
+ uint8_t size_of_tlv_length_field;
+ uint8_t tlv_type;
+ uint32_t tlv_value;
+ const char *hex_fmt;
/* Make sure we're dealing with a valid TLV here */
if (get_tlv_type(self) < 0)
@@ -214,7 +218,7 @@ proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, i
switch (tlv_value_length)
{
case 1:
- tlv_value = tvb_get_guint8(tvb, start+tlv_val_offset);
+ tlv_value = tvb_get_uint8(tvb, start+tlv_val_offset);
hex_fmt = tlv_val_1byte;
break;
case 2:
@@ -254,14 +258,14 @@ static int dissect_wimax(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree
return tvb_captured_length(tvb);
}
-gboolean is_down_link(packet_info *pinfo)
+bool is_down_link(packet_info *pinfo)
{
if (pinfo->p2p_dir == P2P_DIR_RECV)
- return TRUE;
+ return true;
if (pinfo->p2p_dir == P2P_DIR_UNKNOWN)
if(bs_address.len && !cmp_address(&bs_address, &pinfo->src))
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
@@ -277,7 +281,7 @@ void proto_register_wimax(void)
{ &hf_tlv_length_size, { "Size of TLV length field", "wmx.tlv_length_size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
};
- gint *ett_reg[MAX_NUM_TLVS];
+ int *ett_reg[MAX_NUM_TLVS];
/* Register the WiMax protocols here */
proto_wimax = proto_register_protocol (
@@ -312,9 +316,9 @@ void proto_register_wimax(void)
prefs_register_bool_preference(wimax_module, "corrigendum_2_version",
"Corrigendum 2 Version",
- "Set to TRUE to use the Corrigendum"
+ "Set to true to use the Corrigendum"
" 2 version of Wimax message decoding."
- " Set to FALSE to use the 802.16e-2005"
+ " Set to false to use the 802.16e-2005"
" version.",
&include_cor2_changes);
prefs_register_obsolete_preference(wimax_module, "wimax.basic_cid_max");
diff --git a/plugins/epan/wimax/wimax_bits.h b/plugins/epan/wimax/wimax_bits.h
index f844d54990..5f1c34adcf 100644
--- a/plugins/epan/wimax/wimax_bits.h
+++ b/plugins/epan/wimax/wimax_bits.h
@@ -39,14 +39,14 @@
/* extract the nibble at the given nibble address 'n' of tvbuff_t 't' */
#define TVB_NIB_NIBBLE(n,t) \
(((n) & 1) \
- ? tvb_get_guint8((t), (n)/2) & NIBBLE_MASK \
- : (tvb_get_guint8((t), (n)/2) >> 4) & NIBBLE_MASK)
+ ? tvb_get_uint8((t), (n)/2) & NIBBLE_MASK \
+ : (tvb_get_uint8((t), (n)/2) >> 4) & NIBBLE_MASK)
/* extract the byte at the given nibble address 'n' of tvbuff_t 't' */
#define TVB_NIB_BYTE(n,t) \
(n) & 1 \
? (tvb_get_ntohs((t), (n)/2) >> 4) & BYTE_MASK \
- : tvb_get_guint8((t), (n)/2)
+ : tvb_get_uint8((t), (n)/2)
/* extract 12 bits at the given nibble address */
#define TVB_NIB_BITS12(n,t) \
@@ -55,13 +55,13 @@
/* extract the word at the given nibble address 'n' of tvbuff_t 't' */
#define TVB_NIB_WORD(n,t) \
(n) & 1 \
- ? (gint)((tvb_get_ntohl((t), (n)/2) >> 12) & 0x0000FFFF) \
+ ? (int)((tvb_get_ntohl((t), (n)/2) >> 12) & 0x0000FFFF) \
: tvb_get_ntohs((t), (n)/2)
/* extract the word at the given nibble address 'n' of tvbuff_t 't' */
#define TVB_NIB_LONG(n,t) \
(n) & 1 \
- ? (tvb_get_ntohl((t), (n)/2) << 4) | ((tvb_get_guint8((t), (n)/2 + 4) >> 4) & NIBBLE_MASK) \
+ ? (tvb_get_ntohl((t), (n)/2) << 4) | ((tvb_get_uint8((t), (n)/2 + 4) >> 4) & NIBBLE_MASK) \
: tvb_get_ntohl((t), (n)/2)
/* Only currently used with nib == 1 or 2 */
@@ -122,7 +122,7 @@
* tvb ... tvbuff_t
*/
#define TVB_BIT_BIT(bit, tvb) \
- (( tvb_get_guint8(tvb, ADDR(bit)) >> SHIFT(bit,1) ) & 0x1)
+ (( tvb_get_uint8(tvb, ADDR(bit)) >> SHIFT(bit,1) ) & 0x1)
/* extract bitfield up to 9 bits
* bit ... bit address
@@ -155,11 +155,11 @@
| TVB_BIT_BITS64b(bit,tvb,num) )
#define TVB_BIT_BITS(bit, tvb, num) \
- ((num) == 1 ? (gint)TVB_BIT_BIT(bit,tvb) : \
- ((num) <= 9 ? (gint)TVB_BIT_BITS16(bit,tvb,num) : \
- ((num) <= 24 ? (gint)TVB_BIT_BITS32(bit,tvb,num) : \
- ((num) <= 32 ? (gint)TVB_BIT_BITS64(bit,tvb,num) : \
- (gint)0 ))))
+ ((num) == 1 ? (int)TVB_BIT_BIT(bit,tvb) : \
+ ((num) <= 9 ? (int)TVB_BIT_BITS16(bit,tvb,num) : \
+ ((num) <= 24 ? (int)TVB_BIT_BITS32(bit,tvb,num) : \
+ ((num) <= 32 ? (int)TVB_BIT_BITS64(bit,tvb,num) : \
+ (int)0 ))))
/* to highlight bitfields correctly in wireshark
* AddItem(..., WSADDR(buf,bit), WSLEN(bit), ...) */
diff --git a/plugins/epan/wimax/wimax_cdma_code_decoder.c b/plugins/epan/wimax/wimax_cdma_code_decoder.c
index d926078f3b..45bae8d90b 100644
--- a/plugins/epan/wimax/wimax_cdma_code_decoder.c
+++ b/plugins/epan/wimax/wimax_cdma_code_decoder.c
@@ -20,7 +20,7 @@
#include "wimax-int.h"
static int proto_wimax_cdma_code_decoder;
-static gint ett_wimax_cdma_code_decoder;
+static int ett_wimax_cdma_code_decoder;
static int hf_wimax_ranging_code;
static int hf_wimax_ranging_symbol_offset;
@@ -28,7 +28,7 @@ static int hf_wimax_ranging_subchannel_offset;
static int dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- gint offset = 0;
+ int offset = 0;
proto_item *cdma_item;
proto_tree *cdma_tree;
@@ -83,7 +83,7 @@ void wimax_proto_register_wimax_cdma(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_cdma_code_decoder,
};
diff --git a/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c
index 2f4efafa90..786b769752 100644
--- a/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c
+++ b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c
@@ -17,10 +17,11 @@
#include "config.h"
#include <epan/packet.h>
-#include "wimax-int.h"
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "wimax_compact_dlmap_ie_decoder.h"
-extern gint proto_wimax;
+extern int proto_wimax;
/* MASKs */
#define MSB_NIBBLE_MASK 0xF0
@@ -32,33 +33,33 @@ extern gint proto_wimax;
#define CID_TYPE_RCID3 3
/* Global Variables */
-guint cid_type = 0;
-guint band_amc_subchannel_type = 0;
-guint max_logical_bands = 12;
-guint num_of_broadcast_symbols = 0;
-guint num_of_dl_band_amc_symbols = 0;
-guint num_of_ul_band_amc_symbols = 0;
+unsigned cid_type;
+unsigned band_amc_subchannel_type;
+unsigned max_logical_bands = 12;
+unsigned num_of_broadcast_symbols;
+unsigned num_of_dl_band_amc_symbols;
+unsigned num_of_ul_band_amc_symbols;
/* from switch HARQ mode extension IE */
-guint harq_mode = 0;
+unsigned harq_mode;
/* forward reference */
-static guint wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-static guint wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-static guint wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-static guint wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-guint wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+static unsigned wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+static unsigned wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+static unsigned wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+static unsigned wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+static unsigned wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+unsigned wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
-static gint proto_wimax_compact_dlmap_ie_decoder;
+static int proto_wimax_compact_dlmap_ie_decoder;
#if 0 /* not used ?? */
-static gint ett_wimax_compact_dlmap_ie_decoder;
-static gint ett_wimax_format_configuration_ie_decoder;
-static gint ett_wimax_rcid_ie_decoder;
-static gint ett_wimax_harq_control_ie_decoder;
-static gint ett_wimax_extended_diuc_dependent_ie_decoder;
-static gint ett_wimax_cqich_control_ie_decoder;
-static gint ett_wimax_extension_type_ie_decoder;
+static int ett_wimax_compact_dlmap_ie_decoder;
+static int ett_wimax_format_configuration_ie_decoder;
+static int ett_wimax_rcid_ie_decoder;
+static int ett_wimax_harq_control_ie_decoder;
+static int ett_wimax_extended_diuc_dependent_ie_decoder;
+static int ett_wimax_cqich_control_ie_decoder;
+static int ett_wimax_extension_type_ie_decoder;
#endif
/* New Format Indications */
@@ -142,79 +143,79 @@ static const value_string vals_allocation_modes[] =
#define SHORTENED_DIUC_MASK_1 0x0E00
#define COMPANDED_SC_MASK_1 0x01F0
-/* display indexies */
-static gint hf_cdlmap_dl_map_type;
-static gint hf_cdlmap_ul_map_append;
-static gint hf_cdlmap_reserved;
-static gint hf_cdlmap_nep_code;
-static gint hf_cdlmap_nsch_code;
-static gint hf_cdlmap_num_bands;
-static gint hf_cdlmap_band_index;
-static gint hf_cdlmap_nb_bitmap;
-static gint hf_cdlmap_dl_map_type_1;
-static gint hf_cdlmap_ul_map_append_1;
-static gint hf_cdlmap_reserved_1;
-static gint hf_cdlmap_nep_code_1;
-static gint hf_cdlmap_nsch_code_1;
-static gint hf_cdlmap_num_bands_1;
-/*static gint hf_cdlmap_band_index_1;*/
-static gint hf_cdlmap_nb_bitmap_1;
-
-static gint hf_cdlmap_shortened_diuc;
-static gint hf_cdlmap_companded_sc;
-static gint hf_cdlmap_shortened_uiuc;
-static gint hf_cdlmap_shortened_diuc_1;
-static gint hf_cdlmap_companded_sc_1;
-static gint hf_cdlmap_shortened_uiuc_1;
-
-static gint hf_cdlmap_bin_offset;
-static gint hf_cdlmap_bin_offset_1;
-
-static gint hf_cdlmap_diuc_num_of_subchannels;
-static gint hf_cdlmap_diuc_num_of_subchannels_1;
-static gint hf_cdlmap_diuc_repetition_coding_indication;
-static gint hf_cdlmap_diuc_repetition_coding_indication_1;
-static gint hf_cdlmap_diuc_reserved;
-static gint hf_cdlmap_diuc_reserved_1;
-
-static gint hf_cdlmap_bit_map_length;
-static gint hf_cdlmap_bit_map_length_1;
-static gint hf_cdlmap_bit_map;
-
-static gint hf_cdlmap_diuc;
-static gint hf_cdlmap_diuc_1;
-
-static gint hf_cdlmap_allocation_mode;
-static gint hf_cdlmap_allocation_mode_rsvd;
-static gint hf_cdlmap_num_subchannels;
-static gint hf_cdlmap_allocation_mode_1;
-static gint hf_cdlmap_allocation_mode_rsvd_1;
-static gint hf_cdlmap_num_subchannels_1;
-
-/* static gint hf_cdlmap_reserved_type; */
-static gint hf_cdlmap_reserved_type_1;
+/* display indices */
+static int hf_cdlmap_dl_map_type;
+static int hf_cdlmap_ul_map_append;
+static int hf_cdlmap_reserved;
+static int hf_cdlmap_nep_code;
+static int hf_cdlmap_nsch_code;
+static int hf_cdlmap_num_bands;
+static int hf_cdlmap_band_index;
+static int hf_cdlmap_nb_bitmap;
+static int hf_cdlmap_dl_map_type_1;
+static int hf_cdlmap_ul_map_append_1;
+static int hf_cdlmap_reserved_1;
+static int hf_cdlmap_nep_code_1;
+static int hf_cdlmap_nsch_code_1;
+static int hf_cdlmap_num_bands_1;
+/*static int hf_cdlmap_band_index_1;*/
+static int hf_cdlmap_nb_bitmap_1;
+
+static int hf_cdlmap_shortened_diuc;
+static int hf_cdlmap_companded_sc;
+static int hf_cdlmap_shortened_uiuc;
+static int hf_cdlmap_shortened_diuc_1;
+static int hf_cdlmap_companded_sc_1;
+static int hf_cdlmap_shortened_uiuc_1;
+
+static int hf_cdlmap_bin_offset;
+static int hf_cdlmap_bin_offset_1;
+
+static int hf_cdlmap_diuc_num_of_subchannels;
+static int hf_cdlmap_diuc_num_of_subchannels_1;
+static int hf_cdlmap_diuc_repetition_coding_indication;
+static int hf_cdlmap_diuc_repetition_coding_indication_1;
+static int hf_cdlmap_diuc_reserved;
+static int hf_cdlmap_diuc_reserved_1;
+
+static int hf_cdlmap_bit_map_length;
+static int hf_cdlmap_bit_map_length_1;
+static int hf_cdlmap_bit_map;
+
+static int hf_cdlmap_diuc;
+static int hf_cdlmap_diuc_1;
+
+static int hf_cdlmap_allocation_mode;
+static int hf_cdlmap_allocation_mode_rsvd;
+static int hf_cdlmap_num_subchannels;
+static int hf_cdlmap_allocation_mode_1;
+static int hf_cdlmap_allocation_mode_rsvd_1;
+static int hf_cdlmap_num_subchannels_1;
+
+/* static int hf_cdlmap_reserved_type; */
+static int hf_cdlmap_reserved_type_1;
/* display indexies */
-static gint hf_format_config_ie_dl_map_type;
-static gint hf_format_config_ie_dl_map_type_1;
-static gint hf_format_config_ie_dl_map_type_32;
-static gint hf_format_config_ie_new_format_indication;
-static gint hf_format_config_ie_new_format_indication_1;
-static gint hf_format_config_ie_new_format_indication_32;
-static gint hf_format_config_ie_cid_type;
-static gint hf_format_config_ie_cid_type_1;
-static gint hf_format_config_ie_safety_pattern;
-static gint hf_format_config_ie_safety_pattern_1;
-static gint hf_format_config_ie_subchannel_type;
-static gint hf_format_config_ie_subchannel_type_1;
-static gint hf_format_config_ie_max_logical_bands;
-static gint hf_format_config_ie_max_logical_bands_1;
-static gint hf_format_config_ie_num_of_broadcast_symbol;
-static gint hf_format_config_ie_num_of_broadcast_symbol_1;
-static gint hf_format_config_ie_num_of_dl_band_amc_symbol;
-static gint hf_format_config_ie_num_of_dl_band_amc_symbol_1;
-static gint hf_format_config_ie_num_of_ul_band_amc_symbol;
-static gint hf_format_config_ie_num_of_ul_band_amc_symbol_1;
+static int hf_format_config_ie_dl_map_type;
+static int hf_format_config_ie_dl_map_type_1;
+static int hf_format_config_ie_dl_map_type_32;
+static int hf_format_config_ie_new_format_indication;
+static int hf_format_config_ie_new_format_indication_1;
+static int hf_format_config_ie_new_format_indication_32;
+static int hf_format_config_ie_cid_type;
+static int hf_format_config_ie_cid_type_1;
+static int hf_format_config_ie_safety_pattern;
+static int hf_format_config_ie_safety_pattern_1;
+static int hf_format_config_ie_subchannel_type;
+static int hf_format_config_ie_subchannel_type_1;
+static int hf_format_config_ie_max_logical_bands;
+static int hf_format_config_ie_max_logical_bands_1;
+static int hf_format_config_ie_num_of_broadcast_symbol;
+static int hf_format_config_ie_num_of_broadcast_symbol_1;
+static int hf_format_config_ie_num_of_dl_band_amc_symbol;
+static int hf_format_config_ie_num_of_dl_band_amc_symbol_1;
+static int hf_format_config_ie_num_of_ul_band_amc_symbol;
+static int hf_format_config_ie_num_of_ul_band_amc_symbol_1;
/* Format Configuration IE Masks */
#define FORMAT_CONFIG_IE_DL_MAP_TYPE_MASK 0xE0000000
@@ -235,18 +236,18 @@ static gint hf_format_config_ie_num_of_ul_band_amc_symbol_1;
#define NUM_UL_AMC_SYMBOLS_MASK 0x000003F0
/* display indexies */
-static gint hf_harq_rcid_ie_prefix;
-static gint hf_harq_rcid_ie_prefix_1;
-static gint hf_harq_rcid_ie_normal_cid;
-static gint hf_harq_rcid_ie_normal_cid_1;
-static gint hf_harq_rcid_ie_cid3;
-static gint hf_harq_rcid_ie_cid3_1;
-static gint hf_harq_rcid_ie_cid7;
-static gint hf_harq_rcid_ie_cid7_1;
-static gint hf_harq_rcid_ie_cid11;
-static gint hf_harq_rcid_ie_cid11_1;
-static gint hf_harq_rcid_ie_cid11_2;
-static gint hf_harq_rcid_ie_cid11_3;
+static int hf_harq_rcid_ie_prefix;
+static int hf_harq_rcid_ie_prefix_1;
+static int hf_harq_rcid_ie_normal_cid;
+static int hf_harq_rcid_ie_normal_cid_1;
+static int hf_harq_rcid_ie_cid3;
+static int hf_harq_rcid_ie_cid3_1;
+static int hf_harq_rcid_ie_cid7;
+static int hf_harq_rcid_ie_cid7_1;
+static int hf_harq_rcid_ie_cid11;
+static int hf_harq_rcid_ie_cid11_1;
+static int hf_harq_rcid_ie_cid11_2;
+static int hf_harq_rcid_ie_cid11_3;
/* Masks */
#define WIMAX_RCID_IE_NORMAL_CID_MASK_1 0x0FFFF0
@@ -260,16 +261,16 @@ static gint hf_harq_rcid_ie_cid11_3;
#define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
/* HARQ MAP HARQ Control IE display indexies */
-static gint hf_harq_control_ie_prefix;
-static gint hf_harq_control_ie_ai_sn;
-static gint hf_harq_control_ie_spid;
-static gint hf_harq_control_ie_acid;
-static gint hf_harq_control_ie_reserved;
-static gint hf_harq_control_ie_prefix_1;
-static gint hf_harq_control_ie_ai_sn_1;
-static gint hf_harq_control_ie_spid_1;
-static gint hf_harq_control_ie_acid_1;
-static gint hf_harq_control_ie_reserved_1;
+static int hf_harq_control_ie_prefix;
+static int hf_harq_control_ie_ai_sn;
+static int hf_harq_control_ie_spid;
+static int hf_harq_control_ie_acid;
+static int hf_harq_control_ie_reserved;
+static int hf_harq_control_ie_prefix_1;
+static int hf_harq_control_ie_ai_sn_1;
+static int hf_harq_control_ie_spid_1;
+static int hf_harq_control_ie_acid_1;
+static int hf_harq_control_ie_reserved_1;
/* Masks */
#define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK 0x80
@@ -284,18 +285,18 @@ static gint hf_harq_control_ie_reserved_1;
#define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1 0x0700
/* HARQ MAP CQICH Control IE display indexies */
-static gint hf_cqich_control_ie_indicator;
-static gint hf_cqich_control_ie_alloc_id;
-static gint hf_cqich_control_ie_period;
-static gint hf_cqich_control_ie_frame_offset;
-static gint hf_cqich_control_ie_duration;
-static gint hf_cqich_control_ie_cqi_rep_threshold;
-static gint hf_cqich_control_ie_indicator_1;
-static gint hf_cqich_control_ie_alloc_id_1;
-static gint hf_cqich_control_ie_period_1;
-static gint hf_cqich_control_ie_frame_offset_1;
-static gint hf_cqich_control_ie_duration_1;
-static gint hf_cqich_control_ie_cqi_rep_threshold_1;
+static int hf_cqich_control_ie_indicator;
+static int hf_cqich_control_ie_alloc_id;
+static int hf_cqich_control_ie_period;
+static int hf_cqich_control_ie_frame_offset;
+static int hf_cqich_control_ie_duration;
+static int hf_cqich_control_ie_cqi_rep_threshold;
+static int hf_cqich_control_ie_indicator_1;
+static int hf_cqich_control_ie_alloc_id_1;
+static int hf_cqich_control_ie_period_1;
+static int hf_cqich_control_ie_frame_offset_1;
+static int hf_cqich_control_ie_duration_1;
+static int hf_cqich_control_ie_cqi_rep_threshold_1;
/* Masks */
#define WIMAX_CQICH_CONTROL_IE_INDICATOR_MASK 0x8000
@@ -319,37 +320,37 @@ static gint hf_cqich_control_ie_cqi_rep_threshold_1;
#define EXTENSION_LENGTH_MASK 0x00F0
#define EXTENSION_LENGTH_MASK_1 0x000F
-static gint hf_cdlmap_extension_type;
-static gint hf_cdlmap_extension_subtype;
-static gint hf_cdlmap_extension_length;
-static gint hf_cdlmap_extension_type_1;
-static gint hf_cdlmap_extension_subtype_1;
-static gint hf_cdlmap_extension_length_1;
+static int hf_cdlmap_extension_type;
+static int hf_cdlmap_extension_subtype;
+static int hf_cdlmap_extension_length;
+static int hf_cdlmap_extension_type_1;
+static int hf_cdlmap_extension_subtype_1;
+static int hf_cdlmap_extension_length_1;
-static gint hf_cdlmap_extension_time_diversity_mbs;
-static gint hf_cdlmap_extension_harq_mode;
-static gint hf_cdlmap_extension_unknown_sub_type;
-static gint hf_cdlmap_extension_time_diversity_mbs_1;
-static gint hf_cdlmap_extension_harq_mode_1;
-static gint hf_cdlmap_extension_unknown_sub_type_1;
+static int hf_cdlmap_extension_time_diversity_mbs;
+static int hf_cdlmap_extension_harq_mode;
+static int hf_cdlmap_extension_unknown_sub_type;
+static int hf_cdlmap_extension_time_diversity_mbs_1;
+static int hf_cdlmap_extension_harq_mode_1;
+static int hf_cdlmap_extension_unknown_sub_type_1;
/* Extended DIUC dependent IE display indexies */
-static gint hf_extended_diuc_dependent_ie_diuc;
-static gint hf_extended_diuc_dependent_ie_diuc_1;
-static gint hf_extended_diuc_dependent_ie_length;
-static gint hf_extended_diuc_dependent_ie_length_1;
-static gint hf_extended_diuc_dependent_ie_channel_measurement;
-static gint hf_extended_diuc_dependent_ie_stc_zone;
-static gint hf_extended_diuc_dependent_ie_aas_dl;
-static gint hf_extended_diuc_dependent_ie_data_location;
-static gint hf_extended_diuc_dependent_ie_cid_switch;
-static gint hf_extended_diuc_dependent_ie_mimo_dl_basic;
-static gint hf_extended_diuc_dependent_ie_mimo_dl_enhanced;
-static gint hf_extended_diuc_dependent_ie_harq_map_pointer;
-static gint hf_extended_diuc_dependent_ie_phymod_dl;
-static gint hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation;
-static gint hf_extended_diuc_dependent_ie_ul_interference_and_noise_level;
-static gint hf_extended_diuc_dependent_ie_unknown_diuc;
+static int hf_extended_diuc_dependent_ie_diuc;
+static int hf_extended_diuc_dependent_ie_diuc_1;
+static int hf_extended_diuc_dependent_ie_length;
+static int hf_extended_diuc_dependent_ie_length_1;
+static int hf_extended_diuc_dependent_ie_channel_measurement;
+static int hf_extended_diuc_dependent_ie_stc_zone;
+static int hf_extended_diuc_dependent_ie_aas_dl;
+static int hf_extended_diuc_dependent_ie_data_location;
+static int hf_extended_diuc_dependent_ie_cid_switch;
+static int hf_extended_diuc_dependent_ie_mimo_dl_basic;
+static int hf_extended_diuc_dependent_ie_mimo_dl_enhanced;
+static int hf_extended_diuc_dependent_ie_harq_map_pointer;
+static int hf_extended_diuc_dependent_ie_phymod_dl;
+static int hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation;
+static int hf_extended_diuc_dependent_ie_ul_interference_and_noise_level;
+static int hf_extended_diuc_dependent_ie_unknown_diuc;
/* Compact DL-MAP IE Types (table 89) */
@@ -363,12 +364,12 @@ static gint hf_extended_diuc_dependent_ie_unknown_diuc;
#define COMPACT_DL_MAP_TYPE_EXTENSION 7
/* Compact DL-MAP IE decoder */
-guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset)
+unsigned wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint diuc, byte, length = 0;
- guint dl_map_type, ul_map_append;
- guint dl_map_offset, nibble_length, bit_map_length;
- guint nband, band_count, i, allocation_mode;
+ unsigned diuc, byte, length = 0;
+ unsigned dl_map_type, ul_map_append;
+ unsigned dl_map_offset, nibble_length, bit_map_length;
+ unsigned nband, band_count, i, allocation_mode;
#ifdef DEBUG
/* update the info column */
@@ -377,7 +378,7 @@ guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/* set the local offset */
dl_map_offset = offset;
/* Get the first byte */
- byte = tvb_get_guint8(tvb, dl_map_offset);
+ byte = tvb_get_uint8(tvb, dl_map_offset);
if(nibble_offset & 1)
{
dl_map_type = ((byte & DL_MAP_TYPE_MASK_1) >> 1);
@@ -560,7 +561,7 @@ guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/* get the Nband */
if(max_logical_bands)
{ /* get and display the Nband */
- nband = tvb_get_guint8(tvb, dl_map_offset);
+ nband = tvb_get_uint8(tvb, dl_map_offset);
if(nibble_offset & 1)
{
nband = (nband & LSB_NIBBLE_MASK);
@@ -630,7 +631,7 @@ guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
length++;
}
/* Get the Allocation Mode */
- byte = tvb_get_guint8(tvb, dl_map_offset);
+ byte = tvb_get_uint8(tvb, dl_map_offset);
if(nibble_offset & 1)
{
allocation_mode = ((byte & 0x0C) >> 2);
@@ -829,7 +830,7 @@ guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/* move to next byte */
dl_map_offset++;
/* get the new byte */
- byte = tvb_get_guint8(tvb, dl_map_offset);
+ byte = tvb_get_uint8(tvb, dl_map_offset);
/* get the DIUC */
diuc = ((byte & MSB_NIBBLE_MASK) >> 4);
/* display the DIUC */
@@ -842,7 +843,7 @@ guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/* display the reserved */
proto_tree_add_item(tree, hf_cdlmap_reserved, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
/* get the DIUC */
- diuc = (tvb_get_guint8(tvb, dl_map_offset) & LSB_NIBBLE_MASK);
+ diuc = (tvb_get_uint8(tvb, dl_map_offset) & LSB_NIBBLE_MASK);
/* display the DIUC */
proto_tree_add_item(tree, hf_cdlmap_diuc_1, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
/* move to next byte */
@@ -905,7 +906,7 @@ guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/* move to next byte */
dl_map_offset++;
/* get the bit map length */
- byte = tvb_get_guint8(tvb, dl_map_offset);
+ byte = tvb_get_uint8(tvb, dl_map_offset);
bit_map_length = ((byte & MSB_NIBBLE_MASK) >> 4);
/* display BITMAP Length */
proto_tree_add_item(tree, hf_cdlmap_bit_map_length, tvb, dl_map_offset, 1, ENC_BIG_ENDIAN);
@@ -932,7 +933,7 @@ guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
}
break;
case COMPACT_DL_MAP_TYPE_EXTENSION:/* 6.3.2.3.43.6.6 */
- /* decode the Compact DL-MAP externsion IE */
+ /* decode the Compact DL-MAP extension IE */
nibble_length = wimax_cdlmap_extension_ie_decoder(tree, pinfo, tvb, dl_map_offset, nibble_offset);/*, cqich_indicator);*/
length = nibble_length;
break;
@@ -963,12 +964,12 @@ guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/*#define NUM_UL_AMC_SYMBOLS_SHIFT_1 0*/
/* Compact DL-MAP Format Configuration IE (6.3.2.3.43.2) decoder */
-static guint wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+static unsigned wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint length = 0;
- guint dl_map_type, new_format_ind;
- guint dl_map_offset;
- guint32 tvb_value;
+ unsigned length = 0;
+ unsigned dl_map_type, new_format_ind;
+ unsigned dl_map_offset;
+ uint32_t tvb_value;
#ifdef DEBUG
/* update the info column */
@@ -977,7 +978,7 @@ static guint wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tre
/* set the local offset */
dl_map_offset = offset;
/* Get the first byte */
- tvb_value = tvb_get_guint8(tvb, dl_map_offset);
+ tvb_value = tvb_get_uint8(tvb, dl_map_offset);
if(nibble_offset & 1)
{ /* get the DL-MAP type */
dl_map_type = ((tvb_value & DL_MAP_TYPE_MASK_1) >> 1);
@@ -1083,10 +1084,10 @@ static guint wimax_compact_dlmap_format_configuration_ie_decoder(proto_tree *tre
}
/* Compact DL-MAP Reduced CID IE (6.3.2.3.43.3) decoder */
-static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+static unsigned wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint length = 0;
- guint prefix;
+ unsigned length = 0;
+ unsigned prefix;
#ifdef DEBUG
/* update the info column */
@@ -1101,7 +1102,7 @@ static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *
}
else
{ /* Get the prefix bit */
- prefix = (tvb_get_guint8(tvb, offset) & 0x08);
+ prefix = (tvb_get_uint8(tvb, offset) & 0x08);
/* display the prefix */
proto_tree_add_item(tree, hf_harq_rcid_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
if(prefix)
@@ -1138,7 +1139,7 @@ static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *
}
else
{ /* Get the prefix bit */
- prefix = (tvb_get_guint8(tvb, offset) & 0x08);
+ prefix = (tvb_get_uint8(tvb, offset) & 0x08);
/* display the prefix */
proto_tree_add_item(tree, hf_harq_rcid_ie_prefix, tvb, offset, 2, ENC_BIG_ENDIAN);
if(prefix || (cid_type == CID_TYPE_RCID11))
@@ -1171,16 +1172,16 @@ static guint wimax_compact_dlmap_rcid_ie_decoder(proto_tree *tree, packet_info *
}
/* Compact DL-MAP HARQ Control IE (6.3.2.3.43.4) decoder */
-static guint wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+static unsigned wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint byte, prefix, length = 0;
+ unsigned byte, prefix, length = 0;
#ifdef DEBUG
/* update the info column */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "HARQ Control IE");
#endif
/* Get the first byte */
- byte = tvb_get_guint8(tvb, offset);
+ byte = tvb_get_uint8(tvb, offset);
if(nibble_offset & 1)
{ /* Get the prefix bit */
prefix = (byte & 0x08);
@@ -1226,16 +1227,16 @@ static guint wimax_compact_dlmap_harq_control_ie_decoder(proto_tree *tree, packe
}
/* Compact DL-MAP CQICH Control IE (6.3.2.3.43.5) decoder */
-static guint wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+static unsigned wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint byte, cqich_indicator, length = 0;
+ unsigned byte, cqich_indicator, length = 0;
#ifdef DEBUG
/* update the info column */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "CQICH Control IE");
#endif
/* Get the first byte */
- byte = tvb_get_guint8(tvb, offset);
+ byte = tvb_get_uint8(tvb, offset);
if(nibble_offset & 1)
{ /* Get the CQICH indicator */
cqich_indicator = (byte & 0x08);
@@ -1293,9 +1294,9 @@ static guint wimax_compact_dlmap_cqich_control_ie_decoder(proto_tree *tree, pack
#define HARQ_MODE_SWITCH 1
/* Compact DL-MAP Extension IE (6.3.2.3.43.6.6) decoder */
-static guint wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+static unsigned wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint tvb_value, dl_map_type, sub_type, length;
+ unsigned tvb_value, dl_map_type, sub_type, length;
#ifdef DEBUG
/* update the info column */
@@ -1329,7 +1330,7 @@ static guint wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pi
/* display the HARQ mode */
proto_tree_add_item(tree, hf_cdlmap_extension_harq_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Get the next byte */
- tvb_value = tvb_get_guint8(tvb, offset);
+ tvb_value = tvb_get_uint8(tvb, offset);
/* get the HARQ mode */
harq_mode = ((tvb_value & MSB_NIBBLE_MASK) >> 4);
break;
@@ -1390,13 +1391,13 @@ static guint wimax_cdlmap_extension_ie_decoder(proto_tree *tree, packet_info *pi
#define UL_INTERFERENCE_AND_NOISE_LEVEL_IE 15
/* Extended DIUC IE (8.4.5.3.2) */
-guint wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+unsigned wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint ext_diuc, length;
- guint8 byte;
+ unsigned ext_diuc, length;
+ uint8_t byte;
/* get the first byte */
- byte = tvb_get_guint8(tvb, offset);
+ byte = tvb_get_uint8(tvb, offset);
if(nibble_offset & 1)
{ /* get the extended DIUC */
ext_diuc = (byte & LSB_NIBBLE_MASK);
@@ -1405,7 +1406,7 @@ guint wimax_extended_diuc_dependent_ie_decoder(proto_tree *tree, packet_info *pi
/* move to next byte */
offset++;
/* get the 2nd byte */
- byte = tvb_get_guint8(tvb, offset);
+ byte = tvb_get_uint8(tvb, offset);
/* get the length */
length = ((byte & MSB_NIBBLE_MASK) >> 4);
/* display extended DIUC length */
@@ -2073,7 +2074,7 @@ void wimax_proto_register_wimax_compact_dlmap_ie(void)
#if 0 /* Not used ?? */
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_compact_dlmap_ie_decoder,
&ett_wimax_format_configuration_ie_decoder,
diff --git a/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h
index f91c8d2323..40d2247926 100644
--- a/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h
+++ b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h
@@ -15,6 +15,6 @@
#ifndef _WIMAX_COMPACT_DLMAP_IE_DECODER_H_
#define _WIMAX_COMPACT_DLMAP_IE_DECODER_H_
-extern guint wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+extern unsigned wimax_compact_dlmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
#endif /* _WIMAX_COMPACT_DLMAP_IE_DECODER_H_ */
diff --git a/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c
index 0968a3be51..899f607820 100644
--- a/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c
+++ b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c
@@ -17,7 +17,8 @@
#include "config.h"
#include <epan/packet.h>
-#include "wimax-int.h"
+#include <epan/tfs.h>
+#include <wsutil/array.h>
#include "wimax_compact_ulmap_ie_decoder.h"
/* MASKs */
@@ -30,30 +31,30 @@
#define CID_TYPE_RCID3 3
/* Global Variables */
-extern guint cid_type;
-extern guint band_amc_subchannel_type;
-extern guint max_logical_bands;
-extern guint num_of_broadcast_symbols;
-extern guint num_of_dl_band_amc_symbols;
-extern guint num_of_ul_band_amc_symbols;
-extern guint harq_mode;
-extern gint proto_wimax;
+extern unsigned cid_type;
+extern unsigned band_amc_subchannel_type;
+extern unsigned max_logical_bands;
+extern unsigned num_of_broadcast_symbols;
+extern unsigned num_of_dl_band_amc_symbols;
+extern unsigned num_of_ul_band_amc_symbols;
+extern unsigned harq_mode;
+extern int proto_wimax;
/* forward reference */
-guint wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-guint wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-static guint wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-static guint wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
-static guint wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+unsigned wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+unsigned wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+static unsigned wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+static unsigned wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
+static unsigned wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
-static gint proto_wimax_compact_ulmap_ie_decoder;
+static int proto_wimax_compact_ulmap_ie_decoder;
#if 0 /* not used ?? */
-static gint ett_wimax_compact_ulmap_ie_decoder;
-static gint ett_wimax_rcid_ie_decoder;
-static gint ett_wimax_harq_control_ie_decoder;
-static gint ett_wimax_extended_uiuc_dependent_ie_decoder;
-static gint ett_wimax_extension_type_ie_decoder;
+static int ett_wimax_compact_ulmap_ie_decoder;
+static int ett_wimax_rcid_ie_decoder;
+static int ett_wimax_harq_control_ie_decoder;
+static int ett_wimax_extended_uiuc_dependent_ie_decoder;
+static int ett_wimax_extension_type_ie_decoder;
#endif
/* Prefixes */
@@ -122,83 +123,83 @@ static const value_string vals_ctypes[] =
#define ALLOCATION_MODE_MASK_1 0x0C
/* display indexies */
-static gint hf_culmap_ul_map_type;
-static gint hf_culmap_reserved;
-static gint hf_culmap_nep_code;
-static gint hf_culmap_nsch_code;
-static gint hf_culmap_num_bands;
-static gint hf_culmap_band_index;
-static gint hf_culmap_nb_bitmap;
-static gint hf_culmap_ul_map_type_1;
-static gint hf_culmap_reserved_1;
-static gint hf_culmap_nep_code_1;
-static gint hf_culmap_nsch_code_1;
-static gint hf_culmap_num_bands_1;
-/*static gint hf_culmap_band_index_1;*/
-static gint hf_culmap_nb_bitmap_1;
-
-static gint hf_culmap_shortened_uiuc;
-static gint hf_culmap_companded_sc;
-static gint hf_culmap_shortened_uiuc_1;
-static gint hf_culmap_companded_sc_1;
-
-static gint hf_culmap_bin_offset;
-static gint hf_culmap_bin_offset_1;
-
-static gint hf_culmap_uiuc_ofdma_symbol_offset;
-static gint hf_culmap_uiuc_ofdma_symbol_offset_1;
-static gint hf_culmap_uiuc_subchannel_offset_7;
-static gint hf_culmap_uiuc_num_of_ofdma_symbols_7;
-static gint hf_culmap_uiuc_num_of_subchannels_7;
-static gint hf_culmap_uiuc_ranging_method;
-static gint hf_culmap_uiuc_reserved;
-static gint hf_culmap_uiuc_subchannel_offset_7_1;
-static gint hf_culmap_uiuc_num_of_ofdma_symbols_7_1;
-static gint hf_culmap_uiuc_num_of_subchannels_7_1;
-static gint hf_culmap_uiuc_ranging_method_1;
-static gint hf_culmap_uiuc_reserved_1;
-static gint hf_culmap_uiuc_repetition_coding_indication;
-static gint hf_culmap_uiuc_repetition_coding_indication_1;
-/* static gint hf_culmap_uiuc_reserved1; */
-/* static gint hf_culmap_uiuc_reserved11_1; */
-static gint hf_culmap_uiuc_subchannel_offset;
-static gint hf_culmap_uiuc_subchannel_offset_1;
-static gint hf_culmap_uiuc_num_of_ofdma_symbols;
-static gint hf_culmap_uiuc_num_of_ofdma_symbols_1;
-static gint hf_culmap_uiuc_num_of_subchannels;
-static gint hf_culmap_uiuc_num_of_subchannels_1;
-
-static gint hf_culmap_harq_region_change_indication;
-static gint hf_culmap_harq_region_change_indication_1;
-static gint hf_culmap_cqi_region_change_indication;
-static gint hf_culmap_cqi_region_change_indication_1;
-
-static gint hf_culmap_uiuc;
-static gint hf_culmap_uiuc_1;
-
-static gint hf_culmap_allocation_mode;
-static gint hf_culmap_allocation_mode_rsvd;
-static gint hf_culmap_num_subchannels;
-static gint hf_culmap_allocation_mode_1;
-static gint hf_culmap_allocation_mode_rsvd_1;
-static gint hf_culmap_num_subchannels_1;
-
-/* static gint hf_culmap_reserved_type; */
-static gint hf_culmap_reserved_type_1;
+static int hf_culmap_ul_map_type;
+static int hf_culmap_reserved;
+static int hf_culmap_nep_code;
+static int hf_culmap_nsch_code;
+static int hf_culmap_num_bands;
+static int hf_culmap_band_index;
+static int hf_culmap_nb_bitmap;
+static int hf_culmap_ul_map_type_1;
+static int hf_culmap_reserved_1;
+static int hf_culmap_nep_code_1;
+static int hf_culmap_nsch_code_1;
+static int hf_culmap_num_bands_1;
+/*static int hf_culmap_band_index_1;*/
+static int hf_culmap_nb_bitmap_1;
+
+static int hf_culmap_shortened_uiuc;
+static int hf_culmap_companded_sc;
+static int hf_culmap_shortened_uiuc_1;
+static int hf_culmap_companded_sc_1;
+
+static int hf_culmap_bin_offset;
+static int hf_culmap_bin_offset_1;
+
+static int hf_culmap_uiuc_ofdma_symbol_offset;
+static int hf_culmap_uiuc_ofdma_symbol_offset_1;
+static int hf_culmap_uiuc_subchannel_offset_7;
+static int hf_culmap_uiuc_num_of_ofdma_symbols_7;
+static int hf_culmap_uiuc_num_of_subchannels_7;
+static int hf_culmap_uiuc_ranging_method;
+static int hf_culmap_uiuc_reserved;
+static int hf_culmap_uiuc_subchannel_offset_7_1;
+static int hf_culmap_uiuc_num_of_ofdma_symbols_7_1;
+static int hf_culmap_uiuc_num_of_subchannels_7_1;
+static int hf_culmap_uiuc_ranging_method_1;
+static int hf_culmap_uiuc_reserved_1;
+static int hf_culmap_uiuc_repetition_coding_indication;
+static int hf_culmap_uiuc_repetition_coding_indication_1;
+/* static int hf_culmap_uiuc_reserved1; */
+/* static int hf_culmap_uiuc_reserved11_1; */
+static int hf_culmap_uiuc_subchannel_offset;
+static int hf_culmap_uiuc_subchannel_offset_1;
+static int hf_culmap_uiuc_num_of_ofdma_symbols;
+static int hf_culmap_uiuc_num_of_ofdma_symbols_1;
+static int hf_culmap_uiuc_num_of_subchannels;
+static int hf_culmap_uiuc_num_of_subchannels_1;
+
+static int hf_culmap_harq_region_change_indication;
+static int hf_culmap_harq_region_change_indication_1;
+static int hf_culmap_cqi_region_change_indication;
+static int hf_culmap_cqi_region_change_indication_1;
+
+static int hf_culmap_uiuc;
+static int hf_culmap_uiuc_1;
+
+static int hf_culmap_allocation_mode;
+static int hf_culmap_allocation_mode_rsvd;
+static int hf_culmap_num_subchannels;
+static int hf_culmap_allocation_mode_1;
+static int hf_culmap_allocation_mode_rsvd_1;
+static int hf_culmap_num_subchannels_1;
+
+/* static int hf_culmap_reserved_type; */
+static int hf_culmap_reserved_type_1;
/* display indexies */
-static gint hf_rcid_ie_prefix;
-static gint hf_rcid_ie_prefix_1;
-static gint hf_rcid_ie_normal_cid;
-static gint hf_rcid_ie_normal_cid_1;
-static gint hf_rcid_ie_cid3;
-static gint hf_rcid_ie_cid3_1;
-static gint hf_rcid_ie_cid7;
-static gint hf_rcid_ie_cid7_1;
-static gint hf_rcid_ie_cid11;
-static gint hf_rcid_ie_cid11_1;
-static gint hf_rcid_ie_cid11_2;
-static gint hf_rcid_ie_cid11_3;
+static int hf_rcid_ie_prefix;
+static int hf_rcid_ie_prefix_1;
+static int hf_rcid_ie_normal_cid;
+static int hf_rcid_ie_normal_cid_1;
+static int hf_rcid_ie_cid3;
+static int hf_rcid_ie_cid3_1;
+static int hf_rcid_ie_cid7;
+static int hf_rcid_ie_cid7_1;
+static int hf_rcid_ie_cid11;
+static int hf_rcid_ie_cid11_1;
+static int hf_rcid_ie_cid11_2;
+static int hf_rcid_ie_cid11_3;
/* Masks */
#define WIMAX_RCID_IE_NORMAL_CID_MASK_1 0x0FFFF0
@@ -212,16 +213,16 @@ static gint hf_rcid_ie_cid11_3;
#define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
/* HARQ MAP HARQ Control IE display indexies */
-static gint hf_harq_control_ie_prefix;
-static gint hf_harq_control_ie_ai_sn;
-static gint hf_harq_control_ie_spid;
-static gint hf_harq_control_ie_acid;
-static gint hf_harq_control_ie_reserved;
-static gint hf_harq_control_ie_prefix_1;
-static gint hf_harq_control_ie_ai_sn_1;
-static gint hf_harq_control_ie_spid_1;
-static gint hf_harq_control_ie_acid_1;
-static gint hf_harq_control_ie_reserved_1;
+static int hf_harq_control_ie_prefix;
+static int hf_harq_control_ie_ai_sn;
+static int hf_harq_control_ie_spid;
+static int hf_harq_control_ie_acid;
+static int hf_harq_control_ie_reserved;
+static int hf_harq_control_ie_prefix_1;
+static int hf_harq_control_ie_ai_sn_1;
+static int hf_harq_control_ie_spid_1;
+static int hf_harq_control_ie_acid_1;
+static int hf_harq_control_ie_reserved_1;
/* Masks */
#define WIMAX_HARQ_CONTROL_IE_PREFIX_MASK 0x80
@@ -243,19 +244,19 @@ static gint hf_harq_control_ie_reserved_1;
#define EXTENSION_LENGTH_MASK 0x00F0
#define EXTENSION_LENGTH_MASK_1 0x000F
-static gint hf_culmap_extension_type;
-static gint hf_culmap_extension_subtype;
-static gint hf_culmap_extension_length;
-static gint hf_culmap_extension_type_1;
-static gint hf_culmap_extension_subtype_1;
-static gint hf_culmap_extension_length_1;
+static int hf_culmap_extension_type;
+static int hf_culmap_extension_subtype;
+static int hf_culmap_extension_length;
+static int hf_culmap_extension_type_1;
+static int hf_culmap_extension_subtype_1;
+static int hf_culmap_extension_length_1;
-/* static gint hf_culmap_extension_time_diversity_mbs; */
-static gint hf_culmap_extension_harq_mode;
-static gint hf_culmap_extension_unknown_sub_type;
-/* static gint hf_culmap_extension_time_diversity_mbs_1; */
-static gint hf_culmap_extension_harq_mode_1;
-static gint hf_culmap_extension_unknown_sub_type_1;
+/* static int hf_culmap_extension_time_diversity_mbs; */
+static int hf_culmap_extension_harq_mode;
+static int hf_culmap_extension_unknown_sub_type;
+/* static int hf_culmap_extension_time_diversity_mbs_1; */
+static int hf_culmap_extension_harq_mode_1;
+static int hf_culmap_extension_unknown_sub_type_1;
/* UL-MAP CDMA Allocation IE */
#define CDMA_ALLOCATION_DURATION_MASK 0xFC00
@@ -275,22 +276,22 @@ static gint hf_culmap_extension_unknown_sub_type_1;
#define CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK_1 0x00000FE0
#define CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK_1 0x00000010
-static gint hf_cdma_allocation_duration;
-static gint hf_cdma_allocation_uiuc;
-static gint hf_cdma_allocation_repetition;
-static gint hf_cdma_allocation_frame_number_index;
-static gint hf_cdma_allocation_ranging_code;
-static gint hf_cdma_allocation_ranging_symbol;
-static gint hf_cdma_allocation_ranging_subchannel;
-static gint hf_cdma_allocation_bw_req;
-static gint hf_cdma_allocation_duration_1;
-static gint hf_cdma_allocation_uiuc_1;
-static gint hf_cdma_allocation_repetition_1;
-static gint hf_cdma_allocation_frame_number_index_1;
-static gint hf_cdma_allocation_ranging_code_1;
-static gint hf_cdma_allocation_ranging_symbol_1;
-static gint hf_cdma_allocation_ranging_subchannel_1;
-static gint hf_cdma_allocation_bw_req_1;
+static int hf_cdma_allocation_duration;
+static int hf_cdma_allocation_uiuc;
+static int hf_cdma_allocation_repetition;
+static int hf_cdma_allocation_frame_number_index;
+static int hf_cdma_allocation_ranging_code;
+static int hf_cdma_allocation_ranging_symbol;
+static int hf_cdma_allocation_ranging_subchannel;
+static int hf_cdma_allocation_bw_req;
+static int hf_cdma_allocation_duration_1;
+static int hf_cdma_allocation_uiuc_1;
+static int hf_cdma_allocation_repetition_1;
+static int hf_cdma_allocation_frame_number_index_1;
+static int hf_cdma_allocation_ranging_code_1;
+static int hf_cdma_allocation_ranging_symbol_1;
+static int hf_cdma_allocation_ranging_subchannel_1;
+static int hf_cdma_allocation_bw_req_1;
/* UL-MAP Extended UIUCs (table 290a) */
#define MINI_SUBCHANNEL_CTYPE_MASK 0xC0
@@ -312,42 +313,42 @@ static gint hf_cdma_allocation_bw_req_1;
#define MINI_SUBCHANNEL_PADDING_MASK 0xF0
#define MINI_SUBCHANNEL_PADDING_MASK_1 0x0000000F
-static gint hf_extended_uiuc_ie_uiuc;
-static gint hf_extended_uiuc_ie_length;
-static gint hf_extended_uiuc_ie_uiuc_1;
-static gint hf_extended_uiuc_ie_length_1;
-static gint hf_extended_uiuc_ie_power_control;
-static gint hf_extended_uiuc_ie_power_measurement_frame;
-static gint hf_extended_uiuc_ie_power_control_24;
-static gint hf_extended_uiuc_ie_power_measurement_frame_24;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_ctype;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_duration;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_padding;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1;
-static gint hf_extended_uiuc_ie_aas_ul;
-static gint hf_extended_uiuc_ie_cqich_alloc;
-static gint hf_extended_uiuc_ie_ul_zone;
-static gint hf_extended_uiuc_ie_phymod_ul;
-static gint hf_extended_uiuc_ie_mimo_ul_basic;
-static gint hf_extended_uiuc_ie_fast_tracking;
-static gint hf_extended_uiuc_ie_ul_pusc_burst_allocation;
-static gint hf_extended_uiuc_ie_fast_ranging;
-static gint hf_extended_uiuc_ie_ul_allocation_start;
-static gint hf_extended_uiuc_ie_unknown_uiuc;
+static int hf_extended_uiuc_ie_uiuc;
+static int hf_extended_uiuc_ie_length;
+static int hf_extended_uiuc_ie_uiuc_1;
+static int hf_extended_uiuc_ie_length_1;
+static int hf_extended_uiuc_ie_power_control;
+static int hf_extended_uiuc_ie_power_measurement_frame;
+static int hf_extended_uiuc_ie_power_control_24;
+static int hf_extended_uiuc_ie_power_measurement_frame_24;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_ctype;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_duration;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_cid;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_repetition;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_padding;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3;
+static int hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1;
+static int hf_extended_uiuc_ie_aas_ul;
+static int hf_extended_uiuc_ie_cqich_alloc;
+static int hf_extended_uiuc_ie_ul_zone;
+static int hf_extended_uiuc_ie_phymod_ul;
+static int hf_extended_uiuc_ie_mimo_ul_basic;
+static int hf_extended_uiuc_ie_fast_tracking;
+static int hf_extended_uiuc_ie_ul_pusc_burst_allocation;
+static int hf_extended_uiuc_ie_fast_ranging;
+static int hf_extended_uiuc_ie_ul_allocation_start;
+static int hf_extended_uiuc_ie_unknown_uiuc;
/* Compact UL-MAP IE Types (table 90) */
@@ -361,14 +362,14 @@ static gint hf_extended_uiuc_ie_unknown_uiuc;
#define COMPACT_UL_MAP_TYPE_EXTENSION 7
/* Compact UL-MAP IE decoder */
-guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset)
+unsigned wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint uiuc, byte, length = 0;
- guint ul_map_type;
- guint harq_region_change_indication;
- guint cqi_region_change_indication;
- guint ul_map_offset, nibble_length;
- guint nband, band_count, i, allocation_mode;
+ unsigned uiuc, byte, length = 0;
+ unsigned ul_map_type;
+ unsigned harq_region_change_indication;
+ unsigned cqi_region_change_indication;
+ unsigned ul_map_offset, nibble_length;
+ unsigned nband, band_count, i, allocation_mode;
#ifdef DEBUG
/* update the info column */
@@ -377,7 +378,7 @@ guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/* set the local offset */
ul_map_offset = offset;
/* Get the first byte */
- byte = tvb_get_guint8(tvb, ul_map_offset);
+ byte = tvb_get_uint8(tvb, ul_map_offset);
/* get the ul-map type */
if(nibble_offset & 1)
{
@@ -515,7 +516,7 @@ guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/* get the Nband */
if(max_logical_bands)
{ /* get and display the Nband */
- nband = tvb_get_guint8(tvb, ul_map_offset);
+ nband = tvb_get_uint8(tvb, ul_map_offset);
length++;
if(nibble_offset & 1)
{
@@ -585,7 +586,7 @@ guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
length++;
}
/* Get the Allocation Mode */
- byte = tvb_get_guint8(tvb, ul_map_offset);
+ byte = tvb_get_uint8(tvb, ul_map_offset);
if(nibble_offset & 1)
{
allocation_mode = ((byte & ALLOCATION_MODE_MASK_1) >> 2);
@@ -723,7 +724,7 @@ guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
/* move to next byte */
ul_map_offset++;
/* get the new byte */
- byte = tvb_get_guint8(tvb, ul_map_offset);
+ byte = tvb_get_uint8(tvb, ul_map_offset);
/* get the UIUC */
uiuc = ((byte & MSB_NIBBLE_MASK) >> 4);
/* display the UIUC */
@@ -936,7 +937,7 @@ guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
}
break;
case COMPACT_UL_MAP_TYPE_EXTENSION:/* 6.3.2.3.43.7.7 */
- /* decode the Compact UL-MAP externsion IE */
+ /* decode the Compact UL-MAP extension IE */
nibble_length = wimax_culmap_extension_ie_decoder(tree, pinfo, tvb, ul_map_offset, nibble_offset);/*, cqich_indicator);*/
length = nibble_length;
break;
@@ -951,10 +952,10 @@ guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuf
}
/* Compact UL-MAP Reduced CID IE (6.3.2.3.43.3) decoder */
-static guint wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+static unsigned wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint length = 0;
- guint prefix;
+ unsigned length = 0;
+ unsigned prefix;
#ifdef DEBUG
/* update the info column */
@@ -969,7 +970,7 @@ static guint wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *
}
else
{ /* Get the prefix bit */
- prefix = (tvb_get_guint8(tvb, offset) & 0x08);
+ prefix = (tvb_get_uint8(tvb, offset) & 0x08);
/* display the prefix */
proto_tree_add_item(tree, hf_rcid_ie_prefix_1, tvb, offset, 2, ENC_BIG_ENDIAN);
if(prefix)
@@ -1006,7 +1007,7 @@ static guint wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *
}
else
{ /* Get the prefix bit */
- prefix = (tvb_get_guint8(tvb, offset) & 0x08);
+ prefix = (tvb_get_uint8(tvb, offset) & 0x08);
/* display the prefix */
proto_tree_add_item(tree, hf_rcid_ie_prefix, tvb, offset, 2, ENC_BIG_ENDIAN);
if(prefix || (cid_type == CID_TYPE_RCID11))
@@ -1039,16 +1040,16 @@ static guint wimax_compact_ulmap_rcid_ie_decoder(proto_tree *tree, packet_info *
}
/* Compact UL-MAP HARQ Control IE (6.3.2.3.43.4) decoder */
-static guint wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+static unsigned wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint byte, prefix, length = 0;
+ unsigned byte, prefix, length = 0;
#ifdef DEBUG
/* update the info column */
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "HARQ Control IE");
#endif
/* Get the first byte */
- byte = tvb_get_guint8(tvb, offset);
+ byte = tvb_get_uint8(tvb, offset);
if(nibble_offset & 1)
{ /* Get the prefix bit */
prefix = (byte & 0x08);
@@ -1102,9 +1103,9 @@ static guint wimax_compact_ulmap_harq_control_ie_decoder(proto_tree *tree, packe
#define EXTENSION_LENGTH_SHIFT 4
/* Compact UL-MAP Extension IE (6.3.2.3.43.7.7) decoder */
-static guint wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+static unsigned wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint tvb_value, ul_map_type, sub_type, length;
+ unsigned tvb_value, ul_map_type, sub_type, length;
#ifdef DEBUG
/* update the info column */
@@ -1134,7 +1135,7 @@ static guint wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pi
/* display the HARQ mode */
proto_tree_add_item(tree, hf_culmap_extension_harq_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Get the next byte */
- tvb_value = tvb_get_guint8(tvb, offset);
+ tvb_value = tvb_get_uint8(tvb, offset);
/* get the HARQ mode */
harq_mode = ((tvb_value & MSB_NIBBLE_MASK) >> 4);
break;
@@ -1178,7 +1179,7 @@ static guint wimax_culmap_extension_ie_decoder(proto_tree *tree, packet_info *pi
}
/* 8.4.5.4.3 (table 290) */
-guint wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+unsigned wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
#ifdef DEBUG
/* update the info column */
@@ -1238,10 +1239,10 @@ guint wimax_cdma_allocation_ie_decoder(proto_tree *tree, packet_info *pinfo _U_,
#define UL_ALLOCATION_START_IE 10
/* 8.4.5.4.4.1 (table 290b) */
-guint wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, guint offset, guint nibble_offset)
+unsigned wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset)
{
- guint ext_uiuc, length, m, i;
- guint8 byte;
+ unsigned ext_uiuc, length, m, i;
+ uint8_t byte;
#ifdef DEBUG
/* update the info column */
@@ -1249,7 +1250,7 @@ guint wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pi
#endif
/* get the first byte */
- byte = tvb_get_guint8(tvb, offset);
+ byte = tvb_get_uint8(tvb, offset);
if(nibble_offset & 1)
{ /* get the extended UIUC */
ext_uiuc = (byte & LSB_NIBBLE_MASK);
@@ -1258,7 +1259,7 @@ guint wimax_extended_uiuc_dependent_ie_decoder(proto_tree *tree, packet_info *pi
/* move to next byte */
offset++;
/* get the 2nd byte */
- byte = tvb_get_guint8(tvb, offset);
+ byte = tvb_get_uint8(tvb, offset);
/* get the length */
length = ((byte & MSB_NIBBLE_MASK) >> 4);
/* display extended UIUC length */
@@ -2090,7 +2091,7 @@ void wimax_proto_register_wimax_compact_ulmap_ie(void)
#if 0 /* not used ?? */
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_compact_ulmap_ie_decoder,
&ett_wimax_rcid_ie_decoder,
diff --git a/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h
index ef0d832f14..5511e6a410 100644
--- a/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h
+++ b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h
@@ -15,6 +15,6 @@
#ifndef _WIMAX_COMPACT_ULMAP_IE_DECODER_H_
#define _WIMAX_COMPACT_ULMAP_IE_DECODER_H_
-extern guint wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint offset, guint nibble_offset);
+extern unsigned wimax_compact_ulmap_ie_decoder(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, unsigned offset, unsigned nibble_offset);
#endif /* _WIMAX_COMPACT_ULMAP_IE_DECODER_H_ */
diff --git a/plugins/epan/wimax/wimax_fch_decoder.c b/plugins/epan/wimax/wimax_fch_decoder.c
index 69e2c1959c..4e828a493e 100644
--- a/plugins/epan/wimax/wimax_fch_decoder.c
+++ b/plugins/epan/wimax/wimax_fch_decoder.c
@@ -21,12 +21,12 @@
#include <epan/packet.h>
#include "wimax-int.h"
-extern gint proto_wimax;
+extern int proto_wimax;
extern address bs_address; /* declared in packet-wmx.c */
static int proto_wimax_fch_decoder;
-static gint ett_wimax_fch_decoder;
+static int ett_wimax_fch_decoder;
#define FCH_BURST_LENGTH 3
/* FCH Burst bits */
@@ -87,7 +87,7 @@ static const value_string coding_indications[] =
static int dissect_wimax_fch_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- gint offset = 0;
+ int offset = 0;
proto_item *fch_item = NULL;
proto_tree *fch_tree = NULL;
@@ -218,7 +218,7 @@ void wimax_proto_register_wimax_fch(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_fch_decoder,
};
diff --git a/plugins/epan/wimax/wimax_ffb_decoder.c b/plugins/epan/wimax/wimax_ffb_decoder.c
index 5b8b8f8b72..661bee3dbf 100644
--- a/plugins/epan/wimax/wimax_ffb_decoder.c
+++ b/plugins/epan/wimax/wimax_ffb_decoder.c
@@ -19,23 +19,23 @@
#include <epan/packet.h>
#include "wimax-int.h"
-extern gint proto_wimax;
+extern int proto_wimax;
-static gint proto_wimax_ffb_decoder;
-static gint ett_wimax_ffb_decoder;
+static int proto_wimax_ffb_decoder;
+static int ett_wimax_ffb_decoder;
-/* static gint hf_ffb_burst; */
-static gint hf_ffb_num_of_ffbs;
-static gint hf_ffb_type;
-static gint hf_ffb_subchannel;
-static gint hf_ffb_symboloffset;
-static gint hf_ffb_value;
+/* static int hf_ffb_burst; */
+static int hf_ffb_num_of_ffbs;
+static int hf_ffb_type;
+static int hf_ffb_subchannel;
+static int hf_ffb_symboloffset;
+static int hf_ffb_value;
static int dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- gint offset = 0;
- guint length, num_of_ffbs, i;
+ int offset = 0;
+ unsigned length, num_of_ffbs, i;
proto_item *ffb_item = NULL;
proto_tree *ffb_tree = NULL;
@@ -50,7 +50,7 @@ static int dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tr
/* add Fast Feedback Burst subtree */
ffb_tree = proto_item_add_subtree(ffb_item, ett_wimax_ffb_decoder);
/* get the number of FFBs */
- num_of_ffbs = tvb_get_guint8(tvb, offset);
+ num_of_ffbs = tvb_get_uint8(tvb, offset);
/* display the number of FFBs */
proto_tree_add_item(ffb_tree, hf_ffb_num_of_ffbs, tvb, offset++, 1, ENC_BIG_ENDIAN);
/* display the FFB type */
@@ -101,7 +101,7 @@ void wimax_proto_register_wimax_ffb(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_ffb_decoder,
};
diff --git a/plugins/epan/wimax/wimax_hack_decoder.c b/plugins/epan/wimax/wimax_hack_decoder.c
index a1aaef93ef..19442d0ce2 100644
--- a/plugins/epan/wimax/wimax_hack_decoder.c
+++ b/plugins/epan/wimax/wimax_hack_decoder.c
@@ -19,10 +19,10 @@
#include <epan/packet.h>
#include "wimax-int.h"
-extern gint proto_wimax;
+extern int proto_wimax;
-static gint proto_wimax_hack_decoder;
-static gint ett_wimax_hack_decoder;
+static int proto_wimax_hack_decoder;
+static int ett_wimax_hack_decoder;
static const value_string vals_flags[] =
{
@@ -38,18 +38,18 @@ static const value_string vals_values[] =
{0, NULL}
};
-/* static gint hf_hack_burst; */
-static gint hf_hack_num_of_hacks;
-static gint hf_hack_half_slot_flag;
-static gint hf_hack_subchannel;
-static gint hf_hack_symboloffset;
-static gint hf_hack_value;
+/* static int hf_hack_burst; */
+static int hf_hack_num_of_hacks;
+static int hf_hack_half_slot_flag;
+static int hf_hack_subchannel;
+static int hf_hack_symboloffset;
+static int hf_hack_value;
static int dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- gint offset = 0;
- guint length, num_of_hacks, i;
+ int offset = 0;
+ unsigned length, num_of_hacks, i;
proto_item *hack_item = NULL;
proto_tree *hack_tree = NULL;
@@ -64,7 +64,7 @@ static int dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
/* add HARQ ACK Burst subtree */
hack_tree = proto_item_add_subtree(hack_item, ett_wimax_hack_decoder);
/* get the number of HARQ ACKs */
- num_of_hacks = tvb_get_guint8(tvb, offset);
+ num_of_hacks = tvb_get_uint8(tvb, offset);
/* display the number of HARQ ACKs */
proto_tree_add_item(hack_tree, hf_hack_num_of_hacks, tvb, offset++, 1, ENC_BIG_ENDIAN);
/* display the HARQ ACKs */
@@ -114,7 +114,7 @@ void wimax_proto_register_wimax_hack(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_hack_decoder,
};
diff --git a/plugins/epan/wimax/wimax_harq_map_decoder.c b/plugins/epan/wimax/wimax_harq_map_decoder.c
index d0bb91cdad..0292111993 100644
--- a/plugins/epan/wimax/wimax_harq_map_decoder.c
+++ b/plugins/epan/wimax/wimax_harq_map_decoder.c
@@ -23,10 +23,10 @@
#include "wimax_compact_dlmap_ie_decoder.h"
#include "wimax_compact_ulmap_ie_decoder.h"
-extern gint proto_wimax;
+extern int proto_wimax;
-static gint proto_wimax_harq_map_decoder;
-static gint ett_wimax_harq_map_decoder;
+static int proto_wimax_harq_map_decoder;
+static int ett_wimax_harq_map_decoder;
/* MASKs */
#define LSB_NIBBLE_MASK 0x0F
@@ -41,13 +41,13 @@ static gint ett_wimax_harq_map_decoder;
#define WIMAX_HARQ_MAP_DL_IE_COUNT_SHIFT 4
/* HARQ MAP display indexies */
-static gint hf_harq_map_indicator;
-static gint hf_harq_ul_map_appended;
-static gint hf_harq_map_reserved;
-static gint hf_harq_map_msg_length;
-static gint hf_harq_dl_ie_count;
-static gint hf_harq_map_msg_crc;
-static gint hf_harq_map_msg_crc_status;
+static int hf_harq_map_indicator;
+static int hf_harq_ul_map_appended;
+static int hf_harq_map_reserved;
+static int hf_harq_map_msg_length;
+static int hf_harq_dl_ie_count;
+static int hf_harq_map_msg_crc;
+static int hf_harq_map_msg_crc_status;
static expert_field ei_harq_map_msg_crc;
@@ -65,16 +65,16 @@ static const value_string plugin_proto_checksum_vals[] = {
/* HARQ MAP message decoder */
static int dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint i, offset = 0;
- guint tvb_len, length, dl_ie_count;
- guint ie_length;
+ unsigned i, offset = 0;
+ unsigned tvb_len, length, dl_ie_count;
+ unsigned ie_length;
proto_item *harq_map_item = NULL;
proto_tree *harq_map_tree = NULL;
- guint nibble_offset;
+ unsigned nibble_offset;
proto_item *parent_item = NULL;
- guint ulmap_appended;
- guint32 harq_map_msg_crc, calculated_crc;
- guint32 first_24bits;
+ unsigned ulmap_appended;
+ uint32_t harq_map_msg_crc, calculated_crc;
+ uint32_t first_24bits;
/* check the tvb reported length */
tvb_len = tvb_reported_length(tvb);
@@ -147,7 +147,7 @@ static int dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, p
{
/* add the Padding info */
proto_item_append_text(parent_item, ",Padding");
- proto_tree_add_protocol_format(harq_map_tree, proto_wimax_harq_map_decoder, tvb, offset, 1, "Padding Nibble: 0x%x", (tvb_get_guint8(tvb, offset) & LSB_NIBBLE_MASK));
+ proto_tree_add_protocol_format(harq_map_tree, proto_wimax_harq_map_decoder, tvb, offset, 1, "Padding Nibble: 0x%x", (tvb_get_uint8(tvb, offset) & LSB_NIBBLE_MASK));
}
/* add the CRC info */
proto_item_append_text(parent_item, ",CRC");
@@ -198,7 +198,7 @@ void wimax_proto_register_wimax_harq_map(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_harq_map_decoder,
};
diff --git a/plugins/epan/wimax/wimax_pdu_decoder.c b/plugins/epan/wimax/wimax_pdu_decoder.c
index 3b764a69db..0fe05ad616 100644
--- a/plugins/epan/wimax/wimax_pdu_decoder.c
+++ b/plugins/epan/wimax/wimax_pdu_decoder.c
@@ -21,14 +21,14 @@
#include "wimax-int.h"
#include "wimax_utils.h"
-extern gint proto_wimax;
+extern int proto_wimax;
void proto_reg_handoff_wimax_pdu(void);
-static dissector_handle_t mac_generic_decoder_handle = NULL;
-static dissector_handle_t mac_header_type1_handle = NULL;
-static dissector_handle_t mac_header_type2_handle = NULL;
-static dissector_handle_t wimax_harq_map_handle = NULL;
+static dissector_handle_t mac_generic_decoder_handle;
+static dissector_handle_t mac_header_type1_handle;
+static dissector_handle_t mac_header_type2_handle;
+static dissector_handle_t wimax_harq_map_handle;
#define WIMAX_PDU_PADDING_MASK 0xFF
#define WIMAX_INVALID_PDU_MASK 0xF0
@@ -45,19 +45,19 @@ static dissector_handle_t wimax_harq_map_handle = NULL;
#define WIMAX_HARQ_MAP_MSG_LENGTH_MASK1 0x07FC
/* Global Variables. */
-gboolean first_gmh;
+bool first_gmh;
-static gint proto_wimax_pdu_decoder;
-static gint ett_wimax_pdu_decoder;
+static int proto_wimax_pdu_decoder;
+static int ett_wimax_pdu_decoder;
static int hf_wimax_value_bytes;
static int dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset;
- guint mac_ht, mac_ec;
- guint first_byte, length;
- guint mac_hcs, mac_hcs_calculated;
+ unsigned offset;
+ unsigned mac_ht, mac_ec;
+ unsigned first_byte, length;
+ unsigned mac_hcs, mac_hcs_calculated;
proto_item *pdu_item = NULL;
proto_tree *pdu_tree = NULL;
@@ -73,16 +73,16 @@ static int dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tr
{
if (offset == 0)
{
- first_gmh = TRUE;
+ first_gmh = true;
}
else
{
- first_gmh = FALSE;
+ first_gmh = false;
}
/* get the length of the remainder */
length = tvb_reported_length_remaining(tvb, offset);
/* get the first byte at offset */
- first_byte = tvb_get_guint8(tvb, offset);
+ first_byte = tvb_get_uint8(tvb, offset);
/* check for padding */
if(first_byte == WIMAX_PDU_PADDING_MASK)
{ /* Padding */
@@ -137,7 +137,7 @@ static int dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tr
/* calculate the MAC header HCS */
mac_hcs_calculated = wimax_mac_calc_crc8(tvb_get_ptr(tvb, offset, WIMAX_MAC_HEADER_INFO_FIELDS), WIMAX_MAC_HEADER_INFO_FIELDS);
/* get the Header Check Sequence (HCS) in the header */
- mac_hcs = tvb_get_guint8(tvb, offset + WIMAX_MAC_HEADER_SIZE - 1);
+ mac_hcs = tvb_get_uint8(tvb, offset + WIMAX_MAC_HEADER_SIZE - 1);
/* verify the HCS */
if(mac_hcs != mac_hcs_calculated)
{
@@ -159,8 +159,8 @@ static int dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tr
if(!mac_ht)
{ /* Generic MAC Header with payload */
/* get the MAC length */
- length = (tvb_get_guint8(tvb, offset+1) & WIMAX_MAC_HEADER_LENGTH_MSB_MASK);
- length = ((length<<8) | tvb_get_guint8(tvb, offset+2));
+ length = (tvb_get_uint8(tvb, offset+1) & WIMAX_MAC_HEADER_LENGTH_MSB_MASK);
+ length = ((length<<8) | tvb_get_uint8(tvb, offset+2));
}
else /* MAC signaling Headers or Bandwidth Request Headers */
{ /* set the mac length */
@@ -220,7 +220,7 @@ void wimax_proto_register_wimax_pdu(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_pdu_decoder,
};
diff --git a/plugins/epan/wimax/wimax_phy_attributes_decoder.c b/plugins/epan/wimax/wimax_phy_attributes_decoder.c
index daa691523c..646040d388 100644
--- a/plugins/epan/wimax/wimax_phy_attributes_decoder.c
+++ b/plugins/epan/wimax/wimax_phy_attributes_decoder.c
@@ -19,10 +19,10 @@
#include <epan/packet.h>
#include "wimax-int.h"
-extern gint proto_wimax;
+extern int proto_wimax;
-static gint proto_wimax_phy_attributes_decoder;
-static gint ett_wimax_phy_attributes_decoder;
+static int proto_wimax_phy_attributes_decoder;
+static int ett_wimax_phy_attributes_decoder;
static const value_string vals_subchannel_types[] =
{
@@ -53,22 +53,22 @@ static const value_string vals_encoding_types[] =
{0, NULL}
};
-static gint hf_phy_attributes_subchannelization_type;
-static gint hf_phy_attributes_permbase;
-static gint hf_phy_attributes_modulation_rate;
-static gint hf_phy_attributes_encoding_type;
-static gint hf_phy_attributes_num_repeat;
-static gint hf_phy_attributes_symbol_offset;
-static gint hf_phy_attributes_num_of_slots;
-static gint hf_phy_attributes_subchannel;
+static int hf_phy_attributes_subchannelization_type;
+static int hf_phy_attributes_permbase;
+static int hf_phy_attributes_modulation_rate;
+static int hf_phy_attributes_encoding_type;
+static int hf_phy_attributes_num_repeat;
+static int hf_phy_attributes_symbol_offset;
+static int hf_phy_attributes_num_of_slots;
+static int hf_phy_attributes_subchannel;
static int dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint offset = 0;
- guint tvb_len;
-/* guint num_of_slots;*/
+ unsigned offset = 0;
+ unsigned tvb_len;
+/* unsigned num_of_slots;*/
proto_item *phy_item = NULL;
proto_tree *phy_tree = NULL;
@@ -98,7 +98,7 @@ static int dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pinf
/* display the number of slots */
proto_tree_add_item(phy_tree, hf_phy_attributes_num_of_slots, tvb, offset, 2, ENC_BIG_ENDIAN);
/* get the number of slots */
-/* num_of_slots = tvb_get_guint16(tvb, offset);*/
+/* num_of_slots = tvb_get_uint16(tvb, offset);*/
/* move to next field */
offset += 2;
/* display the physical subchannel list */
@@ -151,7 +151,7 @@ void wimax_proto_register_wimax_phy_attributes(void)
};
/* Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_wimax_phy_attributes_decoder
};
diff --git a/plugins/epan/wimax/wimax_prefs.h b/plugins/epan/wimax/wimax_prefs.h
new file mode 100644
index 0000000000..e2edad9672
--- /dev/null
+++ b/plugins/epan/wimax/wimax_prefs.h
@@ -0,0 +1,20 @@
+/* wimax_prefs.h
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1999 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef __WIMAX_PREFS_H__
+#define __WIMAX_PREFS_H__
+
+/*
+ * Preferences used in more than one source file.
+ */
+
+extern bool include_cor2_changes;
+extern unsigned global_cid_max_basic;
+
+#endif
diff --git a/plugins/epan/wimax/wimax_tlv.c b/plugins/epan/wimax/wimax_tlv.c
index fe06728b0e..b447208fbe 100644
--- a/plugins/epan/wimax/wimax_tlv.c
+++ b/plugins/epan/wimax/wimax_tlv.c
@@ -16,23 +16,23 @@
#include "wimax_tlv.h"
-/*************************************************************/
-/* init_tlv_info() */
-/* retrive the tlv information from specified tvb and offset */
-/* parameter: */
-/* info - pointer of a tlv information data structure */
-/* return: */
-/* 0-success */
-/* !=0-the invalid size of the TLV length (failed) */
-/*************************************************************/
-gint init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, gint offset)
+/**************************************************************/
+/* init_tlv_info() */
+/* retrieve the tlv information from specified tvb and offset */
+/* parameter: */
+/* info - pointer of a tlv information data structure */
+/* return: */
+/* 0-success */
+/* !=0-the invalid size of the TLV length (failed) */
+/**************************************************************/
+int init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, int offset)
{
- guint tlv_len;
+ unsigned tlv_len;
/* get TLV type */
- info->type = (guint8)tvb_get_guint8( tvb, offset );
+ info->type = (uint8_t)tvb_get_uint8( tvb, offset );
/* get TLV length */
- tlv_len = (guint)tvb_get_guint8( tvb, (offset + 1) );
+ tlv_len = (unsigned)tvb_get_uint8( tvb, (offset + 1) );
/* set the TLV value offset */
info->value_offset = 2;
/* adjust for multiple-byte TLV length */
@@ -50,22 +50,22 @@ gint init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, gint offset)
info->length = 0; /* no length */
break;
case 1:
- info->length = (gint32)tvb_get_guint8( tvb, (offset + 2) ); /* 8 bit */
+ info->length = (int32_t)tvb_get_uint8( tvb, (offset + 2) ); /* 8 bit */
break;
case 2:
- info->length = (gint32)tvb_get_ntohs( tvb, (offset + 2) ); /* 16 bit */
+ info->length = (int32_t)tvb_get_ntohs( tvb, (offset + 2) ); /* 16 bit */
break;
case 3:
- info->length = (gint32)tvb_get_ntoh24( tvb, (offset + 2) ); /* 24 bit */
+ info->length = (int32_t)tvb_get_ntoh24( tvb, (offset + 2) ); /* 24 bit */
break;
case 4:
- info->length = (gint32)tvb_get_ntohl( tvb, (offset + 2) ); /* 32 bit */
+ info->length = (int32_t)tvb_get_ntohl( tvb, (offset + 2) ); /* 32 bit */
break;
default:
/* mark invalid tlv */
info->valid = 0;
/* failed, return the invalid size of the tlv length */
- return (gint)tlv_len;
+ return (int)tlv_len;
break;
}
}
@@ -73,7 +73,7 @@ gint init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, gint offset)
{
info->length_type = 0;
info->size_of_length = 0;
- info->length = (gint32)tlv_len;
+ info->length = (int32_t)tlv_len;
}
/* mark valid tlv */
info->valid = 1;
@@ -90,10 +90,10 @@ gint init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, gint offset)
/* >=0 - TLV type */
/* =-1 - invalid tlv info */
/*************************************************************/
-gint get_tlv_type(tlv_info_t *info)
+int get_tlv_type(tlv_info_t *info)
{
if(info->valid)
- return (gint)info->type;
+ return (int)info->type;
return -1;
}
@@ -106,10 +106,10 @@ gint get_tlv_type(tlv_info_t *info)
/* >=0 - the size of TLV length */
/* =-1 - invalid tlv info */
/**************************************************************/
-gint get_tlv_size_of_length(tlv_info_t *info)
+int get_tlv_size_of_length(tlv_info_t *info)
{
if(info->valid)
- return (gint)info->size_of_length;
+ return (int)info->size_of_length;
return -1;
}
@@ -122,10 +122,10 @@ gint get_tlv_size_of_length(tlv_info_t *info)
/* >=0 - TLV length */
/* =-1 - invalid tlv info */
/*************************************************************/
-gint32 get_tlv_length(tlv_info_t *info)
+int32_t get_tlv_length(tlv_info_t *info)
{
if(info->valid)
- return (gint32)info->length;
+ return (int32_t)info->length;
return -1;
}
@@ -138,10 +138,10 @@ gint32 get_tlv_length(tlv_info_t *info)
/* >0 - TLV value offset in byte */
/* =-1 - invalid tlv info */
/*************************************************************/
-gint get_tlv_value_offset(tlv_info_t *info)
+int get_tlv_value_offset(tlv_info_t *info)
{
if(info->valid)
- return (gint)info->value_offset;
+ return (int)info->value_offset;
return -1;
}
@@ -154,10 +154,10 @@ gint get_tlv_value_offset(tlv_info_t *info)
/* 0 - single byte TLV length */
/* 1 - multiple bytes TLV length */
/*************************************************************/
-gint get_tlv_length_type(tlv_info_t *info)
+int get_tlv_length_type(tlv_info_t *info)
{
if(info->valid)
- return (gint)info->length_type;
+ return (int)info->length_type;
return -1;
}
diff --git a/plugins/epan/wimax/wimax_tlv.h b/plugins/epan/wimax/wimax_tlv.h
index 0011c56334..2242e96038 100644
--- a/plugins/epan/wimax/wimax_tlv.h
+++ b/plugins/epan/wimax/wimax_tlv.h
@@ -23,23 +23,23 @@
typedef struct
{
- guint8 valid; /* TLV info status: 0=invalid; 1=valid */
- guint8 type; /* TLV type */
- guint8 length_type; /* length type: 0=single byte; 1=multiple bytes */
- guint8 size_of_length; /* size of the TLV length */
- guint value_offset; /* the offset of TLV value field */
- gint32 length; /* length of TLV value field */
+ uint8_t valid; /* TLV info status: 0=invalid; 1=valid */
+ uint8_t type; /* TLV type */
+ uint8_t length_type; /* length type: 0=single byte; 1=multiple bytes */
+ uint8_t size_of_length; /* size of the TLV length */
+ unsigned value_offset; /* the offset of TLV value field */
+ int32_t length; /* length of TLV value field */
} tlv_info_t;
-gint init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, gint offset);
-gint valid_tlv_info(tlv_info_t *info);
-gint get_tlv_type(tlv_info_t *info);
-gint get_tlv_length_type(tlv_info_t *info);
-gint get_tlv_size_of_length(tlv_info_t *info);
-gint get_tlv_value_offset(tlv_info_t *info);
-gint32 get_tlv_length(tlv_info_t *info);
-proto_item *add_tlv_subtree(tlv_info_t *info, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, const guint encoding);
-proto_tree *add_tlv_subtree_no_item(tlv_info_t *info, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start);
-proto_tree *add_protocol_subtree(tlv_info_t *info, gint idx, proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *label);
+int init_tlv_info(tlv_info_t *info, tvbuff_t *tvb, int offset);
+int valid_tlv_info(tlv_info_t *info);
+int get_tlv_type(tlv_info_t *info);
+int get_tlv_length_type(tlv_info_t *info);
+int get_tlv_size_of_length(tlv_info_t *info);
+int get_tlv_value_offset(tlv_info_t *info);
+int32_t get_tlv_length(tlv_info_t *info);
+proto_item *add_tlv_subtree(tlv_info_t *info, proto_tree *tree, int hfindex, tvbuff_t *tvb, int start, const unsigned encoding);
+proto_tree *add_tlv_subtree_no_item(tlv_info_t *info, proto_tree *tree, int hfindex, tvbuff_t *tvb, int start);
+proto_tree *add_protocol_subtree(tlv_info_t *info, int idx, proto_tree *tree, int hfindex, tvbuff_t *tvb, int start, int length, const char *label);
#endif /* WIMAX_TLV_H */
diff --git a/plugins/epan/wimax/wimax_utils.c b/plugins/epan/wimax/wimax_utils.c
index e59bb2a561..329a4dce03 100644
--- a/plugins/epan/wimax/wimax_utils.c
+++ b/plugins/epan/wimax/wimax_utils.c
@@ -20,36 +20,39 @@
#include <epan/packet.h>
#include <epan/expert.h>
-#include "wimax-int.h"
+#include <epan/tfs.h>
+#include <epan/unit_strings.h>
+
+#include <wsutil/array.h>
#include "wimax_tlv.h"
#include "wimax_mac.h"
+#include "wimax_prefs.h"
#include "wimax_utils.h"
-extern gint proto_mac_mgmt_msg_rng_req_decoder;
-extern gint proto_mac_mgmt_msg_reg_req_decoder;
-
-extern gint mac_sdu_length; /* declared in packet-wmx.c */
-extern gboolean include_cor2_changes;
-
-static gint proto_wimax_utility_decoders;
-static gint ett_wimax_service_flow_encodings;
-static gint ett_wimax_cst_encoding_rules;
-static gint ett_wimax_error_parameter_set;
-static gint ett_wimax_hmac_tuple;
-static gint ett_wimax_cmac_tuple;
-static gint ett_wimax_short_hmac_tuple;
-static gint ett_security_negotiation_parameters;
-static gint ett_pkm_tlv_encoded_attributes_decoder;
-static gint ett_sa_descriptor_decoder;
-static gint ett_cryptographic_suite_list_decoder;
-static gint ett_security_capabilities_decoder;
-static gint ett_vendor_specific_info_decoder;
-static gint ett_vendor_id_encoding_decoder;
-static gint ett_ul_service_flow_decoder;
-static gint ett_dl_service_flow_decoder;
-
-static dissector_handle_t eap_handle = NULL;
+extern int proto_mac_mgmt_msg_rng_req_decoder;
+extern int proto_mac_mgmt_msg_reg_req_decoder;
+
+extern int mac_sdu_length; /* declared in packet-wmx.c */
+
+static int proto_wimax_utility_decoders;
+static int ett_wimax_service_flow_encodings;
+static int ett_wimax_cst_encoding_rules;
+static int ett_wimax_error_parameter_set;
+static int ett_wimax_hmac_tuple;
+static int ett_wimax_cmac_tuple;
+static int ett_wimax_short_hmac_tuple;
+static int ett_security_negotiation_parameters;
+static int ett_pkm_tlv_encoded_attributes_decoder;
+static int ett_sa_descriptor_decoder;
+static int ett_cryptographic_suite_list_decoder;
+static int ett_security_capabilities_decoder;
+static int ett_vendor_specific_info_decoder;
+static int ett_vendor_id_encoding_decoder;
+static int ett_ul_service_flow_decoder;
+static int ett_dl_service_flow_decoder;
+
+static dissector_handle_t eap_handle;
const unit_name_string wimax_units_byte_bytes = { " byte", " bytes" };
const unit_name_string wimax_units_bit_sec = { "bits/s", NULL };
@@ -67,16 +70,16 @@ const unit_name_string wimax_units_ps = { "PS", NULL };
the Grant Management subheader dissector and track whether or not
one has been seen.
*/
-static guint scheduling_service_type = -1;
-gint seen_a_service_type = 0;
+static unsigned scheduling_service_type = -1;
+int seen_a_service_type;
/* The following two functions set and access the variables above */
-guint get_service_type( void )
+unsigned get_service_type( void )
{
return scheduling_service_type;
}
-static void set_service_type( guint set_to )
+static void set_service_type( unsigned set_to )
{
if( seen_a_service_type == 0 ){
scheduling_service_type = set_to;
@@ -85,7 +88,7 @@ static void set_service_type( guint set_to )
}
/* Setup protocol subtree array */
-static gint *ett[] =
+static int *ett[] =
{
&ett_wimax_service_flow_encodings,
&ett_wimax_cst_encoding_rules,
@@ -400,155 +403,155 @@ static const value_string vals_dcd_mac_version[] =
};
/* fix fields */
-static gint hf_sfe_unknown_type;
-static gint hf_sfe_sf_id;
-static gint hf_sfe_cid;
-static gint hf_sfe_service_class_name;
-static gint hf_sfe_mbs_service;
-static gint hf_sfe_qos_params_set;
-static gint hf_sfe_set_provisioned;
-static gint hf_sfe_set_admitted;
-static gint hf_sfe_set_active;
-static gint hf_sfe_set_rsvd;
-static gint hf_sfe_traffic_priority;
-static gint hf_sfe_max_str;
-static gint hf_sfe_max_traffic_burst;
-static gint hf_sfe_min_rtr;
-static gint hf_sfe_reserved_10;
-static gint hf_sfe_ul_grant_scheduling;
-static gint hf_sfe_req_tx_policy;
-static gint hf_sfe_policy_broadcast_bwr;
-static gint hf_sfe_policy_multicast_bwr;
-static gint hf_sfe_policy_piggyback;
-static gint hf_sfe_policy_fragment;
-static gint hf_sfe_policy_headers;
-static gint hf_sfe_policy_packing;
-static gint hf_sfe_policy_crc;
-static gint hf_sfe_policy_rsvd1;
-static gint hf_sfe_jitter;
-static gint hf_sfe_max_latency;
-static gint hf_sfe_fixed_len_sdu;
-static gint hf_sfe_sdu_size;
-static gint hf_sfe_target_said;
-static gint hf_sfe_cs_specification;
-static gint hf_sfe_type_of_data_delivery_services;
-static gint hf_sfe_sdu_inter_arrival_interval;
-static gint hf_sfe_time_base;
-static gint hf_sfe_paging_preference;
-static gint hf_sfe_mbs_zone_identifier_assignment;
-static gint hf_sfe_sn_feedback_enabled;
-static gint hf_sfe_harq_service_flows;
-static gint hf_sfe_harq_channel_mapping_index;
-static gint hf_sfe_fsn_size;
-static gint hf_sfe_unsolicited_grant_interval;
-static gint hf_sfe_unsolicited_polling_interval;
-/* static gint hf_sfe_harq_channel_mapping; */
-static gint hf_sfe_global_service_class_name;
-static gint hf_sfe_reserved_36;
-static gint hf_sfe_reserved_34;
-
-static gint hf_sfe_arq_enable;
-static gint hf_sfe_arq_transmitter_delay;
-static gint hf_sfe_arq_receiver_delay;
-static gint hf_sfe_arq_block_lifetime;
-static gint hf_sfe_arq_sync_loss_timeout;
-static gint hf_sfe_arq_transmitter_delay_cor2;
-static gint hf_sfe_arq_receiver_delay_cor2;
-static gint hf_sfe_arq_block_lifetime_cor2;
-static gint hf_sfe_arq_sync_loss_timeout_cor2;
-static gint hf_sfe_arq_deliver_in_order;
-static gint hf_sfe_arq_rx_purge_timeout;
-static gint hf_sfe_arq_window_size;
-static gint hf_sfe_arq_block_size;
-static gint hf_sfe_arq_block_size_cor2;
-static gint hf_sfe_arq_min_block_size;
-static gint hf_sfe_arq_max_block_size;
-
-/* static gint hf_sfe_cid_alloc_for_active_bs; */
-static gint hf_sfe_cid_alloc_for_active_bs_cid;
-static gint hf_sfe_pdu_sn_ext_subheader_reorder;
-static gint hf_sfe_mbs_contents_ids;
-static gint hf_sfe_mbs_contents_ids_id;
-static gint hf_sfe_authorization_token;
-
-static gint hf_cst_classifier_dsc_action;
-static gint hf_cst_error_set_errored_param;
-static gint hf_cst_error_set_error_code;
-static gint hf_cst_error_set_error_msg;
-
-static gint hf_cst_pkt_class_rule;
-
-static gint hf_cst_pkt_class_rule_priority;
-static gint hf_cst_pkt_class_rule_range_mask;
-static gint hf_cst_pkt_class_rule_tos_low;
-static gint hf_cst_pkt_class_rule_tos_high;
-static gint hf_cst_pkt_class_rule_tos_mask;
-static gint hf_cst_pkt_class_rule_protocol;
-/*static gint hf_cst_pkt_class_rule_protocol_number;*/
-static gint hf_cst_pkt_class_rule_ip_masked_src_address;
-static gint hf_cst_pkt_class_rule_ip_masked_dest_address;
-static gint hf_cst_pkt_class_rule_src_ipv4;
-static gint hf_cst_pkt_class_rule_dest_ipv4;
-static gint hf_cst_pkt_class_rule_mask_ipv4;
-static gint hf_cst_pkt_class_rule_src_ipv6;
-static gint hf_cst_pkt_class_rule_dest_ipv6;
-static gint hf_cst_pkt_class_rule_mask_ipv6;
-static gint hf_cst_pkt_class_rule_prot_src_port_range;
-static gint hf_cst_pkt_class_rule_src_port_low;
-static gint hf_cst_pkt_class_rule_src_port_high;
-static gint hf_cst_pkt_class_rule_prot_dest_port_range;
-static gint hf_cst_pkt_class_rule_dest_port_low;
-static gint hf_cst_pkt_class_rule_dest_port_high;
-static gint hf_cst_pkt_class_rule_dest_mac_address;
-static gint hf_cst_pkt_class_rule_dest_mac;
-static gint hf_cst_pkt_class_rule_src_mac_address;
-static gint hf_cst_pkt_class_rule_src_mac;
-static gint hf_cst_pkt_class_rule_mask_mac;
-static gint hf_cst_pkt_class_rule_ethertype;
-static gint hf_cst_pkt_class_rule_etype;
-static gint hf_cst_pkt_class_rule_eprot1;
-static gint hf_cst_pkt_class_rule_eprot2;
-static gint hf_cst_pkt_class_rule_user_priority;
-static gint hf_cst_pkt_class_rule_pri_low;
-static gint hf_cst_pkt_class_rule_pri_high;
-static gint hf_cst_pkt_class_rule_vlan_id;
-static gint hf_cst_pkt_class_rule_vlan_id1;
-static gint hf_cst_pkt_class_rule_vlan_id2;
-static gint hf_cst_pkt_class_rule_phsi;
-static gint hf_cst_pkt_class_rule_index;
-static gint hf_cst_pkt_class_rule_ipv6_flow_label;
-static gint hf_cst_pkt_class_rule_vendor_spec;
-static gint hf_cst_pkt_class_rule_classifier_action_rule;
-static gint hf_cst_pkt_class_rule_classifier_action_rule_bit0;
-static gint hf_cst_pkt_class_rule_classifier_action_rule_bit1;
-
-static gint hf_cst_large_context_id;
-static gint hf_cst_short_format_context_id;
-
-static gint hf_cst_phs_dsc_action;
-static gint hf_cst_phs_rule;
-static gint hf_cst_phs_phsi;
-static gint hf_cst_phs_phsf;
-static gint hf_cst_phs_phsm;
-static gint hf_cst_phs_phss;
-static gint hf_cst_phs_phsv;
-static gint hf_cst_phs_vendor_spec;
-static gint hf_cst_invalid_tlv;
-
-static gint hf_csper_atm_switching_encoding;
-static gint hf_csper_atm_classifier;
-static gint hf_csper_atm_classifier_vpi;
-static gint hf_csper_atm_classifier_vci;
-static gint hf_csper_atm_classifier_id;
-/*static gint hf_csper_atm_classifier_dsc_action;*/
-static gint hf_csper_unknown_type;
-
-static gint hf_xmac_tuple_rsvd;
-static gint hf_xmac_tuple_key_seq_num;
-static gint hf_hmac_tuple_hmac_digest;
-static gint hf_packet_number_counter;
-static gint hf_cmac_tuple_cmac_value;
-static gint hf_cmac_tuple_bsid;
+static int hf_sfe_unknown_type;
+static int hf_sfe_sf_id;
+static int hf_sfe_cid;
+static int hf_sfe_service_class_name;
+static int hf_sfe_mbs_service;
+static int hf_sfe_qos_params_set;
+static int hf_sfe_set_provisioned;
+static int hf_sfe_set_admitted;
+static int hf_sfe_set_active;
+static int hf_sfe_set_rsvd;
+static int hf_sfe_traffic_priority;
+static int hf_sfe_max_str;
+static int hf_sfe_max_traffic_burst;
+static int hf_sfe_min_rtr;
+static int hf_sfe_reserved_10;
+static int hf_sfe_ul_grant_scheduling;
+static int hf_sfe_req_tx_policy;
+static int hf_sfe_policy_broadcast_bwr;
+static int hf_sfe_policy_multicast_bwr;
+static int hf_sfe_policy_piggyback;
+static int hf_sfe_policy_fragment;
+static int hf_sfe_policy_headers;
+static int hf_sfe_policy_packing;
+static int hf_sfe_policy_crc;
+static int hf_sfe_policy_rsvd1;
+static int hf_sfe_jitter;
+static int hf_sfe_max_latency;
+static int hf_sfe_fixed_len_sdu;
+static int hf_sfe_sdu_size;
+static int hf_sfe_target_said;
+static int hf_sfe_cs_specification;
+static int hf_sfe_type_of_data_delivery_services;
+static int hf_sfe_sdu_inter_arrival_interval;
+static int hf_sfe_time_base;
+static int hf_sfe_paging_preference;
+static int hf_sfe_mbs_zone_identifier_assignment;
+static int hf_sfe_sn_feedback_enabled;
+static int hf_sfe_harq_service_flows;
+static int hf_sfe_harq_channel_mapping_index;
+static int hf_sfe_fsn_size;
+static int hf_sfe_unsolicited_grant_interval;
+static int hf_sfe_unsolicited_polling_interval;
+/* static int hf_sfe_harq_channel_mapping; */
+static int hf_sfe_global_service_class_name;
+static int hf_sfe_reserved_36;
+static int hf_sfe_reserved_34;
+
+static int hf_sfe_arq_enable;
+static int hf_sfe_arq_transmitter_delay;
+static int hf_sfe_arq_receiver_delay;
+static int hf_sfe_arq_block_lifetime;
+static int hf_sfe_arq_sync_loss_timeout;
+static int hf_sfe_arq_transmitter_delay_cor2;
+static int hf_sfe_arq_receiver_delay_cor2;
+static int hf_sfe_arq_block_lifetime_cor2;
+static int hf_sfe_arq_sync_loss_timeout_cor2;
+static int hf_sfe_arq_deliver_in_order;
+static int hf_sfe_arq_rx_purge_timeout;
+static int hf_sfe_arq_window_size;
+static int hf_sfe_arq_block_size;
+static int hf_sfe_arq_block_size_cor2;
+static int hf_sfe_arq_min_block_size;
+static int hf_sfe_arq_max_block_size;
+
+/* static int hf_sfe_cid_alloc_for_active_bs; */
+static int hf_sfe_cid_alloc_for_active_bs_cid;
+static int hf_sfe_pdu_sn_ext_subheader_reorder;
+static int hf_sfe_mbs_contents_ids;
+static int hf_sfe_mbs_contents_ids_id;
+static int hf_sfe_authorization_token;
+
+static int hf_cst_classifier_dsc_action;
+static int hf_cst_error_set_errored_param;
+static int hf_cst_error_set_error_code;
+static int hf_cst_error_set_error_msg;
+
+static int hf_cst_pkt_class_rule;
+
+static int hf_cst_pkt_class_rule_priority;
+static int hf_cst_pkt_class_rule_range_mask;
+static int hf_cst_pkt_class_rule_tos_low;
+static int hf_cst_pkt_class_rule_tos_high;
+static int hf_cst_pkt_class_rule_tos_mask;
+static int hf_cst_pkt_class_rule_protocol;
+/*static int hf_cst_pkt_class_rule_protocol_number;*/
+static int hf_cst_pkt_class_rule_ip_masked_src_address;
+static int hf_cst_pkt_class_rule_ip_masked_dest_address;
+static int hf_cst_pkt_class_rule_src_ipv4;
+static int hf_cst_pkt_class_rule_dest_ipv4;
+static int hf_cst_pkt_class_rule_mask_ipv4;
+static int hf_cst_pkt_class_rule_src_ipv6;
+static int hf_cst_pkt_class_rule_dest_ipv6;
+static int hf_cst_pkt_class_rule_mask_ipv6;
+static int hf_cst_pkt_class_rule_prot_src_port_range;
+static int hf_cst_pkt_class_rule_src_port_low;
+static int hf_cst_pkt_class_rule_src_port_high;
+static int hf_cst_pkt_class_rule_prot_dest_port_range;
+static int hf_cst_pkt_class_rule_dest_port_low;
+static int hf_cst_pkt_class_rule_dest_port_high;
+static int hf_cst_pkt_class_rule_dest_mac_address;
+static int hf_cst_pkt_class_rule_dest_mac;
+static int hf_cst_pkt_class_rule_src_mac_address;
+static int hf_cst_pkt_class_rule_src_mac;
+static int hf_cst_pkt_class_rule_mask_mac;
+static int hf_cst_pkt_class_rule_ethertype;
+static int hf_cst_pkt_class_rule_etype;
+static int hf_cst_pkt_class_rule_eprot1;
+static int hf_cst_pkt_class_rule_eprot2;
+static int hf_cst_pkt_class_rule_user_priority;
+static int hf_cst_pkt_class_rule_pri_low;
+static int hf_cst_pkt_class_rule_pri_high;
+static int hf_cst_pkt_class_rule_vlan_id;
+static int hf_cst_pkt_class_rule_vlan_id1;
+static int hf_cst_pkt_class_rule_vlan_id2;
+static int hf_cst_pkt_class_rule_phsi;
+static int hf_cst_pkt_class_rule_index;
+static int hf_cst_pkt_class_rule_ipv6_flow_label;
+static int hf_cst_pkt_class_rule_vendor_spec;
+static int hf_cst_pkt_class_rule_classifier_action_rule;
+static int hf_cst_pkt_class_rule_classifier_action_rule_bit0;
+static int hf_cst_pkt_class_rule_classifier_action_rule_bit1;
+
+static int hf_cst_large_context_id;
+static int hf_cst_short_format_context_id;
+
+static int hf_cst_phs_dsc_action;
+static int hf_cst_phs_rule;
+static int hf_cst_phs_phsi;
+static int hf_cst_phs_phsf;
+static int hf_cst_phs_phsm;
+static int hf_cst_phs_phss;
+static int hf_cst_phs_phsv;
+static int hf_cst_phs_vendor_spec;
+static int hf_cst_invalid_tlv;
+
+static int hf_csper_atm_switching_encoding;
+static int hf_csper_atm_classifier;
+static int hf_csper_atm_classifier_vpi;
+static int hf_csper_atm_classifier_vci;
+static int hf_csper_atm_classifier_id;
+/*static int hf_csper_atm_classifier_dsc_action;*/
+static int hf_csper_unknown_type;
+
+static int hf_xmac_tuple_rsvd;
+static int hf_xmac_tuple_key_seq_num;
+static int hf_hmac_tuple_hmac_digest;
+static int hf_packet_number_counter;
+static int hf_cmac_tuple_cmac_value;
+static int hf_cmac_tuple_bsid;
/* bit masks */
/* 11.13.4 */
@@ -577,33 +580,33 @@ static gint hf_cmac_tuple_bsid;
#define XMAC_TUPLE_KEY_SEQ_NUM 0x0F
/* WiMax Security Negotiation Parameters display */
-static gint hf_snp_pkm_version_support;
-static gint hf_snp_pkm_version_support_bit0;
-static gint hf_snp_pkm_version_support_bit1;
-static gint hf_snp_pkm_version_support_reserved;
-static gint hf_snp_auth_policy_support;
-static gint hf_snp_auth_policy_support_bit0;
-static gint hf_snp_auth_policy_support_bit1;
-static gint hf_snp_auth_policy_support_bit2;
-static gint hf_snp_auth_policy_support_bit3;
-static gint hf_snp_auth_policy_support_bit4;
-static gint hf_snp_auth_policy_support_bit5;
-static gint hf_snp_auth_policy_support_bit6;
-static gint hf_snp_auth_policy_support_bit7;
-static gint hf_snp_mac_mode;
-static gint hf_snp_mac_mode_bit0;
-static gint hf_snp_mac_mode_bit1;
-static gint hf_snp_mac_mode_bit1_rsvd;
-static gint hf_snp_mac_mode_bit2;
-static gint hf_snp_mac_mode_bit3;
-static gint hf_snp_mac_mode_bit4;
-static gint hf_snp_mac_mode_bit5;
-static gint hf_snp_mac_mode_reserved;
-static gint hf_snp_mac_mode_reserved1;
-static gint hf_snp_pn_window_size;
-static gint hf_snp_max_conc_transactions;
-static gint hf_snp_max_suppt_sec_assns;
-static gint hf_snp_unknown_type;
+static int hf_snp_pkm_version_support;
+static int hf_snp_pkm_version_support_bit0;
+static int hf_snp_pkm_version_support_bit1;
+static int hf_snp_pkm_version_support_reserved;
+static int hf_snp_auth_policy_support;
+static int hf_snp_auth_policy_support_bit0;
+static int hf_snp_auth_policy_support_bit1;
+static int hf_snp_auth_policy_support_bit2;
+static int hf_snp_auth_policy_support_bit3;
+static int hf_snp_auth_policy_support_bit4;
+static int hf_snp_auth_policy_support_bit5;
+static int hf_snp_auth_policy_support_bit6;
+static int hf_snp_auth_policy_support_bit7;
+static int hf_snp_mac_mode;
+static int hf_snp_mac_mode_bit0;
+static int hf_snp_mac_mode_bit1;
+static int hf_snp_mac_mode_bit1_rsvd;
+static int hf_snp_mac_mode_bit2;
+static int hf_snp_mac_mode_bit3;
+static int hf_snp_mac_mode_bit4;
+static int hf_snp_mac_mode_bit5;
+static int hf_snp_mac_mode_reserved;
+static int hf_snp_mac_mode_reserved1;
+static int hf_snp_pn_window_size;
+static int hf_snp_max_conc_transactions;
+static int hf_snp_max_suppt_sec_assns;
+static int hf_snp_unknown_type;
/* bit masks */
/* 11.8.4.1 */
@@ -630,63 +633,63 @@ static gint hf_snp_unknown_type;
#define SNP_MAC_MODE_RSV1 0xC0
/* PKM display */
-static gint hf_pkm_msg_unknown_type;
-static gint hf_pkm_msg_attr_display;
-static gint hf_pkm_config_settings_authorize_waitout;
-static gint hf_pkm_config_settings_reauthorize_waitout;
-static gint hf_pkm_config_settings_grace_time;
-static gint hf_pkm_config_settings_operational_waittime;
-static gint hf_pkm_msg_attr_auth_key;
-static gint hf_pkm_msg_attr_tek;
-static gint hf_pkm_msg_attr_key_life_time;
-static gint hf_pkm_msg_attr_key_seq_num;
-static gint hf_pkm_msg_attr_hmac_digest;
-static gint hf_pkm_msg_attr_said;
-static gint hf_pkm_msg_attr_cbc_iv;
-static gint hf_pkm_msg_attr_error_code;
-static gint hf_pkm_msg_attr_ca_certificate;
-static gint hf_pkm_msg_attr_ss_certificate;
-static gint hf_pkm_attr_auth_result_code;
-static gint hf_pkm_attr_sa_service_type;
-static gint hf_pkm_attr_frame_number;
-static gint hf_pkm_attr_ss_random;
-static gint hf_pkm_attr_bs_random;
-static gint hf_pkm_attr_pre_pak;
-static gint hf_pkm_attr_bs_certificate;
-static gint hf_pkm_attr_sig_bs;
-static gint hf_pkm_attr_ms_mac_address;
-static gint hf_pkm_attr_cmac_digest;
-static gint hf_pkm_attr_cmac_digest_pn;
-static gint hf_pkm_attr_cmac_digest_value;
-static gint hf_pkm_attr_eap_payload;
-static gint hf_pkm_attr_nonce;
-static gint hf_pkm_sa_type;
-static gint hf_pkm_msg_crypto_suite;
-static gint hf_pkm_msg_crypto_suite_msb;
-static gint hf_pkm_msg_crypto_suite_middle;
-static gint hf_pkm_msg_crypto_suite_lsb;
-/*static gint hf_pkm_msg_version;*/
-static gint hf_pkm_attr_push_modes;
-static gint hf_pkm_attr_key_push_counter;
-static gint hf_pkm_attr_gkek;
-static gint hf_pkm_attr_sig_ss;
-static gint hf_pkm_attr_akid;
-static gint hf_pkm_config_settings_rekey_wait_timeout;
-static gint hf_pkm_config_settings_tek_grace_time;
-static gint hf_pkm_config_settings_authorize_reject_wait_timeout;
-
-/* static gint hf_pkm_attr_pak_ak_seq_number; */
-static gint hf_pkm_attr_associated_gkek_seq_number;
-/* static gint hf_pkm_attr_gkek_params; */
-
-/* static gint hf_common_tlv_unknown_type; */
-static gint hf_common_tlv_mac_version;
-static gint hf_common_tlv_vendor_id;
-static gint hf_common_tlv_vendor_specific_type;
-static gint hf_common_tlv_vendor_specific_length;
-static gint hf_common_tlv_vendor_specific_length_size;
-static gint hf_common_tlv_vendor_specific_value;
-static gint hf_common_current_transmitted_power;
+static int hf_pkm_msg_unknown_type;
+static int hf_pkm_msg_attr_display;
+static int hf_pkm_config_settings_authorize_waitout;
+static int hf_pkm_config_settings_reauthorize_waitout;
+static int hf_pkm_config_settings_grace_time;
+static int hf_pkm_config_settings_operational_waittime;
+static int hf_pkm_msg_attr_auth_key;
+static int hf_pkm_msg_attr_tek;
+static int hf_pkm_msg_attr_key_life_time;
+static int hf_pkm_msg_attr_key_seq_num;
+static int hf_pkm_msg_attr_hmac_digest;
+static int hf_pkm_msg_attr_said;
+static int hf_pkm_msg_attr_cbc_iv;
+static int hf_pkm_msg_attr_error_code;
+static int hf_pkm_msg_attr_ca_certificate;
+static int hf_pkm_msg_attr_ss_certificate;
+static int hf_pkm_attr_auth_result_code;
+static int hf_pkm_attr_sa_service_type;
+static int hf_pkm_attr_frame_number;
+static int hf_pkm_attr_ss_random;
+static int hf_pkm_attr_bs_random;
+static int hf_pkm_attr_pre_pak;
+static int hf_pkm_attr_bs_certificate;
+static int hf_pkm_attr_sig_bs;
+static int hf_pkm_attr_ms_mac_address;
+static int hf_pkm_attr_cmac_digest;
+static int hf_pkm_attr_cmac_digest_pn;
+static int hf_pkm_attr_cmac_digest_value;
+static int hf_pkm_attr_eap_payload;
+static int hf_pkm_attr_nonce;
+static int hf_pkm_sa_type;
+static int hf_pkm_msg_crypto_suite;
+static int hf_pkm_msg_crypto_suite_msb;
+static int hf_pkm_msg_crypto_suite_middle;
+static int hf_pkm_msg_crypto_suite_lsb;
+/*static int hf_pkm_msg_version;*/
+static int hf_pkm_attr_push_modes;
+static int hf_pkm_attr_key_push_counter;
+static int hf_pkm_attr_gkek;
+static int hf_pkm_attr_sig_ss;
+static int hf_pkm_attr_akid;
+static int hf_pkm_config_settings_rekey_wait_timeout;
+static int hf_pkm_config_settings_tek_grace_time;
+static int hf_pkm_config_settings_authorize_reject_wait_timeout;
+
+/* static int hf_pkm_attr_pak_ak_seq_number; */
+static int hf_pkm_attr_associated_gkek_seq_number;
+/* static int hf_pkm_attr_gkek_params; */
+
+/* static int hf_common_tlv_unknown_type; */
+static int hf_common_tlv_mac_version;
+static int hf_common_tlv_vendor_id;
+static int hf_common_tlv_vendor_specific_type;
+static int hf_common_tlv_vendor_specific_length;
+static int hf_common_tlv_vendor_specific_length_size;
+static int hf_common_tlv_vendor_specific_value;
+static int hf_common_current_transmitted_power;
static expert_field ei_common_tlv_info;
@@ -738,15 +741,15 @@ void wimax_proto_register_wimax_utility_decoders(void)
},
{ /* 7 Maximum Sustained Traffic Rate */
&hf_sfe_max_str,
- {"Maximum Sustained Traffic Rate", "wmx.sfe.msr", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_bit_sec, 0x0, NULL, HFILL}
+ {"Maximum Sustained Traffic Rate", "wmx.sfe.msr", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_bit_sec), 0x0, NULL, HFILL}
},
{ /* 8 Maximum Traffic Burst */
&hf_sfe_max_traffic_burst,
- {"Maximum Traffic Burst", "wmx.sfe.max_traffic_burst", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_byte_bytes, 0x0, NULL, HFILL}
+ {"Maximum Traffic Burst", "wmx.sfe.max_traffic_burst", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_byte_bytes), 0x0, NULL, HFILL}
},
{ /* 9 Minimum Reserved Traffic Rate */
&hf_sfe_min_rtr,
- {"Minimum Reserved Traffic Rate", "wmx.sfe.mrr", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_bit_sec, 0x0, NULL, HFILL}
+ {"Minimum Reserved Traffic Rate", "wmx.sfe.mrr", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_bit_sec), 0x0, NULL, HFILL}
},
{
/* 10 Reserved */
@@ -801,11 +804,11 @@ void wimax_proto_register_wimax_utility_decoders(void)
},
{ /* 13 Tolerated Jitter */
&hf_sfe_jitter,
- {"Tolerated Jitter", "wmx.sfe.jitter", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ {"Tolerated Jitter", "wmx.sfe.jitter", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_ms), 0x0, NULL, HFILL}
},
{ /* 14 Maximum Latency */
&hf_sfe_max_latency,
- {"Maximum Latency", "wmx.sfe.max_latency", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ {"Maximum Latency", "wmx.sfe.max_latency", FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_ms), 0x0, NULL, HFILL}
},
{ /* 15 Fixed/Variable Length SDU */
&hf_sfe_fixed_len_sdu,
@@ -813,7 +816,7 @@ void wimax_proto_register_wimax_utility_decoders(void)
},
{ /* 16 SDU Size */
&hf_sfe_sdu_size,
- {"SDU Size", "wmx.sfe.sdu_size", FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &wimax_units_byte_bytes, 0x0, NULL, HFILL}
+ {"SDU Size", "wmx.sfe.sdu_size", FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_byte_bytes), 0x0, NULL, HFILL}
},
{ /* 17 SAID Onto Which SF Is Mapped */
&hf_sfe_target_said,
@@ -898,7 +901,7 @@ void wimax_proto_register_wimax_utility_decoders(void)
},
{ /* 31 Time Base */
&hf_sfe_time_base,
- {"Time Base", "wmx.sfe.time_base", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ {"Time Base", "wmx.sfe.time_base", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_ms), 0x0, NULL, HFILL}
},
{ /* 32 Paging Preference */
&hf_sfe_paging_preference,
@@ -942,11 +945,11 @@ void wimax_proto_register_wimax_utility_decoders(void)
},
{ /* 40 Unsolicited Grant Interval */
&hf_sfe_unsolicited_grant_interval,
- {"Unsolicited Grant Interval", "wmx.sfe.unsolicited_grant_interval", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ {"Unsolicited Grant Interval", "wmx.sfe.unsolicited_grant_interval", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_ms), 0x0, NULL, HFILL}
},
{ /* 41 Unsolicited Polling Interval */
&hf_sfe_unsolicited_polling_interval,
- {"Unsolicited Polling Interval", "wmx.sfe.unsolicited_polling_interval", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &wimax_units_ms, 0x0, NULL, HFILL}
+ {"Unsolicited Polling Interval", "wmx.sfe.unsolicited_polling_interval", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&wimax_units_ms), 0x0, NULL, HFILL}
},
{ /* 42 PDU SN extended subheader for HARQ reordering */
&hf_sfe_pdu_sn_ext_subheader_reorder,
@@ -1712,9 +1715,9 @@ void wimax_proto_register_wimax_utility_decoders(void)
/**************************************************************/
void wimax_error_parameter_set_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len;
+ int tlv_type;
proto_item *ceps_item = NULL;
proto_tree *ceps_tree = NULL;
tlv_info_t tlv_info;
@@ -1780,17 +1783,17 @@ void wimax_error_parameter_set_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
/* pinfo - pointer of Wireshark packet information structure */
/****************************************************************/
/* CS Parameter Encoding Rules handling function */
-void wimax_convengence_service_parameter_encoding_rules_decoder(guint sfe_type, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+void wimax_convengence_service_parameter_encoding_rules_decoder(unsigned sfe_type, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset, tlv_offset;
- guint tvb_len, tlv_len, length;
- gint tlv_type;
+ unsigned offset, tlv_offset;
+ unsigned tvb_len, tlv_len, length;
+ int tlv_type;
proto_item *csper_item;
proto_tree *csper_tree;
proto_tree *tlv_tree, *ti_tree;
proto_item *tlv_item, *ti_item;
tlv_info_t tlv_info;
- gboolean ipv6 = ((sfe_type == SFE_CSPER_PACKET_IPV6) || (sfe_type == SFE_CSPER_PACKET_IPV6_802_3) || (sfe_type == SFE_CSPER_PACKET_IPV6_802_1Q));
+ bool ipv6 = ((sfe_type == SFE_CSPER_PACKET_IPV6) || (sfe_type == SFE_CSPER_PACKET_IPV6_802_3) || (sfe_type == SFE_CSPER_PACKET_IPV6_802_1Q));
/* sanity check */
if((sfe_type < SFE_CSPER_ATM) || (sfe_type > SFE_CSPER_PACKET_IP_802_3_ECRTP_COMPRESSION))
@@ -2129,10 +2132,10 @@ void wimax_convengence_service_parameter_encoding_rules_decoder(guint sfe_type,
/**************************************************************/
void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset, i;
- guint tvb_len, tlv_len, tlv_value_offset, tlv_value;
- gint tlv_type;
- guint value;
+ unsigned offset, i;
+ unsigned tvb_len, tlv_len, tlv_value_offset, tlv_value;
+ int tlv_type;
+ unsigned value;
proto_item *tlv_item = NULL;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
@@ -2216,7 +2219,7 @@ void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
break;
case SFE_UL_SCHEDULING:
/* TODO: Find a way to get the correct service type from the TLV */
- tlv_value = tvb_get_guint8(tvb, offset);
+ tlv_value = tvb_get_uint8(tvb, offset);
set_service_type( tlv_value );
add_tlv_subtree(&tlv_info, tree, hf_sfe_ul_grant_scheduling, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
@@ -2244,7 +2247,7 @@ void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
break;
case SFE_SDU_SIZE:
/* save the SDU size */
- mac_sdu_length = tvb_get_guint8(tvb, offset);
+ mac_sdu_length = tvb_get_uint8(tvb, offset);
add_tlv_subtree(&tlv_info, tree, hf_sfe_sdu_size, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
break;
case SFE_TARGET_SAID:
@@ -2308,7 +2311,7 @@ void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
tlv_item = add_tlv_subtree(&tlv_info, tree, hf_sfe_arq_block_size_cor2, tvb, offset-tlv_value_offset, ENC_BIG_ENDIAN);
/* add TLV subtree */
tlv_tree = proto_item_add_subtree(tlv_item, ett_wimax_service_flow_encodings);
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
tlv_item = proto_tree_add_item(tlv_tree, hf_sfe_arq_min_block_size, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Size is 2^((value & 0x0F) + 4)) */
proto_item_append_text(tlv_item, " ( %d bytes )", 0x10 << (value & 0x0F));
@@ -2425,9 +2428,9 @@ void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, pro
/* offset - the HMAC Tuple offset in the tvb */
/* length - length of the HMAC Tuple */
/**************************************************************/
-void wimax_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length)
+void wimax_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, unsigned offset, unsigned length)
{
- guint hmac_offset;
+ unsigned hmac_offset;
proto_item *hmac_item = NULL;
proto_tree *hmac_tree = NULL;
@@ -2453,9 +2456,9 @@ void wimax_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, gui
/* offset - the CMAC Tuple offset in the tvb */
/* length - length of the CMAC Tuple */
/**************************************************************/
-void wimax_cmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length)
+void wimax_cmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, unsigned offset, unsigned length)
{
- guint cmac_offset;
+ unsigned cmac_offset;
proto_item *cmac_item = NULL;
proto_tree *cmac_tree = NULL;
@@ -2488,9 +2491,9 @@ void wimax_cmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, gui
/* offset - the Short-HMAC Tuple offset in the tvb */
/* length - length of the Short-HMAC Tuple */
/******************************************************************/
-void wimax_short_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length)
+void wimax_short_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, unsigned offset, unsigned length)
{
- guint hmac_offset;
+ unsigned hmac_offset;
proto_item *hmac_item = NULL;
proto_tree *hmac_tree = NULL;
@@ -2519,9 +2522,9 @@ void wimax_short_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offse
/******************************************************************/
void wimax_security_negotiation_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
proto_tree *tlv_tree;
proto_item *tlv_item;
tlv_info_t tlv_info;
@@ -2636,9 +2639,9 @@ void wimax_security_negotiation_parameters_decoder(tvbuff_t *tvb, packet_info *p
/******************************************************************/
void wimax_cryptographic_suite_list_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
proto_tree *tlv_tree;
proto_item *tlv_item;
tlv_info_t tlv_info;
@@ -2704,9 +2707,9 @@ void wimax_cryptographic_suite_list_decoder(tvbuff_t *tvb, packet_info *pinfo, p
/******************************************************************/
void wimax_pkm_tlv_encoded_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
proto_tree *tlv_tree;
proto_item *tlv_item;
tlv_info_t tlv_info;
@@ -2803,7 +2806,7 @@ void wimax_pkm_tlv_encoded_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo,
/* add subtree */
wimax_cryptographic_suite_list_decoder(tvb_new_subset_length(tvb, offset, tlv_len), pinfo, tlv_tree);
break;
-#if 0 /* rserved by IEE 802.16E */
+#if 0 /* reserved by IEE 802.16E */
case PKM_ATTR_VERSION:
proto_tree_add_item(tree, hf_pkm_msg_version, tvb, offset, tlv_len, ENC_BIG_ENDIAN);
break;
@@ -2902,9 +2905,9 @@ void wimax_pkm_tlv_encoded_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo,
/******************************************************************/
void wimax_tek_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
tlv_info_t tlv_info;
/* get the tvb reported length */
@@ -2974,9 +2977,9 @@ void wimax_tek_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/******************************************************************/
void wimax_pkm_configuration_settings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
tlv_info_t tlv_info;
/* get the tvb reported length */
@@ -3052,9 +3055,9 @@ void wimax_pkm_configuration_settings_decoder(tvbuff_t *tvb, packet_info *pinfo,
/******************************************************************/
void wimax_sa_descriptor_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
proto_tree *tlv_tree;
proto_item *tlv_item;
tlv_info_t tlv_info;
@@ -3130,9 +3133,9 @@ void wimax_sa_descriptor_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
/******************************************************************/
void wimax_security_capabilities_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
@@ -3193,9 +3196,9 @@ void wimax_security_capabilities_decoder(tvbuff_t *tvb, packet_info *pinfo, prot
/******************************************************************/
void wimax_vendor_specific_information_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
tlv_info_t tlv_info;
/* get the tvb reported length */
@@ -3272,14 +3275,14 @@ void wimax_vendor_specific_information_decoder(tvbuff_t *tvb, packet_info *pinfo
/* tree - pointer of Wireshark display tree */
/* pinfo - pointer of Wireshark packet information structure */
/******************************************************************/
-guint wimax_common_tlv_encoding_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+unsigned wimax_common_tlv_encoding_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint offset, value;
- guint tvb_len, tlv_len, tlv_value_offset;
- gint tlv_type;
+ unsigned offset, value;
+ unsigned tvb_len, tlv_len, tlv_value_offset;
+ int tlv_type;
proto_tree *tlv_tree = NULL;
tlv_info_t tlv_info;
- gfloat current_power;
+ float current_power;
/* get the tvb reported length */
tvb_len = tvb_reported_length(tvb);
@@ -3344,8 +3347,8 @@ guint wimax_common_tlv_encoding_decoder(tvbuff_t *tvb, packet_info *pinfo, proto
break;
case CURRENT_TX_POWER:
tlv_tree = add_tlv_subtree_no_item(&tlv_info, tree, hf_common_current_transmitted_power, tvb, offset-tlv_value_offset);
- value = tvb_get_guint8(tvb, offset);
- current_power = (gfloat)((value - 128) / 2.0);
+ value = tvb_get_uint8(tvb, offset);
+ current_power = (float)((value - 128) / 2.0);
proto_tree_add_float_format_value(tlv_tree, hf_common_current_transmitted_power, tvb, offset, tvb_len, current_power, "%.2f dBm (Value: 0x%x)", current_power, value);
break;
case MAC_VERSION_ENCODING:
diff --git a/plugins/epan/wimax/wimax_utils.h b/plugins/epan/wimax/wimax_utils.h
index 0a78e22398..ef41dd3c19 100644
--- a/plugins/epan/wimax/wimax_utils.h
+++ b/plugins/epan/wimax/wimax_utils.h
@@ -15,24 +15,26 @@
#define WIMAX_UTILS_H
#include <epan/packet.h>
+#include <epan/unit_strings.h>
-extern void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb, guint tlv_offset, guint tlv_len, packet_info *pinfo, guint offset, gint proto_registry);
-extern void dissect_power_saving_class(proto_tree *rng_req_tree, gint tlv_type, tvbuff_t *tvb, guint compound_tlv_len, packet_info *pinfo, guint offset);
-extern gint dissect_ulmap_ie(proto_tree *ie_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb);
-extern guint get_service_type(void);
+#include <wsutil/array.h>
+extern void dissect_extended_tlv(proto_tree *reg_req_tree, int tlv_type, tvbuff_t *tvb, unsigned tlv_offset, unsigned tlv_len, packet_info *pinfo, unsigned offset, int proto_registry);
+extern void dissect_power_saving_class(proto_tree *rng_req_tree, int tlv_type, tvbuff_t *tvb, unsigned compound_tlv_len, packet_info *pinfo, unsigned offset);
+extern int dissect_ulmap_ie(proto_tree *ie_tree, packet_info* pinfo, int offset, int length, tvbuff_t *tvb);
+extern unsigned get_service_type(void);
extern void init_wimax_globals(void); /* defined in msg_ulmap.c */
-extern gboolean is_down_link(packet_info *pinfo);
-extern gint RCID_IE(proto_tree *diuc_tree, gint offset, gint length, tvbuff_t *tvb, gint RCID_Type);
+extern bool is_down_link(packet_info *pinfo);
+extern int RCID_IE(proto_tree *diuc_tree, int offset, int length, tvbuff_t *tvb, int RCID_Type);
extern void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern void wimax_convengence_service_parameter_encoding_rules_decoder(guint sfe_type, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern gint wimax_decode_ulmapc(proto_tree *base_tree, packet_info* pinfo, gint offset, gint length, tvbuff_t *tvb);
-extern gint wimax_decode_ulmap_reduced_aas(proto_tree *ie_tree, gint offset, gint length, tvbuff_t *tvb);
-extern gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree);
-extern gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree);
+extern void wimax_convengence_service_parameter_encoding_rules_decoder(unsigned sfe_type, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern int wimax_decode_ulmapc(proto_tree *base_tree, packet_info* pinfo, int offset, int length, tvbuff_t *tvb);
+extern int wimax_decode_ulmap_reduced_aas(proto_tree *ie_tree, int offset, int length, tvbuff_t *tvb);
+extern int wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdu_tree);
+extern int wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree);
extern void wimax_error_parameter_set_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern void wimax_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length);
-extern void wimax_cmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length);
-extern void wimax_short_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, guint offset, guint length);
+extern void wimax_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, unsigned offset, unsigned length);
+extern void wimax_cmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, unsigned offset, unsigned length);
+extern void wimax_short_hmac_tuple_decoder(proto_tree *tree, tvbuff_t *tvb, unsigned offset, unsigned length);
extern void wimax_security_negotiation_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void wimax_tek_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void wimax_pkm_configuration_settings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
@@ -41,7 +43,7 @@ extern void wimax_pkm_tlv_encoded_attributes_decoder(tvbuff_t *tvb, packet_info
extern void wimax_cryptographic_suite_list_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void wimax_security_capabilities_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
extern void wimax_vendor_specific_information_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-extern guint wimax_common_tlv_encoding_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+extern unsigned wimax_common_tlv_encoding_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
//Windows can't handle plugins using globals from epan, so copies are necessary
extern const unit_name_string wimax_units_byte_bytes;
diff --git a/plugins/epan/wimaxasncp/CMakeLists.txt b/plugins/epan/wimaxasncp/CMakeLists.txt
index 9bfe3f5ebf..4775ef9876 100644
--- a/plugins/epan/wimaxasncp/CMakeLists.txt
+++ b/plugins/epan/wimaxasncp/CMakeLists.txt
@@ -33,11 +33,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "WiMAX ASN Control Plane dissection"
${DISSECTOR_SRC}
)
-add_wireshark_epan_plugin_library(wimaxasncp)
+add_wireshark_plugin_library(wimaxasncp epan)
target_link_libraries(wimaxasncp epan)
diff --git a/plugins/epan/wimaxasncp/packet-wimaxasncp.c b/plugins/epan/wimaxasncp/packet-wimaxasncp.c
index ced1ceb520..156856b3c6 100644
--- a/plugins/epan/wimaxasncp/packet-wimaxasncp.c
+++ b/plugins/epan/wimaxasncp/packet-wimaxasncp.c
@@ -70,27 +70,27 @@ static int hf_wimaxasncp_tlv_value_bitflags32;
/* static int hf_wimaxasncp_tlv_value_vendor_id; */
/* Preferences */
-static gboolean show_transaction_id_d_bit = FALSE;
-static gboolean debug_enabled = FALSE;
+static bool show_transaction_id_d_bit;
+static bool debug_enabled;
/* Default WiMAX ASN control protocol port */
#define WIMAXASNCP_DEF_UDP_PORT 2231
/* Initialize the subtree pointers */
-static gint ett_wimaxasncp;
-static gint ett_wimaxasncp_flags;
-static gint ett_wimaxasncp_tlv;
-static gint ett_wimaxasncp_tlv_value_bitflags8;
-static gint ett_wimaxasncp_tlv_value_bitflags16;
-static gint ett_wimaxasncp_tlv_value_bitflags32;
-static gint ett_wimaxasncp_tlv_protocol_list;
-static gint ett_wimaxasncp_tlv_port_range_list;
-static gint ett_wimaxasncp_tlv_ip_address_mask_list;
-static gint ett_wimaxasncp_tlv_ip_address_mask;
-static gint ett_wimaxasncp_tlv_eap;
-static gint ett_wimaxasncp_tlv_vendor_specific_information_field;
-static gint ett_wimaxasncp_port_range;
+static int ett_wimaxasncp;
+static int ett_wimaxasncp_flags;
+static int ett_wimaxasncp_tlv;
+static int ett_wimaxasncp_tlv_value_bitflags8;
+static int ett_wimaxasncp_tlv_value_bitflags16;
+static int ett_wimaxasncp_tlv_value_bitflags32;
+static int ett_wimaxasncp_tlv_protocol_list;
+static int ett_wimaxasncp_tlv_port_range_list;
+static int ett_wimaxasncp_tlv_ip_address_mask_list;
+static int ett_wimaxasncp_tlv_ip_address_mask;
+static int ett_wimaxasncp_tlv_eap;
+static int ett_wimaxasncp_tlv_vendor_specific_information_field;
+static int ett_wimaxasncp_port_range;
static expert_field ei_wimaxasncp_tlv_type;
static expert_field ei_wimaxasncp_function_type;
@@ -116,7 +116,7 @@ typedef struct {
wmem_array_t* ett;
} wimaxasncp_build_dict_t;
-static wimaxasncp_dict_t *wimaxasncp_dict = NULL;
+static wimaxasncp_dict_t *wimaxasncp_dict;
wimaxasncp_build_dict_t wimaxasncp_build_dict;
@@ -182,7 +182,7 @@ static const value_string wimaxasncp_op_id_vals[] =
/* struct to hold a value_string tuple, per version */
typedef struct _ver_value_string
{
- guint32 since;
+ uint32_t since;
value_string vs;
} ver_value_string;
@@ -440,9 +440,9 @@ static const ver_value_string wimaxasncp_accounting_msg_vals_r1v121[] =
/* supported NWG versions */
static const enum_val_t wimaxasncp_nwg_versions[] = {
- { "Release 1.0, Version 1.0.0" , "R1.0 v1.0.0" , WIMAXASNCP_NWGVER_R10_V100 },
- { "Release 1.0, Version 1.2.0" , "R1.0 v1.2.0" , WIMAXASNCP_NWGVER_R10_V120 },
- { "Release 1.0, Version 1.2.1" , "R1.0 v1.2.1" , WIMAXASNCP_NWGVER_R10_V121 },
+ { "R1.0_v1.0.0", "Release 1.0, Version 1.0.0", WIMAXASNCP_NWGVER_R10_V100 },
+ { "R1.0_v1.2.0", "Release 1.0, Version 1.2.0", WIMAXASNCP_NWGVER_R10_V120 },
+ { "R1.0_v1.2.1", "Release 1.0, Version 1.2.1", WIMAXASNCP_NWGVER_R10_V121 },
{ NULL, NULL, 0 }
};
@@ -450,12 +450,12 @@ static const enum_val_t wimaxasncp_nwg_versions[] = {
/* NWG version */
#define WIMAXASNCP_DEF_NWGVER WIMAXASNCP_NWGVER_R10_V121
-static guint global_wimaxasncp_nwg_ver = WIMAXASNCP_DEF_NWGVER;
+static unsigned global_wimaxasncp_nwg_ver = WIMAXASNCP_DEF_NWGVER;
/* ========================================================================= */
typedef struct {
- guint8 function_type;
+ uint8_t function_type;
const ver_value_string *vals;
} wimaxasncp_func_msg_t;
@@ -479,7 +479,7 @@ static const wimaxasncp_func_msg_t wimaxasncp_func_to_msg_vals_map[] =
/* ========================================================================= */
static const wimaxasncp_dict_tlv_t *wimaxasncp_get_tlv_info(
- guint16 type)
+ uint16_t type)
{
wimaxasncp_dict_tlv_t *res = NULL;
@@ -514,9 +514,9 @@ static const wimaxasncp_dict_tlv_t *wimaxasncp_get_tlv_info(
/* ========================================================================= */
-static const gchar *wimaxasncp_get_enum_name(
+static const char *wimaxasncp_get_enum_name(
const wimaxasncp_dict_tlv_t *tlv_info,
- guint32 code)
+ uint32_t code)
{
if (tlv_info->enum_vs)
{
@@ -568,12 +568,12 @@ static void wimaxasncp_proto_tree_add_tlv_ipv4_value(
tvbuff_t *tvb,
proto_tree *tree,
proto_item *tlv_item,
- guint offset,
+ unsigned offset,
const wimaxasncp_dict_tlv_t *tlv_info)
{
int hf_value;
- guint32 ip;
- const gchar *addr_res;
+ uint32_t ip;
+ const char *addr_res;
if (tlv_info->hf_ipv4 > 0)
{
@@ -603,12 +603,12 @@ static void wimaxasncp_proto_tree_add_tlv_ipv6_value(
tvbuff_t *tvb,
proto_tree *tree,
proto_item *tlv_item,
- guint offset,
+ unsigned offset,
const wimaxasncp_dict_tlv_t *tlv_info)
{
int hf_value;
ws_in6_addr ip;
- const gchar *addr_res;
+ const char *addr_res;
if (tlv_info->hf_ipv4 > 0)
{
@@ -638,13 +638,13 @@ static void wimaxasncp_proto_tree_add_ether_value(
tvbuff_t *tvb,
proto_tree *tree,
proto_item *tlv_item,
- guint offset,
- guint length,
+ unsigned offset,
+ unsigned length,
const wimaxasncp_dict_tlv_t *tlv_info)
{
int hf_value;
- const guint8 *p;
- const gchar *ether_name;
+ const uint8_t *p;
+ const char *ether_name;
if (tlv_info->hf_bsid > 0)
{
@@ -678,10 +678,10 @@ static void wimaxasncp_dissect_tlv_value(
proto_item *tlv_item,
const wimaxasncp_dict_tlv_t *tlv_info)
{
- guint offset = 0;
- guint length;
- const guint max_show_bytes = 24; /* arbitrary */
- static const gchar *hex_note = "[hex]";
+ unsigned offset = 0;
+ unsigned length;
+ const unsigned max_show_bytes = 24; /* arbitrary */
+ static const char *hex_note = "[hex]";
length = tvb_reported_length(tvb);
@@ -706,10 +706,10 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint8 value;
- const gchar *s;
+ uint8_t value;
+ const char *s;
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
s = wimaxasncp_get_enum_name(tlv_info, value);
@@ -742,8 +742,8 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint16 value;
- const gchar *s;
+ uint16_t value;
+ const char *s;
value = tvb_get_ntohs(tvb, offset);
@@ -778,8 +778,8 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint32 value;
- const gchar *s;
+ uint32_t value;
+ const char *s;
value = tvb_get_ntohl(tvb, offset);
@@ -815,7 +815,7 @@ static void wimaxasncp_dissect_tlv_value(
{
if (tree)
{
- const gchar *s = tvb_get_string_enc(pinfo->pool, tvb, offset, length, ENC_ASCII);
+ const char *s = tvb_get_string_enc(pinfo->pool, tvb, offset, length, ENC_ASCII);
proto_tree_add_string_format(
tree, tlv_info->hf_value,
@@ -855,10 +855,10 @@ static void wimaxasncp_dissect_tlv_value(
{
proto_tree *flags_tree;
proto_item *item;
- guint8 value;
- guint i;
+ uint8_t value;
+ unsigned i;
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
item = proto_tree_add_item(
tree, tlv_info->hf_value,
@@ -873,12 +873,12 @@ static void wimaxasncp_dissect_tlv_value(
for (i = 0; i < 8; ++i)
{
- guint8 mask;
+ uint8_t mask;
mask = 1U << (7 - i);
if (value & mask)
{
- const gchar *s;
+ const char *s;
s = wimaxasncp_get_enum_name(tlv_info, value & mask);
@@ -910,8 +910,8 @@ static void wimaxasncp_dissect_tlv_value(
{
proto_tree *flags_tree;
proto_item *item;
- guint16 value;
- guint i;
+ uint16_t value;
+ unsigned i;
value = tvb_get_ntohs(tvb, offset);
@@ -928,12 +928,12 @@ static void wimaxasncp_dissect_tlv_value(
for (i = 0; i < 16; ++i)
{
- guint16 mask;
+ uint16_t mask;
mask = 1U << (15 - i);
if (value & mask)
{
- const gchar *s;
+ const char *s;
s = wimaxasncp_get_enum_name(tlv_info, value & mask);
@@ -965,8 +965,8 @@ static void wimaxasncp_dissect_tlv_value(
{
proto_tree *flags_tree;
proto_item *item;
- guint32 value;
- guint i;
+ uint32_t value;
+ unsigned i;
value = tvb_get_ntohl(tvb, offset);
@@ -983,12 +983,12 @@ static void wimaxasncp_dissect_tlv_value(
for (i = 0; i < 32; ++i)
{
- guint32 mask;
+ uint32_t mask;
mask = 1U << (31 - i);
if (value & mask)
{
- const gchar *s;
+ const char *s;
s = wimaxasncp_get_enum_name(tlv_info, value & mask);
proto_tree_add_uint_format(
@@ -1049,7 +1049,7 @@ static void wimaxasncp_dissect_tlv_value(
tvb, offset, length, ENC_NA);
if (length) {
- const gchar* format;
+ const char* format;
if (length <= max_show_bytes)
{
format = " - %s";
@@ -1058,7 +1058,7 @@ static void wimaxasncp_dissect_tlv_value(
{
format = " - %s...";
}
- const gchar* s = tvb_bytes_to_str_punct(
+ const char* s = tvb_bytes_to_str_punct(
pinfo->pool, tvb, offset, MIN(length, max_show_bytes), 0);
proto_item_append_text(
@@ -1080,9 +1080,9 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint8 value;
+ uint8_t value;
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(
tree, tlv_info->hf_value,
@@ -1104,7 +1104,7 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint16 value;
+ uint16_t value;
value = tvb_get_ntohs(tvb, offset);
@@ -1128,7 +1128,7 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint32 value;
+ uint32_t value;
value = tvb_get_ntohl(tvb, offset);
@@ -1152,9 +1152,9 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint8 value;
+ uint8_t value;
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
proto_tree_add_uint_format(
tree, tlv_info->hf_value,
@@ -1176,7 +1176,7 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint16 value;
+ uint16_t value;
value = tvb_get_ntohs(tvb, offset);
@@ -1200,7 +1200,7 @@ static void wimaxasncp_dissect_tlv_value(
if (tree)
{
- guint32 value;
+ uint32_t value;
value = tvb_get_ntohl(tvb, offset);
@@ -1306,7 +1306,7 @@ static void wimaxasncp_dissect_tlv_value(
{
proto_tree *protocol_list_tree;
proto_item *item;
- const guint max_protocols_in_tlv_item = 8; /* arbitrary */
+ const unsigned max_protocols_in_tlv_item = 8; /* arbitrary */
protocol_list_tree = proto_tree_add_subtree(
tree, tvb, offset, length,
@@ -1321,8 +1321,8 @@ static void wimaxasncp_dissect_tlv_value(
while (offset < tvb_reported_length(tvb))
{
- guint16 protocol;
- const gchar *protocol_name;
+ uint16_t protocol;
+ const char *protocol_name;
protocol = tvb_get_ntohs(tvb, offset);
protocol_name = ipprotostr(protocol);
@@ -1363,7 +1363,7 @@ static void wimaxasncp_dissect_tlv_value(
{
proto_tree *port_range_list_tree;
proto_item *item;
- const guint max_port_ranges_in_tlv_item = 3; /* arbitrary */
+ const unsigned max_port_ranges_in_tlv_item = 3; /* arbitrary */
port_range_list_tree = proto_tree_add_subtree(
tree, tvb, offset, length,
@@ -1378,8 +1378,8 @@ static void wimaxasncp_dissect_tlv_value(
while (offset < tvb_reported_length(tvb))
{
- guint16 portLow;
- guint16 portHigh;
+ uint16_t portLow;
+ uint16_t portHigh;
proto_tree* range_tree;
portLow = tvb_get_ntohs(tvb, offset);
@@ -1519,8 +1519,8 @@ static void wimaxasncp_dissect_tlv_value(
while (offset < tvb_reported_length(tvb))
{
proto_tree *ip_address_mask_tree;
- guint32 ip;
- const gchar *s;
+ uint32_t ip;
+ const char *s;
ip_address_mask_tree = proto_tree_add_subtree(
ip_address_mask_list_tree, tvb, offset, 8,
@@ -1571,15 +1571,15 @@ static void wimaxasncp_dissect_tlv_value(
/*
* EAP payload, call eap dissector to dissect eap payload
*/
- guint8 eap_code;
- guint8 eap_type = 0;
+ uint8_t eap_code;
+ uint8_t eap_type = 0;
/* Get code */
- eap_code = tvb_get_guint8(tvb, offset);
+ eap_code = tvb_get_uint8(tvb, offset);
if (eap_code == EAP_REQUEST || eap_code == EAP_RESPONSE)
{
/* Get type */
- eap_type = tvb_get_guint8(tvb, offset + 4);
+ eap_type = tvb_get_uint8(tvb, offset + 4);
}
/* Add code and type to info column */
@@ -1600,7 +1600,7 @@ static void wimaxasncp_dissect_tlv_value(
{
proto_tree *eap_tree;
proto_item *item;
- gboolean save_writable;
+ bool save_writable;
tvbuff_t *eap_tvb;
/* Create EAP subtree */
@@ -1627,7 +1627,7 @@ static void wimaxasncp_dissect_tlv_value(
/* Disable writing to info column while calling eap dissector */
save_writable = col_get_writable(pinfo->cinfo, -1);
- col_set_writable(pinfo->cinfo, -1, FALSE);
+ col_set_writable(pinfo->cinfo, -1, false);
/* Call the EAP dissector. */
call_dissector(eap_handle, eap_tvb, pinfo, eap_tree);
@@ -1664,8 +1664,8 @@ static void wimaxasncp_dissect_tlv_value(
{
proto_tree *vsif_tree;
proto_item *item;
- guint32 vendorId;
- const gchar *vendorName;
+ uint32_t vendorId;
+ const char *vendorName;
vsif_tree = proto_tree_add_subtree(
tree, tvb, offset, length,
@@ -1789,12 +1789,13 @@ static void wimaxasncp_dissect_tlv_value(
/* ========================================================================= */
-static guint dissect_wimaxasncp_tlvs(
+// NOLINTNEXTLINE(misc-no-recursion)
+static unsigned dissect_wimaxasncp_tlvs(
tvbuff_t *tvb,
packet_info *pinfo,
proto_tree *tree)
{
- guint offset;
+ unsigned offset;
offset = 0;
while (offset < tvb_reported_length(tvb))
@@ -1803,9 +1804,9 @@ static guint dissect_wimaxasncp_tlvs(
proto_tree *tlv_tree;
proto_item *tlv_item;
- guint16 type;
- guint16 length;
- guint pad;
+ uint16_t type;
+ uint16_t length;
+ unsigned pad;
/* --------------------------------------------------------------------
* type and length
@@ -1828,8 +1829,8 @@ static guint dissect_wimaxasncp_tlvs(
{
proto_item *type_item;
- gint tree_length = MIN(
- (gint)(4 + length + pad), tvb_captured_length_remaining(tvb, offset));
+ int tree_length = MIN(
+ (int)(4 + length + pad), tvb_captured_length_remaining(tvb, offset));
tlv_item = proto_tree_add_item(
tree, tlv_info->hf_root,
@@ -1897,8 +1898,9 @@ static guint dissect_wimaxasncp_tlvs(
MIN(length, tvb_captured_length_remaining(tvb, offset)),
length);
- /* N.B. This is a recursive call... */
+ increment_dissection_depth(pinfo);
dissect_wimaxasncp_tlvs(tlv_tvb, pinfo, tlv_tree);
+ decrement_dissection_depth(pinfo);
}
else
{
@@ -1929,17 +1931,17 @@ static guint dissect_wimaxasncp_tlvs(
/* ========================================================================= */
-static guint dissect_wimaxasncp_backend(
+static unsigned dissect_wimaxasncp_backend(
tvbuff_t *tvb,
packet_info *pinfo,
proto_tree *tree)
{
- guint offset = 0;
- guint16 ui16;
- guint32 ui32;
- const guint8 *pmsid;
- guint16 tid = 0;
- gboolean dbit_show;
+ unsigned offset = 0;
+ uint16_t ui16;
+ uint32_t ui32;
+ const uint8_t *pmsid;
+ uint16_t tid = 0;
+ bool dbit_show;
/* ------------------------------------------------------------------------
@@ -1978,12 +1980,12 @@ static guint dissect_wimaxasncp_backend(
* ------------------------------------------------------------------------
*/
- dbit_show = FALSE;
+ dbit_show = false;
ui16 = tvb_get_ntohs(tvb, offset);
if (show_transaction_id_d_bit)
{
- const guint16 mask = 0x7fff;
+ const uint16_t mask = 0x7fff;
if (ui16 & 0x8000)
{
@@ -1993,7 +1995,7 @@ static guint dissect_wimaxasncp_backend(
"Transaction ID: D + 0x%04x (0x%04x)", mask & ui16, ui16);
tid = ui16 & mask;
- dbit_show = TRUE;
+ dbit_show = true;
}
else
{
@@ -2062,11 +2064,11 @@ static guint dissect_wimaxasncp_backend(
/* ========================================================================= */
-static const gchar*
+static const char*
match_ver_value_string(
- const guint32 val,
+ const uint32_t val,
const ver_value_string* const strings,
- const guint32 max_ver)
+ const uint32_t max_ver)
{
const ver_value_string* vvs;
const ver_value_string* res = NULL;
@@ -2093,7 +2095,7 @@ dissect_wimaxasncp(
proto_tree *tree,
void *data _U_)
{
- static const gchar unknown[] = "Unknown";
+ static const char unknown[] = "Unknown";
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *packet_item = NULL;
@@ -2101,17 +2103,17 @@ dissect_wimaxasncp(
proto_tree *wimaxasncp_tree = NULL;
tvbuff_t *subtree;
- guint offset;
- guint8 ui8;
+ unsigned offset;
+ uint8_t ui8;
- guint8 function_type;
- const gchar *function_type_name;
+ uint8_t function_type;
+ const char *function_type_name;
proto_item *function_type_item;
- guint16 length;
+ uint16_t length;
const wimaxasncp_func_msg_t *p = NULL;
- const gchar *message_name;
- gsize i;
+ const char *message_name;
+ size_t i;
/* ------------------------------------------------------------------------
* First, we do some heuristics to check if the packet cannot be our
@@ -2129,7 +2131,7 @@ dissect_wimaxasncp(
#endif
/* We currently only support version 1. */
- if (tvb_bytes_exist(tvb, 0, 1) && tvb_get_guint8(tvb, 0) != 1)
+ if (tvb_bytes_exist(tvb, 0, 1) && tvb_get_uint8(tvb, 0) != 1)
{
return 0;
}
@@ -2194,7 +2196,7 @@ dissect_wimaxasncp(
* ------------------------------------------------------------------------
*/
- ui8 = tvb_get_guint8(tvb, offset);
+ ui8 = tvb_get_uint8(tvb, offset);
if (tree)
{
@@ -2209,7 +2211,7 @@ dissect_wimaxasncp(
}
else
{
- guint j;
+ unsigned j;
item = proto_tree_add_uint_format(
wimaxasncp_tree, hf_wimaxasncp_flags,
tvb, offset, 1, ui8,
@@ -2237,7 +2239,7 @@ dissect_wimaxasncp(
for (j = 0; j < 8; ++j)
{
- guint8 mask;
+ uint8_t mask;
mask = 1U << (7 - j);
/* Only add flags that are set */
@@ -2262,7 +2264,7 @@ dissect_wimaxasncp(
* ------------------------------------------------------------------------
*/
- function_type = tvb_get_guint8(tvb, offset);
+ function_type = tvb_get_uint8(tvb, offset);
function_type_name = match_ver_value_string(function_type,
wimaxasncp_function_type_vals,
@@ -2297,7 +2299,7 @@ dissect_wimaxasncp(
* ------------------------------------------------------------------------
*/
- ui8 = tvb_get_guint8(tvb, offset);
+ ui8 = tvb_get_uint8(tvb, offset);
/* --------------------------------------------------------------------
@@ -2774,10 +2776,10 @@ static void add_tlv_reg_info(
static void
register_wimaxasncp_fields(const char* unused _U_)
{
- gboolean debug_parser;
- gboolean dump_dict;
- gchar *dir;
- gchar* dict_error;
+ bool debug_parser;
+ bool dump_dict;
+ char *dir;
+ char* dict_error;
/* ------------------------------------------------------------------------
* List of header fields
@@ -2786,16 +2788,16 @@ register_wimaxasncp_fields(const char* unused _U_)
static hf_register_info hf_base[] = {
{
- &hf_wimaxasncp_version, /* ID */
+ &hf_wimaxasncp_version,
{
- "Version", /* FIELDNAME */
- "wimaxasncp.version", /* PROTOABBREV.FIELDABBRE */
- FT_UINT8, /* FIELDTYPE */
- BASE_DEC, /* FIELDBASE */
- NULL, /* FIELDCONVERT */
- 0x0, /* BITMASK */
- NULL, /* FIELDDESCR */
- HFILL /* HFILL */
+ "Version",
+ "wimaxasncp.version",
+ FT_UINT8,
+ BASE_DEC,
+ NULL,
+ 0x0,
+ NULL,
+ HFILL
}
},
{
@@ -3210,7 +3212,7 @@ register_wimaxasncp_fields(const char* unused _U_)
* ------------------------------------------------------------------------
*/
- static gint *ett_base[] = {
+ static int *ett_base[] = {
&ett_wimaxasncp,
&ett_wimaxasncp_flags,
&ett_wimaxasncp_tlv,
@@ -3276,7 +3278,7 @@ register_wimaxasncp_fields(const char* unused _U_)
wimaxasncp_build_dict.hf, hf_base, array_length(hf_base));
wimaxasncp_build_dict.ett =
- wmem_array_new(wmem_epan_scope(), sizeof(gint*));
+ wmem_array_new(wmem_epan_scope(), sizeof(int*));
wmem_array_append(
wimaxasncp_build_dict.ett, ett_base, array_length(ett_base));
@@ -3371,7 +3373,7 @@ register_wimaxasncp_fields(const char* unused _U_)
wmem_array_get_count(wimaxasncp_build_dict.hf));
proto_register_subtree_array(
- (gint**)wmem_array_get_raw(wimaxasncp_build_dict.ett),
+ (int**)wmem_array_get_raw(wimaxasncp_build_dict.ett),
wmem_array_get_count(wimaxasncp_build_dict.ett));
expert_wimaxasncp = expert_register_protocol(proto_wimaxasncp);
@@ -3430,7 +3432,7 @@ proto_register_wimaxasncp(void)
"Version of the NWG that the R6 protocol complies with",
&global_wimaxasncp_nwg_ver,
wimaxasncp_nwg_versions,
- FALSE);
+ false);
proto_register_prefix("wimaxasncp", register_wimaxasncp_fields);
}
diff --git a/plugins/epan/wimaxasncp/wimaxasncp_dict.h b/plugins/epan/wimaxasncp/wimaxasncp_dict.h
index 6f136522aa..fffb996565 100644
--- a/plugins/epan/wimaxasncp/wimaxasncp_dict.h
+++ b/plugins/epan/wimaxasncp/wimaxasncp_dict.h
@@ -59,19 +59,19 @@ enum
* ------------------------------------------------------------------------- */
struct _wimaxasncp_dict_namecode_t {
- gchar *name;
- guint code;
+ char *name;
+ unsigned code;
struct _wimaxasncp_dict_namecode_t *next;
};
typedef struct _wimaxasncp_dict_namecode_t wimaxasncp_dict_enum_t;
typedef struct _wimaxasncp_dict_tlv_t {
- guint16 type;
- gchar *name;
- gchar *description;
- gint decoder;
- guint since;
+ uint16_t type;
+ char *name;
+ char *description;
+ int decoder;
+ unsigned since;
int hf_root;
int hf_value;
int hf_ipv4;
@@ -90,9 +90,9 @@ typedef struct _wimaxasncp_dict_tlv_t {
} wimaxasncp_dict_tlv_t;
typedef struct _wimaxasncp_dict_xmlpi_t {
- gchar *name;
- gchar *key;
- gchar *value;
+ char *name;
+ char *key;
+ char *value;
struct _wimaxasncp_dict_xmlpi_t *next;
} wimaxasncp_dict_xmlpi_t;
@@ -105,8 +105,8 @@ extern void wimaxasncp_dict_print(
FILE *fh, wimaxasncp_dict_t *d);
extern wimaxasncp_dict_t *wimaxasncp_dict_scan(
- const gchar *system_directory, const gchar *filename, int dbg,
- gchar **error);
+ const char *system_directory, const char *filename, int dbg,
+ char **error);
extern void wimaxasncp_dict_free(
wimaxasncp_dict_t *d);
diff --git a/plugins/epan/wimaxasncp/wimaxasncp_dict.l b/plugins/epan/wimaxasncp/wimaxasncp_dict.l
index 6108ccb51e..ca8cf99dc3 100644
--- a/plugins/epan/wimaxasncp/wimaxasncp_dict.l
+++ b/plugins/epan/wimaxasncp/wimaxasncp_dict.l
@@ -107,8 +107,8 @@
DIAG_OFF_FLEX()
typedef struct entity_t {
- gchar *name;
- gchar *file;
+ char *name;
+ char *file;
struct entity_t *next;
} entity_t;
@@ -132,14 +132,14 @@ typedef struct entity_t {
typedef struct {
GString *dict_error;
- const gchar *sys_dir;
+ const char *sys_dir;
- gchar *strbuf;
- guint size_strbuf;
- guint len_strbuf;
+ char *strbuf;
+ unsigned size_strbuf;
+ unsigned len_strbuf;
- gchar *write_ptr;
- gchar *read_ptr;
+ char *write_ptr;
+ char *read_ptr;
wimaxasncp_dict_t *dict;
wimaxasncp_dict_tlv_t *tlv;
@@ -154,20 +154,20 @@ typedef struct {
YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
int include_stack_ptr;
- size_t (*current_yyinput)(gchar*,size_t,yyscan_t);
+ size_t (*current_yyinput)(char*,size_t,yyscan_t);
- gchar **attr_str;
- guint *attr_uint;
- gint16 *attr_uint16;
+ char **attr_str;
+ unsigned *attr_uint;
+ int16_t *attr_uint16;
int start_state;
} WimaxasncpDict_scanner_state_t;
-static guint wimaxasncp_bits(guint bits, char *n);
-static gint wimaxasncp_decode_type(const gchar *name);
-static void wimaxasncp_dict_debug(const gchar *fmt, ...) G_GNUC_PRINTF(1, 2);
-static void append_to_buffer(const gchar *txt, int len, WimaxasncpDict_scanner_state_t *state);
-static FILE *wimaxasncp_dict_open(const gchar*, const gchar*);
+static unsigned wimaxasncp_bits(unsigned bits, char *n);
+static int wimaxasncp_decode_type(const char *name);
+static void wimaxasncp_dict_debug(const char *fmt, ...) G_GNUC_PRINTF(1, 2);
+static void append_to_buffer(const char *txt, int len, WimaxasncpDict_scanner_state_t *state);
+static FILE *wimaxasncp_dict_open(const char*, const char*);
/*
* Sleazy hack to suppress compiler warnings in yy_fatal_error().
@@ -314,7 +314,7 @@ since_attr since=\042
<LOADING>{any} APPEND(yytext,yyleng);
<LOADING,IN_DICT>{entity} {
- gchar *p = ++yytext, *temp_str;
+ char *p = ++yytext, *temp_str;
entity_t* e;
while(*p != ';') p++;
@@ -381,14 +381,14 @@ since_attr since=\042
}
<GET_UINT_ATTR>{number} {
- *yyextra->attr_uint = (guint)strtoul(yytext,NULL,0);
+ *yyextra->attr_uint = (unsigned)strtoul(yytext,NULL,0);
D(("%s\n",yytext););
yyextra->attr_uint = NULL;
BEGIN END_ATTR;
}
<GET_UINT16_ATTR>{number} {
- *yyextra->attr_uint16 = (gint16) strtol(yytext,NULL,0);
+ *yyextra->attr_uint16 = (int16_t) strtol(yytext,NULL,0);
D(("%s\n",yytext););
yyextra->attr_uint16 = NULL;
BEGIN END_ATTR;
@@ -509,7 +509,7 @@ DIAG_ON_FLEX()
static int debugging = 0;
-static void wimaxasncp_dict_debug(const gchar *fmt, ...) {
+static void wimaxasncp_dict_debug(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
@@ -519,7 +519,7 @@ static void wimaxasncp_dict_debug(const gchar *fmt, ...) {
fflush(stderr);
}
-static guint wimaxasncp_bits(guint bits, char *n)
+static unsigned wimaxasncp_bits(unsigned bits, char *n)
{
return 1u << ((bits - 1) - (strtoul(n, NULL, 10)));
}
@@ -555,9 +555,9 @@ static const value_string wimaxasncp_decode_type_vals[] =
{ 0, NULL}
};
-static gint wimaxasncp_decode_type(const gchar *name)
+static int wimaxasncp_decode_type(const char *name)
{
- gsize i;
+ size_t i;
for (i = 0; i < array_length(wimaxasncp_decode_type_vals) - 1; ++i)
{
if (strcmp(name, wimaxasncp_decode_type_vals[i].strptr) == 0)
@@ -576,14 +576,14 @@ void wimaxasncp_dict_unused(yyscan_t yyscanner) {
yy_top_state(yyscanner);
}
-static void append_to_buffer(const gchar *txt, int len, WimaxasncpDict_scanner_state_t *state) {
+static void append_to_buffer(const char *txt, int len, WimaxasncpDict_scanner_state_t *state) {
if (state->strbuf == NULL) {
- state->read_ptr = state->write_ptr = state->strbuf = (gchar *)g_malloc(state->size_strbuf);
+ state->read_ptr = state->write_ptr = state->strbuf = (char *)g_malloc(state->size_strbuf);
}
if (state->len_strbuf + len >= state->size_strbuf) {
- state->read_ptr = state->strbuf = (gchar *)g_realloc(state->strbuf,state->size_strbuf *= 2);
+ state->read_ptr = state->strbuf = (char *)g_realloc(state->strbuf,state->size_strbuf *= 2);
}
state->write_ptr = state->strbuf + state->len_strbuf;
@@ -591,7 +591,7 @@ static void append_to_buffer(const gchar *txt, int len, WimaxasncpDict_scanner_s
state->len_strbuf += len;
}
-static size_t file_input(gchar *buf, size_t max, yyscan_t scanner) {
+static size_t file_input(char *buf, size_t max, yyscan_t scanner) {
FILE *in = yyget_in(scanner);
size_t read_cnt;
@@ -607,7 +607,7 @@ static size_t file_input(gchar *buf, size_t max, yyscan_t scanner) {
}
-static size_t string_input(gchar *buf, size_t max, yyscan_t scanner) {
+static size_t string_input(char *buf, size_t max, yyscan_t scanner) {
WimaxasncpDict_scanner_state_t *statep = yyget_extra(scanner);
if (statep->read_ptr >= statep->write_ptr ) {
@@ -623,11 +623,11 @@ static size_t string_input(gchar *buf, size_t max, yyscan_t scanner) {
}
static FILE *wimaxasncp_dict_open(
- const gchar *system_directory,
- const gchar *filename)
+ const char *system_directory,
+ const char *filename)
{
FILE *fh;
- gchar *fname;
+ char *fname;
if (system_directory)
{
fname = ws_strdup_printf("%s%s%s",
@@ -649,8 +649,8 @@ static FILE *wimaxasncp_dict_open(
}
wimaxasncp_dict_t *wimaxasncp_dict_scan(
- const gchar *system_directory, const gchar *filename, int dbg,
- gchar **error) {
+ const char *system_directory, const char *filename, int dbg,
+ char **error) {
WimaxasncpDict_scanner_state_t state;
FILE *in;
@@ -825,8 +825,8 @@ void wimaxasncp_dict_print(FILE *fh, wimaxasncp_dict_t *d) {
#ifdef TEST_WIMAXASNCP_DICT_STANDALONE
int main(int argc, char **argv) {
wimaxasncp_dict_t *d;
- gchar *dname = NULL;
- gchar *fname;
+ char *dname = NULL;
+ char *fname;
int i = 1;
switch (argc) {
diff --git a/plugins/epan/wimaxmacphy/CMakeLists.txt b/plugins/epan/wimaxmacphy/CMakeLists.txt
index ef29c28de5..b3e4e3257c 100644
--- a/plugins/epan/wimaxmacphy/CMakeLists.txt
+++ b/plugins/epan/wimaxmacphy/CMakeLists.txt
@@ -29,11 +29,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin
- "WiMAX MAC PHY over Ethernet dissection"
${DISSECTOR_SRC}
)
-add_wireshark_epan_plugin_library(wimaxmacphy)
+add_wireshark_plugin_library(wimaxmacphy epan)
target_link_libraries(wimaxmacphy epan)
diff --git a/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c b/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
index d2015941e9..da30728f87 100644
--- a/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
+++ b/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
@@ -13,6 +13,8 @@
#include <epan/packet.h>
#include <epan/expert.h>
+#include <epan/tfs.h>
+#include <wsutil/array.h>
/* IF PROTO exposes code to other dissectors, then it must be exported
in a header file. If not, a header file is not needed at all. */
@@ -247,46 +249,46 @@ static int hf_wimaxmacphy_ul_sub_burst_sounding_reserved;
static int hf_wimaxmacphy_ul_sub_burst_mimo_chase_matrix;
/* Initialize the subtree pointers */
-static gint ett_wimaxmacphy;
-static gint ett_wimaxmacphy_primitive;
-static gint ett_wimaxmacphy_prim_harq_ack;
-static gint ett_wimaxmacphy_prim_fast_feedback;
-static gint ett_wimaxmacphy_prim_fast_feedback_type_coding;
-static gint ett_wimaxmacphy_dl_zone_descriptor;
-static gint ett_wimaxmacphy_dl_zone_stc;
-static gint ett_wimaxmacphy_dl_zone_aas;
-static gint ett_wimaxmacphy_dl_burst_descriptor;
-static gint ett_wimaxmacphy_dl_burst_map;
-static gint ett_wimaxmacphy_dl_burst_normal;
-static gint ett_wimaxmacphy_dl_burst_papr;
-static gint ett_wimaxmacphy_dl_sub_burst_descriptor;
-static gint ett_wimaxmacphy_dl_sub_burst_harq_chase;
-static gint ett_wimaxmacphy_dl_sub_burst_mimo_chase;
-static gint ett_wimaxmacphy_dl_burst_opt_aas;
-static gint ett_wimaxmacphy_dl_burst_opt_mimo;
-static gint ett_wimaxmacphy_ul_zone_descriptor;
-static gint ett_wimaxmacphy_ul_zone_aas;
-static gint ett_wimaxmacphy_ul_burst_descriptor;
-static gint ett_wimaxmacphy_ul_burst_harq_ack;
-static gint ett_wimaxmacphy_ul_burst_fast_feedback;
-static gint ett_wimaxmacphy_ul_burst_initial_ranging;
-static gint ett_wimaxmacphy_ul_burst_periodic_ranging;
-static gint ett_wimaxmacphy_ul_burst_papr_safety_zone;
-static gint ett_wimaxmacphy_ul_burst_sounding_zone;
-static gint ett_wimaxmacphy_ul_burst_noise_floor;
-static gint ett_wimaxmacphy_ul_burst_normal_data;
-static gint ett_wimaxmacphy_ul_burst_opt_aas;
-static gint ett_wimaxmacphy_ul_burst_opt_mimo;
-static gint ett_wimaxmacphy_ul_sub_burst_descriptor;
-static gint ett_wimaxmacphy_ul_pilot_patterns;
-static gint ett_wimaxmacphy_ul_feedback_type_coding;
-static gint ett_wimaxmacphy_ul_sub_burst_mini_subchannel;
-static gint ett_wimaxmacphy_ul_sub_burst_fast_feedback;
-static gint ett_wimaxmacphy_ul_sub_burst_harq_ack;
-static gint ett_wimaxmacphy_ul_sub_burst_sounding_signal;
-static gint ett_wimaxmacphy_ul_sub_burst_harq_chase;
-static gint ett_wimaxmacphy_ul_sub_burst_mimo_chase;
-static gint ett_wimaxmacphy_ul_sub_burst_sub_allocation_specific;
+static int ett_wimaxmacphy;
+static int ett_wimaxmacphy_primitive;
+static int ett_wimaxmacphy_prim_harq_ack;
+static int ett_wimaxmacphy_prim_fast_feedback;
+static int ett_wimaxmacphy_prim_fast_feedback_type_coding;
+static int ett_wimaxmacphy_dl_zone_descriptor;
+static int ett_wimaxmacphy_dl_zone_stc;
+static int ett_wimaxmacphy_dl_zone_aas;
+static int ett_wimaxmacphy_dl_burst_descriptor;
+static int ett_wimaxmacphy_dl_burst_map;
+static int ett_wimaxmacphy_dl_burst_normal;
+static int ett_wimaxmacphy_dl_burst_papr;
+static int ett_wimaxmacphy_dl_sub_burst_descriptor;
+static int ett_wimaxmacphy_dl_sub_burst_harq_chase;
+static int ett_wimaxmacphy_dl_sub_burst_mimo_chase;
+static int ett_wimaxmacphy_dl_burst_opt_aas;
+static int ett_wimaxmacphy_dl_burst_opt_mimo;
+static int ett_wimaxmacphy_ul_zone_descriptor;
+static int ett_wimaxmacphy_ul_zone_aas;
+static int ett_wimaxmacphy_ul_burst_descriptor;
+static int ett_wimaxmacphy_ul_burst_harq_ack;
+static int ett_wimaxmacphy_ul_burst_fast_feedback;
+static int ett_wimaxmacphy_ul_burst_initial_ranging;
+static int ett_wimaxmacphy_ul_burst_periodic_ranging;
+static int ett_wimaxmacphy_ul_burst_papr_safety_zone;
+static int ett_wimaxmacphy_ul_burst_sounding_zone;
+static int ett_wimaxmacphy_ul_burst_noise_floor;
+static int ett_wimaxmacphy_ul_burst_normal_data;
+static int ett_wimaxmacphy_ul_burst_opt_aas;
+static int ett_wimaxmacphy_ul_burst_opt_mimo;
+static int ett_wimaxmacphy_ul_sub_burst_descriptor;
+static int ett_wimaxmacphy_ul_pilot_patterns;
+static int ett_wimaxmacphy_ul_feedback_type_coding;
+static int ett_wimaxmacphy_ul_sub_burst_mini_subchannel;
+static int ett_wimaxmacphy_ul_sub_burst_fast_feedback;
+static int ett_wimaxmacphy_ul_sub_burst_harq_ack;
+static int ett_wimaxmacphy_ul_sub_burst_sounding_signal;
+static int ett_wimaxmacphy_ul_sub_burst_harq_chase;
+static int ett_wimaxmacphy_ul_sub_burst_mimo_chase;
+static int ett_wimaxmacphy_ul_sub_burst_sub_allocation_specific;
static expert_field ei_wimaxmacphy_unknown;
@@ -989,13 +991,13 @@ static const value_string wimaxmacphy_ul_sub_burst_mimo_chase_matrix_vals[]=
{ 0, NULL}
};
-static gint dissect_wimaxmacphy_dl_sub_burst_descriptor(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_wimaxmacphy_dl_sub_burst_descriptor(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint start_offset = offset;
- guint8 sub_burst_type;
+ unsigned start_offset = offset;
+ uint8_t sub_burst_type;
proto_tree *subtree;
- sub_burst_type = tvb_get_guint8(tvb, offset);
+ sub_burst_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_dl_sub_burst_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1080,18 +1082,18 @@ static gint dissect_wimaxmacphy_dl_sub_burst_descriptor(tvbuff_t *tvb, guint off
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_dl_burst_descriptor(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_dl_burst_descriptor(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint start_offset = offset;
- guint8 burst_type, burst_type_extension, sub_burst_descriptor_count, sub_burst;
+ unsigned start_offset = offset;
+ uint8_t burst_type, burst_type_extension, sub_burst_descriptor_count, sub_burst;
proto_item *item;
proto_tree *subtree, *opt_tree;
- burst_type = tvb_get_guint8(tvb, offset);
+ burst_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_dl_burst_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- burst_type_extension = tvb_get_guint8(tvb, offset);
+ burst_type_extension = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_burst_type_extension, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1206,7 +1208,7 @@ static guint dissect_wimaxmacphy_dl_burst_descriptor(tvbuff_t *tvb, guint offset
}
/* sub-burst portion */
- sub_burst_descriptor_count = tvb_get_guint8(tvb, offset);
+ sub_burst_descriptor_count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_number_of_sub_burst_descriptors, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1217,7 +1219,7 @@ static guint dissect_wimaxmacphy_dl_burst_descriptor(tvbuff_t *tvb, guint offset
for (sub_burst = 0; sub_burst < sub_burst_descriptor_count; ++sub_burst)
{
proto_tree *sub_burst_descriptor_tree;
- guint sub_burst_descriptor_length;
+ unsigned sub_burst_descriptor_length;
sub_burst_descriptor_tree = proto_tree_add_subtree_format(tree, tvb, offset, 1,
ett_wimaxmacphy_dl_sub_burst_descriptor, &item, "Sub-Burst Descriptor %u", sub_burst);
@@ -1232,14 +1234,14 @@ static guint dissect_wimaxmacphy_dl_burst_descriptor(tvbuff_t *tvb, guint offset
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_dl_zone_descriptor(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_dl_zone_descriptor(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint start_offset = offset;
- guint8 zone_type, burst_descriptor_count, burst;
+ unsigned start_offset = offset;
+ uint8_t zone_type, burst_descriptor_count, burst;
proto_item *item;
proto_tree *subtree;
- zone_type = tvb_get_guint8(tvb, offset);
+ zone_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_dl_zone_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1312,7 +1314,7 @@ static guint dissect_wimaxmacphy_dl_zone_descriptor(tvbuff_t *tvb, guint offset,
}
/* burst portion */
- burst_descriptor_count = tvb_get_guint8(tvb, offset);
+ burst_descriptor_count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_number_of_burst_descriptors, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1323,7 +1325,7 @@ static guint dissect_wimaxmacphy_dl_zone_descriptor(tvbuff_t *tvb, guint offset,
for (burst = 0; burst < burst_descriptor_count; ++burst)
{
proto_tree *burst_descriptor_tree;
- guint burst_descriptor_length;
+ unsigned burst_descriptor_length;
/* note: we'll adjust the length later */
burst_descriptor_tree = proto_tree_add_subtree_format(tree, tvb, offset, 1,
@@ -1340,11 +1342,11 @@ static guint dissect_wimaxmacphy_dl_zone_descriptor(tvbuff_t *tvb, guint offset,
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_dl_subframe_descriptor(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_dl_subframe_descriptor(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint start_offset = offset;
- guint8 zone_descriptor_count;
- guint8 zone;
+ unsigned start_offset = offset;
+ uint8_t zone_descriptor_count;
+ uint8_t zone;
proto_tree_add_item(tree, hf_wimaxmacphy_subframe_subframe_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1362,7 +1364,7 @@ static guint dissect_wimaxmacphy_dl_subframe_descriptor(tvbuff_t *tvb, guint off
offset += 4;
/* zone portion */
- zone_descriptor_count = tvb_get_guint8(tvb, offset);
+ zone_descriptor_count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_number_of_zone_descriptors, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1374,7 +1376,7 @@ static guint dissect_wimaxmacphy_dl_subframe_descriptor(tvbuff_t *tvb, guint off
{
proto_item *item;
proto_tree *zone_descriptor_tree;
- guint zone_descriptor_length;
+ unsigned zone_descriptor_length;
zone_descriptor_tree = proto_tree_add_subtree_format(tree, tvb, offset, 1, ett_wimaxmacphy_dl_zone_descriptor, &item, "Zone Descriptor %u", zone);
@@ -1389,10 +1391,10 @@ static guint dissect_wimaxmacphy_dl_subframe_descriptor(tvbuff_t *tvb, guint off
return offset - start_offset;
}
-static gint dissect_wimaxmacphy_ul_sub_burst_sub_allocation_specific_part(tvbuff_t *tvb, guint offset,
- packet_info *pinfo _U_, proto_tree *tree, guint8 sub_burst_type)
+static int dissect_wimaxmacphy_ul_sub_burst_sub_allocation_specific_part(tvbuff_t *tvb, unsigned offset,
+ packet_info *pinfo _U_, proto_tree *tree, uint8_t sub_burst_type)
{
- guint start_offset = offset;
+ unsigned start_offset = offset;
proto_item *item, *opt_item;
proto_tree *subtree, *opt_tree;
@@ -1466,14 +1468,14 @@ static gint dissect_wimaxmacphy_ul_sub_burst_sub_allocation_specific_part(tvbuff
return offset - start_offset;
}
-static gint dissect_wimaxmacphy_ul_sub_burst_descriptor(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_wimaxmacphy_ul_sub_burst_descriptor(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint8 sub_burst_type;
+ uint8_t sub_burst_type;
proto_item *feedback_item;
proto_tree *subtree, *feedback_tree;
- guint start_offset = offset;
+ unsigned start_offset = offset;
- sub_burst_type = tvb_get_guint8(tvb, offset);
+ sub_burst_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_ul_sub_burst_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1585,19 +1587,19 @@ static gint dissect_wimaxmacphy_ul_sub_burst_descriptor(tvbuff_t *tvb, guint off
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_ul_burst_descriptor(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_ul_burst_descriptor(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint8 burst_type, burst_type_extension;
- guint8 sub_burst_descriptor_count, sub_burst;
+ uint8_t burst_type, burst_type_extension;
+ uint8_t sub_burst_descriptor_count, sub_burst;
proto_item *item, *pilot_patterns_item;
proto_tree *subtree, *opt_tree, *pilot_patterns_tree;
- guint start_offset = offset;
+ unsigned start_offset = offset;
- burst_type = tvb_get_guint8(tvb, offset);
+ burst_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_ul_burst_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- burst_type_extension = tvb_get_guint8(tvb, offset);
+ burst_type_extension = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_burst_type_extension, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1833,7 +1835,7 @@ static guint dissect_wimaxmacphy_ul_burst_descriptor(tvbuff_t *tvb, guint offset
}
/* sub-burst portion */
- sub_burst_descriptor_count = tvb_get_guint8(tvb, offset);
+ sub_burst_descriptor_count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_number_of_sub_burst_descriptors, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1844,7 +1846,7 @@ static guint dissect_wimaxmacphy_ul_burst_descriptor(tvbuff_t *tvb, guint offset
for (sub_burst = 0; sub_burst < sub_burst_descriptor_count; ++sub_burst)
{
proto_tree *sub_burst_descriptor_tree;
- guint sub_burst_descriptor_length;
+ unsigned sub_burst_descriptor_length;
sub_burst_descriptor_tree = proto_tree_add_subtree_format(tree, tvb, offset, 1, ett_wimaxmacphy_ul_sub_burst_descriptor, &item, "Sub-Burst Descriptor %u", sub_burst);
@@ -1859,13 +1861,13 @@ static guint dissect_wimaxmacphy_ul_burst_descriptor(tvbuff_t *tvb, guint offset
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_ul_zone_descriptor(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_ul_zone_descriptor(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint start_offset = offset;
- guint8 zone_type, burst_descriptor_count, burst;
+ unsigned start_offset = offset;
+ uint8_t zone_type, burst_descriptor_count, burst;
proto_item *item;
- zone_type = tvb_get_guint8(tvb, offset);
+ zone_type = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_ul_zone_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1921,7 +1923,7 @@ static guint dissect_wimaxmacphy_ul_zone_descriptor(tvbuff_t *tvb, guint offset,
}
/* burst portion */
- burst_descriptor_count = tvb_get_guint8(tvb, offset);
+ burst_descriptor_count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_number_of_burst_descriptors, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1932,7 +1934,7 @@ static guint dissect_wimaxmacphy_ul_zone_descriptor(tvbuff_t *tvb, guint offset,
for (burst = 0; burst < burst_descriptor_count; ++burst)
{
proto_tree *burst_descriptor_tree;
- guint burst_descriptor_length;
+ unsigned burst_descriptor_length;
burst_descriptor_tree = proto_tree_add_subtree_format(tree, tvb, offset, 1, ett_wimaxmacphy_ul_burst_descriptor, &item, "Burst Descriptor %u", burst);
@@ -1946,11 +1948,11 @@ static guint dissect_wimaxmacphy_ul_zone_descriptor(tvbuff_t *tvb, guint offset,
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_ul_subframe_descriptor(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_ul_subframe_descriptor(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint start_offset = offset;
- guint8 zone_descriptor_count;
- guint8 zone;
+ unsigned start_offset = offset;
+ uint8_t zone_descriptor_count;
+ uint8_t zone;
proto_tree_add_item(tree, hf_wimaxmacphy_subframe_subframe_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1967,7 +1969,7 @@ static guint dissect_wimaxmacphy_ul_subframe_descriptor(tvbuff_t *tvb, guint off
proto_tree_add_item(tree, hf_wimaxmacphy_subframe_allocation_start_time, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- zone_descriptor_count = tvb_get_guint8(tvb, offset);
+ zone_descriptor_count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_number_of_zone_descriptors, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1983,7 +1985,7 @@ static guint dissect_wimaxmacphy_ul_subframe_descriptor(tvbuff_t *tvb, guint off
{
proto_item *item;
proto_tree *zone_descriptor_tree;
- guint zone_descriptor_length;
+ unsigned zone_descriptor_length;
zone_descriptor_tree = proto_tree_add_subtree_format(tree, tvb, offset, 1, ett_wimaxmacphy_ul_zone_descriptor, &item, "Zone Descriptor %u", zone);
@@ -1997,10 +1999,10 @@ static guint dissect_wimaxmacphy_ul_subframe_descriptor(tvbuff_t *tvb, guint off
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_phy_txstart_request(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_txstart_request(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint16 txvector_length;
- guint subframe_descriptor_length;
+ uint16_t txvector_length;
+ unsigned subframe_descriptor_length;
txvector_length = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_prim_length_of_txvector, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2017,7 +2019,7 @@ static guint dissect_wimaxmacphy_phy_txstart_request(tvbuff_t *tvb, guint offset
return txvector_length + 2;
}
-static guint dissect_wimaxmacphy_phy_txstart_confirmation(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_txstart_confirmation(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
proto_tree_add_item(tree, hf_wimaxmacphy_prim_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2029,7 +2031,7 @@ static guint dissect_wimaxmacphy_phy_txstart_confirmation(tvbuff_t *tvb, guint o
return 2;
}
-static guint dissect_wimaxmacphy_phy_txstart_indication(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_txstart_indication(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
proto_tree_add_item(tree, hf_wimaxmacphy_prim_txstart_indication_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2047,9 +2049,9 @@ static guint dissect_wimaxmacphy_phy_txstart_indication(tvbuff_t *tvb, guint off
return 6;
}
-static guint dissect_wimaxmacphy_phy_txsdu_request(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_txsdu_request(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint length;
+ unsigned length;
proto_tree_add_item(tree, hf_wimaxmacphy_prim_dl_zone_number, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_wimaxmacphy_prim_sub_burst_burst_split_point, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2062,7 +2064,7 @@ static guint dissect_wimaxmacphy_phy_txsdu_request(tvbuff_t *tvb, guint offset,
return length + 2;
}
-static guint dissect_wimaxmacphy_phy_txsdu_confirmation(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_txsdu_confirmation(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
proto_tree_add_item(tree, hf_wimaxmacphy_prim_dl_zone_number, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_wimaxmacphy_prim_sub_burst_burst_split_point, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2082,7 +2084,7 @@ static guint dissect_wimaxmacphy_phy_txsdu_confirmation(tvbuff_t *tvb, guint off
return 6;
}
-static guint dissect_wimaxmacphy_phy_txend_indication(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_txend_indication(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
proto_tree_add_item(tree, hf_wimaxmacphy_prim_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2104,10 +2106,10 @@ static guint dissect_wimaxmacphy_phy_txend_indication(tvbuff_t *tvb, guint offse
return 6;
}
-static guint dissect_wimaxmacphy_phy_rxstart_request(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_rxstart_request(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint16 rxvector_length;
- guint subframe_descriptor_length;
+ uint16_t rxvector_length;
+ unsigned subframe_descriptor_length;
rxvector_length = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(tree, hf_wimaxmacphy_prim_length_of_rxvector, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2125,7 +2127,7 @@ static guint dissect_wimaxmacphy_phy_rxstart_request(tvbuff_t *tvb, guint offset
return rxvector_length + 2;
}
-static guint dissect_wimaxmacphy_phy_rxstart_confirmation(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_rxstart_confirmation(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
proto_tree_add_item(tree, hf_wimaxmacphy_prim_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2137,7 +2139,7 @@ static guint dissect_wimaxmacphy_phy_rxstart_confirmation(tvbuff_t *tvb, guint o
return 2;
}
-static guint dissect_wimaxmacphy_phy_rxstart_indication(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_rxstart_indication(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
proto_tree_add_item(tree, hf_wimaxmacphy_prim_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2149,12 +2151,12 @@ static guint dissect_wimaxmacphy_phy_rxstart_indication(tvbuff_t *tvb, guint off
return 2;
}
-static guint dissect_wimaxmacphy_phy_rxsdu_indication(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_rxsdu_indication(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint8 indication_type;
+ uint8_t indication_type;
proto_item *feedback_item;
proto_tree *subtree, *feedback_tree;
- guint length, start_offset = offset;
+ unsigned length, start_offset = offset;
proto_tree_add_item(tree, hf_wimaxmacphy_prim_issid, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -2179,7 +2181,7 @@ static guint dissect_wimaxmacphy_phy_rxsdu_indication(tvbuff_t *tvb, guint offse
proto_tree_add_item(tree, hf_wimaxmacphy_prim_acid_for_harq_data_bursts, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- indication_type = (tvb_get_guint8(tvb, offset) >> 4) & 0x0F;
+ indication_type = (tvb_get_uint8(tvb, offset) >> 4) & 0x0F;
proto_tree_add_item(tree, hf_wimaxmacphy_prim_indication_type, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_wimaxmacphy_prim_zone_permutation_type, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_wimaxmacphy_prim_update_aas_handle_in_mac, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2258,9 +2260,9 @@ static guint dissect_wimaxmacphy_phy_rxsdu_indication(tvbuff_t *tvb, guint offse
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_phy_rxend_indication(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_rxend_indication(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint start_offset = offset;
+ unsigned start_offset = offset;
proto_tree_add_item(tree, hf_wimaxmacphy_prim_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -2286,9 +2288,9 @@ static guint dissect_wimaxmacphy_phy_rxend_indication(tvbuff_t *tvb, guint offse
return offset - start_offset;
}
-static guint dissect_wimaxmacphy_phy_rxcdma_indication(tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+static unsigned dissect_wimaxmacphy_phy_rxcdma_indication(tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint start_offset = offset;
+ unsigned start_offset = offset;
proto_tree_add_item(tree, hf_wimaxmacphy_prim_zonexid, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -2340,8 +2342,8 @@ dissect_wimaxmacphy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
proto_tree *wimaxmacphy_tree, *primitive_tree;
proto_item *item;
- guint offset = 0;
- guint8 message_type;
+ unsigned offset = 0;
+ uint8_t message_type;
/* Ensure minimum size */
if (tvb_reported_length(tvb) < WIMAXMACPHY_HEADER_SIZE)
@@ -2359,7 +2361,7 @@ dissect_wimaxmacphy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- message_type = tvb_get_guint8(tvb, offset);
+ message_type = tvb_get_uint8(tvb, offset);
item = proto_tree_add_item(wimaxmacphy_tree, hf_wimaxmacphy_hdr_message_type,
tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -5353,7 +5355,7 @@ proto_register_wimaxmacphy(void)
};
/* Protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_wimaxmacphy,
&ett_wimaxmacphy_primitive,
&ett_wimaxmacphy_prim_harq_ack,
diff --git a/plugins/wiretap/usbdump/CMakeLists.txt b/plugins/wiretap/usbdump/CMakeLists.txt
index a6b4a515c2..14fab19de3 100644
--- a/plugins/wiretap/usbdump/CMakeLists.txt
+++ b/plugins/wiretap/usbdump/CMakeLists.txt
@@ -29,11 +29,10 @@ set_source_files_properties(
register_plugin_files(plugin.c
plugin_wtap
- "Add support for reading FreeBSD usbdump(8) files"
${WIRETAP_SRC}
)
-add_wireshark_wiretap_plugin_library(usbdump)
+add_wireshark_plugin_library(usbdump wiretap)
target_include_directories(usbdump PRIVATE ${CMAKE_SOURCE_DIR}/wiretap)
diff --git a/plugins/wiretap/usbdump/usbdump.c b/plugins/wiretap/usbdump/usbdump.c
index 5cc01ec1f6..c5c7ffa6c7 100644
--- a/plugins/wiretap/usbdump/usbdump.c
+++ b/plugins/wiretap/usbdump/usbdump.c
@@ -57,21 +57,21 @@ void wtap_register_usbdump(void);
/* Private data needed to read the file initially. */
typedef struct {
- guint16 version;
- guint32 multiframe_size;
- gboolean multiframe_overrun;
+ uint16_t version;
+ uint32_t multiframe_size;
+ bool multiframe_overrun;
} usbdump_info_t;
-static gboolean usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf,
- int *err, gchar **err_info,
- gint64 *data_offset);
-static gboolean usbdump_seek_read(wtap *wth, gint64 seek_off,
+static bool usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf,
+ int *err, char **err_info,
+ int64_t *data_offset);
+static bool usbdump_seek_read(wtap *wth, int64_t seek_off,
wtap_rec *rec, Buffer *buf,
- int *err, gchar **err_info);
-static gboolean usbdump_read_packet(wtap *wth, FILE_T fh,
+ int *err, char **err_info);
+static bool usbdump_read_packet(wtap *wth, FILE_T fh,
wtap_rec *rec, Buffer *buf,
- int *err, gchar **err_info);
+ int *err, char **err_info);
static int usbdump_file_type_subtype;
@@ -84,9 +84,9 @@ static int usbdump_file_type_subtype;
static wtap_open_return_val
usbdump_open(wtap *wth, int *err, char **err_info)
{
- guint32 magic;
- guint16 version;
- guint32 multiframe_size;
+ uint32_t magic;
+ uint16_t version;
+ uint32_t multiframe_size;
usbdump_info_t *usbdump_info;
/* Read in the number that should be at the start of a "usbdump" file */
@@ -137,7 +137,7 @@ usbdump_open(wtap *wth, int *err, char **err_info)
usbdump_info = g_new(usbdump_info_t, 1);
usbdump_info->version = GUINT16_FROM_BE(version);
usbdump_info->multiframe_size = GUINT32_FROM_LE(multiframe_size);
- usbdump_info->multiframe_overrun = FALSE;
+ usbdump_info->multiframe_overrun = false;
/*
* We are convinced this is a usbdump format file.
@@ -159,9 +159,9 @@ usbdump_open(wtap *wth, int *err, char **err_info)
* indication. Report back where reading of this frame started to
* support subsequent random access read.
*/
-static gboolean
-usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf, int *err, gchar **err_info,
- gint64 *data_offset)
+static bool
+usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf, int *err, char **err_info,
+ int64_t *data_offset)
{
usbdump_info_t *usbdump_info = (usbdump_info_t *)wth->priv;
@@ -170,14 +170,14 @@ usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf, int *err, gchar **err_info,
/* Try to read a packet worth of data */
if (!usbdump_read_packet(wth, wth->fh, rec, buf, err, err_info))
- return FALSE;
+ return false;
/* Check if we overrun the multiframe during the last read */
if (usbdump_info->multiframe_overrun)
{
*err = WTAP_ERR_BAD_FILE;
*err_info = ws_strdup_printf("Multiframe overrun");
- return FALSE;
+ return false;
}
/* See if we reached the end of the multiframe */
@@ -192,7 +192,7 @@ usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf, int *err, gchar **err_info,
err, err_info);
}
- return TRUE;
+ return true;
}
/*
@@ -200,22 +200,22 @@ usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf, int *err, gchar **err_info,
* Read the frame at the given offset in the file. Store the frame data
* in a buffer and fill in the packet header info.
*/
-static gboolean
-usbdump_seek_read(wtap *wth, gint64 seek_off, wtap_rec *rec,
- Buffer *buf, int *err, gchar **err_info)
+static bool
+usbdump_seek_read(wtap *wth, int64_t seek_off, wtap_rec *rec,
+ Buffer *buf, int *err, char **err_info)
{
/* Seek to the desired file position at the start of the frame */
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
- return FALSE;
+ return false;
/* Try to read a packet worth of data */
if (!usbdump_read_packet(wth, wth->random_fh, rec, buf, err, err_info)) {
if (*err == 0)
*err = WTAP_ERR_SHORT_READ;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*
@@ -227,18 +227,18 @@ usbdump_seek_read(wtap *wth, gint64 seek_off, wtap_rec *rec,
* Also, for the sequential read, keep track of the position in the multiframe
* so that we can find the next multiframe size field.
*/
-static gboolean
+static bool
usbdump_read_packet(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf,
- int *err, gchar **err_info)
+ int *err, char **err_info)
{
usbdump_info_t *usbdump_info = (usbdump_info_t *)wth->priv;
- guint8 bpf_hdr[18];
- guint8 bpf_hdr_len, alignment;
+ uint8_t bpf_hdr[18];
+ uint8_t bpf_hdr_len, alignment;
/* Read the packet header */
if (!wtap_read_bytes_or_eof(fh, bpf_hdr, 18, err, err_info))
- return FALSE;
+ return false;
/* Get sizes */
bpf_hdr_len = bpf_hdr[16];
@@ -249,12 +249,12 @@ usbdump_read_packet(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf,
{
/* Read packet header padding */
if (!wtap_read_bytes_or_eof(fh, NULL, bpf_hdr_len - 18, err, err_info))
- return FALSE;
+ return false;
}
/* Keep track of multiframe_size and detect overrun */
if (usbdump_info->multiframe_size < bpf_hdr_len) {
- usbdump_info->multiframe_overrun = TRUE;
+ usbdump_info->multiframe_overrun = true;
} else {
usbdump_info->multiframe_size -= bpf_hdr_len;
}
@@ -263,44 +263,44 @@ usbdump_read_packet(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf,
rec->rec_type = REC_TYPE_PACKET;
rec->block = wtap_block_create(WTAP_BLOCK_PACKET);
rec->presence_flags = WTAP_HAS_TS | WTAP_HAS_CAP_LEN;
- rec->ts.secs = (guint32)bpf_hdr[3] << 24 | (guint32)bpf_hdr[2] << 16 |
- (guint32)bpf_hdr[1] << 8 | (guint32)bpf_hdr[0];
- rec->ts.nsecs = ((guint32)bpf_hdr[7] << 24 | (guint32)bpf_hdr[6] << 16 |
- (guint32)bpf_hdr[5] << 8 | (guint32)bpf_hdr[4]) * 1000;
- rec->rec_header.packet_header.caplen = (guint32)bpf_hdr[11] << 24 | (guint32)bpf_hdr[10] << 16 |
- (guint32)bpf_hdr[9] << 8 | (guint32)bpf_hdr[8];
- rec->rec_header.packet_header.len = (guint32)bpf_hdr[15] << 24 | (guint32)bpf_hdr[14] << 16 |
- (guint32)bpf_hdr[13] << 8 | (guint32)bpf_hdr[12];
+ rec->ts.secs = (uint32_t)bpf_hdr[3] << 24 | (uint32_t)bpf_hdr[2] << 16 |
+ (uint32_t)bpf_hdr[1] << 8 | (uint32_t)bpf_hdr[0];
+ rec->ts.nsecs = ((uint32_t)bpf_hdr[7] << 24 | (uint32_t)bpf_hdr[6] << 16 |
+ (uint32_t)bpf_hdr[5] << 8 | (uint32_t)bpf_hdr[4]) * 1000;
+ rec->rec_header.packet_header.caplen = (uint32_t)bpf_hdr[11] << 24 | (uint32_t)bpf_hdr[10] << 16 |
+ (uint32_t)bpf_hdr[9] << 8 | (uint32_t)bpf_hdr[8];
+ rec->rec_header.packet_header.len = (uint32_t)bpf_hdr[15] << 24 | (uint32_t)bpf_hdr[14] << 16 |
+ (uint32_t)bpf_hdr[13] << 8 | (uint32_t)bpf_hdr[12];
/* Read the packet data */
if (!wtap_read_packet_bytes(fh, buf, rec->rec_header.packet_header.caplen, err, err_info))
- return FALSE;
+ return false;
/* Keep track of multiframe_size and detect overrun */
if (usbdump_info->multiframe_size < rec->rec_header.packet_header.caplen) {
- usbdump_info->multiframe_overrun = TRUE;
+ usbdump_info->multiframe_overrun = true;
} else {
usbdump_info->multiframe_size -= rec->rec_header.packet_header.caplen;
}
/* Check for and apply alignment as defined in the frame header */
- guint8 pad_len = (guint32)alignment -
- (((guint32)bpf_hdr_len + rec->rec_header.packet_header.caplen) &
- ((guint32)alignment - 1));
+ uint8_t pad_len = (uint32_t)alignment -
+ (((uint32_t)bpf_hdr_len + rec->rec_header.packet_header.caplen) &
+ ((uint32_t)alignment - 1));
if (pad_len < alignment) {
/* Read alignment from the file */
if (!wtap_read_bytes(fh, NULL, pad_len, err, err_info))
- return FALSE;
+ return false;
/* Keep track of multiframe_size and detect overrun */
if (usbdump_info->multiframe_size < pad_len) {
- usbdump_info->multiframe_overrun = TRUE;
+ usbdump_info->multiframe_overrun = true;
} else {
usbdump_info->multiframe_size -= pad_len;
}
}
- return TRUE;
+ return true;
}
/*
@@ -317,7 +317,7 @@ static const struct file_type_subtype_info fi = {
"usbdump",
NULL,
NULL,
- FALSE,
+ false,
BLOCKS_SUPPORTED(usbdump_blocks_supported),
NULL,
NULL,
@@ -336,7 +336,7 @@ wtap_register_usbdump(void)
NULL
};
- wtap_register_open_info(&oi, FALSE);
+ wtap_register_open_info(&oi, false);
usbdump_file_type_subtype = wtap_register_file_type_subtype(&fi);
}