summaryrefslogtreecommitdiffstats
path: root/plugins/epan
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugins/epan/dfilter/ipaddr/CMakeLists.txt46
-rw-r--r--plugins/epan/dfilter/ipaddr/ipaddr.c362
-rw-r--r--plugins/epan/ethercat/packet-ams.c392
-rw-r--r--plugins/epan/ethercat/packet-ams.h132
-rw-r--r--plugins/epan/ethercat/packet-ecatmb.c384
-rw-r--r--plugins/epan/ethercat/packet-ecatmb.h258
-rw-r--r--plugins/epan/ethercat/packet-esl.c118
-rw-r--r--plugins/epan/ethercat/packet-ethercat-datagram.c908
-rw-r--r--plugins/epan/ethercat/packet-ethercat-datagram.h14
-rw-r--r--plugins/epan/ethercat/packet-ethercat-frame.c14
-rw-r--r--plugins/epan/ethercat/packet-ethercat-frame.h8
-rw-r--r--plugins/epan/ethercat/packet-ioraw.c16
-rw-r--r--plugins/epan/ethercat/packet-ioraw.h2
-rw-r--r--plugins/epan/ethercat/packet-nv.c106
-rw-r--r--plugins/epan/ethercat/packet-nv.h16
-rw-r--r--plugins/epan/falco_bridge/CMakeLists.txt7
-rw-r--r--plugins/epan/falco_bridge/README.md4
-rw-r--r--plugins/epan/falco_bridge/packet-falco-bridge.c1218
-rw-r--r--plugins/epan/falco_bridge/sinsp-span.cpp839
-rw-r--r--plugins/epan/falco_bridge/sinsp-span.h95
-rw-r--r--plugins/epan/gryphon/packet-gryphon.c962
-rw-r--r--plugins/epan/gryphon/packet-gryphon.h12
-rw-r--r--plugins/epan/irda/irda-appl.h16
-rw-r--r--plugins/epan/irda/packet-ircomm.c110
-rw-r--r--plugins/epan/irda/packet-irda.c442
-rw-r--r--plugins/epan/irda/packet-sir.c56
-rw-r--r--plugins/epan/mate/examples/call.mate34
-rw-r--r--plugins/epan/mate/examples/mms.mate97
-rw-r--r--plugins/epan/mate/examples/pasv_ftp.mate39
-rw-r--r--plugins/epan/mate/examples/tcp.mate23
-rw-r--r--plugins/epan/mate/examples/web.mate79
-rw-r--r--plugins/epan/mate/mate.h168
-rw-r--r--plugins/epan/mate/mate_grammar.lemon101
-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.c104
-rw-r--r--plugins/epan/mate/mate_util.c214
-rw-r--r--plugins/epan/mate/mate_util.h62
-rw-r--r--plugins/epan/mate/packet-mate.c76
-rw-r--r--plugins/epan/opcua/CMakeLists.txt3
-rw-r--r--plugins/epan/opcua/README4
-rw-r--r--plugins/epan/opcua/opcua.c771
-rw-r--r--plugins/epan/opcua/opcua_application_layer.c52
-rw-r--r--plugins/epan/opcua/opcua_application_layer.h3
-rw-r--r--plugins/epan/opcua/opcua_complextypeparser.c846
-rw-r--r--plugins/epan/opcua/opcua_complextypeparser.h840
-rw-r--r--plugins/epan/opcua/opcua_enumparser.c170
-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_hfindeces.c592
-rw-r--r--plugins/epan/opcua/opcua_identifiers.h10
-rw-r--r--plugins/epan/opcua/opcua_keyset.c156
-rw-r--r--plugins/epan/opcua/opcua_keyset.h59
-rw-r--r--plugins/epan/opcua/opcua_security_layer.c61
-rw-r--r--plugins/epan/opcua/opcua_security_layer.h8
-rw-r--r--plugins/epan/opcua/opcua_serviceparser.c506
-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.c510
-rw-r--r--plugins/epan/opcua/opcua_simpletypes.h126
-rw-r--r--plugins/epan/opcua/opcua_transport_layer.c240
-rw-r--r--plugins/epan/opcua/opcua_transport_layer.h29
-rw-r--r--plugins/epan/pluginifdemo/pluginifdemo.c50
-rw-r--r--plugins/epan/profinet/packet-dcerpc-pn-io.c4748
-rw-r--r--plugins/epan/profinet/packet-dcom-cba-acco.c1306
-rw-r--r--plugins/epan/profinet/packet-dcom-cba-acco.h6
-rw-r--r--plugins/epan/profinet/packet-dcom-cba.c448
-rw-r--r--plugins/epan/profinet/packet-pn-dcp.c402
-rw-r--r--plugins/epan/profinet/packet-pn-mrp.c134
-rw-r--r--plugins/epan/profinet/packet-pn-mrrt.c45
-rw-r--r--plugins/epan/profinet/packet-pn-ptcp.c197
-rw-r--r--plugins/epan/profinet/packet-pn-rsi.c234
-rw-r--r--plugins/epan/profinet/packet-pn-rt.c320
-rw-r--r--plugins/epan/profinet/packet-pn-rtc-one.c286
-rw-r--r--plugins/epan/profinet/packet-pn.c172
-rw-r--r--plugins/epan/profinet/packet-pn.h132
-rw-r--r--plugins/epan/stats_tree/pinfo_stats_tree.c156
-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.c116
-rw-r--r--plugins/epan/transum/packet-transum.h82
-rw-r--r--plugins/epan/transum/preferences.h20
-rw-r--r--plugins/epan/unistim/audio.h226
-rw-r--r--plugins/epan/unistim/basic.h40
-rw-r--r--plugins/epan/unistim/broadcast.h16
-rw-r--r--plugins/epan/unistim/display.h188
-rw-r--r--plugins/epan/unistim/expansion.h2
-rw-r--r--plugins/epan/unistim/key.h52
-rw-r--r--plugins/epan/unistim/network.h86
-rw-r--r--plugins/epan/unistim/packet-unistim.c387
-rw-r--r--plugins/epan/unistim/packet-unistim.h28
-rw-r--r--plugins/epan/unistim/uftp.h10
-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.c362
-rw-r--r--plugins/epan/wimax/mac_hd_type1_decoder.c76
-rw-r--r--plugins/epan/wimax/mac_hd_type2_decoder.c158
-rw-r--r--plugins/epan/wimax/mac_mgmt_msg_decoder.c18
-rw-r--r--plugins/epan/wimax/msg_aas_beam.c48
-rw-r--r--plugins/epan/wimax/msg_aas_fbck.c54
-rw-r--r--plugins/epan/wimax/msg_arq.c82
-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.c1189
-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.c255
-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.c101
-rw-r--r--plugins/epan/wimax/msg_rng_rsp.c155
-rw-r--r--plugins/epan/wimax/msg_sbc.c535
-rw-r--r--plugins/epan/wimax/msg_ucd.c243
-rw-r--r--plugins/epan/wimax/msg_ulmap.c1059
-rw-r--r--plugins/epan/wimax/packet-m2m.c124
-rw-r--r--plugins/epan/wimax/packet-wmx.c81
-rw-r--r--plugins/epan/wimax/wimax_bits.h22
-rw-r--r--plugins/epan/wimax/wimax_cdma_code_decoder.c14
-rw-r--r--plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c386
-rw-r--r--plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.h2
-rw-r--r--plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c396
-rw-r--r--plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.h2
-rw-r--r--plugins/epan/wimax/wimax_fch_decoder.c32
-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.c40
-rw-r--r--plugins/epan/wimax/wimax_pdu_decoder.c40
-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.c659
-rw-r--r--plugins/epan/wimax/wimax_utils.h32
-rw-r--r--plugins/epan/wimaxasncp/packet-wimaxasncp.c352
-rw-r--r--plugins/epan/wimaxasncp/wimaxasncp_dict.h24
-rw-r--r--plugins/epan/wimaxasncp/wimaxasncp_dict.l84
-rw-r--r--plugins/epan/wimaxmacphy/packet-wimaxmacphy.c684
149 files changed, 17887 insertions, 13807 deletions
diff --git a/plugins/epan/dfilter/ipaddr/CMakeLists.txt b/plugins/epan/dfilter/ipaddr/CMakeLists.txt
new file mode 100644
index 00000000..967ef95c
--- /dev/null
+++ b/plugins/epan/dfilter/ipaddr/CMakeLists.txt
@@ -0,0 +1,46 @@
+# CMakeLists.txt
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+
+include(WiresharkPlugin)
+
+# Plugin name and version info (major minor micro extra)
+set_module_info(ipaddr 0 1 0 0)
+
+set(DISSECTOR_SRC
+ ipaddr.c
+)
+
+set(PLUGIN_FILES
+ ${DISSECTOR_SRC}
+)
+
+set_source_files_properties(
+ ${PLUGIN_FILES}
+ PROPERTIES
+ COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
+)
+
+add_wireshark_plugin_library(ipaddr epan)
+
+target_link_libraries(ipaddr epan)
+
+install_plugin(ipaddr epan)
+
+#
+# Editor modelines - https://www.wireshark.org/tools/modelines.html
+#
+# Local variables:
+# c-basic-offset: 8
+# tab-width: 8
+# indent-tabs-mode: t
+# End:
+#
+# vi: set shiftwidth=8 tabstop=8 noexpandtab:
+# :indentSize=8:tabSize=8:noTabs=false:
+#
diff --git a/plugins/epan/dfilter/ipaddr/ipaddr.c b/plugins/epan/dfilter/ipaddr/ipaddr.c
new file mode 100644
index 00000000..537c0dc3
--- /dev/null
+++ b/plugins/epan/dfilter/ipaddr/ipaddr.c
@@ -0,0 +1,362 @@
+/* ipaddr.c
+ *
+ * Copyright 2023, João Valverde <j@v6e.pt>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#define WS_BUILD_DLL
+#include <wireshark.h>
+#include <wsutil/plugins.h>
+#include <epan/dfilter/dfilter-plugin.h>
+#include <epan/iana-ip.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 *
+lookup_block(fvalue_t *fv)
+{
+ switch (fvalue_type_ftenum(fv)) {
+ case FT_IPv4:
+ return ws_iana_ipv4_special_block_lookup(fvalue_get_ipv4(fv)->addr);
+ case FT_IPv6:
+ return ws_iana_ipv6_special_block_lookup(&fvalue_get_ipv6(fv)->addr);
+ default:
+ break;
+ }
+ ws_assert_not_reached();
+}
+
+static bool
+df_func_ip_special_name(GSList *stack, uint32_t arg_count _U_, df_cell_t *retval)
+{
+ GPtrArray *arg;
+ fvalue_t *fv_res;
+ const struct ws_iana_ip_special_block *ptr;
+
+ ws_assert(arg_count == 1);
+ arg = stack->data;
+ if (arg == NULL)
+ return false;
+
+ for (unsigned i = 0; i < arg->len; i++) {
+ ptr = lookup_block(arg->pdata[i]);
+ if (ptr == NULL)
+ continue;
+ fv_res = fvalue_new(FT_STRING);
+ fvalue_set_string(fv_res, ptr->name);
+ df_cell_append(retval, fv_res);
+ }
+
+ return !df_cell_is_empty(retval);
+}
+
+static bool
+df_func_ip_special_mask(GSList *stack, uint32_t arg_count _U_, df_cell_t *retval)
+{
+ GPtrArray *arg;
+ fvalue_t *fv_res;
+ const struct ws_iana_ip_special_block *ptr;
+ uint32_t mask;
+
+ ws_assert(arg_count == 1);
+ arg = stack->data;
+ if (arg == NULL)
+ return false;
+
+ for (unsigned i = 0; i < arg->len; i++) {
+ ptr = lookup_block(arg->pdata[i]);
+ if (ptr == NULL)
+ continue;
+ mask = 0;
+ if (ptr->reserved > 0)
+ mask |= (1UL << 0);
+ if (ptr->global > 0)
+ mask |= (1UL << 1);
+ if (ptr->forwardable > 0)
+ mask |= (1UL << 2);
+ if (ptr->destination > 0)
+ mask |= (1UL << 3);
+ if (ptr->source > 0)
+ mask |= (1UL << 4);
+ fv_res = fvalue_new(FT_UINT32);
+ fvalue_set_uinteger(fv_res, mask);
+ df_cell_append(retval, fv_res);
+ }
+
+ return !df_cell_is_empty(retval);
+}
+
+static bool
+ip_is_link_local(fvalue_t *fv)
+{
+ switch (fvalue_type_ftenum(fv)) {
+ case FT_IPv4:
+ return in4_addr_is_link_local(fvalue_get_ipv4(fv)->addr);
+ case FT_IPv6:
+ return in6_addr_is_linklocal(&fvalue_get_ipv6(fv)->addr);
+ default:
+ break;
+ }
+ ws_assert_not_reached();
+}
+
+static bool
+ip_is_multicast(fvalue_t *fv)
+{
+ switch (fvalue_type_ftenum(fv)) {
+ case FT_IPv4:
+ return in4_addr_is_multicast(fvalue_get_ipv4(fv)->addr);
+ case FT_IPv6:
+ return in6_addr_is_multicast(&fvalue_get_ipv6(fv)->addr);
+ default:
+ break;
+ }
+ ws_assert_not_reached();
+}
+
+static bool
+ipv4_is_rfc1918(fvalue_t *fv)
+{
+ switch (fvalue_type_ftenum(fv)) {
+ case FT_IPv4:
+ return in4_addr_is_private(fvalue_get_ipv4(fv)->addr);
+ case FT_IPv6:
+ return false;
+ default:
+ break;
+ }
+ ws_assert_not_reached();
+
+}
+
+static bool
+ipv6_is_ula(fvalue_t *fv)
+{
+ switch (fvalue_type_ftenum(fv)) {
+ case FT_IPv4:
+ return false;
+ case FT_IPv6:
+ return in6_addr_is_uniquelocal(&fvalue_get_ipv6(fv)->addr);
+ default:
+ break;
+ }
+ ws_assert_not_reached();
+}
+
+static bool
+df_func_ip_is_any(GSList *stack, uint32_t arg_count _U_, df_cell_t *retval, ip_is_func_t is_func)
+{
+ GPtrArray *arg;
+ fvalue_t *fv_res;
+
+ ws_assert(arg_count == 1);
+ arg = stack->data;
+ if (arg == NULL)
+ return false;
+
+ for (unsigned i = 0; i < arg->len; i++) {
+ fv_res = fvalue_new(FT_BOOLEAN);
+ fvalue_set_uinteger64(fv_res, is_func(arg->pdata[i]));
+ df_cell_append(retval, fv_res);
+ }
+
+ return !df_cell_is_empty(retval);
+}
+
+static bool
+df_func_ip_is_link_local(GSList *stack, uint32_t arg_count _U_, df_cell_t *retval)
+{
+ return df_func_ip_is_any(stack, arg_count, retval, ip_is_link_local);
+}
+
+static bool
+df_func_ip_is_multicast(GSList *stack, uint32_t arg_count _U_, df_cell_t *retval)
+{
+ return df_func_ip_is_any(stack, arg_count, retval, ip_is_multicast);
+}
+
+static bool
+df_func_ip_is_rfc1918(GSList *stack, uint32_t arg_count _U_, df_cell_t *retval)
+{
+ return df_func_ip_is_any(stack, arg_count, retval, ipv4_is_rfc1918);
+}
+
+static bool
+df_func_ip_is_ula(GSList *stack, uint32_t arg_count _U_, df_cell_t *retval)
+{
+ return df_func_ip_is_any(stack, arg_count, retval, ipv6_is_ula);
+}
+
+#define IPv4 1
+#define IPv6 2
+#define Both 3
+
+static bool
+check_which(ftenum_t ftype, int which)
+{
+ switch (which) {
+ case IPv4: return ftype == FT_IPv4;
+ case IPv6: return ftype == FT_IPv6;
+ case Both: return ftype == FT_IPv4 || ftype == FT_IPv6;
+ default:
+ break;
+ }
+ ws_assert_not_reached();
+}
+
+static const char *
+print_which(int which)
+{
+ switch (which) {
+ case IPv4: return "IPv4";
+ case IPv6: return "IPv6";
+ case Both: return "IPv4/IPv6";
+ default:
+ break;
+ }
+ ws_assert_not_reached();
+}
+
+static void
+check_ip_field(dfwork_t *dfw, const char *func_name, ftenum_t logical_ftype,
+ 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;
+
+ 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;
+ }
+ }
+ dfunc_fail(dfw, param, "Only %s fields can be used as parameter for %s()",
+ print_which(which), func_name);
+}
+
+static ftenum_t
+semcheck_ip_special_name(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, Both);
+ return FT_STRING;
+}
+
+static ftenum_t
+semcheck_ip_special_mask(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, Both);
+ return FT_UINT32;
+}
+
+static ftenum_t
+semcheck_is_ip_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, Both);
+ return FT_BOOLEAN;
+}
+
+static df_func_def_t func_ip_special_name = {
+ "ip_special_name",
+ df_func_ip_special_name,
+ 1, 1,
+ FT_STRING,
+ semcheck_ip_special_name,
+};
+
+static df_func_def_t func_ip_special_mask = {
+ "ip_special_mask",
+ df_func_ip_special_mask,
+ 1, 1,
+ FT_UINT32,
+ semcheck_ip_special_mask,
+};
+
+static df_func_def_t func_ip_is_link_local = {
+ "ip_linklocal",
+ df_func_ip_is_link_local,
+ 1, 1,
+ FT_BOOLEAN,
+ semcheck_is_ip_field,
+};
+
+static df_func_def_t func_ip_is_multicast = {
+ "ip_multicast",
+ df_func_ip_is_multicast,
+ 1, 1,
+ FT_BOOLEAN,
+ semcheck_is_ip_field,
+};
+
+static df_func_def_t func_ip_is_rfc1918 = {
+ "ip_rfc1918",
+ df_func_ip_is_rfc1918,
+ 1, 1,
+ FT_BOOLEAN,
+ semcheck_is_ip_field,
+};
+
+static df_func_def_t func_ip_is_ula = {
+ "ip_ula",
+ df_func_ip_is_ula,
+ 1, 1,
+ FT_BOOLEAN,
+ semcheck_is_ip_field,
+};
+
+static void
+init(void)
+{
+ df_func_register(&func_ip_special_name);
+ df_func_register(&func_ip_special_mask);
+ df_func_register(&func_ip_is_link_local);
+ df_func_register(&func_ip_is_multicast);
+ df_func_register(&func_ip_is_rfc1918);
+ df_func_register(&func_ip_is_ula);
+}
+
+static void
+cleanup(void)
+{
+ df_func_deregister(&func_ip_special_name);
+ df_func_deregister(&func_ip_special_mask);
+ df_func_deregister(&func_ip_is_link_local);
+ df_func_deregister(&func_ip_is_multicast);
+ df_func_deregister(&func_ip_is_rfc1918);
+ df_func_deregister(&func_ip_is_ula);
+}
+
+void
+plugin_register(void)
+{
+ static dfilter_plugin plug;
+
+ plug.init = init;
+ plug.cleanup = cleanup;
+ dfilter_plugins_register(&plug);
+}
+
+uint32_t
+plugin_describe(void)
+{
+ return WS_PLUGIN_DESC_DFILTER;
+}
diff --git a/plugins/epan/ethercat/packet-ams.c b/plugins/epan/ethercat/packet-ams.c
index b6246eb5..21ae65c7 100644
--- a/plugins/epan/ethercat/packet-ams.c
+++ b/plugins/epan/ethercat/packet-ams.c
@@ -24,98 +24,98 @@ void proto_reg_handoff_ams(void);
#define AMS_TCP_PORT 48898 /* Not IANA registered */
/* Define the ams proto */
-int proto_ams = -1;
+int proto_ams;
static dissector_handle_t amstcp_handle;
/* Define the tree for ams */
-static int ett_ams = -1;
-static int ett_ams_stateflags = -1;
-static int ett_ams_adsreadrequest = -1;
-static int ett_ams_adsreadresponse = -1;
-static int ett_ams_adswriterequest = -1;
-static int ett_ams_adswriteresponse = -1;
-static int ett_ams_adsreadwriterequest = -1;
-static int ett_ams_adsreadwriteresponse = -1;
-static int ett_ams_adsreadstaterequest = -1;
-static int ett_ams_adsreadstateresponse = -1;
-static int ett_ams_adswritectrlrequest = -1;
-static int ett_ams_adswritectrlresponse = -1;
-static int ett_ams_adsreaddinforequest = -1;
-static int ett_ams_adsreaddinforesponse = -1;
-static int ett_ams_adsadddnrequest = -1;
-static int ett_ams_adsadddnresponse = -1;
-static int ett_ams_adsdeldnrequest = -1;
-static int ett_ams_adsdeldnresponse = -1;
-static int ett_ams_adsdnrequest = -1;
-
-static int hf_ams_sendernetid = -1;
-static int hf_ams_senderport = -1;
-static int hf_ams_targetnetid = -1;
-static int hf_ams_targetport = -1;
-static int hf_ams_cmdid = -1;
-static int hf_ams_stateflags = -1;
-static int hf_ams_stateresponse = -1;
-static int hf_ams_statenoreturn = -1;
-static int hf_ams_stateadscmd = -1;
-static int hf_ams_statesyscmd = -1;
-static int hf_ams_statehighprio = -1;
-static int hf_ams_statetimestampadded = -1;
-static int hf_ams_stateudp = -1;
-static int hf_ams_stateinitcmd = -1;
-static int hf_ams_statebroadcast = -1;
-static int hf_ams_cbdata = -1;
-static int hf_ams_errorcode = -1;
-static int hf_ams_invokeid = -1;
-static int hf_ams_data = -1;
+static int ett_ams;
+static int ett_ams_stateflags;
+static int ett_ams_adsreadrequest;
+static int ett_ams_adsreadresponse;
+static int ett_ams_adswriterequest;
+static int ett_ams_adswriteresponse;
+static int ett_ams_adsreadwriterequest;
+static int ett_ams_adsreadwriteresponse;
+static int ett_ams_adsreadstaterequest;
+static int ett_ams_adsreadstateresponse;
+static int ett_ams_adswritectrlrequest;
+static int ett_ams_adswritectrlresponse;
+static int ett_ams_adsreaddinforequest;
+static int ett_ams_adsreaddinforesponse;
+static int ett_ams_adsadddnrequest;
+static int ett_ams_adsadddnresponse;
+static int ett_ams_adsdeldnrequest;
+static int ett_ams_adsdeldnresponse;
+static int ett_ams_adsdnrequest;
+
+static int hf_ams_sendernetid;
+static int hf_ams_senderport;
+static int hf_ams_targetnetid;
+static int hf_ams_targetport;
+static int hf_ams_cmdid;
+static int hf_ams_stateflags;
+static int hf_ams_stateresponse;
+static int hf_ams_statenoreturn;
+static int hf_ams_stateadscmd;
+static int hf_ams_statesyscmd;
+static int hf_ams_statehighprio;
+static int hf_ams_statetimestampadded;
+static int hf_ams_stateudp;
+static int hf_ams_stateinitcmd;
+static int hf_ams_statebroadcast;
+static int hf_ams_cbdata;
+static int hf_ams_errorcode;
+static int hf_ams_invokeid;
+static int hf_ams_data;
/*ads Commands */
-static int hf_ams_adsindexgroup = -1;
-static int hf_ams_adsindexoffset = -1;
-static int hf_ams_adscblength = -1;
-static int hf_ams_adsreadrequest = -1;
-static int hf_ams_adsreadresponse = -1;
-static int hf_ams_adsinvokeid = -1;
-static int hf_ams_adsresult = -1;
-static int hf_ams_adsdata = -1;
-static int hf_ams_adswriterequest = -1;
-static int hf_ams_adswriteresponse = -1;
-static int hf_ams_adsreadwriterequest = -1;
-static int hf_ams_adsreadwriteresponse = -1;
-static int hf_ams_adscbreadlength = -1;
-static int hf_ams_adscbwritelength = -1;
-static int hf_ams_adsstate = -1;
-static int hf_ams_adsdevicestate = -1;
-static int hf_ams_adsnotificationhandle = -1;
-static int hf_ams_adsreadstaterequest = -1;
-static int hf_ams_adsreadstateresponse = -1;
-static int hf_ams_adswritectrlrequest = -1;
-static int hf_ams_adswritectrlresponse = -1;
-static int hf_ams_adsreaddinforequest = -1;
-static int hf_ams_adsreaddinforesponse = -1;
-static int hf_ams_adsadddnrequest = -1;
-static int hf_ams_adsadddnresponse = -1;
-static int hf_ams_adsdeldnrequest = -1;
-static int hf_ams_adsdeldnresponse = -1;
-static int hf_ams_adsdnrequest = -1;
-/* static int hf_ams_adsdnresponse = -1; */
-/* static int hf_ams_adsnoteattrib = -1; */
-/* static int hf_ams_adsnoteblocks = -1; */
-/* static int hf_ams_adsversion = -1; */
-static int hf_ams_adsdevicename = -1;
-static int hf_ams_adsversionversion = -1;
-static int hf_ams_adsversionrevision = -1;
-static int hf_ams_adsversionbuild = -1;
-static int hf_ams_adsnoteblocksstamps = -1;
-/* static int hf_ams_adsnoteblocksstamp = -1; */
-/* static int hf_ams_adstimestamp = -1; */
-/* static int hf_ams_adssamplecnt = -1; */
-/* static int hf_ams_adsnoteblockssample = -1; */
-static int hf_ams_adstransmode = -1;
-static int hf_ams_adsmaxdelay = -1;
-static int hf_ams_adscycletime = -1;
-/* static int hf_ams_adscmpmax = -1; */
-/* static int hf_ams_adscmpmin = -1; */
+static int hf_ams_adsindexgroup;
+static int hf_ams_adsindexoffset;
+static int hf_ams_adscblength;
+static int hf_ams_adsreadrequest;
+static int hf_ams_adsreadresponse;
+static int hf_ams_adsinvokeid;
+static int hf_ams_adsresult;
+static int hf_ams_adsdata;
+static int hf_ams_adswriterequest;
+static int hf_ams_adswriteresponse;
+static int hf_ams_adsreadwriterequest;
+static int hf_ams_adsreadwriteresponse;
+static int hf_ams_adscbreadlength;
+static int hf_ams_adscbwritelength;
+static int hf_ams_adsstate;
+static int hf_ams_adsdevicestate;
+static int hf_ams_adsnotificationhandle;
+static int hf_ams_adsreadstaterequest;
+static int hf_ams_adsreadstateresponse;
+static int hf_ams_adswritectrlrequest;
+static int hf_ams_adswritectrlresponse;
+static int hf_ams_adsreaddinforequest;
+static int hf_ams_adsreaddinforesponse;
+static int hf_ams_adsadddnrequest;
+static int hf_ams_adsadddnresponse;
+static int hf_ams_adsdeldnrequest;
+static int hf_ams_adsdeldnresponse;
+static int hf_ams_adsdnrequest;
+/* static int hf_ams_adsdnresponse; */
+/* static int hf_ams_adsnoteattrib; */
+/* static int hf_ams_adsnoteblocks; */
+/* static int hf_ams_adsversion; */
+static int hf_ams_adsdevicename;
+static int hf_ams_adsversionversion;
+static int hf_ams_adsversionrevision;
+static int hf_ams_adsversionbuild;
+static int hf_ams_adsnoteblocksstamps;
+/* static int hf_ams_adsnoteblocksstamp; */
+/* static int hf_ams_adstimestamp; */
+/* static int hf_ams_adssamplecnt; */
+/* static int hf_ams_adsnoteblockssample; */
+static int hf_ams_adstransmode;
+static int hf_ams_adsmaxdelay;
+static int hf_ams_adscycletime;
+/* static int hf_ams_adscmpmax; */
+/* static int hf_ams_adscmpmin; */
static dissector_handle_t ams_handle;
@@ -372,28 +372,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 +414,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 +475,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 +494,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 +518,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 +548,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 +560,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 +587,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 +602,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 +633,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 +644,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 +678,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 +702,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 +714,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 +738,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 +759,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 +774,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 +797,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 +815,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 +836,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 +1192,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 199e1028..006fc548 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 c5998540..24f6b53a 100644
--- a/plugins/epan/ethercat/packet-ecatmb.c
+++ b/plugins/epan/ethercat/packet-ecatmb.c
@@ -32,163 +32,163 @@ static dissector_handle_t ams_handle;
static dissector_handle_t ecat_mailbox_handle;
/* Define the EtherCAT mailbox proto */
-int proto_ecat_mailbox = -1;
-
-static int ett_ecat_mailbox = -1;
-static int ett_ecat_mailbox_eoe = -1;
-static int ett_ecat_mailbox_eoe_init = -1;
-static int ett_ecat_mailbox_eoe_macfilter = -1;
-static int ett_ecat_mailbox_eoe_macfilter_filter = -1;
-static int ett_ecat_mailbox_eoe_macfilter_filtermask = -1;
-static int ett_ecat_mailbox_coe = -1;
-static int ett_ecat_mailbox_sdo = -1;
-static int ett_ecat_mailbox_coe_sdoccs = -1;
-static int ett_ecat_mailbox_coe_sdoscs = -1;
-static int ett_ecat_mailbox_foe = -1;
-static int ett_ecat_mailbox_foe_efw = -1;
-static int ett_ecat_mailbox_soeflag = -1;
-static int ett_ecat_mailbox_soe = -1;
-static int ett_ecat_mailbox_fraghead = -1;
-static int ett_ecat_mailbox_header = -1;
-
-static int hf_ecat_mailboxlength = -1;
-static int hf_ecat_mailboxaddress = -1;
-static int hf_ecat_mailboxpriority = -1;
-static int hf_ecat_mailboxtype = -1;
-static int hf_ecat_mailboxcounter = -1;
-static int hf_ecat_mailbox_eoe = -1;
-static int hf_ecat_mailbox_eoe_fraghead = -1;
-static int hf_ecat_mailbox_eoe_type = -1;
-static int hf_ecat_mailbox_eoe_fragno = -1;
-static int hf_ecat_mailbox_eoe_offset = -1;
-static int hf_ecat_mailbox_eoe_frame = -1;
-static int hf_ecat_mailbox_eoe_last = -1;
-static int hf_ecat_mailbox_eoe_timestampreq = -1;
-static int hf_ecat_mailbox_eoe_timestampapp = -1;
-static int hf_ecat_mailbox_eoe_fragment = -1;
-static int hf_ecat_mailbox_eoe_init = -1;
-static int hf_ecat_mailbox_eoe_init_contains_macaddr = -1;
-static int hf_ecat_mailbox_eoe_init_contains_ipaddr = -1;
-static int hf_ecat_mailbox_eoe_init_contains_subnetmask = -1;
-static int hf_ecat_mailbox_eoe_init_contains_defaultgateway = -1;
-static int hf_ecat_mailbox_eoe_init_contains_dnsserver = -1;
-static int hf_ecat_mailbox_eoe_init_contains_dnsname = -1;
-static int hf_ecat_mailbox_eoe_init_append_timestamp = -1;
-static int hf_ecat_mailbox_eoe_init_macaddr = -1;
-static int hf_ecat_mailbox_eoe_init_ipaddr = -1;
-static int hf_ecat_mailbox_eoe_init_subnetmask = -1;
-static int hf_ecat_mailbox_eoe_init_defaultgateway = -1;
-static int hf_ecat_mailbox_eoe_init_dnsserver = -1;
-static int hf_ecat_mailbox_eoe_init_dnsname = -1;
-static int hf_ecat_mailbox_eoe_macfilter = -1;
-static int hf_ecat_mailbox_eoe_macfilter_macfiltercount = -1;
-static int hf_ecat_mailbox_eoe_macfilter_maskcount = -1;
-static int hf_ecat_mailbox_eoe_macfilter_nobroadcasts = -1;
+int proto_ecat_mailbox;
+
+static int ett_ecat_mailbox;
+static int ett_ecat_mailbox_eoe;
+static int ett_ecat_mailbox_eoe_init;
+static int ett_ecat_mailbox_eoe_macfilter;
+static int ett_ecat_mailbox_eoe_macfilter_filter;
+static int ett_ecat_mailbox_eoe_macfilter_filtermask;
+static int ett_ecat_mailbox_coe;
+static int ett_ecat_mailbox_sdo;
+static int ett_ecat_mailbox_coe_sdoccs;
+static int ett_ecat_mailbox_coe_sdoscs;
+static int ett_ecat_mailbox_foe;
+static int ett_ecat_mailbox_foe_efw;
+static int ett_ecat_mailbox_soeflag;
+static int ett_ecat_mailbox_soe;
+static int ett_ecat_mailbox_fraghead;
+static int ett_ecat_mailbox_header;
+
+static int hf_ecat_mailboxlength;
+static int hf_ecat_mailboxaddress;
+static int hf_ecat_mailboxpriority;
+static int hf_ecat_mailboxtype;
+static int hf_ecat_mailboxcounter;
+static int hf_ecat_mailbox_eoe;
+static int hf_ecat_mailbox_eoe_fraghead;
+static int hf_ecat_mailbox_eoe_type;
+static int hf_ecat_mailbox_eoe_fragno;
+static int hf_ecat_mailbox_eoe_offset;
+static int hf_ecat_mailbox_eoe_frame;
+static int hf_ecat_mailbox_eoe_last;
+static int hf_ecat_mailbox_eoe_timestampreq;
+static int hf_ecat_mailbox_eoe_timestampapp;
+static int hf_ecat_mailbox_eoe_fragment;
+static int hf_ecat_mailbox_eoe_init;
+static int hf_ecat_mailbox_eoe_init_contains_macaddr;
+static int hf_ecat_mailbox_eoe_init_contains_ipaddr;
+static int hf_ecat_mailbox_eoe_init_contains_subnetmask;
+static int hf_ecat_mailbox_eoe_init_contains_defaultgateway;
+static int hf_ecat_mailbox_eoe_init_contains_dnsserver;
+static int hf_ecat_mailbox_eoe_init_contains_dnsname;
+static int hf_ecat_mailbox_eoe_init_append_timestamp;
+static int hf_ecat_mailbox_eoe_init_macaddr;
+static int hf_ecat_mailbox_eoe_init_ipaddr;
+static int hf_ecat_mailbox_eoe_init_subnetmask;
+static int hf_ecat_mailbox_eoe_init_defaultgateway;
+static int hf_ecat_mailbox_eoe_init_dnsserver;
+static int hf_ecat_mailbox_eoe_init_dnsname;
+static int hf_ecat_mailbox_eoe_macfilter;
+static int hf_ecat_mailbox_eoe_macfilter_macfiltercount;
+static int hf_ecat_mailbox_eoe_macfilter_maskcount;
+static int hf_ecat_mailbox_eoe_macfilter_nobroadcasts;
static int hf_ecat_mailbox_eoe_macfilter_filter;
-static int hf_ecat_mailbox_eoe_macfilter_filters[16] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
-static int hf_ecat_mailbox_eoe_macfilter_filtermask = -1;
-static int hf_ecat_mailbox_eoe_macfilter_filtermasks[4] = {-1,-1,-1,-1};
-static int hf_ecat_mailbox_eoe_timestamp = -1;
-static int hf_ecat_mailbox_coe = -1;
-static int hf_ecat_mailbox_coe_number = -1;
-static int hf_ecat_mailbox_coe_type = -1;
-static int hf_ecat_mailbox_coe_sdoreq = -1;
-static int hf_ecat_mailbox_coe_sdoccsid = -1;
-static int hf_ecat_mailbox_coe_sdoccsid_sizeind = -1;
-static int hf_ecat_mailbox_coe_sdoccsid_expedited = -1;
-static int hf_ecat_mailbox_coe_sdoccsid_size0= -1;
-static int hf_ecat_mailbox_coe_sdoccsid_size1= -1;
-static int hf_ecat_mailbox_coe_sdoccsid_complete = -1;
-static int hf_ecat_mailbox_coe_sdoccsds = -1;
-static int hf_ecat_mailbox_coe_sdoccsds_lastseg = -1;
-static int hf_ecat_mailbox_coe_sdoccsds_size = -1;
-static int hf_ecat_mailbox_coe_sdoccsds_toggle = -1;
-static int hf_ecat_mailbox_coe_sdoccsus = -1;
-static int hf_ecat_mailbox_coe_sdoccsus_toggle = -1;
-static int hf_ecat_mailbox_coe_sdoccsiu = -1;
-/* static int hf_ecat_mailbox_coe_sdoccsiu_complete = -1; */
-static int hf_ecat_mailbox_coe_sdoidx = -1;
-static int hf_ecat_mailbox_coe_sdoabortcode = -1;
-static int hf_ecat_mailbox_coe_sdosub = -1;
-static int hf_ecat_mailbox_coe_sdodata = -1;
-static int hf_ecat_mailbox_coe_sdodata1 = -1;
-static int hf_ecat_mailbox_coe_sdodata2 = -1;
-static int hf_ecat_mailbox_coe_sdoldata = -1;
-static int hf_ecat_mailbox_coe_sdolength = -1;
-/* static int hf_ecat_mailbox_coe_sdoerror = -1; */
-static int hf_ecat_mailbox_coe_sdores = -1;
-static int hf_ecat_mailbox_coe_sdoscsds = -1;
-static int hf_ecat_mailbox_coe_sdoscsds_toggle = -1;
-static int hf_ecat_mailbox_coe_sdoscsiu = -1;
-static int hf_ecat_mailbox_coe_sdoscsiu_sizeind = -1;
-static int hf_ecat_mailbox_coe_sdoscsiu_expedited = -1;
-static int hf_ecat_mailbox_coe_sdoscsiu_size0 = -1;
-static int hf_ecat_mailbox_coe_sdoscsiu_size1 = -1;
-static int hf_ecat_mailbox_coe_sdoscsiu_complete = -1;
-static int hf_ecat_mailbox_coe_sdoscsus = -1;
-static int hf_ecat_mailbox_coe_sdoscsus_lastseg = -1;
-static int hf_ecat_mailbox_coe_sdoscsus_bytes = -1;
-static int hf_ecat_mailbox_coe_sdoscsus_toggle = -1;
-static int hf_ecat_mailbox_coe_sdoinfoopcode = -1;
-static int hf_ecat_mailbox_coe_sdoinfofrag = -1;
-static int hf_ecat_mailbox_coe_sdoinfolisttype = -1;
-static int hf_ecat_mailbox_coe_sdoinfolist = -1;
-static int hf_ecat_mailbox_coe_sdoinfoindex = -1;
-static int hf_ecat_mailbox_coe_sdoinfosubindex = -1;
-static int hf_ecat_mailbox_coe_sdoinfovalueinfo = -1;
-static int hf_ecat_mailbox_coe_sdoinfoerrorcode = -1;
-static int hf_ecat_mailbox_coe_sdoinfodatatype = -1;
-static int hf_ecat_mailbox_coe_sdoinfomaxsub = -1;
-static int hf_ecat_mailbox_coe_sdoinfoobjcode = -1;
-static int hf_ecat_mailbox_coe_sdoinfoname = -1;
-static int hf_ecat_mailbox_coe_sdoinfobitlen = -1;
-static int hf_ecat_mailbox_coe_sdoinfoobjaccess = -1;
-static int hf_ecat_mailbox_coe_sdoinfounittype = -1;
-static int hf_ecat_mailbox_coe_sdoinfodefaultvalue = -1;
-static int hf_ecat_mailbox_coe_sdoinfominvalue = -1;
-static int hf_ecat_mailbox_coe_sdoinfomaxvalue = -1;
-static int hf_ecat_mailboxdata = -1;
-static int hf_ecat_mailbox_foe = -1;
-static int hf_ecat_mailbox_foe_opmode = -1;
-static int hf_ecat_mailbox_foe_filelength = -1;
-static int hf_ecat_mailbox_foe_filename = -1;
-static int hf_ecat_mailbox_foe_packetno = -1;
-static int hf_ecat_mailbox_foe_errcode = -1;
-static int hf_ecat_mailbox_foe_errtext = -1;
-static int hf_ecat_mailbox_foe_busydone = -1;
-static int hf_ecat_mailbox_foe_busyentire = -1;
-static int hf_ecat_mailbox_foe_data = -1;
-static int hf_ecat_mailbox_foe_efw = -1;
-static int hf_ecat_mailbox_foe_efw_cmd = -1;
-static int hf_ecat_mailbox_foe_efw_size = -1;
-static int hf_ecat_mailbox_foe_efw_addresslw = -1;
-static int hf_ecat_mailbox_foe_efw_addresshw = -1;
-static int hf_ecat_mailbox_foe_efw_data = -1;
-static int hf_ecat_mailbox_soe = -1;
-static int hf_ecat_mailbox_soe_header = -1;
-
-static int hf_ecat_mailbox_soe_header_opcode = -1;
-static int hf_ecat_mailbox_soe_header_incomplete = -1;
-static int hf_ecat_mailbox_soe_header_error = -1;
-static int hf_ecat_mailbox_soe_header_driveno = -1;
-static int hf_ecat_mailbox_soe_header_datastate = -1;
-static int hf_ecat_mailbox_soe_header_name = -1;
-static int hf_ecat_mailbox_soe_header_attribute = -1;
-static int hf_ecat_mailbox_soe_header_unit = -1;
-static int hf_ecat_mailbox_soe_header_min = -1;
-static int hf_ecat_mailbox_soe_header_max = -1;
-static int hf_ecat_mailbox_soe_header_value = -1;
-static int hf_ecat_mailbox_soe_header_reserved = -1;
-static int hf_ecat_mailbox_soe_idn = -1;
-static int hf_ecat_mailbox_soe_data = -1;
-static int hf_ecat_mailbox_soe_frag = -1;
-static int hf_ecat_mailbox_soe_error = -1;
-
-static expert_field ei_ecat_mailbox_error = EI_INIT;
-static expert_field ei_ecat_mailbox_coe_error = EI_INIT;
-static expert_field ei_ecat_mailbox_eoe_error = EI_INIT;
-static expert_field ei_ecat_mailbox_soe_error = EI_INIT;
-static expert_field ei_ecat_mailbox_foe_error = EI_INIT;
+static int hf_ecat_mailbox_eoe_macfilter_filters[16];
+static int hf_ecat_mailbox_eoe_macfilter_filtermask;
+static int hf_ecat_mailbox_eoe_macfilter_filtermasks[4];
+static int hf_ecat_mailbox_eoe_timestamp;
+static int hf_ecat_mailbox_coe;
+static int hf_ecat_mailbox_coe_number;
+static int hf_ecat_mailbox_coe_type;
+static int hf_ecat_mailbox_coe_sdoreq;
+static int hf_ecat_mailbox_coe_sdoccsid;
+static int hf_ecat_mailbox_coe_sdoccsid_sizeind;
+static int hf_ecat_mailbox_coe_sdoccsid_expedited;
+static int hf_ecat_mailbox_coe_sdoccsid_size0;
+static int hf_ecat_mailbox_coe_sdoccsid_size1;
+static int hf_ecat_mailbox_coe_sdoccsid_complete;
+static int hf_ecat_mailbox_coe_sdoccsds;
+static int hf_ecat_mailbox_coe_sdoccsds_lastseg;
+static int hf_ecat_mailbox_coe_sdoccsds_size;
+static int hf_ecat_mailbox_coe_sdoccsds_toggle;
+static int hf_ecat_mailbox_coe_sdoccsus;
+static int hf_ecat_mailbox_coe_sdoccsus_toggle;
+static int hf_ecat_mailbox_coe_sdoccsiu;
+/* static int hf_ecat_mailbox_coe_sdoccsiu_complete; */
+static int hf_ecat_mailbox_coe_sdoidx;
+static int hf_ecat_mailbox_coe_sdoabortcode;
+static int hf_ecat_mailbox_coe_sdosub;
+static int hf_ecat_mailbox_coe_sdodata;
+static int hf_ecat_mailbox_coe_sdodata1;
+static int hf_ecat_mailbox_coe_sdodata2;
+static int hf_ecat_mailbox_coe_sdoldata;
+static int hf_ecat_mailbox_coe_sdolength;
+/* static int hf_ecat_mailbox_coe_sdoerror; */
+static int hf_ecat_mailbox_coe_sdores;
+static int hf_ecat_mailbox_coe_sdoscsds;
+static int hf_ecat_mailbox_coe_sdoscsds_toggle;
+static int hf_ecat_mailbox_coe_sdoscsiu;
+static int hf_ecat_mailbox_coe_sdoscsiu_sizeind;
+static int hf_ecat_mailbox_coe_sdoscsiu_expedited;
+static int hf_ecat_mailbox_coe_sdoscsiu_size0;
+static int hf_ecat_mailbox_coe_sdoscsiu_size1;
+static int hf_ecat_mailbox_coe_sdoscsiu_complete;
+static int hf_ecat_mailbox_coe_sdoscsus;
+static int hf_ecat_mailbox_coe_sdoscsus_lastseg;
+static int hf_ecat_mailbox_coe_sdoscsus_bytes;
+static int hf_ecat_mailbox_coe_sdoscsus_toggle;
+static int hf_ecat_mailbox_coe_sdoinfoopcode;
+static int hf_ecat_mailbox_coe_sdoinfofrag;
+static int hf_ecat_mailbox_coe_sdoinfolisttype;
+static int hf_ecat_mailbox_coe_sdoinfolist;
+static int hf_ecat_mailbox_coe_sdoinfoindex;
+static int hf_ecat_mailbox_coe_sdoinfosubindex;
+static int hf_ecat_mailbox_coe_sdoinfovalueinfo;
+static int hf_ecat_mailbox_coe_sdoinfoerrorcode;
+static int hf_ecat_mailbox_coe_sdoinfodatatype;
+static int hf_ecat_mailbox_coe_sdoinfomaxsub;
+static int hf_ecat_mailbox_coe_sdoinfoobjcode;
+static int hf_ecat_mailbox_coe_sdoinfoname;
+static int hf_ecat_mailbox_coe_sdoinfobitlen;
+static int hf_ecat_mailbox_coe_sdoinfoobjaccess;
+static int hf_ecat_mailbox_coe_sdoinfounittype;
+static int hf_ecat_mailbox_coe_sdoinfodefaultvalue;
+static int hf_ecat_mailbox_coe_sdoinfominvalue;
+static int hf_ecat_mailbox_coe_sdoinfomaxvalue;
+static int hf_ecat_mailboxdata;
+static int hf_ecat_mailbox_foe;
+static int hf_ecat_mailbox_foe_opmode;
+static int hf_ecat_mailbox_foe_filelength;
+static int hf_ecat_mailbox_foe_filename;
+static int hf_ecat_mailbox_foe_packetno;
+static int hf_ecat_mailbox_foe_errcode;
+static int hf_ecat_mailbox_foe_errtext;
+static int hf_ecat_mailbox_foe_busydone;
+static int hf_ecat_mailbox_foe_busyentire;
+static int hf_ecat_mailbox_foe_data;
+static int hf_ecat_mailbox_foe_efw;
+static int hf_ecat_mailbox_foe_efw_cmd;
+static int hf_ecat_mailbox_foe_efw_size;
+static int hf_ecat_mailbox_foe_efw_addresslw;
+static int hf_ecat_mailbox_foe_efw_addresshw;
+static int hf_ecat_mailbox_foe_efw_data;
+static int hf_ecat_mailbox_soe;
+static int hf_ecat_mailbox_soe_header;
+
+static int hf_ecat_mailbox_soe_header_opcode;
+static int hf_ecat_mailbox_soe_header_incomplete;
+static int hf_ecat_mailbox_soe_header_error;
+static int hf_ecat_mailbox_soe_header_driveno;
+static int hf_ecat_mailbox_soe_header_datastate;
+static int hf_ecat_mailbox_soe_header_name;
+static int hf_ecat_mailbox_soe_header_attribute;
+static int hf_ecat_mailbox_soe_header_unit;
+static int hf_ecat_mailbox_soe_header_min;
+static int hf_ecat_mailbox_soe_header_max;
+static int hf_ecat_mailbox_soe_header_value;
+static int hf_ecat_mailbox_soe_header_reserved;
+static int hf_ecat_mailbox_soe_idn;
+static int hf_ecat_mailbox_soe_data;
+static int hf_ecat_mailbox_soe_frag;
+static int hf_ecat_mailbox_soe_error;
+
+static expert_field ei_ecat_mailbox_error;
+static expert_field ei_ecat_mailbox_coe_error;
+static expert_field ei_ecat_mailbox_eoe_error;
+static expert_field ei_ecat_mailbox_soe_error;
+static expert_field ei_ecat_mailbox_foe_error;
static const value_string EcMBoxType[] =
@@ -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 54dce708..6e9ad29b 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 75f269b4..ae9156f1 100644
--- a/plugins/epan/ethercat/packet-esl.c
+++ b/plugins/epan/ethercat/packet-esl.c
@@ -24,29 +24,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 +70,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
@@ -84,14 +84,14 @@ static dissector_handle_t eth_withoutfcs_handle;
void proto_reg_handoff_esl(void);
/* Define the esl proto */
-int proto_esl = -1;
+int proto_esl;
-static int ett_esl = -1;
+static int ett_esl;
-static int hf_esl_timestamp = -1;
-static int hf_esl_port = -1;
-static int hf_esl_crcerror = -1;
-static int hf_esl_alignerror = -1;
+static int hf_esl_timestamp;
+static int hf_esl_port;
+static int hf_esl_crcerror;
+static int hf_esl_alignerror;
/* Note: using external tfs strings apparently doesn't work in a plugin */
static const true_false_string flags_yes_no = {
@@ -101,7 +101,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 +129,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 +164,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 +194,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 +222,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 +243,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 +262,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 +275,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 +288,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 +328,7 @@ proto_register_esl(void) {
},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_esl,
};
@@ -349,12 +349,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 6ba7c9e3..6e20fdfa 100644
--- a/plugins/epan/ethercat/packet-ethercat-datagram.c
+++ b/plugins/epan/ethercat/packet-ethercat-datagram.c
@@ -29,418 +29,418 @@ static dissector_handle_t ecat_handle;
static dissector_handle_t ecat_mailbox_handle;
/* Define the EtherCAT proto */
-static int proto_ecat_datagram = -1;
+static int proto_ecat_datagram;
/* Define the tree for EtherCAT */
-static int ett_ecat = -1;
-static int ett_ecat_header = -1;
-static int ett_ecat_dc = -1;
-static int ett_ecat_length = -1;
-static int ett_ecat_padding = -1;
-static int ett_ecat_datagram_subtree = -1;
-static int ett_ecat_reg_esc_features = -1;
-static int ett_ecat_reg_dlctrl1 = -1;
-static int ett_ecat_reg_dlctrl2 = -1;
-static int ett_ecat_reg_dlctrl3 = -1;
-static int ett_ecat_reg_dlctrl4 = -1;
-static int ett_ecat_reg_dlstatus1 = -1;
-static int ett_ecat_reg_dlstatus2 = -1;
-static int ett_ecat_reg_alctrl = -1;
-static int ett_ecat_reg_alstatus = -1;
-static int ett_ecat_reg_pdictrl1 = -1;
-static int ett_ecat_reg_pdictrl2 = -1;
-static int ett_ecat_reg_ecat_mask = -1;
-static int ett_ecat_reg_pdiL = -1;
-static int ett_ecat_reg_ecat = -1;
-static int ett_ecat_reg_pdi1 = -1;
-static int ett_ecat_reg_crc0 = -1;
-static int ett_ecat_reg_crc1 = -1;
-static int ett_ecat_reg_crc2 = -1;
-static int ett_ecat_reg_crc3 = -1;
-static int ett_ecat_reg_wd_status = -1;
-static int ett_ecat_reg_eeprom_assign = -1;
-static int ett_ecat_reg_ctrlstat = -1;
-static int ett_ecat_reg_mio_ctrlstat = -1;
-static int ett_ecat_mio_addr = -1;
-static int ett_ecat_mio_access = -1;
-static int ett_ecat_mio_status0 = -1;
-static int ett_ecat_mio_status1 = -1;
-static int ett_ecat_mio_status2 = -1;
-static int ett_ecat_mio_status3 = -1;
-static int ett_ecat_reg_fmmu = -1;
-static int ett_ecat_reg_syncman = -1;
-static int ett_ecat_reg_syncman_ctrlstatus = -1;
-static int ett_ecat_reg_syncman_sm_enable = -1;
-static int ett_ecat_reg_dc_cycunitctrl = -1;
-static int ett_ecat_dc_activation = -1;
-static int ett_ecat_dc_activationstat = -1;
-static int ett_ecat_dc_sync0_status = -1;
-static int ett_ecat_dc_sync1_status = -1;
-static int ett_ecat_dc_latch0_ctrl = -1;
-static int ett_ecat_dc_latch1_ctrl = -1;
-static int ett_ecat_dc_latch0_status = -1;
-static int ett_ecat_dc_latch1_status = -1;
+static int ett_ecat;
+static int ett_ecat_header;
+static int ett_ecat_dc;
+static int ett_ecat_length;
+static int ett_ecat_padding;
+static int ett_ecat_datagram_subtree;
+static int ett_ecat_reg_esc_features;
+static int ett_ecat_reg_dlctrl1;
+static int ett_ecat_reg_dlctrl2;
+static int ett_ecat_reg_dlctrl3;
+static int ett_ecat_reg_dlctrl4;
+static int ett_ecat_reg_dlstatus1;
+static int ett_ecat_reg_dlstatus2;
+static int ett_ecat_reg_alctrl;
+static int ett_ecat_reg_alstatus;
+static int ett_ecat_reg_pdictrl1;
+static int ett_ecat_reg_pdictrl2;
+static int ett_ecat_reg_ecat_mask;
+static int ett_ecat_reg_pdiL;
+static int ett_ecat_reg_ecat;
+static int ett_ecat_reg_pdi1;
+static int ett_ecat_reg_crc0;
+static int ett_ecat_reg_crc1;
+static int ett_ecat_reg_crc2;
+static int ett_ecat_reg_crc3;
+static int ett_ecat_reg_wd_status;
+static int ett_ecat_reg_eeprom_assign;
+static int ett_ecat_reg_ctrlstat;
+static int ett_ecat_reg_mio_ctrlstat;
+static int ett_ecat_mio_addr;
+static int ett_ecat_mio_access;
+static int ett_ecat_mio_status0;
+static int ett_ecat_mio_status1;
+static int ett_ecat_mio_status2;
+static int ett_ecat_mio_status3;
+static int ett_ecat_reg_fmmu;
+static int ett_ecat_reg_syncman;
+static int ett_ecat_reg_syncman_ctrlstatus;
+static int ett_ecat_reg_syncman_sm_enable;
+static int ett_ecat_reg_dc_cycunitctrl;
+static int ett_ecat_dc_activation;
+static int ett_ecat_dc_activationstat;
+static int ett_ecat_dc_sync0_status;
+static int ett_ecat_dc_sync1_status;
+static int ett_ecat_dc_latch0_ctrl;
+static int ett_ecat_dc_latch1_ctrl;
+static int ett_ecat_dc_latch0_status;
+static int ett_ecat_dc_latch1_status;
static int hf_ecat_sub;
-static int hf_ecat_sub_data[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_cmd[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_idx[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_cnt[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_ado[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_adp[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_lad[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-
-/* static int hf_ecat_header = -1; */
-static int hf_ecat_data = -1;
-static int hf_ecat_cnt = -1;
-static int hf_ecat_cmd = -1;
-static int hf_ecat_idx = -1;
-static int hf_ecat_adp = -1;
-static int hf_ecat_ado = -1;
-static int hf_ecat_lad = -1;
-/* static int hf_ecat_len = -1; */
-static int hf_ecat_int = -1;
-
-static int hf_ecat_sub_dc_diff_da[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_dc_diff_bd[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_dc_diff_cb[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_dc_diff_cd[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_dc_diff_ba[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-static int hf_ecat_sub_dc_diff_ca[10] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
-
-static int hf_ecat_dc_diff_da = -1;
-static int hf_ecat_dc_diff_bd = -1;
-static int hf_ecat_dc_diff_cb = -1;
-static int hf_ecat_dc_diff_cd = -1;
-static int hf_ecat_dc_diff_ba = -1;
-static int hf_ecat_dc_diff_ca = -1;
-
-static int hf_ecat_length_len = -1;
-static int hf_ecat_length_r = -1;
-static int hf_ecat_length_c = -1;
-static int hf_ecat_length_m = -1;
-
-static int hf_ecat_padding = -1;
-
-static int hf_ecat_reg_revision = -1;
-static int hf_ecat_reg_esc_type = -1;
-static int hf_ecat_reg_esc_build = -1;
-static int hf_ecat_reg_esc_fmmucnt = -1;
-static int hf_ecat_reg_esc_smcnt = -1;
-static int hf_ecat_reg_esc_ports = -1;
-static int hf_ecat_reg_esc_dpram = -1;
-static int hf_ecat_reg_esc_features = -1;
-static int hf_ecat_reg_esc_features_fmmurestrict = -1;
-static int hf_ecat_reg_esc_features_smaddrrestrict = -1;
-static int hf_ecat_reg_esc_features_dcsupport = -1;
-static int hf_ecat_reg_esc_features_dc64support = -1;
-static int hf_ecat_reg_esc_features_ebuslowjitter = -1;
-static int hf_ecat_reg_esc_features_ebusextlinkdetect = -1;
-static int hf_ecat_reg_esc_features_miiextlinkdetect = -1;
-static int hf_ecat_reg_esc_features_crcext = -1;
-static int hf_ecat_reg_physaddr = -1;
-static int hf_ecat_reg_physaddr2 = -1;
-static int hf_ecat_reg_dlctrl1 = -1;
-static int hf_ecat_reg_dlctrl1_killnonecat = -1;
-static int hf_ecat_reg_dlctrl1_port0extlinkdetect = -1;
-static int hf_ecat_reg_dlctrl1_port1extlinkdetect = -1;
-static int hf_ecat_reg_dlctrl1_port2extlinkdetect = -1;
-static int hf_ecat_reg_dlctrl1_port3extlinkdetect = -1;
-static int hf_ecat_reg_dlctrl2 = -1;
-static int hf_ecat_reg_dlctrl2_port0 = -1;
-static int hf_ecat_reg_dlctrl2_port1 = -1;
-static int hf_ecat_reg_dlctrl2_port2 = -1;
-static int hf_ecat_reg_dlctrl2_port3 = -1;
-static int hf_ecat_reg_dlctrl3 = -1;
-static int hf_ecat_reg_dlctrl3_fifosize = -1;
-static int hf_ecat_reg_dlctrl3_lowebusjit = -1;
-static int hf_ecat_reg_dlctrl4 = -1;
-static int hf_ecat_reg_dlctrl4_2ndaddress = -1;
-static int hf_ecat_reg_dlstatus1 = -1;
-static int hf_ecat_reg_dlstatus1_operation = -1;
-static int hf_ecat_reg_dlstatus1_pdiwatchdog = -1;
-static int hf_ecat_reg_dlstatus1_enhlinkdetect = -1;
-static int hf_ecat_reg_dlstatus1_physlink_port0 = -1;
-static int hf_ecat_reg_dlstatus1_physlink_port1 = -1;
-static int hf_ecat_reg_dlstatus1_physlink_port2 = -1;
-static int hf_ecat_reg_dlstatus1_physlink_port3 = -1;
-static int hf_ecat_reg_dlstatus2 = -1;
-static int hf_ecat_reg_dlstatus2_port0 = -1;
-static int hf_ecat_reg_dlstatus2_port1 = -1;
-static int hf_ecat_reg_dlstatus2_port2 = -1;
-static int hf_ecat_reg_dlstatus2_port3 = -1;
-static int hf_ecat_reg_regprotect = -1;
-static int hf_ecat_reg_accessprotect = -1;
-static int hf_ecat_reg_resetecat = -1;
-static int hf_ecat_reg_resetpdi = -1;
-static int hf_ecat_reg_regphysrwoffs = -1;
-static int hf_ecat_reg_alctrl = -1;
-static int hf_ecat_reg_alctrl_ctrl = -1;
-static int hf_ecat_reg_alctrl_errack = -1;
-static int hf_ecat_reg_alctrl_id = -1;
-static int hf_ecat_reg_alstatus = -1;
-static int hf_ecat_reg_alstatus_status = -1;
-static int hf_ecat_reg_alstatus_err = -1;
-static int hf_ecat_reg_alstatus_id = -1;
-static int hf_ecat_reg_pdictrl1 = -1;
-static int hf_ecat_reg_pdictrl1_pdi = -1;
-static int hf_ecat_reg_pdictrl2 = -1;
-static int hf_ecat_reg_pdictrl2_devemul = -1;
-static int hf_ecat_reg_pdictrl2_enhlnkdetect = -1;
-static int hf_ecat_reg_pdictrl2_dcsyncout = -1;
-static int hf_ecat_reg_pdictrl2_dcsyncin = -1;
-static int hf_ecat_reg_pdictrl2_enhlnkdetect0 = -1;
-static int hf_ecat_reg_pdictrl2_enhlnkdetect1 = -1;
-static int hf_ecat_reg_pdictrl2_enhlnkdetect2 = -1;
-static int hf_ecat_reg_pdictrl2_enhlnkdetect3 = -1;
-static int hf_ecat_reg_alstatuscode = -1;
-static int hf_ecat_reg_ecat_mask = -1;
-static int hf_ecat_reg_ecat_mask_latchevt = -1;
-static int hf_ecat_reg_ecat_mask_escstatevt = -1;
-static int hf_ecat_reg_ecat_mask_alstatevt = -1;
-static int hf_ecat_reg_ecat_mask_sm0irq = -1;
-static int hf_ecat_reg_ecat_mask_sm1irq = -1;
-static int hf_ecat_reg_ecat_mask_sm2irq = -1;
-static int hf_ecat_reg_ecat_mask_sm3irq = -1;
-static int hf_ecat_reg_ecat_mask_sm4irq = -1;
-static int hf_ecat_reg_ecat_mask_sm5irq = -1;
-static int hf_ecat_reg_ecat_mask_sm6irq = -1;
-static int hf_ecat_reg_ecat_mask_sm7irq = -1;
-static int hf_ecat_reg_pdiL = -1;
-static int hf_ecat_reg_pdiL_alctrl = -1;
-static int hf_ecat_reg_pdiL_latchin = -1;
-static int hf_ecat_reg_pdiL_sync0 = -1;
-static int hf_ecat_reg_pdiL_sync1 = -1;
-static int hf_ecat_reg_pdiL_smchg = -1;
-static int hf_ecat_reg_pdiL_eepromcmdpen = -1;
-static int hf_ecat_reg_pdiL_sm0 = -1;
-static int hf_ecat_reg_pdiL_sm1 = -1;
-static int hf_ecat_reg_pdiL_sm2 = -1;
-static int hf_ecat_reg_pdiL_sm3 = -1;
-static int hf_ecat_reg_pdiL_sm4 = -1;
-static int hf_ecat_reg_pdiL_sm5 = -1;
-static int hf_ecat_reg_pdiL_sm6 = -1;
-static int hf_ecat_reg_pdiL_sm7 = -1;
-static int hf_ecat_reg_pdiH = -1;
-static int hf_ecat_reg_ecat = -1;
-static int hf_ecat_reg_ecat_latchevt = -1;
-static int hf_ecat_reg_ecat_escstatevt = -1;
-static int hf_ecat_reg_ecat_alstatevt = -1;
-static int hf_ecat_reg_ecat_sm0irq = -1;
-static int hf_ecat_reg_ecat_sm1irq = -1;
-static int hf_ecat_reg_ecat_sm2irq = -1;
-static int hf_ecat_reg_ecat_sm3irq = -1;
-static int hf_ecat_reg_ecat_sm4irq = -1;
-static int hf_ecat_reg_ecat_sm5irq = -1;
-static int hf_ecat_reg_ecat_sm6irq = -1;
-static int hf_ecat_reg_ecat_sm7irq = -1;
-static int hf_ecat_reg_pdi1 = -1;
-static int hf_ecat_reg_pdi1_alctrl = -1;
-static int hf_ecat_reg_pdi1_latchin = -1;
-static int hf_ecat_reg_pdi1_sync0 = -1;
-static int hf_ecat_reg_pdi1_sync1 = -1;
-static int hf_ecat_reg_pdi1_smchg = -1;
-static int hf_ecat_reg_pdi1_eepromcmdpen = -1;
-static int hf_ecat_reg_pdi1_sm0 = -1;
-static int hf_ecat_reg_pdi1_sm1 = -1;
-static int hf_ecat_reg_pdi1_sm2 = -1;
-static int hf_ecat_reg_pdi1_sm3 = -1;
-static int hf_ecat_reg_pdi1_sm4 = -1;
-static int hf_ecat_reg_pdi1_sm5 = -1;
-static int hf_ecat_reg_pdi1_sm6 = -1;
-static int hf_ecat_reg_pdi1_sm7 = -1;
-static int hf_ecat_reg_pdi2 = -1;
-static int hf_ecat_reg_crc0 = -1;
-static int hf_ecat_reg_crc0_frame = -1;
-static int hf_ecat_reg_crc0_rx = -1;
-static int hf_ecat_reg_crc1 = -1;
-static int hf_ecat_reg_crc1_frame = -1;
-static int hf_ecat_reg_crc1_rx = -1;
-static int hf_ecat_reg_crc2 = -1;
-static int hf_ecat_reg_crc2_frame = -1;
-static int hf_ecat_reg_crc2_rx = -1;
-static int hf_ecat_reg_crc3 = -1;
-static int hf_ecat_reg_crc3_frame = -1;
-static int hf_ecat_reg_crc3_rx = -1;
-static int hf_ecat_reg_crc_fwd0 = -1;
-static int hf_ecat_reg_crc_fwd1 = -1;
-static int hf_ecat_reg_crc_fwd2 = -1;
-static int hf_ecat_reg_crc_fwd3 = -1;
-static int hf_ecat_reg_processuniterr = -1;
-static int hf_ecat_reg_pdierr = -1;
-static int hf_ecat_reg_linklost0 = -1;
-static int hf_ecat_reg_linklost1 = -1;
-static int hf_ecat_reg_linklost2 = -1;
-static int hf_ecat_reg_linklost3 = -1;
-static int hf_ecat_reg_wd_divisor = -1;
-static int hf_ecat_reg_wd_timepdi = -1;
-static int hf_ecat_reg_wd_timesm = -1;
-static int hf_ecat_reg_wd_status = -1;
-static int hf_ecat_reg_wd_status_pdwatchdog = -1;
-static int hf_ecat_reg_wd_cntsm = -1;
-static int hf_ecat_reg_wd_cntpdi = -1;
-static int hf_ecat_reg_eeprom_assign = -1;
-static int hf_ecat_reg_eeprom_assign_ctrl = -1;
-static int hf_ecat_reg_eeprom_assign_pdiaccess = -1;
-static int hf_ecat_reg_eeprom_assign_status = -1;
-static int hf_ecat_reg_ctrlstat = -1;
-static int hf_ecat_reg_ctrlstat_wraccess = -1;
-static int hf_ecat_reg_ctrlstat_eepromemul = -1;
-static int hf_ecat_reg_ctrlstat_8bacc = -1;
-static int hf_ecat_reg_ctrlstat_2bacc = -1;
-static int hf_ecat_reg_ctrlstat_rdacc = -1;
-static int hf_ecat_reg_ctrlstat_wracc = -1;
-static int hf_ecat_reg_ctrlstat_reloadacc = -1;
-static int hf_ecat_reg_ctrlstat_crcerr = -1;
-static int hf_ecat_reg_ctrlstat_lderr = -1;
-static int hf_ecat_reg_ctrlstat_cmderr = -1;
-static int hf_ecat_reg_ctrlstat_wrerr = -1;
-static int hf_ecat_reg_ctrlstat_busy = -1;
-static int hf_ecat_reg_addrl = -1;
-static int hf_ecat_reg_addrh = -1;
-static int hf_ecat_reg_data0 = -1;
-static int hf_ecat_reg_data1 = -1;
-static int hf_ecat_reg_data2 = -1;
-static int hf_ecat_reg_data3 = -1;
-static int hf_ecat_reg_mio_ctrlstat = -1;
-static int hf_ecat_reg_mio_ctrlstat_wracc1 = -1;
-static int hf_ecat_reg_mio_ctrlstat_offsphy = -1;
-static int hf_ecat_reg_mio_ctrlstat_rdacc = -1;
-static int hf_ecat_reg_mio_ctrlstat_wracc2 = -1;
-static int hf_ecat_reg_mio_ctrlstat_wrerr = -1;
-static int hf_ecat_reg_mio_ctrlstat_busy = -1;
-static int hf_ecat_reg_mio_addr = -1;
-static int hf_ecat_reg_mio_addr_phyaddr = -1;
-static int hf_ecat_reg_mio_addr_mioaddr = -1;
-static int hf_ecat_reg_mio_data = -1;
-static int hf_ecat_reg_mio_access = -1;
-static int hf_ecat_reg_mio_access_ecatacc = -1;
-static int hf_ecat_reg_mio_access_pdiacc = -1;
-static int hf_ecat_reg_mio_access_forcereset = -1;
-static int hf_ecat_reg_mio_status0 = -1;
-static int hf_ecat_reg_mio_status0_physlink = -1;
-static int hf_ecat_reg_mio_status0_link = -1;
-static int hf_ecat_reg_mio_status0_linkstatuserr = -1;
-static int hf_ecat_reg_mio_status0_readerr = -1;
-static int hf_ecat_reg_mio_status0_linkpartnererr = -1;
-static int hf_ecat_reg_mio_status0_phycfgupdated = -1;
-static int hf_ecat_reg_mio_status1 = -1;
-static int hf_ecat_reg_mio_status1_physlink = -1;
-static int hf_ecat_reg_mio_status1_link = -1;
-static int hf_ecat_reg_mio_status1_linkstatuserr = -1;
-static int hf_ecat_reg_mio_status1_readerr = -1;
-static int hf_ecat_reg_mio_status1_linkpartnererr = -1;
-static int hf_ecat_reg_mio_status1_phycfgupdated = -1;
-static int hf_ecat_reg_mio_status2 = -1;
-static int hf_ecat_reg_mio_status2_physlink = -1;
-static int hf_ecat_reg_mio_status2_link = -1;
-static int hf_ecat_reg_mio_status2_linkstatuserr = -1;
-static int hf_ecat_reg_mio_status2_readerr = -1;
-static int hf_ecat_reg_mio_status2_linkpartnererr = -1;
-static int hf_ecat_reg_mio_status2_phycfgupdated = -1;
-static int hf_ecat_reg_mio_status3 = -1;
-static int hf_ecat_reg_mio_status3_physlink = -1;
-static int hf_ecat_reg_mio_status3_link = -1;
-static int hf_ecat_reg_mio_status3_linkstatuserr = -1;
-static int hf_ecat_reg_mio_status3_readerr = -1;
-static int hf_ecat_reg_mio_status3_linkpartnererr = -1;
-static int hf_ecat_reg_mio_status3_phycfgupdated = -1;
-static int hf_ecat_reg_fmmu = -1;
-static int hf_ecat_reg_fmmu_lstart = -1;
-static int hf_ecat_reg_fmmu_llen = -1;
-static int hf_ecat_reg_fmmu_lstartbit = -1;
-static int hf_ecat_reg_fmmu_lendbit = -1;
-static int hf_ecat_reg_fmmu_pstart = -1;
-static int hf_ecat_reg_fmmu_pstartbit = -1;
-static int hf_ecat_reg_fmmu_type = -1;
-static int hf_ecat_reg_fmmu_typeread = -1;
-static int hf_ecat_reg_fmmu_typewrite = -1;
-static int hf_ecat_reg_fmmu_activate = -1;
-static int hf_ecat_reg_fmmu_activate0 = -1;
-static int hf_ecat_reg_syncman_ctrlstatus = -1;
-static int hf_ecat_reg_syncman_pmode = -1;
-static int hf_ecat_reg_syncman_access = -1;
-static int hf_ecat_reg_syncman_irq_ecat = -1;
-static int hf_ecat_reg_syncman_irq_pdi = -1;
-static int hf_ecat_reg_syncman_wdt = -1;
-static int hf_ecat_reg_syncman_irq_write = -1;
-static int hf_ecat_reg_syncman_irq_read = -1;
-static int hf_ecat_reg_syncman_1bufstate = -1;
-static int hf_ecat_reg_syncman_3bufstate = -1;
-static int hf_ecat_reg_syncman_sm_enable = -1;
-static int hf_ecat_reg_syncman_enable = -1;
-static int hf_ecat_reg_syncman_repeatreq = -1;
-static int hf_ecat_reg_syncman_latchsmchg_ecat = -1;
-static int hf_ecat_reg_syncman_latchsmchg_pdi = -1;
-static int hf_ecat_reg_syncman_deactivate = -1;
-static int hf_ecat_reg_syncman_repeatack = -1;
-static int hf_ecat_reg_syncman = -1;
-static int hf_ecat_reg_syncman_start = -1;
-static int hf_ecat_reg_syncman_len = -1;
-static int hf_ecat_reg_dc_recv0 = -1;
-static int hf_ecat_reg_dc_recv1 = -1;
-static int hf_ecat_reg_dc_recv2 = -1;
-static int hf_ecat_reg_dc_recv3 = -1;
-static int hf_ecat_reg_dc_systime = -1;
-static int hf_ecat_reg_dc_systimeL = -1;
-static int hf_ecat_reg_dc_systimeH = -1;
-static int hf_ecat_reg_dc_recvtime64 = -1;
-static int hf_ecat_reg_dc_systimeoffs = -1;
-static int hf_ecat_reg_dc_systimeoffsl = -1;
-static int hf_ecat_reg_dc_systimeoffsh = -1;
-static int hf_ecat_reg_dc_systimedelay = -1;
-static int hf_ecat_reg_dc_ctrlerr = -1;
-static int hf_ecat_reg_dc_speedstart = -1;
-static int hf_ecat_reg_dc_speeddiff = -1;
-static int hf_ecat_reg_dc_fltdepth_systimediff = -1;
-static int hf_ecat_reg_dc_fltdepth_speedcnt = -1;
-static int hf_ecat_reg_dc_cycunitctrl = -1;
-static int hf_ecat_reg_dc_cycunitctrl_access_cyclic = -1;
-static int hf_ecat_reg_dc_cycunitctrl_access_latch0 = -1;
-static int hf_ecat_reg_dc_cycunitctrl_access_latch1 = -1;
-static int hf_ecat_reg_dc_activation = -1;
-static int hf_ecat_reg_dc_activation_enablecyclic = -1;
-static int hf_ecat_reg_dc_activation_gen_sync0 = -1;
-static int hf_ecat_reg_dc_activation_gen_sync1 = -1;
-static int hf_ecat_reg_dc_activation_autoactivation = -1;
-static int hf_ecat_reg_dc_activation_stimeext = -1;
-static int hf_ecat_reg_dc_activation_stimecheck = -1;
-static int hf_ecat_reg_dc_activation_hlfrange = -1;
-static int hf_ecat_reg_dc_activation_dblrange = -1;
-static int hf_ecat_reg_dc_cycimpuls = -1;
-static int hf_ecat_reg_dc_activationstat = -1;
-static int hf_ecat_reg_dc_activationstat_sync0pend = -1;
-static int hf_ecat_reg_dc_activationstat_sync1pend = -1;
-static int hf_ecat_reg_dc_activationstat_stimeoutofrange = -1;
-static int hf_ecat_reg_dc_sync0_status = -1;
-static int hf_ecat_reg_dc_sync0_status_triggered = -1;
-static int hf_ecat_reg_dc_sync1_status = -1;
-static int hf_ecat_reg_dc_sync1_status_triggered = -1;
-static int hf_ecat_reg_dc_starttime0 = -1;
-static int hf_ecat_reg_dc_starttime1 = -1;
-static int hf_ecat_reg_dc_cyctime0 = -1;
-static int hf_ecat_reg_dc_cyctime1 = -1;
-static int hf_ecat_reg_dc_latch0_ctrl_pos = -1;
-static int hf_ecat_reg_dc_latch0_ctrl_neg = -1;
-static int hf_ecat_reg_dc_latch1_ctrl_pos = -1;
-static int hf_ecat_reg_dc_latch1_ctrl_neg = -1;
-static int hf_ecat_reg_dc_latch0_status_eventpos = -1;
-static int hf_ecat_reg_dc_latch0_status_eventneg = -1;
-static int hf_ecat_reg_dc_latch0_status_pinstate = -1;
-static int hf_ecat_reg_dc_latch1_status_eventpos = -1;
-static int hf_ecat_reg_dc_latch1_status_eventneg = -1;
-static int hf_ecat_reg_dc_latch1_status_pinstate = -1;
-static int hf_ecat_reg_dc_latch0_ctrl = -1;
-static int hf_ecat_reg_dc_latch1_ctrl = -1;
-static int hf_ecat_reg_dc_latch0_status = -1;
-static int hf_ecat_reg_dc_latch1_status = -1;
-static int hf_ecat_reg_dc_latch0_pos = -1;
-static int hf_ecat_reg_dc_latch0_neg = -1;
-static int hf_ecat_reg_dc_latch1_pos = -1;
-static int hf_ecat_reg_dc_latch1_neg = -1;
-static int hf_ecat_reg_dc_rcvsyncmanchg = -1;
-static int hf_ecat_reg_dc_pdismstart = -1;
-static int hf_ecat_reg_dc_pdismchg = -1;
+static int hf_ecat_sub_data[10];
+static int hf_ecat_sub_cmd[10];
+static int hf_ecat_sub_idx[10];
+static int hf_ecat_sub_cnt[10];
+static int hf_ecat_sub_ado[10];
+static int hf_ecat_sub_adp[10];
+static int hf_ecat_sub_lad[10];
+
+/* static int hf_ecat_header; */
+static int hf_ecat_data;
+static int hf_ecat_cnt;
+static int hf_ecat_cmd;
+static int hf_ecat_idx;
+static int hf_ecat_adp;
+static int hf_ecat_ado;
+static int hf_ecat_lad;
+/* static int hf_ecat_len; */
+static int hf_ecat_int;
+
+static int hf_ecat_sub_dc_diff_da[10];
+static int hf_ecat_sub_dc_diff_bd[10];
+static int hf_ecat_sub_dc_diff_cb[10];
+static int hf_ecat_sub_dc_diff_cd[10];
+static int hf_ecat_sub_dc_diff_ba[10];
+static int hf_ecat_sub_dc_diff_ca[10];
+
+static int hf_ecat_dc_diff_da;
+static int hf_ecat_dc_diff_bd;
+static int hf_ecat_dc_diff_cb;
+static int hf_ecat_dc_diff_cd;
+static int hf_ecat_dc_diff_ba;
+static int hf_ecat_dc_diff_ca;
+
+static int hf_ecat_length_len;
+static int hf_ecat_length_r;
+static int hf_ecat_length_c;
+static int hf_ecat_length_m;
+
+static int hf_ecat_padding;
+
+static int hf_ecat_reg_revision;
+static int hf_ecat_reg_esc_type;
+static int hf_ecat_reg_esc_build;
+static int hf_ecat_reg_esc_fmmucnt;
+static int hf_ecat_reg_esc_smcnt;
+static int hf_ecat_reg_esc_ports;
+static int hf_ecat_reg_esc_dpram;
+static int hf_ecat_reg_esc_features;
+static int hf_ecat_reg_esc_features_fmmurestrict;
+static int hf_ecat_reg_esc_features_smaddrrestrict;
+static int hf_ecat_reg_esc_features_dcsupport;
+static int hf_ecat_reg_esc_features_dc64support;
+static int hf_ecat_reg_esc_features_ebuslowjitter;
+static int hf_ecat_reg_esc_features_ebusextlinkdetect;
+static int hf_ecat_reg_esc_features_miiextlinkdetect;
+static int hf_ecat_reg_esc_features_crcext;
+static int hf_ecat_reg_physaddr;
+static int hf_ecat_reg_physaddr2;
+static int hf_ecat_reg_dlctrl1;
+static int hf_ecat_reg_dlctrl1_killnonecat;
+static int hf_ecat_reg_dlctrl1_port0extlinkdetect;
+static int hf_ecat_reg_dlctrl1_port1extlinkdetect;
+static int hf_ecat_reg_dlctrl1_port2extlinkdetect;
+static int hf_ecat_reg_dlctrl1_port3extlinkdetect;
+static int hf_ecat_reg_dlctrl2;
+static int hf_ecat_reg_dlctrl2_port0;
+static int hf_ecat_reg_dlctrl2_port1;
+static int hf_ecat_reg_dlctrl2_port2;
+static int hf_ecat_reg_dlctrl2_port3;
+static int hf_ecat_reg_dlctrl3;
+static int hf_ecat_reg_dlctrl3_fifosize;
+static int hf_ecat_reg_dlctrl3_lowebusjit;
+static int hf_ecat_reg_dlctrl4;
+static int hf_ecat_reg_dlctrl4_2ndaddress;
+static int hf_ecat_reg_dlstatus1;
+static int hf_ecat_reg_dlstatus1_operation;
+static int hf_ecat_reg_dlstatus1_pdiwatchdog;
+static int hf_ecat_reg_dlstatus1_enhlinkdetect;
+static int hf_ecat_reg_dlstatus1_physlink_port0;
+static int hf_ecat_reg_dlstatus1_physlink_port1;
+static int hf_ecat_reg_dlstatus1_physlink_port2;
+static int hf_ecat_reg_dlstatus1_physlink_port3;
+static int hf_ecat_reg_dlstatus2;
+static int hf_ecat_reg_dlstatus2_port0;
+static int hf_ecat_reg_dlstatus2_port1;
+static int hf_ecat_reg_dlstatus2_port2;
+static int hf_ecat_reg_dlstatus2_port3;
+static int hf_ecat_reg_regprotect;
+static int hf_ecat_reg_accessprotect;
+static int hf_ecat_reg_resetecat;
+static int hf_ecat_reg_resetpdi;
+static int hf_ecat_reg_regphysrwoffs;
+static int hf_ecat_reg_alctrl;
+static int hf_ecat_reg_alctrl_ctrl;
+static int hf_ecat_reg_alctrl_errack;
+static int hf_ecat_reg_alctrl_id;
+static int hf_ecat_reg_alstatus;
+static int hf_ecat_reg_alstatus_status;
+static int hf_ecat_reg_alstatus_err;
+static int hf_ecat_reg_alstatus_id;
+static int hf_ecat_reg_pdictrl1;
+static int hf_ecat_reg_pdictrl1_pdi;
+static int hf_ecat_reg_pdictrl2;
+static int hf_ecat_reg_pdictrl2_devemul;
+static int hf_ecat_reg_pdictrl2_enhlnkdetect;
+static int hf_ecat_reg_pdictrl2_dcsyncout;
+static int hf_ecat_reg_pdictrl2_dcsyncin;
+static int hf_ecat_reg_pdictrl2_enhlnkdetect0;
+static int hf_ecat_reg_pdictrl2_enhlnkdetect1;
+static int hf_ecat_reg_pdictrl2_enhlnkdetect2;
+static int hf_ecat_reg_pdictrl2_enhlnkdetect3;
+static int hf_ecat_reg_alstatuscode;
+static int hf_ecat_reg_ecat_mask;
+static int hf_ecat_reg_ecat_mask_latchevt;
+static int hf_ecat_reg_ecat_mask_escstatevt;
+static int hf_ecat_reg_ecat_mask_alstatevt;
+static int hf_ecat_reg_ecat_mask_sm0irq;
+static int hf_ecat_reg_ecat_mask_sm1irq;
+static int hf_ecat_reg_ecat_mask_sm2irq;
+static int hf_ecat_reg_ecat_mask_sm3irq;
+static int hf_ecat_reg_ecat_mask_sm4irq;
+static int hf_ecat_reg_ecat_mask_sm5irq;
+static int hf_ecat_reg_ecat_mask_sm6irq;
+static int hf_ecat_reg_ecat_mask_sm7irq;
+static int hf_ecat_reg_pdiL;
+static int hf_ecat_reg_pdiL_alctrl;
+static int hf_ecat_reg_pdiL_latchin;
+static int hf_ecat_reg_pdiL_sync0;
+static int hf_ecat_reg_pdiL_sync1;
+static int hf_ecat_reg_pdiL_smchg;
+static int hf_ecat_reg_pdiL_eepromcmdpen;
+static int hf_ecat_reg_pdiL_sm0;
+static int hf_ecat_reg_pdiL_sm1;
+static int hf_ecat_reg_pdiL_sm2;
+static int hf_ecat_reg_pdiL_sm3;
+static int hf_ecat_reg_pdiL_sm4;
+static int hf_ecat_reg_pdiL_sm5;
+static int hf_ecat_reg_pdiL_sm6;
+static int hf_ecat_reg_pdiL_sm7;
+static int hf_ecat_reg_pdiH;
+static int hf_ecat_reg_ecat;
+static int hf_ecat_reg_ecat_latchevt;
+static int hf_ecat_reg_ecat_escstatevt;
+static int hf_ecat_reg_ecat_alstatevt;
+static int hf_ecat_reg_ecat_sm0irq;
+static int hf_ecat_reg_ecat_sm1irq;
+static int hf_ecat_reg_ecat_sm2irq;
+static int hf_ecat_reg_ecat_sm3irq;
+static int hf_ecat_reg_ecat_sm4irq;
+static int hf_ecat_reg_ecat_sm5irq;
+static int hf_ecat_reg_ecat_sm6irq;
+static int hf_ecat_reg_ecat_sm7irq;
+static int hf_ecat_reg_pdi1;
+static int hf_ecat_reg_pdi1_alctrl;
+static int hf_ecat_reg_pdi1_latchin;
+static int hf_ecat_reg_pdi1_sync0;
+static int hf_ecat_reg_pdi1_sync1;
+static int hf_ecat_reg_pdi1_smchg;
+static int hf_ecat_reg_pdi1_eepromcmdpen;
+static int hf_ecat_reg_pdi1_sm0;
+static int hf_ecat_reg_pdi1_sm1;
+static int hf_ecat_reg_pdi1_sm2;
+static int hf_ecat_reg_pdi1_sm3;
+static int hf_ecat_reg_pdi1_sm4;
+static int hf_ecat_reg_pdi1_sm5;
+static int hf_ecat_reg_pdi1_sm6;
+static int hf_ecat_reg_pdi1_sm7;
+static int hf_ecat_reg_pdi2;
+static int hf_ecat_reg_crc0;
+static int hf_ecat_reg_crc0_frame;
+static int hf_ecat_reg_crc0_rx;
+static int hf_ecat_reg_crc1;
+static int hf_ecat_reg_crc1_frame;
+static int hf_ecat_reg_crc1_rx;
+static int hf_ecat_reg_crc2;
+static int hf_ecat_reg_crc2_frame;
+static int hf_ecat_reg_crc2_rx;
+static int hf_ecat_reg_crc3;
+static int hf_ecat_reg_crc3_frame;
+static int hf_ecat_reg_crc3_rx;
+static int hf_ecat_reg_crc_fwd0;
+static int hf_ecat_reg_crc_fwd1;
+static int hf_ecat_reg_crc_fwd2;
+static int hf_ecat_reg_crc_fwd3;
+static int hf_ecat_reg_processuniterr;
+static int hf_ecat_reg_pdierr;
+static int hf_ecat_reg_linklost0;
+static int hf_ecat_reg_linklost1;
+static int hf_ecat_reg_linklost2;
+static int hf_ecat_reg_linklost3;
+static int hf_ecat_reg_wd_divisor;
+static int hf_ecat_reg_wd_timepdi;
+static int hf_ecat_reg_wd_timesm;
+static int hf_ecat_reg_wd_status;
+static int hf_ecat_reg_wd_status_pdwatchdog;
+static int hf_ecat_reg_wd_cntsm;
+static int hf_ecat_reg_wd_cntpdi;
+static int hf_ecat_reg_eeprom_assign;
+static int hf_ecat_reg_eeprom_assign_ctrl;
+static int hf_ecat_reg_eeprom_assign_pdiaccess;
+static int hf_ecat_reg_eeprom_assign_status;
+static int hf_ecat_reg_ctrlstat;
+static int hf_ecat_reg_ctrlstat_wraccess;
+static int hf_ecat_reg_ctrlstat_eepromemul;
+static int hf_ecat_reg_ctrlstat_8bacc;
+static int hf_ecat_reg_ctrlstat_2bacc;
+static int hf_ecat_reg_ctrlstat_rdacc;
+static int hf_ecat_reg_ctrlstat_wracc;
+static int hf_ecat_reg_ctrlstat_reloadacc;
+static int hf_ecat_reg_ctrlstat_crcerr;
+static int hf_ecat_reg_ctrlstat_lderr;
+static int hf_ecat_reg_ctrlstat_cmderr;
+static int hf_ecat_reg_ctrlstat_wrerr;
+static int hf_ecat_reg_ctrlstat_busy;
+static int hf_ecat_reg_addrl;
+static int hf_ecat_reg_addrh;
+static int hf_ecat_reg_data0;
+static int hf_ecat_reg_data1;
+static int hf_ecat_reg_data2;
+static int hf_ecat_reg_data3;
+static int hf_ecat_reg_mio_ctrlstat;
+static int hf_ecat_reg_mio_ctrlstat_wracc1;
+static int hf_ecat_reg_mio_ctrlstat_offsphy;
+static int hf_ecat_reg_mio_ctrlstat_rdacc;
+static int hf_ecat_reg_mio_ctrlstat_wracc2;
+static int hf_ecat_reg_mio_ctrlstat_wrerr;
+static int hf_ecat_reg_mio_ctrlstat_busy;
+static int hf_ecat_reg_mio_addr;
+static int hf_ecat_reg_mio_addr_phyaddr;
+static int hf_ecat_reg_mio_addr_mioaddr;
+static int hf_ecat_reg_mio_data;
+static int hf_ecat_reg_mio_access;
+static int hf_ecat_reg_mio_access_ecatacc;
+static int hf_ecat_reg_mio_access_pdiacc;
+static int hf_ecat_reg_mio_access_forcereset;
+static int hf_ecat_reg_mio_status0;
+static int hf_ecat_reg_mio_status0_physlink;
+static int hf_ecat_reg_mio_status0_link;
+static int hf_ecat_reg_mio_status0_linkstatuserr;
+static int hf_ecat_reg_mio_status0_readerr;
+static int hf_ecat_reg_mio_status0_linkpartnererr;
+static int hf_ecat_reg_mio_status0_phycfgupdated;
+static int hf_ecat_reg_mio_status1;
+static int hf_ecat_reg_mio_status1_physlink;
+static int hf_ecat_reg_mio_status1_link;
+static int hf_ecat_reg_mio_status1_linkstatuserr;
+static int hf_ecat_reg_mio_status1_readerr;
+static int hf_ecat_reg_mio_status1_linkpartnererr;
+static int hf_ecat_reg_mio_status1_phycfgupdated;
+static int hf_ecat_reg_mio_status2;
+static int hf_ecat_reg_mio_status2_physlink;
+static int hf_ecat_reg_mio_status2_link;
+static int hf_ecat_reg_mio_status2_linkstatuserr;
+static int hf_ecat_reg_mio_status2_readerr;
+static int hf_ecat_reg_mio_status2_linkpartnererr;
+static int hf_ecat_reg_mio_status2_phycfgupdated;
+static int hf_ecat_reg_mio_status3;
+static int hf_ecat_reg_mio_status3_physlink;
+static int hf_ecat_reg_mio_status3_link;
+static int hf_ecat_reg_mio_status3_linkstatuserr;
+static int hf_ecat_reg_mio_status3_readerr;
+static int hf_ecat_reg_mio_status3_linkpartnererr;
+static int hf_ecat_reg_mio_status3_phycfgupdated;
+static int hf_ecat_reg_fmmu;
+static int hf_ecat_reg_fmmu_lstart;
+static int hf_ecat_reg_fmmu_llen;
+static int hf_ecat_reg_fmmu_lstartbit;
+static int hf_ecat_reg_fmmu_lendbit;
+static int hf_ecat_reg_fmmu_pstart;
+static int hf_ecat_reg_fmmu_pstartbit;
+static int hf_ecat_reg_fmmu_type;
+static int hf_ecat_reg_fmmu_typeread;
+static int hf_ecat_reg_fmmu_typewrite;
+static int hf_ecat_reg_fmmu_activate;
+static int hf_ecat_reg_fmmu_activate0;
+static int hf_ecat_reg_syncman_ctrlstatus;
+static int hf_ecat_reg_syncman_pmode;
+static int hf_ecat_reg_syncman_access;
+static int hf_ecat_reg_syncman_irq_ecat;
+static int hf_ecat_reg_syncman_irq_pdi;
+static int hf_ecat_reg_syncman_wdt;
+static int hf_ecat_reg_syncman_irq_write;
+static int hf_ecat_reg_syncman_irq_read;
+static int hf_ecat_reg_syncman_1bufstate;
+static int hf_ecat_reg_syncman_3bufstate;
+static int hf_ecat_reg_syncman_sm_enable;
+static int hf_ecat_reg_syncman_enable;
+static int hf_ecat_reg_syncman_repeatreq;
+static int hf_ecat_reg_syncman_latchsmchg_ecat;
+static int hf_ecat_reg_syncman_latchsmchg_pdi;
+static int hf_ecat_reg_syncman_deactivate;
+static int hf_ecat_reg_syncman_repeatack;
+static int hf_ecat_reg_syncman;
+static int hf_ecat_reg_syncman_start;
+static int hf_ecat_reg_syncman_len;
+static int hf_ecat_reg_dc_recv0;
+static int hf_ecat_reg_dc_recv1;
+static int hf_ecat_reg_dc_recv2;
+static int hf_ecat_reg_dc_recv3;
+static int hf_ecat_reg_dc_systime;
+static int hf_ecat_reg_dc_systimeL;
+static int hf_ecat_reg_dc_systimeH;
+static int hf_ecat_reg_dc_recvtime64;
+static int hf_ecat_reg_dc_systimeoffs;
+static int hf_ecat_reg_dc_systimeoffsl;
+static int hf_ecat_reg_dc_systimeoffsh;
+static int hf_ecat_reg_dc_systimedelay;
+static int hf_ecat_reg_dc_ctrlerr;
+static int hf_ecat_reg_dc_speedstart;
+static int hf_ecat_reg_dc_speeddiff;
+static int hf_ecat_reg_dc_fltdepth_systimediff;
+static int hf_ecat_reg_dc_fltdepth_speedcnt;
+static int hf_ecat_reg_dc_cycunitctrl;
+static int hf_ecat_reg_dc_cycunitctrl_access_cyclic;
+static int hf_ecat_reg_dc_cycunitctrl_access_latch0;
+static int hf_ecat_reg_dc_cycunitctrl_access_latch1;
+static int hf_ecat_reg_dc_activation;
+static int hf_ecat_reg_dc_activation_enablecyclic;
+static int hf_ecat_reg_dc_activation_gen_sync0;
+static int hf_ecat_reg_dc_activation_gen_sync1;
+static int hf_ecat_reg_dc_activation_autoactivation;
+static int hf_ecat_reg_dc_activation_stimeext;
+static int hf_ecat_reg_dc_activation_stimecheck;
+static int hf_ecat_reg_dc_activation_hlfrange;
+static int hf_ecat_reg_dc_activation_dblrange;
+static int hf_ecat_reg_dc_cycimpuls;
+static int hf_ecat_reg_dc_activationstat;
+static int hf_ecat_reg_dc_activationstat_sync0pend;
+static int hf_ecat_reg_dc_activationstat_sync1pend;
+static int hf_ecat_reg_dc_activationstat_stimeoutofrange;
+static int hf_ecat_reg_dc_sync0_status;
+static int hf_ecat_reg_dc_sync0_status_triggered;
+static int hf_ecat_reg_dc_sync1_status;
+static int hf_ecat_reg_dc_sync1_status_triggered;
+static int hf_ecat_reg_dc_starttime0;
+static int hf_ecat_reg_dc_starttime1;
+static int hf_ecat_reg_dc_cyctime0;
+static int hf_ecat_reg_dc_cyctime1;
+static int hf_ecat_reg_dc_latch0_ctrl_pos;
+static int hf_ecat_reg_dc_latch0_ctrl_neg;
+static int hf_ecat_reg_dc_latch1_ctrl_pos;
+static int hf_ecat_reg_dc_latch1_ctrl_neg;
+static int hf_ecat_reg_dc_latch0_status_eventpos;
+static int hf_ecat_reg_dc_latch0_status_eventneg;
+static int hf_ecat_reg_dc_latch0_status_pinstate;
+static int hf_ecat_reg_dc_latch1_status_eventpos;
+static int hf_ecat_reg_dc_latch1_status_eventneg;
+static int hf_ecat_reg_dc_latch1_status_pinstate;
+static int hf_ecat_reg_dc_latch0_ctrl;
+static int hf_ecat_reg_dc_latch1_ctrl;
+static int hf_ecat_reg_dc_latch0_status;
+static int hf_ecat_reg_dc_latch1_status;
+static int hf_ecat_reg_dc_latch0_pos;
+static int hf_ecat_reg_dc_latch0_neg;
+static int hf_ecat_reg_dc_latch1_pos;
+static int hf_ecat_reg_dc_latch1_neg;
+static int hf_ecat_reg_dc_rcvsyncmanchg;
+static int hf_ecat_reg_dc_pdismstart;
+static int hf_ecat_reg_dc_pdismchg;
static const value_string EcCmdShort[] =
@@ -1072,12 +1072,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 +1198,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 +1231,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 +1260,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 +1280,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 +1331,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 +1356,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 +1368,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 +1414,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 +1473,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 +1568,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 +1631,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 +1649,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;
@@ -3511,7 +3511,7 @@ void proto_register_ecat(void)
FT_BOOLEAN, 8, TFS(&tfs_local_true_false), 0x10, NULL, HFILL }
},
{ &hf_ecat_reg_dc_activation_stimecheck,
- {"Start time chheck", "ecat.reg.dc.activation.stimecheck",
+ {"Start time check", "ecat.reg.dc.activation.stimecheck",
FT_BOOLEAN, 8, TFS(&tfs_local_true_false), 0x20, NULL, HFILL }
},
{ &hf_ecat_reg_dc_activation_hlfrange,
@@ -3660,7 +3660,7 @@ void proto_register_ecat(void)
},
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_ecat,
&ett_ecat_header,
@@ -3718,7 +3718,7 @@ void proto_register_ecat(void)
ecat_handle = register_dissector("ecat", dissect_ecat_datagram, proto_ecat_datagram);
/* Sub dissector code */
- heur_subdissector_list = register_heur_dissector_list("ecat.data", proto_ecat_datagram);
+ heur_subdissector_list = register_heur_dissector_list_with_description("ecat.data", "EtherCAT payload", proto_ecat_datagram);
}
/* The registration hand-off routing */
diff --git a/plugins/epan/ethercat/packet-ethercat-datagram.h b/plugins/epan/ethercat/packet-ethercat-datagram.h
index b1565cfe..cd0b545a 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 3de05942..687ca8bd 100644
--- a/plugins/epan/ethercat/packet-ethercat-frame.c
+++ b/plugins/epan/ethercat/packet-ethercat-frame.c
@@ -23,17 +23,17 @@ void proto_register_ethercat_frame(void);
void proto_reg_handoff_ethercat_frame(void);
/* Define the Ethercat frame proto */
-static int proto_ethercat_frame = -1;
+static int proto_ethercat_frame;
static dissector_table_t ethercat_frame_dissector_table;
static dissector_handle_t ethercat_frame_handle;
/* Define the tree for the EtherCAT frame */
-static int ett_ethercat_frame = -1;
-static int hf_ethercat_frame_length = -1;
-static int hf_ethercat_frame_reserved = -1;
-static int hf_ethercat_frame_type = -1;
+static int ett_ethercat_frame;
+static int hf_ethercat_frame_length;
+static int hf_ethercat_frame_reserved;
+static int hf_ethercat_frame_type;
static const value_string EthercatFrameTypes[] =
{
@@ -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 2bb8c19b..d47587e4 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 846ae01c..a6554cfd 100644
--- a/plugins/epan/ethercat/packet-ioraw.c
+++ b/plugins/epan/ethercat/packet-ioraw.c
@@ -22,15 +22,15 @@ void proto_register_ioraw(void);
void proto_reg_handoff_ioraw(void);
/* Define the ioraw proto */
-int proto_ioraw = -1;
+int proto_ioraw;
-static int ett_ioraw = -1;
+static int ett_ioraw;
static dissector_handle_t ioraw_handle;
-/* static int hf_ioraw_summary = -1; */
-static int hf_ioraw_header = -1;
-static int hf_ioraw_data = -1;
+/* static int hf_ioraw_summary; */
+static int hf_ioraw_header;
+static int hf_ioraw_data;
/*ioraw*/
static void IoRawSummaryFormater( char *szText, int nMax)
@@ -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 48f942ef..f1e11c5b 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 b9f5c0ce..3113ffb9 100644
--- a/plugins/epan/ethercat/packet-nv.c
+++ b/plugins/epan/ethercat/packet-nv.c
@@ -22,57 +22,57 @@ void proto_register_nv(void);
void proto_reg_handoff_nv(void);
/* Define the nv proto */
-int proto_nv = -1;
+int proto_nv;
static dissector_handle_t nv_handle;
-static int ett_nv = -1;
-static int ett_nv_header = -1;
-static int ett_nv_var = -1;
-static int ett_nv_varheader = -1;
-
-/* static int hf_nv_summary = -1; */
-static int hf_nv_header = -1;
-static int hf_nv_publisher = -1;
-static int hf_nv_count = -1;
-static int hf_nv_cycleindex = -1;
-static int hf_nv_variable = -1;
-static int hf_nv_varheader = -1;
-static int hf_nv_id = -1;
-static int hf_nv_hash = -1;
-static int hf_nv_length = -1;
-static int hf_nv_quality = -1;
-static int hf_nv_data = -1;
+static int ett_nv;
+static int ett_nv_header;
+static int ett_nv_var;
+static int ett_nv_varheader;
+
+/* static int hf_nv_summary; */
+static int hf_nv_header;
+static int hf_nv_publisher;
+static int hf_nv_count;
+static int hf_nv_cycleindex;
+static int hf_nv_variable;
+static int hf_nv_varheader;
+static int hf_nv_id;
+static int hf_nv_hash;
+static int hf_nv_length;
+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 14eaee03..0ca7ea8e 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 384d81d2..dea7f9cc 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
)
@@ -50,6 +49,12 @@ target_include_directories(falco-bridge SYSTEM PRIVATE
${SINSP_INCLUDE_DIRS}
)
+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 d88276c7..88406d08 100644
--- a/plugins/epan/falco_bridge/README.md
+++ b/plugins/epan/falco_bridge/README.md
@@ -20,7 +20,7 @@ cmake \
## Quick Start
-1. Create a directory named "falco" at the same level as the "epan" plugin folder.
+1. Create a directory named "falco" one level above the "epan" plugin folder.
You can find the global and per-user plugin folder locations on your system in About → Folders or in the [User's Guide](https://www.wireshark.org/docs/wsug_html_chunked/ChPluginFolders.html).
1. Build your desired [Falco plugin](https://github.com/falcosecurity/plugins/) and place it in the "falco" plugin directory.
@@ -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 81dbc6c1..2475c44b 100644
--- a/plugins/epan/falco_bridge/packet-falco-bridge.c
+++ b/plugins/epan/falco_bridge/packet-falco-bridge.c
@@ -17,8 +17,14 @@
// - Add a configuration preference for configure_plugin?
// - 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>
@@ -29,22 +35,35 @@
#include <dlfcn.h>
#endif
+#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/tap.h>
+#include <epan/stats_tree.h>
#include <epan/stat_tap_ui.h>
+#include <epan/tap.h>
+
+#include <epan/dissectors/packet-sysdig-event.h>
#include <wsutil/file_util.h>
#include <wsutil/filesystem.h>
#include <wsutil/inet_addr.h>
#include <wsutil/report_message.h>
+#include <wsutil/strtoi.h>
#include "sinsp-span.h"
+#define FALCO_PPME_PLUGINEVENT_E 322
+
typedef enum bridge_field_flags_e {
BFF_NONE = 0,
BFF_HIDDEN = 1 << 1, // Unused
@@ -69,40 +88,79 @@ 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;
conv_filter_info *conversation_filters;
} bridge_info;
-static int proto_falco_bridge = -1;
-static gint ett_falco_bridge = -1;
-static gint ett_sinsp_span = -1;
-static gint ett_address = -1;
+typedef struct falco_conv_filter_fields {
+ const char* container_id;
+ int64_t pid;
+ int64_t tid;
+ int64_t fd;
+ const char* fd_containername;
+} falco_conv_filter_fields;
+
+typedef struct fd_follow_tap_info {
+ const char* data;
+ int32_t datalen;
+ bool is_write;
+} fd_follow_tap_info;
+
+typedef struct container_io_tap_info {
+ const char* container_id;
+ const char* proc_name;
+ const char* fd_name;
+ int32_t io_bytes;
+ bool is_write;
+} container_io_tap_info;
+
+static int proto_falco_bridge;
+static int proto_syscalls[NUM_SINSP_SYSCALL_CATEGORIES];
+
+static int ett_falco_bridge;
+static int ett_syscalls[NUM_SINSP_SYSCALL_CATEGORIES];
+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 bool pref_show_internal;
+
static dissector_table_t ptype_dissector_table;
+static dissector_handle_t json_handle;
-static int dissect_falco_bridge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data);
-static int dissect_sinsp_span(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_);
+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(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
*/
-static int hf_sdp_source_id_size = -1;
-static int hf_sdp_lengths = -1;
-static int hf_sdp_source_id = -1;
+static int hf_sdp_source_id_size;
+static int hf_sdp_lengths;
+static int hf_sdp_source_id;
static hf_register_info hf[] = {
{ &hf_sdp_source_id_size,
@@ -125,9 +183,18 @@ static hf_register_info hf[] = {
},
};
+static void
+falco_bridge_cleanup(void) {
+ close_sinsp_capture(sinsp_span);
+}
+
// Returns true if the field might contain an IPv4 or IPv6 address.
// XXX This should probably be a preference.
-static bool is_addr_field(const char *abbrev) {
+static bool
+is_string_address_field(enum ftenum ftype, const char *abbrev) {
+ if (ftype != FT_STRINGZ) {
+ return false;
+ }
if (strstr(abbrev, ".srcip")) { // ct.srcip
return true;
} else if (strstr(abbrev, ".client.ip")) { // okta.client.ip
@@ -136,13 +203,13 @@ static bool is_addr_field(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);
@@ -154,20 +221,152 @@ 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);
}
-void
-configure_plugin(bridge_info* bi, char* config _U_)
+// 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)
{
/*
* Initialize the plugin
@@ -176,7 +375,7 @@ configure_plugin(bridge_info* bi, char* config _U_)
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;
@@ -189,8 +388,8 @@ configure_plugin(bridge_info* bi, char* config _U_)
*/
continue;
}
- if (sfi.type == SFT_STRINGZ && is_addr_field(sfi.abbrev)) {
- addr_fields++;
+ if (sfi.is_numeric_address || is_string_address_field(sfi.type, sfi.abbrev)) {
+ bi->addr_fields++;
}
bi->visible_fields++;
@@ -201,16 +400,16 @@ configure_plugin(bridge_info* bi, char* config _U_)
if (bi->visible_fields) {
bi->hf = (hf_register_info*)wmem_alloc(wmem_epan_scope(), bi->visible_fields * sizeof(hf_register_info));
- bi->hf_ids = (int*)wmem_alloc(wmem_epan_scope(), bi->visible_fields * sizeof(int));
+ 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_alloc(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_alloc(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) {
@@ -223,11 +422,6 @@ configure_plugin(bridge_info* bi, char* config _U_)
for (size_t j = 0; j < tot_fields; j++)
{
- bi->hf_ids[fld_cnt] = -1;
- bi->field_ids[fld_cnt] = (int) j;
- bi->field_flags[fld_cnt] = BFF_NONE;
- hf_register_info* ri = bi->hf + fld_cnt;
-
get_sinsp_source_field_info(bi->ssi, j, &sfi);
if (sfi.is_hidden) {
@@ -237,14 +431,33 @@ configure_plugin(bridge_info* bi, char* config _U_)
continue;
}
- enum ftenum ftype;
+ ws_assert(fld_cnt < bi->visible_fields);
+ bi->field_ids[fld_cnt] = (int) j;
+ bi->field_flags[fld_cnt] = BFF_NONE;
+
+ enum ftenum ftype = sfi.type;
int fdisplay = BASE_NONE;
switch (sfi.type) {
- case SFT_STRINGZ:
- ftype = FT_STRINGZ;
+ case FT_STRINGZ:
+ case FT_BOOLEAN:
+ case FT_BYTES:
break;
- case SFT_UINT64:
- ftype = FT_UINT64;
+ case FT_RELATIVE_TIME:
+ case FT_ABSOLUTE_TIME:
+ fdisplay = BASE_DEC;
+ break;
+ case FT_INT8:
+ case FT_INT16:
+ case FT_INT32:
+ case FT_INT64:
+ case FT_DOUBLE:
+ // This differs from libsinsp
+ fdisplay = BASE_DEC;
+ break;
+ case FT_UINT8:
+ case FT_UINT16:
+ case FT_UINT32:
+ case FT_UINT64:
switch (sfi.display_format) {
case SFDF_DECIMAL:
fdisplay = BASE_DEC;
@@ -256,15 +469,20 @@ configure_plugin(bridge_info* bi, char* config _U_)
fdisplay = BASE_OCT;
break;
default:
- THROW_FORMATTED(DissectorError, "error in plugin %s: display format %s is not supported",
- get_sinsp_source_name(bi->ssi),
- sfi.abbrev);
+ 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;
default:
- THROW_FORMATTED(DissectorError, "error in plugin %s: type of field %s is not supported",
+ ftype = FT_NONE;
+ ws_warning("plugin %s: type of field %s (%d) is not supported",
get_sinsp_source_name(bi->ssi),
- sfi.abbrev);
+ 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 = {
@@ -276,16 +494,17 @@ configure_plugin(bridge_info* bi, char* config _U_)
wmem_strdup(wmem_epan_scope(), sfi.description), HFILL
}
};
- *ri = finfo;
+ bi->hf[fld_cnt] = finfo;
if (sfi.is_conversation) {
+ ws_assert(conv_fld_cnt < bi->num_conversation_filters);
bi->field_flags[fld_cnt] |= BFF_CONVERSATION;
- bi->conversation_filters[conv_fld_cnt].field_info = ri;
+ bi->conversation_filters[conv_fld_cnt].field_info = &bi->hf[fld_cnt];
bi->conversation_filters[conv_fld_cnt].strbuf = wmem_strbuf_new(wmem_epan_scope(), "");
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, ri->hfinfo.name);
- register_log_conversation_filter(source_name, conv_filter_name, is_filter_valid, build_filter, &bi->conversation_filters[conv_fld_cnt]);
+ 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_conversation_filter, &bi->conversation_filters[conv_fld_cnt]);
if (conv_fld_cnt == 0) {
add_conversation_filter_protocol(source_name);
}
@@ -296,11 +515,10 @@ configure_plugin(bridge_info* bi, char* config _U_)
bi->field_flags[fld_cnt] |= BFF_INFO;
}
- if (sfi.type == SFT_STRINGZ && is_addr_field(sfi.abbrev)) {
+ if (sfi.is_numeric_address || is_string_address_field(sfi.type, sfi.abbrev)) {
+ ws_assert(addr_fld_cnt < bi->addr_fields);
bi->hf_id_to_addr_id[fld_cnt] = addr_fld_cnt;
- bi->hf_v4_ids[addr_fld_cnt] = -1;
- hf_register_info* ri_v4 = bi->hf_v4 + addr_fld_cnt;
hf_register_info finfo_v4 = {
bi->hf_v4_ids + addr_fld_cnt,
{
@@ -311,27 +529,26 @@ configure_plugin(bridge_info* bi, char* config _U_)
wmem_strdup_printf(wmem_epan_scope(), "%s (IPv4)", sfi.description), HFILL
}
};
- *ri_v4 = finfo_v4;
+ bi->hf_v4[addr_fld_cnt] = finfo_v4;
- bi->hf_v6_ids[addr_fld_cnt] = -1;
- hf_register_info* ri_v6 = bi->hf_v6 + addr_fld_cnt;
hf_register_info finfo_v6 = {
bi->hf_v6_ids + addr_fld_cnt,
{
wmem_strdup_printf(wmem_epan_scope(), "%s (IPv6)", sfi.display),
wmem_strdup_printf(wmem_epan_scope(), "%s.v6", sfi.abbrev),
- FT_IPv4, BASE_NONE,
+ FT_IPv6, BASE_NONE,
NULL, 0x0,
wmem_strdup_printf(wmem_epan_scope(), "%s (IPv6)", sfi.description), HFILL
}
};
- *ri_v6 = finfo_v6;
+ bi->hf_v6[addr_fld_cnt] = finfo_v6;
addr_fld_cnt++;
} else if (bi->hf_id_to_addr_id) {
bi->hf_id_to_addr_id[fld_cnt] = -1;
}
fld_cnt++;
}
+
proto_register_field_array(proto_falco_bridge, bi->hf, fld_cnt);
if (addr_fld_cnt) {
proto_register_field_array(proto_falco_bridge, bi->hf_v4, addr_fld_cnt);
@@ -346,7 +563,7 @@ import_plugin(char* fname)
nbridges++;
bridge_info* bi = &bridges[nbridges - 1];
- char *err_str = create_sinsp_source(sinsp_span, fname, &(bi->ssi));
+ char *err_str = create_sinsp_plugin_source(sinsp_span, fname, &(bi->ssi));
if (err_str) {
nbridges--;
report_failure("Unable to load sinsp plugin %s: %s.", fname, err_str);
@@ -354,18 +571,14 @@ import_plugin(char* fname)
return;
}
- configure_plugin(bi, "");
+ 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);
- bi->proto = proto_register_protocol (
- plugin_name, /* full name */
- source_name, /* short name */
- source_name /* filter_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;
- ct_handle = create_dissector_handle(dissect_sinsp_span, bi->proto);
+ ct_handle = create_dissector_handle(dissect_sinsp_plugin, bi->proto);
dissector_add_uint("falcobridge.id", bi->source_id, ct_handle);
}
@@ -377,97 +590,230 @@ on_wireshark_exit(void)
sinsp_span = NULL;
}
-void
-proto_register_falcoplugin(void)
-{
- proto_falco_bridge = proto_register_protocol (
- "Falco Bridge", /* name */
- "Falco Bridge", /* short name */
- "falcobridge" /* abbrev */
- );
- register_dissector("falcobridge", dissect_falco_bridge, proto_falco_bridge);
+static bool
+extract_syscall_conversation_fields (packet_info *pinfo, falco_conv_filter_fields* args) {
+ args->container_id = NULL;
+ args->pid = -1;
+ args->tid = -1;
+ args->fd = -1;
+ args->fd_containername = NULL;
- /*
- * Create the dissector table that we will use to route the dissection to
- * the appropriate Falco plugin.
- */
- ptype_dissector_table = register_dissector_table("falcobridge.id",
- "Falco Bridge Plugin ID", proto_falco_bridge, FT_UINT32, BASE_DEC);
+ // Syscalls are always the bridge with source_id 0.
+ bridge_info* bi = get_bridge_info(0);
- /*
- * Load the plugins
- */
- WS_DIR *dir;
- WS_DIRENT *file;
- char *filename;
- char *spdname = g_build_filename(get_plugins_dir_with_version(), "falco", NULL);
- char *ppdname = g_build_filename(get_plugins_pers_dir_with_version(), "falco", NULL);
+ sinsp_field_extract_t *sinsp_fields = NULL;
+ uint32_t sinsp_fields_count = 0;
+ void* sinp_evt_info;
+ bool rc = get_extracted_syscall_source_fields(sinsp_span, pinfo->fd->num, &sinsp_fields, &sinsp_fields_count, &sinp_evt_info);
- /*
- * We scan the plugins directory twice. The first time we count how many
- * plugins we have, which we need to know in order to allocate the right
- * amount of memory. The second time we actually load and configure
- * each plugin.
- */
- if ((dir = ws_dir_open(spdname, 0, NULL)) != NULL) {
- while ((ws_dir_read_name(dir)) != NULL) {
- nbridges++;
- }
- ws_dir_close(dir);
+ if (!rc) {
+ REPORT_DISSECTOR_BUG("cannot extract falco conversation fields for event %" PRIu32, pinfo->fd->num);
}
- if ((dir = ws_dir_open(ppdname, 0, NULL)) != NULL) {
- while ((ws_dir_read_name(dir)) != NULL) {
- nbridges++;
+ for (uint32_t hf_idx = 0, sf_idx = 0; hf_idx < bi->visible_fields && sf_idx < sinsp_fields_count; hf_idx++) {
+ if (sinsp_fields[sf_idx].field_idx != hf_idx) {
+ continue;
}
- ws_dir_close(dir);
- }
- sinsp_span = create_sinsp_span();
+ header_field_info* hfinfo = &(bi->hf[hf_idx].hfinfo);
- bridges = g_new0(bridge_info, nbridges);
- nbridges = 0;
+ if (strcmp(hfinfo->abbrev, "container.id") == 0) {
+ args->container_id = get_str_value(sinsp_fields, sf_idx);
+ // if (args->container_id == NULL) {
+ // REPORT_DISSECTOR_BUG("cannot extract the container ID for event %" PRIu32, pinfo->fd->num);
+ // }
+ }
- if ((dir = ws_dir_open(spdname, 0, NULL)) != NULL) {
- while ((file = ws_dir_read_name(dir)) != NULL) {
- filename = g_build_filename(spdname, ws_dir_get_name(file), NULL);
- import_plugin(filename);
- g_free(filename);
+ if (strcmp(hfinfo->abbrev, "proc.pid") == 0) {
+ args->pid = sinsp_fields[sf_idx].res.u64;
}
- ws_dir_close(dir);
- }
- if ((dir = ws_dir_open(ppdname, 0, NULL)) != NULL) {
- while ((file = ws_dir_read_name(dir)) != NULL) {
- filename = g_build_filename(ppdname, ws_dir_get_name(file), NULL);
- import_plugin(filename);
- g_free(filename);
+ if (strcmp(hfinfo->abbrev, "thread.tid") == 0) {
+ args->tid = sinsp_fields[sf_idx].res.u64;
}
- ws_dir_close(dir);
+
+ if (strcmp(hfinfo->abbrev, "fd.num") == 0) {
+ args->fd = sinsp_fields[sf_idx].res.u64;
+ }
+
+ if (strcmp(hfinfo->abbrev, "fd.containername") == 0) {
+ args->fd_containername = get_str_value(sinsp_fields, sf_idx);
+ }
+
+ sf_idx++;
}
- g_free(spdname);
- g_free(ppdname);
+ // args->fd=-1 means that either there's no FD (e.g. a clone syscall), or that the FD is not a valid one (e.g., failed open).
+ if (args->fd == -1) {
+ return false;
+ }
- /*
- * Setup protocol subtree array
- */
- static gint *ett[] = {
- &ett_falco_bridge,
- &ett_sinsp_span,
- &ett_address,
- };
+ return true;
+}
- proto_register_field_array(proto_falco_bridge, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+static bool sysdig_syscall_filter_valid(packet_info *pinfo, void *user_data _U_) {
+ if (!proto_is_frame_protocol(pinfo->layers, "sysdig")) {
+ return false;
+ }
- register_shutdown_routine(on_wireshark_exit);
+ // This only supports the syscall source.
+ if (pinfo->rec->rec_header.syscall_header.event_type == FALCO_PPME_PLUGINEVENT_E) {
+ return false;
+ }
+
+ return true;
+}
+
+static bool sysdig_syscall_container_filter_valid(packet_info *pinfo, void *user_data) {
+ if (!sysdig_syscall_filter_valid(pinfo, user_data)) {
+ return false;
+ }
+
+ falco_conv_filter_fields cff;
+ if (!extract_syscall_conversation_fields(pinfo, &cff)) {
+ return false;
+ }
+
+ return cff.container_id != NULL;
+}
+
+static bool sysdig_syscall_fd_filter_valid(packet_info *pinfo, void *user_data) {
+ if (!sysdig_syscall_filter_valid(pinfo, user_data)) {
+ return false;
+ }
+
+ falco_conv_filter_fields cff;
+ return extract_syscall_conversation_fields(pinfo, &cff);
+}
+
+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 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) {
+ return ws_strdup_printf("container.id==\"%s\" && proc.pid==%" PRId64, cff.container_id, cff.pid);
+ } else {
+ return ws_strdup_printf("proc.pid==%" PRId64, cff.pid);
+ }
+}
+
+static char* sysdig_procdescendants_build_filter(packet_info *pinfo, void *user_data _U_) {
+ falco_conv_filter_fields cff;
+ extract_syscall_conversation_fields(pinfo, &cff);
+
+ if (cff.container_id) {
+ return ws_strdup_printf("container.id==\"%s\" && (proc.pid==%" PRId64 " || proc.apid.1==%" PRId64 " || proc.apid.2==%" PRId64 " || proc.apid.3==%" PRId64 " || proc.apid.4==%" PRId64 ")",
+ cff.container_id,
+ cff.pid,
+ cff.pid,
+ cff.pid,
+ cff.pid,
+ cff.pid);
+ } else {
+ return ws_strdup_printf("proc.pid==%" PRId64 " || proc.apid.1==%" PRId64 " || proc.apid.2==%" PRId64 " || proc.apid.3==%" PRId64 " || proc.apid.4==%" PRId64,
+ cff.pid,
+ cff.pid,
+ cff.pid,
+ cff.pid,
+ cff.pid);
+ }
+}
+
+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) {
+ return ws_strdup_printf("container.id==\"%s\" && thread.tid==%" PRIu64, cff.container_id, cff.tid);
+ } else {
+ return ws_strdup_printf("thread.tid==%" PRId64, cff.tid);
+ }
+}
+
+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) {
+ return ws_strdup_printf("container.id==\"%s\" && thread.tid==%" PRId64 " && fd.containername==\"%s\"",
+ cff.container_id,
+ cff.tid,
+ cff.fd_containername);
+ } else {
+ return ws_strdup_printf("thread.tid==%" PRId64, cff.tid);
+ }
+}
+
+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 char *fd_follow_index_filter(unsigned stream _U_, unsigned sub_stream _U_)
+{
+ return NULL;
+}
+
+static char *fd_follow_address_filter(address *src_addr _U_, address *dst_addr _U_, int src_port _U_, int dst_port _U_)
+{
+ return NULL;
+}
+
+char *
+fd_port_to_display(wmem_allocator_t *allocator _U_, unsigned port _U_)
+{
+ return NULL;
+}
+
+tap_packet_status
+fd_tap_listener(void *tapdata, packet_info *pinfo,
+ epan_dissect_t *edt _U_, const void *data, tap_flags_t flags _U_)
+{
+ 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;
+ bool is_server;
+
+ is_server = tap_info->is_write;
+
+ follow_record = g_new0(follow_record_t, 1);
+ follow_record->is_server = is_server;
+ follow_record->packet_num = pinfo->fd->num;
+ follow_record->abs_ts = pinfo->fd->abs_ts;
+ follow_record->data = g_byte_array_append(g_byte_array_new(),
+ tap_info->data,
+ tap_info->datalen);
+
+ follow_info->bytes_written[is_server] += follow_record->data->len;
+ follow_info->payload = g_list_prepend(follow_info->payload, follow_record);
+
+ return TAP_PACKET_DONT_REDRAW;
}
+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;
+}
+
+
+
static bridge_info*
-get_bridge_info(guint32 source_id)
+get_bridge_info(uint32_t source_id)
{
- for(guint j = 0; j < nbridges; j++)
+ if (source_id == 0) {
+ return &bridges[0];
+ }
+
+ for(size_t j = 0; j < nbridges; j++)
{
if(bridges[j].source_id == source_id)
{
@@ -479,70 +825,346 @@ get_bridge_info(guint32 source_id)
}
static int
-dissect_falco_bridge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+dissect_falco_bridge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *epd_p)
{
+ int encoding = pinfo->rec->rec_header.syscall_header.byte_order == G_BIG_ENDIAN ? ENC_BIG_ENDIAN : ENC_LITTLE_ENDIAN;
+
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Falco Bridge");
- /* Clear out stuff in the info column */
- col_clear(pinfo->cinfo,COL_INFO);
// https://github.com/falcosecurity/libs/blob/9c942f27/userspace/libscap/scap.c#L1900
- proto_item *ti = proto_tree_add_item(tree, proto_falco_bridge, tvb, 0, 12, ENC_NA);
- proto_tree *fb_tree = proto_item_add_subtree(ti, ett_falco_bridge);
- proto_tree_add_item(fb_tree, hf_sdp_source_id_size, tvb, 0, 4, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(fb_tree, hf_sdp_lengths, tvb, 4, 4, ENC_LITTLE_ENDIAN);
- proto_item *idti = proto_tree_add_item(fb_tree, hf_sdp_source_id, tvb, 8, 4, ENC_LITTLE_ENDIAN);
- guint32 source_id = tvb_get_guint32(tvb, 8, ENC_LITTLE_ENDIAN);
+ uint32_t source_id = 0;
+ if (pinfo->rec->rec_header.syscall_header.event_type == FALCO_PPME_PLUGINEVENT_E) {
+ source_id = tvb_get_uint32(tvb, 8, encoding);
+ }
+
bridge_info* bi = get_bridge_info(source_id);
- col_add_fstr(pinfo->cinfo, COL_INFO, "Plugin ID: %u", source_id);
- if (bi == NULL) {
- proto_item_append_text(idti, " (NOT SUPPORTED)");
- col_append_str(pinfo->cinfo, COL_INFO, " (NOT SUPPORTED)");
+ if (bi && bi->source_id == 0) {
+ sysdig_event_param_data *event_param_data = (sysdig_event_param_data *) epd_p;
+ dissect_sinsp_enriched(tvb, pinfo, tree, bi, event_param_data);
+ } else {
+ proto_item *ti = proto_tree_add_item(tree, proto_falco_bridge, tvb, 0, 12, ENC_NA);
+ proto_tree *fb_tree = proto_item_add_subtree(ti, ett_falco_bridge);
+
+ proto_tree_add_item(fb_tree, hf_sdp_source_id_size, tvb, 0, 4, encoding);
+ proto_tree_add_item(fb_tree, hf_sdp_lengths, tvb, 4, 4, encoding);
+ /* Clear out stuff in the info column */
+ col_clear(pinfo->cinfo,COL_INFO);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Plugin ID: %u", source_id);
+
+ proto_item *idti = proto_tree_add_item(fb_tree, hf_sdp_source_id, tvb, 8, 4, encoding);
+ if (bi == NULL) {
+ proto_item_append_text(idti, " (NOT SUPPORTED)");
+ col_append_str(pinfo->cinfo, COL_INFO, " (NOT SUPPORTED)");
+ return tvb_captured_length(tvb);
+ }
+
+ const char *source_name = get_sinsp_source_name(bi->ssi);
+ proto_item_append_text(idti, " (%s)", source_name);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", source_name);
+
+ tvbuff_t* plugin_tvb = tvb_new_subset_length(tvb, 12, tvb_captured_length(tvb) - 12);
+ dissect_sinsp_plugin(plugin_tvb, pinfo, fb_tree, bi);
+ }
+
+ return tvb_captured_length(tvb);
+}
+
+int extract_lineage_number(const char *fld_name) {
+ char *last_dot = strrchr(fld_name, '.');
+ if (last_dot != NULL) {
+ return atoi(last_dot + 1);
+ }
+ return -1;
+}
+
+const char* get_str_value(sinsp_field_extract_t *sinsp_fields, uint32_t sf_idx) {
+ const char *res_str;
+ if (sinsp_fields[sf_idx].res_len < SFE_SMALL_BUF_SIZE) {
+ res_str = sinsp_fields[sf_idx].res.small_str;
+ } else {
+ if (sinsp_fields[sf_idx].res.str == NULL) {
+ ws_debug("Field %u has NULL result string", sf_idx);
+ return NULL;
+ }
+ res_str = sinsp_fields[sf_idx].res.str;
+ }
+
+ return res_str;
+}
+
+static int
+dissect_sinsp_enriched(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi_ptr, sysdig_event_param_data *event_param_data)
+{
+ bridge_info* bi = (bridge_info *) bi_ptr;
+
+ if (!pinfo->fd->visited) {
+ if (pinfo->fd->num == 1) {
+ // Open the capture file using libsinsp, which reads the meta events
+ // at the beginning of the file. We can't call this via register_init_routine
+ // because we don't have the file path at that point.
+ open_sinsp_capture(sinsp_span, pinfo->rec->rec_header.syscall_header.pathname);
+ }
+ }
+
+ sinsp_field_extract_t *sinsp_fields = NULL;
+ uint32_t sinsp_fields_count = 0;
+ void* sinp_evt_info;
+ bool rc = extract_syscall_source_fields(sinsp_span, bi->ssi, pinfo->fd->num, &sinsp_fields, &sinsp_fields_count, &sinp_evt_info);
+
+ if (!rc) {
+ REPORT_DISSECTOR_BUG("Falco plugin %s extract error: %s", get_sinsp_source_name(bi->ssi), get_sinsp_source_last_error(bi->ssi));
+ }
+
+ if (sinsp_fields_count == 0) {
+ col_append_str(pinfo->cinfo, COL_INFO, " [Internal event]");
+ if (!pref_show_internal) {
+ pinfo->fd->passed_dfilter = false;
+ }
return tvb_captured_length(tvb);
}
- const char *source_name = get_sinsp_source_name(bi->ssi);
- proto_item_append_text(idti, " (%s)", source_name);
- col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", source_name);
+ proto_tree *parent_trees[NUM_SINSP_SYSCALL_CATEGORIES] = {0};
+ proto_tree *lineage_trees[N_PROC_LINEAGE_ENTRIES] = {0};
+ bool is_io_write = false;
+ const char* io_buffer = NULL;
+ uint32_t io_buffer_len = 0;
+
+ const char *container_id = "host";
+ const char *proc_name = NULL;
+ const char *fd_name = NULL;
+
+ // Conversation discoverable through conversation_filter_from_pinfo.
+ // Used for related event indicators in the packet list.
+ // Fields should match sysdig_proc_build_filter.
+ conversation_element_t *pinfo_conv_els = NULL; // thread.tid hfid + thread.tid + container.id hfid + container.id + CONVERSATION_LOG
+
+ for (uint32_t hf_idx = 0, sf_idx = 0; hf_idx < bi->visible_fields && sf_idx < sinsp_fields_count; hf_idx++) {
+ if (sinsp_fields[sf_idx].field_idx != hf_idx) {
+ continue;
+ }
+
+ header_field_info* hfinfo = &(bi->hf[hf_idx].hfinfo);
+
+ proto_tree *ti;
- dissector_handle_t dissector = dissector_get_uint_handle(ptype_dissector_table, source_id);
- if (dissector) {
- tvbuff_t* next_tvb = tvb_new_subset_length(tvb, 12, tvb_captured_length(tvb) - 12);
- call_dissector_with_data(dissector, next_tvb, pinfo, tree, bi);
+
+ // XXX Should we add this back?
+// if (sinsp_fields[sf_idx].type != hfinfo->type) {
+// REPORT_DISSECTOR_BUG("Field %s has an unrecognized or mismatched type %u != %u",
+// hfinfo->abbrev, sinsp_fields[sf_idx].type, hfinfo->type);
+// }
+
+ sinsp_syscall_category_e parent_category = get_syscall_parent_category(bi->ssi, sinsp_fields[sf_idx].field_idx);
+ if (!parent_trees[parent_category]) {
+ int bytes_offset = 0;
+ uint32_t bytes_length = 0;
+ if (parent_category == SSC_FD) {
+ bytes_offset = event_param_data->data_bytes_offset;
+ bytes_length = event_param_data->data_bytes_length;
+ }
+ ti = proto_tree_add_item(tree, proto_syscalls[parent_category], tvb, bytes_offset, bytes_length, BASE_NONE);
+ parent_trees[parent_category] = proto_item_add_subtree(ti, ett_syscalls[parent_category]);
+ }
+ proto_tree *parent_tree = parent_trees[parent_category];
+
+ if (parent_category == SSC_PROCLINEAGE) {
+ int32_t lnum = extract_lineage_number(hfinfo->abbrev);
+ if (lnum == -1) {
+ ws_error("Invalid lineage field name %s", hfinfo->abbrev);
+ }
+
+ if (!lineage_trees[lnum]) {
+ const char* res_str = get_str_value(sinsp_fields, sf_idx);
+ if (res_str == NULL) {
+ ws_error("empty value for field %s", hfinfo->abbrev);
+ }
+
+ lineage_trees[lnum] = proto_tree_add_subtree_format(parent_tree, tvb, 0, 0, ett_lineage[0], NULL, "%" PRIu32 ". %s", lnum, res_str);
+ sf_idx++;
+ continue;
+ }
+
+ parent_tree = lineage_trees[lnum];
+ }
+
+ int32_t arg_num;
+#define EVT_ARG_PFX "evt.arg."
+ if (! (g_str_has_prefix(hfinfo->abbrev, EVT_ARG_PFX) && ws_strtoi32(hfinfo->abbrev + sizeof(EVT_ARG_PFX) - 1, NULL, &arg_num)) ) {
+ arg_num = -1;
+ }
+
+ if (strcmp(hfinfo->abbrev, "evt.is_io_write") == 0) {
+ is_io_write = sinsp_fields[sf_idx].res.boolean;
+ }
+ if (strcmp(hfinfo->abbrev, "evt.buffer") == 0) {
+ io_buffer = sinsp_fields[sf_idx].res.str;
+ io_buffer_len = sinsp_fields[sf_idx].res_len;
+ }
+
+ switch (hfinfo->type) {
+ case FT_INT8:
+ case FT_INT16:
+ case FT_INT32:
+ proto_tree_add_int(parent_tree, bi->hf_ids[hf_idx], tvb, 0, 0, sinsp_fields[sf_idx].res.i32);
+ break;
+ case FT_INT64:
+ proto_tree_add_int64(parent_tree, bi->hf_ids[hf_idx], tvb, 0, 0, sinsp_fields[sf_idx].res.i64);
+ if (strcmp(hfinfo->abbrev, "thread.tid") == 0) {
+ if (!pinfo_conv_els) {
+ pinfo_conv_els = wmem_alloc0(pinfo->pool, sizeof(conversation_element_t) * 5);
+ pinfo_conv_els[0].type = CE_INT;
+ pinfo_conv_els[1].type = CE_INT64;
+ pinfo_conv_els[2].type = CE_INT;
+ pinfo_conv_els[3].type = CE_STRING;
+ }
+ pinfo_conv_els[0].int_val = hfinfo->id;
+ pinfo_conv_els[1].int64_val = sinsp_fields[sf_idx].res.i64;
+ }
+ break;
+ case FT_UINT8:
+ case FT_UINT16:
+ case FT_UINT32:
+ proto_tree_add_uint(parent_tree, bi->hf_ids[hf_idx], tvb, 0, 0, sinsp_fields[sf_idx].res.u32);
+ break;
+ case FT_UINT64:
+ case FT_RELATIVE_TIME:
+ case FT_ABSOLUTE_TIME:
+ proto_tree_add_uint64(parent_tree, bi->hf_ids[hf_idx], tvb, 0, 0, sinsp_fields[sf_idx].res.u64);
+ break;
+ case FT_STRINGZ:
+ {
+ const char* res_str = get_str_value(sinsp_fields, sf_idx);
+ if (res_str == NULL) {
+ continue;
+ }
+
+ if (arg_num != -1) {
+ // When the field is an argument, we want to display things in a way that includes the argument name and value.
+ char* argname = get_evt_arg_name(sinp_evt_info, arg_num);
+ ti = proto_tree_add_string_format(parent_tree, bi->hf_ids[hf_idx], tvb, 0, 0, res_str, "%s: %s", argname, res_str);
+ } else {
+ ti = proto_tree_add_string(parent_tree, bi->hf_ids[hf_idx], tvb, 0, 0, res_str);
+ }
+
+ if (bi->field_flags[hf_idx] & BFF_INFO) {
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", "%s", res_str);
+ // Mark it hidden, otherwise we end up with a bunch of empty "Info" tree items.
+ proto_item_set_hidden(ti);
+ }
+
+ if (strcmp(hfinfo->abbrev, "proc.name") == 0) {
+ proc_name = res_str;
+ } else if (strcmp(hfinfo->abbrev, "fd.name") == 0) {
+ fd_name = res_str;
+ } else if (strcmp(hfinfo->abbrev, "container.id") == 0) {
+ container_id = res_str;
+ if (pinfo_conv_els) {
+ pinfo_conv_els[2].int_val = hfinfo->id;
+ }
+ }
+ }
+ break;
+ case FT_BOOLEAN:
+ proto_tree_add_boolean(parent_tree, bi->hf_ids[hf_idx], tvb, 0, 0, sinsp_fields[sf_idx].res.boolean);
+ break;
+ case FT_DOUBLE:
+ proto_tree_add_double(parent_tree, bi->hf_ids[hf_idx], tvb, 0, 0, sinsp_fields[sf_idx].res.dbl);
+ break;
+ case FT_BYTES:
+ {
+ int addr_fld_idx = bi->hf_id_to_addr_id[hf_idx];
+ if (addr_fld_idx < 0) {
+ int bytes_offset = 0;
+ uint32_t bytes_length = 0;
+ if (io_buffer) { // evt.buffer
+ bytes_offset = event_param_data->data_bytes_offset;
+ bytes_length = event_param_data->data_bytes_length;
+ }
+ proto_tree_add_bytes_with_length(parent_tree, bi->hf_ids[hf_idx], tvb, bytes_offset, bytes_length, sinsp_fields[sf_idx].res.str, sinsp_fields[sf_idx].res_len);
+ } else {
+ // XXX Need to differentiate between src and dest. Falco libs supply client vs server and local vs remote.
+ if (sinsp_fields[sf_idx].res_len == 4) {
+ ws_in4_addr v4_addr;
+ memcpy(&v4_addr, sinsp_fields[sf_idx].res.bytes, 4);
+ proto_tree_add_ipv4(parent_tree, bi->hf_v4_ids[addr_fld_idx], tvb, 0, 0, v4_addr);
+ set_address(&pinfo->net_src, AT_IPv4, sizeof(ws_in4_addr), &v4_addr);
+ } else if (sinsp_fields[sf_idx].res_len == 16) {
+ ws_in6_addr v6_addr;
+ memcpy(&v6_addr, sinsp_fields[sf_idx].res.bytes, 16);
+ proto_tree_add_ipv6(parent_tree, bi->hf_v6_ids[addr_fld_idx], tvb, 0, 0, &v6_addr);
+ set_address(&pinfo->net_src, AT_IPv6, sizeof(ws_in6_addr), &v6_addr);
+ } else {
+ ws_warning("Invalid length %u for address field %u", sinsp_fields[sf_idx].res_len, sf_idx);
+ }
+ // XXX Add conversation support.
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ sf_idx++;
+ }
+
+ if (pinfo_conv_els) {
+ pinfo_conv_els[3].str_val = container_id;
+ pinfo_conv_els[4].type = CE_CONVERSATION_TYPE;
+ pinfo_conv_els[4].conversation_type_val = CONVERSATION_LOG;
+ pinfo->conv_elements = pinfo_conv_els;
+ find_or_create_conversation(pinfo);
+ }
+
+ if (io_buffer_len > 0) {
+ if (have_tap_listener(fd_follow_tap)) {
+ fd_follow_tap_info *tap_info = wmem_new(pinfo->pool, fd_follow_tap_info);
+ tap_info->data = io_buffer;
+ tap_info->datalen = io_buffer_len;
+ tap_info->is_write = is_io_write;
+ tap_queue_packet(fd_follow_tap, pinfo, tap_info);
+ }
+ if (have_tap_listener(container_io_tap) && proc_name && fd_name) {
+ container_io_tap_info *tap_info = wmem_new(pinfo->pool, container_io_tap_info);
+ tap_info->proc_name = proc_name;
+ tap_info->fd_name = fd_name;
+ tap_info->container_id = container_id;
+ tap_info->io_bytes = io_buffer_len;
+ tap_info->is_write = is_io_write;
+ tap_queue_packet(container_io_tap, pinfo, tap_info);
+ }
}
return tvb_captured_length(tvb);
}
static int
-dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi_ptr)
+dissect_sinsp_plugin(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi_ptr)
{
bridge_info* bi = (bridge_info *) bi_ptr;
- guint plen = tvb_captured_length(tvb);
- const char *source_name = get_sinsp_source_name(bi->ssi);
+ unsigned payload_len = tvb_captured_length(tvb);
- col_set_str(pinfo->cinfo, COL_PROTOCOL, source_name);
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "oops");
/* Clear out stuff in the info column */
col_clear(pinfo->cinfo, COL_INFO);
- proto_item* ti = proto_tree_add_item(tree, bi->proto, tvb, 0, plen, ENC_NA);
+ proto_item *ti = tree;
proto_tree* fb_tree = proto_item_add_subtree(ti, ett_sinsp_span);
- guint8* payload = (guint8*)tvb_get_ptr(tvb, 0, plen);
+ uint8_t* payload = (uint8_t*)tvb_get_ptr(tvb, 0, payload_len);
- sinsp_field_extract_t *sinsp_fields = (sinsp_field_extract_t*) wmem_alloc(pinfo->pool, sizeof(sinsp_field_extract_t) * bi->visible_fields);
+ 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++) {
header_field_info* hfinfo = &(bi->hf[fld_idx].hfinfo);
- sinsp_field_extract_t *sfe = &sinsp_fields[fld_idx];
+ plugin_field_extract_t *sfe = &sinsp_fields[fld_idx];
sfe->field_id = bi->field_ids[fld_idx];
sfe->field_name = hfinfo->abbrev;
- sfe->type = hfinfo->type == FT_STRINGZ ? SFT_STRINGZ : SFT_UINT64;
+ sfe->type = hfinfo->type == FT_STRINGZ ? FT_STRINGZ : FT_UINT64;
}
// If we have a failure, try to dissect what we can first, then bail out with an error.
- bool rc = extract_sisnp_source_fields(bi->ssi, payload, plen, pinfo->pool, sinsp_fields, bi->visible_fields);
+ bool rc = extract_plugin_source_fields(bi->ssi, pinfo->num, payload, payload_len, pinfo->pool, sinsp_fields, bi->visible_fields);
if (!rc) {
REPORT_DISSECTOR_BUG("Falco plugin %s extract error: %s", get_sinsp_source_name(bi->ssi), get_sinsp_source_last_error(bi->ssi));
@@ -556,7 +1178,7 @@ dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi
conversation_element_t *first_conv_els = NULL; // hfid + field val + CONVERSATION_LOG
for (uint32_t fld_idx = 0; fld_idx < bi->visible_fields; fld_idx++) {
- sinsp_field_extract_t *sfe = &sinsp_fields[fld_idx];
+ plugin_field_extract_t *sfe = &sinsp_fields[fld_idx];
header_field_info* hfinfo = &(bi->hf[fld_idx].hfinfo);
if (!sfe->is_present) {
@@ -581,25 +1203,38 @@ dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi
}
- if (sfe->type == SFT_STRINGZ && hfinfo->type == FT_STRINGZ) {
- proto_item *pi = proto_tree_add_string(fb_tree, bi->hf_ids[fld_idx], tvb, 0, plen, sfe->res_str);
+ if (sfe->type == FT_STRINGZ && hfinfo->type == FT_STRINGZ) {
+ proto_item *pi = proto_tree_add_string(fb_tree, bi->hf_ids[fld_idx], tvb, 0, payload_len, sfe->res.str);
if (bi->field_flags[fld_idx] & BFF_INFO) {
- col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", "%s", sfe->res_str);
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", "%s", sfe->res.str);
// Mark it hidden, otherwise we end up with a bunch of empty "Info" tree items.
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;
ws_in6_addr v6_addr;
proto_tree *addr_tree;
proto_item *addr_item = NULL;
- if (ws_inet_pton4(sfe->res_str, &v4_addr)) {
+ if (ws_inet_pton4(sfe->res.str, &v4_addr)) {
addr_tree = proto_item_add_subtree(pi, ett_address);
addr_item = proto_tree_add_ipv4(addr_tree, bi->hf_v4_ids[addr_fld_idx], tvb, 0, 0, v4_addr);
set_address(&pinfo->net_src, AT_IPv4, sizeof(ws_in4_addr), &v4_addr);
- } else if (ws_inet_pton6(sfe->res_str, &v6_addr)) {
+ } else if (ws_inet_pton6(sfe->res.str, &v6_addr)) {
addr_tree = proto_item_add_subtree(pi, ett_address);
addr_item = proto_tree_add_ipv6(addr_tree, bi->hf_v6_ids[addr_fld_idx], tvb, 0, 0, &v6_addr);
set_address(&pinfo->net_src, AT_IPv6, sizeof(ws_in6_addr), &v6_addr);
@@ -608,7 +1243,7 @@ dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi
proto_item_set_generated(addr_item);
}
if (cur_conv_filter) {
- wmem_strbuf_append(cur_conv_filter->strbuf, sfe->res_str);
+ wmem_strbuf_append(cur_conv_filter->strbuf, sfe->res.str);
cur_conv_filter->is_present = true;
}
if (cur_conv_els) {
@@ -617,34 +1252,34 @@ dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi
}
} else {
if (cur_conv_filter) {
- wmem_strbuf_append_printf(cur_conv_filter->strbuf, "\"%s\"", sfe->res_str);
+ wmem_strbuf_append_printf(cur_conv_filter->strbuf, "\"%s\"", sfe->res.str);
cur_conv_filter->is_present = true;
}
if (cur_conv_els) {
cur_conv_els[1].type = CE_STRING;
- cur_conv_els[1].str_val = wmem_strdup(pinfo->pool, sfe->res_str);
+ cur_conv_els[1].str_val = wmem_strdup(pinfo->pool, sfe->res.str);
}
}
}
- else if (sfe->type == SFT_UINT64 && hfinfo->type == FT_UINT64) {
- proto_tree_add_uint64(fb_tree, bi->hf_ids[fld_idx], tvb, 0, plen, sfe->res_u64);
+ else if (sfe->type == FT_UINT64 && hfinfo->type == FT_UINT64) {
+ proto_tree_add_uint64(fb_tree, bi->hf_ids[fld_idx], tvb, 0, payload_len, sfe->res.u64);
if (cur_conv_filter) {
switch (hfinfo->display) {
case BASE_HEX:
- wmem_strbuf_append_printf(cur_conv_filter->strbuf, "%" PRIx64, sfe->res_u64);
+ wmem_strbuf_append_printf(cur_conv_filter->strbuf, "%" PRIx64, sfe->res.u64);
break;
case BASE_OCT:
- wmem_strbuf_append_printf(cur_conv_filter->strbuf, "%" PRIo64, sfe->res_u64);
+ wmem_strbuf_append_printf(cur_conv_filter->strbuf, "%" PRIo64, sfe->res.u64);
break;
default:
- wmem_strbuf_append_printf(cur_conv_filter->strbuf, "%" PRId64, sfe->res_u64);
+ wmem_strbuf_append_printf(cur_conv_filter->strbuf, "%" PRId64, sfe->res.u64);
}
cur_conv_filter->is_present = true;
}
if (cur_conv_els) {
cur_conv_els[1].type = CE_UINT64;
- cur_conv_els[1].uint64_val = sfe->res_u64;
+ cur_conv_els[1].uint64_val = sfe->res.u64;
}
}
else {
@@ -653,10 +1288,6 @@ dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi
}
}
- if (!rc) {
- REPORT_DISSECTOR_BUG("Falco plugin %s extract error", get_sinsp_source_name(bi->ssi));
- }
-
if (first_conv_els) {
first_conv_els[2].type = CE_CONVERSATION_TYPE;
first_conv_els[2].conversation_type_val = CONVERSATION_LOG;
@@ -667,10 +1298,213 @@ dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* bi
// }
}
- return plen;
+ return payload_len;
+}
+
+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);
+
+}
+
+static tap_packet_status container_io_stats_tree_event(stats_tree* st, packet_info* pinfo _U_, epan_dissect_t* edt _U_, const void* tap_info_p, tap_flags_t flags _U_)
+{
+ 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);
+ if (tap_info->is_write) {
+ 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);
+ }
+
+ return TAP_PACKET_REDRAW;
}
void
-proto_reg_handoff_sdplugin(void)
+proto_reg_handoff_falcoplugin(void)
{
+ // Register statistics trees
+ stats_tree_cfg *st_config = stats_tree_register_plugin("container_io", "container_io", "Container I/O", 0, container_io_stats_tree_event, container_io_stats_tree_init, NULL);
+ 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
+proto_register_falcoplugin(void)
+{
+ // Opening requires a file path, so we do that in dissect_sinsp_enriched.
+ register_cleanup_routine(&falco_bridge_cleanup);
+
+ proto_falco_bridge = proto_register_protocol("Falco Bridge", "Falco Bridge", "falcobridge");
+ register_dissector("falcobridge", dissect_falco_bridge, proto_falco_bridge);
+
+ // Register the syscall conversation filters.
+ // These show up in the "Conversation Filter" and "Colorize Conversation" context menus.
+ // The first match is also used for "Go" menu navigation.
+ register_log_conversation_filter("falcobridge", "Thread", sysdig_syscall_filter_valid, sysdig_thread_build_filter, NULL);
+ register_log_conversation_filter("falcobridge", "Process", sysdig_syscall_filter_valid, sysdig_proc_build_filter, NULL);
+ register_log_conversation_filter("falcobridge", "Container", sysdig_syscall_container_filter_valid, sysdig_container_build_filter, NULL);
+ register_log_conversation_filter("falcobridge", "Process and Descendants", sysdig_syscall_filter_valid, sysdig_procdescendants_build_filter, NULL);
+ register_log_conversation_filter("falcobridge", "File Descriptor", sysdig_syscall_fd_filter_valid, sysdig_fd_build_filter, NULL);
+ add_conversation_filter_protocol("falcobridge");
+
+ // Register statistics taps
+ container_io_tap = register_tap("container_io");
+
+ // Register the "follow" handlers
+ fd_follow_tap = register_tap("fd_follow");
+
+ register_follow_stream(proto_falco_bridge, "fd_follow", fd_follow_conv_filter, fd_follow_index_filter, fd_follow_address_filter,
+ fd_port_to_display, fd_tap_listener, get_fd_stream_count, NULL);
+
+ // Try to have a 1:1 mapping for as many Sysdig / Falco fields as possible.
+ // The exceptions are SSC_EVTARGS and SSC_PROCLINEAGE, which exposes the event arguments in a way that is convenient for the user.
+ proto_syscalls[SSC_EVENT] = proto_register_protocol("Event Information", "Falco Event", "evt");
+ proto_syscalls[SSC_EVTARGS] = proto_register_protocol("Event Arguments", "Falco Event Info", "evt.arg");
+ proto_syscalls[SSC_PROCESS] = proto_register_protocol("Process Information", "Falco Process", "process");
+ proto_syscalls[SSC_PROCLINEAGE] = proto_register_protocol("Process Ancestors", "Falco Process Lineage", "proc.aname");
+ proto_syscalls[SSC_USER] = proto_register_protocol("User Information", "Falco User", "user");
+ proto_syscalls[SSC_GROUP] = proto_register_protocol("Group Information", "Falco Group", "group");
+ proto_syscalls[SSC_CONTAINER] = proto_register_protocol("Container Information", "Falco Container", "container");
+ proto_syscalls[SSC_FD] = proto_register_protocol("File Descriptor Information", "Falco FD", "fd");
+ proto_syscalls[SSC_FS] = proto_register_protocol("Filesystem Information", "Falco FS", "fs");
+ // syslog.facility collides with the Syslog dissector, so let syslog fall through to "falco".
+ proto_syscalls[SSC_FDLIST] = proto_register_protocol("File Descriptor List", "Falco FD List", "fdlist");
+ proto_syscalls[SSC_OTHER] = proto_register_protocol("Unknown or Miscellaneous Falco", "Falco Misc", "falco");
+
+ // Preferences
+ module_t *falco_bridge_module = prefs_register_protocol(proto_falco_bridge, NULL);
+ prefs_register_bool_preference(falco_bridge_module, "show_internal_events",
+ "Show internal events",
+ "Show internal libsinsp events in the event list.",
+ &pref_show_internal);
+
+
+ /*
+ * Create the dissector table that we will use to route the dissection to
+ * the appropriate Falco plugin.
+ */
+ ptype_dissector_table = register_dissector_table("falcobridge.id",
+ "Falco Bridge Plugin ID", proto_falco_bridge, FT_UINT32, BASE_DEC);
+
+ /*
+ * Load the plugins
+ */
+ 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);
+
+ /*
+ * We scan the plugins directory twice. The first time we count how many
+ * plugins we have, which we need to know in order to allocate the right
+ * amount of memory. The second time we actually load and configure
+ * each plugin.
+ */
+ if ((dir = ws_dir_open(spdname, 0, NULL)) != NULL) {
+ while ((ws_dir_read_name(dir)) != NULL) {
+ nbridges++;
+ }
+ ws_dir_close(dir);
+ }
+
+ if ((dir = ws_dir_open(ppdname, 0, NULL)) != NULL) {
+ while ((ws_dir_read_name(dir)) != NULL) {
+ nbridges++;
+ }
+ ws_dir_close(dir);
+ }
+
+ sinsp_span = create_sinsp_span();
+
+ bridges = g_new0(bridge_info, nbridges + 1);
+
+ create_sinsp_syscall_source(sinsp_span, &bridges[0].ssi);
+
+ create_source_hfids(&bridges[0]);
+ nbridges = 1;
+
+ if ((dir = ws_dir_open(spdname, 0, NULL)) != NULL) {
+ while ((file = ws_dir_read_name(dir)) != NULL) {
+ filename = g_build_filename(spdname, ws_dir_get_name(file), NULL);
+ import_plugin(filename);
+ g_free(filename);
+ }
+ ws_dir_close(dir);
+ }
+
+ if ((dir = ws_dir_open(ppdname, 0, NULL)) != NULL) {
+ while ((file = ws_dir_read_name(dir)) != NULL) {
+ filename = g_build_filename(ppdname, ws_dir_get_name(file), NULL);
+ import_plugin(filename);
+ g_free(filename);
+ }
+ ws_dir_close(dir);
+ }
+
+ g_free(spdname);
+ g_free(ppdname);
+
+ /*
+ * Setup protocol subtree array
+ */
+ static int *ett[] = {
+ &ett_falco_bridge,
+ &ett_syscalls[SSC_EVENT],
+ &ett_syscalls[SSC_EVTARGS],
+ &ett_syscalls[SSC_PROCESS],
+ &ett_syscalls[SSC_PROCLINEAGE],
+ &ett_syscalls[SSC_USER],
+ &ett_syscalls[SSC_GROUP],
+ &ett_syscalls[SSC_FD],
+ &ett_syscalls[SSC_FS],
+ &ett_syscalls[SSC_FDLIST],
+ &ett_syscalls[SSC_OTHER],
+ &ett_sinsp_enriched,
+ &ett_sinsp_span,
+ &ett_address,
+ &ett_json,
+ };
+
+ /*
+ * Setup process lineage subtree array
+ */
+ static int *ett_lin[] = {
+ &ett_lineage[0],
+ &ett_lineage[1],
+ &ett_lineage[2],
+ &ett_lineage[3],
+ &ett_lineage[4],
+ &ett_lineage[5],
+ &ett_lineage[6],
+ &ett_lineage[7],
+ &ett_lineage[8],
+ &ett_lineage[9],
+ &ett_lineage[10],
+ &ett_lineage[11],
+ &ett_lineage[12],
+ &ett_lineage[13],
+ &ett_lineage[14],
+ &ett_lineage[15],
+ };
+
+ proto_register_field_array(proto_falco_bridge, hf, array_length(hf));
+ 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 eb2fc7e7..051469c9 100644
--- a/plugins/epan/falco_bridge/sinsp-span.cpp
+++ b/plugins/epan/falco_bridge/sinsp-span.cpp
@@ -11,18 +11,30 @@
*/
#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
#pragma warning(push)
#pragma warning(disable:4100)
#pragma warning(disable:4267)
#endif
+// To do:
+// [ ] Move chunkify_string to a thread? For captures with large command lines,
+// we spend a lot of time hashing strings.
+
+
// epan/address.h and driver/ppm_events_public.h both define PT_NONE, so
// handle libsinsp calls here.
@@ -32,41 +44,442 @@ 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<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;
const char *name;
const char *description;
char *last_error;
- const char *fields;
+ size_t evt_category_idx;
+ uint16_t cpu_id_idx;
+ uint16_t proc_id_idx;
} sinsp_source_info_t;
+static const size_t sfe_slab_prealloc = 250000;
+
typedef struct sinsp_span_t {
sinsp inspector;
+ sinsp_filter_check_list filter_checks;
+ sinsp_field_extract_t *sfe_slab;
+ size_t sfe_slab_offset;
+ // XXX Combine these into a single struct?
+ std::vector<sinsp_field_extract_t *> sfe_ptrs;
+ std::vector<uint16_t> sfe_lengths;
+ std::vector<const ppm_event_info*> sfe_infos;
+ // Interned data. Copied from maxmind_db.c.
+ wmem_map_t *str_chunk;
+ wmem_map_t *proc_info_chunk;
} sinsp_span_t;
+// #define SS_MEMORY_STATISTICS 1
+
+#ifdef SS_MEMORY_STATISTICS
+#include <wsutil/str_util.h>
+
+static int alloc_sfe;
+static int unused_sfe_bytes;
+static int total_chunked_strings;
+static int unique_chunked_strings;
+static int proc_info_hits;
+static int proc_info_updates;
+static int alloc_chunked_string_bytes;
+static int total_bytes;
+#endif
+
+static filter_check_info g_args_fci;
+static filter_check_info g_lineage_fci;
+
+// These sinsp fields are not interesting in a wireshark-like use case, so we skip them.
+std::set<std::string> g_fields_to_skip = {
+ "evt.num",
+ "evt.time",
+ "evt.time.s",
+ "evt.time.iso8601",
+ "evt.datetime",
+ "evt.datetime.s",
+ "evt.rawtime",
+ "evt.rawtime.s",
+ "evt.rawtime.ns",
+ "evt.reltime",
+ "evt.reltime.s",
+ "evt.reltime.ns",
+ "evt.deltatime",
+ "evt.deltatime.s",
+ "evt.deltatime.ns",
+ "syscall.type",
+ "evt.is_async",
+ "evt.is_syslog",
+ "evt.count",
+ "proc.exeline",
+ "proc.cmdnargs",
+ "proc.pexe",
+ "proc.pexepath",
+ "proc.pcmdline",
+ "proc.ppid",
+ "proc.aexe",
+ "proc.aexepath",
+ "proc.aname",
+ "proc.acmdline",
+ "proc.apid",
+ "proc.cmdlenargs",
+ "proc.ppid.duration",
+ "proc.ppid.ts",
+ "thread.exetime",
+ "thread.totexetime",
+ "thread.vmsize",
+ "thread.vmrss",
+ "fd.nameraw",
+ "fd.cproto",
+ "fd.sproto",
+ "fd.lproto",
+ "fd.rproto",
+};
+
sinsp_span_t *create_sinsp_span()
{
- return new(sinsp_span_t);
+ sinsp_span_t *span = new(sinsp_span_t);
+ span->inspector.set_internal_events_mode(true);
+ span->inspector.set_buffer_format(sinsp_evt::PF_EOLS_COMPACT);
+
+ return span;
}
void destroy_sinsp_span(sinsp_span_t *sinsp_span) {
delete(sinsp_span);
}
+static const char *chunkify_string(sinsp_span_t *sinsp_span, const uint8_t *key, uint32_t key_len, int64_t cpu_id, int64_t proc_id, uint16_t fc_idx) {
+ int64_t proc_key = 0;
+
+#ifdef SS_MEMORY_STATISTICS
+ total_chunked_strings++;
+#endif
+
+ // In order to avoid hashing the same potentially large strings over and over,
+ // we assume that field values will mostly be the same for each CPU,PID combo.
+ if (fc_idx) {
+ proc_key = (cpu_id << 48) | (proc_id << 16) | fc_idx;
+ char *proc_string = (char *) wmem_map_lookup(sinsp_span->proc_info_chunk, &proc_key);
+
+ if (proc_string && strcmp(proc_string, (const char *)key) == 0) {
+#ifdef SS_MEMORY_STATISTICS
+ proc_info_hits++;
+#endif
+ return proc_string;
+ }
+ }
+
+ char *chunk_string = (char *) wmem_map_lookup(sinsp_span->str_chunk, key);
+
+ if (!chunk_string) {
+ chunk_string = (char *) ws_utf8_make_valid(wmem_file_scope(), key, (ssize_t)key_len);
+ char *key_string = chunk_string;
+ if (strcmp((const char *) key, chunk_string)) {
+ key_string = (char *) wmem_memdup(wmem_file_scope(), key, key_len);
+ }
+ wmem_map_insert(sinsp_span->str_chunk, key_string, chunk_string);
+#ifdef SS_MEMORY_STATISTICS
+ unique_chunked_strings++;
+ alloc_chunked_string_bytes += (int) strlen(chunk_string);
+#endif
+ }
+
+ if (proc_key) {
+ wmem_map_insert(sinsp_span->proc_info_chunk, &proc_key, chunk_string);
+#ifdef SS_MEMORY_STATISTICS
+ proc_info_updates++;
+#endif
+ }
+
+ return chunk_string;
+}
+
+static sinsp_syscall_category_e filtercheck_name_to_category(const std::string fc_name) {
+ std::map<const char *, sinsp_syscall_category_e> fc_name_to_category = {
+ { "evt", SSC_EVENT },
+ { "args", SSC_EVTARGS },
+ { "process", SSC_PROCESS },
+ { "lineage", SSC_PROCLINEAGE},
+ { "user", SSC_USER },
+ { "group", SSC_GROUP },
+ { "container", SSC_CONTAINER },
+ { "fd", SSC_FD },
+ { "fs.path", SSC_FS },
+ // syslog collides with the dissector
+ { "fdlist", SSC_FDLIST },
+ };
+
+ for (const auto ptc : fc_name_to_category) {
+ if (ptc.first == fc_name) {
+ return ptc.second;
+ }
+ }
+ return SSC_OTHER;
+}
+
+/*
+ * This is the list of "fake" fields that we create for the Falco event arguments.
+ */
+const filtercheck_field_info args_event_fields[] =
+{
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.0", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.1", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.2", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.3", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.4", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.5", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.6", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.7", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.8", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.9", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.10", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.11", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.12", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.13", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.14", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.15", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.16", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.17", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.18", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.19", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.20", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.21", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.22", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.23", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.24", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.25", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.26", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.27", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.28", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.29", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.30", "Argument", "Event argument."},
+ {PT_CHARBUF, EPF_NONE, PF_NA, "evt.arg.31", "Argument", "Event argument."},
+};
+
+#define CREATE_FIELD_INFO(index) \
+ {PT_CHARBUF, EPF_NONE, PF_NA, "proc.aname." #index, "Name", "The proc.name..."}, \
+ {PT_CHARBUF, EPF_NONE, PF_NA, "proc.aexepath." #index, "Executable Path", "The proc.exepath..."}, \
+ {PT_INT64, EPF_NONE, PF_ID, "proc.apid." #index, "Process ID", "The pid..."}, \
+ {PT_CHARBUF, EPF_NONE, PF_NA, "proc.acmdline." #index, "Command Line", "The full command line..."}
+
+/*
+ * This is the list of "fake" fields that we create for process lineage.
+ * We construct the array using a macro to limit verboseness.
+ */
+const filtercheck_field_info proc_lineage_event_fields[] = {
+ CREATE_FIELD_INFO(1),
+ CREATE_FIELD_INFO(2),
+ CREATE_FIELD_INFO(3),
+ CREATE_FIELD_INFO(4),
+ CREATE_FIELD_INFO(5),
+ CREATE_FIELD_INFO(6),
+ CREATE_FIELD_INFO(7),
+ CREATE_FIELD_INFO(8),
+ CREATE_FIELD_INFO(9),
+ CREATE_FIELD_INFO(10),
+ CREATE_FIELD_INFO(11),
+ CREATE_FIELD_INFO(12),
+ CREATE_FIELD_INFO(13),
+ CREATE_FIELD_INFO(14),
+ CREATE_FIELD_INFO(15),
+ CREATE_FIELD_INFO(16),
+};
+
+void add_arg_event(uint32_t arg_number,
+ sinsp_span_t *sinsp_span,
+ sinsp_source_info_t *ssi,
+ sinsp_syscall_category_e args_syscall_category) {
+
+ 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];
+ 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");
+ }
+ 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(std::move(sfc));
+ ssi->syscall_filter_fields.push_back(ffi);
+}
+
+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);
+
+ g_args_fci = *fci;
+
+ for (uint32_t i = 0; i < 32; i++) {
+ add_arg_event(i, sinsp_span, ssi, args_syscall_category);
+ }
+ ssi->syscall_filter_checks.push_back(&g_args_fci);
+}
+
+void add_lineage_field(std::string basefname,
+ uint32_t ancestor_number,
+ uint32_t field_number,
+ sinsp_filter_factory* filter_factory,
+ sinsp_source_info_t *ssi,
+ 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];
+ 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");
+ }
+
+ 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(std::move(sfc));
+ ssi->syscall_filter_fields.push_back(ffi);
+}
+
+void add_lineage_events(uint32_t ancestor_number,
+ sinsp_filter_factory* filter_factory,
+ sinsp_source_info_t *ssi,
+ sinsp_syscall_category_e args_syscall_category) {
+
+ if (ancestor_number >= array_length(proc_lineage_event_fields) / N_PROC_LINEAGE_ENTRY_FIELDS) {
+ ws_error("falco lineage mismatch (%" PRIu32 ")", ancestor_number);
+ }
+
+ add_lineage_field("proc.aname", ancestor_number, 0, filter_factory, ssi, args_syscall_category);
+ add_lineage_field("proc.acmdline", ancestor_number, 3, filter_factory, ssi, args_syscall_category);
+ add_lineage_field("proc.aexepath", ancestor_number, 1, filter_factory, ssi, args_syscall_category);
+ add_lineage_field("proc.apid", ancestor_number, 2, filter_factory, ssi, args_syscall_category);
+}
+
+void create_lineage_source(sinsp_source_info_t *ssi,
+ sinsp_filter_factory* filter_factory,
+ const filter_check_info* fci) {
+ g_lineage_fci.m_name = "lineage";
+ sinsp_syscall_category_e args_syscall_category = filtercheck_name_to_category(g_lineage_fci.m_name);
+
+ g_lineage_fci = *fci;
+
+ for (uint32_t i = 1; i < N_PROC_LINEAGE_ENTRIES; i++) {
+ add_lineage_events(i, filter_factory, ssi, args_syscall_category);
+ }
+ ssi->syscall_filter_checks.push_back(&g_lineage_fci);
+}
+
+// Not all of the fields in sinsp have been designed with a Wireshark-like use case in mind.
+// This functions determines which fields we should skip.
+bool skip_field(const filtercheck_field_info *ffi) {
+ if (g_fields_to_skip.find(ffi->m_name) != g_fields_to_skip.end()) {
+ return true;
+ }
+ return false;
+}
+
+/*
+ * 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) {
+ // Move "fd" after "proc"
+ all_syscall_fields->insert(all_syscall_fields->begin() + 3, all_syscall_fields->at(6));
+ all_syscall_fields->erase(all_syscall_fields->begin() + 7);
+
+ // Move "container" after "fd"
+ all_syscall_fields->insert(all_syscall_fields->begin() + 4, all_syscall_fields->at(6));
+ all_syscall_fields->erase(all_syscall_fields->begin() + 7);
+}
+
+/*
+ * Populate a sinsp_source_info_t struct with the symbols coming from libsinsp's builtin syscall extractors
+ */
+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();
+
+ sinsp_filter_factory filter_factory(&sinsp_span->inspector, sinsp_span->filter_checks);
+ std::vector<const filter_check_info*> all_syscall_fields;
+
+ // Extract the fields defined in filterchecks.{cpp,h}
+ sinsp_span->filter_checks.get_all_fields(all_syscall_fields);
+ // Reorder the list of extractor the way we want them to appear in the UI.
+ reorder_syscall_fields(&all_syscall_fields);
+ for (const auto fci : all_syscall_fields) {
+ if (fci->m_flags == filter_check_info::FL_HIDDEN) {
+ continue;
+ }
+
+ if (fci->m_name == "process") {
+ // 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(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.
+ create_lineage_source(ssi, &filter_factory, fci);
+ }
+
+ sinsp_syscall_category_e syscall_category = filtercheck_name_to_category(fci->m_name);
+
+ for (int i = 0; i < fci->m_nfields; i++) {
+ const filtercheck_field_info *ffi = &fci->m_fields[i];
+ if (ffi->m_flags == filtercheck_field_flags::EPF_NONE) {
+ // This is where we exclude fields that are not interesting in a wireshark-like use case.
+ if (skip_field(ffi)) {
+ continue;
+ }
+
+ 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) {
+ ssi->evt_category_idx = ssi->syscall_filter_fields.size();
+ }
+ if (strcmp(ffi->m_name, "evt.cpu") == 0) {
+ ssi->cpu_id_idx = (uint16_t) ssi->syscall_filter_fields.size();
+ }
+ if (strcmp(ffi->m_name, "proc.pid") == 0) {
+ ssi->proc_id_idx = (uint16_t) ssi->syscall_filter_fields.size();
+ }
+ sfc->parse_field_name(ffi->m_name, true, false);
+ ssi->field_to_category.push_back(syscall_category);
+ ssi->syscall_event_filter_checks.push_back(std::move(sfc));
+ ssi->syscall_filter_fields.push_back(ffi);
+ }
+ }
+
+ ssi->syscall_filter_checks.push_back(fci);
+ }
+
+ 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 = g_strdup(sinsp_syscall_event_source_name);
+ ssi->description = g_strdup(sinsp_syscall_event_source_name);
+ *ssi_ptr = ssi;
+ return;
+}
+
/*
- * Populate a source_plugin_info struct with the symbols coming from a library loaded via libsinsp
+ * Populate a sinsp_source_info_t struct with the symbols coming from a library loaded via libsinsp
*/
char *
-create_sinsp_source(sinsp_span_t *sinsp_span, const char* libname, sinsp_source_info_t **ssi_ptr)
+create_sinsp_plugin_source(sinsp_span_t *sinsp_span, const char* libname, sinsp_source_info_t **ssi_ptr)
{
- char *err_str = NULL;
sinsp_source_info_t *ssi = new sinsp_source_info_t();
+ char *err_str = NULL;
try {
auto sp = sinsp_span->inspector.register_plugin(libname);
if (sp->caps() & CAP_EXTRACTION) {
@@ -84,7 +497,6 @@ create_sinsp_source(sinsp_span_t *sinsp_span, const char* libname, sinsp_source_
err_str = g_strdup_printf("Unable to initialize %s: %s", libname, init_err.c_str());
}
}
-
if (err_str) {
delete ssi;
return err_str;
@@ -93,23 +505,28 @@ create_sinsp_source(sinsp_span_t *sinsp_span, const char* libname, sinsp_source_
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;
}
uint32_t get_sinsp_source_id(sinsp_source_info_t *ssi)
{
- return ssi->source->id();
+ if (ssi->source) {
+ return ssi->source->id();
+ }
+ return 0;
}
const char *get_sinsp_source_last_error(sinsp_source_info_t *ssi)
{
- if (ssi->last_error) {
- free(ssi->last_error);
+ if (ssi->source) {
+ if (ssi->last_error) {
+ g_free(ssi->last_error);
+ }
+ ssi->last_error = g_strdup(ssi->source->get_last_error().c_str());
}
- ssi->last_error = strdup(ssi->source->get_last_error().c_str());
return ssi->last_error;
}
@@ -125,30 +542,101 @@ const char *get_sinsp_source_description(sinsp_source_info_t *ssi)
size_t get_sinsp_source_nfields(sinsp_source_info_t *ssi)
{
- return ssi->source->fields().size();
+ if (ssi->source) {
+ return ssi->source->fields().size();
+ }
+
+ return ssi->syscall_filter_fields.size();
}
bool get_sinsp_source_field_info(sinsp_source_info_t *ssi, size_t field_num, sinsp_field_info_t *field)
{
- if (field_num >= ssi->source->fields().size()) {
+ if (field_num >= get_sinsp_source_nfields(ssi)) {
return false;
}
- const filtercheck_field_info *ffi = &ssi->source->fields()[field_num];
+ const filtercheck_field_info *ffi = NULL;
+
+ if (ssi->source) {
+ ffi = &ssi->source->fields()[field_num];
+ g_strlcpy(field->abbrev, ffi->m_name, sizeof(field->abbrev));
+ } else {
+ ffi = ssi->syscall_filter_fields[field_num];
+ if (ssi->field_to_category[field_num] == SSC_OTHER) {
+ snprintf(field->abbrev, sizeof(field->abbrev), FALCO_FIELD_NAME_PREFIX "%s", ffi->m_name);
+ } else {
+ g_strlcpy(field->abbrev, ffi->m_name, sizeof(field->abbrev));
+ }
+ }
+
+ g_strlcpy(field->display, ffi->m_display, sizeof(field->display));
+ g_strlcpy(field->description, ffi->m_description, sizeof(field->description));
+
+ field->is_hidden = ffi->m_flags & EPF_TABLE_ONLY;
+ field->is_conversation = ffi->m_flags & EPF_CONVERSATION;
+ field->is_info = ffi->m_flags & EPF_INFO;
+
+ field->is_numeric_address = false;
switch (ffi->m_type) {
- case PT_CHARBUF:
- field->type = SFT_STRINGZ;
+ case PT_INT8:
+ field->type = FT_INT8;
+ break;
+ case PT_INT16:
+ field->type = FT_INT16;
+ break;
+ case PT_INT32:
+ field->type = FT_INT32;
+ break;
+ case PT_INT64:
+ field->type = FT_INT64;
+ break;
+ case PT_UINT8:
+ field->type = FT_UINT8;
+ break;
+ case PT_UINT16:
+ case PT_PORT:
+ field->type = FT_UINT16;
+ break;
+ case PT_UINT32:
+ field->type = FT_UINT32;
break;
case PT_UINT64:
- field->type = SFT_UINT64;
+ case PT_RELTIME:
+ case PT_ABSTIME:
+ field->type = FT_UINT64;
+ break;
+ case PT_CHARBUF:
+ field->type = FT_STRINGZ;
+ break;
+// field->type = FT_RELATIVE_TIME;
+// break;
+// field->type = FT_ABSOLUTE_TIME;
+// field->type = FT_UINT64;
+// field->display_format = SFDF_DECIMAL;
+ break;
+ case PT_BYTEBUF:
+ field->type = FT_BYTES;
+ break;
+ case PT_BOOL:
+ field->type = FT_BOOLEAN;
+ break;
+ case PT_DOUBLE:
+ field->type = FT_DOUBLE;
+ break;
+ case PT_IPADDR:
+ field->type = FT_BYTES;
+ field->is_numeric_address = true;
break;
default:
- field->type = SFT_UNKNOWN;
+ ws_debug("Unknown Falco parameter type %d for %s", ffi->m_type, field->abbrev);
+ field->type = FT_BYTES;
}
switch (ffi->m_print_format) {
case PF_DEC:
+ case PF_10_PADDED_DEC:
+ case PF_ID:
field->display_format = SFDF_DECIMAL;
break;
case PF_HEX:
@@ -159,31 +647,317 @@ bool get_sinsp_source_field_info(sinsp_source_info_t *ssi, size_t field_num, sin
break;
default:
field->display_format = SFDF_UNKNOWN;
+ break;
}
- g_strlcpy(field->abbrev, ffi->m_name, sizeof(ffi->m_name));
- g_strlcpy(field->display, ffi->m_display, sizeof(ffi->m_display));
- g_strlcpy(field->description, ffi->m_description, sizeof(ffi->m_description));
+ return true;
+}
- field->is_hidden = ffi->m_flags & EPF_TABLE_ONLY;
- field->is_info = ffi->m_flags & EPF_INFO;
- field->is_conversation = ffi->m_flags & EPF_CONVERSATION;
+char* get_evt_arg_name(void* sinp_evt_info, uint32_t arg_num) {
+ ppm_event_info* realinfo = (ppm_event_info*)sinp_evt_info;
+
+ if (arg_num > realinfo->nparams) {
+ ws_error("Arg number %u exceeds event parameter count %u", arg_num, realinfo->nparams);
+ return NULL;
+ }
+ 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;
+ sinsp_span->sfe_slab_offset = 0;
+ sinsp_span->sfe_ptrs.clear();
+ sinsp_span->sfe_lengths.clear();
+ sinsp_span->sfe_infos.clear();
+ sinsp_span->inspector.open_savefile(filepath);
+ sinsp_span->str_chunk = wmem_map_new(wmem_file_scope(), g_str_hash, g_str_equal);
+ sinsp_span->proc_info_chunk = wmem_map_new(wmem_file_scope(), g_int64_hash, g_int64_equal);
+
+#ifdef SS_MEMORY_STATISTICS
+ alloc_sfe = 0;
+ unused_sfe_bytes = 0;
+ total_chunked_strings = 0;
+ unique_chunked_strings = 0;
+ proc_info_hits = 0;
+ proc_info_updates = 0;
+ alloc_chunked_string_bytes = 0;
+ total_bytes = 0;
+#endif
+}
+
+static void add_syscall_event_to_cache(sinsp_span_t *sinsp_span, sinsp_source_info_t *ssi, sinsp_evt *evt)
+{
+ uint64_t evt_num = evt->get_num();
+
+ // 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.
+ //
+ // XXX This assumes that we won't extract more than ssi->syscall_event_filter_checks.size()
+ // fields per event.
+ if (sinsp_span->sfe_slab_offset + ssi->syscall_event_filter_checks.size() > sfe_slab_prealloc) {
+#ifdef SS_MEMORY_STATISTICS
+ if (sinsp_span->sfe_slab_offset > 0) {
+ unused_sfe_bytes += sizeof(sinsp_field_extract_t) * (sfe_slab_prealloc - sinsp_span->sfe_slab_offset);
+ }
+#endif
+ sinsp_span->sfe_slab = NULL;
+ sinsp_span->sfe_slab_offset = 0;
+ }
+ if (sinsp_span->sfe_slab == NULL) {
+#ifdef SS_MEMORY_STATISTICS
+ alloc_sfe += sfe_slab_prealloc;
+#endif
+ sinsp_span->sfe_slab = (sinsp_field_extract_t *) wmem_alloc(wmem_file_scope(), sizeof(sinsp_field_extract_t) * sfe_slab_prealloc);
+ }
+
+ sinsp_field_extract_t *sfe_block = &sinsp_span->sfe_slab[sinsp_span->sfe_slab_offset];
+ std::vector<extract_value_t> values;
+ uint16_t sfe_idx = 0;
+ int16_t cpu_id = 0;
+ int64_t proc_id = 0;
+
+ // First check for internal events.
+ // XXX We should skip this if "Show internal events" is enabled.
+ 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) {
+ return;
+ }
+
+ for (size_t fc_idx = 0; fc_idx < ssi->syscall_event_filter_checks.size(); fc_idx++) {
+ sfc = ssi->syscall_event_filter_checks[fc_idx].get();
+ values.clear();
+ if (!sfc->extract(evt, values, false) || values.size() < 1) {
+ continue;
+ }
+ auto ffi = ssi->syscall_filter_fields[fc_idx];
+ if (ffi->m_flags == filtercheck_field_flags::EPF_NONE && values[0].len > 0) {
+ if (sinsp_span->sfe_slab_offset + sfe_idx >= sfe_slab_prealloc) {
+ ws_error("Extracting too many fields for event %u (%d vs %d)", (unsigned) evt->get_num(), (int) sfe_idx, (int) ssi->syscall_event_filter_checks.size());
+ }
+
+ sinsp_field_extract_t *sfe = &sfe_block[sfe_idx];
+ sfe_idx++;
+ sfe->field_idx = (uint32_t) fc_idx;
+ // XXX Use memcpy instead of all this casting?
+ switch (ffi->m_type) {
+ case PT_INT8:
+ sfe->res.i32 = *(int8_t*)values[0].ptr;
+ break;
+ case PT_INT16:
+ sfe->res.i32 = *(int16_t*)values[0].ptr;
+ if (fc_idx == ssi->cpu_id_idx) {
+ cpu_id = *(int16_t*)values[0].ptr;
+ }
+ break;
+ case PT_INT32:
+ sfe->res.i32 = *(int32_t*)values[0].ptr;
+ break;
+ case PT_INT64:
+ sfe->res.i64 = *(int64_t *)values[0].ptr;
+ if (fc_idx == ssi->proc_id_idx) {
+ proc_id = *(int64_t*)values[0].ptr;
+ }
+ break;
+ case PT_UINT8:
+ sfe->res.u32 = *(uint8_t*)values[0].ptr;
+ break;
+ case PT_UINT16:
+ case PT_PORT:
+ sfe->res.u32 = *(uint16_t*)values[0].ptr;
+ break;
+ case PT_UINT32:
+ sfe->res.u32 = *(uint32_t*)values[0].ptr;
+ break;
+ case PT_UINT64:
+ case PT_RELTIME:
+ case PT_ABSTIME:
+ 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);
+ } else {
+ sfe->res.str = chunkify_string(sinsp_span, values[0].ptr, values[0].len, cpu_id, proc_id, fc_idx);
+ }
+ break;
+ case PT_BOOL:
+ sfe->res.boolean = (bool)(uint32_t) *(uint32_t*)values[0].ptr;
+ break;
+ case PT_DOUBLE:
+ sfe->res.dbl = *(double*)values[0].ptr;
+ break;
+ default:
+ sfe->res.bytes = (uint8_t*) wmem_memdup(wmem_file_scope(), (const uint8_t *) values[0].ptr, values[0].len);
+#ifdef SS_MEMORY_STATISTICS
+ total_bytes += values[0].len;
+#endif
+ }
+
+ sfe->res_len = values[0].len;
+ }
+ }
+
+ sinsp_span->sfe_slab_offset += sfe_idx;
+
+ 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;
+}
+
+void close_sinsp_capture(sinsp_span_t *sinsp_span)
+{
+#ifdef SS_MEMORY_STATISTICS
+ unused_sfe_bytes += sizeof(sinsp_field_extract_t) * sfe_slab_prealloc - sinsp_span->sfe_slab_offset;
+
+ g_warning("Allocated sinsp_field_extract_t structs: %s (%s)",
+ format_size(alloc_sfe, FORMAT_SIZE_UNIT_NONE, FORMAT_SIZE_PREFIX_SI),
+ format_size(alloc_sfe * sizeof(sinsp_field_extract_t), FORMAT_SIZE_UNIT_BYTES, FORMAT_SIZE_PREFIX_SI));
+ g_warning("Unused sinsp_field_extract_t bytes: %s", format_size(unused_sfe_bytes, FORMAT_SIZE_UNIT_BYTES, FORMAT_SIZE_PREFIX_SI));
+ g_warning("Chunked strings: %s (%s unique, %s)",
+ format_size(total_chunked_strings, FORMAT_SIZE_UNIT_NONE, FORMAT_SIZE_PREFIX_SI),
+ format_size(unique_chunked_strings, FORMAT_SIZE_UNIT_NONE, FORMAT_SIZE_PREFIX_SI),
+ format_size(alloc_chunked_string_bytes, FORMAT_SIZE_UNIT_BYTES, FORMAT_SIZE_PREFIX_SI));
+ g_warning("Process info string hits: %s, %s updates",
+ format_size(proc_info_hits, FORMAT_SIZE_UNIT_NONE, FORMAT_SIZE_PREFIX_SI),
+ format_size(proc_info_updates, FORMAT_SIZE_UNIT_NONE, FORMAT_SIZE_PREFIX_SI));
+ g_warning("Byte value (I/O) bytes: %s", format_size(total_bytes, FORMAT_SIZE_UNIT_BYTES, FORMAT_SIZE_PREFIX_SI));
+ g_warning("Cache capacity: %s items, sinsp_field_extract_t pointer bytes = %s, length bytes = %s",
+ format_size(sinsp_span->sfe_ptrs.capacity(), FORMAT_SIZE_UNIT_BYTES, FORMAT_SIZE_PREFIX_SI),
+ format_size(sinsp_span->sfe_ptrs.capacity() * sizeof(sinsp_field_extract_t *), FORMAT_SIZE_UNIT_BYTES, FORMAT_SIZE_PREFIX_SI),
+ format_size(sinsp_span->sfe_ptrs.capacity() * sizeof(uint16_t), FORMAT_SIZE_UNIT_BYTES, FORMAT_SIZE_PREFIX_SI));
+
+ alloc_sfe = 0;
+ unused_sfe_bytes = 0;
+ total_chunked_strings = 0;
+ unique_chunked_strings = 0;
+ proc_info_hits = 0;
+ proc_info_updates = 0;
+ alloc_chunked_string_bytes = 0;
+ total_bytes = 0;
+#endif
+
+ sinsp_span->inspector.close();
+ sinsp_span->sfe_ptrs.clear();
+ sinsp_span->sfe_lengths.clear();
+ sinsp_span->sfe_infos.clear();
+ sinsp_span->str_chunk = NULL;
+ sinsp_span->proc_info_chunk = NULL;
+}
+
+sinsp_syscall_category_e get_syscall_parent_category(sinsp_source_info_t *ssi, size_t field_check_idx)
+{
+ if (field_check_idx < ssi->field_to_category.size()) {
+ return ssi->field_to_category[field_check_idx];
+ }
+ return SSC_OTHER;
+}
+
+// Either have separate cached / non-cached params or pass a pointer to a pointer array.
+bool extract_syscall_source_fields(sinsp_span_t *sinsp_span, sinsp_source_info_t *ssi, uint32_t frame_num, sinsp_field_extract_t **sinsp_fields, uint32_t *sinsp_field_len, void** sinp_evt_info) {
+ if (ssi->source) {
+ return false;
+ }
+
+ while (frame_num > sinsp_span->sfe_ptrs.size()) {
+ sinsp_evt *evt = NULL;
+ try {
+ int32_t res = sinsp_span->inspector.next(&evt);
+ switch (res) {
+ 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 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);
+ break;
+ default:
+ ws_warning("%s", sinsp_span->inspector.getlasterr().c_str());
+ return false;
+ }
+ } catch (sinsp_exception &e) {
+ ws_warning("%s", e.what());
+ return false;
+ }
+ }
+
+ // Shouldn't happen
+ if (frame_num > sinsp_span->sfe_ptrs.size()) {
+ ws_error("Frame number %u exceeds cache size %d", frame_num, (int) sinsp_span->sfe_ptrs.size());
+ return false;
+ }
+
+ *sinsp_fields = sinsp_span->sfe_ptrs[frame_num - 1];
+ *sinsp_field_len = sinsp_span->sfe_lengths[frame_num - 1];
+ *sinp_evt_info = (void*)sinsp_span->sfe_infos[frame_num - 1];
+
+ return true;
+}
+
+bool get_extracted_syscall_source_fields(sinsp_span_t *sinsp_span, uint32_t frame_num, sinsp_field_extract_t **sinsp_fields, uint32_t *sinsp_field_len, void** sinp_evt_info) {
+ // Shouldn't happen
+ if (frame_num > sinsp_span->sfe_ptrs.size()) {
+ ws_error("Frame number %u exceeds cache size %d", frame_num, (int) sinsp_span->sfe_ptrs.size());
+ return false;
+ }
+
+ *sinsp_fields = sinsp_span->sfe_ptrs[frame_num - 1];
+ *sinsp_field_len = sinsp_span->sfe_lengths[frame_num - 1];
+ *sinp_evt_info = (void*)sinsp_span->sfe_infos[frame_num - 1];
return true;
}
// The code below, falcosecurity/libs, and falcosecurity/plugins need to be in alignment.
// The Makefile in /plugins defines FALCOSECURITY_LIBS_REVISION and uses that version of
// plugin_info.h. We need to build against a compatible revision of /libs.
-bool extract_sisnp_source_fields(sinsp_source_info_t *ssi, uint8_t *evt_data, uint32_t evt_datalen, wmem_allocator_t *pool, sinsp_field_extract_t *sinsp_fields, uint32_t sinsp_field_len)
+bool extract_plugin_source_fields(sinsp_source_info_t *ssi, uint32_t event_num, uint8_t *evt_data, uint32_t evt_datalen, wmem_allocator_t *pool, plugin_field_extract_t *sinsp_fields, uint32_t sinsp_field_len)
{
+ if (!ssi->source) {
+ return false;
+ }
+
std::vector<ss_plugin_extract_field> fields;
// PPME_PLUGINEVENT_E events have the following format:
// | scap_evt header | uint32_t sizeof(id) = 4 | uint32_t evt_datalen | uint32_t id | uint8_t[] evt_data |
uint32_t payload_hdr[3] = {4, evt_datalen, ssi->source->id()};
- uint32_t tot_evt_len = (uint32_t)sizeof(scap_evt) + sizeof(payload_hdr) + evt_datalen;
+// uint32_t payload_hdr_size = (nparams + 1) * 4;
+ uint32_t tot_evt_len = (uint32_t)sizeof(scap_evt) + sizeof(payload_hdr) + evt_datalen;
if (ssi->evt_storage_size < tot_evt_len) {
while (ssi->evt_storage_size < tot_evt_len) {
ssi->evt_storage_size *= 2;
@@ -196,18 +970,19 @@ bool extract_sisnp_source_fields(sinsp_source_info_t *ssi, uint8_t *evt_data, ui
sevt->tid = -1;
sevt->len = tot_evt_len;
sevt->type = PPME_PLUGINEVENT_E;
- sevt->nparams = 2; // Plugin ID + evt_data
+ sevt->nparams = 2; // Plugin ID + evt_data;
memcpy(ssi->evt_storage + sizeof(scap_evt), payload_hdr, sizeof(payload_hdr));
memcpy(ssi->evt_storage + sizeof(scap_evt) + sizeof(payload_hdr), evt_data, evt_datalen);
ssi->evt->init(ssi->evt_storage, 0);
+ ssi->evt->set_num(event_num);
fields.resize(sinsp_field_len);
// We must supply field_id, field, arg, and type.
for (size_t i = 0; i < sinsp_field_len; i++) {
fields.at(i).field_id = sinsp_fields[i].field_id;
fields.at(i).field = sinsp_fields[i].field_name;
- if (sinsp_fields[i].type == SFT_STRINGZ) {
+ if (sinsp_fields[i].type == FT_STRINGZ) {
fields.at(i).ftype = FTYPE_STRING;
} else {
fields.at(i).ftype = FTYPE_UINT64;
@@ -223,9 +998,9 @@ bool extract_sisnp_source_fields(sinsp_source_info_t *ssi, uint8_t *evt_data, ui
sinsp_fields[i].is_present = fields.at(i).res_len > 0;
if (sinsp_fields[i].is_present) {
if (fields.at(i).ftype == PT_CHARBUF) {
- sinsp_fields[i].res_str = wmem_strdup(pool, *fields.at(i).res.str);
+ sinsp_fields[i].res.str = wmem_strdup(pool, *fields.at(i).res.str);
} else if (fields.at(i).ftype == PT_UINT64) {
- sinsp_fields[i].res_u64 = *fields.at(i).res.u64;
+ sinsp_fields[i].res.u64 = *fields.at(i).res.u64;
} else {
status = false;
}
diff --git a/plugins/epan/falco_bridge/sinsp-span.h b/plugins/epan/falco_bridge/sinsp-span.h
index 2a474714..84303340 100644
--- a/plugins/epan/falco_bridge/sinsp-span.h
+++ b/plugins/epan/falco_bridge/sinsp-span.h
@@ -15,21 +15,21 @@
#include <stdint.h>
+#include <epan/ftypes/ftypes.h>
#include <wsutil/wmem/wmem.h>
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
+#define FALCO_FIELD_NAME_PREFIX "falco."
+
+#define N_PROC_LINEAGE_ENTRIES 16
+#define N_PROC_LINEAGE_ENTRY_FIELDS 4
+
typedef struct sinsp_source_info_t sinsp_source_info_t;
typedef struct sinsp_span_t sinsp_span_t;
-typedef enum sinsp_field_type_e {
- SFT_UNKNOWN,
- SFT_STRINGZ,
- SFT_UINT64,
-} sinsp_field_type_e;
-
typedef enum sinsp_field_display_format_e {
SFDF_UNKNOWN,
SFDF_DECIMAL,
@@ -37,8 +37,26 @@ typedef enum sinsp_field_display_format_e {
SFDF_OCTAL
} sinsp_field_display_format_e;
+// Should match sinsp_filter_check_list in libsinsp as closely as possible.
+
+typedef enum sinsp_syscall_category_e {
+ SSC_EVENT, // gen_event, event
+ SSC_EVTARGS, // event arguments
+ SSC_PROCESS, // thread
+ SSC_PROCLINEAGE, // process lineage
+ SSC_USER, // user
+ SSC_GROUP, // group
+ SSC_CONTAINER, // container
+ SSC_FD, // fd
+ SSC_FS, // fs.path
+// SSC_SYSLOG, // syslog. Collides with syslog dissector so skip for now.
+ SSC_FDLIST, // fdlist
+ SSC_OTHER, // "falco.", catch-all
+ NUM_SINSP_SYSCALL_CATEGORIES
+} sinsp_syscall_category_e;
+
typedef struct sinsp_field_info_t {
- sinsp_field_type_e type;
+ enum ftenum type;
sinsp_field_display_format_e display_format;
char abbrev[64]; // filter name
char display[64]; // display name
@@ -46,31 +64,72 @@ typedef struct sinsp_field_info_t {
bool is_hidden;
bool is_conversation;
bool is_info;
+ bool is_numeric_address;
} sinsp_field_info_t;
+#define SFE_SMALL_BUF_SIZE 8
typedef struct sinsp_field_extract_t {
- uint32_t field_id; // in
+ union {
+ uint8_t *bytes;
+ const char *str;
+ int32_t i32;
+ int64_t i64;
+ uint32_t u32;
+ uint64_t u64;
+ double dbl;
+ bool boolean;
+ char small_str[SFE_SMALL_BUF_SIZE];
+ uint8_t small_bytes[SFE_SMALL_BUF_SIZE];
+ } res;
+ int res_len; // out
+ uint16_t field_idx; // out for syscalls
+} sinsp_field_extract_t;
+
+typedef struct plugin_field_extract_t {
+ uint32_t field_id; // out for syscalls, in for plugins
const char *field_name; // in
- sinsp_field_type_e type; // in, out
+ enum ftenum type; // in, out
bool is_present; // out
- const char *res_str; // out
- uint64_t res_u64; // out
-} sinsp_field_extract_t;
+ union {
+ uint8_t *bytes;
+ const char *str;
+ int32_t i32;
+ int64_t i64;
+ uint32_t u32;
+ uint64_t u64;
+ double dbl;
+ uint8_t ipv6[16];
+ bool boolean;
+ } res;
+ int res_len; // out
+// sinsp_syscall_category_e parent_category; // out
+} plugin_field_extract_t;
sinsp_span_t *create_sinsp_span(void);
void destroy_sinsp_span(sinsp_span_t *sinsp_span);
-char *create_sinsp_source(sinsp_span_t *sinsp_span, const char* libname, sinsp_source_info_t **ssi_ptr);
-
-// Extractor plugin routines.
-// These roughly match common_plugin_info
+// Common routines
uint32_t get_sinsp_source_id(sinsp_source_info_t *ssi);
const char *get_sinsp_source_last_error(sinsp_source_info_t *ssi);
const char *get_sinsp_source_name(sinsp_source_info_t *ssi);
const char* get_sinsp_source_description(sinsp_source_info_t *ssi);
-size_t get_sinsp_source_nfields(sinsp_source_info_t *ssi);
bool get_sinsp_source_field_info(sinsp_source_info_t *ssi, size_t field_num, sinsp_field_info_t *field);
-bool extract_sisnp_source_fields(sinsp_source_info_t *ssi, uint8_t *evt_data, uint32_t evt_datalen, wmem_allocator_t *pool, sinsp_field_extract_t *sinsp_fields, uint32_t sinsp_field_len);
+char* get_evt_arg_name(void* sinp_evt_info, uint32_t arg_num);
+
+// libsinsp builtin syscall routines.
+void create_sinsp_syscall_source(sinsp_span_t *sinsp_span, sinsp_source_info_t **ssi_ptr);
+void open_sinsp_capture(sinsp_span_t *sinsp_span, const char *filepath);
+//uint32_t process_syscall_capture(sinsp_span_t * sinsp_span, sinsp_source_info_t *ssi, uint32_t to_event);
+void close_sinsp_capture(sinsp_span_t *sinsp_span);
+bool extract_syscall_source_fields(sinsp_span_t *sinsp_span, sinsp_source_info_t *ssi, uint32_t frame_num, sinsp_field_extract_t **sinsp_fields, uint32_t *sinsp_field_len, void** sinp_evt_info);
+sinsp_syscall_category_e get_syscall_parent_category(sinsp_source_info_t *ssi, size_t field_check_idx);
+bool get_extracted_syscall_source_fields(sinsp_span_t *sinsp_span, uint32_t frame_num, sinsp_field_extract_t **sinsp_fields, uint32_t *sinsp_field_len, void** sinp_evt_info);
+
+// Extractor plugin routines.
+// These roughly match common_plugin_info
+char *create_sinsp_plugin_source(sinsp_span_t *sinsp_span, const char* libname, sinsp_source_info_t **ssi_ptr);
+size_t get_sinsp_source_nfields(sinsp_source_info_t *ssi);
+bool extract_plugin_source_fields(sinsp_source_info_t *ssi, uint32_t event_num, uint8_t *evt_data, uint32_t evt_datalen, wmem_allocator_t *pool, plugin_field_extract_t *sinsp_fields, uint32_t sinsp_field_len);
#ifdef __cplusplus
diff --git a/plugins/epan/gryphon/packet-gryphon.c b/plugins/epan/gryphon/packet-gryphon.c
index 08da00fd..f6d69a43 100644
--- a/plugins/epan/gryphon/packet-gryphon.c
+++ b/plugins/epan/gryphon/packet-gryphon.c
@@ -42,347 +42,347 @@ static dissector_handle_t gryphon_handle;
#define GRYPHON_TCP_PORT 7000 /* Not IANA registed */
-static int proto_gryphon = -1;
-
-static int hf_gryphon_src = -1;
-static int hf_gryphon_srcchan = -1;
-static int hf_gryphon_srcchanclient = -1;
-static int hf_gryphon_dest = -1;
-static int hf_gryphon_destchan = -1;
-static int hf_gryphon_destchanclient = -1;
-static int hf_gryphon_type = -1;
-static int hf_gryphon_cmd = -1;
-static int hf_gryphon_cmd_context = -1;
-static int hf_gryphon_cmd_ioctl_context = -1;
-static int hf_gryphon_data = -1;
-static int hf_gryphon_data_length = -1;
-static int hf_gryphon_reserved = -1;
-static int hf_gryphon_padding = -1;
-static int hf_gryphon_ignored = -1;
-static int hf_gryphon_wait_flags = -1;
-static int hf_gryphon_wait_resp = -1;
-static int hf_gryphon_wait_prev_resp = -1;
-static int hf_gryphon_status = -1;
-static int hf_gryphon_response_in = -1;
-static int hf_gryphon_response_to = -1;
-static int hf_gryphon_response_time = -1;
-static int hf_gryphon_data_header_length = -1;
-static int hf_gryphon_data_header_length_bits = -1;
-static int hf_gryphon_data_data_length = -1;
-static int hf_gryphon_data_extra_data_length = -1;
-static int hf_gryphon_data_mode = -1;
-static int hf_gryphon_data_mode_transmitted = -1;
-static int hf_gryphon_data_mode_receive = -1;
-static int hf_gryphon_data_mode_local = -1;
-static int hf_gryphon_data_mode_remote = -1;
-static int hf_gryphon_data_mode_oneshot = -1;
-static int hf_gryphon_data_mode_combined = -1;
-static int hf_gryphon_data_mode_nomux = -1;
-static int hf_gryphon_data_mode_internal = -1;
-static int hf_gryphon_data_priority = -1;
-static int hf_gryphon_data_error_status = -1;
-static int hf_gryphon_data_time = -1;
-static int hf_gryphon_data_context = -1;
-static int hf_gryphon_data_header_data = -1;
-static int hf_gryphon_data_data = -1;
-static int hf_gryphon_data_extra_data = -1;
-static int hf_gryphon_data_padding = -1;
-static int hf_gryphon_event_id = -1;
-static int hf_gryphon_event_context = -1;
-static int hf_gryphon_event_time = -1;
-static int hf_gryphon_event_data = -1;
-static int hf_gryphon_event_padding = -1;
-static int hf_gryphon_misc_text = -1;
-static int hf_gryphon_misc_padding = -1;
-static int hf_gryphon_eventnum = -1;
-static int hf_gryphon_resp_time = -1;
-static int hf_gryphon_setfilt = -1;
-static int hf_gryphon_setfilt_length = -1;
-static int hf_gryphon_setfilt_discard_data = -1;
-static int hf_gryphon_setfilt_padding = -1;
-static int hf_gryphon_ioctl = -1;
-static int hf_gryphon_ioctl_nbytes = -1;
-static int hf_gryphon_ioctl_data = -1;
-static int hf_gryphon_addfilt_pass = -1;
-static int hf_gryphon_addfilt_active = -1;
-static int hf_gryphon_addfilt_blocks = -1;
-static int hf_gryphon_addfilt_handle = -1;
-static int hf_gryphon_modfilt = -1;
-static int hf_gryphon_modfilt_action = -1;
-static int hf_gryphon_filthan = -1;
-static int hf_gryphon_filthan_id = -1;
-static int hf_gryphon_filthan_padding = -1;
-static int hf_gryphon_dfiltmode = -1;
-static int hf_gryphon_filtmode = -1;
-static int hf_gryphon_event_name = -1;
-static int hf_gryphon_register_username = -1;
-static int hf_gryphon_register_password = -1;
-static int hf_gryphon_register_client_id = -1;
-static int hf_gryphon_register_privileges = -1;
-static int hf_gryphon_getspeeds_set_ioctl = -1;
-static int hf_gryphon_getspeeds_get_ioctl = -1;
-static int hf_gryphon_getspeeds_size = -1;
-static int hf_gryphon_getspeeds_preset = -1;
-static int hf_gryphon_getspeeds_data = -1;
-static int hf_gryphon_cmd_sort = -1;
-static int hf_gryphon_cmd_optimize = -1;
-static int hf_gryphon_config_device_name = -1;
-static int hf_gryphon_config_device_version = -1;
-static int hf_gryphon_config_device_serial_number = -1;
-static int hf_gryphon_config_num_channels = -1;
-static int hf_gryphon_config_name_version_ext = -1;
-static int hf_gryphon_config_driver_name = -1;
-static int hf_gryphon_config_driver_version = -1;
-static int hf_gryphon_config_device_security = -1;
-static int hf_gryphon_config_max_data_length = -1;
-static int hf_gryphon_config_min_data_length = -1;
-static int hf_gryphon_config_hardware_serial_number = -1;
-static int hf_gryphon_config_protocol_type = -1;
-static int hf_gryphon_config_channel_id = -1;
-static int hf_gryphon_config_card_slot_number = -1;
-static int hf_gryphon_config_max_extra_data = -1;
-static int hf_gryphon_config_min_extra_data = -1;
-static int hf_gryphon_sched_num_iterations = -1;
-static int hf_gryphon_sched_flags = -1;
-static int hf_gryphon_sched_flags_scheduler = -1;
-static int hf_gryphon_sched_sleep = -1;
-static int hf_gryphon_sched_transmit_count = -1;
-static int hf_gryphon_sched_transmit_period = -1;
-static int hf_gryphon_sched_transmit_flags = -1;
-static int hf_gryphon_sched_skip_transmit_period = -1;
-static int hf_gryphon_sched_skip_sleep = -1;
-static int hf_gryphon_sched_channel = -1;
-static int hf_gryphon_sched_channel0 = -1;
-static int hf_gryphon_sched_rep_id = -1;
-static int hf_gryphon_sched_rep_message_index = -1;
-static int hf_gryphon_blm_data_time = -1;
-static int hf_gryphon_blm_data_bus_load = -1;
-static int hf_gryphon_blm_data_current_bus_load = -1;
-static int hf_gryphon_blm_data_peak_bus_load = -1;
-static int hf_gryphon_blm_data_historic_peak_bus_load = -1;
-static int hf_gryphon_blm_stat_receive_frame_count = -1;
-static int hf_gryphon_blm_stat_transmit_frame_count = -1;
-static int hf_gryphon_blm_stat_receive_dropped_frame_count = -1;
-static int hf_gryphon_blm_stat_transmit_dropped_frame_count = -1;
-static int hf_gryphon_blm_stat_receive_error_count = -1;
-static int hf_gryphon_blm_stat_transmit_error_count = -1;
-static int hf_gryphon_addresp_flags = -1;
-static int hf_gryphon_addresp_flags_active = -1;
-static int hf_gryphon_addresp_blocks = -1;
-static int hf_gryphon_addresp_responses = -1;
-static int hf_gryphon_addresp_old_handle = -1;
-static int hf_gryphon_addresp_action = -1;
-static int hf_gryphon_addresp_action_period = -1;
-static int hf_gryphon_addresp_action_deact_on_event = -1;
-static int hf_gryphon_addresp_action_deact_after_period = -1;
-static int hf_gryphon_addresp_action_period_type = -1;
-static int hf_gryphon_addresp_handle = -1;
-static int hf_gryphon_ldf_list = -1;
-static int hf_gryphon_ldf_number = -1;
-static int hf_gryphon_ldf_nodenumber = -1;
-static int hf_gryphon_ldf_remaining = -1;
-static int hf_gryphon_ldf_name = -1;
-static int hf_gryphon_ldf_info_pv = -1;
-static int hf_gryphon_ldf_info_lv = -1;
-static int hf_gryphon_ldf_ui = -1;
-static int hf_gryphon_lin_nodename = -1;
-static int hf_gryphon_lin_data_length = -1;
-static int hf_gryphon_lin_slave_table_enable = -1;
-static int hf_gryphon_lin_slave_table_cs = -1;
-static int hf_gryphon_lin_slave_table_data = -1;
-static int hf_gryphon_lin_slave_table_datacs = -1;
-static int hf_gryphon_lin_masterevent = -1;
-static int hf_gryphon_lin_numdata = -1;
-static int hf_gryphon_lin_numextra = -1;
-static int hf_gryphon_ldf_description = -1;
-static int hf_gryphon_ldf_size = -1;
-static int hf_gryphon_ldf_exists = -1;
-static int hf_gryphon_ldf_blockn = -1;
-static int hf_gryphon_ldf_file = -1;
-static int hf_gryphon_ldf_desc_pad = -1;
-static int hf_gryphon_ldf_restore_session = -1;
-static int hf_gryphon_ldf_schedule_name = -1;
-static int hf_gryphon_ldf_schedule_msg_dbytes = -1;
-static int hf_gryphon_ldf_schedule_flags = -1;
-static int hf_gryphon_ldf_schedule_event = -1;
-static int hf_gryphon_ldf_schedule_sporadic = -1;
-static int hf_gryphon_ldf_ioctl_setflags = -1;
-static int hf_gryphon_ldf_numb_ids = -1;
-static int hf_gryphon_ldf_bitrate = -1;
-static int hf_gryphon_ldf_ioctl_setflags_flags = -1;
-static int hf_gryphon_ldf_sched_size_place = -1;
-static int hf_gryphon_ldf_sched_numb_place = -1;
-static int hf_gryphon_ldf_sched_size = -1;
-static int hf_gryphon_ldf_num_node_names = -1;
-static int hf_gryphon_ldf_num_frames = -1;
-static int hf_gryphon_ldf_num_signal_names = -1;
-static int hf_gryphon_ldf_num_schedules = -1;
-static int hf_gryphon_ldf_num_encodings = -1;
-static int hf_gryphon_ldf_encoding_value = -1;
-static int hf_gryphon_ldf_encoding_min = -1;
-static int hf_gryphon_ldf_encoding_max = -1;
-static int hf_gryphon_ldf_master_node_name = -1;
-static int hf_gryphon_ldf_slave_node_name = -1;
-static int hf_gryphon_ldf_node_name = -1;
-static int hf_gryphon_ldf_signal_name = -1;
-static int hf_gryphon_ldf_signal_encoding_name = -1;
-static int hf_gryphon_ldf_signal_encoding_type = -1;
-static int hf_gryphon_ldf_signal_encoding_logical = -1;
-static int hf_gryphon_ldf_signal_offset = -1;
-static int hf_gryphon_ldf_signal_length = -1;
-static int hf_gryphon_ldf_get_frame = -1;
-static int hf_gryphon_ldf_get_frame_num = -1;
-static int hf_gryphon_ldf_get_frame_pub = -1;
-static int hf_gryphon_ldf_get_frame_num_signals = -1;
-static int hf_gryphon_cnvt_valuef = -1;
-static int hf_gryphon_cnvt_valuei = -1;
-static int hf_gryphon_cnvt_values = -1;
-static int hf_gryphon_cnvt_units = -1;
-static int hf_gryphon_cnvt_flags_getvalues = -1;
-static int hf_gryphon_dd_stream = -1;
-static int hf_gryphon_dd_value = -1;
-static int hf_gryphon_dd_time = -1;
-static int hf_gryphon_modresp_handle = -1;
-static int hf_gryphon_modresp_action = -1;
-static int hf_gryphon_num_resphan = -1;
-static int hf_gryphon_handle = -1;
-static int hf_gryphon_transmit_sched_id = -1;
-static int hf_gryphon_desc_program_size = -1;
-static int hf_gryphon_desc_program_name = -1;
-static int hf_gryphon_desc_program_description = -1;
-static int hf_gryphon_desc_flags = -1;
-static int hf_gryphon_desc_flags_program = -1;
-static int hf_gryphon_desc_handle = -1;
-static int hf_gryphon_upload_block_number = -1;
-static int hf_gryphon_upload_handle = -1;
-static int hf_gryphon_upload_data = -1;
-static int hf_gryphon_delete = -1;
-static int hf_gryphon_list_block_number = -1;
-static int hf_gryphon_list_num_programs = -1;
-static int hf_gryphon_list_num_remain_programs = -1;
-static int hf_gryphon_list_name = -1;
-static int hf_gryphon_list_description = -1;
-static int hf_gryphon_start_arguments = -1;
-static int hf_gryphon_start_channel = -1;
-static int hf_gryphon_status_num_running_copies = -1;
-static int hf_gryphon_options_handle = -1;
-static int hf_gryphon_files = -1;
-static int hf_gryphon_usdt_flags_register = -1;
-static int hf_gryphon_usdt_action_flags = -1;
-static int hf_gryphon_usdt_action_flags_non_legacy = -1;
-static int hf_gryphon_usdt_action_flags_register = -1;
-static int hf_gryphon_usdt_action_flags_action = -1;
-static int hf_gryphon_usdt_transmit_options_flags = -1;
-static int hf_gryphon_usdt_transmit_options_flags_echo = -1;
-static int hf_gryphon_usdt_transmit_options_done_event = -1;
-static int hf_gryphon_usdt_transmit_options_echo_short = -1;
-static int hf_gryphon_usdt_transmit_options_rx_nth_fc = -1;
-static int hf_gryphon_usdt_transmit_options_action = -1;
-static int hf_gryphon_usdt_transmit_options_send_done = -1;
-static int hf_gryphon_usdt_receive_options_flags = -1;
-static int hf_gryphon_usdt_receive_options_action = -1;
-static int hf_gryphon_usdt_receive_options_firstframe_event = -1;
-static int hf_gryphon_usdt_receive_options_lastframe_event = -1;
-static int hf_gryphon_usdt_receive_options_tx_nth_fc = -1;
-static int hf_gryphon_usdt_length_options_flags = -1;
-static int hf_gryphon_usdt_length_control_j1939 = -1;
-static int hf_gryphon_usdt_stmin_fc = -1;
-static int hf_gryphon_usdt_bsmax_fc = -1;
-static int hf_gryphon_usdt_stmin_override = -1;
-static int hf_gryphon_usdt_stmin_override_active = -1;
-static int hf_gryphon_usdt_stmin_override_activate = -1;
-static int hf_gryphon_usdt_set_stmin_mul = -1;
-static int hf_gryphon_usdt_receive_options_firstframe = -1;
-static int hf_gryphon_usdt_receive_options_lastframe = -1;
-static int hf_gryphon_usdt_ext_address = -1;
-static int hf_gryphon_usdt_ext_address_id = -1;
-static int hf_gryphon_usdt_block_size = -1;
-static int hf_gryphon_bits_in_input1 = -1;
-static int hf_gryphon_bits_in_input2 = -1;
-static int hf_gryphon_bits_in_input3 = -1;
-static int hf_gryphon_bits_in_pushbutton = -1;
-static int hf_gryphon_bits_out_output1 = -1;
-static int hf_gryphon_bits_out_output2 = -1;
-static int hf_gryphon_init_strat_reset_limit = -1;
-static int hf_gryphon_init_strat_delay = -1;
-static int hf_gryphon_speed_baud_rate_index = -1;
-static int hf_gryphon_filter_block_filter_start = -1;
-static int hf_gryphon_filter_block_filter_length = -1;
-static int hf_gryphon_filter_block_filter_type = -1;
-static int hf_gryphon_filter_block_filter_operator = -1;
-static int hf_gryphon_filter_block_filter_value1 = -1;
-static int hf_gryphon_filter_block_filter_value2 = -1;
-static int hf_gryphon_filter_block_filter_value4 = -1;
-static int hf_gryphon_filter_block_filter_value_bytes = -1;
-static int hf_gryphon_blm_mode = -1;
-static int hf_gryphon_blm_mode_avg_period = -1;
-static int hf_gryphon_blm_mode_avg_frames = -1;
-static int hf_gryphon_command = -1;
-static int hf_gryphon_cmd_mode = -1;
-static int hf_gryphon_option = -1;
-static int hf_gryphon_option_data = -1;
-static int hf_gryphon_cmd_file = -1;
-static int hf_gryphon_bit_in_digital_data = -1;
-static int hf_gryphon_bit_out_digital_data = -1;
-static int hf_gryphon_filter_block_pattern = -1;
-static int hf_gryphon_filter_block_mask = -1;
-static int hf_gryphon_usdt_request = -1;
-static int hf_gryphon_usdt_request_ext = -1;
-static int hf_gryphon_usdt_nids = -1;
-static int hf_gryphon_usdt_response = -1;
-static int hf_gryphon_usdt_response_ext = -1;
-static int hf_gryphon_uudt_response = -1;
-static int hf_gryphon_uudt_response_ext = -1;
-static int hf_gryphon_more_filenames = -1;
-static int hf_gryphon_filenames = -1;
-static int hf_gryphon_program_channel_number = -1;
-static int hf_gryphon_valid_header_length = -1;
-
-static gint ett_gryphon = -1;
-static gint ett_gryphon_header = -1;
-static gint ett_gryphon_body = -1;
-static gint ett_gryphon_command_data = -1;
-static gint ett_gryphon_response_data = -1;
-static gint ett_gryphon_data_header = -1;
-static gint ett_gryphon_flags = -1;
-static gint ett_gryphon_data_body = -1;
-static gint ett_gryphon_cmd_filter_block = -1;
-static gint ett_gryphon_cmd_events_data = -1;
-static gint ett_gryphon_cmd_config_device = -1;
-static gint ett_gryphon_cmd_sched_data = -1;
-static gint ett_gryphon_cmd_sched_cmd = -1;
-static gint ett_gryphon_cmd_response_block = -1;
-static gint ett_gryphon_pgm_list = -1;
-static gint ett_gryphon_pgm_status = -1;
-static gint ett_gryphon_pgm_options = -1;
-static gint ett_gryphon_valid_headers = -1;
-static gint ett_gryphon_usdt_data = -1;
-static gint ett_gryphon_usdt_action_flags = -1;
-static gint ett_gryphon_usdt_tx_options_flags = -1;
-static gint ett_gryphon_usdt_rx_options_flags = -1;
-static gint ett_gryphon_usdt_len_options_flags = -1;
-static gint ett_gryphon_usdt_data_block = -1;
-static gint ett_gryphon_lin_emulate_node = -1;
-static gint ett_gryphon_ldf_block = -1;
-static gint ett_gryphon_ldf_schedule_name = -1;
-static gint ett_gryphon_lin_schedule_msg = -1;
-static gint ett_gryphon_cnvt_getflags = -1;
-static gint ett_gryphon_digital_data = -1;
-static gint ett_gryphon_blm_mode = -1;
-
-static expert_field ei_gryphon_type = EI_INIT;
+static int proto_gryphon;
+
+static int hf_gryphon_src;
+static int hf_gryphon_srcchan;
+static int hf_gryphon_srcchanclient;
+static int hf_gryphon_dest;
+static int hf_gryphon_destchan;
+static int hf_gryphon_destchanclient;
+static int hf_gryphon_type;
+static int hf_gryphon_cmd;
+static int hf_gryphon_cmd_context;
+static int hf_gryphon_cmd_ioctl_context;
+static int hf_gryphon_data;
+static int hf_gryphon_data_length;
+static int hf_gryphon_reserved;
+static int hf_gryphon_padding;
+static int hf_gryphon_ignored;
+static int hf_gryphon_wait_flags;
+static int hf_gryphon_wait_resp;
+static int hf_gryphon_wait_prev_resp;
+static int hf_gryphon_status;
+static int hf_gryphon_response_in;
+static int hf_gryphon_response_to;
+static int hf_gryphon_response_time;
+static int hf_gryphon_data_header_length;
+static int hf_gryphon_data_header_length_bits;
+static int hf_gryphon_data_data_length;
+static int hf_gryphon_data_extra_data_length;
+static int hf_gryphon_data_mode;
+static int hf_gryphon_data_mode_transmitted;
+static int hf_gryphon_data_mode_receive;
+static int hf_gryphon_data_mode_local;
+static int hf_gryphon_data_mode_remote;
+static int hf_gryphon_data_mode_oneshot;
+static int hf_gryphon_data_mode_combined;
+static int hf_gryphon_data_mode_nomux;
+static int hf_gryphon_data_mode_internal;
+static int hf_gryphon_data_priority;
+static int hf_gryphon_data_error_status;
+static int hf_gryphon_data_time;
+static int hf_gryphon_data_context;
+static int hf_gryphon_data_header_data;
+static int hf_gryphon_data_data;
+static int hf_gryphon_data_extra_data;
+static int hf_gryphon_data_padding;
+static int hf_gryphon_event_id;
+static int hf_gryphon_event_context;
+static int hf_gryphon_event_time;
+static int hf_gryphon_event_data;
+static int hf_gryphon_event_padding;
+static int hf_gryphon_misc_text;
+static int hf_gryphon_misc_padding;
+static int hf_gryphon_eventnum;
+static int hf_gryphon_resp_time;
+static int hf_gryphon_setfilt;
+static int hf_gryphon_setfilt_length;
+static int hf_gryphon_setfilt_discard_data;
+static int hf_gryphon_setfilt_padding;
+static int hf_gryphon_ioctl;
+static int hf_gryphon_ioctl_nbytes;
+static int hf_gryphon_ioctl_data;
+static int hf_gryphon_addfilt_pass;
+static int hf_gryphon_addfilt_active;
+static int hf_gryphon_addfilt_blocks;
+static int hf_gryphon_addfilt_handle;
+static int hf_gryphon_modfilt;
+static int hf_gryphon_modfilt_action;
+static int hf_gryphon_filthan;
+static int hf_gryphon_filthan_id;
+static int hf_gryphon_filthan_padding;
+static int hf_gryphon_dfiltmode;
+static int hf_gryphon_filtmode;
+static int hf_gryphon_event_name;
+static int hf_gryphon_register_username;
+static int hf_gryphon_register_password;
+static int hf_gryphon_register_client_id;
+static int hf_gryphon_register_privileges;
+static int hf_gryphon_getspeeds_set_ioctl;
+static int hf_gryphon_getspeeds_get_ioctl;
+static int hf_gryphon_getspeeds_size;
+static int hf_gryphon_getspeeds_preset;
+static int hf_gryphon_getspeeds_data;
+static int hf_gryphon_cmd_sort;
+static int hf_gryphon_cmd_optimize;
+static int hf_gryphon_config_device_name;
+static int hf_gryphon_config_device_version;
+static int hf_gryphon_config_device_serial_number;
+static int hf_gryphon_config_num_channels;
+static int hf_gryphon_config_name_version_ext;
+static int hf_gryphon_config_driver_name;
+static int hf_gryphon_config_driver_version;
+static int hf_gryphon_config_device_security;
+static int hf_gryphon_config_max_data_length;
+static int hf_gryphon_config_min_data_length;
+static int hf_gryphon_config_hardware_serial_number;
+static int hf_gryphon_config_protocol_type;
+static int hf_gryphon_config_channel_id;
+static int hf_gryphon_config_card_slot_number;
+static int hf_gryphon_config_max_extra_data;
+static int hf_gryphon_config_min_extra_data;
+static int hf_gryphon_sched_num_iterations;
+static int hf_gryphon_sched_flags;
+static int hf_gryphon_sched_flags_scheduler;
+static int hf_gryphon_sched_sleep;
+static int hf_gryphon_sched_transmit_count;
+static int hf_gryphon_sched_transmit_period;
+static int hf_gryphon_sched_transmit_flags;
+static int hf_gryphon_sched_skip_transmit_period;
+static int hf_gryphon_sched_skip_sleep;
+static int hf_gryphon_sched_channel;
+static int hf_gryphon_sched_channel0;
+static int hf_gryphon_sched_rep_id;
+static int hf_gryphon_sched_rep_message_index;
+static int hf_gryphon_blm_data_time;
+static int hf_gryphon_blm_data_bus_load;
+static int hf_gryphon_blm_data_current_bus_load;
+static int hf_gryphon_blm_data_peak_bus_load;
+static int hf_gryphon_blm_data_historic_peak_bus_load;
+static int hf_gryphon_blm_stat_receive_frame_count;
+static int hf_gryphon_blm_stat_transmit_frame_count;
+static int hf_gryphon_blm_stat_receive_dropped_frame_count;
+static int hf_gryphon_blm_stat_transmit_dropped_frame_count;
+static int hf_gryphon_blm_stat_receive_error_count;
+static int hf_gryphon_blm_stat_transmit_error_count;
+static int hf_gryphon_addresp_flags;
+static int hf_gryphon_addresp_flags_active;
+static int hf_gryphon_addresp_blocks;
+static int hf_gryphon_addresp_responses;
+static int hf_gryphon_addresp_old_handle;
+static int hf_gryphon_addresp_action;
+static int hf_gryphon_addresp_action_period;
+static int hf_gryphon_addresp_action_deact_on_event;
+static int hf_gryphon_addresp_action_deact_after_period;
+static int hf_gryphon_addresp_action_period_type;
+static int hf_gryphon_addresp_handle;
+static int hf_gryphon_ldf_list;
+static int hf_gryphon_ldf_number;
+static int hf_gryphon_ldf_nodenumber;
+static int hf_gryphon_ldf_remaining;
+static int hf_gryphon_ldf_name;
+static int hf_gryphon_ldf_info_pv;
+static int hf_gryphon_ldf_info_lv;
+static int hf_gryphon_ldf_ui;
+static int hf_gryphon_lin_nodename;
+static int hf_gryphon_lin_data_length;
+static int hf_gryphon_lin_slave_table_enable;
+static int hf_gryphon_lin_slave_table_cs;
+static int hf_gryphon_lin_slave_table_data;
+static int hf_gryphon_lin_slave_table_datacs;
+static int hf_gryphon_lin_masterevent;
+static int hf_gryphon_lin_numdata;
+static int hf_gryphon_lin_numextra;
+static int hf_gryphon_ldf_description;
+static int hf_gryphon_ldf_size;
+static int hf_gryphon_ldf_exists;
+static int hf_gryphon_ldf_blockn;
+static int hf_gryphon_ldf_file;
+static int hf_gryphon_ldf_desc_pad;
+static int hf_gryphon_ldf_restore_session;
+static int hf_gryphon_ldf_schedule_name;
+static int hf_gryphon_ldf_schedule_msg_dbytes;
+static int hf_gryphon_ldf_schedule_flags;
+static int hf_gryphon_ldf_schedule_event;
+static int hf_gryphon_ldf_schedule_sporadic;
+static int hf_gryphon_ldf_ioctl_setflags;
+static int hf_gryphon_ldf_numb_ids;
+static int hf_gryphon_ldf_bitrate;
+static int hf_gryphon_ldf_ioctl_setflags_flags;
+static int hf_gryphon_ldf_sched_size_place;
+static int hf_gryphon_ldf_sched_numb_place;
+static int hf_gryphon_ldf_sched_size;
+static int hf_gryphon_ldf_num_node_names;
+static int hf_gryphon_ldf_num_frames;
+static int hf_gryphon_ldf_num_signal_names;
+static int hf_gryphon_ldf_num_schedules;
+static int hf_gryphon_ldf_num_encodings;
+static int hf_gryphon_ldf_encoding_value;
+static int hf_gryphon_ldf_encoding_min;
+static int hf_gryphon_ldf_encoding_max;
+static int hf_gryphon_ldf_master_node_name;
+static int hf_gryphon_ldf_slave_node_name;
+static int hf_gryphon_ldf_node_name;
+static int hf_gryphon_ldf_signal_name;
+static int hf_gryphon_ldf_signal_encoding_name;
+static int hf_gryphon_ldf_signal_encoding_type;
+static int hf_gryphon_ldf_signal_encoding_logical;
+static int hf_gryphon_ldf_signal_offset;
+static int hf_gryphon_ldf_signal_length;
+static int hf_gryphon_ldf_get_frame;
+static int hf_gryphon_ldf_get_frame_num;
+static int hf_gryphon_ldf_get_frame_pub;
+static int hf_gryphon_ldf_get_frame_num_signals;
+static int hf_gryphon_cnvt_valuef;
+static int hf_gryphon_cnvt_valuei;
+static int hf_gryphon_cnvt_values;
+static int hf_gryphon_cnvt_units;
+static int hf_gryphon_cnvt_flags_getvalues;
+static int hf_gryphon_dd_stream;
+static int hf_gryphon_dd_value;
+static int hf_gryphon_dd_time;
+static int hf_gryphon_modresp_handle;
+static int hf_gryphon_modresp_action;
+static int hf_gryphon_num_resphan;
+static int hf_gryphon_handle;
+static int hf_gryphon_transmit_sched_id;
+static int hf_gryphon_desc_program_size;
+static int hf_gryphon_desc_program_name;
+static int hf_gryphon_desc_program_description;
+static int hf_gryphon_desc_flags;
+static int hf_gryphon_desc_flags_program;
+static int hf_gryphon_desc_handle;
+static int hf_gryphon_upload_block_number;
+static int hf_gryphon_upload_handle;
+static int hf_gryphon_upload_data;
+static int hf_gryphon_delete;
+static int hf_gryphon_list_block_number;
+static int hf_gryphon_list_num_programs;
+static int hf_gryphon_list_num_remain_programs;
+static int hf_gryphon_list_name;
+static int hf_gryphon_list_description;
+static int hf_gryphon_start_arguments;
+static int hf_gryphon_start_channel;
+static int hf_gryphon_status_num_running_copies;
+static int hf_gryphon_options_handle;
+static int hf_gryphon_files;
+static int hf_gryphon_usdt_flags_register;
+static int hf_gryphon_usdt_action_flags;
+static int hf_gryphon_usdt_action_flags_non_legacy;
+static int hf_gryphon_usdt_action_flags_register;
+static int hf_gryphon_usdt_action_flags_action;
+static int hf_gryphon_usdt_transmit_options_flags;
+static int hf_gryphon_usdt_transmit_options_flags_echo;
+static int hf_gryphon_usdt_transmit_options_done_event;
+static int hf_gryphon_usdt_transmit_options_echo_short;
+static int hf_gryphon_usdt_transmit_options_rx_nth_fc;
+static int hf_gryphon_usdt_transmit_options_action;
+static int hf_gryphon_usdt_transmit_options_send_done;
+static int hf_gryphon_usdt_receive_options_flags;
+static int hf_gryphon_usdt_receive_options_action;
+static int hf_gryphon_usdt_receive_options_firstframe_event;
+static int hf_gryphon_usdt_receive_options_lastframe_event;
+static int hf_gryphon_usdt_receive_options_tx_nth_fc;
+static int hf_gryphon_usdt_length_options_flags;
+static int hf_gryphon_usdt_length_control_j1939;
+static int hf_gryphon_usdt_stmin_fc;
+static int hf_gryphon_usdt_bsmax_fc;
+static int hf_gryphon_usdt_stmin_override;
+static int hf_gryphon_usdt_stmin_override_active;
+static int hf_gryphon_usdt_stmin_override_activate;
+static int hf_gryphon_usdt_set_stmin_mul;
+static int hf_gryphon_usdt_receive_options_firstframe;
+static int hf_gryphon_usdt_receive_options_lastframe;
+static int hf_gryphon_usdt_ext_address;
+static int hf_gryphon_usdt_ext_address_id;
+static int hf_gryphon_usdt_block_size;
+static int hf_gryphon_bits_in_input1;
+static int hf_gryphon_bits_in_input2;
+static int hf_gryphon_bits_in_input3;
+static int hf_gryphon_bits_in_pushbutton;
+static int hf_gryphon_bits_out_output1;
+static int hf_gryphon_bits_out_output2;
+static int hf_gryphon_init_strat_reset_limit;
+static int hf_gryphon_init_strat_delay;
+static int hf_gryphon_speed_baud_rate_index;
+static int hf_gryphon_filter_block_filter_start;
+static int hf_gryphon_filter_block_filter_length;
+static int hf_gryphon_filter_block_filter_type;
+static int hf_gryphon_filter_block_filter_operator;
+static int hf_gryphon_filter_block_filter_value1;
+static int hf_gryphon_filter_block_filter_value2;
+static int hf_gryphon_filter_block_filter_value4;
+static int hf_gryphon_filter_block_filter_value_bytes;
+static int hf_gryphon_blm_mode;
+static int hf_gryphon_blm_mode_avg_period;
+static int hf_gryphon_blm_mode_avg_frames;
+static int hf_gryphon_command;
+static int hf_gryphon_cmd_mode;
+static int hf_gryphon_option;
+static int hf_gryphon_option_data;
+static int hf_gryphon_cmd_file;
+static int hf_gryphon_bit_in_digital_data;
+static int hf_gryphon_bit_out_digital_data;
+static int hf_gryphon_filter_block_pattern;
+static int hf_gryphon_filter_block_mask;
+static int hf_gryphon_usdt_request;
+static int hf_gryphon_usdt_request_ext;
+static int hf_gryphon_usdt_nids;
+static int hf_gryphon_usdt_response;
+static int hf_gryphon_usdt_response_ext;
+static int hf_gryphon_uudt_response;
+static int hf_gryphon_uudt_response_ext;
+static int hf_gryphon_more_filenames;
+static int hf_gryphon_filenames;
+static int hf_gryphon_program_channel_number;
+static int hf_gryphon_valid_header_length;
+
+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 +1007,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 +1035,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;
@@ -1134,7 +1134,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;
}
@@ -1158,7 +1158,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");
@@ -1171,7 +1171,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);
@@ -1184,7 +1184,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);
@@ -1203,7 +1203,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,
@@ -1223,26 +1223,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,
@@ -1301,13 +1301,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 */
@@ -1365,8 +1365,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;
@@ -1409,11 +1409,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;
}
@@ -1439,11 +1439,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;
}
@@ -1461,13 +1461,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);
@@ -1495,13 +1495,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);
@@ -1519,7 +1519,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;
}
@@ -1542,8 +1542,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;
@@ -1622,10 +1622,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);
@@ -1660,7 +1660,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);
@@ -1678,7 +1678,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 */
@@ -1753,7 +1753,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;
@@ -1780,7 +1780,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);
@@ -1797,12 +1797,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);
}
@@ -1876,8 +1876,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);
@@ -1924,7 +1924,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);
@@ -1993,7 +1993,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);
@@ -2015,7 +2015,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);
@@ -2039,7 +2039,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;
@@ -2157,7 +2157,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;
@@ -2194,7 +2194,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);
@@ -2249,7 +2249,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;
@@ -2265,10 +2265,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++) {
@@ -2281,17 +2281,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;
@@ -2319,10 +2319,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++) {
@@ -2335,10 +2335,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++) {
@@ -2352,11 +2352,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++) {
@@ -2384,7 +2384,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);
@@ -2415,15 +2415,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 */
@@ -2439,7 +2439,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);
@@ -2447,7 +2447,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;
}
@@ -2458,12 +2458,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++) {
@@ -2553,7 +2553,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;
@@ -2586,7 +2586,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);
@@ -2620,7 +2620,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;
@@ -2631,7 +2631,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;
@@ -2647,7 +2647,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);
@@ -2683,7 +2683,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);
@@ -2721,7 +2721,7 @@ 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;
@@ -2749,7 +2749,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);
@@ -2797,7 +2797,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;
@@ -2815,8 +2815,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);
@@ -2836,12 +2836,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);
}
@@ -2935,7 +2935,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);
@@ -2959,7 +2959,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;
@@ -3003,13 +3003,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;
@@ -3038,14 +3038,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);
@@ -3096,10 +3096,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
@@ -3128,21 +3128,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;
@@ -3171,21 +3171,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;
@@ -3221,9 +3221,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 */
@@ -3242,7 +3242,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 {
@@ -3265,7 +3265,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 {
@@ -3289,7 +3289,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 {
@@ -3319,7 +3319,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 {
@@ -3342,7 +3342,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 {
@@ -3365,7 +3365,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 {
@@ -3489,11 +3489,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) {
@@ -3521,7 +3521,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;
@@ -3580,7 +3580,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,
@@ -3603,7 +3603,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,
@@ -3622,7 +3622,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;
@@ -3633,7 +3633,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);
@@ -3659,7 +3659,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);
@@ -3705,8 +3705,8 @@ 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;
@@ -3717,7 +3717,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 */
@@ -3732,7 +3732,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);
@@ -3973,17 +3973,17 @@ static int
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 */
@@ -4008,7 +4008,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);
}
/*
@@ -4211,14 +4211,14 @@ decode_response(tvbuff_t *tvb, packet_info* pinfo, int offset, int src, proto_tr
*/
static int
// NOLINTNEXTLINE(misc-no-recursion)
-dissect_gryphon_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_msgresp_add)
+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");
@@ -4256,7 +4256,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);
/*
@@ -4327,10 +4327,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;
/*
@@ -4350,7 +4350,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);
}
@@ -5251,10 +5251,10 @@ proto_register_gryphon(void)
{ "UUDT response IDs", "gryphon.uudt_response", FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_gryphon_uudt_response_ext,
- { "UUDT response extended address", "gryphon.usdt_response_ext", FT_UINT8, BASE_HEX, NULL, 0x0,
+ { "UUDT response extended address", "gryphon.uudt_response_ext", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_gryphon_more_filenames,
- { "More filenames to return", "gryphon.more_filenames", FT_BOOLEAN, 8, TFS(&yes_no), 0x0,
+ { "More filenames to return", "gryphon.more_filenames", FT_BOOLEAN, BASE_NONE, TFS(&yes_no), 0x0,
NULL, HFILL }},
{ &hf_gryphon_filenames,
{ "File and directory names", "gryphon.filenames", FT_STRING, BASE_NONE, NULL, 0x0,
@@ -5267,7 +5267,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 477f897c..436cb134 100644
--- a/plugins/epan/gryphon/packet-gryphon.h
+++ b/plugins/epan/gryphon/packet-gryphon.h
@@ -66,7 +66,7 @@
#define CMD_SET_TIME 0x0b /* set time */
/* SD-type specific commands: should start at 0x40, global uniqueness */
-/* is prefered, but not mandatory. */
+/* is preferred, but not mandatory. */
/* SD_CARD command types: */
@@ -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/irda-appl.h b/plugins/epan/irda/irda-appl.h
index 5a839405..01c6fef1 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 0f46c33d..d3237014 100644
--- a/plugins/epan/irda/packet-ircomm.c
+++ b/plugins/epan/irda/packet-ircomm.c
@@ -16,13 +16,20 @@
/*
* See
*
- * http://www.irdajp.info/specifications.php
+ * https://web.archive.org/web/20040405053146/http://www.irda.org/standards/specifications.asp
*
* or
*
- * https://web.archive.org/web/20040405053146/http://www.irda.org/standards/specifications.asp
+ * https://archive.org/search?query=creator%3A%22Infrared+Data+Association%22
+ *
+ * for various IrDA specifications, including the IrCOMM 1.0 specification
+ * at
+ *
+ * https://web.archive.org/web/20040229015523/http://www.irda.org/standards/pubs/IrCOMM10.PDF
+ *
+ * or
*
- * for various IrDA specifications.
+ * https://archive.org/details/ir-comm-10
*/
#include "irda-appl.h"
@@ -109,29 +116,29 @@
void proto_reg_handoff_ircomm(void);
/* Initialize the subtree pointers */
-static gint ett_ircomm = -1;
-static gint ett_ircomm_ctrl = -1;
+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;
-static int proto_ircomm = -1;
-static int hf_ircomm_param = -1;
-/* static int hf_param_pi = -1; */
-/* static int hf_param_pl = -1; */
-/* static int hf_param_pv = -1; */
-static int hf_control = -1;
-static int hf_control_len = -1;
-
-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 int proto_ircomm;
+static int hf_ircomm_param;
+/* static int hf_param_pi; */
+/* static int hf_param_pl; */
+/* static int hf_param_pv; */
+static int hf_control;
+static int hf_control_len;
+
+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 */
@@ -155,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;
@@ -165,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)
@@ -196,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;
@@ -221,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)
{
@@ -242,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);
@@ -250,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)
@@ -277,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)
@@ -310,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;
}
@@ -355,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[] = {
@@ -388,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 */
@@ -408,7 +415,6 @@ void proto_register_ircomm(void)
proto_register_subtree_array(ett, array_length(ett));
for (i = 0; i < MAX_IAP_ENTRIES * MAX_PARAMETERS; i++)
{
- ett_param[i] = -1;
ett_p[i] = &ett_param[i];
}
proto_register_subtree_array(ett_p, MAX_IAP_ENTRIES * MAX_PARAMETERS);
diff --git a/plugins/epan/irda/packet-irda.c b/plugins/epan/irda/packet-irda.c
index d3c2c835..8bb044a7 100644
--- a/plugins/epan/irda/packet-irda.c
+++ b/plugins/epan/irda/packet-irda.c
@@ -29,16 +29,24 @@
#include "irda-appl.h"
/*
- * This plugin dissects infrared data transmissions as defined by the IrDA
- * specification (www.irda.org). See
+ * This plugin dissects infrared data transmissions as defined by IrDA
+ * specifications. See
*
- * http://www.irdajp.info/specifications.php
+ * https://web.archive.org/web/20040405053146/http://www.irda.org/standards/specifications.asp
*
* or
*
- * https://web.archive.org/web/20040405053146/http://www.irda.org/standards/specifications.asp
+ * https://archive.org/search?query=creator%3A%22Infrared+Data+Association%22
*
- * for various IrDA specifications.
+ * for various IrDA specifications, including a zip archive of the IrPHY
+ * 1.4, IrLAP 1.1, IrLMP 1.1, IrDA Tiny TP 1.1, and IrDA Point and Shoot
+ * Profile 1.1 and Test Specification 1.0 at
+ *
+ * https://web.archive.org/web/20040405053146/http://www.irda.org/standards/pubs/IrData.zip
+ *
+ * or the the IrLAP 1.1 specification at
+ *
+ * https://archive.org/details/ir-lap-11
*
* The plugin operates both offline with libpcap files and online on supported
* platforms. Live dissection is currently available for Linux-IrDA
@@ -133,104 +141,104 @@ void proto_reg_handoff_irda(void);
void proto_register_irda(void);
/* Initialize the protocol and registered fields */
-static int proto_irlap = -1;
-static int hf_lap_a = -1;
-static int hf_lap_a_cr = -1;
-static int hf_lap_a_address = -1;
-static int hf_lap_c = -1;
-static int hf_lap_c_nr = -1;
-static int hf_lap_c_ns = -1;
-static int hf_lap_c_p = -1;
-static int hf_lap_c_f = -1;
-static int hf_lap_c_s = -1;
-static int hf_lap_c_u_cmd = -1;
-static int hf_lap_c_u_rsp = -1;
-static int hf_lap_c_i = -1;
-static int hf_lap_c_s_u = -1;
-static int hf_lap_i = -1;
-static int hf_snrm_saddr = -1;
-static int hf_snrm_daddr = -1;
-static int hf_snrm_ca = -1;
-static int hf_ua_saddr = -1;
-static int hf_ua_daddr = -1;
-static int hf_negotiation_param = -1;
-static int hf_param_pi = -1;
-static int hf_param_pl = -1;
-static int hf_param_pv = -1;
-static int hf_xid_ident = -1;
-static int hf_xid_saddr = -1;
-static int hf_xid_daddr = -1;
-static int hf_xid_flags = -1;
-static int hf_xid_s = -1;
-static int hf_xid_conflict = -1;
-static int hf_xid_slotnr = -1;
-static int hf_xid_version = -1;
-
-static int proto_irlmp = -1;
-static int hf_lmp_xid_hints = -1;
-static int hf_lmp_xid_charset = -1;
-static int hf_lmp_xid_name = -1;
-static int hf_lmp_xid_name_no_encoding = -1;
-static int hf_lmp_dst = -1;
-static int hf_lmp_dst_control = -1;
-static int hf_lmp_dst_lsap = -1;
-static int hf_lmp_src = -1;
-static int hf_lmp_src_r = -1;
-static int hf_lmp_src_lsap = -1;
-static int hf_lmp_opcode = -1;
-static int hf_lmp_rsvd = -1;
-static int hf_lmp_reason = -1;
-static int hf_lmp_mode = -1;
-static int hf_lmp_status = -1;
-
-static int proto_iap = -1;
-static int hf_iap_ctl = -1;
-static int hf_iap_ctl_lst = -1;
-static int hf_iap_ctl_ack = -1;
-static int hf_iap_ctl_opcode = -1;
-static int hf_iap_class_name = -1;
-static int hf_iap_attr_name = -1;
-static int hf_iap_return = -1;
-static int hf_iap_list_len = -1;
-static int hf_iap_list_entry = -1;
-static int hf_iap_obj_id = -1;
-static int hf_iap_attr_type = -1;
-static int hf_iap_int = -1;
-static int hf_iap_seq_len = -1;
-static int hf_iap_oct_seq = -1;
-static int hf_iap_char_set = -1;
-static int hf_iap_string = -1;
-static int hf_iap_invaloctet = -1;
-static int hf_iap_invallsap = -1;
-
-static int proto_ttp = -1;
-static int hf_ttp_p = -1;
-static int hf_ttp_icredit = -1;
-static int hf_ttp_m = -1;
-static int hf_ttp_dcredit = -1;
-
-static int proto_log = -1;
-static int hf_log_msg = -1;
-static int hf_log_missed = -1;
+static int proto_irlap;
+static int hf_lap_a;
+static int hf_lap_a_cr;
+static int hf_lap_a_address;
+static int hf_lap_c;
+static int hf_lap_c_nr;
+static int hf_lap_c_ns;
+static int hf_lap_c_p;
+static int hf_lap_c_f;
+static int hf_lap_c_s;
+static int hf_lap_c_u_cmd;
+static int hf_lap_c_u_rsp;
+static int hf_lap_c_i;
+static int hf_lap_c_s_u;
+static int hf_lap_i;
+static int hf_snrm_saddr;
+static int hf_snrm_daddr;
+static int hf_snrm_ca;
+static int hf_ua_saddr;
+static int hf_ua_daddr;
+static int hf_negotiation_param;
+static int hf_param_pi;
+static int hf_param_pl;
+static int hf_param_pv;
+static int hf_xid_ident;
+static int hf_xid_saddr;
+static int hf_xid_daddr;
+static int hf_xid_flags;
+static int hf_xid_s;
+static int hf_xid_conflict;
+static int hf_xid_slotnr;
+static int hf_xid_version;
+
+static int proto_irlmp;
+static int hf_lmp_xid_hints;
+static int hf_lmp_xid_charset;
+static int hf_lmp_xid_name;
+static int hf_lmp_xid_name_no_encoding;
+static int hf_lmp_dst;
+static int hf_lmp_dst_control;
+static int hf_lmp_dst_lsap;
+static int hf_lmp_src;
+static int hf_lmp_src_r;
+static int hf_lmp_src_lsap;
+static int hf_lmp_opcode;
+static int hf_lmp_rsvd;
+static int hf_lmp_reason;
+static int hf_lmp_mode;
+static int hf_lmp_status;
+
+static int proto_iap;
+static int hf_iap_ctl;
+static int hf_iap_ctl_lst;
+static int hf_iap_ctl_ack;
+static int hf_iap_ctl_opcode;
+static int hf_iap_class_name;
+static int hf_iap_attr_name;
+static int hf_iap_return;
+static int hf_iap_list_len;
+static int hf_iap_list_entry;
+static int hf_iap_obj_id;
+static int hf_iap_attr_type;
+static int hf_iap_int;
+static int hf_iap_seq_len;
+static int hf_iap_oct_seq;
+static int hf_iap_char_set;
+static int hf_iap_string;
+static int hf_iap_invaloctet;
+static int hf_iap_invallsap;
+
+static int proto_ttp;
+static int hf_ttp_p;
+static int hf_ttp_icredit;
+static int hf_ttp_m;
+static int hf_ttp_dcredit;
+
+static int proto_log;
+static int hf_log_msg;
+static int hf_log_missed;
/* Initialize the subtree pointers */
-static gint ett_irlap = -1;
-static gint ett_lap_a = -1;
-static gint ett_lap_c = -1;
-static gint ett_lap_i = -1;
-static gint ett_xid_flags = -1;
-static gint ett_log = -1;
-static gint ett_irlmp = -1;
-static gint ett_lmp_dst = -1;
-static gint ett_lmp_src = -1;
-static gint ett_iap = -1;
-static gint ett_iap_ctl = -1;
-static gint ett_ttp = -1;
+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;
@@ -251,15 +259,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;
@@ -452,9 +460,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);
@@ -478,10 +486,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)
@@ -490,7 +498,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);
@@ -525,13 +533,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;
@@ -543,13 +551,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;
@@ -594,8 +602,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)
@@ -664,24 +672,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)
@@ -690,8 +698,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);
@@ -732,7 +740,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");
@@ -747,7 +755,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:
@@ -791,7 +799,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:
@@ -803,7 +811,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:
@@ -867,7 +875,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)
@@ -887,7 +895,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);
@@ -914,8 +922,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)
{
@@ -926,20 +934,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) ||
@@ -962,16 +970,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;
@@ -1026,23 +1034,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;
@@ -1050,7 +1058,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"));
@@ -1058,7 +1066,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, ")");
}
}
@@ -1194,9 +1202,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;
@@ -1246,27 +1254,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 (");
@@ -1287,7 +1295,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);
@@ -1455,14 +1463,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)
@@ -1488,6 +1496,7 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro
if (lap_tree)
{
+ /* Discovery flags */
ti = proto_tree_add_item(i_tree, hf_xid_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
flags_tree = proto_item_add_subtree(ti, ett_xid_flags);
proto_tree_add_item(flags_tree, hf_xid_s, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1497,7 +1506,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
@@ -1509,6 +1518,7 @@ static void dissect_xid(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, pro
proto_item_append_text(ti, " (final)");
}
}
+ /* Skip (empty?) byte even if no command.. Have seen non-zero values in a capture */
offset++;
if (lap_tree)
@@ -1523,9 +1533,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)
{
@@ -1535,7 +1545,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;
@@ -1589,13 +1599,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++;
@@ -1606,70 +1616,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);
@@ -1701,7 +1711,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);
@@ -1711,7 +1721,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)
@@ -1733,14 +1743,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");
@@ -1761,7 +1771,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);
@@ -1796,9 +1806,9 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
offset++;
/* process the control field */
- c = dissect_xdlc_control(tvb, 1, pinfo, tree, hf_lap_c,
+ 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) {
@@ -1838,7 +1848,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",
@@ -1855,7 +1865,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:
@@ -1887,7 +1897,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;
}
}
@@ -1918,11 +1928,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);
}
@@ -1931,7 +1941,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";
}
@@ -1948,7 +1958,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[] = {
@@ -2247,7 +2257,7 @@ void proto_register_irda(void)
};
/* Setup protocol subtree arrays */
- static gint* ett[] = {
+ static int* ett[] = {
&ett_irlap,
&ett_lap_a,
&ett_lap_c,
@@ -2262,8 +2272,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 */
@@ -2287,13 +2297,11 @@ void proto_register_irda(void)
proto_register_subtree_array(ett, array_length(ett));
for (i = 0; i < MAX_PARAMETERS; i++)
{
- ett_param[i] = -1;
ett_p[i] = &ett_param[i];
}
proto_register_subtree_array(ett_p, MAX_PARAMETERS);
for (i = 0; i < MAX_IAP_ENTRIES; i++)
{
- ett_iap_entry[i] = -1;
ett_iap_e[i] = &ett_iap_entry[i];
}
proto_register_subtree_array(ett_iap_e, MAX_IAP_ENTRIES);
diff --git a/plugins/epan/irda/packet-sir.c b/plugins/epan/irda/packet-sir.c
index 71b0e837..3aa81fe7 100644
--- a/plugins/epan/irda/packet-sir.c
+++ b/plugins/epan/irda/packet-sir.c
@@ -40,17 +40,17 @@ static dissector_handle_t irda_handle;
static dissector_handle_t sir_handle;
/** Protocol fields. */
-static int proto_sir = -1;
-static int ett_sir = -1;
-static int hf_sir_bof = -1;
-/* static int hf_sir_ce = -1; */
-static int hf_sir_eof = -1;
-static int hf_sir_fcs = -1;
-static int hf_sir_fcs_status = -1;
-static int hf_sir_length = -1;
-static int hf_sir_preamble = -1;
-
-static expert_field ei_sir_fcs = EI_INIT;
+static int proto_sir;
+static int ett_sir;
+static int hf_sir_bof;
+/* static int hf_sir_ce; */
+static int hf_sir_eof;
+static int hf_sir_fcs;
+static int hf_sir_fcs_status;
+static int hf_sir_length;
+static int hf_sir_preamble;
+
+static expert_field ei_sir_fcs;
/* Copied and renamed from proto.c because global value_strings don't work for plugins */
static const value_string plugin_proto_checksum_vals[] = {
@@ -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/examples/call.mate b/plugins/epan/mate/examples/call.mate
deleted file mode 100644
index 0dbbb45e..00000000
--- a/plugins/epan/mate/examples/call.mate
+++ /dev/null
@@ -1,34 +0,0 @@
-# call.mate
-
-Action=Settings; DiscardPduData=TRUE; ShowGopTimes=FALSE; ShowPduTree=FALSE;
-
-Action=PduDef; Name=q931_pdu; Proto=q931; Stop=TRUE; Transport=tcp/ip; addr=ip.addr; call_ref=q931.call_ref; q931_msg=q931.message_type;
-Action=PduDef; Name=ras_pdu; Proto=h225.RasMessage; Transport=udp/ip; addr=ip.addr; ras_sn=h225.requestSeqNum; ras_msg=h225.RasMessage;
-Action=PduDef; Name=isup_pdu; Proto=isup; Transport=mtp3; m3pc=mtp3.dpc; m3pc=mtp3.opc; cic=isup.cic; isup_msg=isup.message_type;
-
-Action=PduExtra; For=q931_pdu; guid=h225.guid; calling=q931.calling_party_number.digits; q931_cause=q931.cause_value;
-Action=PduExtra; For=isup_pdu; calling=isup.calling; isup_cause=isup.cause_indicator;
-Action=PduExtra; For=ras_pdu; guid=h225.guid;
-
-Action=GopDef; Name=q931_leg; On=q931_pdu; addr; addr; call_ref;
-Action=GopStart; For=q931_leg; q931_msg=5;
-Action=GopStop; For=q931_leg; q931_msg=90;
-Action=GopExtra; For=q931_leg; calling; q931_cause; guid;
-
-Action=GopDef; Name=isup_leg; On=isup_pdu; ShowPduTree=TRUE; ShowGopTimes=TRUE; m3pc; m3pc; cic;
-Action=GopStart; For=isup_leg; isup_msg=1;
-Action=GopStop; For=isup_leg; isup_msg=16;
-Action=GopExtra; For=isup_leg; calling; isup_cause;
-
-Action=GopDef; Name=ras_leg; On=ras_pdu; addr; addr; ras_sn;
-Action=GopStart; For=ras_leg; ras_msg|0|3|6|9|12|15|18|21|26|30;
-Action=GopStop; For=ras_leg; ras_msg|1|2|4|5|7|8|10|11|13|14|16|17|19|20|22|24|27|28|29|31;
-Action=GopExtra; For=ras_leg; guid;
-
-Action=GogDef; Name=call; GogExpiration=0.75;
-Action=GogKey; For=call; On=isup_leg; calling;
-Action=GogKey; For=call; On=q931_leg; calling;
-Action=GogKey; For=call; On=q931_leg; guid;
-Action=GogKey; For=call; On=ras_leg; guid;
-Action=GogExtra; For=call; isup_cause;
-Action=GogExtra; For=call; q931_cause;
diff --git a/plugins/epan/mate/examples/mms.mate b/plugins/epan/mate/examples/mms.mate
index 7554b119..43da3827 100644
--- a/plugins/epan/mate/examples/mms.mate
+++ b/plugins/epan/mate/examples/mms.mate
@@ -1,40 +1,57 @@
-# mms.mate
-
-# MMSE over HTTP
-Action=PduDef; Name=mmse_over_http_pdu; Proto=http; Transport=tcp/ip; Payload=mmse; addr=ip.addr; port=tcp.port; http_rq=http.request; content=http.content_type;
-Action=PduExtra; For=mmse_over_http_pdu; resp=http.response.code; method=http.request.method; host=http.host; content=http.content_type;
-Action=PduExtra; For=mmse_over_http_pdu; method=http.request.method; host=http.host;
-Action=PduExtra; For=mmse_over_http_pdu; trx=mmse.transaction_id; msg_type=mmse.message_type; notify_status=mmse.status; send_status=mmse.response_status;
-
-Action=Transform; Name=rm_client_from_http_resp1; Mode=Insert; Match=Strict; http_rq;
-Action=Transform; Name=rm_client_from_http_resp1; Mode=Insert; Match=Every; addr; .not_rq;
-
-Action=Transform; Name=rm_client_from_http_resp2; Mode=Replace; Match=Strict; not_rq; ue;
-
-Action=PduTransform; For=mmse_over_http_pdu; Name=rm_client_from_http_resp1;
-Action=PduTransform; For=mmse_over_http_pdu; Name=rm_client_from_http_resp2;
-
-Action=GopDef; Name=mmse_over_http; On=mmse_over_http_pdu; addr; addr; port; port;
-Action=GopStart; For=mmse_over_http; http_rq;
-Action=GopStop; For=mmse_over_http; http_rs;
-
-Action=GopExtra; For=mmse_over_http; host; ue; resp; notify_status; send_status; trx;
-
-# MMSE over WSP
-Action=PduDef; Name=mmse_over_wsp_pdu; Proto=wsp; Payload=mmse; Transport=ip; trx=mmse.transaction_id; msg_type=mmse.message_type; notify_status=mmse.status; send_status=mmse.response_status;
-
-Action=Transform; Name=mms_start; Match=Loose; .mms_start;
-
-Action=PduTransform; Name=mms_start; For=mmse_over_wsp_pdu;
-
-Action=GopDef; Name=mmse_over_wsp; On=mmse_over_wsp_pdu; trx;
-Action=GopStart; For=mmse_over_wsp; mms_start;
-Action=GopStop; For=mmse_over_wsp; never;
-
-Action=GopExtra; For=mmse_over_wsp; ue; notify_status; send_status;
-
-# the MMS GoG
-Action=GogDef; Name=mms; GogExpiration=60.0;
-Action=GogKey; For=mms; On=mmse_over_http; trx;
-Action=GogKey; For=mms; On=mmse_over_wsp; trx;
-Action=GogExtra; For=mms; ue; notify_status; send_status; resp; host; trx;
+Transform rm_client_from_http_resp1 {
+ Match (http_rq);
+ Match Every (addr) Insert (not_rq);
+};
+
+Transform rm_client_from_http_resp2 {
+ Match (not_rq,ue) Replace ();
+};
+
+Pdu mmse_over_http_pdu Proto http Transport tcp/ip {
+ Payload mmse;
+ Extract addr From ip.addr;
+ Extract port From tcp.port;
+ Extract http_rq From http.request;
+ Extract content From http.content_type;
+ Extract resp From http.response.code;
+ Extract method From http.request.method;
+ Extract host From http.host;
+ Extract content From http.content_type;
+ Extract trx From mmse.transaction_id;
+ Extract msg_type From mmse.message_type;
+ Extract notify_status From mmse.status;
+ Extract send_status From mmse.response_status;
+ Transform rm_client_from_http_resp1, rm_client_from_http_resp2;
+};
+
+Gop mmse_over_http On mmse_over_http_pdu Match (addr, addr, port, port) {
+ Start (http_rq);
+ Stop (http_rs);
+ Extra (host, ue, resp, notify_status, send_status, trx);
+};
+
+Transform mms_start {
+ Match Loose() Insert (mms_start);
+};
+
+Pdu mmse_over_wsp_pdu Proto wsp Transport ip {
+ Payload mmse;
+ Extract trx From mmse.transaction_id;
+ Extract msg_type From mmse.message_type;
+ Extract notify_status From mmse.status;
+ Extract send_status From mmse.response_status;
+ Transform mms_start;
+};
+
+Gop mmse_over_wsp On mmse_over_wsp_pdu Match (trx) {
+ Start (mms_start);
+ Stop (never);
+ Extra (ue, notify_status, send_status);
+};
+
+Gog mms {
+ Member mmse_over_http (trx);
+ Member mmse_over_wsp (trx);
+ Extra (ue, notify_status, send_status, resp, host, trx);
+ Expiration 60.0;
+};
diff --git a/plugins/epan/mate/examples/pasv_ftp.mate b/plugins/epan/mate/examples/pasv_ftp.mate
index 24ef7ab4..9a885280 100644
--- a/plugins/epan/mate/examples/pasv_ftp.mate
+++ b/plugins/epan/mate/examples/pasv_ftp.mate
@@ -1,18 +1,33 @@
-# pasv_ftp.mate
+Pdu ftp_pdu Proto ftp Transport tcp/ip {
+ Extract ftp_addr From ip.addr;
+ Extract ftp_port From tcp.port;
+ Extract ftp_resp From ftp.response.code;
+ Extract ftp_req From ftp.request.command;
+ Extract server_addr From ftp.passive.ip;
+ Extract server_port From ftp.passive.port;
-Action=PduDef; Name=ftp_pdu; Proto=ftp; Transport=tcp/ip; Stop=TRUE; ftp_addr=ip.addr; ftp_port=tcp.port; ftp_resp=ftp.response.code; ftp_req=ftp.request.command; server_addr=ftp.passive.ip; server_port=ftp.passive.port;
+ LastPdu true;
+};
-Action=PduDef; Name=ftp_data_pdu; Proto=ftp-data; Transport=tcp/ip; server_addr=ip.src; server_port=tcp.srcport;
+Pdu ftp_data_pdu Proto ftp-data Transport tcp/ip{
+ Extract server_addr From ip.src;
+ Extract server_port From tcp.srcport;
-Action=GopDef; Name=ftp_data; On=ftp_data_pdu; server_addr; server_port;
-Action=GopStart; For=ftp_data; server_addr;
+};
-Action=GopDef; Name=ftp_ctl; On=ftp_pdu; ftp_addr; ftp_addr; ftp_port; ftp_port;
-Action=GopStart; For=ftp_ctl; ftp_resp=220;
-Action=GopStop; For=ftp_ctl; ftp_resp=221;
-Action=GopExtra; For=ftp_ctl; server_addr; server_port;
+Gop ftp_data On ftp_data_pdu Match (server_addr, server_port) {
+ Start (server_addr);
+};
-Action=GogDef; Name=ftp_ses;
-Action=GogKey; For=ftp_ses; On=ftp_ctl; ftp_addr; ftp_addr; ftp_port; ftp_port;
-Action=GogKey; For=ftp_ses; On=ftp_data; server_addr; server_port;
+Gop ftp_ctl On ftp_pdu Match (ftp_addr, ftp_addr, ftp_port, ftp_port) {
+ Start (ftp_resp=220);
+ Stop (ftp_resp=221);
+ Extra (server_addr, server_port);
+};
+Gog ftp_ses {
+ Member ftp_ctl (ftp_addr, ftp_addr, ftp_port, ftp_port);
+ Member ftp_data (server_addr, server_port);
+};
+
+Done;
diff --git a/plugins/epan/mate/examples/tcp.mate b/plugins/epan/mate/examples/tcp.mate
index 2abe3e88..541acf87 100644
--- a/plugins/epan/mate/examples/tcp.mate
+++ b/plugins/epan/mate/examples/tcp.mate
@@ -1,7 +1,20 @@
-# tcp.mate
+Transform add_tcp_stop {
+ Match (tcp_flags_reset="True") Insert (tcp_stop="True");
+ Match (tcp_flags_fin="True") Insert (tcp_stop="True");
+};
- Action=PduDef; Name=tcp_pdu; Proto=tcp; Transport=ip; addr=ip.addr; port=tcp.port; tcp_start=tcp.flags.syn; tcp_stop=tcp.flags.fin; tcp_stop=tcp.flags.reset;
- Action=GopDef; Name=tcp_session; On=tcp_pdu; addr; addr; port; port;
- Action=GopStart; For=tcp_session; tcp_start=1;
- Action=GopStop; For=tcp_session; tcp_stop=1;
+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_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="True");
+ Stop (tcp_stop="True");
+};
+
+Done;
diff --git a/plugins/epan/mate/examples/web.mate b/plugins/epan/mate/examples/web.mate
index fd00c651..7b3d2246 100644
--- a/plugins/epan/mate/examples/web.mate
+++ b/plugins/epan/mate/examples/web.mate
@@ -1,27 +1,52 @@
-# web.mate
-
-Action=PduDef; Name=dns_pdu; Proto=dns; Transport=ip; addr=ip.addr; dns_resp=dns.flags.response; host=dns.qry.name; client_addr=ip.src; dns_id=dns.id;
-Action=PduDef; Name=http_pdu; Proto=http; Transport=tcp/ip; addr=ip.addr; port=tcp.port; http_rq=http.request.method; http_rs=http.response; host=http.host; client_addr=ip.src;
-
-Action=GopDef; Name=dns_req; On=dns_pdu; addr; addr; dns_id;
-Action=GopStart; For=dns_req; dns_resp=0;
-Action=GopStop; For=dns_req; dns_resp=1;
-
-Action=GopDef; Name=http_req; On=http_pdu; addr; addr; port; port;
-Action=GopStart; For=http_req; http_rq;
-Action=GopStop; For=http_req; http_rs;
-
-Action=Transform; Name=rm_client_from_dns_resp; Mode=Replace; Match=Every; dns_resp=1; client_addr; .dns_resp=1;
-Action=PduTransform; For=dns_pdu; Name=rm_client_from_dns_resp;
-
-Action=Transform; Name=rm_client_from_http_resp; Mode=Replace; Match=Every; http_rs; client_addr; .http_rs=;
-Action=PduTransform; For=http_pdu; Name=rm_client_from_http_resp;
-
-Action=GopExtra; For=http_req; host; client_addr;
-Action=GopExtra; For=dns_req; host; client_addr;
-
-Action=GogDef; Name=http_use; GogExpiration=0.75;
-Action=GogKey; For=http_use; On=http_req; host; client_addr;
-Action=GogKey; For=http_use; On=dns_req; host;client_addr;
-
-Action=GogExtra; For=http_use; host; client_addr;
+Transform rm_client_from_dns_resp {
+ Match (dns_resp=1, client) Replace (dns_resp=1);
+};
+
+Pdu dns_pdu Proto dns Transport ip {
+ Extract addr From ip.addr;
+ Extract dns_id From dns.id;
+ Extract dns_resp From dns.flags.response;
+ Extract host From dns.qry.name;
+ Extract client From ip.src;
+ Transform rm_client_from_dns_resp;
+};
+
+Gop dns_req On dns_pdu Match (addr,addr,dns_id) {
+ Start (dns_resp=0);
+ Stop (dns_resp=1);
+ Extra (host, client);
+};
+
+Transform rm_client_from_http_resp1 {
+ Match (http_rq);
+ Match Every (addr) Insert (not_rq);
+};
+
+Transform rm_client_from_http_resp2 {
+ Match (not_rq, client) Replace ();
+};
+
+Pdu http_pdu Proto http Transport tcp/ip {
+ Extract addr From ip.addr;
+ Extract port From tcp.port;
+ Extract http_rq From http.request.method;
+ Extract http_rs From http.response;
+ Extract host From http.host;
+ Extract client From ip.src;
+ Transform rm_client_from_http_resp1, rm_client_from_http_resp2;
+ DiscardPduData true;
+};
+
+Gop http_req On http_pdu Match (addr, addr, port, port) {
+ Start (http_rq);
+ Stop (http_rs);
+ Extra (host, client);
+};
+
+Gog http_use {
+ Member http_req (host, client);
+ Member dns_req (host, client);
+ Expiration 0.75;
+};
+
+Done;
diff --git a/plugins/epan/mate/mate.h b/plugins/epan/mate/mate.h
index 79f46af8..b449aa0c 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; /* wich frame I belog 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 57f291fe..fef0ac27 100644
--- a/plugins/epan/mate/mate_grammar.lemon
+++ b/plugins/epan/mate/mate_grammar.lemon
@@ -31,7 +31,7 @@
#define DUMMY void*
typedef struct _extraction {
- gchar* as;
+ char* as;
header_field_info* hfi;
struct _extraction* next;
struct _extraction* last;
@@ -45,18 +45,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 +73,10 @@ 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;
+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 +84,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 +94,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 +120,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 +181,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 +190,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 +210,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 +230,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 +253,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 +275,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); }
@@ -445,7 +449,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 +526,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 +567,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 +600,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 +614,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 +646,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 6e423abc..aff57aad 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 8cda791a..0227dd45 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 eef97643..03ad1543 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);
@@ -177,11 +177,11 @@ extern gboolean add_hfid(mate_config* mc, header_field_info* hfi, gchar* how, G
#if 0
/*
- * XXX - where is this suposed to be used?
+ * 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 5b4d0780..dcfe36c0 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;
@@ -825,7 +825,7 @@ extern void merge_avpl(AVPL* dst, AVPL* src, gboolean copy_avps) {
}
}
- // if there are remaing source AVPs while there are no more destination
+ // if there are remaining source AVPs while there are no more destination
// AVPs (cd now represents the NULL item, after the last item), append
// all remaining source AVPs to the end
while (cs->avp) {
@@ -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;
@@ -883,7 +883,7 @@ extern AVPL* new_avpl_from_avpl(const gchar* name, AVPL* avpl, gboolean copy_avp
/**
* match_avp:
- * @param src an src to be compared agains an "op" avp
+ * @param src an src to be compared against an "op" avp
* @param op the "op" avp that will be matched against the src avp
*
* Checks whether or not two avp's match.
@@ -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;
@@ -961,7 +961,7 @@ extern AVP* match_avp(AVP* src, AVP* op) {
/* case AVP_OP_TRANSF: */
/* return do_transform(src,op); */
case AVP_OP_CONTAINS:
- return g_strrstr(src->v, op->v) ? src : NULL;;
+ return g_strrstr(src->v, op->v) ? src : NULL;
}
/* will never get here */
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) {
@@ -1117,25 +1117,25 @@ extern AVPL* new_avpl_pairs_match(const gchar* name, AVPL* src, AVPL* op, gboole
* new_avpl_from_match:
* @param mode The matching method, one of AVPL_STRICT, AVPL_LOOSE, AVPL_EVERY.
* @param name the name of the resulting avpl
- * @param src the data AVPL to be matched agains a condition 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
*
* Matches the conditions AVPL against the original AVPL according to the mode.
* 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 0764ea5e..7a888e0a 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 2b36659e..6e76ab4d 100644
--- a/plugins/epan/mate/packet-mate.c
+++ b/plugins/epan/mate/packet-mate.c
@@ -24,27 +24,27 @@
void proto_register_mate(void);
void proto_reg_handoff_mate(void);
-static mate_config* mc = NULL;
+static mate_config* mc;
-static int proto_mate = -1;
+static int proto_mate;
-static int hf_mate_released_time = -1;
-static int hf_mate_duration = -1;
-static int hf_mate_number_of_pdus = -1;
-static int hf_mate_started_at = -1;
-static int hf_mate_gop_key = -1;
+static int hf_mate_released_time;
+static int hf_mate_duration;
+static int hf_mate_number_of_pdus;
+static int hf_mate_started_at;
+static int hf_mate_gop_key;
-static expert_field ei_mate_undefined_attribute = EI_INIT;
+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 2f43d42c..7299358f 100644
--- a/plugins/epan/opcua/CMakeLists.txt
+++ b/plugins/epan/opcua/CMakeLists.txt
@@ -28,6 +28,7 @@ set(DISSECTOR_SUPPORT_SRC
opcua_extensionobjecttable.c
opcua_hfindeces.c
opcua_statuscode.c
+ opcua_keyset.c
)
set(PLUGIN_FILES
@@ -50,7 +51,7 @@ register_plugin_files(plugin.c
add_wireshark_plugin_library(opcua epan)
-target_link_libraries(opcua epan)
+target_link_libraries(opcua epan ${GCRYPT_LIBRARIES})
install_plugin(opcua epan)
diff --git a/plugins/epan/opcua/README b/plugins/epan/opcua/README
index 8c4993be..225fbea5 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 33d966a9..5872a207 100644
--- a/plugins/epan/opcua/opcua.c
+++ b/plugins/epan/opcua/opcua.c
@@ -14,54 +14,82 @@
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
******************************************************************************/
-#include "config.h"
-
+#include <epan/dissectors/packet-tcp.h>
#include <epan/packet.h>
+#include <epan/prefs.h>
+#include <epan/range.h>
#include <epan/reassemble.h>
-#include <epan/dissectors/packet-tcp.h>
-#include "opcua_transport_layer.h"
-#include "opcua_security_layer.h"
+#include <epan/secrets.h>
+#include <epan/tvbuff.h>
+#include <gcrypt.h>
+#include <wiretap/secrets-types.h>
+#include <wsutil/file_util.h>
+
+#include "config.h"
#include "opcua_application_layer.h"
#include "opcua_complextypeparser.h"
-#include "opcua_serviceparser.h"
#include "opcua_enumparser.h"
-#include "opcua_simpletypes.h"
#include "opcua_hfindeces.h"
+#include "opcua_keyset.h"
+#include "opcua_security_layer.h"
+#include "opcua_serviceparser.h"
+#include "opcua_serviceids.h"
+#include "opcua_simpletypes.h"
+#include "opcua_transport_layer.h"
void proto_register_opcua(void);
extern const value_string g_requesttypes[];
extern const int g_NumServices;
+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);
+typedef int (*FctParse)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data);
-int proto_opcua = -1;
+int proto_opcua;
static dissector_handle_t opcua_handle;
+static module_t *opcua_module;
+
+/* #define OPCUA_DEBUG */
+#ifdef OPCUA_DEBUG
+# define debugprintf(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__);
+#else
+# define debugprintf(fmt, ...)
+#endif
+
/** Official IANA registered port for OPC UA Binary Protocol. */
+#define OPCUA_DEFAULT_PORT 4840
+/* default port range for preferences */
#define OPCUA_PORT_RANGE "4840"
+/** header length that is needed to compute the pdu length.
+ * @see get_opcua_message_len
+ */
+#define FRAME_HEADER_LEN 8
+/* AES block size: for both AES128 and AES256 the block size is 128 bits */
+#define AES_BLOCK_SIZE 16
/** subtree types used in opcua_transport_layer.c */
-gint ett_opcua_extensionobject = -1;
-gint ett_opcua_nodeid = -1;
+int ett_opcua_extensionobject;
+int ett_opcua_nodeid;
/** subtree types used locally */
-static gint ett_opcua_transport = -1;
-static gint ett_opcua_fragment = -1;
-static gint ett_opcua_fragments = -1;
-
-static int hf_opcua_fragments = -1;
-static int hf_opcua_fragment = -1;
-static int hf_opcua_fragment_overlap = -1;
-static int hf_opcua_fragment_overlap_conflicts = -1;
-static int hf_opcua_fragment_multiple_tails = -1;
-static int hf_opcua_fragment_too_long_fragment = -1;
-static int hf_opcua_fragment_error = -1;
-static int hf_opcua_fragment_count = -1;
-static int hf_opcua_reassembled_in = -1;
-static int hf_opcua_reassembled_length = -1;
+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;
+static int hf_opcua_fragment_overlap;
+static int hf_opcua_fragment_overlap_conflicts;
+static int hf_opcua_fragment_multiple_tails;
+static int hf_opcua_fragment_too_long_fragment;
+static int hf_opcua_fragment_error;
+static int hf_opcua_fragment_count;
+static int hf_opcua_reassembled_in;
+static int hf_opcua_reassembled_length;
static const fragment_items opcua_frag_items = {
/* Fragment subtrees */
@@ -86,7 +114,6 @@ static const fragment_items opcua_frag_items = {
"Message fragments"
};
-
static reassembly_table opcua_reassembly_table;
/** OpcUa Transport Message Types */
@@ -115,23 +142,35 @@ static const char* g_szMessageTypes[] =
"Invalid message"
};
+static const enum_val_t opcua_sig_len_enum[] = {
+ { "None", "Unsigned", 0 },
+ { "20", "20 Bytes", 20 },
+ { "32", "32 Bytes", 32 },
+ { NULL, NULL, 0 }
+};
-
-
-/** header length that is needed to compute
- * the pdu length.
- * @see get_opcua_message_len
- */
-#define FRAME_HEADER_LEN 8
+#ifdef _MSC_VER
+static char *ua_strtok_r(char *str, const char *delim, char **saveptr)
+{
+ /* use MSVC specific strtok_s */
+ return strtok_s(str, delim, saveptr);
+}
+#else
+static char *ua_strtok_r(char *str, const char *delim, char **saveptr)
+{
+ /* use POSIX strtok_r */
+ return strtok_r(str, delim, saveptr);
+}
+#endif
/** returns the length of an OpcUa message.
* 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);
@@ -139,6 +178,315 @@ static guint get_opcua_message_len(packet_info *pinfo _U_, tvbuff_t *tvb,
return plen;
}
+/* Helper function to convert hex string to binary data */
+unsigned hex_to_bin(const char *hex_string, unsigned char *binary_data, unsigned int binary_size)
+{
+ 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]);
+ }
+
+ return i;
+}
+
+/** Parsing context */
+struct opcua_keylog_parser_ctx {
+ struct ua_keyset *keyset; /**< current keyset */
+ uint64_t last_id; /**< the id of the previous line, this is also the id of the keyset */
+};
+
+/**
+ * Common function for parsing key log line used by opcua_keylog_process_lines and opcua_load_keylog_file.
+ *
+ * @param ctx Parsing context.
+ * @param line Current line to parse.
+ */
+static void opcua_keylog_process_line(struct opcua_keylog_parser_ctx *ctx, const char *line)
+{
+ struct ua_keyset *keyset;
+ char key[33]; /* 32 chars + null terminator */
+ char value[65]; /* 64 hex chars + null terminator */
+ const char *parts[4]; /* for string split */
+ unsigned int num_parts;
+ char *tmp, *saveptr;
+ uint32_t token_id = 0;
+ uint32_t channel_id = 0;
+ uint64_t id = 0;
+ int n;
+
+ /* parse key/value pair */
+ n = sscanf(line, "%32[^:]: %64s\n", key, value);
+ if (n != 2) return;
+
+ debugprintf("%s = %s\n", key, value);
+
+ /* split key into parts */
+ num_parts = 0;
+ tmp = ua_strtok_r(key, "_", &saveptr);
+ while (tmp && num_parts < 4) {
+ parts[num_parts++] = tmp;
+ tmp = ua_strtok_r(NULL, "_", &saveptr);
+ }
+ if (num_parts != 4) return; /* skip invalid enty */
+ channel_id = (uint32_t)strtoul(parts[2], NULL, 10);
+ token_id = (uint32_t)strtoul(parts[3], NULL, 10);
+
+ debugprintf("channel_id = %u\n", channel_id);
+ debugprintf("token_id = %u\n", token_id);
+
+ /* create unique keyset id */
+ id = ua_keyset_id(channel_id, token_id);
+
+ if (ctx->keyset == NULL || id != ctx->last_id) {
+ debugprintf("Adding new keyset for id %lu...\n", id);
+ /* create new keyset for new id */
+ ctx->keyset = ua_keysets_add();
+ ctx->last_id = id;
+ }
+ keyset = ctx->keyset;
+ if (keyset) {
+ keyset->id = id;
+ /* store key material */
+ if (strcmp(parts[0], "client") == 0) {
+ if (strcmp(parts[1], "iv") == 0) {
+ hex_to_bin(value, keyset->client_iv, sizeof(keyset->client_iv));
+ } else if (strcmp(parts[1], "key") == 0) {
+ keyset->client_key_len = (unsigned int)hex_to_bin(value, keyset->client_key, sizeof(keyset->client_key));
+ } else if (strcmp(parts[1], "siglen") == 0) {
+ keyset->client_sig_len = (unsigned int)strtoul(value, NULL, 10);
+ }
+ } else if (strcmp(parts[0], "server") == 0) {
+ if (strcmp(parts[1], "iv") == 0) {
+ hex_to_bin(value, keyset->server_iv, sizeof(keyset->server_iv));
+ } else if (strcmp(parts[1], "key") == 0) {
+ keyset->server_key_len = (unsigned int)hex_to_bin(value, keyset->server_key, sizeof(keyset->server_key));
+ } else if (strcmp(parts[1], "siglen") == 0) {
+ keyset->server_sig_len = (unsigned int)strtoul(value, NULL, 10);
+ }
+ }
+ }
+}
+
+/**
+ * Parses key log data from PCAP file.
+ * This function splits the data by \n and calls opcua_keylog_process_line.
+ */
+static void opcua_keylog_process_lines(char *data)
+{
+ struct opcua_keylog_parser_ctx ctx = { NULL, 0 };
+ char *saveptr;
+ const char *line = ua_strtok_r(data, "\n", &saveptr);
+
+ while (line) {
+ opcua_keylog_process_line(&ctx, line);
+ line = ua_strtok_r(NULL, "\n", &saveptr);
+ }
+
+ /* sort data by id to make lookup working */
+ ua_keysets_sort();
+}
+
+/**
+ * Loads the configured OPCUA Keylog file.
+ */
+static void opcua_load_keylog_file(const char *filename)
+{
+ struct opcua_keylog_parser_ctx ctx = { NULL, 0 };
+ char line[256];
+
+ debugprintf("Loading key file '%s'...\n", filename);
+ FILE *f = ws_fopen(filename, "r");
+ if (f == NULL) {
+ debugprintf("error: '%s' not found\n", filename);
+ return;
+ }
+
+ /* parse file contents */
+ while (fgets(line, sizeof(line), f)) {
+ opcua_keylog_process_line(&ctx, line);
+ }
+ fclose(f);
+
+ /* sort data by id to make lookup working */
+ ua_keysets_sort();
+}
+
+/**
+ * Checks the padding of a symetric signed message.
+ * A message always contains a padding_len byte, which tells us the length of
+ * the padding. All following padding bytes contain the same value. This makes it
+ * possible the padding from the end of the message.
+ * Example Paddings:
+ * - 00
+ * - 01 01
+ * - 02 02 02
+ * @param padding Pointer to last padding byte.
+ * @return padding length on success, -1 if the paddding is invalid.
+ */
+static int verify_padding(const uint8_t *padding)
+{
+ uint8_t pad_len;
+ uint8_t i;
+
+ pad_len = *padding;
+
+ for (i = 0; i < pad_len; ++i) {
+ if (padding[-pad_len + i] != pad_len) return -1;
+ }
+
+ return pad_len;
+}
+/**
+ * Gets security footer info.
+ *
+ * @param channel_id SecureChannelId for keyset lookup.
+ * @param token_id TokenId for keyset lookup.
+ * @param sig_len Returns the length of the signature.
+ * @param from_server True of the message is sent from the server, false when sent from the client.
+ *
+ * @return Returns 0 on success, -1 if parsing failed.
+ */
+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;
+
+ id = ua_keyset_id(channel_id, token_id);
+
+ /* try to get correct signature length from key log file */
+ keyset = ua_keysets_lookup(id);
+ if (keyset) {
+ /* The Client keys are used to secure Messages sent by the Client. The Server keys are used to
+ * secure Messages sent by the Server.
+ */
+ if (from_server) {
+ *sig_len = keyset->server_sig_len;
+ } else {
+ *sig_len = keyset->client_sig_len;
+ }
+ }
+
+ debugprintf("no keyset found for channel_id=%u and token_id=%u\n", channel_id, token_id);
+ /* we use sig_len set from OpenSecurehChannel Policy in this case.
+ * this requires to have the OPN in the capture file, otherwise we are out of luck.
+ */
+
+ return 0;
+}
+
+/**
+ * This function to perform AES decryption on service data in-place.
+ * Add also determines the payload length by removing the padding and signature.
+ *
+ * @param channel_id SecureChannelId for keyset lookup.
+ * @param token_id TokenId for keyset lookup.
+ * @param cipher The cipher text.
+ * @param cipher_len The cipher test length in bytes.
+ * @param plaintext The plaintext to return.
+ * @param plaintext_len The plaintext in bytes, should be the same as cipher_len.
+ * @param padding_len Returns the length of the padding.
+ * @param sig_len Returns the length of the signature.
+ * @param from_server True of the message is sent from the server, false when sent from the client.
+ *
+ * @return Returns 0 on success, -1 if decryption failed.
+ */
+static int decrypt_opcua(
+ uint32_t channel_id, uint32_t token_id,
+ 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;
+ unsigned int keylen, ivlen;
+ unsigned char *keydata, *ivdata;
+ int cipher_mode;
+ gcry_error_t res;
+ int ret = 0;
+
+ id = ua_keyset_id(channel_id, token_id);
+
+ keyset = ua_keysets_lookup(id);
+ if (keyset == NULL) {
+ debugprintf("no keyset found for channel_id=%u and token_id=%u\n", channel_id, token_id);
+ /* col_append_fstr(pinfo->cinfo, COL_INFO, " (encrypted)"); */
+ return -1;
+ }
+ debugprintf("found keyset for channel_id=%u and token_id=%u\n", channel_id, token_id);
+
+ /* The Client keys are used to secure Messages sent by the Client. The Server keys are used to
+ * secure Messages sent by the Server.
+ */
+ if (from_server) {
+ ivlen = sizeof(keyset->server_iv);
+ ivdata = keyset->server_iv;
+ keylen = keyset->server_key_len;
+ keydata = keyset->server_key;
+ *sig_len = keyset->server_sig_len;
+ } else {
+ ivlen = sizeof(keyset->client_iv);
+ ivdata = keyset->client_iv;
+ keylen = keyset->client_key_len;
+ keydata = keyset->client_key;
+ *sig_len = keyset->client_sig_len;
+ }
+ /* derive AES mode from key length */
+ switch (keylen) {
+ case 16:
+ debugprintf("using AES-128-CBC\n");
+ cipher_mode = GCRY_CIPHER_AES128;
+ break;
+ case 32:
+ debugprintf("using AES-256-CBC\n");
+ cipher_mode = GCRY_CIPHER_AES256;
+ break;
+ default:
+ debugprintf("invalid AES key length: %u bytes\n", keylen);
+ /* col_append_fstr(pinfo->cinfo, COL_INFO, " (encrypted)"); */
+ return -1;
+ }
+
+ debugprintf("cipher_len=%u\n", cipher_len);
+ if (cipher_len % 16 != 0) {
+ debugprintf("warning: cipher_len not a multiple of 16.\n");
+ }
+
+ gcry_cipher_hd_t handle;
+ gcry_cipher_open(&handle, cipher_mode, GCRY_CIPHER_MODE_CBC, GCRY_CIPHER_CBC_CTS);
+ gcry_cipher_setkey(handle, keydata, keylen);
+ gcry_cipher_setiv(handle, ivdata, ivlen);
+
+ /* Decrypt the data in-place */
+ res = gcry_cipher_decrypt(handle, plaintext, plaintext_len, cipher, cipher_len);
+ if (res == 0) {
+ /* col_append_fstr(pinfo->cinfo, COL_INFO, " (decrypted)"); */
+ debugprintf("decryption succeeded.\n");
+ } else {
+ /* col_append_fstr(pinfo->cinfo, COL_INFO, " (encrypted)"); */
+ debugprintf("decryption failed.\n");
+ ret = -1;
+ }
+ gcry_cipher_close(handle);
+ /* it makes no sense to continue and verify the padding if decryption failed */
+ if (ret != 0) {
+ return ret;
+ }
+
+ ret = verify_padding(&plaintext[plaintext_len - *sig_len - 1]);
+ if (ret < 0) {
+ debugprintf("padding is invalid.\n");
+ }
+
+ /* return padding length */
+ *padding_len = plaintext[plaintext_len - *sig_len - 1];
+ debugprintf("sig_len=%u\n", *sig_len);
+ debugprintf("pad_len=%u\n", *padding_len);
+
+ return 0;
+}
+
/** The OpcUa message dissector.
* This method dissects full OpcUa messages.
* It gets only called with reassembled data
@@ -148,41 +496,64 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
{
FctParse pfctParse = NULL;
enum MessageType msgtype = MSG_INVALID;
+ uint16_t src_port = pinfo->srcport;
+ range_t *port_range;
+ bool from_server = false;
+ bool decrypted = false; /* successfully decrypted secure message */
+ enum ua_message_mode mode = UA_MessageMode_None;
+ uint8_t sig_len = 0;
+ struct ua_metadata metadata;
+ tvbuff_t *decrypted_tvb = NULL;
+ int ret;
+
+ /* determine if telegram is from server or from client by checking the port number */
+ if (src_port == OPCUA_DEFAULT_PORT) {
+ from_server = true;
+ } else {
+ port_range = prefs_get_range_value("opcua", "tcp.port");
+ if (port_range && value_is_in_range(port_range, src_port)) {
+ from_server = true;
+ }
+ }
+
+ metadata.encrypted = false;
+ get_encryption_info(pinfo, &mode, &sig_len);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OpcUa");
+
/* 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;
@@ -205,11 +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;
- tvbuff_t *next_tvb = tvb;
- gboolean bParseService = TRUE;
- gboolean bIsLastFragment = FALSE;
+ 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;
@@ -218,83 +590,149 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
ti = proto_tree_add_item(tree, proto_opcua, tvb, 0, -1, ENC_NA);
transport_tree = proto_item_add_subtree(ti, ett_opcua_transport);
- /* MSG_MESSAGE might be fragmented, check for that */
- if (msgtype == MSG_MESSAGE)
+ /* call the transport message dissector */
+ (*pfctParse)(transport_tree, tvb, pinfo, &offset, &metadata);
+
+ /* MSG_MESSAGE and MSG_CLOSESECURECHANNEL can be decrypted.
+ * Also handle chunked message reassembly for MSG_MESSAGE.
+ */
+ if (msgtype == MSG_MESSAGE || msgtype == MSG_CLOSESECURECHANNEL)
{
- guint8 chunkType = 0;
- guint32 opcua_seqid = 0;
- guint32 opcua_num = 0;
- guint32 opcua_seqnum;
+ 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;
- fragment_item *frag_i = NULL;
+ bParseService = true;
offset = 3;
+ 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) */
+
+ if (mode == UA_MessageMode_MaybeEncrypted) {
+ /* try to parse ServiceId */
+ iServiceId = getServiceNodeId(tvb, offset + 8); /* skip 4 byte SeqNo and 4 byte RequestId */
+ const char *szServiceName = val_to_str((uint32_t)iServiceId, g_requesttypes, "not found");
+ if (strcmp(szServiceName, "not found") == 0) {
+ mode = UA_MessageMode_SignAndEncrypt;
+ } else {
+ mode = UA_MessageMode_Sign;
+ }
+ store_encryption_info(pinfo, mode, sig_len);
+ }
- chunkType = tvb_get_guint8(tvb, offset); offset += 1;
-
- offset += 4; /* Message Size */
- offset += 4; /* SecureChannelId */
- offset += 4; /* Security Token Id */
+ /* Message Structure:
+ * +-----------------+
+ * / | Message Header | MSGF, MessageSize
+ * | +-----------------+
+ * | | Security Header | SecureChannelId, TokenId
+ * | +-----------------+
+ * Signed < | Sequence Header | \ SequenceNumber, RequestId
+ * | +-----------------+ |
+ * | | Body | |
+ * | +-----------------+ > Encrypted
+ * \ | Padding | |
+ * +-----------------+ |
+ * | Signature | /
+ * +-----------------+
+ */
+ if (mode == UA_MessageMode_SignAndEncrypt) {
+ uint32_t channel_id = tvb_get_letohl(tvb, 8);
+ uint32_t token_id = tvb_get_letohl(tvb, 12);
+ 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) {
+ /* decrypted */
+ /* to get the payload length we need to subtract the sequence header (8) byte,
+ * 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, (unsigned)plaintext_len, (int)plaintext_len);
+ add_new_data_source(pinfo, decrypted_tvb, "Decrypted Data");
+ /* process decrypted_tvb from here */
+ tvb = decrypted_tvb;
+ offset = 0;
+ decrypted = true;
+ } else {
+ /* decryption failed */
+ metadata.encrypted = true;
+ }
+ } else if (mode == UA_MessageMode_Sign) {
+ uint32_t channel_id = tvb_get_letohl(tvb, 8);
+ uint32_t token_id = tvb_get_letohl(tvb, 12);
+ payload_len = tvb_ensure_captured_length_remaining(tvb, 24); /* subtract header */
+
+ ret = opcua_get_footer_info(channel_id, token_id, &sig_len, from_server);
+ if (ret != 0) {
+ debugprintf("Processing security footer of signed message failed.\n");
+ } else {
+ /* signed only messages have no padding, so the payload is the message size
+ * without 24 byte header and without signature */
+ payload_len -= sig_len;
+ }
+ /* store the current tvb as decrypted tvb, because we need this to parse the signature
+ * at the end, and tvb gets replaces with the reassembled UA message if the message was chunked.
+ */
+ decrypted_tvb = tvb;
+ } else {
+ /* no padding, no signature, just payload */
+ payload_len = tvb_ensure_captured_length_remaining(tvb, 24); /* subtract header */
+ pad_len= 0;
+ sig_len = 0;
+ }
- opcua_num = tvb_get_letohl(tvb, offset); offset += 4; /* Security Sequence Number */
- opcua_seqid = tvb_get_letohl(tvb, offset); offset += 4; /* Security RequestId */
+ opcua_seqno = tvb_get_letohl(tvb, offset); /* Sequence.Sequence Number */
+ opcua_reqid = tvb_get_letohl(tvb, offset + 4); /* Sequence.RequestId */
+ parseSequenceHeader(transport_tree, tvb, &offset, &metadata);
if (chunkType == 'A')
{
- fragment_delete(&opcua_reassembly_table, pinfo, opcua_seqid, NULL);
+ /* cancel chunk reassembly */
+ fragment_delete(&opcua_reassembly_table, pinfo, opcua_reqid, NULL);
col_clear_fence(pinfo->cinfo, COL_INFO);
col_set_str(pinfo->cinfo, COL_INFO, "Abort message");
offset = 0;
- (*pfctParse)(transport_tree, tvb, pinfo, &offset);
- parseAbort(transport_tree, tvb, pinfo, &offset);
+ (*pfctParse)(transport_tree, tvb, pinfo, &offset, &metadata);
+ parseAbort(transport_tree, tvb, pinfo, &offset, &metadata);
return tvb_reported_length(tvb);
}
/* check if tvb is part of a chunked message:
the UA protocol does not tell us that, so we look into
- opcua_reassembly_table if the opcua_seqid belongs to a
+ opcua_reassembly_table if the opcua_reqid belongs to a
chunked message */
- frag_msg = fragment_get(&opcua_reassembly_table, pinfo, opcua_seqid, NULL);
+ frag_msg = fragment_get(&opcua_reassembly_table, pinfo, opcua_reqid, NULL);
if (frag_msg == NULL)
{
- frag_msg = fragment_get_reassembled_id(&opcua_reassembly_table, pinfo, opcua_seqid);
+ frag_msg = fragment_get_reassembled_id(&opcua_reassembly_table, pinfo, opcua_reqid);
}
- if (frag_msg != NULL || chunkType != 'F')
+ if (frag_msg != NULL || chunkType == 'C')
{
- gboolean bSaveFragmented = pinfo->fragmented;
- gboolean bMoreFragments = TRUE;
- tvbuff_t *new_tvb = NULL;
+ 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)
{
- /* first fragment */
- opcua_seqnum = 0;
+ first_frag = true;
}
else
{
- /* the UA protocol does not number the chunks beginning from 0 but from a
- arbitrary value, so we have to fake the numbers in the stored fragments.
- this way Wireshark reassembles the message, as it expects the fragment
- sequence numbers to start at 0 */
- for (frag_i = frag_msg->next; frag_i && frag_i->next; frag_i = frag_i->next) {}
- if (frag_i) {
- opcua_seqnum = frag_i->offset + 1;
- } else {
- /* We should never have a fragment head with no fragment items, but
- * just in case.
- */
- opcua_seqnum = 0;
- }
-
if (chunkType == 'F')
{
- bMoreFragments = FALSE;
+ bMoreFragments = false;
}
}
@@ -302,77 +740,100 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
tvb,
offset,
pinfo,
- opcua_seqid, /* ID for fragments belonging together */
+ opcua_reqid, /* ID for fragments belonging together */
NULL,
- opcua_seqnum, /* fragment sequence number */
- tvb_captured_length_remaining(tvb, offset), /* fragment length - to the end */
+ first_frag ? 0 : opcua_seqno, /* fragment sequence number */
+ payload_len,
bMoreFragments); /* More fragments? */
- new_tvb = process_reassembled_data(tvb,
+ if (first_frag) {
+ /* the UA protocol does not number the chunks beginning
+ * from 0 but uses the common sequence number. We
+ * handle that in Wireshark by setting the sequence
+ * offset here, after passing in 0 for the first
+ * fragment. For later fragments we can use the
+ * sequence number as contained in the protocol.
+ */
+
+ fragment_add_seq_offset(&opcua_reassembly_table, pinfo, opcua_reqid, NULL, opcua_seqno);
+ }
+ reassembled_tvb = process_reassembled_data(tvb,
offset,
pinfo,
- "Reassembled Message",
+ "Reassembled UA Message",
frag_msg,
&opcua_frag_items,
NULL,
transport_tree);
- if (new_tvb)
+ if (reassembled_tvb)
{
/* Reassembled */
- bIsLastFragment = TRUE;
- }
- else
- {
- /* Not last packet of reassembled UA message */
- col_append_fstr(pinfo->cinfo, COL_INFO, " (Message fragment %u)", opcua_num);
- }
-
- if (new_tvb)
- {
+ bIsFinalChunk = true;
/* take it all */
- next_tvb = new_tvb;
+ tvb = reassembled_tvb;
+ /* new tvb starts at payload */
+ offset = 0;
}
else
{
+ /* 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;
- next_tvb = tvb_new_subset_remaining(tvb, 0);
+ bParseService = false;
+ tvb = tvb_new_subset_remaining(tvb, 0);
}
pinfo->fragmented = bSaveFragmented;
}
}
- offset = 0;
-
- /* call the transport message dissector */
- iServiceId = (*pfctParse)(transport_tree, tvb, pinfo, &offset);
-
- /* parse the service if not chunked or last chunk */
- if (msgtype == MSG_MESSAGE && bParseService)
- {
- if (bIsLastFragment != FALSE)
- {
- offset = 0;
- }
- iServiceId = parseService(transport_tree, next_tvb, pinfo, &offset);
- }
+ /* parse payload if not encrypted */
+ if (!metadata.encrypted && bParseService) {
+ if (msgtype == MSG_CLOSESECURECHANNEL) {
+ iServiceId = parseService(transport_tree, tvb, pinfo, &offset, &metadata);
+ if (iServiceId == OpcUaId_CloseSecureChannelRequest_Encoding_DefaultBinary) {
+ col_append_str(pinfo->cinfo, COL_INFO, ": CloseSecureChannelRequest");
+ } else if (iServiceId == OpcUaId_CloseSecureChannelResponse_Encoding_DefaultBinary) {
+ col_append_str(pinfo->cinfo, COL_INFO, ": CloseSecureChannelResponse");
+ } else {
+ 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) {
+ /* parse the service if not chunked or message was reassembled */
+ iServiceId = parseService(transport_tree, tvb, pinfo, &offset, &metadata);
- /* 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");
+ /* display the service type in addition to the message type */
+ if (iServiceId != -1)
+ {
+ const char *szServiceName = val_to_str((uint32_t)iServiceId, g_requesttypes, "ServiceId %d");
- if (bIsLastFragment == FALSE)
- {
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", g_szMessageTypes[msgtype], szServiceName);
+ if (bIsFinalChunk == false)
+ {
+ /* normal message in one chunk */
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", szServiceName);
+ }
+ else
+ {
+ /* reassembled message from multiple chunks */
+ col_append_fstr(pinfo->cinfo, COL_INFO, ": %s (Message Reassembled)", szServiceName);
+ }
+ }
}
- else
- {
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s (Message Reassembled)", g_szMessageTypes[msgtype], szServiceName);
+ if (mode == UA_MessageMode_SignAndEncrypt && decrypted) {
+ /* parse padding and signature */
+ parseSecurityFooterSAE(transport_tree, decrypted_tvb, 8 + payload_len, pad_len, sig_len);
+ } else if (mode == UA_MessageMode_Sign) {
+ /* parse signature */
+ parseSecurityFooterSO(transport_tree, decrypted_tvb, 24 + payload_len, sig_len);
}
}
+ if (metadata.encrypted) {
+ col_append_str(pinfo->cinfo, COL_INFO, " (encrypted)");
+ } else if (mode == UA_MessageMode_SignAndEncrypt) {
+ col_append_str(pinfo->cinfo, COL_INFO, " (decrypted)");
+ }
}
return tvb_reported_length(tvb);
@@ -384,11 +845,41 @@ 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);
}
+/** Init plugin resources */
+void proto_init_opcua(void)
+{
+ debugprintf("proto_init_opcua called.\n");
+ ua_keysets_init();
+ opcua_load_keylog_file(g_opcua_debug_file_name);
+}
+
+/** Cleanup plugin resources */
+void proto_cleanup_opcua(void)
+{
+ debugprintf("proto_cleanup_opcua called.\n");
+ ua_keysets_clear();
+}
+
+/** secrets callback called from Wireshark when loading a capture file with OPC UA Keylog File. */
+static void opcua_secrets_block_callback(const void *secrets, unsigned size)
+{
+ char *tmp = g_memdup2(secrets, size + 1);
+ if (tmp == NULL) return; /* OOM */
+
+ debugprintf("Loading secrets block '%s'...\n", (const char*)secrets);
+ debugprintf("size = %u\n", size);
+ /* ensure data is zero terminated */
+ tmp[size] = 0;
+ /* parse data */
+ opcua_keylog_process_lines(tmp);
+ g_free(tmp);
+}
+
/** plugin entry functions.
* This registers the OpcUa protocol.
*/
@@ -410,7 +901,7 @@ void proto_register_opcua(void)
};
/** Setup protocol subtree array */
- static gint *ett[] =
+ static int *ett[] =
{
&ett_opcua_extensionobject,
&ett_opcua_nodeid,
@@ -422,8 +913,21 @@ void proto_register_opcua(void)
proto_opcua = proto_register_protocol("OpcUa Binary Protocol", "OpcUa", "opcua");
opcua_handle = register_dissector("opcua", dissect_opcua, proto_opcua);
+ register_init_routine(proto_init_opcua);
+ register_cleanup_routine(proto_cleanup_opcua);
+
+ 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);
+
+ 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);
+
registerTransportLayerTypes(proto_opcua);
registerSecurityLayerTypes(proto_opcua);
+ registerSequenceLayerTypes(proto_opcua);
registerApplicationLayerTypes(proto_opcua);
registerSimpleTypes(proto_opcua);
registerEnumTypes(proto_opcua);
@@ -436,6 +940,7 @@ void proto_register_opcua(void)
reassembly_table_register(&opcua_reassembly_table,
&addresses_reassembly_table_functions);
+ secrets_register_type(SECRETS_TYPE_OPCUA, opcua_secrets_block_callback);
}
void proto_reg_handoff_opcua(void)
diff --git a/plugins/epan/opcua/opcua_application_layer.c b/plugins/epan/opcua/opcua_application_layer.c
index 688cd651..8006a366 100644
--- a/plugins/epan/opcua/opcua_application_layer.c
+++ b/plugins/epan/opcua/opcua_application_layer.c
@@ -33,9 +33,9 @@ static const value_string g_nodeidmasks[] = {
/** Service type table */
extern const value_string g_requesttypes[];
-static int hf_opcua_nodeid_encodingmask = -1;
-static int hf_opcua_app_nsid = -1;
-static int hf_opcua_app_numeric = -1;
+static int hf_opcua_nodeid_encodingmask;
+static int hf_opcua_app_nsid;
+static int hf_opcua_app_numeric;
/** Register application layer types. */
void registerApplicationLayerTypes(int proto)
@@ -52,23 +52,57 @@ void registerApplicationLayerTypes(int proto)
proto_register_field_array(proto, hf, array_length(hf));
}
+/** Decodes the service nodeid without modifying the tree or offset.
+ * Service NodeIds are alsways numeric.
+ */
+int getServiceNodeId(tvbuff_t *tvb, int offset)
+{
+ uint8_t EncodingMask;
+ uint32_t Numeric = 0;
+
+ EncodingMask = tvb_get_uint8(tvb, offset);
+ offset++;
+
+ switch(EncodingMask)
+ {
+ case 0x00: /* two byte node id */
+ Numeric = tvb_get_uint8(tvb, offset);
+ break;
+ case 0x01: /* four byte node id */
+ offset+=1;
+ Numeric = tvb_get_letohs(tvb, offset);
+ break;
+ case 0x02: /* numeric, that does not fit into four bytes */
+ offset+=2;
+ Numeric = tvb_get_letohl(tvb, offset);
+ break;
+ case 0x03: /* string */
+ case 0x04: /* guid */
+ case 0x05: /* opaque*/
+ /* NOT USED */
+ break;
+ };
+
+ return Numeric;
+}
+
/** 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 c9b043e8..9e47a2dd 100644
--- a/plugins/epan/opcua/opcua_application_layer.h
+++ b/plugins/epan/opcua/opcua_application_layer.h
@@ -17,4 +17,5 @@
void registerApplicationLayerTypes(int proto);
/* Ua type parsers */
-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 e37dd299..a04f9c59 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 = -1;
-gint ett_opcua_array_TrustListDataType = -1;
-gint ett_opcua_Node = -1;
-gint ett_opcua_array_Node = -1;
-gint ett_opcua_InstanceNode = -1;
-gint ett_opcua_array_InstanceNode = -1;
-gint ett_opcua_TypeNode = -1;
-gint ett_opcua_array_TypeNode = -1;
-gint ett_opcua_ObjectNode = -1;
-gint ett_opcua_array_ObjectNode = -1;
-gint ett_opcua_ObjectTypeNode = -1;
-gint ett_opcua_array_ObjectTypeNode = -1;
-gint ett_opcua_VariableNode = -1;
-gint ett_opcua_array_VariableNode = -1;
-gint ett_opcua_VariableTypeNode = -1;
-gint ett_opcua_array_VariableTypeNode = -1;
-gint ett_opcua_ReferenceTypeNode = -1;
-gint ett_opcua_array_ReferenceTypeNode = -1;
-gint ett_opcua_MethodNode = -1;
-gint ett_opcua_array_MethodNode = -1;
-gint ett_opcua_ViewNode = -1;
-gint ett_opcua_array_ViewNode = -1;
-gint ett_opcua_DataTypeNode = -1;
-gint ett_opcua_array_DataTypeNode = -1;
-gint ett_opcua_ReferenceNode = -1;
-gint ett_opcua_array_ReferenceNode = -1;
-gint ett_opcua_Argument = -1;
-gint ett_opcua_array_Argument = -1;
-gint ett_opcua_EnumValueType = -1;
-gint ett_opcua_array_EnumValueType = -1;
-gint ett_opcua_OptionSet = -1;
-gint ett_opcua_array_OptionSet = -1;
-gint ett_opcua_TimeZoneDataType = -1;
-gint ett_opcua_array_TimeZoneDataType = -1;
-gint ett_opcua_ApplicationDescription = -1;
-gint ett_opcua_array_ApplicationDescription = -1;
-gint ett_opcua_RequestHeader = -1;
-gint ett_opcua_array_RequestHeader = -1;
-gint ett_opcua_ResponseHeader = -1;
-gint ett_opcua_array_ResponseHeader = -1;
-gint ett_opcua_ServerOnNetwork = -1;
-gint ett_opcua_array_ServerOnNetwork = -1;
-gint ett_opcua_UserTokenPolicy = -1;
-gint ett_opcua_array_UserTokenPolicy = -1;
-gint ett_opcua_EndpointDescription = -1;
-gint ett_opcua_array_EndpointDescription = -1;
-gint ett_opcua_RegisteredServer = -1;
-gint ett_opcua_array_RegisteredServer = -1;
-gint ett_opcua_MdnsDiscoveryConfiguration = -1;
-gint ett_opcua_array_MdnsDiscoveryConfiguration = -1;
-gint ett_opcua_ChannelSecurityToken = -1;
-gint ett_opcua_array_ChannelSecurityToken = -1;
-gint ett_opcua_SignedSoftwareCertificate = -1;
-gint ett_opcua_array_SignedSoftwareCertificate = -1;
-gint ett_opcua_SignatureData = -1;
-gint ett_opcua_array_SignatureData = -1;
-gint ett_opcua_UserIdentityToken = -1;
-gint ett_opcua_array_UserIdentityToken = -1;
-gint ett_opcua_AnonymousIdentityToken = -1;
-gint ett_opcua_array_AnonymousIdentityToken = -1;
-gint ett_opcua_UserNameIdentityToken = -1;
-gint ett_opcua_array_UserNameIdentityToken = -1;
-gint ett_opcua_X509IdentityToken = -1;
-gint ett_opcua_array_X509IdentityToken = -1;
-gint ett_opcua_KerberosIdentityToken = -1;
-gint ett_opcua_array_KerberosIdentityToken = -1;
-gint ett_opcua_IssuedIdentityToken = -1;
-gint ett_opcua_array_IssuedIdentityToken = -1;
-gint ett_opcua_NodeAttributes = -1;
-gint ett_opcua_array_NodeAttributes = -1;
-gint ett_opcua_ObjectAttributes = -1;
-gint ett_opcua_array_ObjectAttributes = -1;
-gint ett_opcua_VariableAttributes = -1;
-gint ett_opcua_array_VariableAttributes = -1;
-gint ett_opcua_MethodAttributes = -1;
-gint ett_opcua_array_MethodAttributes = -1;
-gint ett_opcua_ObjectTypeAttributes = -1;
-gint ett_opcua_array_ObjectTypeAttributes = -1;
-gint ett_opcua_VariableTypeAttributes = -1;
-gint ett_opcua_array_VariableTypeAttributes = -1;
-gint ett_opcua_ReferenceTypeAttributes = -1;
-gint ett_opcua_array_ReferenceTypeAttributes = -1;
-gint ett_opcua_DataTypeAttributes = -1;
-gint ett_opcua_array_DataTypeAttributes = -1;
-gint ett_opcua_ViewAttributes = -1;
-gint ett_opcua_array_ViewAttributes = -1;
-gint ett_opcua_AddNodesItem = -1;
-gint ett_opcua_array_AddNodesItem = -1;
-gint ett_opcua_AddNodesResult = -1;
-gint ett_opcua_array_AddNodesResult = -1;
-gint ett_opcua_AddReferencesItem = -1;
-gint ett_opcua_array_AddReferencesItem = -1;
-gint ett_opcua_DeleteNodesItem = -1;
-gint ett_opcua_array_DeleteNodesItem = -1;
-gint ett_opcua_DeleteReferencesItem = -1;
-gint ett_opcua_array_DeleteReferencesItem = -1;
-gint ett_opcua_ViewDescription = -1;
-gint ett_opcua_array_ViewDescription = -1;
-gint ett_opcua_BrowseDescription = -1;
-gint ett_opcua_array_BrowseDescription = -1;
-gint ett_opcua_ReferenceDescription = -1;
-gint ett_opcua_array_ReferenceDescription = -1;
-gint ett_opcua_BrowseResult = -1;
-gint ett_opcua_array_BrowseResult = -1;
-gint ett_opcua_RelativePathElement = -1;
-gint ett_opcua_array_RelativePathElement = -1;
-gint ett_opcua_RelativePath = -1;
-gint ett_opcua_array_RelativePath = -1;
-gint ett_opcua_BrowsePath = -1;
-gint ett_opcua_array_BrowsePath = -1;
-gint ett_opcua_BrowsePathTarget = -1;
-gint ett_opcua_array_BrowsePathTarget = -1;
-gint ett_opcua_BrowsePathResult = -1;
-gint ett_opcua_array_BrowsePathResult = -1;
-gint ett_opcua_EndpointConfiguration = -1;
-gint ett_opcua_array_EndpointConfiguration = -1;
-gint ett_opcua_SupportedProfile = -1;
-gint ett_opcua_array_SupportedProfile = -1;
-gint ett_opcua_SoftwareCertificate = -1;
-gint ett_opcua_array_SoftwareCertificate = -1;
-gint ett_opcua_QueryDataDescription = -1;
-gint ett_opcua_array_QueryDataDescription = -1;
-gint ett_opcua_NodeTypeDescription = -1;
-gint ett_opcua_array_NodeTypeDescription = -1;
-gint ett_opcua_QueryDataSet = -1;
-gint ett_opcua_array_QueryDataSet = -1;
-gint ett_opcua_NodeReference = -1;
-gint ett_opcua_array_NodeReference = -1;
-gint ett_opcua_ContentFilterElement = -1;
-gint ett_opcua_array_ContentFilterElement = -1;
-gint ett_opcua_ContentFilter = -1;
-gint ett_opcua_array_ContentFilter = -1;
-gint ett_opcua_ElementOperand = -1;
-gint ett_opcua_array_ElementOperand = -1;
-gint ett_opcua_LiteralOperand = -1;
-gint ett_opcua_array_LiteralOperand = -1;
-gint ett_opcua_AttributeOperand = -1;
-gint ett_opcua_array_AttributeOperand = -1;
-gint ett_opcua_SimpleAttributeOperand = -1;
-gint ett_opcua_array_SimpleAttributeOperand = -1;
-gint ett_opcua_ContentFilterElementResult = -1;
-gint ett_opcua_array_ContentFilterElementResult = -1;
-gint ett_opcua_ContentFilterResult = -1;
-gint ett_opcua_array_ContentFilterResult = -1;
-gint ett_opcua_ParsingResult = -1;
-gint ett_opcua_array_ParsingResult = -1;
-gint ett_opcua_ReadValueId = -1;
-gint ett_opcua_array_ReadValueId = -1;
-gint ett_opcua_HistoryReadValueId = -1;
-gint ett_opcua_array_HistoryReadValueId = -1;
-gint ett_opcua_HistoryReadResult = -1;
-gint ett_opcua_array_HistoryReadResult = -1;
-gint ett_opcua_ReadEventDetails = -1;
-gint ett_opcua_array_ReadEventDetails = -1;
-gint ett_opcua_ReadRawModifiedDetails = -1;
-gint ett_opcua_array_ReadRawModifiedDetails = -1;
-gint ett_opcua_ReadProcessedDetails = -1;
-gint ett_opcua_array_ReadProcessedDetails = -1;
-gint ett_opcua_ReadAtTimeDetails = -1;
-gint ett_opcua_array_ReadAtTimeDetails = -1;
-gint ett_opcua_HistoryData = -1;
-gint ett_opcua_array_HistoryData = -1;
-gint ett_opcua_ModificationInfo = -1;
-gint ett_opcua_array_ModificationInfo = -1;
-gint ett_opcua_HistoryModifiedData = -1;
-gint ett_opcua_array_HistoryModifiedData = -1;
-gint ett_opcua_HistoryEvent = -1;
-gint ett_opcua_array_HistoryEvent = -1;
-gint ett_opcua_WriteValue = -1;
-gint ett_opcua_array_WriteValue = -1;
-gint ett_opcua_HistoryUpdateDetails = -1;
-gint ett_opcua_array_HistoryUpdateDetails = -1;
-gint ett_opcua_UpdateDataDetails = -1;
-gint ett_opcua_array_UpdateDataDetails = -1;
-gint ett_opcua_UpdateStructureDataDetails = -1;
-gint ett_opcua_array_UpdateStructureDataDetails = -1;
-gint ett_opcua_UpdateEventDetails = -1;
-gint ett_opcua_array_UpdateEventDetails = -1;
-gint ett_opcua_DeleteRawModifiedDetails = -1;
-gint ett_opcua_array_DeleteRawModifiedDetails = -1;
-gint ett_opcua_DeleteAtTimeDetails = -1;
-gint ett_opcua_array_DeleteAtTimeDetails = -1;
-gint ett_opcua_DeleteEventDetails = -1;
-gint ett_opcua_array_DeleteEventDetails = -1;
-gint ett_opcua_HistoryUpdateResult = -1;
-gint ett_opcua_array_HistoryUpdateResult = -1;
-gint ett_opcua_CallMethodRequest = -1;
-gint ett_opcua_array_CallMethodRequest = -1;
-gint ett_opcua_CallMethodResult = -1;
-gint ett_opcua_array_CallMethodResult = -1;
-gint ett_opcua_DataChangeFilter = -1;
-gint ett_opcua_array_DataChangeFilter = -1;
-gint ett_opcua_EventFilter = -1;
-gint ett_opcua_array_EventFilter = -1;
-gint ett_opcua_AggregateConfiguration = -1;
-gint ett_opcua_array_AggregateConfiguration = -1;
-gint ett_opcua_AggregateFilter = -1;
-gint ett_opcua_array_AggregateFilter = -1;
-gint ett_opcua_EventFilterResult = -1;
-gint ett_opcua_array_EventFilterResult = -1;
-gint ett_opcua_AggregateFilterResult = -1;
-gint ett_opcua_array_AggregateFilterResult = -1;
-gint ett_opcua_MonitoringParameters = -1;
-gint ett_opcua_array_MonitoringParameters = -1;
-gint ett_opcua_MonitoredItemCreateRequest = -1;
-gint ett_opcua_array_MonitoredItemCreateRequest = -1;
-gint ett_opcua_MonitoredItemCreateResult = -1;
-gint ett_opcua_array_MonitoredItemCreateResult = -1;
-gint ett_opcua_MonitoredItemModifyRequest = -1;
-gint ett_opcua_array_MonitoredItemModifyRequest = -1;
-gint ett_opcua_MonitoredItemModifyResult = -1;
-gint ett_opcua_array_MonitoredItemModifyResult = -1;
-gint ett_opcua_NotificationMessage = -1;
-gint ett_opcua_array_NotificationMessage = -1;
-gint ett_opcua_DataChangeNotification = -1;
-gint ett_opcua_array_DataChangeNotification = -1;
-gint ett_opcua_MonitoredItemNotification = -1;
-gint ett_opcua_array_MonitoredItemNotification = -1;
-gint ett_opcua_EventNotificationList = -1;
-gint ett_opcua_array_EventNotificationList = -1;
-gint ett_opcua_EventFieldList = -1;
-gint ett_opcua_array_EventFieldList = -1;
-gint ett_opcua_HistoryEventFieldList = -1;
-gint ett_opcua_array_HistoryEventFieldList = -1;
-gint ett_opcua_StatusChangeNotification = -1;
-gint ett_opcua_array_StatusChangeNotification = -1;
-gint ett_opcua_SubscriptionAcknowledgement = -1;
-gint ett_opcua_array_SubscriptionAcknowledgement = -1;
-gint ett_opcua_TransferResult = -1;
-gint ett_opcua_array_TransferResult = -1;
-gint ett_opcua_ScalarTestType = -1;
-gint ett_opcua_array_ScalarTestType = -1;
-gint ett_opcua_ArrayTestType = -1;
-gint ett_opcua_array_ArrayTestType = -1;
-gint ett_opcua_CompositeTestType = -1;
-gint ett_opcua_array_CompositeTestType = -1;
-gint ett_opcua_BuildInfo = -1;
-gint ett_opcua_array_BuildInfo = -1;
-gint ett_opcua_RedundantServerDataType = -1;
-gint ett_opcua_array_RedundantServerDataType = -1;
-gint ett_opcua_EndpointUrlListDataType = -1;
-gint ett_opcua_array_EndpointUrlListDataType = -1;
-gint ett_opcua_NetworkGroupDataType = -1;
-gint ett_opcua_array_NetworkGroupDataType = -1;
-gint ett_opcua_SamplingIntervalDiagnosticsDataType = -1;
-gint ett_opcua_array_SamplingIntervalDiagnosticsDataType = -1;
-gint ett_opcua_ServerDiagnosticsSummaryDataType = -1;
-gint ett_opcua_array_ServerDiagnosticsSummaryDataType = -1;
-gint ett_opcua_ServerStatusDataType = -1;
-gint ett_opcua_array_ServerStatusDataType = -1;
-gint ett_opcua_SessionDiagnosticsDataType = -1;
-gint ett_opcua_array_SessionDiagnosticsDataType = -1;
-gint ett_opcua_SessionSecurityDiagnosticsDataType = -1;
-gint ett_opcua_array_SessionSecurityDiagnosticsDataType = -1;
-gint ett_opcua_ServiceCounterDataType = -1;
-gint ett_opcua_array_ServiceCounterDataType = -1;
-gint ett_opcua_StatusResult = -1;
-gint ett_opcua_array_StatusResult = -1;
-gint ett_opcua_SubscriptionDiagnosticsDataType = -1;
-gint ett_opcua_array_SubscriptionDiagnosticsDataType = -1;
-gint ett_opcua_ModelChangeStructureDataType = -1;
-gint ett_opcua_array_ModelChangeStructureDataType = -1;
-gint ett_opcua_SemanticChangeStructureDataType = -1;
-gint ett_opcua_array_SemanticChangeStructureDataType = -1;
-gint ett_opcua_Range = -1;
-gint ett_opcua_array_Range = -1;
-gint ett_opcua_EUInformation = -1;
-gint ett_opcua_array_EUInformation = -1;
-gint ett_opcua_ComplexNumberType = -1;
-gint ett_opcua_array_ComplexNumberType = -1;
-gint ett_opcua_DoubleComplexNumberType = -1;
-gint ett_opcua_array_DoubleComplexNumberType = -1;
-gint ett_opcua_AxisInformation = -1;
-gint ett_opcua_array_AxisInformation = -1;
-gint ett_opcua_XVType = -1;
-gint ett_opcua_array_XVType = -1;
-gint ett_opcua_ProgramDiagnosticDataType = -1;
-gint ett_opcua_array_ProgramDiagnosticDataType = -1;
-gint ett_opcua_Annotation = -1;
-gint ett_opcua_array_Annotation = -1;
+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,13 +631,13 @@ 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);
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_EndpointUrl);
parseApplicationDescription(subtree, tvb, pinfo, pOffset, "Server");
- parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerCertificate);
+ parseCertificate(subtree, tvb, pinfo, pOffset, hf_opcua_ServerCertificate);
parseMessageSecurityMode(subtree, tvb, pinfo, pOffset);
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_SecurityPolicyUri);
/* Array length field ignored: NoOfUserIdentityTokens */
@@ -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);
@@ -1817,10 +1817,10 @@ void parseSessionSecurityDiagnosticsDataType(proto_tree *tree, tvbuff_t *tvb, pa
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_TransportProtocol);
parseMessageSecurityMode(subtree, tvb, pinfo, pOffset);
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_SecurityPolicyUri);
- parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ClientCertificate);
+ 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 48ef060f..3ceb066b 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 0a93376e..37eb1a28 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 = -1;
-gint ett_opcua_array_NamingRuleType = -1;
-gint ett_opcua_array_OpenFileMode = -1;
-gint ett_opcua_array_TrustListMasks = -1;
-gint ett_opcua_array_IdType = -1;
-gint ett_opcua_array_NodeClass = -1;
-gint ett_opcua_array_ApplicationType = -1;
-gint ett_opcua_array_MessageSecurityMode = -1;
-gint ett_opcua_array_UserTokenType = -1;
-gint ett_opcua_array_SecurityTokenRequestType = -1;
-gint ett_opcua_array_NodeAttributesMask = -1;
-gint ett_opcua_array_AttributeWriteMask = -1;
-gint ett_opcua_array_BrowseDirection = -1;
-gint ett_opcua_array_BrowseResultMask = -1;
-gint ett_opcua_array_ComplianceLevel = -1;
-gint ett_opcua_array_FilterOperator = -1;
-gint ett_opcua_array_TimestampsToReturn = -1;
-gint ett_opcua_array_HistoryUpdateType = -1;
-gint ett_opcua_array_PerformUpdateType = -1;
-gint ett_opcua_array_MonitoringMode = -1;
-gint ett_opcua_array_DataChangeTrigger = -1;
-gint ett_opcua_array_DeadbandType = -1;
-gint ett_opcua_array_EnumeratedTestType = -1;
-gint ett_opcua_array_RedundancySupport = -1;
-gint ett_opcua_array_ServerState = -1;
-gint ett_opcua_array_ModelChangeStructureVerbMask = -1;
-gint ett_opcua_array_AxisScaleEnumeration = -1;
-gint ett_opcua_array_ExceptionDeviationFormat = -1;
+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[] = {
@@ -61,9 +61,9 @@ static const value_string g_NodeIdTypeTable[] = {
{ 5, "ByteString" },
{ 0, NULL }
};
-static int hf_opcua_NodeIdType = -1;
+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;
}
@@ -74,9 +74,9 @@ static const value_string g_NamingRuleTypeTable[] = {
{ 3, "Constraint" },
{ 0, NULL }
};
-static int hf_opcua_NamingRuleType = -1;
+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;
}
@@ -88,9 +88,9 @@ static const value_string g_OpenFileModeTable[] = {
{ 8, "Append" },
{ 0, NULL }
};
-static int hf_opcua_OpenFileMode = -1;
+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;
}
@@ -104,9 +104,9 @@ static const value_string g_TrustListMasksTable[] = {
{ 15, "All" },
{ 0, NULL }
};
-static int hf_opcua_TrustListMasks = -1;
+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;
}
@@ -118,9 +118,9 @@ static const value_string g_IdTypeTable[] = {
{ 3, "Opaque" },
{ 0, NULL }
};
-static int hf_opcua_IdType = -1;
+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;
}
@@ -137,9 +137,9 @@ static const value_string g_NodeClassTable[] = {
{ 128, "View" },
{ 0, NULL }
};
-static int hf_opcua_NodeClass = -1;
+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;
}
@@ -151,9 +151,9 @@ static const value_string g_ApplicationTypeTable[] = {
{ 3, "DiscoveryServer" },
{ 0, NULL }
};
-static int hf_opcua_ApplicationType = -1;
+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;
}
@@ -165,9 +165,9 @@ static const value_string g_MessageSecurityModeTable[] = {
{ 3, "SignAndEncrypt" },
{ 0, NULL }
};
-static int hf_opcua_MessageSecurityMode = -1;
+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;
}
@@ -180,9 +180,9 @@ static const value_string g_UserTokenTypeTable[] = {
{ 4, "Kerberos" },
{ 0, NULL }
};
-static int hf_opcua_UserTokenType = -1;
+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;
}
@@ -192,9 +192,9 @@ static const value_string g_SecurityTokenRequestTypeTable[] = {
{ 1, "Renew" },
{ 0, NULL }
};
-static int hf_opcua_SecurityTokenRequestType = -1;
+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;
}
@@ -234,9 +234,9 @@ static const value_string g_NodeAttributesMaskTable[] = {
{ 1335532, "View" },
{ 0, NULL }
};
-static int hf_opcua_NodeAttributesMask = -1;
+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;
}
@@ -271,9 +271,9 @@ static const value_string g_AttributeWriteMaskTable[] = {
{ 33554432, "AccessLevelEx" },
{ 0, NULL }
};
-static int hf_opcua_AttributeWriteMask = -1;
+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;
}
@@ -285,9 +285,9 @@ static const value_string g_BrowseDirectionTable[] = {
{ 3, "Invalid" },
{ 0, NULL }
};
-static int hf_opcua_BrowseDirection = -1;
+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;
}
@@ -300,9 +300,9 @@ static const value_string g_ComplianceLevelTable[] = {
{ 3, "Certified" },
{ 0, NULL }
};
-static int hf_opcua_ComplianceLevel = -1;
+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;
}
@@ -328,9 +328,9 @@ static const value_string g_FilterOperatorTable[] = {
{ 17, "BitwiseOr" },
{ 0, NULL }
};
-static int hf_opcua_FilterOperator = -1;
+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;
}
@@ -343,9 +343,9 @@ static const value_string g_TimestampsToReturnTable[] = {
{ 4, "Invalid" },
{ 0, NULL }
};
-static int hf_opcua_TimestampsToReturn = -1;
+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;
}
@@ -357,9 +357,9 @@ static const value_string g_HistoryUpdateTypeTable[] = {
{ 4, "Delete" },
{ 0, NULL }
};
-static int hf_opcua_HistoryUpdateType = -1;
+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;
}
@@ -371,9 +371,9 @@ static const value_string g_PerformUpdateTypeTable[] = {
{ 4, "Remove" },
{ 0, NULL }
};
-static int hf_opcua_PerformUpdateType = -1;
+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;
}
@@ -384,9 +384,9 @@ static const value_string g_MonitoringModeTable[] = {
{ 2, "Reporting" },
{ 0, NULL }
};
-static int hf_opcua_MonitoringMode = -1;
+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;
}
@@ -397,9 +397,9 @@ static const value_string g_DataChangeTriggerTable[] = {
{ 2, "StatusValueTimestamp" },
{ 0, NULL }
};
-static int hf_opcua_DataChangeTrigger = -1;
+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;
}
@@ -410,9 +410,9 @@ static const value_string g_DeadbandTypeTable[] = {
{ 2, "Percent" },
{ 0, NULL }
};
-static int hf_opcua_DeadbandType = -1;
+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;
}
@@ -423,9 +423,9 @@ static const value_string g_EnumeratedTestTypeTable[] = {
{ 5, "Green" },
{ 0, NULL }
};
-static int hf_opcua_EnumeratedTestType = -1;
+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;
}
@@ -439,9 +439,9 @@ static const value_string g_RedundancySupportTable[] = {
{ 5, "HotAndMirrored" },
{ 0, NULL }
};
-static int hf_opcua_RedundancySupport = -1;
+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;
}
@@ -457,9 +457,9 @@ static const value_string g_ServerStateTable[] = {
{ 7, "Unknown" },
{ 0, NULL }
};
-static int hf_opcua_ServerState = -1;
+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;
}
@@ -472,9 +472,9 @@ static const value_string g_ModelChangeStructureVerbMaskTable[] = {
{ 16, "DataTypeChanged" },
{ 0, NULL }
};
-static int hf_opcua_ModelChangeStructureVerbMask = -1;
+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;
}
@@ -485,9 +485,9 @@ static const value_string g_AxisScaleEnumerationTable[] = {
{ 2, "Ln" },
{ 0, NULL }
};
-static int hf_opcua_AxisScaleEnumeration = -1;
+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;
}
@@ -500,9 +500,9 @@ static const value_string g_ExceptionDeviationFormatTable[] = {
{ 4, "Unknown" },
{ 0, NULL }
};
-static int hf_opcua_ExceptionDeviationFormat = -1;
+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;
}
@@ -537,15 +537,15 @@ static const value_string g_AttributeIdTable[] = {
{27, "AccessLevelEx"},
{0, NULL}
};
-static int hf_opcua_AttributeId = -1;
+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 c52aa9a3..eecf6366 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 2b9ae3c9..e2d4e2db 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_hfindeces.c b/plugins/epan/opcua/opcua_hfindeces.c
index 255927f9..99821549 100644
--- a/plugins/epan/opcua/opcua_hfindeces.c
+++ b/plugins/epan/opcua/opcua_hfindeces.c
@@ -22,302 +22,302 @@
#include "opcua_hfindeces.h"
-int hf_opcua_AccessLevel = -1;
-int hf_opcua_ActualSessionTimeout = -1;
-int hf_opcua_AddResults = -1;
-int hf_opcua_Algorithm = -1;
-int hf_opcua_Alias = -1;
-int hf_opcua_AnnotationTime = -1;
-int hf_opcua_ApplicationUri = -1;
-int hf_opcua_ArrayDimensions = -1;
-int hf_opcua_AuditEntryId = -1;
-int hf_opcua_AuthenticationMechanism = -1;
-int hf_opcua_AvailableSequenceNumbers = -1;
-int hf_opcua_AxisSteps = -1;
-int hf_opcua_Boolean = -1;
-int hf_opcua_Booleans = -1;
-int hf_opcua_BuildDate = -1;
-int hf_opcua_BuildNumber = -1;
-int hf_opcua_Byte = -1;
-int hf_opcua_ByteString = -1;
-int hf_opcua_ByteStrings = -1;
-int hf_opcua_CancelCount = -1;
-int hf_opcua_CertificateData = -1;
-int hf_opcua_ChannelId = -1;
-int hf_opcua_ChannelLifetime = -1;
-int hf_opcua_ClientCertificate = -1;
-int hf_opcua_ClientConnectionTime = -1;
-int hf_opcua_ClientHandle = -1;
-int hf_opcua_ClientLastContactTime = -1;
-int hf_opcua_ClientNonce = -1;
-int hf_opcua_ClientProtocolVersion = -1;
-int hf_opcua_ClientUserIdHistory = -1;
-int hf_opcua_ClientUserIdOfSession = -1;
-int hf_opcua_ComplianceDate = -1;
-int hf_opcua_ComplianceTool = -1;
-int hf_opcua_ConfigurationResults = -1;
-int hf_opcua_ContainsNoLoops = -1;
-int hf_opcua_ContinuationPoint = -1;
-int hf_opcua_ContinuationPoints = -1;
-int hf_opcua_CreateClientName = -1;
-int hf_opcua_CreatedAt = -1;
-int hf_opcua_CumulatedSessionCount = -1;
-int hf_opcua_CumulatedSubscriptionCount = -1;
-int hf_opcua_CurrentKeepAliveCount = -1;
-int hf_opcua_CurrentLifetimeCount = -1;
-int hf_opcua_CurrentMonitoredItemsCount = -1;
-int hf_opcua_CurrentPublishRequestsInQueue = -1;
-int hf_opcua_CurrentSessionCount = -1;
-int hf_opcua_CurrentSubscriptionCount = -1;
-int hf_opcua_CurrentSubscriptionsCount = -1;
-int hf_opcua_CurrentTime = -1;
-int hf_opcua_DataChangeNotificationsCount = -1;
-int hf_opcua_DataStatusCodes = -1;
-int hf_opcua_DateTime = -1;
-int hf_opcua_DateTimes = -1;
-int hf_opcua_DaylightSavingInOffset = -1;
-int hf_opcua_DeadbandType = -1;
-int hf_opcua_DeadbandValue = -1;
-int hf_opcua_DeleteBidirectional = -1;
-int hf_opcua_DeleteSubscriptions = -1;
-int hf_opcua_DeleteTargetReferences = -1;
-int hf_opcua_DisableCount = -1;
-int hf_opcua_DisabledMonitoredItemCount = -1;
-int hf_opcua_DiscardOldest = -1;
-int hf_opcua_DiscardedMessageCount = -1;
-int hf_opcua_DiscoveryProfileUri = -1;
-int hf_opcua_DiscoveryUrl = -1;
-int hf_opcua_DiscoveryUrls = -1;
-int hf_opcua_Double = -1;
-int hf_opcua_Doubles = -1;
-int hf_opcua_EnableCount = -1;
-int hf_opcua_Encoding = -1;
-int hf_opcua_EncryptionAlgorithm = -1;
-int hf_opcua_EndTime = -1;
-int hf_opcua_EndpointUrl = -1;
-int hf_opcua_EndpointUrlList = -1;
-int hf_opcua_ErrorCount = -1;
-int hf_opcua_EventIds = -1;
-int hf_opcua_EventNotificationsCount = -1;
-int hf_opcua_EventNotifier = -1;
-int hf_opcua_EventQueueOverFlowCount = -1;
-int hf_opcua_Executable = -1;
-int hf_opcua_Float = -1;
-int hf_opcua_Floats = -1;
-int hf_opcua_GatewayServerUri = -1;
-int hf_opcua_Guid = -1;
-int hf_opcua_Guids = -1;
-int hf_opcua_High = -1;
-int hf_opcua_Historizing = -1;
-int hf_opcua_Imaginary = -1;
-int hf_opcua_IncludeSubTypes = -1;
-int hf_opcua_IncludeSubtypes = -1;
-int hf_opcua_Index = -1;
-int hf_opcua_IndexRange = -1;
-int hf_opcua_InputArgumentResults = -1;
-int hf_opcua_Int16 = -1;
-int hf_opcua_Int16s = -1;
-int hf_opcua_Int32 = -1;
-int hf_opcua_Int32s = -1;
-int hf_opcua_Int64 = -1;
-int hf_opcua_Int64s = -1;
-int hf_opcua_InvocationCreationTime = -1;
-int hf_opcua_IsAbstract = -1;
-int hf_opcua_IsDeleteModified = -1;
-int hf_opcua_IsForward = -1;
-int hf_opcua_IsInverse = -1;
-int hf_opcua_IsOnline = -1;
-int hf_opcua_IsReadModified = -1;
-int hf_opcua_IssueDate = -1;
-int hf_opcua_IssuedBy = -1;
-int hf_opcua_IssuedTokenType = -1;
-int hf_opcua_IssuerCertificates = -1;
-int hf_opcua_IssuerCrls = -1;
-int hf_opcua_IssuerEndpointUrl = -1;
-int hf_opcua_Iteration = -1;
-int hf_opcua_LastCounterResetTime = -1;
-int hf_opcua_LastMethodCall = -1;
-int hf_opcua_LastMethodCallTime = -1;
-int hf_opcua_LastTransitionTime = -1;
-int hf_opcua_LatePublishRequestCount = -1;
-int hf_opcua_LinksToAdd = -1;
-int hf_opcua_LinksToRemove = -1;
-int hf_opcua_LocaleIds = -1;
-int hf_opcua_Low = -1;
-int hf_opcua_ManufacturerName = -1;
-int hf_opcua_MaxAge = -1;
-int hf_opcua_MaxArrayLength = -1;
-int hf_opcua_MaxBufferSize = -1;
-int hf_opcua_MaxByteStringLength = -1;
-int hf_opcua_MaxDataSetsToReturn = -1;
-int hf_opcua_MaxKeepAliveCount = -1;
-int hf_opcua_MaxLifetimeCount = -1;
-int hf_opcua_MaxMessageSize = -1;
-int hf_opcua_MaxMonitoredItemCount = -1;
-int hf_opcua_MaxNotificationsPerPublish = -1;
-int hf_opcua_MaxRecordsToReturn = -1;
-int hf_opcua_MaxReferencesToReturn = -1;
-int hf_opcua_MaxRequestMessageSize = -1;
-int hf_opcua_MaxResponseMessageSize = -1;
-int hf_opcua_MaxStringLength = -1;
-int hf_opcua_MdnsServerName = -1;
-int hf_opcua_Message = -1;
-int hf_opcua_MinimumSamplingInterval = -1;
-int hf_opcua_ModificationTime = -1;
-int hf_opcua_ModifyCount = -1;
-int hf_opcua_MonitoredItemCount = -1;
-int hf_opcua_MonitoredItemId = -1;
-int hf_opcua_MonitoredItemIds = -1;
-int hf_opcua_MonitoringQueueOverflowCount = -1;
-int hf_opcua_MoreNotifications = -1;
-int hf_opcua_Name = -1;
-int hf_opcua_NamespaceUri = -1;
-int hf_opcua_NextSequenceNumber = -1;
-int hf_opcua_NotificationsCount = -1;
-int hf_opcua_NumValuesPerNode = -1;
-int hf_opcua_Offset = -1;
-int hf_opcua_OperandStatusCodes = -1;
-int hf_opcua_OperationResults = -1;
-int hf_opcua_OperationTimeout = -1;
-int hf_opcua_OrganizationUri = -1;
-int hf_opcua_Password = -1;
-int hf_opcua_PercentDataBad = -1;
-int hf_opcua_PercentDataGood = -1;
-int hf_opcua_PolicyId = -1;
-int hf_opcua_Priority = -1;
-int hf_opcua_ProcessingInterval = -1;
-int hf_opcua_ProductName = -1;
-int hf_opcua_ProductUri = -1;
-int hf_opcua_ProfileId = -1;
-int hf_opcua_ProfileUris = -1;
-int hf_opcua_PublishRequestCount = -1;
-int hf_opcua_PublishTime = -1;
-int hf_opcua_PublishingEnabled = -1;
-int hf_opcua_PublishingInterval = -1;
-int hf_opcua_PublishingIntervalCount = -1;
-int hf_opcua_QueueSize = -1;
-int hf_opcua_Real = -1;
-int hf_opcua_RecordId = -1;
-int hf_opcua_RejectedRequestsCount = -1;
-int hf_opcua_RejectedSessionCount = -1;
-int hf_opcua_ReleaseContinuationPoint = -1;
-int hf_opcua_ReleaseContinuationPoints = -1;
-int hf_opcua_RemainingPathIndex = -1;
-int hf_opcua_RemoveResults = -1;
-int hf_opcua_RepublishMessageCount = -1;
-int hf_opcua_RepublishMessageRequestCount = -1;
-int hf_opcua_RepublishRequestCount = -1;
-int hf_opcua_ReqTimes = -1;
-int hf_opcua_RequestHandle = -1;
-int hf_opcua_RequestedLifetime = -1;
-int hf_opcua_RequestedLifetimeCount = -1;
-int hf_opcua_RequestedMaxKeepAliveCount = -1;
-int hf_opcua_RequestedMaxReferencesPerNode = -1;
-int hf_opcua_RequestedPublishingInterval = -1;
-int hf_opcua_RequestedSessionTimeout = -1;
-int hf_opcua_Results = -1;
-int hf_opcua_RetransmitSequenceNumber = -1;
-int hf_opcua_ReturnBounds = -1;
-int hf_opcua_ReturnDiagnostics = -1;
-int hf_opcua_RevisedContinuationPoint = -1;
-int hf_opcua_RevisedLifetime = -1;
-int hf_opcua_RevisedLifetimeCount = -1;
-int hf_opcua_RevisedMaxKeepAliveCount = -1;
-int hf_opcua_RevisedProcessingInterval = -1;
-int hf_opcua_RevisedPublishingInterval = -1;
-int hf_opcua_RevisedQueueSize = -1;
-int hf_opcua_RevisedSamplingInterval = -1;
-int hf_opcua_RevisedSessionTimeout = -1;
-int hf_opcua_RevisedStartTime = -1;
-int hf_opcua_SByte = -1;
-int hf_opcua_SBytes = -1;
-int hf_opcua_SamplingInterval = -1;
-int hf_opcua_SecondsTillShutdown = -1;
-int hf_opcua_SecurityLevel = -1;
-int hf_opcua_SecurityPolicyUri = -1;
-int hf_opcua_SecurityRejectedRequestsCount = -1;
-int hf_opcua_SecurityRejectedSessionCount = -1;
-int hf_opcua_SecurityTokenLifetime = -1;
-int hf_opcua_SelectClauseResults = -1;
-int hf_opcua_SemaphoreFilePath = -1;
-int hf_opcua_SendInitialValues = -1;
-int hf_opcua_SequenceNumber = -1;
-int hf_opcua_ServerCapabilities = -1;
-int hf_opcua_ServerCapabilityFilter = -1;
-int hf_opcua_ServerCertificate = -1;
-int hf_opcua_ServerId = -1;
-int hf_opcua_ServerName = -1;
-int hf_opcua_ServerNonce = -1;
-int hf_opcua_ServerProtocolVersion = -1;
-int hf_opcua_ServerUri = -1;
-int hf_opcua_ServerUris = -1;
-int hf_opcua_ServerViewCount = -1;
-int hf_opcua_ServiceLevel = -1;
-int hf_opcua_ServiceResult = -1;
-int hf_opcua_SessionAbortCount = -1;
-int hf_opcua_SessionName = -1;
-int hf_opcua_SessionTimeoutCount = -1;
-int hf_opcua_Signature = -1;
-int hf_opcua_SoftwareVersion = -1;
-int hf_opcua_SpecifiedAttributes = -1;
-int hf_opcua_SpecifiedLists = -1;
-int hf_opcua_StartTime = -1;
-int hf_opcua_StartingRecordId = -1;
-int hf_opcua_Status = -1;
-int hf_opcua_StatusCode = -1;
-int hf_opcua_StatusCodes = -1;
-int hf_opcua_String = -1;
-int hf_opcua_StringTable = -1;
-int hf_opcua_Strings = -1;
-int hf_opcua_SubscriptionId = -1;
-int hf_opcua_SubscriptionIds = -1;
-int hf_opcua_Symmetric = -1;
-int hf_opcua_TargetServerUri = -1;
-int hf_opcua_TestId = -1;
-int hf_opcua_TicketData = -1;
-int hf_opcua_TimeoutHint = -1;
-int hf_opcua_Timestamp = -1;
-int hf_opcua_TokenData = -1;
-int hf_opcua_TokenId = -1;
-int hf_opcua_TotalCount = -1;
-int hf_opcua_TransferRequestCount = -1;
-int hf_opcua_TransferredToAltClientCount = -1;
-int hf_opcua_TransferredToSameClientCount = -1;
-int hf_opcua_TransportProfileUri = -1;
-int hf_opcua_TransportProtocol = -1;
-int hf_opcua_TreatUncertainAsBad = -1;
-int hf_opcua_TriggeringItemId = -1;
-int hf_opcua_TrustedCertificates = -1;
-int hf_opcua_TrustedCrls = -1;
-int hf_opcua_UInt16 = -1;
-int hf_opcua_UInt16s = -1;
-int hf_opcua_UInt32 = -1;
-int hf_opcua_UInt32s = -1;
-int hf_opcua_UInt64 = -1;
-int hf_opcua_UInt64s = -1;
-int hf_opcua_UnacknowledgedMessageCount = -1;
-int hf_opcua_UnauthorizedRequestCount = -1;
-int hf_opcua_UnitId = -1;
-int hf_opcua_UnsupportedUnitIds = -1;
-int hf_opcua_UseBinaryEncoding = -1;
-int hf_opcua_UseServerCapabilitiesDefaults = -1;
-int hf_opcua_UseSimpleBounds = -1;
-int hf_opcua_UseSlopedExtrapolation = -1;
-int hf_opcua_UserAccessLevel = -1;
-int hf_opcua_UserExecutable = -1;
-int hf_opcua_UserName = -1;
-int hf_opcua_UserWriteMask = -1;
-int hf_opcua_ValidBits = -1;
-int hf_opcua_Value = -1;
-int hf_opcua_ValueRank = -1;
-int hf_opcua_VendorName = -1;
-int hf_opcua_VendorProductCertificate = -1;
-int hf_opcua_Verb = -1;
-int hf_opcua_ViewVersion = -1;
-int hf_opcua_WriteMask = -1;
-int hf_opcua_X = -1;
-int hf_opcua_XmlElement = -1;
-int hf_opcua_XmlElements = -1;
+int hf_opcua_AccessLevel;
+int hf_opcua_ActualSessionTimeout;
+int hf_opcua_AddResults;
+int hf_opcua_Algorithm;
+int hf_opcua_Alias;
+int hf_opcua_AnnotationTime;
+int hf_opcua_ApplicationUri;
+int hf_opcua_ArrayDimensions;
+int hf_opcua_AuditEntryId;
+int hf_opcua_AuthenticationMechanism;
+int hf_opcua_AvailableSequenceNumbers;
+int hf_opcua_AxisSteps;
+int hf_opcua_Boolean;
+int hf_opcua_Booleans;
+int hf_opcua_BuildDate;
+int hf_opcua_BuildNumber;
+int hf_opcua_Byte;
+int hf_opcua_ByteString;
+int hf_opcua_ByteStrings;
+int hf_opcua_CancelCount;
+int hf_opcua_CertificateData;
+int hf_opcua_ChannelId;
+int hf_opcua_ChannelLifetime;
+int hf_opcua_ClientCertificate;
+int hf_opcua_ClientConnectionTime;
+int hf_opcua_ClientHandle;
+int hf_opcua_ClientLastContactTime;
+int hf_opcua_ClientNonce;
+int hf_opcua_ClientProtocolVersion;
+int hf_opcua_ClientUserIdHistory;
+int hf_opcua_ClientUserIdOfSession;
+int hf_opcua_ComplianceDate;
+int hf_opcua_ComplianceTool;
+int hf_opcua_ConfigurationResults;
+int hf_opcua_ContainsNoLoops;
+int hf_opcua_ContinuationPoint;
+int hf_opcua_ContinuationPoints;
+int hf_opcua_CreateClientName;
+int hf_opcua_CreatedAt;
+int hf_opcua_CumulatedSessionCount;
+int hf_opcua_CumulatedSubscriptionCount;
+int hf_opcua_CurrentKeepAliveCount;
+int hf_opcua_CurrentLifetimeCount;
+int hf_opcua_CurrentMonitoredItemsCount;
+int hf_opcua_CurrentPublishRequestsInQueue;
+int hf_opcua_CurrentSessionCount;
+int hf_opcua_CurrentSubscriptionCount;
+int hf_opcua_CurrentSubscriptionsCount;
+int hf_opcua_CurrentTime;
+int hf_opcua_DataChangeNotificationsCount;
+int hf_opcua_DataStatusCodes;
+int hf_opcua_DateTime;
+int hf_opcua_DateTimes;
+int hf_opcua_DaylightSavingInOffset;
+int hf_opcua_DeadbandType;
+int hf_opcua_DeadbandValue;
+int hf_opcua_DeleteBidirectional;
+int hf_opcua_DeleteSubscriptions;
+int hf_opcua_DeleteTargetReferences;
+int hf_opcua_DisableCount;
+int hf_opcua_DisabledMonitoredItemCount;
+int hf_opcua_DiscardOldest;
+int hf_opcua_DiscardedMessageCount;
+int hf_opcua_DiscoveryProfileUri;
+int hf_opcua_DiscoveryUrl;
+int hf_opcua_DiscoveryUrls;
+int hf_opcua_Double;
+int hf_opcua_Doubles;
+int hf_opcua_EnableCount;
+int hf_opcua_Encoding;
+int hf_opcua_EncryptionAlgorithm;
+int hf_opcua_EndTime;
+int hf_opcua_EndpointUrl;
+int hf_opcua_EndpointUrlList;
+int hf_opcua_ErrorCount;
+int hf_opcua_EventIds;
+int hf_opcua_EventNotificationsCount;
+int hf_opcua_EventNotifier;
+int hf_opcua_EventQueueOverFlowCount;
+int hf_opcua_Executable;
+int hf_opcua_Float;
+int hf_opcua_Floats;
+int hf_opcua_GatewayServerUri;
+int hf_opcua_Guid;
+int hf_opcua_Guids;
+int hf_opcua_High;
+int hf_opcua_Historizing;
+int hf_opcua_Imaginary;
+int hf_opcua_IncludeSubTypes;
+int hf_opcua_IncludeSubtypes;
+int hf_opcua_Index;
+int hf_opcua_IndexRange;
+int hf_opcua_InputArgumentResults;
+int hf_opcua_Int16;
+int hf_opcua_Int16s;
+int hf_opcua_Int32;
+int hf_opcua_Int32s;
+int hf_opcua_Int64;
+int hf_opcua_Int64s;
+int hf_opcua_InvocationCreationTime;
+int hf_opcua_IsAbstract;
+int hf_opcua_IsDeleteModified;
+int hf_opcua_IsForward;
+int hf_opcua_IsInverse;
+int hf_opcua_IsOnline;
+int hf_opcua_IsReadModified;
+int hf_opcua_IssueDate;
+int hf_opcua_IssuedBy;
+int hf_opcua_IssuedTokenType;
+int hf_opcua_IssuerCertificates;
+int hf_opcua_IssuerCrls;
+int hf_opcua_IssuerEndpointUrl;
+int hf_opcua_Iteration;
+int hf_opcua_LastCounterResetTime;
+int hf_opcua_LastMethodCall;
+int hf_opcua_LastMethodCallTime;
+int hf_opcua_LastTransitionTime;
+int hf_opcua_LatePublishRequestCount;
+int hf_opcua_LinksToAdd;
+int hf_opcua_LinksToRemove;
+int hf_opcua_LocaleIds;
+int hf_opcua_Low;
+int hf_opcua_ManufacturerName;
+int hf_opcua_MaxAge;
+int hf_opcua_MaxArrayLength;
+int hf_opcua_MaxBufferSize;
+int hf_opcua_MaxByteStringLength;
+int hf_opcua_MaxDataSetsToReturn;
+int hf_opcua_MaxKeepAliveCount;
+int hf_opcua_MaxLifetimeCount;
+int hf_opcua_MaxMessageSize;
+int hf_opcua_MaxMonitoredItemCount;
+int hf_opcua_MaxNotificationsPerPublish;
+int hf_opcua_MaxRecordsToReturn;
+int hf_opcua_MaxReferencesToReturn;
+int hf_opcua_MaxRequestMessageSize;
+int hf_opcua_MaxResponseMessageSize;
+int hf_opcua_MaxStringLength;
+int hf_opcua_MdnsServerName;
+int hf_opcua_Message;
+int hf_opcua_MinimumSamplingInterval;
+int hf_opcua_ModificationTime;
+int hf_opcua_ModifyCount;
+int hf_opcua_MonitoredItemCount;
+int hf_opcua_MonitoredItemId;
+int hf_opcua_MonitoredItemIds;
+int hf_opcua_MonitoringQueueOverflowCount;
+int hf_opcua_MoreNotifications;
+int hf_opcua_Name;
+int hf_opcua_NamespaceUri;
+int hf_opcua_NextSequenceNumber;
+int hf_opcua_NotificationsCount;
+int hf_opcua_NumValuesPerNode;
+int hf_opcua_Offset;
+int hf_opcua_OperandStatusCodes;
+int hf_opcua_OperationResults;
+int hf_opcua_OperationTimeout;
+int hf_opcua_OrganizationUri;
+int hf_opcua_Password;
+int hf_opcua_PercentDataBad;
+int hf_opcua_PercentDataGood;
+int hf_opcua_PolicyId;
+int hf_opcua_Priority;
+int hf_opcua_ProcessingInterval;
+int hf_opcua_ProductName;
+int hf_opcua_ProductUri;
+int hf_opcua_ProfileId;
+int hf_opcua_ProfileUris;
+int hf_opcua_PublishRequestCount;
+int hf_opcua_PublishTime;
+int hf_opcua_PublishingEnabled;
+int hf_opcua_PublishingInterval;
+int hf_opcua_PublishingIntervalCount;
+int hf_opcua_QueueSize;
+int hf_opcua_Real;
+int hf_opcua_RecordId;
+int hf_opcua_RejectedRequestsCount;
+int hf_opcua_RejectedSessionCount;
+int hf_opcua_ReleaseContinuationPoint;
+int hf_opcua_ReleaseContinuationPoints;
+int hf_opcua_RemainingPathIndex;
+int hf_opcua_RemoveResults;
+int hf_opcua_RepublishMessageCount;
+int hf_opcua_RepublishMessageRequestCount;
+int hf_opcua_RepublishRequestCount;
+int hf_opcua_ReqTimes;
+int hf_opcua_RequestHandle;
+int hf_opcua_RequestedLifetime;
+int hf_opcua_RequestedLifetimeCount;
+int hf_opcua_RequestedMaxKeepAliveCount;
+int hf_opcua_RequestedMaxReferencesPerNode;
+int hf_opcua_RequestedPublishingInterval;
+int hf_opcua_RequestedSessionTimeout;
+int hf_opcua_Results;
+int hf_opcua_RetransmitSequenceNumber;
+int hf_opcua_ReturnBounds;
+int hf_opcua_ReturnDiagnostics;
+int hf_opcua_RevisedContinuationPoint;
+int hf_opcua_RevisedLifetime;
+int hf_opcua_RevisedLifetimeCount;
+int hf_opcua_RevisedMaxKeepAliveCount;
+int hf_opcua_RevisedProcessingInterval;
+int hf_opcua_RevisedPublishingInterval;
+int hf_opcua_RevisedQueueSize;
+int hf_opcua_RevisedSamplingInterval;
+int hf_opcua_RevisedSessionTimeout;
+int hf_opcua_RevisedStartTime;
+int hf_opcua_SByte;
+int hf_opcua_SBytes;
+int hf_opcua_SamplingInterval;
+int hf_opcua_SecondsTillShutdown;
+int hf_opcua_SecurityLevel;
+int hf_opcua_SecurityPolicyUri;
+int hf_opcua_SecurityRejectedRequestsCount;
+int hf_opcua_SecurityRejectedSessionCount;
+int hf_opcua_SecurityTokenLifetime;
+int hf_opcua_SelectClauseResults;
+int hf_opcua_SemaphoreFilePath;
+int hf_opcua_SendInitialValues;
+int hf_opcua_SequenceNumber;
+int hf_opcua_ServerCapabilities;
+int hf_opcua_ServerCapabilityFilter;
+int hf_opcua_ServerCertificate;
+int hf_opcua_ServerId;
+int hf_opcua_ServerName;
+int hf_opcua_ServerNonce;
+int hf_opcua_ServerProtocolVersion;
+int hf_opcua_ServerUri;
+int hf_opcua_ServerUris;
+int hf_opcua_ServerViewCount;
+int hf_opcua_ServiceLevel;
+int hf_opcua_ServiceResult;
+int hf_opcua_SessionAbortCount;
+int hf_opcua_SessionName;
+int hf_opcua_SessionTimeoutCount;
+int hf_opcua_Signature;
+int hf_opcua_SoftwareVersion;
+int hf_opcua_SpecifiedAttributes;
+int hf_opcua_SpecifiedLists;
+int hf_opcua_StartTime;
+int hf_opcua_StartingRecordId;
+int hf_opcua_Status;
+int hf_opcua_StatusCode;
+int hf_opcua_StatusCodes;
+int hf_opcua_String;
+int hf_opcua_StringTable;
+int hf_opcua_Strings;
+int hf_opcua_SubscriptionId;
+int hf_opcua_SubscriptionIds;
+int hf_opcua_Symmetric;
+int hf_opcua_TargetServerUri;
+int hf_opcua_TestId;
+int hf_opcua_TicketData;
+int hf_opcua_TimeoutHint;
+int hf_opcua_Timestamp;
+int hf_opcua_TokenData;
+int hf_opcua_TokenId;
+int hf_opcua_TotalCount;
+int hf_opcua_TransferRequestCount;
+int hf_opcua_TransferredToAltClientCount;
+int hf_opcua_TransferredToSameClientCount;
+int hf_opcua_TransportProfileUri;
+int hf_opcua_TransportProtocol;
+int hf_opcua_TreatUncertainAsBad;
+int hf_opcua_TriggeringItemId;
+int hf_opcua_TrustedCertificates;
+int hf_opcua_TrustedCrls;
+int hf_opcua_UInt16;
+int hf_opcua_UInt16s;
+int hf_opcua_UInt32;
+int hf_opcua_UInt32s;
+int hf_opcua_UInt64;
+int hf_opcua_UInt64s;
+int hf_opcua_UnacknowledgedMessageCount;
+int hf_opcua_UnauthorizedRequestCount;
+int hf_opcua_UnitId;
+int hf_opcua_UnsupportedUnitIds;
+int hf_opcua_UseBinaryEncoding;
+int hf_opcua_UseServerCapabilitiesDefaults;
+int hf_opcua_UseSimpleBounds;
+int hf_opcua_UseSlopedExtrapolation;
+int hf_opcua_UserAccessLevel;
+int hf_opcua_UserExecutable;
+int hf_opcua_UserName;
+int hf_opcua_UserWriteMask;
+int hf_opcua_ValidBits;
+int hf_opcua_Value;
+int hf_opcua_ValueRank;
+int hf_opcua_VendorName;
+int hf_opcua_VendorProductCertificate;
+int hf_opcua_Verb;
+int hf_opcua_ViewVersion;
+int hf_opcua_WriteMask;
+int hf_opcua_X;
+int hf_opcua_XmlElement;
+int hf_opcua_XmlElements;
/** Register field types. */
void registerFieldTypes(int proto)
diff --git a/plugins/epan/opcua/opcua_identifiers.h b/plugins/epan/opcua/opcua_identifiers.h
index 2cff1b29..aaad89ec 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.c b/plugins/epan/opcua/opcua_keyset.c
new file mode 100644
index 00000000..eba1d2de
--- /dev/null
+++ b/plugins/epan/opcua/opcua_keyset.c
@@ -0,0 +1,156 @@
+/******************************************************************************
+** Copyright (C) 2006-2023 ascolab GmbH. All Rights Reserved.
+** Web: http://www.ascolab.com
+**
+** SPDX-License-Identifier: GPL-2.0-or-later
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** Project: OpcUa Wireshark Plugin
+**
+** Description: OpcUa Protocol Decoder.
+**
+** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
+******************************************************************************/
+
+#include "opcua_keyset.h"
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <epan/packet.h>
+
+static struct ua_keyset *g_keysets;
+static unsigned int g_num_keysets;
+static bool g_sorted;
+
+int ua_keysets_init(void)
+{
+ g_keysets = NULL;
+ g_num_keysets = 0;
+ g_sorted = false;
+ return 0;
+}
+
+int ua_keysets_clear(void)
+{
+ if (g_keysets) {
+ g_free(g_keysets);
+ g_keysets = NULL;
+ }
+ g_num_keysets = 0;
+ g_sorted = false;
+ return 0;
+}
+
+/**
+ * Allocates a new keyset entry.
+ *
+ * @return Returns pointer to new empty keyset.
+ * NULL would indicate an out of memory situation.
+ */
+struct ua_keyset *ua_keysets_add(void)
+{
+ struct ua_keyset *tmp = g_realloc(g_keysets, sizeof(*g_keysets) * (g_num_keysets + 1));
+ if (tmp == NULL) return NULL; /* out of mem */
+ /* realloc succeeded, assign new pointer */
+ g_keysets = tmp;
+ /* return new element */
+ tmp = &g_keysets[g_num_keysets++];
+ memset(tmp, 0, sizeof(*tmp));
+ /* default to 32 byte sig_len if missing.
+ * This is the most likely length for SHA256 based signatures,
+ * SHA1 based signatures with 16 bytes are deprecated.
+ */
+ tmp->client_sig_len = 32;
+ tmp->server_sig_len = 32;
+ return tmp;
+}
+
+/**
+ * Compare function for bsearch/qsort.
+ * Sorts by keyset->id.
+ */
+static int keyset_compare(const void *a, const void *b)
+{
+ const struct ua_keyset *keyset_a = a;
+ const struct ua_keyset *keyset_b = b;
+
+ if (keyset_a->id == keyset_b->id) return 0;
+ if (keyset_a->id < keyset_b->id) return -1;
+ return 1;
+}
+
+/**
+ * Sorts the keyset to be able to use bsearch.
+ */
+void ua_keysets_sort(void)
+{
+ if (g_num_keysets >= 2) {
+ qsort(g_keysets, g_num_keysets, sizeof(struct ua_keyset), keyset_compare);
+ }
+
+ g_sorted = true;
+}
+
+/**
+ * Looks up a keyset by id.
+ *
+ * @param id The id is 64bit value which contains the combined securechannel_id and token_id.
+ *
+ * @return Keyset if found, NULL if not found.
+ */
+struct ua_keyset *ua_keysets_lookup(uint64_t id)
+{
+ struct ua_keyset *tmp, key;
+
+ if (!g_sorted) return NULL;
+
+ key.id = id;
+ tmp = bsearch(&key, g_keysets, g_num_keysets, sizeof(struct ua_keyset), keyset_compare);
+
+ return tmp;
+}
+
+static void print_hex(unsigned char *data, unsigned int data_len)
+{
+ unsigned int i;
+
+ for (i = 0; i < data_len; ++i) {
+ printf("%02X", data[i]);
+ }
+ printf("\n");
+}
+
+/**
+ * For debugging purposes only.
+ */
+void ua_keysets_dump(void)
+{
+ struct ua_keyset *tmp;
+ unsigned int i;
+ uint32_t channel_id, token_id;
+
+ printf("Number of keysets: %u\n", g_num_keysets);
+
+ for (i = 0; i < g_num_keysets; ++i) {
+ tmp = &g_keysets[i];
+ channel_id = (uint32_t)(tmp->id >> 32);
+ token_id = (uint32_t)(tmp->id & 0xffffffff);
+
+ printf("%u: id=%" PRIu64 ", channel_id=%u, token_id=%u\n", i, tmp->id, channel_id, token_id);
+
+ printf("%u: client IV: ", i);
+ print_hex(tmp->client_iv, sizeof(tmp->client_iv));
+ printf("%u: client key(%u): ", i, tmp->client_key_len);
+ print_hex(tmp->client_key, tmp->client_key_len);
+ printf("%u: client sig_len(%u): ", i, tmp->client_sig_len);
+
+ printf("%u: server IV: ", i);
+ print_hex(tmp->server_iv, sizeof(tmp->server_iv));
+ printf("%u: server key(%u): ", i, tmp->server_key_len);
+ print_hex(tmp->server_key, tmp->server_key_len);
+ printf("%u: server sig_len(%u): ", i, tmp->server_sig_len);
+ }
+}
+
diff --git a/plugins/epan/opcua/opcua_keyset.h b/plugins/epan/opcua/opcua_keyset.h
new file mode 100644
index 00000000..faa1bea6
--- /dev/null
+++ b/plugins/epan/opcua/opcua_keyset.h
@@ -0,0 +1,59 @@
+/******************************************************************************
+** Copyright (C) 2006-2023 ascolab GmbH. All Rights Reserved.
+** Web: http://www.ascolab.com
+**
+** SPDX-License-Identifier: GPL-2.0-or-later
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** Project: OpcUa Wireshark Plugin
+**
+** Description: OpcUa Protocol Decoder.
+**
+** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
+******************************************************************************/
+
+#ifndef __OPCUA_KEYSET_H__
+#define __OPCUA_KEYSET_H__
+
+#include <stdint.h>
+
+/** symmetric encryption keyset */
+struct ua_keyset {
+ uint64_t id; /** keyset identifier: combination of securechannel_id and token_id */
+ unsigned char client_iv[16]; /**< Client side IV. Always 128 bit. */
+ unsigned char server_iv[16]; /**< Server side IV. Always 128 bit. */
+ unsigned char client_key[32]; /**< client encryption key */
+ 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 signature length. */
+ unsigned int server_sig_len; /**< Server side symmetric signature length. */
+};
+
+int ua_keysets_init(void);
+int ua_keysets_clear(void);
+
+/**
+ * Creates a unique keyset id from securechannel_id and token_id.
+ *
+ * @param securechannel_id Identifies the secure channel to be able to distinguish
+ * different connections. This is a randomly generated id.
+ * @param token_id Identifies the keyset of a channel. This number normally starts with
+ * 1 and gets incremented with every secure channel renew.
+ *
+ * @return 64bit Id.
+ */
+static inline uint64_t ua_keyset_id(uint32_t securechannel_id, uint32_t token_id)
+{
+ return ((uint64_t)securechannel_id << 32) | token_id;
+}
+
+struct ua_keyset *ua_keysets_add(void);
+void ua_keysets_sort(void);
+struct ua_keyset *ua_keysets_lookup(uint64_t id);
+void ua_keysets_dump(void);
+
+#endif /* __OPCUA_KEYSET_H__ */
+
diff --git a/plugins/epan/opcua/opcua_security_layer.c b/plugins/epan/opcua/opcua_security_layer.c
index 933fd981..4b5a6303 100644
--- a/plugins/epan/opcua/opcua_security_layer.c
+++ b/plugins/epan/opcua/opcua_security_layer.c
@@ -18,32 +18,65 @@
#include <epan/packet.h>
#include "opcua_security_layer.h"
+#include "opcua_transport_layer.h"
-static int hf_opcua_security_tokenid = -1;
-static int hf_opcua_security_seq = -1;
-static int hf_opcua_security_rqid = -1;
+static int hf_opcua_security_tokenid;
+static int hf_opcua_security_padding;
+static int hf_opcua_security_signature;
+static int hf_opcua_sequence_seqno;
+static int hf_opcua_sequence_rqid;
-/** Register security layer types. */
+/** Register symmetric security layer types. */
void registerSecurityLayerTypes(int proto)
{
static hf_register_info hf[] =
{
- /* id full name abbreviation type display strings bitmask blurb HFILL */
- {&hf_opcua_security_tokenid, {"Security Token Id", "opcua.security.tokenid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
- {&hf_opcua_security_seq, {"Security Sequence Number", "opcua.security.seq", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
- {&hf_opcua_security_rqid, {"Security RequestId", "opcua.security.rqid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}}
+ /* id full name abbreviation type display strings bitmask blurb HFILL */
+ {&hf_opcua_security_tokenid, {"Security Token Id", "opcua.security.tokenid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ {&hf_opcua_security_padding, {"Security Padding", "opcua.security.padding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
+ {&hf_opcua_security_signature, {"Security Signature", "opcua.security.signature", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}},
};
proto_register_field_array(proto, hf, array_length(hf));
}
-/* Security Layer: message parsers
- * Only works for Security Policy "NoSecurity" at the moment.
- */
-void parseSecurityLayer(proto_tree *tree, tvbuff_t *tvb, gint *pOffset)
+/** Register sequence header types. */
+void registerSequenceLayerTypes(int proto)
+{
+ static hf_register_info hf[] =
+ {
+ /* id full name abbreviation type display strings bitmask blurb HFILL */
+ {&hf_opcua_sequence_seqno, {"Sequence Number", "opcua.sequence.seq", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
+ {&hf_opcua_sequence_rqid, {"RequestId", "opcua.sequence.rqid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}}
+ };
+ proto_register_field_array(proto, hf, array_length(hf));
+}
+
+/* The symmetric security header consists only of one field. */
+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;
- proto_tree_add_item(tree, hf_opcua_security_seq, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
- proto_tree_add_item(tree, hf_opcua_security_rqid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+}
+
+/* Sequence header can optionally be encrypted. */
+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;
+ proto_tree_add_item(tree, hf_opcua_sequence_rqid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ }
+}
+
+/* Parse symmetric security footer (signed only) */
+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, 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 d5b36ce0..c4dc2fe6 100644
--- a/plugins/epan/opcua/opcua_security_layer.h
+++ b/plugins/epan/opcua/opcua_security_layer.h
@@ -14,5 +14,11 @@
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
******************************************************************************/
+struct ua_metadata;
+
void registerSecurityLayerTypes(int proto);
-void parseSecurityLayer(proto_tree *tree, tvbuff_t *tvb, gint *pOffset);
+void registerSequenceLayerTypes(int proto);
+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 d71b6781..408cb3ed 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 = -1;
-gint ett_opcua_array_ServiceFault = -1;
-gint ett_opcua_FindServersRequest = -1;
-gint ett_opcua_array_FindServersRequest = -1;
-gint ett_opcua_FindServersResponse = -1;
-gint ett_opcua_array_FindServersResponse = -1;
-gint ett_opcua_FindServersOnNetworkRequest = -1;
-gint ett_opcua_array_FindServersOnNetworkRequest = -1;
-gint ett_opcua_FindServersOnNetworkResponse = -1;
-gint ett_opcua_array_FindServersOnNetworkResponse = -1;
-gint ett_opcua_GetEndpointsRequest = -1;
-gint ett_opcua_array_GetEndpointsRequest = -1;
-gint ett_opcua_GetEndpointsResponse = -1;
-gint ett_opcua_array_GetEndpointsResponse = -1;
-gint ett_opcua_RegisterServerRequest = -1;
-gint ett_opcua_array_RegisterServerRequest = -1;
-gint ett_opcua_RegisterServerResponse = -1;
-gint ett_opcua_array_RegisterServerResponse = -1;
-gint ett_opcua_RegisterServer2Request = -1;
-gint ett_opcua_array_RegisterServer2Request = -1;
-gint ett_opcua_RegisterServer2Response = -1;
-gint ett_opcua_array_RegisterServer2Response = -1;
-gint ett_opcua_OpenSecureChannelRequest = -1;
-gint ett_opcua_array_OpenSecureChannelRequest = -1;
-gint ett_opcua_OpenSecureChannelResponse = -1;
-gint ett_opcua_array_OpenSecureChannelResponse = -1;
-gint ett_opcua_CloseSecureChannelRequest = -1;
-gint ett_opcua_array_CloseSecureChannelRequest = -1;
-gint ett_opcua_CloseSecureChannelResponse = -1;
-gint ett_opcua_array_CloseSecureChannelResponse = -1;
-gint ett_opcua_CreateSessionRequest = -1;
-gint ett_opcua_array_CreateSessionRequest = -1;
-gint ett_opcua_CreateSessionResponse = -1;
-gint ett_opcua_array_CreateSessionResponse = -1;
-gint ett_opcua_ActivateSessionRequest = -1;
-gint ett_opcua_array_ActivateSessionRequest = -1;
-gint ett_opcua_ActivateSessionResponse = -1;
-gint ett_opcua_array_ActivateSessionResponse = -1;
-gint ett_opcua_CloseSessionRequest = -1;
-gint ett_opcua_array_CloseSessionRequest = -1;
-gint ett_opcua_CloseSessionResponse = -1;
-gint ett_opcua_array_CloseSessionResponse = -1;
-gint ett_opcua_CancelRequest = -1;
-gint ett_opcua_array_CancelRequest = -1;
-gint ett_opcua_CancelResponse = -1;
-gint ett_opcua_array_CancelResponse = -1;
-gint ett_opcua_AddNodesRequest = -1;
-gint ett_opcua_array_AddNodesRequest = -1;
-gint ett_opcua_AddNodesResponse = -1;
-gint ett_opcua_array_AddNodesResponse = -1;
-gint ett_opcua_AddReferencesRequest = -1;
-gint ett_opcua_array_AddReferencesRequest = -1;
-gint ett_opcua_AddReferencesResponse = -1;
-gint ett_opcua_array_AddReferencesResponse = -1;
-gint ett_opcua_DeleteNodesRequest = -1;
-gint ett_opcua_array_DeleteNodesRequest = -1;
-gint ett_opcua_DeleteNodesResponse = -1;
-gint ett_opcua_array_DeleteNodesResponse = -1;
-gint ett_opcua_DeleteReferencesRequest = -1;
-gint ett_opcua_array_DeleteReferencesRequest = -1;
-gint ett_opcua_DeleteReferencesResponse = -1;
-gint ett_opcua_array_DeleteReferencesResponse = -1;
-gint ett_opcua_BrowseRequest = -1;
-gint ett_opcua_array_BrowseRequest = -1;
-gint ett_opcua_BrowseResponse = -1;
-gint ett_opcua_array_BrowseResponse = -1;
-gint ett_opcua_BrowseNextRequest = -1;
-gint ett_opcua_array_BrowseNextRequest = -1;
-gint ett_opcua_BrowseNextResponse = -1;
-gint ett_opcua_array_BrowseNextResponse = -1;
-gint ett_opcua_TranslateBrowsePathsToNodeIdsRequest = -1;
-gint ett_opcua_array_TranslateBrowsePathsToNodeIdsRequest = -1;
-gint ett_opcua_TranslateBrowsePathsToNodeIdsResponse = -1;
-gint ett_opcua_array_TranslateBrowsePathsToNodeIdsResponse = -1;
-gint ett_opcua_RegisterNodesRequest = -1;
-gint ett_opcua_array_RegisterNodesRequest = -1;
-gint ett_opcua_RegisterNodesResponse = -1;
-gint ett_opcua_array_RegisterNodesResponse = -1;
-gint ett_opcua_UnregisterNodesRequest = -1;
-gint ett_opcua_array_UnregisterNodesRequest = -1;
-gint ett_opcua_UnregisterNodesResponse = -1;
-gint ett_opcua_array_UnregisterNodesResponse = -1;
-gint ett_opcua_QueryFirstRequest = -1;
-gint ett_opcua_array_QueryFirstRequest = -1;
-gint ett_opcua_QueryFirstResponse = -1;
-gint ett_opcua_array_QueryFirstResponse = -1;
-gint ett_opcua_QueryNextRequest = -1;
-gint ett_opcua_array_QueryNextRequest = -1;
-gint ett_opcua_QueryNextResponse = -1;
-gint ett_opcua_array_QueryNextResponse = -1;
-gint ett_opcua_ReadRequest = -1;
-gint ett_opcua_array_ReadRequest = -1;
-gint ett_opcua_ReadResponse = -1;
-gint ett_opcua_array_ReadResponse = -1;
-gint ett_opcua_HistoryReadRequest = -1;
-gint ett_opcua_array_HistoryReadRequest = -1;
-gint ett_opcua_HistoryReadResponse = -1;
-gint ett_opcua_array_HistoryReadResponse = -1;
-gint ett_opcua_WriteRequest = -1;
-gint ett_opcua_array_WriteRequest = -1;
-gint ett_opcua_WriteResponse = -1;
-gint ett_opcua_array_WriteResponse = -1;
-gint ett_opcua_HistoryUpdateRequest = -1;
-gint ett_opcua_array_HistoryUpdateRequest = -1;
-gint ett_opcua_HistoryUpdateResponse = -1;
-gint ett_opcua_array_HistoryUpdateResponse = -1;
-gint ett_opcua_CallRequest = -1;
-gint ett_opcua_array_CallRequest = -1;
-gint ett_opcua_CallResponse = -1;
-gint ett_opcua_array_CallResponse = -1;
-gint ett_opcua_CreateMonitoredItemsRequest = -1;
-gint ett_opcua_array_CreateMonitoredItemsRequest = -1;
-gint ett_opcua_CreateMonitoredItemsResponse = -1;
-gint ett_opcua_array_CreateMonitoredItemsResponse = -1;
-gint ett_opcua_ModifyMonitoredItemsRequest = -1;
-gint ett_opcua_array_ModifyMonitoredItemsRequest = -1;
-gint ett_opcua_ModifyMonitoredItemsResponse = -1;
-gint ett_opcua_array_ModifyMonitoredItemsResponse = -1;
-gint ett_opcua_SetMonitoringModeRequest = -1;
-gint ett_opcua_array_SetMonitoringModeRequest = -1;
-gint ett_opcua_SetMonitoringModeResponse = -1;
-gint ett_opcua_array_SetMonitoringModeResponse = -1;
-gint ett_opcua_SetTriggeringRequest = -1;
-gint ett_opcua_array_SetTriggeringRequest = -1;
-gint ett_opcua_SetTriggeringResponse = -1;
-gint ett_opcua_array_SetTriggeringResponse = -1;
-gint ett_opcua_DeleteMonitoredItemsRequest = -1;
-gint ett_opcua_array_DeleteMonitoredItemsRequest = -1;
-gint ett_opcua_DeleteMonitoredItemsResponse = -1;
-gint ett_opcua_array_DeleteMonitoredItemsResponse = -1;
-gint ett_opcua_CreateSubscriptionRequest = -1;
-gint ett_opcua_array_CreateSubscriptionRequest = -1;
-gint ett_opcua_CreateSubscriptionResponse = -1;
-gint ett_opcua_array_CreateSubscriptionResponse = -1;
-gint ett_opcua_ModifySubscriptionRequest = -1;
-gint ett_opcua_array_ModifySubscriptionRequest = -1;
-gint ett_opcua_ModifySubscriptionResponse = -1;
-gint ett_opcua_array_ModifySubscriptionResponse = -1;
-gint ett_opcua_SetPublishingModeRequest = -1;
-gint ett_opcua_array_SetPublishingModeRequest = -1;
-gint ett_opcua_SetPublishingModeResponse = -1;
-gint ett_opcua_array_SetPublishingModeResponse = -1;
-gint ett_opcua_PublishRequest = -1;
-gint ett_opcua_array_PublishRequest = -1;
-gint ett_opcua_PublishResponse = -1;
-gint ett_opcua_array_PublishResponse = -1;
-gint ett_opcua_RepublishRequest = -1;
-gint ett_opcua_array_RepublishRequest = -1;
-gint ett_opcua_RepublishResponse = -1;
-gint ett_opcua_array_RepublishResponse = -1;
-gint ett_opcua_TransferSubscriptionsRequest = -1;
-gint ett_opcua_array_TransferSubscriptionsRequest = -1;
-gint ett_opcua_TransferSubscriptionsResponse = -1;
-gint ett_opcua_array_TransferSubscriptionsResponse = -1;
-gint ett_opcua_DeleteSubscriptionsRequest = -1;
-gint ett_opcua_array_DeleteSubscriptionsRequest = -1;
-gint ett_opcua_DeleteSubscriptionsResponse = -1;
-gint ett_opcua_array_DeleteSubscriptionsResponse = -1;
-gint ett_opcua_TestStackRequest = -1;
-gint ett_opcua_array_TestStackRequest = -1;
-gint ett_opcua_TestStackResponse = -1;
-gint ett_opcua_array_TestStackResponse = -1;
-gint ett_opcua_TestStackExRequest = -1;
-gint ett_opcua_array_TestStackExRequest = -1;
-gint ett_opcua_TestStackExResponse = -1;
-gint ett_opcua_array_TestStackExResponse = -1;
-
-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");
@@ -360,12 +360,12 @@ void parseCreateSessionRequest(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_EndpointUrl);
parseString(subtree, tvb, pinfo, pOffset, hf_opcua_SessionName);
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ClientNonce);
- parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ClientCertificate);
+ parseCertificate(subtree, tvb, pinfo, pOffset, hf_opcua_ClientCertificate);
parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_RequestedSessionTimeout);
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");
@@ -375,7 +375,7 @@ void parseCreateSessionResponse(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
parseNodeId(subtree, tvb, pinfo, pOffset, "AuthenticationToken");
parseDouble(subtree, tvb, pinfo, pOffset, hf_opcua_RevisedSessionTimeout);
parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerNonce);
- parseByteString(subtree, tvb, pinfo, pOffset, hf_opcua_ServerCertificate);
+ parseCertificate(subtree, tvb, pinfo, pOffset, hf_opcua_ServerCertificate);
/* Array length field ignored: NoOfServerEndpoints */
parseArrayComplex(subtree, tvb, pinfo, pOffset, "ServerEndpoints", "EndpointDescription", parseEndpointDescription, ett_opcua_array_EndpointDescription);
/* Array length field ignored: NoOfServerSoftwareCertificates */
@@ -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 db8e6c42..86dfe3d5 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 b800da92..0559c476 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 0b614ae6..8b4881b8 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 24bcbbce..7f440147 100644
--- a/plugins/epan/opcua/opcua_simpletypes.c
+++ b/plugins/epan/opcua/opcua_simpletypes.c
@@ -19,8 +19,11 @@
#include <epan/packet.h>
#include <epan/expert.h>
-#include <epan/dissectors/packet-windows-common.h>
+#include <epan/proto.h>
#include <epan/proto_data.h>
+#include <epan/asn1.h>
+#include <epan/dissectors/packet-windows-common.h>
+#include <epan/dissectors/packet-x509af.h>
#include "opcua_simpletypes.h"
#include "opcua_hfindeces.h"
#include "opcua_statuscode.h"
@@ -83,94 +86,94 @@
#define MAX_ARRAY_LEN 10000
#define MAX_NESTING_DEPTH 100
-static int hf_opcua_diag_mask = -1;
-static int hf_opcua_diag_mask_symbolicflag = -1;
-static int hf_opcua_diag_mask_namespaceflag = -1;
-static int hf_opcua_diag_mask_localizedtextflag = -1;
-static int hf_opcua_diag_mask_localeflag = -1;
-static int hf_opcua_diag_mask_additionalinfoflag = -1;
-static int hf_opcua_diag_mask_innerstatuscodeflag = -1;
-static int hf_opcua_diag_mask_innerdiaginfoflag = -1;
-static int hf_opcua_loctext_mask = -1;
-static int hf_opcua_loctext_mask_localeflag = -1;
-static int hf_opcua_loctext_mask_textflag = -1;
-static int hf_opcua_datavalue_mask = -1;
-static int hf_opcua_datavalue_mask_valueflag = -1;
-static int hf_opcua_datavalue_mask_statuscodeflag = -1;
-static int hf_opcua_datavalue_mask_sourcetimestampflag = -1;
-static int hf_opcua_datavalue_mask_servertimestampflag = -1;
-static int hf_opcua_datavalue_mask_sourcepicoseconds = -1;
-static int hf_opcua_datavalue_mask_serverpicoseconds = -1;
-static int hf_opcua_nodeid_encodingmask = -1;
-static int hf_opcua_expandednodeid_mask = -1;
-static int hf_opcua_expandednodeid_mask_namespaceuri = -1;
-static int hf_opcua_expandednodeid_mask_serverindex = -1;
-static int hf_opcua_variant_encodingmask = -1;
-static int hf_opcua_nodeid_nsindex = -1;
-static int hf_opcua_nodeid_numeric = -1;
-static int hf_opcua_nodeid_string = -1;
-static int hf_opcua_nodeid_guid = -1;
-static int hf_opcua_nodeid_bytestring = -1;
-static int hf_opcua_localizedtext_locale = -1;
-static int hf_opcua_localizedtext_text = -1;
-static int hf_opcua_qualifiedname_id = -1;
-static int hf_opcua_qualifiedname_name = -1;
-static int hf_opcua_SourceTimestamp = -1;
-static int hf_opcua_SourcePicoseconds = -1;
-static int hf_opcua_ServerTimestamp = -1;
-static int hf_opcua_ServerPicoseconds = -1;
-static int hf_opcua_diag_symbolicid = -1;
-static int hf_opcua_diag_namespace = -1;
-static int hf_opcua_diag_localizedtext = -1;
-static int hf_opcua_diag_locale = -1;
-static int hf_opcua_diag_additionalinfo = -1;
-static int hf_opcua_diag_innerstatuscode = -1;
-static int hf_opcua_extobj_mask = -1;
-static int hf_opcua_extobj_mask_binbodyflag = -1;
-static int hf_opcua_extobj_mask_xmlbodyflag = -1;
-static int hf_opcua_ArraySize = -1;
-static int hf_opcua_ServerIndex = -1;
-static int hf_opcua_status_StructureChanged = -1;
-static int hf_opcua_status_SemanticsChanged = -1;
-static int hf_opcua_status_InfoBit_Limit_Overflow = -1;
-static int hf_opcua_status_InfoBit_Historian_Partial = -1;
-static int hf_opcua_status_InfoBit_Historian_ExtraData = -1;
-static int hf_opcua_status_InfoBit_Historian_MultiValue = -1;
-static int hf_opcua_status_InfoType = -1;
-static int hf_opcua_status_Limit = -1;
-static int hf_opcua_status_Historian = -1;
-int hf_opcua_returnDiag = -1;
-int hf_opcua_returnDiag_mask_sl_symbolicId = -1;
-int hf_opcua_returnDiag_mask_sl_localizedText = -1;
-int hf_opcua_returnDiag_mask_sl_additionalinfo = -1;
-int hf_opcua_returnDiag_mask_sl_innerstatuscode = -1;
-int hf_opcua_returnDiag_mask_sl_innerdiagnostics = -1;
-int hf_opcua_returnDiag_mask_ol_symbolicId = -1;
-int hf_opcua_returnDiag_mask_ol_localizedText = -1;
-int hf_opcua_returnDiag_mask_ol_additionalinfo = -1;
-int hf_opcua_returnDiag_mask_ol_innerstatuscode = -1;
-int hf_opcua_returnDiag_mask_ol_innerdiagnostics = -1;
-int hf_opcua_nodeClassMask = -1;
-int hf_opcua_nodeClassMask_all = -1;
-int hf_opcua_nodeClassMask_object = -1;
-int hf_opcua_nodeClassMask_variable = -1;
-int hf_opcua_nodeClassMask_method = -1;
-int hf_opcua_nodeClassMask_objecttype = -1;
-int hf_opcua_nodeClassMask_variabletype = -1;
-int hf_opcua_nodeClassMask_referencetype = -1;
-int hf_opcua_nodeClassMask_datatype = -1;
-int hf_opcua_nodeClassMask_view = -1;
-int hf_opcua_resultMask = -1;
-int hf_opcua_resultMask_all = -1;
-int hf_opcua_resultMask_referencetype = -1;
-int hf_opcua_resultMask_isforward = -1;
-int hf_opcua_resultMask_nodeclass = -1;
-int hf_opcua_resultMask_browsename = -1;
-int hf_opcua_resultMask_displayname = -1;
-int hf_opcua_resultMask_typedefinition = -1;
-
-static expert_field ei_array_length = EI_INIT;
-static expert_field ei_nesting_depth = EI_INIT;
+static int hf_opcua_diag_mask;
+static int hf_opcua_diag_mask_symbolicflag;
+static int hf_opcua_diag_mask_namespaceflag;
+static int hf_opcua_diag_mask_localizedtextflag;
+static int hf_opcua_diag_mask_localeflag;
+static int hf_opcua_diag_mask_additionalinfoflag;
+static int hf_opcua_diag_mask_innerstatuscodeflag;
+static int hf_opcua_diag_mask_innerdiaginfoflag;
+static int hf_opcua_loctext_mask;
+static int hf_opcua_loctext_mask_localeflag;
+static int hf_opcua_loctext_mask_textflag;
+static int hf_opcua_datavalue_mask;
+static int hf_opcua_datavalue_mask_valueflag;
+static int hf_opcua_datavalue_mask_statuscodeflag;
+static int hf_opcua_datavalue_mask_sourcetimestampflag;
+static int hf_opcua_datavalue_mask_servertimestampflag;
+static int hf_opcua_datavalue_mask_sourcepicoseconds;
+static int hf_opcua_datavalue_mask_serverpicoseconds;
+static int hf_opcua_nodeid_encodingmask;
+static int hf_opcua_expandednodeid_mask;
+static int hf_opcua_expandednodeid_mask_namespaceuri;
+static int hf_opcua_expandednodeid_mask_serverindex;
+static int hf_opcua_variant_encodingmask;
+static int hf_opcua_nodeid_nsindex;
+static int hf_opcua_nodeid_numeric;
+static int hf_opcua_nodeid_string;
+static int hf_opcua_nodeid_guid;
+static int hf_opcua_nodeid_bytestring;
+static int hf_opcua_localizedtext_locale;
+static int hf_opcua_localizedtext_text;
+static int hf_opcua_qualifiedname_id;
+static int hf_opcua_qualifiedname_name;
+static int hf_opcua_SourceTimestamp;
+static int hf_opcua_SourcePicoseconds;
+static int hf_opcua_ServerTimestamp;
+static int hf_opcua_ServerPicoseconds;
+static int hf_opcua_diag_symbolicid;
+static int hf_opcua_diag_namespace;
+static int hf_opcua_diag_localizedtext;
+static int hf_opcua_diag_locale;
+static int hf_opcua_diag_additionalinfo;
+static int hf_opcua_diag_innerstatuscode;
+static int hf_opcua_extobj_mask;
+static int hf_opcua_extobj_mask_binbodyflag;
+static int hf_opcua_extobj_mask_xmlbodyflag;
+static int hf_opcua_ArraySize;
+static int hf_opcua_ServerIndex;
+static int hf_opcua_status_StructureChanged;
+static int hf_opcua_status_SemanticsChanged;
+static int hf_opcua_status_InfoBit_Limit_Overflow;
+static int hf_opcua_status_InfoBit_Historian_Partial;
+static int hf_opcua_status_InfoBit_Historian_ExtraData;
+static int hf_opcua_status_InfoBit_Historian_MultiValue;
+static int hf_opcua_status_InfoType;
+static int hf_opcua_status_Limit;
+static int hf_opcua_status_Historian;
+int hf_opcua_returnDiag;
+int hf_opcua_returnDiag_mask_sl_symbolicId;
+int hf_opcua_returnDiag_mask_sl_localizedText;
+int hf_opcua_returnDiag_mask_sl_additionalinfo;
+int hf_opcua_returnDiag_mask_sl_innerstatuscode;
+int hf_opcua_returnDiag_mask_sl_innerdiagnostics;
+int hf_opcua_returnDiag_mask_ol_symbolicId;
+int hf_opcua_returnDiag_mask_ol_localizedText;
+int hf_opcua_returnDiag_mask_ol_additionalinfo;
+int hf_opcua_returnDiag_mask_ol_innerstatuscode;
+int hf_opcua_returnDiag_mask_ol_innerdiagnostics;
+int hf_opcua_nodeClassMask;
+int hf_opcua_nodeClassMask_all;
+int hf_opcua_nodeClassMask_object;
+int hf_opcua_nodeClassMask_variable;
+int hf_opcua_nodeClassMask_method;
+int hf_opcua_nodeClassMask_objecttype;
+int hf_opcua_nodeClassMask_variabletype;
+int hf_opcua_nodeClassMask_referencetype;
+int hf_opcua_nodeClassMask_datatype;
+int hf_opcua_nodeClassMask_view;
+int hf_opcua_resultMask;
+int hf_opcua_resultMask_all;
+int hf_opcua_resultMask_referencetype;
+int hf_opcua_resultMask_isforward;
+int hf_opcua_resultMask_nodeclass;
+int hf_opcua_resultMask_browsename;
+int hf_opcua_resultMask_displayname;
+int hf_opcua_resultMask_typedefinition;
+
+static expert_field ei_array_length;
+static expert_field ei_nesting_depth;
extern int proto_opcua;
@@ -342,52 +345,52 @@ static const value_string g_ResultMask[] = {
};
/* trees */
-static gint ett_opcua_diagnosticinfo = -1;
-static gint ett_opcua_diagnosticinfo_encodingmask = -1;
-static gint ett_opcua_nodeid = -1;
-static gint ett_opcua_expandednodeid = -1;
-static gint ett_opcua_expandednodeid_encodingmask = -1;
-static gint ett_opcua_localizedtext = -1;
-static gint ett_opcua_localizedtext_encodingmask = -1;
-static gint ett_opcua_qualifiedname = -1;
-static gint ett_opcua_datavalue = -1;
-static gint ett_opcua_datavalue_encodingmask = -1;
-static gint ett_opcua_variant = -1;
-static gint ett_opcua_variant_arraydims = -1;
-static gint ett_opcua_extensionobject = -1;
-static gint ett_opcua_extensionobject_encodingmask = -1;
-static gint ett_opcua_statuscode = -1;
-static gint ett_opcua_statuscode_info = -1;
-gint ett_opcua_array_Boolean = -1;
-gint ett_opcua_array_SByte = -1;
-gint ett_opcua_array_Byte = -1;
-gint ett_opcua_array_Int16 = -1;
-gint ett_opcua_array_UInt16 = -1;
-gint ett_opcua_array_Int32 = -1;
-gint ett_opcua_array_UInt32 = -1;
-gint ett_opcua_array_Int64 = -1;
-gint ett_opcua_array_UInt64 = -1;
-gint ett_opcua_array_Float = -1;
-gint ett_opcua_array_Double = -1;
-gint ett_opcua_array_String = -1;
-gint ett_opcua_array_DateTime = -1;
-gint ett_opcua_array_Guid = -1;
-gint ett_opcua_array_ByteString = -1;
-gint ett_opcua_array_XmlElement = -1;
-gint ett_opcua_array_NodeId = -1;
-gint ett_opcua_array_ExpandedNodeId = -1;
-gint ett_opcua_array_StatusCode = -1;
-gint ett_opcua_array_DiagnosticInfo = -1;
-gint ett_opcua_array_QualifiedName = -1;
-gint ett_opcua_array_LocalizedText = -1;
-gint ett_opcua_array_ExtensionObject = -1;
-gint ett_opcua_array_DataValue = -1;
-gint ett_opcua_array_Variant = -1;
-gint ett_opcua_returnDiagnostics = -1;
-gint ett_opcua_nodeClassMask = -1;
-gint ett_opcua_resultMask = -1;
-
-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,
@@ -541,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)
@@ -641,11 +644,55 @@ proto_item* parseString(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
return item;
}
-proto_item* parseStatusCode(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *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 *item = NULL;
+ char *szValue;
+ int iOffset = *pOffset;
+ int32_t iLen = tvb_get_letohl(tvb, *pOffset);
+ iOffset+=4;
+
+ if (retval) {
+ *retval = "";
+ }
+ if (lenretval) {
+ *lenretval = iLen;
+ }
+
+ if (iLen == -1)
+ {
+ item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 0, ENC_NA);
+ proto_item_append_text(item, "[OpcUa Null String]");
+ proto_item_set_end(item, tvb, *pOffset + 4);
+ }
+ else if (iLen == 0)
+ {
+ item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 0, ENC_NA);
+ proto_item_append_text(item, "[OpcUa Empty String]");
+ proto_item_set_end(item, tvb, *pOffset + 4);
+ }
+ else if (iLen > 0)
+ {
+ item = proto_tree_add_item_ret_string_and_length(tree, hfIndex, tvb, iOffset, iLen, ENC_UTF_8|ENC_NA, NULL, retval, lenretval);
+ iOffset += iLen; /* eat the whole string */
+ }
+ else
+ {
+ item = proto_tree_add_item(tree, hfIndex, tvb, *pOffset, 0, ENC_NA);
+ szValue = wmem_strdup_printf(pinfo->pool, "[Invalid String] Invalid length: %d", iLen);
+ proto_item_append_text(item, "%s", szValue);
+ proto_item_set_end(item, tvb, *pOffset + 4);
+ }
+
+ *pOffset = iOffset;
+ return item;
+}
+
+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);
@@ -656,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;
@@ -691,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++;
@@ -723,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)
@@ -767,34 +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;
}
// NOLINTNEXTLINE(misc-no-recursion)
-void parseDiagnosticInfo(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, int *pOffset, const char *szFieldName)
{
static int * const diag_mask[] = {&hf_opcua_diag_mask_symbolicflag,
&hf_opcua_diag_mask_namespaceflag,
@@ -805,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);
@@ -824,7 +871,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));
/* 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++;
@@ -866,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,
@@ -878,8 +925,43 @@ 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, int *pOffset, int hfIndex)
+{
+ proto_item *item = NULL;
+ char *szValue;
+ int iOffset = *pOffset;
+ int32_t iLen = tvb_get_letohl(tvb, iOffset);
+ iOffset += 4;
+
+ if (iLen == -1)
+ {
+ item = proto_tree_add_bytes_with_length(tree, hfIndex, tvb, *pOffset, 4, NULL, 0);
+ proto_item_append_text(item, "[OpcUa Null ByteString]");
+ }
+ else if (iLen == 0)
+ {
+ item = proto_tree_add_bytes_with_length(tree, hfIndex, tvb, *pOffset, 4, NULL, 0);
+ proto_item_append_text(item, "[OpcUa Empty ByteString]");
+ }
+ 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);
+ iOffset += iLen; /* eat the whole bytestring */
+ }
+ else
+ {
+ item = proto_tree_add_bytes_with_length(tree, hfIndex, tvb, *pOffset, 4, NULL, 0);
+ szValue = wmem_strdup_printf(pinfo->pool, "[Invalid ByteString] Invalid length: %d", iLen);
+ proto_item_append_text(item, "%s", szValue);
+ }
+
+ *pOffset = iOffset;
+}
+
// NOLINTNEXTLINE(misc-no-recursion)
-void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset, const char *szFieldName)
+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,
@@ -892,10 +974,10 @@ 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++;
@@ -931,15 +1013,15 @@ void parseDataValue(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *p
}
// NOLINTNEXTLINE(misc-no-recursion)
-void parseVariant(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, 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));
@@ -951,7 +1033,7 @@ 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++;
@@ -1062,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);
@@ -1095,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);
@@ -1124,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);
@@ -1151,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++;
@@ -1201,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);
@@ -1232,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++;
@@ -1248,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,
@@ -1258,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++;
@@ -1313,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 */
@@ -1347,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,
@@ -1360,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);
@@ -1372,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,
@@ -1383,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 9d88983b..6f5336da 100644
--- a/plugins/epan/opcua/opcua_simpletypes.h
+++ b/plugins/epan/opcua/opcua_simpletypes.h
@@ -39,67 +39,77 @@ 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,
+ UA_MessageMode_None,
+ UA_MessageMode_Sign,
+ UA_MessageMode_SignAndEncrypt,
+ UA_MessageMode_MaybeEncrypted
+};
/* 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* 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 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_transport_layer.c b/plugins/epan/opcua/opcua_transport_layer.c
index 31fdca3b..64867c92 100644
--- a/plugins/epan/opcua/opcua_transport_layer.c
+++ b/plugins/epan/opcua/opcua_transport_layer.c
@@ -17,34 +17,51 @@
#include "config.h"
#include <epan/packet.h>
+#include <epan/conversation.h>
+#include "epan/column-utils.h"
+
#include "opcua_security_layer.h"
#include "opcua_application_layer.h"
#include "opcua_simpletypes.h"
#include "opcua_transport_layer.h"
#include "opcua_servicetable.h"
-static int hf_opcua_transport_type = -1;
-static int hf_opcua_transport_chunk = -1;
-static int hf_opcua_transport_size = -1;
-static int hf_opcua_transport_ver = -1;
-static int hf_opcua_transport_scid = -1;
-static int hf_opcua_transport_rbs = -1;
-static int hf_opcua_transport_sbs = -1;
-static int hf_opcua_transport_mms = -1;
-static int hf_opcua_transport_mcc = -1;
-static int hf_opcua_transport_endpoint = -1;
-static int hf_opcua_transport_suri = -1;
-static int hf_opcua_transport_error = -1;
-static int hf_opcua_transport_reason = -1;
-static int hf_opcua_transport_spu = -1;
-static int hf_opcua_transport_scert = -1;
-static int hf_opcua_transport_rcthumb = -1;
-static int hf_opcua_transport_seq = -1;
-static int hf_opcua_transport_rqid = -1;
+static int hf_opcua_transport_type;
+static int hf_opcua_transport_chunk;
+static int hf_opcua_transport_size;
+static int hf_opcua_transport_ver;
+static int hf_opcua_transport_scid;
+static int hf_opcua_transport_rbs;
+static int hf_opcua_transport_sbs;
+static int hf_opcua_transport_mms;
+static int hf_opcua_transport_mcc;
+static int hf_opcua_transport_endpoint;
+static int hf_opcua_transport_suri;
+static int hf_opcua_transport_error;
+static int hf_opcua_transport_reason;
+static int hf_opcua_transport_spu;
+static int hf_opcua_transport_scert;
+static int hf_opcua_transport_rcthumb;
+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 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"
+/** Defined security policy URL from Part 7 OPC UA Specification. */
+#define UA_SECURITY_POLICY_BASIC128RSA15_STRING "http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15"
+/** Defined security policy URL from Part 7 OPC UA Specification. */
+#define UA_SECURITY_POLICY_BASIC256_STRING "http://opcfoundation.org/UA/SecurityPolicy#Basic256"
+/** Defined security policy URL from Part 7 OPC UA Specification. */
+#define UA_SECURITY_POLICY_BASIC256SHA256_STRING "http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256"
+/** Defined security policy URL from Part 7 OPC UA Specification. */
+#define UA_SECURITY_POLICY_AES128_SHA256_RSAOAEP_STRING "http://opcfoundation.org/UA/SecurityPolicy#Aes128_Sha256_RsaOaep"
+/** Defined security policy URL from Part 7 OPC UA Specification. */
+#define UA_SECURITY_POLICY_AES256_SHA256_RSAPSS_STRING "http://opcfoundation.org/UA/SecurityPolicy#Aes256_Sha256_RsaPss"
/** Register transport layer types. */
void registerTransportLayerTypes(int proto)
@@ -75,12 +92,17 @@ void registerTransportLayerTypes(int proto)
proto_register_field_array(proto, hf, array_length(hf));
}
-/* Transport Layer: message parsers */
-int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+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;
proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+}
+
+/* Transport Layer: message parsers */
+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;
proto_tree_add_item(tree, hf_opcua_transport_rbs, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_sbs, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
@@ -90,11 +112,9 @@ 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)
+int parseAcknowledge(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;
- proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ parseMessageHeader(tree, tvb, pinfo, pOffset, data);
proto_tree_add_item(tree, hf_opcua_transport_ver, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_rbs, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_sbs, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
@@ -103,48 +123,40 @@ 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)
+int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, 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;
- proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ parseMessageHeader(tree, tvb, pinfo, pOffset, data);
parseStatusCode(tree, tvb, pinfo, pOffset, hf_opcua_transport_error);
parseString(tree, tvb, pinfo, pOffset, hf_opcua_transport_reason);
return -1;
}
-int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, 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;
- proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ parseMessageHeader(tree, tvb, pinfo, pOffset, data);
parseString(tree, tvb, pinfo, pOffset, hf_opcua_transport_suri);
parseString(tree, tvb, pinfo, pOffset, hf_opcua_transport_endpoint);
return -1;
}
-int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+int parseMessage(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;
- proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ parseMessageHeader(tree, tvb, pinfo, pOffset, data);
proto_tree_add_item(tree, hf_opcua_transport_scid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
- /* message data contains the security layer */
- parseSecurityLayer(tree, tvb, pOffset);
-
return -1;
}
-int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint *pOffset)
+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);
parseString(tree, tvb, pinfo, pOffset, hf_opcua_transport_reason);
return -1;
}
-int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+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;
@@ -152,83 +164,125 @@ int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOff
proto_tree *nodeid_tree;
int ServiceId = 0;
- /* AT THE MOMENT NO SECURITY IS IMPLEMENTED IN UA.
- * WE CAN JUST JUMP INTO THE APPLICATION LAYER DATA.
- * THIS WILL CHAHNGE IN THE FUTURE. */
-
/* add encodeable object subtree */
- encobj_tree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_extensionobject, &ti, "OpcUa Service : Encodeable Object");
+ encobj_tree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_extensionobject, &ti, "Message: Encodeable Object");
/* add nodeid subtree */
- nodeid_tree = proto_tree_add_subtree(encobj_tree, tvb, *pOffset, -1, ett_opcua_nodeid, &ti_inner, "TypeId : ExpandedNodeId");
+ nodeid_tree = proto_tree_add_subtree(encobj_tree, tvb, *pOffset, -1, ett_opcua_nodeid, &ti_inner, "TypeId: ExpandedNodeId");
ServiceId = parseServiceNodeId(nodeid_tree, tvb, pOffset);
proto_item_set_end(ti_inner, tvb, *pOffset);
- dispatchService(encobj_tree, tvb, pinfo, pOffset, ServiceId);
+ if (ServiceId >= 0) {
+ dispatchService(encobj_tree, tvb, pinfo, pOffset, ServiceId);
+ }
proto_item_set_end(ti, tvb, *pOffset);
return ServiceId;
}
-int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+/**
+ * Stores the messages mode and signature length for this TCP connection.
+ * We need to know this mode in the following message to decide if decryption is required or not.
+ */
+void store_encryption_info(packet_info *pinfo, enum ua_message_mode mode, uint8_t sig_len)
{
- proto_item *ti;
- proto_item *ti_inner;
- proto_tree *encobj_tree;
- proto_tree *nodeid_tree;
- int ServiceId = 0;
-
- 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;
- proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
- proto_tree_add_item(tree, hf_opcua_transport_scid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
- parseString(tree, tvb, pinfo, pOffset, hf_opcua_transport_spu);
- parseByteString(tree, tvb, pinfo, pOffset, hf_opcua_transport_scert);
- parseByteString(tree, tvb, pinfo, pOffset, hf_opcua_transport_rcthumb);
- proto_tree_add_item(tree, hf_opcua_transport_seq, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
- proto_tree_add_item(tree, hf_opcua_transport_rqid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
-
- /* add encodeable object subtree */
- encobj_tree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_extensionobject, &ti, "Message : Encodeable Object");
+ conversation_t *conv = find_conversation_pinfo(pinfo, 0);
+ if (conv) {
+ uintptr_t data = (uintptr_t)mode;
+ data |= ((uintptr_t)sig_len << 8);
+ conversation_add_proto_data(conv, proto_opcua, (void *)data);
+ }
+}
- /* add nodeid subtree */
- nodeid_tree = proto_tree_add_subtree(encobj_tree, tvb, *pOffset, -1, ett_opcua_nodeid, &ti_inner, "TypeId : ExpandedNodeId");
- ServiceId = parseServiceNodeId(nodeid_tree, tvb, pOffset);
- proto_item_set_end(ti_inner, tvb, *pOffset);
+/** Returns the message mode and signature length for current TCP connection. */
+void get_encryption_info(packet_info *pinfo, enum ua_message_mode *mode, uint8_t *sig_len)
+{
+ conversation_t *conv = find_conversation_pinfo(pinfo, 0);
+ if (conv) {
+ uintptr_t data = (uintptr_t)conversation_get_proto_data(conv, proto_opcua);
+ if (data == 0) {
+ *mode = g_opcua_default_sig_len ? UA_MessageMode_MaybeEncrypted : UA_MessageMode_None;
+ *sig_len = g_opcua_default_sig_len;
+ } else {
+ *mode = (enum ua_message_mode)(data & 0xff);
+ *sig_len = (uintptr_t)(data >> 8);
+ }
+ }
+}
- dispatchService(encobj_tree, tvb, pinfo, pOffset, ServiceId);
+/**
+ * Compares an unterminated string of a string constant.
+ *
+ * @param text Unterminated string to compare.
+ * @param text_len String data.
+ * @param ref_text Zero terminated string constant to compare with.
+ *
+ * @return 0 if equal, -1 if not.
+ */
+static int opcua_string_compare(const char *text, int text_len, const char *ref_text)
+{
+ int len = (int)strlen(ref_text);
+ if (text_len == len && memcmp(text, ref_text, len) == 0) return 0;
- proto_item_set_end(ti, tvb, *pOffset);
- return ServiceId;
+ return -1;
}
-int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset)
+int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int *pOffset, struct ua_metadata *data)
{
- proto_item *ti;
- proto_item *ti_inner;
- proto_tree *encobj_tree;
- proto_tree *nodeid_tree;
- int ServiceId = 0;
+ const uint8_t *sec_policy = NULL;
+ int sec_policy_len = 0;
+ int ServiceId = -1;
+ bool encrypted = false;
+ // Message Header
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;
proto_tree_add_item(tree, hf_opcua_transport_size, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
proto_tree_add_item(tree, hf_opcua_transport_scid, tvb, *pOffset, 4, ENC_LITTLE_ENDIAN); *pOffset+=4;
+ // Asym Security Header
+ parseString_ret_string_and_length(tree, tvb, pinfo, pOffset, hf_opcua_transport_spu, &sec_policy, &sec_policy_len);
+ parseCertificate(tree, tvb, pinfo, pOffset, hf_opcua_transport_scert);
+ parseByteString(tree, tvb, pinfo, pOffset, hf_opcua_transport_rcthumb);
- parseSecurityLayer(tree, tvb, pOffset);
-
- /* add encodeable object subtree */
- encobj_tree = proto_tree_add_subtree(tree, tvb, *pOffset, -1, ett_opcua_extensionobject, &ti, "Message : Encodeable Object");
+ if (opcua_string_compare(sec_policy, sec_policy_len, UA_SECURITY_POLICY_NONE_STRING ) == 0) {
+ store_encryption_info(pinfo, UA_MessageMode_None, 0);
+ } else {
+ 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
+ if (opcua_string_compare(sec_policy, sec_policy_len, UA_SECURITY_POLICY_BASIC128RSA15_STRING ) == 0) {
+ sig_len = 20;
+ } else if (opcua_string_compare(sec_policy, sec_policy_len, UA_SECURITY_POLICY_BASIC256_STRING ) == 0) {
+ sig_len = 20;
+ } else if (opcua_string_compare(sec_policy, sec_policy_len, UA_SECURITY_POLICY_BASIC256SHA256_STRING ) == 0) {
+ sig_len = 32;
+ } else if (opcua_string_compare(sec_policy, sec_policy_len, UA_SECURITY_POLICY_AES128_SHA256_RSAOAEP_STRING ) == 0) {
+ sig_len = 32;
+ } else if (opcua_string_compare(sec_policy, sec_policy_len, UA_SECURITY_POLICY_AES256_SHA256_RSAPSS_STRING ) == 0) {
+ sig_len = 32;
+ }
+ // We don't know the messagemode without decrypting the OPN, so we assume it is SignAndEncrypt,
+ // we will try to decode the next service (CreateSession) and if it succeeds we change the mode to Sign
+ // or SignAndEncrypt accordingly
+ store_encryption_info(pinfo, UA_MessageMode_MaybeEncrypted, sig_len);
+ }
+
+ data->encrypted = encrypted;
+ if (!encrypted) {
+ parseSequenceHeader(tree, tvb, pOffset, data);
+ ServiceId = parseService(tree, tvb, pinfo,pOffset, data);
+ }
- /* add nodeid subtree */
- nodeid_tree = proto_tree_add_subtree(encobj_tree, tvb, *pOffset, -1, ett_opcua_nodeid, &ti_inner, "TypeId : ExpandedNodeId");
- ServiceId = parseServiceNodeId(nodeid_tree, tvb, pOffset);
- proto_item_set_end(ti_inner, tvb, *pOffset);
+ return ServiceId;
+}
- dispatchService(encobj_tree, tvb, pinfo, pOffset, ServiceId);
+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;
- proto_item_set_end(ti, tvb, *pOffset);
- return ServiceId;
+ return -1;
}
/*
diff --git a/plugins/epan/opcua/opcua_transport_layer.h b/plugins/epan/opcua/opcua_transport_layer.h
index 4e63aa5a..ce30cfbd 100644
--- a/plugins/epan/opcua/opcua_transport_layer.h
+++ b/plugins/epan/opcua/opcua_transport_layer.h
@@ -14,14 +14,25 @@
** Author: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
******************************************************************************/
+/* This struct is used to pass meta data down to decoding functions. */
+struct ua_metadata {
+ bool encrypted; /* true if payload is encrypted, false if no encryption was used or it was successfully decrypted. */
+};
+
+extern int g_opcua_default_sig_len;
+
/* Transport Layer: message parsers */
-int parseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-int parseAcknowledge(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-int parseError(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-int parseReverseHello(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-int parseMessage(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-int parseAbort(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-int parseService(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-int parseOpenSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
-int parseCloseSecureChannel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint *pOffset);
+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;
+void store_encryption_info(packet_info *pinfo, enum ua_message_mode mode, uint8_t sig_len);
+void get_encryption_info(packet_info *pinfo, enum ua_message_mode *mode, uint8_t *sig_len);
diff --git a/plugins/epan/pluginifdemo/pluginifdemo.c b/plugins/epan/pluginifdemo/pluginifdemo.c
index e6c42b47..e34d7e11 100644
--- a/plugins/epan/pluginifdemo/pluginifdemo.c
+++ b/plugins/epan/pluginifdemo/pluginifdemo.c
@@ -24,18 +24,18 @@
void proto_register_pluginifdemo(void);
void proto_reg_handoff_pluginifdemo(void);
-static int proto_pluginifdemo = -1;
+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/packet-dcerpc-pn-io.c b/plugins/epan/profinet/packet-dcerpc-pn-io.c
index a5afda86..82dcd3fa 100644
--- a/plugins/epan/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/epan/profinet/packet-dcerpc-pn-io.c
@@ -104,880 +104,936 @@ void proto_reg_handoff_pn_io(void);
-static int proto_pn_io = -1;
-static int proto_pn_io_device = -1;
-static int proto_pn_io_controller = -1;
-static int proto_pn_io_supervisor = -1;
-static int proto_pn_io_parameterserver = -1;
-static int proto_pn_io_implicitar = -1;
-int proto_pn_io_apdu_status = -1;
-int proto_pn_io_time_aware_status = -1;
-
-static int hf_pn_io_opnum = -1;
-static int hf_pn_io_reserved16 = -1;
-
-static int hf_pn_io_array = -1;
-static int hf_pn_io_args_max = -1;
-static int hf_pn_io_args_len = -1;
-static int hf_pn_io_array_max_count = -1;
-static int hf_pn_io_array_offset = -1;
-static int hf_pn_io_array_act_count = -1;
-
-static int hf_pn_io_ar_type = -1;
-static int hf_pn_io_artype_req = -1;
-static int hf_pn_io_cminitiator_macadd = -1;
-static int hf_pn_io_cminitiator_objectuuid = -1;
-static int hf_pn_io_parameter_server_objectuuid = -1;
-static int hf_pn_io_ar_data = -1;
-static int hf_pn_io_ar_properties = -1;
-static int hf_pn_io_ar_properties_state = -1;
-static int hf_pn_io_ar_properties_supervisor_takeover_allowed = -1;
-static int hf_pn_io_ar_properties_parameterization_server = -1;
+static int proto_pn_io;
+static int proto_pn_io_device;
+static int proto_pn_io_controller;
+static int proto_pn_io_supervisor;
+static int proto_pn_io_parameterserver;
+static int proto_pn_io_implicitar;
+int proto_pn_io_apdu_status;
+int proto_pn_io_time_aware_status;
+
+static int hf_pn_io_opnum;
+static int hf_pn_io_reserved16;
+
+static int hf_pn_io_array;
+static int hf_pn_io_args_max;
+static int hf_pn_io_args_len;
+static int hf_pn_io_array_max_count;
+static int hf_pn_io_array_offset;
+static int hf_pn_io_array_act_count;
+
+static int hf_pn_io_ar_type;
+static int hf_pn_io_artype_req;
+static int hf_pn_io_cminitiator_macadd;
+static int hf_pn_io_cminitiator_objectuuid;
+static int hf_pn_io_parameter_server_objectuuid;
+static int hf_pn_io_ar_data;
+static int hf_pn_io_ar_properties;
+static int hf_pn_io_ar_properties_state;
+static int hf_pn_io_ar_properties_supervisor_takeover_allowed;
+static int hf_pn_io_ar_properties_parameterization_server;
/* removed within 2.3
-static int hf_pn_io_ar_properties_data_rate = -1;
+static int hf_pn_io_ar_properties_data_rate;
*/
-static int hf_pn_io_ar_properties_reserved_1 = -1;
-static int hf_pn_io_ar_properties_device_access = -1;
-static int hf_pn_io_ar_properties_companion_ar = -1;
-static int hf_pn_io_ar_properties_achnowledge_companion_ar = -1;
-static int hf_pn_io_ar_properties_reserved = -1;
-static int hf_pn_io_ar_properties_time_aware_system = -1;
-static int hf_pn_io_ar_properties_combined_object_container_with_legacy_startupmode = -1;
-static int hf_pn_io_ar_properties_combined_object_container_with_advanced_startupmode = -1;
-static int hf_pn_io_ar_properties_pull_module_alarm_allowed = -1;
-
-static int hf_pn_RedundancyInfo = -1;
-static int hf_pn_RedundancyInfo_reserved = -1;
-static int hf_pn_io_number_of_ARDATAInfo = -1;
-
-static int hf_pn_io_cminitiator_activitytimeoutfactor = -1;
-static int hf_pn_io_cminitiator_udprtport = -1;
-static int hf_pn_io_station_name_length = -1;
-static int hf_pn_io_cminitiator_station_name = -1;
-/* static int hf_pn_io_responder_station_name = -1; */
-static int hf_pn_io_arproperties_StartupMode = -1;
-
-static int hf_pn_io_parameter_server_station_name = -1;
-
-static int hf_pn_io_cmresponder_macadd = -1;
-static int hf_pn_io_cmresponder_udprtport = -1;
-
-static int hf_pn_io_number_of_iocrs = -1;
-static int hf_pn_io_iocr_tree = -1;
-static int hf_pn_io_iocr_type = -1;
-static int hf_pn_io_iocr_reference = -1;
-static int hf_pn_io_iocr_SubframeOffset = -1;
-static int hf_pn_io_iocr_SubframeData =-1;
-/* static int hf_pn_io_iocr_txports_port = -1; */
-/* static int hf_pn_io_iocr_txports_redundantport = -1; */
-static int hf_pn_io_sr_properties_Reserved_1 = -1;
-static int hf_pn_io_sr_properties_Mode = -1;
-static int hf_pn_io_sr_properties_Reserved_2 = -1;
-static int hf_pn_io_sr_properties_Reserved_3 = -1;
-static int hf_pn_io_RedundancyDataHoldFactor = -1;
-static int hf_pn_io_sr_properties = -1;
-static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_0 = -1;
-static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_1 = -1;
-
-static int hf_pn_io_arvendor_strucidentifier_if0_low = -1;
-static int hf_pn_io_arvendor_strucidentifier_if0_high = -1;
-static int hf_pn_io_arvendor_strucidentifier_if0_is8000= -1;
-static int hf_pn_io_arvendor_strucidentifier_not0 = -1;
-
-static int hf_pn_io_lt = -1;
-static int hf_pn_io_iocr_properties = -1;
-static int hf_pn_io_iocr_properties_rtclass = -1;
-static int hf_pn_io_iocr_properties_reserved_1 = -1;
-static int hf_pn_io_iocr_properties_media_redundancy = -1;
-static int hf_pn_io_iocr_properties_reserved_2 = -1;
-static int hf_pn_io_iocr_properties_reserved_3 = -1;
-static int hf_pn_io_iocr_properties_fast_forwarding_mac_adr = -1;
-static int hf_pn_io_iocr_properties_distributed_subframe_watchdog = -1;
-static int hf_pn_io_iocr_properties_full_subframe_structure = -1;
-
-
-static int hf_pn_io_data_length = -1;
-static int hf_pn_io_ir_frame_data = -1;
-static int hf_pn_io_frame_id = -1;
-static int hf_pn_io_send_clock_factor = -1;
-static int hf_pn_io_reduction_ratio = -1;
-static int hf_pn_io_phase = -1;
-static int hf_pn_io_sequence = -1;
-static int hf_pn_io_frame_send_offset = -1;
-static int hf_pn_io_frame_data_properties = -1;
-static int hf_pn_io_frame_data_properties_forwarding_Mode = -1;
-static int hf_pn_io_frame_data_properties_FastForwardingMulticastMACAdd = -1;
-static int hf_pn_io_frame_data_properties_FragmentMode = -1;
-static int hf_pn_io_frame_data_properties_reserved_1 = -1;
-static int hf_pn_io_frame_data_properties_reserved_2 = -1;
-static int hf_pn_io_watchdog_factor = -1;
-static int hf_pn_io_data_hold_factor = -1;
-static int hf_pn_io_iocr_tag_header = -1;
-static int hf_pn_io_iocr_multicast_mac_add = -1;
-static int hf_pn_io_number_of_apis = -1;
-static int hf_pn_io_number_of_io_data_objects = -1;
-static int hf_pn_io_io_data_object_frame_offset = -1;
-static int hf_pn_io_number_of_iocs = -1;
-static int hf_pn_io_iocs_frame_offset = -1;
-
-static int hf_pn_io_SFIOCRProperties = -1;
-static int hf_pn_io_DistributedWatchDogFactor = -1;
-static int hf_pn_io_RestartFactorForDistributedWD = -1;
-static int hf_pn_io_SFIOCRProperties_DFPmode = -1;
-static int hf_pn_io_SFIOCRProperties_reserved_1 = -1;
-static int hf_pn_io_SFIOCRProperties_reserved_2 = -1;
-static int hf_pn_io_SFIOCRProperties_DFPType =-1;
-static int hf_pn_io_SFIOCRProperties_DFPRedundantPathLayout = -1;
-static int hf_pn_io_SFIOCRProperties_SFCRC16 = -1;
-
-static int hf_pn_io_subframe_data = -1;
-static int hf_pn_io_subframe_data_reserved1 = -1;
-static int hf_pn_io_subframe_data_reserved2 = -1;
-
-static int hf_pn_io_subframe_data_position = -1;
-static int hf_pn_io_subframe_reserved1 = -1;
-static int hf_pn_io_subframe_data_length = -1;
-static int hf_pn_io_subframe_reserved2 = -1;
-
-static int hf_pn_io_alarmcr_type = -1;
-static int hf_pn_io_alarmcr_properties = -1;
-static int hf_pn_io_alarmcr_properties_priority = -1;
-static int hf_pn_io_alarmcr_properties_transport = -1;
-static int hf_pn_io_alarmcr_properties_reserved = -1;
-
-static int hf_pn_io_rta_timeoutfactor = -1;
-static int hf_pn_io_rta_retries = -1;
-static int hf_pn_io_localalarmref = -1;
-static int hf_pn_io_remotealarmref = -1;
-static int hf_pn_io_maxalarmdatalength = -1;
-static int hf_pn_io_alarmcr_tagheaderhigh = -1;
-static int hf_pn_io_alarmcr_tagheaderlow = -1;
-
-static int hf_pn_io_IRData_uuid = -1;
-static int hf_pn_io_ar_uuid = -1;
-static int hf_pn_io_target_ar_uuid = -1;
-static int hf_pn_io_ar_discriminator = -1;
-static int hf_pn_io_ar_configid = -1;
-static int hf_pn_io_ar_arnumber = -1;
-static int hf_pn_io_ar_arresource = -1;
-static int hf_pn_io_ar_arreserved = -1;
-static int hf_pn_io_ar_selector = -1;
-static int hf_pn_io_api_tree = -1;
-static int hf_pn_io_module_tree = -1;
-static int hf_pn_io_submodule_tree = -1;
-static int hf_pn_io_io_data_object = -1;
+static int hf_pn_io_ar_properties_reserved_1;
+static int hf_pn_io_ar_properties_device_access;
+static int hf_pn_io_ar_properties_companion_ar;
+static int hf_pn_io_ar_properties_achnowledge_companion_ar;
+static int hf_pn_io_ar_properties_reserved;
+static int hf_pn_io_ar_properties_time_aware_system;
+static int hf_pn_io_ar_properties_combined_object_container_with_legacy_startupmode;
+static int hf_pn_io_ar_properties_combined_object_container_with_advanced_startupmode;
+static int hf_pn_io_ar_properties_pull_module_alarm_allowed;
+
+static int hf_pn_RedundancyInfo;
+static int hf_pn_RedundancyInfo_reserved;
+static int hf_pn_io_number_of_ARDATAInfo;
+
+static int hf_pn_io_cminitiator_activitytimeoutfactor;
+static int hf_pn_io_cminitiator_udprtport;
+static int hf_pn_io_station_name_length;
+static int hf_pn_io_cminitiator_station_name;
+/* static int hf_pn_io_responder_station_name; */
+static int hf_pn_io_arproperties_StartupMode;
+
+static int hf_pn_io_parameter_server_station_name;
+
+static int hf_pn_io_cmresponder_macadd;
+static int hf_pn_io_cmresponder_udprtport;
+
+static int hf_pn_io_number_of_iocrs;
+static int hf_pn_io_iocr_tree;
+static int hf_pn_io_iocr_type;
+static int hf_pn_io_iocr_reference;
+static int hf_pn_io_iocr_SubframeOffset;
+static int hf_pn_io_iocr_SubframeData;
+/* static int hf_pn_io_iocr_txports_port; */
+/* static int hf_pn_io_iocr_txports_redundantport; */
+static int hf_pn_io_sr_properties_Reserved_1;
+static int hf_pn_io_sr_properties_Mode;
+static int hf_pn_io_sr_properties_Reserved_2;
+static int hf_pn_io_sr_properties_Reserved_3;
+static int hf_pn_io_RedundancyDataHoldFactor;
+static int hf_pn_io_sr_properties;
+static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_0;
+static int hf_pn_io_sr_properties_InputValidOnBackupAR_with_SRProperties_Mode_1;
+
+static int hf_pn_io_arvendor_strucidentifier_if0_low;
+static int hf_pn_io_arvendor_strucidentifier_if0_high;
+static int hf_pn_io_arvendor_strucidentifier_if0_is8000;
+static int hf_pn_io_arvendor_strucidentifier_not0;
+
+static int hf_pn_io_lt;
+static int hf_pn_io_iocr_properties;
+static int hf_pn_io_iocr_properties_rtclass;
+static int hf_pn_io_iocr_properties_reserved_1;
+static int hf_pn_io_iocr_properties_media_redundancy;
+static int hf_pn_io_iocr_properties_reserved_2;
+static int hf_pn_io_iocr_properties_reserved_3;
+static int hf_pn_io_iocr_properties_fast_forwarding_mac_adr;
+static int hf_pn_io_iocr_properties_distributed_subframe_watchdog;
+static int hf_pn_io_iocr_properties_full_subframe_structure;
+
+
+static int hf_pn_io_data_length;
+static int hf_pn_io_ir_frame_data;
+static int hf_pn_io_frame_id;
+static int hf_pn_io_send_clock_factor;
+static int hf_pn_io_reduction_ratio;
+static int hf_pn_io_phase;
+static int hf_pn_io_sequence;
+static int hf_pn_io_frame_send_offset;
+static int hf_pn_io_frame_data_properties;
+static int hf_pn_io_frame_data_properties_forwarding_Mode;
+static int hf_pn_io_frame_data_properties_FastForwardingMulticastMACAdd;
+static int hf_pn_io_frame_data_properties_FragmentMode;
+static int hf_pn_io_frame_data_properties_reserved_1;
+static int hf_pn_io_frame_data_properties_reserved_2;
+static int hf_pn_io_watchdog_factor;
+static int hf_pn_io_data_hold_factor;
+static int hf_pn_io_iocr_tag_header;
+static int hf_pn_io_iocr_multicast_mac_add;
+static int hf_pn_io_number_of_apis;
+static int hf_pn_io_number_of_io_data_objects;
+static int hf_pn_io_io_data_object_frame_offset;
+static int hf_pn_io_number_of_iocs;
+static int hf_pn_io_iocs_frame_offset;
+
+static int hf_pn_io_SFIOCRProperties;
+static int hf_pn_io_DistributedWatchDogFactor;
+static int hf_pn_io_RestartFactorForDistributedWD;
+static int hf_pn_io_SFIOCRProperties_DFPmode;
+static int hf_pn_io_SFIOCRProperties_reserved_1;
+static int hf_pn_io_SFIOCRProperties_reserved_2;
+static int hf_pn_io_SFIOCRProperties_DFPType;
+static int hf_pn_io_SFIOCRProperties_DFPRedundantPathLayout;
+static int hf_pn_io_SFIOCRProperties_SFCRC16;
+
+static int hf_pn_io_subframe_data;
+static int hf_pn_io_subframe_data_reserved1;
+static int hf_pn_io_subframe_data_reserved2;
+
+static int hf_pn_io_subframe_data_position;
+static int hf_pn_io_subframe_reserved1;
+static int hf_pn_io_subframe_data_length;
+static int hf_pn_io_subframe_reserved2;
+
+static int hf_pn_io_alarmcr_type;
+static int hf_pn_io_alarmcr_properties;
+static int hf_pn_io_alarmcr_properties_priority;
+static int hf_pn_io_alarmcr_properties_transport;
+static int hf_pn_io_alarmcr_properties_reserved;
+
+static int hf_pn_io_rta_timeoutfactor;
+static int hf_pn_io_rta_retries;
+static int hf_pn_io_localalarmref;
+static int hf_pn_io_remotealarmref;
+static int hf_pn_io_maxalarmdatalength;
+static int hf_pn_io_alarmcr_tagheaderhigh;
+static int hf_pn_io_alarmcr_tagheaderlow;
+
+static int hf_pn_io_IRData_uuid;
+static int hf_pn_io_ar_uuid;
+static int hf_pn_io_target_ar_uuid;
+static int hf_pn_io_ar_discriminator;
+static int hf_pn_io_ar_configid;
+static int hf_pn_io_ar_arnumber;
+static int hf_pn_io_ar_arresource;
+static int hf_pn_io_ar_arreserved;
+static int hf_pn_io_ar_selector;
+static int hf_pn_io_api_tree;
+static int hf_pn_io_module_tree;
+static int hf_pn_io_submodule_tree;
+static int hf_pn_io_io_data_object;
/* General module information */
-static int hf_pn_io_io_cs = -1;
-
-static int hf_pn_io_substitutionmode = -1;
-
-static int hf_pn_io_api = -1;
-static int hf_pn_io_slot_nr = -1;
-static int hf_pn_io_subslot_nr = -1;
-static int hf_pn_io_index = -1;
-static int hf_pn_io_seq_number = -1;
-static int hf_pn_io_record_data_length = -1;
-static int hf_pn_io_add_val1 = -1;
-static int hf_pn_io_add_val2 = -1;
-
-static int hf_pn_io_block = -1;
-static int hf_pn_io_block_header = -1;
-static int hf_pn_io_block_type = -1;
-static int hf_pn_io_block_length = -1;
-static int hf_pn_io_block_version_high = -1;
-static int hf_pn_io_block_version_low = -1;
-
-static int hf_pn_io_sessionkey = -1;
-static int hf_pn_io_control_alarm_sequence_number = -1;
-static int hf_pn_io_control_command = -1;
-static int hf_pn_io_control_command_prmend = -1;
-static int hf_pn_io_control_command_applready = -1;
-static int hf_pn_io_control_command_release = -1;
-static int hf_pn_io_control_command_done = -1;
-static int hf_pn_io_control_command_ready_for_companion = -1;
-static int hf_pn_io_control_command_ready_for_rt_class3 = -1;
-static int hf_pn_io_control_command_prmbegin = -1;
-static int hf_pn_io_control_command_reserved_7_15 = -1;
-static int hf_pn_io_control_block_properties = -1;
-static int hf_pn_io_control_block_properties_applready = -1;
-static int hf_pn_io_control_block_properties_applready_bit0 = -1;
-static int hf_pn_io_control_block_properties_applready_bit1 = -1;
-static int hf_pn_io_control_block_properties_applready_otherbits = -1;
-
-/* static int hf_pn_io_AlarmSequenceNumber = -1; */
-static int hf_pn_io_control_command_reserved = -1;
-static int hf_pn_io_SubmoduleListEntries = -1;
-
-static int hf_pn_io_alarm_type = -1;
-static int hf_pn_io_alarm_specifier = -1;
-static int hf_pn_io_alarm_specifier_sequence = -1;
-static int hf_pn_io_alarm_specifier_channel = -1;
-static int hf_pn_io_alarm_specifier_manufacturer = -1;
-static int hf_pn_io_alarm_specifier_submodule = -1;
-static int hf_pn_io_alarm_specifier_ardiagnosis = -1;
-
-static int hf_pn_io_alarm_dst_endpoint = -1;
-static int hf_pn_io_alarm_src_endpoint = -1;
-static int hf_pn_io_pdu_type = -1;
-static int hf_pn_io_pdu_type_type = -1;
-static int hf_pn_io_pdu_type_version = -1;
-static int hf_pn_io_add_flags = -1;
-static int hf_pn_io_window_size = -1;
-static int hf_pn_io_tack = -1;
-static int hf_pn_io_send_seq_num = -1;
-static int hf_pn_io_ack_seq_num = -1;
-static int hf_pn_io_var_part_len = -1;
-
-static int hf_pn_io_number_of_modules = -1;
-static int hf_pn_io_module_ident_number = -1;
-static int hf_pn_io_module_properties = -1;
-static int hf_pn_io_module_state = -1;
-static int hf_pn_io_number_of_submodules = -1;
-static int hf_pn_io_submodule_ident_number = -1;
-static int hf_pn_io_submodule_properties = -1;
-static int hf_pn_io_submodule_properties_type = -1;
-static int hf_pn_io_submodule_properties_shared_input = -1;
-static int hf_pn_io_submodule_properties_reduce_input_submodule_data_length = -1;
-static int hf_pn_io_submodule_properties_reduce_output_submodule_data_length = -1;
-static int hf_pn_io_submodule_properties_discard_ioxs = -1;
-static int hf_pn_io_submodule_properties_reserved = -1;
-
-static int hf_pn_io_submodule_state = -1;
-static int hf_pn_io_submodule_state_format_indicator = -1;
-static int hf_pn_io_submodule_state_add_info = -1;
-static int hf_pn_io_submodule_state_advice = -1;
-static int hf_pn_io_submodule_state_maintenance_required = -1;
-static int hf_pn_io_submodule_state_maintenance_demanded = -1;
-static int hf_pn_io_submodule_state_fault = -1;
-static int hf_pn_io_submodule_state_ar_info = -1;
-static int hf_pn_io_submodule_state_ident_info = -1;
-static int hf_pn_io_submodule_state_detail = -1;
-
-static int hf_pn_io_data_description_tree = -1;
-static int hf_pn_io_data_description = -1;
-static int hf_pn_io_submodule_data_length = -1;
-static int hf_pn_io_length_iocs = -1;
-static int hf_pn_io_length_iops = -1;
-
-static int hf_pn_io_iocs = -1;
-static int hf_pn_io_iops = -1;
-static int hf_pn_io_ioxs_extension = -1;
-static int hf_pn_io_ioxs_res14 = -1;
-static int hf_pn_io_ioxs_instance = -1;
-static int hf_pn_io_ioxs_datastate = -1;
-
-static int hf_pn_io_address_resolution_properties = -1;
-static int hf_pn_io_mci_timeout_factor = -1;
-static int hf_pn_io_provider_station_name = -1;
-
-static int hf_pn_io_user_structure_identifier = -1;
-static int hf_pn_io_user_structure_identifier_manf = -1;
-
-static int hf_pn_io_channel_number = -1;
-static int hf_pn_io_channel_properties = -1;
-static int hf_pn_io_channel_properties_type = -1;
-static int hf_pn_io_channel_properties_accumulative = -1;
-static int hf_pn_io_channel_properties_maintenance = -1;
-
-
-static int hf_pn_io_NumberOfSubframeBlocks = -1;
-static int hf_pn_io_channel_properties_specifier = -1;
-static int hf_pn_io_channel_properties_direction = -1;
-
-static int hf_pn_io_channel_error_type = -1;
-static int hf_pn_io_ext_channel_error_type0 = -1;
-static int hf_pn_io_ext_channel_error_type0x8000 = -1;
-static int hf_pn_io_ext_channel_error_type0x8001 = -1;
-static int hf_pn_io_ext_channel_error_type0x8002 = -1;
-static int hf_pn_io_ext_channel_error_type0x8003 = -1;
-static int hf_pn_io_ext_channel_error_type0x8004 = -1;
-static int hf_pn_io_ext_channel_error_type0x8005 = -1;
-static int hf_pn_io_ext_channel_error_type0x8007 = -1;
-static int hf_pn_io_ext_channel_error_type0x8008 = -1;
-static int hf_pn_io_ext_channel_error_type0x800A = -1;
-static int hf_pn_io_ext_channel_error_type0x800B = -1;
-static int hf_pn_io_ext_channel_error_type0x800C = -1;
-static int hf_pn_io_ext_channel_error_type0x8010 = -1;
-
-static int hf_pn_io_ext_channel_error_type = -1;
-
-static int hf_pn_io_ext_channel_add_value = -1;
-static int hf_pn_io_qualified_channel_qualifier = -1;
-
-static int hf_pn_io_ptcp_subdomain_id = -1;
-static int hf_pn_io_ir_data_id = -1;
-static int hf_pn_io_max_bridge_delay = -1;
-static int hf_pn_io_number_of_ports = -1;
-static int hf_pn_io_max_port_tx_delay = -1;
-static int hf_pn_io_max_port_rx_delay = -1;
-
-static int hf_pn_io_max_line_rx_delay = -1;
-static int hf_pn_io_yellowtime = -1;
-static int hf_pn_io_reserved_interval_begin = -1;
-static int hf_pn_io_reserved_interval_end = -1;
-static int hf_pn_io_pllwindow = -1;
-static int hf_pn_io_sync_send_factor = -1;
-static int hf_pn_io_sync_properties = -1;
-static int hf_pn_io_sync_frame_address = -1;
-static int hf_pn_io_ptcp_timeout_factor = -1;
-static int hf_pn_io_ptcp_takeover_timeout_factor = -1;
-static int hf_pn_io_ptcp_master_startup_time = -1;
-static int hf_pn_io_ptcp_master_priority_1 = -1;
-static int hf_pn_io_ptcp_master_priority_2 = -1;
-static int hf_pn_io_ptcp_length_subdomain_name = -1;
-static int hf_pn_io_ptcp_subdomain_name = -1;
-
-static int hf_pn_io_MultipleInterfaceMode_NameOfDevice = -1;
-static int hf_pn_io_MultipleInterfaceMode_reserved_1 = -1;
-static int hf_pn_io_MultipleInterfaceMode_reserved_2 = -1;
+static int hf_pn_io_io_cs;
+
+static int hf_pn_io_substitutionmode;
+
+static int hf_pn_io_api;
+static int hf_pn_io_slot_nr;
+static int hf_pn_io_subslot_nr;
+static int hf_pn_io_index;
+static int hf_pn_io_seq_number;
+static int hf_pn_io_record_data_length;
+static int hf_pn_io_add_val1;
+static int hf_pn_io_add_val2;
+
+static int hf_pn_io_block;
+static int hf_pn_io_block_header;
+static int hf_pn_io_block_type;
+static int hf_pn_io_block_length;
+static int hf_pn_io_block_version_high;
+static int hf_pn_io_block_version_low;
+
+static int hf_pn_io_sessionkey;
+static int hf_pn_io_control_alarm_sequence_number;
+static int hf_pn_io_control_command;
+static int hf_pn_io_control_command_prmend;
+static int hf_pn_io_control_command_applready;
+static int hf_pn_io_control_command_release;
+static int hf_pn_io_control_command_done;
+static int hf_pn_io_control_command_ready_for_companion;
+static int hf_pn_io_control_command_ready_for_rt_class3;
+static int hf_pn_io_control_command_prmbegin;
+static int hf_pn_io_control_command_reserved_7_15;
+static int hf_pn_io_control_block_properties;
+static int hf_pn_io_control_block_properties_applready;
+static int hf_pn_io_control_block_properties_applready_bit0;
+static int hf_pn_io_control_block_properties_applready_bit1;
+static int hf_pn_io_control_block_properties_applready_otherbits;
+
+/* static int hf_pn_io_AlarmSequenceNumber; */
+static int hf_pn_io_control_command_reserved;
+static int hf_pn_io_SubmoduleListEntries;
+
+static int hf_pn_io_alarm_type;
+static int hf_pn_io_alarm_specifier;
+static int hf_pn_io_alarm_specifier_sequence;
+static int hf_pn_io_alarm_specifier_channel;
+static int hf_pn_io_alarm_specifier_manufacturer;
+static int hf_pn_io_alarm_specifier_submodule;
+static int hf_pn_io_alarm_specifier_ardiagnosis;
+
+static int hf_pn_io_alarm_dst_endpoint;
+static int hf_pn_io_alarm_src_endpoint;
+static int hf_pn_io_pdu_type;
+static int hf_pn_io_pdu_type_type;
+static int hf_pn_io_pdu_type_version;
+static int hf_pn_io_add_flags;
+static int hf_pn_io_window_size;
+static int hf_pn_io_tack;
+static int hf_pn_io_send_seq_num;
+static int hf_pn_io_ack_seq_num;
+static int hf_pn_io_var_part_len;
+
+static int hf_pn_io_number_of_modules;
+static int hf_pn_io_module_ident_number;
+static int hf_pn_io_module_properties;
+static int hf_pn_io_module_state;
+static int hf_pn_io_number_of_submodules;
+static int hf_pn_io_submodule_ident_number;
+static int hf_pn_io_submodule_properties;
+static int hf_pn_io_submodule_properties_type;
+static int hf_pn_io_submodule_properties_shared_input;
+static int hf_pn_io_submodule_properties_reduce_input_submodule_data_length;
+static int hf_pn_io_submodule_properties_reduce_output_submodule_data_length;
+static int hf_pn_io_submodule_properties_discard_ioxs;
+static int hf_pn_io_submodule_properties_reserved;
+
+static int hf_pn_io_submodule_state;
+static int hf_pn_io_submodule_state_format_indicator;
+static int hf_pn_io_submodule_state_add_info;
+static int hf_pn_io_submodule_state_advice;
+static int hf_pn_io_submodule_state_maintenance_required;
+static int hf_pn_io_submodule_state_maintenance_demanded;
+static int hf_pn_io_submodule_state_fault;
+static int hf_pn_io_submodule_state_ar_info;
+static int hf_pn_io_submodule_state_ident_info;
+static int hf_pn_io_submodule_state_detail;
+
+static int hf_pn_io_data_description_tree;
+static int hf_pn_io_data_description;
+static int hf_pn_io_submodule_data_length;
+static int hf_pn_io_length_iocs;
+static int hf_pn_io_length_iops;
+
+static int hf_pn_io_iocs;
+static int hf_pn_io_iops;
+static int hf_pn_io_ioxs_extension;
+static int hf_pn_io_ioxs_res14;
+static int hf_pn_io_ioxs_instance;
+static int hf_pn_io_ioxs_datastate;
+
+static int hf_pn_io_address_resolution_properties;
+static int hf_pn_io_mci_timeout_factor;
+static int hf_pn_io_provider_station_name;
+
+static int hf_pn_io_user_structure_identifier;
+static int hf_pn_io_user_structure_identifier_manf;
+
+static int hf_pn_io_channel_number;
+static int hf_pn_io_channel_properties;
+static int hf_pn_io_channel_properties_type;
+static int hf_pn_io_channel_properties_accumulative;
+static int hf_pn_io_channel_properties_maintenance;
+
+
+static int hf_pn_io_NumberOfSubframeBlocks;
+static int hf_pn_io_channel_properties_specifier;
+static int hf_pn_io_channel_properties_direction;
+
+static int hf_pn_io_channel_error_type;
+static int hf_pn_io_ext_channel_error_type0;
+static int hf_pn_io_ext_channel_error_type0x8000;
+static int hf_pn_io_ext_channel_error_type0x8001;
+static int hf_pn_io_ext_channel_error_type0x8002;
+static int hf_pn_io_ext_channel_error_type0x8003;
+static int hf_pn_io_ext_channel_error_type0x8004;
+static int hf_pn_io_ext_channel_error_type0x8005;
+static int hf_pn_io_ext_channel_error_type0x8007;
+static int hf_pn_io_ext_channel_error_type0x8008;
+static int hf_pn_io_ext_channel_error_type0x800A;
+static int hf_pn_io_ext_channel_error_type0x800B;
+static int hf_pn_io_ext_channel_error_type0x800C;
+static int hf_pn_io_ext_channel_error_type0x8010;
+
+static int hf_pn_io_ext_channel_error_type;
+
+static int hf_pn_io_ext_channel_add_value;
+static int hf_pn_io_qualified_channel_qualifier;
+
+static int hf_pn_io_ptcp_subdomain_id;
+static int hf_pn_io_ir_data_id;
+static int hf_pn_io_max_bridge_delay;
+static int hf_pn_io_number_of_ports;
+static int hf_pn_io_max_port_tx_delay;
+static int hf_pn_io_max_port_rx_delay;
+
+static int hf_pn_io_max_line_rx_delay;
+static int hf_pn_io_yellowtime;
+static int hf_pn_io_reserved_interval_begin;
+static int hf_pn_io_reserved_interval_end;
+static int hf_pn_io_pllwindow;
+static int hf_pn_io_sync_send_factor;
+static int hf_pn_io_sync_properties;
+static int hf_pn_io_sync_frame_address;
+static int hf_pn_io_ptcp_timeout_factor;
+static int hf_pn_io_ptcp_takeover_timeout_factor;
+static int hf_pn_io_ptcp_master_startup_time;
+static int hf_pn_io_ptcp_master_priority_1;
+static int hf_pn_io_ptcp_master_priority_2;
+static int hf_pn_io_ptcp_length_subdomain_name;
+static int hf_pn_io_ptcp_subdomain_name;
+
+static int hf_pn_io_MultipleInterfaceMode_NameOfDevice;
+static int hf_pn_io_MultipleInterfaceMode_reserved_1;
+static int hf_pn_io_MultipleInterfaceMode_reserved_2;
/* added Portstatistics */
-static int hf_pn_io_pdportstatistic_counter_status = -1;
-static int hf_pn_io_pdportstatistic_counter_status_ifInOctets = -1;
-static int hf_pn_io_pdportstatistic_counter_status_ifOutOctets = -1;
-static int hf_pn_io_pdportstatistic_counter_status_ifInDiscards = -1;
-static int hf_pn_io_pdportstatistic_counter_status_ifOutDiscards = -1;
-static int hf_pn_io_pdportstatistic_counter_status_ifInErrors = -1;
-static int hf_pn_io_pdportstatistic_counter_status_ifOutErrors = -1;
-static int hf_pn_io_pdportstatistic_counter_status_reserved = -1;
-static int hf_pn_io_pdportstatistic_ifInOctets = -1;
-static int hf_pn_io_pdportstatistic_ifOutOctets = -1;
-static int hf_pn_io_pdportstatistic_ifInDiscards = -1;
-static int hf_pn_io_pdportstatistic_ifOutDiscards = -1;
-static int hf_pn_io_pdportstatistic_ifInErrors = -1;
-static int hf_pn_io_pdportstatistic_ifOutErrors = -1;
+static int hf_pn_io_pdportstatistic_counter_status;
+static int hf_pn_io_pdportstatistic_counter_status_ifInOctets;
+static int hf_pn_io_pdportstatistic_counter_status_ifOutOctets;
+static int hf_pn_io_pdportstatistic_counter_status_ifInDiscards;
+static int hf_pn_io_pdportstatistic_counter_status_ifOutDiscards;
+static int hf_pn_io_pdportstatistic_counter_status_ifInErrors;
+static int hf_pn_io_pdportstatistic_counter_status_ifOutErrors;
+static int hf_pn_io_pdportstatistic_counter_status_reserved;
+static int hf_pn_io_pdportstatistic_ifInOctets;
+static int hf_pn_io_pdportstatistic_ifOutOctets;
+static int hf_pn_io_pdportstatistic_ifInDiscards;
+static int hf_pn_io_pdportstatistic_ifOutDiscards;
+static int hf_pn_io_pdportstatistic_ifInErrors;
+static int hf_pn_io_pdportstatistic_ifOutErrors;
/* end of port statistics */
-static int hf_pn_io_domain_boundary = -1;
-static int hf_pn_io_domain_boundary_ingress = -1;
-static int hf_pn_io_domain_boundary_egress = -1;
-static int hf_pn_io_multicast_boundary = -1;
-static int hf_pn_io_adjust_properties = -1;
-static int hf_pn_io_PreambleLength = -1;
-static int hf_pn_io_mau_type = -1;
-static int hf_pn_io_mau_type_mode = -1;
-static int hf_pn_io_port_state = -1;
-static int hf_pn_io_link_state_port = -1;
-static int hf_pn_io_link_state_link = -1;
-static int hf_pn_io_line_delay = -1;
-static int hf_pn_io_line_delay_value = -1;
-static int hf_pn_io_cable_delay_value = -1;
-static int hf_pn_io_line_delay_format_indicator = -1;
-static int hf_pn_io_number_of_peers = -1;
-static int hf_pn_io_length_peer_port_id = -1;
-static int hf_pn_io_peer_port_id = -1;
-static int hf_pn_io_length_peer_chassis_id = -1;
-static int hf_pn_io_peer_chassis_id = -1;
-static int hf_pn_io_neighbor = -1;
-static int hf_pn_io_length_peer_port_name = -1;
-static int hf_pn_io_peer_port_name = -1;
-static int hf_pn_io_length_peer_station_name = -1;
-static int hf_pn_io_peer_station_name = -1;
-static int hf_pn_io_length_own_port_id = -1;
-static int hf_pn_io_own_port_id = -1;
-static int hf_pn_io_peer_macadd = -1;
-static int hf_pn_io_media_type = -1;
-static int hf_pn_io_macadd = -1;
-static int hf_pn_io_length_own_chassis_id = -1;
-static int hf_pn_io_own_chassis_id = -1;
-static int hf_pn_io_rtclass3_port_status = -1;
-
-static int hf_pn_io_ethertype = -1;
-static int hf_pn_io_rx_port = -1;
-static int hf_pn_io_frame_details = -1;
-static int hf_pn_io_frame_details_sync_frame = -1;
-static int hf_pn_io_frame_details_meaning_frame_send_offset = -1;
-static int hf_pn_io_frame_details_reserved = -1;
-static int hf_pn_io_nr_of_tx_port_groups = -1;
-static int hf_pn_io_TxPortGroupProperties = -1;
-static int hf_pn_io_TxPortGroupProperties_bit0 = -1;
-static int hf_pn_io_TxPortGroupProperties_bit1 = -1;
-static int hf_pn_io_TxPortGroupProperties_bit2 = -1;
-static int hf_pn_io_TxPortGroupProperties_bit3 = -1;
-static int hf_pn_io_TxPortGroupProperties_bit4 = -1;
-static int hf_pn_io_TxPortGroupProperties_bit5 = -1;
-static int hf_pn_io_TxPortGroupProperties_bit6 = -1;
-static int hf_pn_io_TxPortGroupProperties_bit7 = -1;
-
-static int hf_pn_io_start_of_red_frame_id = -1;
-static int hf_pn_io_end_of_red_frame_id = -1;
-static int hf_pn_io_ir_begin_end_port = -1;
-static int hf_pn_io_number_of_assignments = -1;
-static int hf_pn_io_number_of_phases = -1;
-static int hf_pn_io_red_orange_period_begin_tx = -1;
-static int hf_pn_io_orange_period_begin_tx = -1;
-static int hf_pn_io_green_period_begin_tx = -1;
-static int hf_pn_io_red_orange_period_begin_rx = -1;
-static int hf_pn_io_orange_period_begin_rx = -1;
-static int hf_pn_io_green_period_begin_rx = -1;
-/* static int hf_pn_io_tx_phase_assignment = -1; */
-static int hf_pn_ir_tx_phase_assignment = -1;
-static int hf_pn_ir_rx_phase_assignment = -1;
-static int hf_pn_io_tx_phase_assignment_begin_value = -1;
-static int hf_pn_io_tx_phase_assignment_orange_begin = -1;
-static int hf_pn_io_tx_phase_assignment_end_reserved = -1;
-static int hf_pn_io_tx_phase_assignment_reserved = -1;
-/* static int hf_pn_io_rx_phase_assignment = -1; */
-
-static int hf_pn_io_slot = -1;
-static int hf_pn_io_subslot = -1;
-static int hf_pn_io_number_of_slots = -1;
-static int hf_pn_io_number_of_subslots = -1;
-
-/* static int hf_pn_io_maintenance_required_drop_budget = -1; */
-/* static int hf_pn_io_maintenance_demanded_drop_budget = -1; */
-/* static int hf_pn_io_error_drop_budget = -1; */
-
-static int hf_pn_io_tsn_number_of_queues = -1;
-static int hf_pn_io_tsn_max_supported_record_size = -1;
-static int hf_pn_io_tsn_transfer_time_tx = -1;
-static int hf_pn_io_tsn_transfer_time_rx = -1;
-static int hf_pn_io_tsn_port_capabilities_time_aware = -1;
-static int hf_pn_io_tsn_port_capabilities_preemption = -1;
-static int hf_pn_io_tsn_port_capabilities_queue_masking = -1;
-static int hf_pn_io_tsn_port_capabilities_reserved = -1;
-static int hf_pn_io_tsn_forwarding_group = -1;
-static int hf_pn_io_tsn_forwarding_group_ingress = -1;
-static int hf_pn_io_tsn_forwarding_group_egress = -1;
-static int hf_pn_io_tsn_stream_class = -1;
-static int hf_pn_io_tsn_dependent_forwarding_delay = -1;
-static int hf_pn_io_tsn_independent_forwarding_delay = -1;
-static int hf_pn_io_tsn_forwarding_delay_block_number_of_entries = -1;
-static int hf_pn_io_tsn_expected_neighbor_block_number_of_entries = -1;
-static int hf_pn_io_tsn_port_id_block_number_of_entries = -1;
-
-static int hf_pn_io_tsn_nme_parameter_uuid = -1;
-static int hf_pn_io_tsn_domain_vid_config = -1;
-static int hf_pn_io_tsn_domain_vid_config_stream_high_vid = -1;
-static int hf_pn_io_tsn_domain_vid_config_stream_high_red_vid = -1;
-static int hf_pn_io_tsn_domain_vid_config_stream_low_vid = -1;
-static int hf_pn_io_tsn_domain_vid_config_stream_low_red_vid = -1;
-static int hf_pn_io_tsn_domain_vid_config_non_stream_vid = -1;
-static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_B = -1;
-static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_C = -1;
-static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_D = -1;
-static int hf_pn_io_tsn_domain_vid_config_reserved = -1;
-static int hf_pn_io_number_of_tsn_time_data_block_entries = -1;
-static int hf_pn_io_number_of_tsn_domain_queue_rate_limiter_entries = -1;
-static int hf_pn_io_number_of_tsn_domain_port_ingress_rate_limiter_entries = -1;
-static int hf_pn_io_number_of_tsn_domain_port_config_entries = -1;
-
-static int hf_pn_io_tsn_domain_port_config = -1;
-static int hf_pn_io_tsn_domain_port_config_preemption_enabled = -1;
-static int hf_pn_io_tsn_domain_port_config_boundary_port_config = -1;
-static int hf_pn_io_tsn_domain_port_config_reserved = -1;
-
-static int hf_pn_io_tsn_domain_port_ingress_rate_limiter = -1;
-static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_cir = -1;
-static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_cbs = -1;
-static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_envelope = -1;
-static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_rank = -1;
-
-static int hf_pn_io_tsn_domain_queue_rate_limiter = -1;
-static int hf_pn_io_tsn_domain_queue_rate_limiter_cir = -1;
-static int hf_pn_io_tsn_domain_queue_rate_limiter_cbs = -1;
-static int hf_pn_io_tsn_domain_queue_rate_limiter_envelope = -1;
-static int hf_pn_io_tsn_domain_queue_rate_limiter_rank = -1;
-static int hf_pn_io_tsn_domain_queue_rate_limiter_queue_id = -1;
-static int hf_pn_io_tsn_domain_queue_rate_limiter_reserved = -1;
-
-static int hf_pn_io_number_of_tsn_domain_queue_config_entries = -1;
-static int hf_pn_io_tsn_domain_queue_config = -1;
-static int hf_pn_io_tsn_domain_queue_config_queue_id = -1;
-static int hf_pn_io_tsn_domain_queue_config_tci_pcp = -1;
-static int hf_pn_io_tsn_domain_queue_config_shaper = -1;
-static int hf_pn_io_tsn_domain_queue_config_preemption_mode = -1;
-static int hf_pn_io_tsn_domain_queue_config_unmask_time_offset = -1;
-static int hf_pn_io_tsn_domain_queue_config_mask_time_offset = -1;
-
-static int hf_pn_io_network_deadline = -1;
-static int hf_pn_io_time_domain_number = -1;
-static int hf_pn_io_time_pll_window = -1;
-static int hf_pn_io_message_interval_factor = -1;
-static int hf_pn_io_message_timeout_factor = -1;
-static int hf_pn_io_time_sync_properties = -1;
-static int hf_pn_io_time_sync_properties_role = -1;
-static int hf_pn_io_time_sync_properties_reserved = -1;
-static int hf_pn_io_time_domain_uuid = -1;
-static int hf_pn_io_time_domain_name_length = -1;
-static int hf_pn_io_time_domain_name = -1;
-static int hf_pn_io_tsn_nme_name_uuid = -1;
-static int hf_pn_io_tsn_nme_name_length = -1;
-static int hf_pn_io_tsn_nme_name = -1;
-static int hf_pn_io_tsn_domain_uuid = -1;
-static int hf_pn_io_tsn_domain_name_length = -1;
-static int hf_pn_io_tsn_domain_name = -1;
-
-static int hf_pn_io_tsn_fdb_command = -1;
-static int hf_pn_io_tsn_dst_add = -1;
-
-static int hf_pn_io_number_of_tsn_domain_sync_tree_entries = -1;
-static int hf_pn_io_tsn_domain_sync_port_role = -1;
-static int hf_pn_io_tsn_domain_port_id = -1;
-
-static int hf_pn_io_maintenance_required_power_budget = -1;
-static int hf_pn_io_maintenance_demanded_power_budget = -1;
-static int hf_pn_io_error_power_budget = -1;
-
-static int hf_pn_io_fiber_optic_type = -1;
-static int hf_pn_io_fiber_optic_cable_type = -1;
-
-static int hf_pn_io_controller_appl_cycle_factor = -1;
-static int hf_pn_io_time_data_cycle = -1;
-static int hf_pn_io_time_io_input = -1;
-static int hf_pn_io_time_io_output = -1;
-static int hf_pn_io_time_io_input_valid = -1;
-static int hf_pn_io_time_io_output_valid = -1;
-
-static int hf_pn_io_maintenance_status = -1;
-static int hf_pn_io_maintenance_status_required = -1;
-static int hf_pn_io_maintenance_status_demanded = -1;
-
-static int hf_pn_io_vendor_id_high = -1;
-static int hf_pn_io_vendor_id_low = -1;
-static int hf_pn_io_vendor_block_type = -1;
-static int hf_pn_io_order_id = -1;
-static int hf_pn_io_im_serial_number = -1;
-static int hf_pn_io_im_hardware_revision = -1;
-static int hf_pn_io_im_revision_prefix = -1;
-static int hf_pn_io_im_sw_revision_functional_enhancement = -1;
-static int hf_pn_io_im_revision_bugfix = -1;
-static int hf_pn_io_im_sw_revision_internal_change = -1;
-static int hf_pn_io_im_revision_counter = -1;
-static int hf_pn_io_im_profile_id = -1;
-static int hf_pn_io_im_profile_specific_type = -1;
-static int hf_pn_io_im_version_major = -1;
-static int hf_pn_io_im_version_minor = -1;
-static int hf_pn_io_im_supported = -1;
-static int hf_pn_io_im_numberofentries = -1;
-static int hf_pn_io_im_annotation = -1;
-static int hf_pn_io_im_order_id = -1;
-
-static int hf_pn_io_number_of_ars = -1;
-
-static int hf_pn_io_cycle_counter = -1;
-static int hf_pn_io_data_status = -1;
-static int hf_pn_io_data_status_res67 = -1;
-static int hf_pn_io_data_status_ok = -1;
-static int hf_pn_io_data_status_operate = -1;
-static int hf_pn_io_data_status_res3 = -1;
-static int hf_pn_io_data_status_valid = -1;
-static int hf_pn_io_data_status_res1 = -1;
-static int hf_pn_io_data_status_primary = -1;
-static int hf_pn_io_transfer_status = -1;
-
-static int hf_pn_io_actual_local_time_stamp = -1;
-static int hf_pn_io_number_of_log_entries = -1;
-static int hf_pn_io_local_time_stamp = -1;
-static int hf_pn_io_entry_detail = -1;
-
-static int hf_pn_io_ip_address = -1;
-static int hf_pn_io_subnetmask = -1;
-static int hf_pn_io_standard_gateway = -1;
-
-static int hf_pn_io_mrp_domain_uuid = -1;
-static int hf_pn_io_mrp_role = -1;
-static int hf_pn_io_mrp_length_domain_name = -1;
-static int hf_pn_io_mrp_domain_name = -1;
-static int hf_pn_io_mrp_instances = -1;
-static int hf_pn_io_mrp_instance = -1;
-
-static int hf_pn_io_mrp_prio = -1;
-static int hf_pn_io_mrp_topchgt = -1;
-static int hf_pn_io_mrp_topnrmax = -1;
-static int hf_pn_io_mrp_tstshortt = -1;
-static int hf_pn_io_mrp_tstdefaultt = -1;
-static int hf_pn_io_mrp_tstnrmax = -1;
-static int hf_pn_io_mrp_check = -1;
-static int hf_pn_io_mrp_check_mrm = -1;
-static int hf_pn_io_mrp_check_mrpdomain = -1;
-static int hf_pn_io_mrp_check_reserved_1 = -1;
-static int hf_pn_io_mrp_check_reserved_2 = -1;
-
-static int hf_pn_io_mrp_rtmode = -1;
-static int hf_pn_io_mrp_rtmode_rtclass12 = -1;
-static int hf_pn_io_mrp_rtmode_rtclass3 = -1;
-static int hf_pn_io_mrp_rtmode_reserved1 = -1;
-static int hf_pn_io_mrp_rtmode_reserved2 = -1;
-
-static int hf_pn_io_mrp_lnkdownt = -1;
-static int hf_pn_io_mrp_lnkupt = -1;
-static int hf_pn_io_mrp_lnknrmax = -1;
-static int hf_pn_io_mrp_version = -1;
-
-static int hf_pn_io_substitute_active_flag = -1;
-static int hf_pn_io_length_data = -1;
-
-static int hf_pn_io_mrp_ring_state = -1;
-static int hf_pn_io_mrp_rt_state = -1;
-
-static int hf_pn_io_im_tag_function = -1;
-static int hf_pn_io_im_tag_location = -1;
-static int hf_pn_io_im_date = -1;
-static int hf_pn_io_im_descriptor = -1;
-
-static int hf_pn_io_fs_hello_mode = -1;
-static int hf_pn_io_fs_hello_interval = -1;
-static int hf_pn_io_fs_hello_retry = -1;
-static int hf_pn_io_fs_hello_delay = -1;
-
-static int hf_pn_io_fs_parameter_mode = -1;
-static int hf_pn_io_fs_parameter_uuid = -1;
-
-
-static int hf_pn_io_check_sync_mode = -1;
-static int hf_pn_io_check_sync_mode_reserved = -1;
-static int hf_pn_io_check_sync_mode_sync_master = -1;
-static int hf_pn_io_check_sync_mode_cable_delay = -1;
+static int hf_pn_io_domain_boundary;
+static int hf_pn_io_domain_boundary_ingress;
+static int hf_pn_io_domain_boundary_egress;
+static int hf_pn_io_multicast_boundary;
+static int hf_pn_io_adjust_properties;
+static int hf_pn_io_PreambleLength;
+static int hf_pn_io_mau_type;
+static int hf_pn_io_mau_type_mode;
+static int hf_pn_io_port_state;
+static int hf_pn_io_link_state_port;
+static int hf_pn_io_link_state_link;
+static int hf_pn_io_line_delay;
+static int hf_pn_io_line_delay_value;
+static int hf_pn_io_cable_delay_value;
+static int hf_pn_io_line_delay_format_indicator;
+static int hf_pn_io_number_of_peers;
+static int hf_pn_io_length_peer_port_id;
+static int hf_pn_io_peer_port_id;
+static int hf_pn_io_length_peer_chassis_id;
+static int hf_pn_io_peer_chassis_id;
+static int hf_pn_io_neighbor;
+static int hf_pn_io_length_peer_port_name;
+static int hf_pn_io_peer_port_name;
+static int hf_pn_io_length_peer_station_name;
+static int hf_pn_io_peer_station_name;
+static int hf_pn_io_length_own_port_id;
+static int hf_pn_io_own_port_id;
+static int hf_pn_io_peer_macadd;
+static int hf_pn_io_media_type;
+static int hf_pn_io_macadd;
+static int hf_pn_io_length_own_chassis_id;
+static int hf_pn_io_own_chassis_id;
+static int hf_pn_io_rtclass3_port_status;
+
+static int hf_pn_io_ethertype;
+static int hf_pn_io_rx_port;
+static int hf_pn_io_frame_details;
+static int hf_pn_io_frame_details_sync_frame;
+static int hf_pn_io_frame_details_meaning_frame_send_offset;
+static int hf_pn_io_frame_details_reserved;
+static int hf_pn_io_nr_of_tx_port_groups;
+static int hf_pn_io_TxPortGroupProperties;
+static int hf_pn_io_TxPortGroupProperties_bit0;
+static int hf_pn_io_TxPortGroupProperties_bit1;
+static int hf_pn_io_TxPortGroupProperties_bit2;
+static int hf_pn_io_TxPortGroupProperties_bit3;
+static int hf_pn_io_TxPortGroupProperties_bit4;
+static int hf_pn_io_TxPortGroupProperties_bit5;
+static int hf_pn_io_TxPortGroupProperties_bit6;
+static int hf_pn_io_TxPortGroupProperties_bit7;
+
+static int hf_pn_io_start_of_red_frame_id;
+static int hf_pn_io_end_of_red_frame_id;
+static int hf_pn_io_ir_begin_end_port;
+static int hf_pn_io_number_of_assignments;
+static int hf_pn_io_number_of_phases;
+static int hf_pn_io_red_orange_period_begin_tx;
+static int hf_pn_io_orange_period_begin_tx;
+static int hf_pn_io_green_period_begin_tx;
+static int hf_pn_io_red_orange_period_begin_rx;
+static int hf_pn_io_orange_period_begin_rx;
+static int hf_pn_io_green_period_begin_rx;
+/* static int hf_pn_io_tx_phase_assignment; */
+static int hf_pn_ir_tx_phase_assignment;
+static int hf_pn_ir_rx_phase_assignment;
+static int hf_pn_io_tx_phase_assignment_begin_value;
+static int hf_pn_io_tx_phase_assignment_orange_begin;
+static int hf_pn_io_tx_phase_assignment_end_reserved;
+static int hf_pn_io_tx_phase_assignment_reserved;
+/* static int hf_pn_io_rx_phase_assignment; */
+
+static int hf_pn_io_slot;
+static int hf_pn_io_subslot;
+static int hf_pn_io_number_of_slots;
+static int hf_pn_io_number_of_subslots;
+
+/* static int hf_pn_io_maintenance_required_drop_budget; */
+/* static int hf_pn_io_maintenance_demanded_drop_budget; */
+/* static int hf_pn_io_error_drop_budget; */
+
+static int hf_pn_io_tsn_number_of_queues;
+static int hf_pn_io_tsn_max_supported_record_size;
+static int hf_pn_io_tsn_transfer_time_tx;
+static int hf_pn_io_tsn_transfer_time_rx;
+static int hf_pn_io_tsn_port_capabilities_time_aware;
+static int hf_pn_io_tsn_port_capabilities_preemption;
+static int hf_pn_io_tsn_port_capabilities_queue_masking;
+static int hf_pn_io_tsn_port_capabilities_reserved;
+static int hf_pn_io_tsn_forwarding_group;
+static int hf_pn_io_tsn_forwarding_group_ingress;
+static int hf_pn_io_tsn_forwarding_group_egress;
+static int hf_pn_io_tsn_stream_class;
+static int hf_pn_io_tsn_dependent_forwarding_delay;
+static int hf_pn_io_tsn_independent_forwarding_delay;
+static int hf_pn_io_tsn_forwarding_delay_block_number_of_entries;
+static int hf_pn_io_tsn_expected_neighbor_block_number_of_entries;
+static int hf_pn_io_tsn_port_id_block_number_of_entries;
+
+static int hf_pn_io_tsn_nme_parameter_uuid;
+static int hf_pn_io_tsn_domain_vid_config;
+static int hf_pn_io_tsn_domain_vid_config_stream_high_vid;
+static int hf_pn_io_tsn_domain_vid_config_stream_high_red_vid;
+static int hf_pn_io_tsn_domain_vid_config_stream_low_vid;
+static int hf_pn_io_tsn_domain_vid_config_stream_low_red_vid;
+static int hf_pn_io_tsn_domain_vid_config_non_stream_vid;
+static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_B;
+static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_C;
+static int hf_pn_io_tsn_domain_vid_config_non_stream_vid_D;
+static int hf_pn_io_tsn_domain_vid_config_reserved;
+static int hf_pn_io_number_of_tsn_time_data_block_entries;
+static int hf_pn_io_number_of_tsn_domain_queue_rate_limiter_entries;
+static int hf_pn_io_number_of_tsn_domain_port_ingress_rate_limiter_entries;
+static int hf_pn_io_number_of_tsn_domain_port_config_entries;
+
+static int hf_pn_io_tsn_domain_port_config;
+static int hf_pn_io_tsn_domain_port_config_preemption_enabled;
+static int hf_pn_io_tsn_domain_port_config_boundary_port_config;
+static int hf_pn_io_tsn_domain_port_config_reserved;
+
+static int hf_pn_io_tsn_domain_port_ingress_rate_limiter;
+static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_cir;
+static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_cbs;
+static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_envelope;
+static int hf_pn_io_tsn_domain_port_ingress_rate_limiter_rank;
+
+static int hf_pn_io_tsn_domain_queue_rate_limiter;
+static int hf_pn_io_tsn_domain_queue_rate_limiter_cir;
+static int hf_pn_io_tsn_domain_queue_rate_limiter_cbs;
+static int hf_pn_io_tsn_domain_queue_rate_limiter_envelope;
+static int hf_pn_io_tsn_domain_queue_rate_limiter_rank;
+static int hf_pn_io_tsn_domain_queue_rate_limiter_queue_id;
+static int hf_pn_io_tsn_domain_queue_rate_limiter_reserved;
+
+static int hf_pn_io_number_of_tsn_domain_queue_config_entries;
+static int hf_pn_io_tsn_domain_queue_config;
+static int hf_pn_io_tsn_domain_queue_config_queue_id;
+static int hf_pn_io_tsn_domain_queue_config_tci_pcp;
+static int hf_pn_io_tsn_domain_queue_config_shaper;
+static int hf_pn_io_tsn_domain_queue_config_preemption_mode;
+static int hf_pn_io_tsn_domain_queue_config_unmask_time_offset;
+static int hf_pn_io_tsn_domain_queue_config_mask_time_offset;
+
+static int hf_pn_io_network_deadline;
+static int hf_pn_io_time_domain_number;
+static int hf_pn_io_time_pll_window;
+static int hf_pn_io_message_interval_factor;
+static int hf_pn_io_message_timeout_factor;
+static int hf_pn_io_time_sync_properties;
+static int hf_pn_io_time_sync_properties_role;
+static int hf_pn_io_time_sync_properties_reserved;
+static int hf_pn_io_time_domain_uuid;
+static int hf_pn_io_time_domain_name_length;
+static int hf_pn_io_time_domain_name;
+static int hf_pn_io_tsn_nme_name_uuid;
+static int hf_pn_io_tsn_nme_name_length;
+static int hf_pn_io_tsn_nme_name;
+static int hf_pn_io_tsn_domain_uuid;
+static int hf_pn_io_tsn_domain_name_length;
+static int hf_pn_io_tsn_domain_name;
+
+static int hf_pn_io_tsn_fdb_command;
+static int hf_pn_io_tsn_dst_add;
+
+static int hf_pn_io_number_of_tsn_domain_sync_tree_entries;
+static int hf_pn_io_tsn_domain_sync_port_role;
+static int hf_pn_io_tsn_domain_port_id;
+
+static int hf_pn_io_maintenance_required_power_budget;
+static int hf_pn_io_maintenance_demanded_power_budget;
+static int hf_pn_io_error_power_budget;
+
+static int hf_pn_io_fiber_optic_type;
+static int hf_pn_io_fiber_optic_cable_type;
+
+static int hf_pn_io_controller_appl_cycle_factor;
+static int hf_pn_io_time_data_cycle;
+static int hf_pn_io_time_io_input;
+static int hf_pn_io_time_io_output;
+static int hf_pn_io_time_io_input_valid;
+static int hf_pn_io_time_io_output_valid;
+
+static int hf_pn_io_maintenance_status;
+static int hf_pn_io_maintenance_status_required;
+static int hf_pn_io_maintenance_status_demanded;
+
+static int hf_pn_io_vendor_id_high;
+static int hf_pn_io_vendor_id_low;
+static int hf_pn_io_vendor_block_type;
+static int hf_pn_io_order_id;
+static int hf_pn_io_im_serial_number;
+static int hf_pn_io_im_hardware_revision;
+static int hf_pn_io_im_revision_prefix;
+static int hf_pn_io_im_sw_revision_functional_enhancement;
+static int hf_pn_io_im_revision_bugfix;
+static int hf_pn_io_im_sw_revision_internal_change;
+static int hf_pn_io_im_revision_counter;
+static int hf_pn_io_im_profile_id;
+static int hf_pn_io_im_profile_specific_type;
+static int hf_pn_io_im_version_major;
+static int hf_pn_io_im_version_minor;
+static int hf_pn_io_im_supported;
+static int hf_pn_io_im_numberofentries;
+static int hf_pn_io_im_annotation;
+static int hf_pn_io_im_order_id;
+
+static int hf_pn_io_number_of_ars;
+
+static int hf_pn_io_cycle_counter;
+static int hf_pn_io_data_status;
+static int hf_pn_io_data_status_res67;
+static int hf_pn_io_data_status_ok;
+static int hf_pn_io_data_status_operate;
+static int hf_pn_io_data_status_res3;
+static int hf_pn_io_data_status_valid;
+static int hf_pn_io_data_status_res1;
+static int hf_pn_io_data_status_primary;
+static int hf_pn_io_transfer_status;
+
+static int hf_pn_io_actual_local_time_stamp;
+static int hf_pn_io_number_of_log_entries;
+static int hf_pn_io_local_time_stamp;
+static int hf_pn_io_entry_detail;
+
+static int hf_pn_io_ip_address;
+static int hf_pn_io_subnetmask;
+static int hf_pn_io_standard_gateway;
+
+static int hf_pn_io_mrp_domain_uuid;
+static int hf_pn_io_mrp_role;
+static int hf_pn_io_mrp_length_domain_name;
+static int hf_pn_io_mrp_domain_name;
+static int hf_pn_io_mrp_instances;
+static int hf_pn_io_mrp_instance;
+
+static int hf_pn_io_mrp_prio;
+static int hf_pn_io_mrp_topchgt;
+static int hf_pn_io_mrp_topnrmax;
+static int hf_pn_io_mrp_tstshortt;
+static int hf_pn_io_mrp_tstdefaultt;
+static int hf_pn_io_mrp_tstnrmax;
+static int hf_pn_io_mrp_check;
+static int hf_pn_io_mrp_check_mrm;
+static int hf_pn_io_mrp_check_mrpdomain;
+static int hf_pn_io_mrp_check_reserved_1;
+static int hf_pn_io_mrp_check_reserved_2;
+
+static int hf_pn_io_mrp_rtmode;
+static int hf_pn_io_mrp_rtmode_rtclass12;
+static int hf_pn_io_mrp_rtmode_rtclass3;
+static int hf_pn_io_mrp_rtmode_reserved1;
+static int hf_pn_io_mrp_rtmode_reserved2;
+
+static int hf_pn_io_mrp_lnkdownt;
+static int hf_pn_io_mrp_lnkupt;
+static int hf_pn_io_mrp_lnknrmax;
+static int hf_pn_io_mrp_version;
+
+static int hf_pn_io_substitute_active_flag;
+static int hf_pn_io_length_data;
+
+static int hf_pn_io_mrp_ring_state;
+static int hf_pn_io_mrp_rt_state;
+
+static int hf_pn_io_im_tag_function;
+static int hf_pn_io_im_tag_location;
+static int hf_pn_io_im_date;
+static int hf_pn_io_im_descriptor;
+
+static int hf_pn_io_fs_hello_mode;
+static int hf_pn_io_fs_hello_interval;
+static int hf_pn_io_fs_hello_retry;
+static int hf_pn_io_fs_hello_delay;
+
+static int hf_pn_io_fs_parameter_mode;
+static int hf_pn_io_fs_parameter_uuid;
+
+
+static int hf_pn_io_check_sync_mode;
+static int hf_pn_io_check_sync_mode_reserved;
+static int hf_pn_io_check_sync_mode_sync_master;
+static int hf_pn_io_check_sync_mode_cable_delay;
/* PROFIsafe fParameters */
-static int hf_pn_io_ps_f_prm_flag1 = -1;
-static int hf_pn_io_ps_f_prm_flag1_chck_seq = -1;
-static int hf_pn_io_ps_f_prm_flag1_chck_ipar = -1;
-static int hf_pn_io_ps_f_prm_flag1_sil = -1;
-static int hf_pn_io_ps_f_prm_flag1_crc_len = -1;
-static int hf_pn_io_ps_f_prm_flag1_crc_seed = -1;
-static int hf_pn_io_ps_f_prm_flag1_reserved = -1;
-static int hf_pn_io_ps_f_prm_flag2 = -1;
-static int hf_pn_io_ps_f_wd_time = -1;
-static int hf_pn_io_ps_f_ipar_crc = -1;
-static int hf_pn_io_ps_f_par_crc = -1;
-static int hf_pn_io_ps_f_src_adr = -1;
-static int hf_pn_io_ps_f_dest_adr = -1;
-static int hf_pn_io_ps_f_prm_flag2_reserved = -1;
-static int hf_pn_io_ps_f_prm_flag2_f_block_id = -1;
-static int hf_pn_io_ps_f_prm_flag2_f_par_version = -1;
-
-static int hf_pn_io_profidrive_request_reference = -1;
-static int hf_pn_io_profidrive_request_id = -1;
-static int hf_pn_io_profidrive_do_id = -1;
-static int hf_pn_io_profidrive_no_of_parameters = -1;
-static int hf_pn_io_profidrive_response_id = -1;
-static int hf_pn_io_profidrive_param_attribute = -1;
-static int hf_pn_io_profidrive_param_no_of_elems = -1;
-static int hf_pn_io_profidrive_param_number = -1;
-static int hf_pn_io_profidrive_param_subindex = -1;
-static int hf_pn_io_profidrive_param_format = -1;
-static int hf_pn_io_profidrive_param_no_of_values = -1;
-static int hf_pn_io_profidrive_param_value_byte = -1;
-static int hf_pn_io_profidrive_param_value_word = -1;
-static int hf_pn_io_profidrive_param_value_dword = -1;
-static int hf_pn_io_profidrive_param_value_float = -1;
-static int hf_pn_io_profidrive_param_value_string = -1;
-static int hf_pn_io_profidrive_param_value_error = -1;
-static int hf_pn_io_profidrive_param_value_error_sub = -1;
+static int hf_pn_io_ps_f_prm_flag1;
+static int hf_pn_io_ps_f_prm_flag1_chck_seq;
+static int hf_pn_io_ps_f_prm_flag1_chck_ipar;
+static int hf_pn_io_ps_f_prm_flag1_sil;
+static int hf_pn_io_ps_f_prm_flag1_crc_len;
+static int hf_pn_io_ps_f_prm_flag1_crc_seed;
+static int hf_pn_io_ps_f_prm_flag1_reserved;
+static int hf_pn_io_ps_f_prm_flag2;
+static int hf_pn_io_ps_f_wd_time;
+static int hf_pn_io_ps_f_ipar_crc;
+static int hf_pn_io_ps_f_par_crc;
+static int hf_pn_io_ps_f_src_adr;
+static int hf_pn_io_ps_f_dest_adr;
+static int hf_pn_io_ps_f_prm_flag2_reserved;
+static int hf_pn_io_ps_f_prm_flag2_f_block_id;
+static int hf_pn_io_ps_f_prm_flag2_f_par_version;
+
+static int hf_pn_io_profidrive_request_reference;
+static int hf_pn_io_profidrive_request_id;
+static int hf_pn_io_profidrive_do_id;
+static int hf_pn_io_profidrive_no_of_parameters;
+static int hf_pn_io_profidrive_response_id;
+static int hf_pn_io_profidrive_param_attribute;
+static int hf_pn_io_profidrive_param_no_of_elems;
+static int hf_pn_io_profidrive_param_number;
+static int hf_pn_io_profidrive_param_subindex;
+static int hf_pn_io_profidrive_param_format;
+static int hf_pn_io_profidrive_param_no_of_values;
+static int hf_pn_io_profidrive_param_value_byte;
+static int hf_pn_io_profidrive_param_value_word;
+static int hf_pn_io_profidrive_param_value_dword;
+static int hf_pn_io_profidrive_param_value_float;
+static int hf_pn_io_profidrive_param_value_string;
+static int hf_pn_io_profidrive_param_value_error;
+static int hf_pn_io_profidrive_param_value_error_sub;
/* Sequence of Events - Reporting System Alarm/Event Information */
-static int hf_pn_io_rs_alarm_info_reserved_0_7 = -1;
-static int hf_pn_io_rs_alarm_info_reserved_8_15 = -1;
-static int hf_pn_io_rs_alarm_info = -1;
-static int hf_pn_io_rs_event_info = -1;
-static int hf_pn_io_rs_event_block = -1;
-static int hf_pn_io_rs_adjust_block = -1;
-static int hf_pn_io_rs_event_data_extension = -1;
-static int hf_pn_io_number_of_rs_event_info = -1;
-static int hf_pn_io_rs_block_type = -1;
-static int hf_pn_io_rs_block_length = -1;
-static int hf_pn_io_rs_specifier = -1;
-static int hf_pn_io_rs_specifier_sequence = -1;
-static int hf_pn_io_rs_specifier_reserved = -1;
-static int hf_pn_io_rs_specifier_specifier = -1;
-static int hf_pn_io_rs_time_stamp = -1;
-static int hf_pn_io_rs_time_stamp_status = -1;
-static int hf_pn_io_rs_time_stamp_value = -1;
-static int hf_pn_io_rs_minus_error = -1;
-static int hf_pn_io_rs_plus_error = -1;
-static int hf_pn_io_rs_extension_block_type = -1;
-static int hf_pn_io_rs_extension_block_length = -1;
-static int hf_pn_io_rs_reason_code = -1;
-static int hf_pn_io_rs_reason_code_reason = -1;
-static int hf_pn_io_rs_reason_code_detail = -1;
-static int hf_pn_io_rs_domain_identification = -1;
-static int hf_pn_io_rs_master_identification = -1;
-static int hf_pn_io_soe_digital_input_current_value = -1;
-static int hf_pn_io_soe_digital_input_current_value_value = -1;
-static int hf_pn_io_soe_digital_input_current_value_reserved = -1;
-static int hf_pn_io_am_device_identification = -1;
-static int hf_pn_io_am_device_identification_device_sub_id = -1;
-static int hf_pn_io_am_device_identification_device_id = -1;
-static int hf_pn_io_am_device_identification_vendor_id = -1;
-static int hf_pn_io_am_device_identification_organization = -1;
-static int hf_pn_io_rs_adjust_info = -1;
-static int hf_pn_io_soe_max_scan_delay = -1;
-static int hf_pn_io_soe_adjust_specifier = -1;
-static int hf_pn_io_soe_adjust_specifier_reserved = -1;
-static int hf_pn_io_soe_adjust_specifier_incident = -1;
-static int hf_pn_io_rs_properties = -1;
-static int hf_pn_io_rs_properties_alarm_transport = -1;
-static int hf_pn_io_rs_properties_reserved1 = -1;
-static int hf_pn_io_rs_properties_reserved2 = -1;
-
-static int hf_pn_io_asset_management_info = -1;
-static int hf_pn_io_number_of_asset_management_info = -1;
-static int hf_pn_io_im_uniqueidentifier = -1;
-static int hf_pn_io_am_location_structure = -1;
-static int hf_pn_io_am_location_level_0 = -1;
-static int hf_pn_io_am_location_level_1 = -1;
-static int hf_pn_io_am_location_level_2 = -1;
-static int hf_pn_io_am_location_level_3 = -1;
-static int hf_pn_io_am_location_level_4 = -1;
-static int hf_pn_io_am_location_level_5 = -1;
-static int hf_pn_io_am_location_level_6 = -1;
-static int hf_pn_io_am_location_level_7 = -1;
-static int hf_pn_io_am_location_level_8 = -1;
-static int hf_pn_io_am_location_level_9 = -1;
-static int hf_pn_io_am_location_level_10 = -1;
-static int hf_pn_io_am_location_level_11 = -1;
-static int hf_pn_io_am_location = -1;
-static int hf_pn_io_am_location_reserved1 = -1;
-static int hf_pn_io_am_location_reserved2 = -1;
-static int hf_pn_io_am_location_reserved3 = -1;
-static int hf_pn_io_am_location_reserved4 = -1;
-static int hf_pn_io_am_location_beginslotnum = -1;
-static int hf_pn_io_am_location_beginsubslotnum = -1;
-static int hf_pn_io_am_location_endslotnum = -1;
-static int hf_pn_io_am_location_endsubslotnum = -1;
-static int hf_pn_io_am_software_revision = -1;
-static int hf_pn_io_am_hardware_revision = -1;
-static int hf_pn_io_am_type_identification = -1;
-static int hf_pn_io_am_reserved = -1;
-
-static int hf_pn_io_dcp_boundary_value = -1;
-static int hf_pn_io_dcp_boundary_value_bit0 = -1;
-static int hf_pn_io_dcp_boundary_value_bit1 = -1;
-static int hf_pn_io_dcp_boundary_value_otherbits = -1;
-
-static int hf_pn_io_peer_to_peer_boundary_value = -1;
-static int hf_pn_io_peer_to_peer_boundary_value_bit0 = -1;
-static int hf_pn_io_peer_to_peer_boundary_value_bit1 = -1;
-static int hf_pn_io_peer_to_peer_boundary_value_bit2 = -1;
-static int hf_pn_io_peer_to_peer_boundary_value_otherbits = -1;
-
-static int hf_pn_io_mau_type_extension = -1;
-
-static int hf_pn_io_pe_operational_mode = -1;
-
-static int hf_pn_io_snmp_community_name_length = -1;
-static int hf_pn_io_snmp_community_name = -1;
-static int hf_pn_io_snmp_read_community_name = -1;
-static int hf_pn_io_snmp_write_community_name = -1;
-
-static int hf_pn_io_snmp_control = -1;
-
-/* static int hf_pn_io_packedframe_SFCRC = -1; */
-static gint ett_pn_io = -1;
-static gint ett_pn_io_block = -1;
-static gint ett_pn_io_block_header = -1;
-static gint ett_pn_io_rtc = -1;
-static gint ett_pn_io_rta = -1;
-static gint ett_pn_io_pdu_type = -1;
-static gint ett_pn_io_add_flags = -1;
-static gint ett_pn_io_control_command = -1;
-static gint ett_pn_io_ioxs = -1;
-static gint ett_pn_io_api = -1;
-static gint ett_pn_io_data_description = -1;
-static gint ett_pn_io_module = -1;
-static gint ett_pn_io_submodule = -1;
-static gint ett_pn_io_io_data_object = -1;
-static gint ett_pn_io_io_cs = -1;
-static gint ett_pn_io_ar_properties = -1;
-static gint ett_pn_io_iocr_properties = -1;
-static gint ett_pn_io_submodule_properties = -1;
-static gint ett_pn_io_alarmcr_properties = -1;
-static gint ett_pn_io_submodule_state = -1;
-static gint ett_pn_io_channel_properties = -1;
-static gint ett_pn_io_slot = -1;
-static gint ett_pn_io_subslot = -1;
-static gint ett_pn_io_maintenance_status = -1;
-static gint ett_pn_io_data_status = -1;
-static gint ett_pn_io_iocr = -1;
-static gint ett_pn_io_mrp_rtmode = -1;
-static gint ett_pn_io_control_block_properties = -1;
-static gint ett_pn_io_check_sync_mode = -1;
-static gint ett_pn_io_ir_frame_data = -1;
-static gint ett_pn_FrameDataProperties = -1;
-static gint ett_pn_io_ar_info = -1;
-static gint ett_pn_io_ar_data = -1;
-static gint ett_pn_io_ir_begin_end_port = -1;
-static gint ett_pn_io_ir_tx_phase = -1;
-static gint ett_pn_io_ir_rx_phase = -1;
-static gint ett_pn_io_subframe_data =-1;
-static gint ett_pn_io_SFIOCRProperties = -1;
-static gint ett_pn_io_frame_defails = -1;
-static gint ett_pn_io_profisafe_f_parameter = -1;
-static gint ett_pn_io_profisafe_f_parameter_prm_flag1 = -1;
-static gint ett_pn_io_profisafe_f_parameter_prm_flag2 = -1;
-static gint ett_pn_io_profidrive_parameter_request = -1;
-static gint ett_pn_io_profidrive_parameter_response = -1;
-static gint ett_pn_io_profidrive_parameter_address = -1;
-static gint ett_pn_io_profidrive_parameter_value = -1;
-static gint ett_pn_io_rs_alarm_info = -1;
-static gint ett_pn_io_rs_event_info = -1;
-static gint ett_pn_io_rs_event_block = -1;
-static gint ett_pn_io_rs_adjust_block = -1;
-static gint ett_pn_io_rs_event_data_extension = -1;
-static gint ett_pn_io_rs_specifier = -1;
-static gint ett_pn_io_rs_time_stamp = -1;
-static gint ett_pn_io_am_device_identification = -1;
-static gint ett_pn_io_rs_reason_code = -1;
-static gint ett_pn_io_soe_digital_input_current_value = -1;
-static gint ett_pn_io_rs_adjust_info = -1;
-static gint ett_pn_io_soe_adjust_specifier = -1;
-static gint ett_pn_io_sr_properties = -1;
-static gint ett_pn_io_line_delay = -1;
-static gint ett_pn_io_counter_status = -1;
-static gint ett_pn_io_neighbor = -1;
-
-static gint ett_pn_io_GroupProperties = -1;
-
-static gint ett_pn_io_asset_management_info = -1;
-static gint ett_pn_io_asset_management_block = -1;
-static gint ett_pn_io_am_location = -1;
-
-static gint ett_pn_io_dcp_boundary = -1;
-static gint ett_pn_io_peer_to_peer_boundary = -1;
-
-static gint ett_pn_io_mau_type_extension = -1;
-
-static gint ett_pn_io_pe_operational_mode = -1;
-
-static gint ett_pn_io_tsn_domain_port_config = -1;
-static gint ett_pn_io_tsn_domain_port_ingress_rate_limiter = -1;
-static gint ett_pn_io_tsn_domain_queue_rate_limiter = -1;
-static gint ett_pn_io_tsn_domain_vid_config = -1;
-static gint ett_pn_io_tsn_domain_queue_config = -1;
-static gint ett_pn_io_time_sync_properties = -1;
-static gint ett_pn_io_tsn_domain_port_id = -1;
-
-static gint ett_pn_io_snmp_command_name = -1;
+static int hf_pn_io_rs_alarm_info_reserved_0_7;
+static int hf_pn_io_rs_alarm_info_reserved_8_15;
+static int hf_pn_io_rs_alarm_info;
+static int hf_pn_io_rs_event_info;
+static int hf_pn_io_rs_event_block;
+static int hf_pn_io_rs_adjust_block;
+static int hf_pn_io_rs_event_data_extension;
+static int hf_pn_io_number_of_rs_event_info;
+static int hf_pn_io_rs_block_type;
+static int hf_pn_io_rs_block_length;
+static int hf_pn_io_rs_specifier;
+static int hf_pn_io_rs_specifier_sequence;
+static int hf_pn_io_rs_specifier_reserved;
+static int hf_pn_io_rs_specifier_specifier;
+static int hf_pn_io_rs_time_stamp;
+static int hf_pn_io_rs_time_stamp_status;
+static int hf_pn_io_rs_time_stamp_value;
+static int hf_pn_io_rs_minus_error;
+static int hf_pn_io_rs_plus_error;
+static int hf_pn_io_rs_extension_block_type;
+static int hf_pn_io_rs_extension_block_length;
+static int hf_pn_io_rs_reason_code;
+static int hf_pn_io_rs_reason_code_reason;
+static int hf_pn_io_rs_reason_code_detail;
+static int hf_pn_io_rs_domain_identification;
+static int hf_pn_io_rs_master_identification;
+static int hf_pn_io_soe_digital_input_current_value;
+static int hf_pn_io_soe_digital_input_current_value_value;
+static int hf_pn_io_soe_digital_input_current_value_reserved;
+static int hf_pn_io_am_device_identification;
+static int hf_pn_io_am_device_identification_device_sub_id;
+static int hf_pn_io_am_device_identification_device_id;
+static int hf_pn_io_am_device_identification_vendor_id;
+static int hf_pn_io_am_device_identification_organization;
+static int hf_pn_io_rs_adjust_info;
+static int hf_pn_io_soe_max_scan_delay;
+static int hf_pn_io_soe_adjust_specifier;
+static int hf_pn_io_soe_adjust_specifier_reserved;
+static int hf_pn_io_soe_adjust_specifier_incident;
+static int hf_pn_io_rs_properties;
+static int hf_pn_io_rs_properties_alarm_transport;
+static int hf_pn_io_rs_properties_reserved1;
+static int hf_pn_io_rs_properties_reserved2;
+
+static int hf_pn_io_asset_management_info;
+static int hf_pn_io_number_of_asset_management_info;
+static int hf_pn_io_im_uniqueidentifier;
+static int hf_pn_io_am_location_structure;
+static int hf_pn_io_am_location_level_0;
+static int hf_pn_io_am_location_level_1;
+static int hf_pn_io_am_location_level_2;
+static int hf_pn_io_am_location_level_3;
+static int hf_pn_io_am_location_level_4;
+static int hf_pn_io_am_location_level_5;
+static int hf_pn_io_am_location_level_6;
+static int hf_pn_io_am_location_level_7;
+static int hf_pn_io_am_location_level_8;
+static int hf_pn_io_am_location_level_9;
+static int hf_pn_io_am_location_level_10;
+static int hf_pn_io_am_location_level_11;
+static int hf_pn_io_am_location;
+static int hf_pn_io_am_location_reserved1;
+static int hf_pn_io_am_location_reserved2;
+static int hf_pn_io_am_location_reserved3;
+static int hf_pn_io_am_location_reserved4;
+static int hf_pn_io_am_location_beginslotnum;
+static int hf_pn_io_am_location_beginsubslotnum;
+static int hf_pn_io_am_location_endslotnum;
+static int hf_pn_io_am_location_endsubslotnum;
+static int hf_pn_io_am_software_revision;
+static int hf_pn_io_am_hardware_revision;
+static int hf_pn_io_am_type_identification;
+static int hf_pn_io_am_reserved;
+
+static int hf_pn_io_dcp_boundary_value;
+static int hf_pn_io_dcp_boundary_value_bit0;
+static int hf_pn_io_dcp_boundary_value_bit1;
+static int hf_pn_io_dcp_boundary_value_otherbits;
+
+static int hf_pn_io_peer_to_peer_boundary_value;
+static int hf_pn_io_peer_to_peer_boundary_value_bit0;
+static int hf_pn_io_peer_to_peer_boundary_value_bit1;
+static int hf_pn_io_peer_to_peer_boundary_value_bit2;
+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;
+static int hf_pn_io_snmp_community_name;
+static int hf_pn_io_snmp_read_community_name;
+static int hf_pn_io_snmp_write_community_name;
+
+static int hf_pn_io_snmp_control;
+
+/* static int hf_pn_io_packedframe_SFCRC; */
+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
#define PD_SUB_FRAME_BLOCK_FRAME_ID_LENGTH 2
#define PD_SUB_FRAME_BLOCK_SUB_FRAME_DATA_LENGTH 4
-static expert_field ei_pn_io_block_version = EI_INIT;
-static expert_field ei_pn_io_block_length = EI_INIT;
-static expert_field ei_pn_io_unsupported = EI_INIT;
-static expert_field ei_pn_io_localalarmref = EI_INIT;
-static expert_field ei_pn_io_mrp_instances = EI_INIT;
-static expert_field ei_pn_io_ar_info_not_found = EI_INIT;
-static expert_field ei_pn_io_iocr_type = EI_INIT;
-static expert_field ei_pn_io_frame_id = EI_INIT;
-static expert_field ei_pn_io_nr_of_tx_port_groups = EI_INIT;
-static expert_field ei_pn_io_max_recursion_depth_reached = EI_INIT;
+static expert_field ei_pn_io_block_version;
+static expert_field ei_pn_io_block_length;
+static expert_field ei_pn_io_unsupported;
+static expert_field ei_pn_io_localalarmref;
+static expert_field ei_pn_io_mrp_instances;
+static expert_field ei_pn_io_ar_info_not_found;
+static expert_field ei_pn_io_iocr_type;
+static expert_field ei_pn_io_frame_id;
+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 +1041,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 +1236,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 +1467,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 +1711,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 +2764,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 +2889,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 +3147,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 +3925,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 +3961,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 +3980,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 +4043,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 +4096,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 +4138,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 +4168,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 +4194,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 +4232,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 +4271,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 +4342,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 +4383,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 +4485,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 +4513,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 +4536,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 +4560,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 +4581,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 +4602,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);
@@ -4521,11 +4712,11 @@ 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) {
@@ -4583,12 +4774,12 @@ dissect_AlarmUserStructure(tvbuff_t *tvb, int offset,
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) {
@@ -4631,21 +4822,21 @@ dissect_AlarmNotification_block(tvbuff_t *tvb, int 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) {
@@ -4708,7 +4899,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;
@@ -4735,7 +4926,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;
@@ -4757,7 +4948,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;
@@ -4779,7 +4970,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) {
@@ -4796,9 +4987,9 @@ 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,
@@ -4817,21 +5008,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) {
@@ -4896,15 +5087,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);
@@ -4947,25 +5138,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)
@@ -5074,12 +5265,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,
@@ -5102,14 +5293,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;
@@ -5132,12 +5323,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,
@@ -5194,12 +5385,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,
@@ -5249,12 +5440,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,
@@ -5308,11 +5499,11 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
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);
@@ -5331,8 +5522,8 @@ packet_info *pinfo _U_, proto_tree *tree, guint8 *drep)
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,
@@ -5348,19 +5539,19 @@ guint8 u8BlockVersionHigh, guint8 u8BlockVersionLow)
/* 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;
@@ -5436,10 +5627,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,
@@ -5466,11 +5657,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) {
@@ -5503,14 +5694,14 @@ dissect_RecordInputDataObjectElement_block(tvbuff_t *tvb, int offset,
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;
@@ -5550,7 +5741,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,
@@ -5573,11 +5764,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) {
@@ -5612,11 +5803,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) {
@@ -5638,12 +5829,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);
@@ -5676,8 +5867,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;
@@ -5717,8 +5908,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;
@@ -5759,13 +5950,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) {
@@ -5810,12 +6001,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) {
@@ -5854,15 +6045,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,
@@ -5970,12 +6161,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;
@@ -6037,13 +6228,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,
@@ -6070,7 +6261,7 @@ dissect_SubmoduleListBlock(tvbuff_t *tvb, int offset,
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) {
@@ -6089,10 +6280,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,
@@ -6117,9 +6308,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,
@@ -6137,11 +6328,11 @@ dissect_CheckMAUTypeExtension_block(tvbuff_t *tvb, int offset,
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;
@@ -6178,11 +6369,11 @@ dissect_PDPortData_Adjust_block(tvbuff_t *tvb, int offset,
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;
@@ -6216,13 +6407,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);
@@ -6230,7 +6421,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,
@@ -6248,28 +6439,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,
@@ -6376,12 +6567,12 @@ dissect_PDPortDataReal_block(tvbuff_t *tvb, int offset,
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;
@@ -6413,12 +6604,12 @@ 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;
@@ -6498,13 +6689,13 @@ 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 */
@@ -6576,11 +6767,11 @@ 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) {
@@ -6633,10 +6824,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) {
@@ -6664,14 +6855,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) {
@@ -6707,11 +6898,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 */
@@ -6733,10 +6924,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) {
@@ -6763,9 +6954,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) {
@@ -6784,9 +6975,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) {
@@ -6805,11 +6996,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) {
@@ -6834,7 +7025,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);
@@ -6853,11 +7044,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) {
@@ -6889,9 +7080,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,
@@ -6912,12 +7103,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)) {
@@ -6974,10 +7165,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) {
@@ -7005,10 +7196,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) {
@@ -7037,9 +7228,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) {
@@ -7062,9 +7253,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) {
@@ -7087,12 +7278,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) {
@@ -7131,10 +7322,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) {
@@ -7163,9 +7354,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) {
@@ -7188,13 +7379,13 @@ dissect_CheckPortState_block(tvbuff_t *tvb, int offset,
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;
@@ -7227,12 +7418,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) {
@@ -7261,9 +7452,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) {
@@ -7284,10 +7475,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,
@@ -7311,10 +7502,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) {
@@ -7345,9 +7536,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) {
@@ -7382,12 +7573,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,
@@ -7424,12 +7615,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,
@@ -7462,12 +7653,12 @@ 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) {
@@ -7508,13 +7699,13 @@ 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) {
@@ -7555,10 +7746,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) {
@@ -7594,9 +7785,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,
@@ -7619,17 +7810,17 @@ dissect_PDInterfaceAdjust_block(tvbuff_t *tvb, int offset,
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;
@@ -7732,16 +7923,16 @@ dissect_TSNNetworkControlDataReal_block(tvbuff_t* tvb, int offset,
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;
@@ -7829,14 +8020,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,
@@ -7888,13 +8079,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;
@@ -7932,14 +8123,14 @@ dissect_TSNSyncTreeData_block(tvbuff_t* tvb, int offset,
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,
@@ -7989,12 +8180,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;
@@ -8034,14 +8225,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;
@@ -8093,11 +8284,11 @@ dissect_TSNTimeData_block(tvbuff_t* tvb, int offset,
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,
@@ -8130,16 +8321,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,
@@ -8199,7 +8390,7 @@ dissect_TSNExpectedNeighbor_block(tvbuff_t* tvb, int offset,
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,
@@ -8225,12 +8416,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;
@@ -8266,12 +8457,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;
@@ -8311,16 +8502,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,
@@ -8384,14 +8575,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,
@@ -8431,10 +8622,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)) {
@@ -8497,18 +8688,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,
@@ -8572,20 +8763,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,
@@ -8649,11 +8840,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) {
@@ -8680,15 +8871,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;
@@ -8698,24 +8889,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) {
@@ -8834,12 +9025,12 @@ dissect_PDSyncData_block(tvbuff_t *tvb, int offset,
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 */
@@ -8884,16 +9075,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)) {
@@ -8944,23 +9135,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;
@@ -9034,7 +9225,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++;
@@ -9078,29 +9269,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,
@@ -9239,14 +9430,14 @@ dissect_PDIRBeginEndData_block(tvbuff_t *tvb, int offset,
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;
@@ -9318,13 +9509,13 @@ dissect_DiagnosisData_block(tvbuff_t *tvb, int 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);
@@ -9332,7 +9523,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)
{
@@ -9348,7 +9539,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));
@@ -9379,11 +9570,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);
@@ -9412,35 +9603,35 @@ dissect_IOCRProperties(tvbuff_t *tvb, int offset,
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) {
@@ -9496,8 +9687,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,
@@ -9644,8 +9835,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,
@@ -9708,10 +9899,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) {
@@ -9736,9 +9927,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,
@@ -9756,13 +9947,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;
@@ -9811,12 +10002,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) {
@@ -9851,9 +10042,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;
@@ -9885,8 +10076,8 @@ dissect_FSParameter_block(tvbuff_t *tvb, int offset,
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;
@@ -9915,8 +10106,8 @@ dissect_PDInterfaceFSUDataAdjust_block(tvbuff_t *tvb, int offset,
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;
@@ -9940,28 +10131,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,
@@ -10047,24 +10783,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,
@@ -10148,7 +10884,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");
@@ -10160,7 +10896,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");
@@ -10172,26 +10908,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;
@@ -10258,13 +10994,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;
}
}
}
@@ -10272,7 +11008,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)) {
@@ -10328,14 +11064,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) {
@@ -10381,40 +11117,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;
@@ -10427,7 +11163,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,
@@ -10507,7 +11243,7 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset,
hf_pn_io_number_of_io_data_objects, &u16NumberOfIODataObjectsInAPI);
/* Set global Variant for Number of IO Data Objects */
- /* Notice: Handle Input & Output seperate!!! */
+ /* Notice: Handle Input & Output separate!!! */
if (!PINFO_FD_VISITED(pinfo)) {
/* Get current conversation endpoints using MAC addresses */
conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0);
@@ -10568,7 +11304,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;
@@ -10600,7 +11336,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;
}
@@ -10705,18 +11441,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;
@@ -10775,12 +11511,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) {
@@ -10815,9 +11551,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,
@@ -10842,12 +11578,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;
@@ -10909,12 +11645,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;
@@ -10948,13 +11684,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;
@@ -11006,15 +11742,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,
@@ -11055,7 +11791,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);
@@ -11069,8 +11805,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;
@@ -11082,13 +11818,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;
@@ -11124,12 +11860,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;
@@ -11140,11 +11876,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)
@@ -11170,10 +11906,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,
@@ -11197,9 +11933,9 @@ dissect_RSInfoBlock_block(tvbuff_t *tvb, int offset,
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,
@@ -11218,12 +11954,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,
@@ -11277,15 +12013,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;
@@ -11294,7 +12030,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);
@@ -11384,10 +12120,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)
{
@@ -11479,25 +12215,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=\"";
@@ -11510,51 +12246,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) {
@@ -11589,8 +12325,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;
@@ -11598,7 +12334,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 */
@@ -11618,10 +12354,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 */
}
}
}
@@ -11631,10 +12367,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 */
}
}
}
@@ -11648,9 +12384,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 */
}
}
@@ -11661,8 +12397,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 {
@@ -11672,7 +12408,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;
}
}
@@ -11764,7 +12500,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");
@@ -11782,7 +12518,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 */
}
@@ -11796,7 +12532,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) {
@@ -11830,18 +12566,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 */
}
@@ -11903,29 +12639,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;
@@ -11934,7 +12670,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,
@@ -12082,16 +12818,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) {
@@ -12134,14 +12870,14 @@ dissect_IsochronousModeData_block(tvbuff_t *tvb, int offset,
static int
dissect_CommunityName_block(tvbuff_t *tvb, int offset,
- packet_info *pinfo _U_, 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);
@@ -12152,7 +12888,7 @@ dissect_CommunityName_block(tvbuff_t *tvb, int offset,
proto_tree_add_item(sub_tree, hf_pn_io_snmp_community_name, tvb, offset, u8CommunityNameLength, ENC_ASCII | ENC_NA);
proto_item_append_text(sub_item, ": %s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, u8CommunityNameLength, ENC_ASCII|ENC_NA));
+ tvb_get_string_enc(pinfo->pool, tvb, offset, u8CommunityNameLength, ENC_ASCII|ENC_NA));
offset += u8CommunityNameLength;
return offset;
@@ -12161,11 +12897,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,
@@ -12191,12 +12927,12 @@ dissect_CIMSNMPAdjust_block(tvbuff_t *tvb, int offset,
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;
@@ -12230,12 +12966,12 @@ dissect_MultipleBlockHeader_block(tvbuff_t *tvb, int offset,
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,
@@ -12270,8 +13006,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) {
@@ -12297,10 +13033,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) {
@@ -12328,8 +13064,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,
@@ -12343,15 +13079,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 */
@@ -12388,13 +13124,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);
@@ -12413,11 +13149,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);
@@ -12435,8 +13171,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,
@@ -12449,9 +13185,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,
@@ -12463,8 +13199,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,
@@ -12479,19 +13215,19 @@ dissect_RS_AckEvent_block(tvbuff_t *tvb, int offset,
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;
@@ -12854,7 +13590,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);
@@ -12869,7 +13605,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);
@@ -12908,6 +13644,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;
@@ -12982,10 +13724,10 @@ dissect_block(tvbuff_t *tvb, int offset,
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);
@@ -13001,14 +13743,14 @@ dissect_a_block(tvbuff_t *tvb, int offset,
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++;
}
@@ -13024,17 +13766,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");
@@ -13069,16 +13811,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");
@@ -13112,7 +13854,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);
@@ -13126,7 +13868,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);
@@ -13139,13 +13881,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;
@@ -13175,10 +13917,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;
@@ -13210,8 +13952,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;
@@ -13239,13 +13981,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;
@@ -13269,8 +14011,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;
@@ -13299,9 +14041,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;
@@ -13355,9 +14097,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;
@@ -13412,9 +14154,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 */
@@ -13466,6 +14208,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 */
@@ -13619,10 +14362,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);
@@ -13649,7 +14392,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;
@@ -13657,22 +14400,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;
@@ -13680,7 +14423,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);
@@ -13735,7 +14478,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,"
@@ -13822,18 +14565,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 */
@@ -13933,6 +14676,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 */
@@ -13955,10 +14699,10 @@ dissect_RecordDataWrite(tvbuff_t *tvb, int offset,
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,
@@ -14005,10 +14749,10 @@ dissect_IODWriteReq(tvbuff_t *tvb, int 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);
@@ -14025,10 +14769,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;
@@ -14053,7 +14797,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);
@@ -14067,12 +14811,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) {
@@ -14129,15 +14873,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);
@@ -14160,11 +14904,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");
@@ -14195,20 +14939,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;
@@ -14293,17 +15037,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,
@@ -14311,7 +15055,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);
@@ -14326,7 +15070,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? */
@@ -14335,7 +15079,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 */
@@ -14343,7 +15087,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? */
@@ -14351,7 +15095,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? */
@@ -14359,7 +15103,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? */
@@ -14367,7 +15111,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? */
@@ -14375,22 +15119,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);
@@ -14398,7 +15146,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);
@@ -14423,7 +15171,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);
@@ -14473,7 +15221,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 },
@@ -17685,22 +18433,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 }
},
@@ -17729,6 +18477,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,
@@ -17761,7 +18754,7 @@ proto_register_pn_io (void)
},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_pn_io,
&ett_pn_io_block,
&ett_pn_io_block_header,
@@ -17830,6 +18823,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,
@@ -17861,7 +18861,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);
@@ -17885,12 +18885,12 @@ 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);
- heur_pn_subdissector_list = register_heur_dissector_list("pn_io", 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 */
init_pn_io_rtc1(proto_pn_io);
diff --git a/plugins/epan/profinet/packet-dcom-cba-acco.c b/plugins/epan/profinet/packet-dcom-cba-acco.c
index 6b3788a3..3f486cbc 100644
--- a/plugins/epan/profinet/packet-dcom-cba-acco.c
+++ b/plugins/epan/profinet/packet-dcom-cba-acco.c
@@ -25,164 +25,164 @@
void proto_register_dcom_cba_acco(void);
void proto_reg_handoff_dcom_cba_acco(void);
-static int hf_cba_acco_opnum = -1;
-
-static int hf_cba_acco_ping_factor = -1;
-
-static int hf_cba_acco_count = -1;
-
-static int hf_cba_acco_item = -1;
-static int hf_cba_acco_data = -1;
-static int hf_cba_acco_qc = -1;
-static int hf_cba_acco_time_stamp = -1;
-
-static int hf_cba_acco_conn_qos_type = -1;
-static int hf_cba_acco_conn_qos_value = -1;
-static int hf_cba_acco_conn_state = -1;
-static int hf_cba_acco_conn_cons_id = -1;
-static int hf_cba_acco_conn_version = -1;
-static int hf_cba_acco_conn_prov_id = -1;
-static int hf_cba_acco_conn_provider = -1;
-static int hf_cba_acco_conn_consumer = -1;
-static int hf_cba_acco_conn_provider_item = -1;
-static int hf_cba_acco_conn_consumer_item = -1;
-static int hf_cba_acco_conn_substitute = -1;
-static int hf_cba_acco_conn_epsilon = -1;
-static int hf_cba_acco_conn_persist = -1;
-
-static int hf_cba_acco_cb_length = -1;
-static int hf_cba_acco_cb_conn_data = -1;
-static int hf_cba_acco_cb_version = -1;
-static int hf_cba_acco_cb_flags = -1;
-static int hf_cba_acco_cb_count = -1;
-static int hf_cba_acco_cb_item = -1;
-static int hf_cba_acco_cb_item_hole = -1;
-static int hf_cba_acco_cb_item_length = -1;
-static int hf_cba_acco_cb_item_data = -1;
-
-static int hf_cba_connect_in = -1;
-static int hf_cba_disconnect_in = -1;
-static int hf_cba_connectcr_in = -1;
-static int hf_cba_disconnectcr_in = -1;
-static int hf_cba_disconnectme_in = -1;
-static int hf_cba_data_first_in = -1;
-static int hf_cba_data_last_in = -1;
-
-/* static int hf_cba_acco_server_pICBAAccoCallback = -1; */
-
-static int hf_cba_acco_server_first_connect = -1;
-
-static int hf_cba_acco_serversrt_prov_mac = -1;
-static int hf_cba_acco_serversrt_cons_mac = -1;
-
-static int hf_cba_acco_serversrt_cr_id = -1;
-static int hf_cba_acco_serversrt_cr_length = -1;
-static int hf_cba_acco_serversrt_cr_flags = -1;
-static int hf_cba_acco_serversrt_cr_flags_timestamped = -1;
-static int hf_cba_acco_serversrt_cr_flags_reconfigure = -1;
-static int hf_cba_acco_serversrt_record_length = -1;
-/* static int hf_cba_acco_serversrt_action = -1; */
-static int hf_cba_acco_serversrt_last_connect = -1;
-
-static int hf_cba_getprovconnout = -1;
-
-static int hf_cba_type_desc_len = -1;
-
-static int hf_cba_connectincr = -1;
-static int hf_cba_connectoutcr = -1;
-static int hf_cba_connectin = -1;
-static int hf_cba_connectout = -1;
-static int hf_cba_getconnectionout = -1;
-static int hf_cba_readitemout = -1;
-static int hf_cba_writeitemin = -1;
-static int hf_cba_addconnectionin = -1;
-static int hf_cba_addconnectionout = -1;
-static int hf_cba_getidout = -1;
-
-static int hf_cba_getconsconnout = -1;
-static int hf_cba_diagconsconnout = -1;
-static int hf_cba_acco_conn_error_state = -1;
-
-static int hf_cba_acco_info_max = -1;
-static int hf_cba_acco_info_curr = -1;
-
-static int hf_cba_acco_cdb_cookie = -1;
-
-static int hf_cba_acco_rtauto = -1;
-
-static int hf_cba_acco_prov_crid = -1;
-
-static int hf_cba_acco_diag_req = -1;
-static int hf_cba_acco_diag_in_length = -1;
-static int hf_cba_acco_diag_out_length = -1;
-static int hf_cba_acco_diag_data = -1;
-static int hf_cba_acco_dcom_call = -1;
-static int hf_cba_acco_srt_call = -1;
-
-gint ett_cba_connectincr = -1;
-gint ett_cba_connectoutcr = -1;
-gint ett_cba_connectin = -1;
-gint ett_cba_connectout = -1;
-gint ett_cba_getprovconnout = -1;
-gint ett_cba_addconnectionin = -1;
-gint ett_cba_addconnectionout = -1;
-gint ett_cba_getidout = -1;
-gint ett_cba_getconnectionout = -1;
-gint ett_cba_readitemout = -1;
-gint ett_cba_writeitemin = -1;
-gint ett_cba_acco_serversrt_cr_flags = -1;
-gint ett_cba_frame_info = -1;
-gint ett_cba_conn_info = -1;
-
-static expert_field ei_cba_acco_pdev_find = EI_INIT;
-static expert_field ei_cba_acco_prov_crid = EI_INIT;
-static expert_field ei_cba_acco_conn_consumer = EI_INIT;
-static expert_field ei_cba_acco_ldev_unknown = EI_INIT;
-static expert_field ei_cba_acco_no_request_info = EI_INIT;
-static expert_field ei_cba_acco_ipid_unknown = EI_INIT;
-static expert_field ei_cba_acco_qc = EI_INIT;
-static expert_field ei_cba_acco_pdev_find_unknown_interface = EI_INIT;
-static expert_field ei_cba_acco_disconnect = EI_INIT;
-static expert_field ei_cba_acco_connect = EI_INIT;
-
-static int proto_ICBAAccoMgt = -1;
-static gint ett_ICBAAccoMgt = -1;
+static int hf_cba_acco_opnum;
+
+static int hf_cba_acco_ping_factor;
+
+static int hf_cba_acco_count;
+
+static int hf_cba_acco_item;
+static int hf_cba_acco_data;
+static int hf_cba_acco_qc;
+static int hf_cba_acco_time_stamp;
+
+static int hf_cba_acco_conn_qos_type;
+static int hf_cba_acco_conn_qos_value;
+static int hf_cba_acco_conn_state;
+static int hf_cba_acco_conn_cons_id;
+static int hf_cba_acco_conn_version;
+static int hf_cba_acco_conn_prov_id;
+static int hf_cba_acco_conn_provider;
+static int hf_cba_acco_conn_consumer;
+static int hf_cba_acco_conn_provider_item;
+static int hf_cba_acco_conn_consumer_item;
+static int hf_cba_acco_conn_substitute;
+static int hf_cba_acco_conn_epsilon;
+static int hf_cba_acco_conn_persist;
+
+static int hf_cba_acco_cb_length;
+static int hf_cba_acco_cb_conn_data;
+static int hf_cba_acco_cb_version;
+static int hf_cba_acco_cb_flags;
+static int hf_cba_acco_cb_count;
+static int hf_cba_acco_cb_item;
+static int hf_cba_acco_cb_item_hole;
+static int hf_cba_acco_cb_item_length;
+static int hf_cba_acco_cb_item_data;
+
+static int hf_cba_connect_in;
+static int hf_cba_disconnect_in;
+static int hf_cba_connectcr_in;
+static int hf_cba_disconnectcr_in;
+static int hf_cba_disconnectme_in;
+static int hf_cba_data_first_in;
+static int hf_cba_data_last_in;
+
+/* static int hf_cba_acco_server_pICBAAccoCallback; */
+
+static int hf_cba_acco_server_first_connect;
+
+static int hf_cba_acco_serversrt_prov_mac;
+static int hf_cba_acco_serversrt_cons_mac;
+
+static int hf_cba_acco_serversrt_cr_id;
+static int hf_cba_acco_serversrt_cr_length;
+static int hf_cba_acco_serversrt_cr_flags;
+static int hf_cba_acco_serversrt_cr_flags_timestamped;
+static int hf_cba_acco_serversrt_cr_flags_reconfigure;
+static int hf_cba_acco_serversrt_record_length;
+/* static int hf_cba_acco_serversrt_action; */
+static int hf_cba_acco_serversrt_last_connect;
+
+static int hf_cba_getprovconnout;
+
+static int hf_cba_type_desc_len;
+
+static int hf_cba_connectincr;
+static int hf_cba_connectoutcr;
+static int hf_cba_connectin;
+static int hf_cba_connectout;
+static int hf_cba_getconnectionout;
+static int hf_cba_readitemout;
+static int hf_cba_writeitemin;
+static int hf_cba_addconnectionin;
+static int hf_cba_addconnectionout;
+static int hf_cba_getidout;
+
+static int hf_cba_getconsconnout;
+static int hf_cba_diagconsconnout;
+static int hf_cba_acco_conn_error_state;
+
+static int hf_cba_acco_info_max;
+static int hf_cba_acco_info_curr;
+
+static int hf_cba_acco_cdb_cookie;
+
+static int hf_cba_acco_rtauto;
+
+static int hf_cba_acco_prov_crid;
+
+static int hf_cba_acco_diag_req;
+static int hf_cba_acco_diag_in_length;
+static int hf_cba_acco_diag_out_length;
+static int hf_cba_acco_diag_data;
+static int hf_cba_acco_dcom_call;
+static int hf_cba_acco_srt_call;
+
+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;
+static expert_field ei_cba_acco_conn_consumer;
+static expert_field ei_cba_acco_ldev_unknown;
+static expert_field ei_cba_acco_no_request_info;
+static expert_field ei_cba_acco_ipid_unknown;
+static expert_field ei_cba_acco_qc;
+static expert_field ei_cba_acco_pdev_find_unknown_interface;
+static expert_field ei_cba_acco_disconnect;
+static expert_field ei_cba_acco_connect;
+
+static int proto_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 = -1;
+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 = -1;
-static gint ett_ICBAAccoCallback = -1;
-static gint ett_ICBAAccoCallback_Buffer = -1;
-static gint ett_ICBAAccoCallback_Item = -1;
+static int proto_ICBAAccoCallback;
+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 = -1;
+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 = -1;
-static gint ett_ICBAAccoServer = -1;
+static int proto_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 = -1;
+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 = -1;
-static gint ett_ICBAAccoServerSRT = -1;
+static int proto_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 = -1;
-static gint ett_ICBAAccoSync = -1;
+static int proto_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 +246,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 +265,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 +327,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 +335,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 +614,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 +645,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 +654,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 +724,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 +751,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 +813,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 +849,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 +946,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 +1055,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 +1089,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 +1129,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 +1174,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 +1219,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 +1264,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 +1296,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 +1381,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 +1410,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 +1448,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 +1533,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 +1605,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 +1626,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 +1695,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 +1710,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 +1758,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 +1777,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 +1819,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 +1856,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 +1871,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 +1897,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 +1927,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 +1942,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 +1968,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 +1998,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 +2022,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 +2064,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 +2105,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 +2130,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 +2158,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 +2272,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 +2293,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 +2371,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 +2388,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 +2433,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 +2447,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 +2487,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 +2523,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 +2591,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 +2660,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 +2681,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 +2750,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 +2807,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 +2839,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 +2949,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 +2981,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 +3091,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 +3189,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 +3238,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 +3262,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 +3286,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 +3303,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 +3327,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 +3338,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 +3363,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 +3381,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 +3417,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 +3512,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 +3577,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 +3609,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 +3645,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 +3673,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 +3752,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 +3809,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 +3918,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 +3999,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 +4028,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 +4140,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 +4170,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 +4194,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 +4218,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 +4237,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 +4261,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 +4293,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 +4316,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 +4359,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 +4430,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 +4488,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 +4553,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 +4581,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 +4594,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 +4612,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 +4628,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 +4644,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[] = {
@@ -5014,12 +5014,12 @@ proto_register_dcom_cba_acco (void)
"This connection Disconnect was in the packet with this number", HFILL }
},
{ &hf_cba_connectcr_in,
- { "ConnectCR in frame", "cba.connect_in",
+ { "ConnectCR in frame", "cba.connectcr_in",
FT_FRAMENUM, BASE_NONE, NULL, 0,
"This frame ConnectCR was in the packet with this number", HFILL }
},
{ &hf_cba_disconnectcr_in,
- { "DisconnectCR in frame", "cba.disconnect_in",
+ { "DisconnectCR in frame", "cba.disconnectcr_in",
FT_FRAMENUM, BASE_NONE, NULL, 0,
"This frame DisconnectCR was in the packet with this number", HFILL }
},
diff --git a/plugins/epan/profinet/packet-dcom-cba-acco.h b/plugins/epan/profinet/packet-dcom-cba-acco.h
index 31711244..0b102856 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 52c5017e..8a28a10d 100644
--- a/plugins/epan/profinet/packet-dcom-cba.c
+++ b/plugins/epan/profinet/packet-dcom-cba.c
@@ -20,144 +20,144 @@
void proto_register_dcom_cba(void);
void proto_reg_handoff_dcom_cba(void);
-static int hf_cba_opnum = -1;
-
-static int hf_cba_revision_major = -1;
-static int hf_cba_revision_minor = -1;
-static int hf_cba_revision_service_pack = -1;
-static int hf_cba_revision_build = -1;
-
-static int hf_cba_time = -1;
-
-static int hf_cba_name = -1;
-static int hf_cba_producer = -1;
-static int hf_cba_product = -1;
-static int hf_cba_production_date = -1;
-static int hf_cba_serial_no = -1;
-static int hf_cba_multi_app = -1;
-static int hf_cba_profinet_dcom_stack = -1;
-static int hf_cba_pdev_stamp = -1;
-
-static int hf_cba_browse_count = -1;
-static int hf_cba_browse_offset = -1;
-static int hf_cba_browse_max_return = -1;
-static int hf_cba_browse_item = -1;
-static int hf_cba_browse_data_type = -1;
-static int hf_cba_browse_access_right = -1;
-static int hf_cba_browse_selector = -1;
-static int hf_cba_browse_info1 = -1;
-static int hf_cba_browse_info2 = -1;
-
-static int hf_cba_cookie = -1;
-static int hf_cba_state = -1;
-static int hf_cba_new_state = -1;
-static int hf_cba_old_state = -1;
-static int hf_cba_grouperror = -1;
-static int hf_cba_new_grouperror = -1;
-static int hf_cba_old_grouperror = -1;
-
-static int hf_cba_component_id = -1;
-static int hf_cba_component_version = -1;
-static int hf_cba_pbaddress = -1;
-static int hf_cba_pbaddress_system_id = -1;
-static int hf_cba_pbaddress_address = -1;
-
-static int hf_cba_save_ldev_name = -1;
-static int hf_cba_save_result = -1;
-
-static expert_field ei_cba_acco_interface_pointer_unresolved = EI_INIT;
+static int hf_cba_opnum;
+
+static int hf_cba_revision_major;
+static int hf_cba_revision_minor;
+static int hf_cba_revision_service_pack;
+static int hf_cba_revision_build;
+
+static int hf_cba_time;
+
+static int hf_cba_name;
+static int hf_cba_producer;
+static int hf_cba_product;
+static int hf_cba_production_date;
+static int hf_cba_serial_no;
+static int hf_cba_multi_app;
+static int hf_cba_profinet_dcom_stack;
+static int hf_cba_pdev_stamp;
+
+static int hf_cba_browse_count;
+static int hf_cba_browse_offset;
+static int hf_cba_browse_max_return;
+static int hf_cba_browse_item;
+static int hf_cba_browse_data_type;
+static int hf_cba_browse_access_right;
+static int hf_cba_browse_selector;
+static int hf_cba_browse_info1;
+static int hf_cba_browse_info2;
+
+static int hf_cba_cookie;
+static int hf_cba_state;
+static int hf_cba_new_state;
+static int hf_cba_old_state;
+static int hf_cba_grouperror;
+static int hf_cba_new_grouperror;
+static int hf_cba_old_grouperror;
+
+static int hf_cba_component_id;
+static int hf_cba_component_version;
+static int hf_cba_pbaddress;
+static int hf_cba_pbaddress_system_id;
+static int hf_cba_pbaddress_address;
+
+static int hf_cba_save_ldev_name;
+static int hf_cba_save_result;
+
+static expert_field ei_cba_acco_interface_pointer_unresolved;
static e_guid_t uuid_coclass_CBAPhysicalDevice = { 0xcba00000, 0x6c97, 0x11d1, { 0x82, 0x71, 0x00, 0xa0, 0x24, 0x42, 0xdf, 0x7d } };
/* CBA interfaces */
-static int proto_ICBAPhysicalDevice = -1;
-static gint ett_ICBAPhysicalDevice = -1;
+static int proto_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 = -1;
+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 = -1;
-static gint ett_ICBABrowse = -1;
+static int proto_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 = -1;
+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 = -1;
-static gint ett_ICBAPhysicalDevicePC = -1;
+static int proto_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 = -1;
-static gint ett_ICBAPhysicalDevicePCEvent = -1;
+static int proto_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 = -1;
-static gint ett_ICBAPersist = -1;
+static int proto_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 = -1;
+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 = -1;
-static gint ett_ICBALogicalDevice = -1;
+static int proto_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 = -1;
+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 = -1;
-static gint ett_ICBAState = -1;
+static int proto_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 = -1;
-static gint ett_ICBAStateEvent = -1;
+static int proto_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 = -1;
-static gint ett_ICBATime = -1;
+static int proto_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 = -1;
-static gint ett_ICBAGroupError = -1;
+static int proto_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 = -1;
-static gint ett_ICBAGroupErrorEvent = -1;
+static int proto_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 = -1;
-static gint ett_ICBARTAuto = -1;
+static int proto_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 = -1;
+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 = -1;
-static gint ett_ICBASystemProperties = -1;
+static int proto_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 = -1;
+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 456c79c9..5fc02ad0 100644
--- a/plugins/epan/profinet/packet-pn-dcp.c
+++ b/plugins/epan/profinet/packet-pn-dcp.c
@@ -16,7 +16,7 @@
*
* Added new functions to packet-pn-dcp.c. The profinet plug-in will now save
* the information (Stationname, -type, -id) of "Ident OK" frames. Those
- * informations will later be used for detailled dissection of cyclic PNIO RTC1
+ * informations will later be used for detailed dissection of cyclic PNIO RTC1
* dataframes.
*
* The declaration of the new added structures are within packet-pn.h to
@@ -46,94 +46,94 @@
void proto_register_pn_dcp(void);
void proto_reg_handoff_pn_dcp(void);
-int proto_pn_dcp = -1;
-
-static int hf_pn_dcp_service_id = -1;
-static int hf_pn_dcp_service_type = -1;
-static int hf_pn_dcp_xid = -1;
-static int hf_pn_dcp_reserved8 = -1;
-static int hf_pn_dcp_reserved16 = -1;
-static int hf_pn_dcp_response_delay = -1;
-static int hf_pn_dcp_data_length = -1;
-static int hf_pn_dcp_block_length = -1;
-
-static int hf_pn_dcp_block = -1;
-
-static int hf_pn_dcp_block_error = -1;
-
-static int hf_pn_dcp_option = -1;
-static int hf_pn_dcp_block_info = -1;
-static int hf_pn_dcp_block_qualifier = -1;
-static int hf_pn_dcp_blockqualifier = -1;
-static int hf_pn_dcp_blockqualifier_r2f = -1;
-
-static int hf_pn_dcp_suboption_ip = -1;
-static int hf_pn_dcp_suboption_ip_block_info = -1;
-static int hf_pn_dcp_suboption_ip_ip = -1;
-static int hf_pn_dcp_suboption_ip_subnetmask = -1;
-static int hf_pn_dcp_suboption_ip_standard_gateway = -1;
-static int hf_pn_dcp_suboption_ip_mac_address = -1;
-
-static int hf_pn_dcp_suboption_device = -1;
-static int hf_pn_dcp_suboption_device_typeofstation = -1;
-static int hf_pn_dcp_suboption_device_nameofstation = -1;
-static int hf_pn_dcp_suboption_vendor_id = -1;
-static int hf_pn_dcp_suboption_device_id = -1;
-static int hf_pn_dcp_suboption_device_role = -1;
-static int hf_pn_dcp_suboption_device_aliasname = -1;
-static int hf_pn_dcp_suboption_device_instance_high = -1;
-static int hf_pn_dcp_suboption_device_instance_low = -1;
-static int hf_pn_dcp_suboption_device_oem_ven_id = -1;
-static int hf_pn_dcp_suboption_device_oem_dev_id = -1;
-
-static int hf_pn_dcp_rsi_properties_value = -1;
-static int hf_pn_dcp_rsi_properties_value_bit0 = -1;
-static int hf_pn_dcp_rsi_properties_value_bit1 = -1;
-static int hf_pn_dcp_rsi_properties_value_bit2 = -1;
-static int hf_pn_dcp_rsi_properties_value_bit3 = -1;
-static int hf_pn_dcp_rsi_properties_value_bit4 = -1;
-static int hf_pn_dcp_rsi_properties_value_bit5 = -1;
-static int hf_pn_dcp_rsi_properties_value_otherbits = -1;
-
-static int hf_pn_dcp_suboption_tsn = -1;
-static int hf_pn_dcp_suboption_tsn_domain_name = -1;
-static int hf_pn_dcp_suboption_tsn_domain_uuid = -1;
-static int hf_pn_dcp_suboption_tsn_nme_prio = -1;
-static int hf_pn_dcp_suboption_tsn_nme_parameter_uuid = -1;
-static int hf_pn_dcp_suboption_tsn_nme_agent = -1;
-
-static int hf_pn_dcp_suboption_dhcp = -1;
-static int hf_pn_dcp_suboption_dhcp_option_code = -1;
-static int hf_pn_dcp_suboption_dhcp_parameter_length = -1;
-static int hf_pn_dcp_suboption_dhcp_parameter_data = -1;
-static int hf_pn_dcp_suboption_dhcp_arbitrary_client_id = -1;
-static int hf_pn_dcp_suboption_dhcp_control_parameter_data = -1;
-
-static int hf_pn_dcp_suboption_control = -1;
-static int hf_pn_dcp_suboption_control_option = -1;
-static int hf_pn_dcp_suboption_control_signal_value = -1;
-
-static int hf_pn_dcp_suboption_deviceinitiative = -1;
-static int hf_pn_dcp_deviceinitiative_value = -1;
-
-static int hf_pn_dcp_suboption_all = -1;
-
-static int hf_pn_dcp_suboption_manuf = -1;
-
-static int hf_pn_dcp_vendor_id_high = -1;
-static int hf_pn_dcp_vendor_id_low = -1;
-static int hf_pn_dcp_device_id_high = -1;
-static int hf_pn_dcp_device_id_low = -1;
-static int hf_pn_dcp_instance_id_high = -1;
-static int hf_pn_dcp_instance_id_low = -1;
-static gint ett_pn_dcp = -1;
-static gint ett_pn_dcp_block = -1;
-
-static gint ett_pn_dcp_rsi_properties_value = -1;
-
-static expert_field ei_pn_dcp_block_parse_error = EI_INIT;
-static expert_field ei_pn_dcp_block_error_unknown = EI_INIT;
-static expert_field ei_pn_dcp_ip_conflict = EI_INIT;
+int proto_pn_dcp;
+
+static int hf_pn_dcp_service_id;
+static int hf_pn_dcp_service_type;
+static int hf_pn_dcp_xid;
+static int hf_pn_dcp_reserved8;
+static int hf_pn_dcp_reserved16;
+static int hf_pn_dcp_response_delay;
+static int hf_pn_dcp_data_length;
+static int hf_pn_dcp_block_length;
+
+static int hf_pn_dcp_block;
+
+static int hf_pn_dcp_block_error;
+
+static int hf_pn_dcp_option;
+static int hf_pn_dcp_block_info;
+static int hf_pn_dcp_block_qualifier;
+static int hf_pn_dcp_blockqualifier;
+static int hf_pn_dcp_blockqualifier_r2f;
+
+static int hf_pn_dcp_suboption_ip;
+static int hf_pn_dcp_suboption_ip_block_info;
+static int hf_pn_dcp_suboption_ip_ip;
+static int hf_pn_dcp_suboption_ip_subnetmask;
+static int hf_pn_dcp_suboption_ip_standard_gateway;
+static int hf_pn_dcp_suboption_ip_mac_address;
+
+static int hf_pn_dcp_suboption_device;
+static int hf_pn_dcp_suboption_device_typeofstation;
+static int hf_pn_dcp_suboption_device_nameofstation;
+static int hf_pn_dcp_suboption_vendor_id;
+static int hf_pn_dcp_suboption_device_id;
+static int hf_pn_dcp_suboption_device_role;
+static int hf_pn_dcp_suboption_device_aliasname;
+static int hf_pn_dcp_suboption_device_instance_high;
+static int hf_pn_dcp_suboption_device_instance_low;
+static int hf_pn_dcp_suboption_device_oem_ven_id;
+static int hf_pn_dcp_suboption_device_oem_dev_id;
+
+static int hf_pn_dcp_rsi_properties_value;
+static int hf_pn_dcp_rsi_properties_value_bit0;
+static int hf_pn_dcp_rsi_properties_value_bit1;
+static int hf_pn_dcp_rsi_properties_value_bit2;
+static int hf_pn_dcp_rsi_properties_value_bit3;
+static int hf_pn_dcp_rsi_properties_value_bit4;
+static int hf_pn_dcp_rsi_properties_value_bit5;
+static int hf_pn_dcp_rsi_properties_value_otherbits;
+
+static int hf_pn_dcp_suboption_tsn;
+static int hf_pn_dcp_suboption_tsn_domain_name;
+static int hf_pn_dcp_suboption_tsn_domain_uuid;
+static int hf_pn_dcp_suboption_tsn_nme_prio;
+static int hf_pn_dcp_suboption_tsn_nme_parameter_uuid;
+static int hf_pn_dcp_suboption_tsn_nme_agent;
+
+static int hf_pn_dcp_suboption_dhcp;
+static int hf_pn_dcp_suboption_dhcp_option_code;
+static int hf_pn_dcp_suboption_dhcp_parameter_length;
+static int hf_pn_dcp_suboption_dhcp_parameter_data;
+static int hf_pn_dcp_suboption_dhcp_arbitrary_client_id;
+static int hf_pn_dcp_suboption_dhcp_control_parameter_data;
+
+static int hf_pn_dcp_suboption_control;
+static int hf_pn_dcp_suboption_control_option;
+static int hf_pn_dcp_suboption_control_signal_value;
+
+static int hf_pn_dcp_suboption_deviceinitiative;
+static int hf_pn_dcp_deviceinitiative_value;
+
+static int hf_pn_dcp_suboption_all;
+
+static int hf_pn_dcp_suboption_manuf;
+
+static int hf_pn_dcp_vendor_id_high;
+static int hf_pn_dcp_vendor_id_low;
+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 int ett_pn_dcp;
+static int ett_pn_dcp_block;
+
+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;
+static expert_field ei_pn_dcp_ip_conflict;
#define PNDCP_SERVICE_ID_GET 0x03
#define PNDCP_SERVICE_ID_SET 0x04
@@ -405,10 +405,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 +462,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 +492,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 +571,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 +639,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 +673,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 +713,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 +770,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 +801,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 +874,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 +968,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 +1005,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 +1037,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 +1066,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 +1131,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 +1164,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 +1203,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 +1239,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 +1264,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 +1347,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 +1389,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 +1435,17 @@ dissect_PNDCP_Suboption_Control(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
-/* dissect the "deviceinitaitve" 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 +1483,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 +1509,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 +1531,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 +1601,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 +1648,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 +1669,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 +1685,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 +1698,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 +1712,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 +2054,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 9efafe72..e522de2e 100644
--- a/plugins/epan/profinet/packet-pn-mrp.c
+++ b/plugins/epan/profinet/packet-pn-mrp.c
@@ -23,34 +23,34 @@ void proto_reg_handoff_pn_mrp(void);
static dissector_handle_t mrp_handle;
-static int proto_pn_mrp = -1;
-
-static int hf_pn_mrp_type = -1;
-static int hf_pn_mrp_length = -1;
-static int hf_pn_mrp_version = -1;
-static int hf_pn_mrp_sequence_id = -1;
-static int hf_pn_mrp_sa = -1;
-static int hf_pn_mrp_prio = -1;
-static int hf_pn_mrp_port_role = -1;
-static int hf_pn_mrp_ring_state = -1;
-static int hf_pn_mrp_interval = -1;
-static int hf_pn_mrp_transition = -1;
-static int hf_pn_mrp_time_stamp = -1;
-static int hf_pn_mrp_blocked = -1;
-static int hf_pn_mrp_domain_uuid = -1;
-static int hf_pn_mrp_oui = -1;
-static int hf_pn_mrp_ed1type = -1;
-static int hf_pn_mrp_ed1_manufacturer_data = -1;
-static int hf_pn_mrp_sub_tlv_header_type = -1;
-static int hf_pn_mrp_sub_tlv_header_length = -1;
-static int hf_pn_mrp_sub_option2 = -1;
-static int hf_pn_mrp_other_mrm_prio = -1;
-static int hf_pn_mrp_other_mrm_sa = -1;
-static int hf_pn_mrp_manufacturer_data = -1;
-
-static gint ett_pn_mrp = -1;
-static gint ett_pn_mrp_type = -1;
-static gint ett_pn_sub_tlv = -1;
+static int proto_pn_mrp;
+
+static int hf_pn_mrp_type;
+static int hf_pn_mrp_length;
+static int hf_pn_mrp_version;
+static int hf_pn_mrp_sequence_id;
+static int hf_pn_mrp_sa;
+static int hf_pn_mrp_prio;
+static int hf_pn_mrp_port_role;
+static int hf_pn_mrp_ring_state;
+static int hf_pn_mrp_interval;
+static int hf_pn_mrp_transition;
+static int hf_pn_mrp_time_stamp;
+static int hf_pn_mrp_blocked;
+static int hf_pn_mrp_domain_uuid;
+static int hf_pn_mrp_oui;
+static int hf_pn_mrp_ed1type;
+static int hf_pn_mrp_ed1_manufacturer_data;
+static int hf_pn_mrp_sub_tlv_header_type;
+static int hf_pn_mrp_sub_tlv_header_length;
+static int hf_pn_mrp_sub_option2;
+static int hf_pn_mrp_other_mrm_prio;
+static int hf_pn_mrp_other_mrm_sa;
+static int hf_pn_mrp_manufacturer_data;
+
+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 5c332a5a..b4f2a85e 100644
--- a/plugins/epan/profinet/packet-pn-mrrt.c
+++ b/plugins/epan/profinet/packet-pn-mrrt.c
@@ -19,17 +19,17 @@
void proto_register_pn_mrrt(void);
void proto_reg_handoff_pn_mrrt(void);
-static int proto_pn_mrrt = -1;
+static int proto_pn_mrrt;
-static int hf_pn_mrrt_sequence_id = -1;
-static int hf_pn_mrrt_domain_uuid = -1;
-static int hf_pn_mrrt_type = -1;
-static int hf_pn_mrrt_length = -1;
-static int hf_pn_mrrt_version = -1;
-static int hf_pn_mrrt_sa = -1;
+static int hf_pn_mrrt_sequence_id;
+static int hf_pn_mrrt_domain_uuid;
+static int hf_pn_mrrt_type;
+static int hf_pn_mrrt_length;
+static int hf_pn_mrrt_version;
+static int hf_pn_mrrt_sa;
-static gint ett_pn_mrrt = -1;
+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 cd11896b..56aa8366 100644
--- a/plugins/epan/profinet/packet-pn-ptcp.c
+++ b/plugins/epan/profinet/packet-pn-ptcp.c
@@ -20,61 +20,58 @@
void proto_register_pn_ptcp(void);
void proto_reg_handoff_pn_ptcp(void);
-static int proto_pn_ptcp = -1;
+static int proto_pn_ptcp;
-static int hf_pn_ptcp_header = -1;
-static int hf_pn_ptcp_block = -1;
-static int hf_pn_ptcp_block_tlvheader = -1;
+static int hf_pn_ptcp_header;
+static int hf_pn_ptcp_block;
+static int hf_pn_ptcp_block_tlvheader;
-static int hf_pn_ptcp_res1 = -1;
-static int hf_pn_ptcp_res2 = -1;
-static int hf_pn_ptcp_delay10ns = -1;
-static int hf_pn_ptcp_seq_id = -1;
-static int hf_pn_ptcp_delay1ns_byte = -1;
-static int hf_pn_ptcp_delay1ns_fup = -1;
-static int hf_pn_ptcp_delay1ns = -1;
+static int hf_pn_ptcp_res1;
+static int hf_pn_ptcp_res2;
+static int hf_pn_ptcp_delay10ns;
+static int hf_pn_ptcp_seq_id;
+static int hf_pn_ptcp_delay1ns_byte;
+static int hf_pn_ptcp_delay1ns_fup;
+static int hf_pn_ptcp_delay1ns;
-static int hf_pn_ptcp_tl_length = -1;
-static int hf_pn_ptcp_tl_type = -1;
+static int hf_pn_ptcp_tl_length;
+static int hf_pn_ptcp_tl_type;
-static int hf_pn_ptcp_master_source_address = -1;
-static int hf_pn_ptcp_subdomain_uuid = -1;
+static int hf_pn_ptcp_master_source_address;
+static int hf_pn_ptcp_subdomain_uuid;
-static int hf_pn_ptcp_port_mac_address = -1;
+static int hf_pn_ptcp_port_mac_address;
-static int hf_pn_ptcp_t2portrxdelay = -1;
-static int hf_pn_ptcp_t3porttxdelay = -1;
+static int hf_pn_ptcp_t2portrxdelay;
+static int hf_pn_ptcp_t3porttxdelay;
-static int hf_pn_ptcp_t2timestamp = -1;
+static int hf_pn_ptcp_t2timestamp;
-static int hf_pn_ptcp_epoch_number = -1;
-static int hf_pn_ptcp_seconds = -1;
-static int hf_pn_ptcp_nanoseconds = -1;
+static int hf_pn_ptcp_epoch_number;
+static int hf_pn_ptcp_seconds;
+static int hf_pn_ptcp_nanoseconds;
-static int hf_pn_ptcp_flags = -1;
-static int hf_pn_ptcp_currentutcoffset = -1;
+static int hf_pn_ptcp_flags;
+static int hf_pn_ptcp_currentutcoffset;
-static int hf_pn_ptcp_master_priority1 = -1;
-static int hf_pn_ptcp_master_priority_level = -1;
-static int hf_pn_ptcp_master_priority1_res = -1;
-static int hf_pn_ptcp_master_priority1_act =-1;
+static int hf_pn_ptcp_master_priority1;
+static int hf_pn_ptcp_master_priority_level;
+static int hf_pn_ptcp_master_priority1_res;
+static int hf_pn_ptcp_master_priority1_act;
-static int hf_pn_ptcp_master_priority2 = -1;
-static int hf_pn_ptcp_clock_class = -1;
-static int hf_pn_ptcp_clock_accuracy = -1;
-static int hf_pn_ptcp_clockvariance = -1;
+static int hf_pn_ptcp_master_priority2;
+static int hf_pn_ptcp_clock_class;
+static int hf_pn_ptcp_clock_accuracy;
+static int hf_pn_ptcp_clockvariance;
-static int hf_pn_ptcp_oui = -1;
-static int hf_pn_ptcp_profinet_subtype = -1;
-static int hf_pn_ptcp_irdata_uuid = -1;
-
-static gint ett_pn_ptcp = -1;
-static gint ett_pn_ptcp_header = -1;
-static gint ett_pn_ptcp_block = -1;
-static gint ett_pn_ptcp_block_header = -1;
-
-#define OUI_PROFINET_MULTICAST 0x010ECF /* PROFIBUS Nutzerorganisation e.V. */
+static int hf_pn_ptcp_oui;
+static int hf_pn_ptcp_profinet_subtype;
+static int hf_pn_ptcp_irdata_uuid;
+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 94d61a8b..5456f456 100644
--- a/plugins/epan/profinet/packet-pn-rsi.c
+++ b/plugins/epan/profinet/packet-pn-rsi.c
@@ -46,60 +46,60 @@
void proto_register_pn_rsi(void);
void proto_reg_handoff_pn_rsi(void);
-static int proto_pn_rsi = -1;
-
-static int hf_pn_rsi_dst_srv_access_point = -1;
-static int hf_pn_rsi_src_srv_access_point = -1;
-
-static int hf_pn_rsi_pdu_type = -1;
-static int hf_pn_rsi_pdu_type_type = -1;
-static int hf_pn_rsi_pdu_type_version = -1;
-
-static int hf_pn_rsi_add_flags = -1;
-static int hf_pn_rsi_add_flags_windowsize = -1;
-static int hf_pn_rsi_add_flags_reserved1 = -1;
-static int hf_pn_rsi_add_flags_tack = -1;
-static int hf_pn_rsi_add_flags_morefrag = -1;
-static int hf_pn_rsi_add_flags_notification = -1;
-static int hf_pn_rsi_add_flags_reserved2 = -1;
-
-static int hf_pn_rsi_send_seq_num = -1;
-static int hf_pn_rsi_ack_seq_num = -1;
-static int hf_pn_rsi_var_part_len = -1;
-
-static int hf_pn_rsi_f_opnum_offset = -1;
-static int hf_pn_rsi_f_opnum_offset_offset = -1;
-static int hf_pn_rsi_f_opnum_offset_opnum = -1;
-static int hf_pn_rsi_f_opnum_offset_callsequence = -1;
-
-static int hf_pn_rsi_conn_block = -1;
-static int hf_pn_rsi_rsp_max_length = -1;
-static int hf_pn_rsi_vendor_id = -1;
-static int hf_pn_rsi_device_id = -1;
-static int hf_pn_rsi_instance_id = -1;
-static int hf_pn_rsi_interface = -1;
-
-static int hf_pn_rsi_svcs_block = -1;
-
-static int hf_pn_rsi_number_of_entries = -1;
-static int hf_pn_rsi_pd_rsi_instance = -1;
-static int hf_pn_rsi_device_type = -1;
-static int hf_pn_rsi_order_id = -1;
-static int hf_pn_rsi_im_serial_number = -1;
-static int hf_pn_rsi_hw_revision = -1;
-static int hf_pn_rsi_sw_revision_prefix = -1;
-static int hf_pn_rsi_sw_revision = -1;
-
-static gint ett_pn_rsi = -1;
-static gint ett_pn_rsi_pdu_type = -1;
-static gint ett_pn_rsi_f_opnum_offset = -1;
-static gint ett_pn_rsi_conn_block = -1;
-static gint ett_pn_rsi_svcs_block = -1;
-static gint ett_pn_rsi_add_flags = -1;
-static gint ett_pn_rsi_rta = -1;
-static gint ett_pn_io_pd_rsi_instance = -1;
-
-static expert_field ei_pn_rsi_error = EI_INIT;
+static int proto_pn_rsi;
+
+static int hf_pn_rsi_dst_srv_access_point;
+static int hf_pn_rsi_src_srv_access_point;
+
+static int hf_pn_rsi_pdu_type;
+static int hf_pn_rsi_pdu_type_type;
+static int hf_pn_rsi_pdu_type_version;
+
+static int hf_pn_rsi_add_flags;
+static int hf_pn_rsi_add_flags_windowsize;
+static int hf_pn_rsi_add_flags_reserved1;
+static int hf_pn_rsi_add_flags_tack;
+static int hf_pn_rsi_add_flags_morefrag;
+static int hf_pn_rsi_add_flags_notification;
+static int hf_pn_rsi_add_flags_reserved2;
+
+static int hf_pn_rsi_send_seq_num;
+static int hf_pn_rsi_ack_seq_num;
+static int hf_pn_rsi_var_part_len;
+
+static int hf_pn_rsi_f_opnum_offset;
+static int hf_pn_rsi_f_opnum_offset_offset;
+static int hf_pn_rsi_f_opnum_offset_opnum;
+static int hf_pn_rsi_f_opnum_offset_callsequence;
+
+static int hf_pn_rsi_conn_block;
+static int hf_pn_rsi_rsp_max_length;
+static int hf_pn_rsi_vendor_id;
+static int hf_pn_rsi_device_id;
+static int hf_pn_rsi_instance_id;
+static int hf_pn_rsi_interface;
+
+static int hf_pn_rsi_svcs_block;
+
+static int hf_pn_rsi_number_of_entries;
+static int hf_pn_rsi_pd_rsi_instance;
+static int hf_pn_rsi_device_type;
+static int hf_pn_rsi_order_id;
+static int hf_pn_rsi_im_serial_number;
+static int hf_pn_rsi_hw_revision;
+static int hf_pn_rsi_sw_revision_prefix;
+static int hf_pn_rsi_sw_revision;
+
+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;
static const range_string pn_rsi_alarm_endpoint[] = {
{ 0x0000, 0x7FFF, "RSI Initiator Instance (ISAP) or RSI Responder Instance (RSAP)" },
@@ -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;
@@ -239,19 +239,19 @@ dissect_FOpnumOffset(tvbuff_t *tvb, int offset,
return offset;
}
-static int hf_pn_rsi_data_payload = -1;
+static int hf_pn_rsi_data_payload;
-static int hf_pn_rsi_segments = -1;
-static int hf_pn_rsi_segment = -1;
-//static int hf_pn_rsi_data = -1;
-static int hf_pn_rsi_segment_overlap = -1;
-static int hf_pn_rsi_segment_overlap_conflict = -1;
-static int hf_pn_rsi_segment_multiple_tails = -1;
-static int hf_pn_rsi_segment_too_long_segment = -1;
-static int hf_pn_rsi_segment_error = -1;
-static int hf_pn_rsi_segment_count = -1;
-static int hf_pn_rsi_reassembled_in = -1;
-static int hf_pn_rsi_reassembled_length = -1;
+static int hf_pn_rsi_segments;
+static int hf_pn_rsi_segment;
+//static int hf_pn_rsi_data;
+static int hf_pn_rsi_segment_overlap;
+static int hf_pn_rsi_segment_overlap_conflict;
+static int hf_pn_rsi_segment_multiple_tails;
+static int hf_pn_rsi_segment_too_long_segment;
+static int hf_pn_rsi_segment_error;
+static int hf_pn_rsi_segment_count;
+static int hf_pn_rsi_reassembled_in;
+static int hf_pn_rsi_reassembled_length;
static reassembly_table pn_rsi_reassembly_table;
@@ -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 = -1;
-static gint ett_pn_rsi_segment = -1;
-//static gint ett_pn_rsi_data = -1;
-static gint ett_pn_rsi_data_payload = -1;
+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 */
@@ -348,7 +348,7 @@ dissect_pn_rta_remaining_user_data_bytes(tvbuff_t *tvb, int offset, packet_info
/* reassembling completed? */
if (fd_reass != NULL) {
- /* is this the packet to show the reassembed payload in? */
+ /* is this the packet to show the reassembled payload in? */
if (pinfo->fd->num == fd_reass->reassembled_in) {
next_tvb = process_reassembled_data(tvb, 0, pinfo,
"Reassembled PN IO RSI packet", fd_reass, &pn_rsi_frag_items, &update_col_info, tree);
@@ -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 581ff013..90acae3d 100644
--- a/plugins/epan/profinet/packet-pn-rt.c
+++ b/plugins/epan/profinet/packet-pn-rt.c
@@ -30,66 +30,66 @@ void proto_reg_handoff_pn_rt(void);
#define PROFINET_UDP_PORT 0x8892
/* Define the pn-rt proto */
-static int proto_pn_rt = -1;
-static gboolean pnio_desegment = TRUE;
+static int proto_pn_rt;
+static bool pnio_desegment = true;
static dissector_handle_t pn_rt_handle;
/* Define many header fields for pn-rt */
-static int hf_pn_rt_frame_id = -1;
-static int hf_pn_rt_cycle_counter = -1;
-static int hf_pn_rt_transfer_status = -1;
-static int hf_pn_rt_data_status = -1;
-static int hf_pn_rt_data_status_ignore = -1;
-static int hf_pn_rt_frame_info_type = -1;
-static int hf_pn_rt_frame_info_function_meaning_input_conv = -1;
-static int hf_pn_rt_frame_info_function_meaning_output_conv = -1;
-static int hf_pn_rt_data_status_Reserved_2 = -1;
-static int hf_pn_rt_data_status_ok = -1;
-static int hf_pn_rt_data_status_operate = -1;
-static int hf_pn_rt_data_status_res3 = -1;
-static int hf_pn_rt_data_status_valid = -1;
-static int hf_pn_rt_data_status_redundancy = -1;
-static int hf_pn_rt_data_status_redundancy_output_cr = -1;
-static int hf_pn_rt_data_status_redundancy_input_cr_state_is_backup = -1;
-static int hf_pn_rt_data_status_redundancy_input_cr_state_is_primary = -1;
-static int hf_pn_rt_data_status_primary = -1;
-
-static int hf_pn_rt_sf_crc16 = -1;
-static int hf_pn_rt_sf_crc16_status = -1;
-static int hf_pn_rt_sf = -1;
-static int hf_pn_rt_sf_position = -1;
-/* static int hf_pn_rt_sf_position_control = -1; */
-static int hf_pn_rt_sf_data_length = -1;
-static int hf_pn_rt_sf_cycle_counter = -1;
-
-static int hf_pn_rt_frag = -1;
-static int hf_pn_rt_frag_data_length = -1;
-static int hf_pn_rt_frag_status = -1;
-static int hf_pn_rt_frag_status_more_follows = -1;
-static int hf_pn_rt_frag_status_error = -1;
-static int hf_pn_rt_frag_status_fragment_number = -1;
-static int hf_pn_rt_frag_data = -1;
+static int hf_pn_rt_frame_id;
+static int hf_pn_rt_cycle_counter;
+static int hf_pn_rt_transfer_status;
+static int hf_pn_rt_data_status;
+static int hf_pn_rt_data_status_ignore;
+static int hf_pn_rt_frame_info_type;
+static int hf_pn_rt_frame_info_function_meaning_input_conv;
+static int hf_pn_rt_frame_info_function_meaning_output_conv;
+static int hf_pn_rt_data_status_Reserved_2;
+static int hf_pn_rt_data_status_ok;
+static int hf_pn_rt_data_status_operate;
+static int hf_pn_rt_data_status_res3;
+static int hf_pn_rt_data_status_valid;
+static int hf_pn_rt_data_status_redundancy;
+static int hf_pn_rt_data_status_redundancy_output_cr;
+static int hf_pn_rt_data_status_redundancy_input_cr_state_is_backup;
+static int hf_pn_rt_data_status_redundancy_input_cr_state_is_primary;
+static int hf_pn_rt_data_status_primary;
+
+static int hf_pn_rt_sf_crc16;
+static int hf_pn_rt_sf_crc16_status;
+static int hf_pn_rt_sf;
+static int hf_pn_rt_sf_position;
+/* static int hf_pn_rt_sf_position_control; */
+static int hf_pn_rt_sf_data_length;
+static int hf_pn_rt_sf_cycle_counter;
+
+static int hf_pn_rt_frag;
+static int hf_pn_rt_frag_data_length;
+static int hf_pn_rt_frag_status;
+static int hf_pn_rt_frag_status_more_follows;
+static int hf_pn_rt_frag_status_error;
+static int hf_pn_rt_frag_status_fragment_number;
+static int hf_pn_rt_frag_data;
/*
* Define the trees for pn-rt
* We need one tree for pn-rt itself and one for the pn-rt data status subtree
*/
-static int ett_pn_rt = -1;
-static int ett_pn_rt_data_status = -1;
-static int ett_pn_rt_sf = -1;
-static int ett_pn_rt_frag = -1;
-static int ett_pn_rt_frag_status = -1;
+static int ett_pn_rt;
+static int ett_pn_rt_data_status;
+static int ett_pn_rt_sf;
+static int ett_pn_rt_frag;
+static int ett_pn_rt_frag_status;
-static expert_field ei_pn_rt_sf_crc16 = EI_INIT;
+static expert_field ei_pn_rt_sf_crc16;
/*
* Here are the global variables associated with
* 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 +154,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);
@@ -177,14 +177,14 @@ dissect_DataStatus(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pin
apdu_status_switch = (apduStatusSwitch*)conversation_get_proto_data(conversation, proto_pn_io_apdu_status);
if (apdu_status_switch != NULL && apdu_status_switch->isRedundancyActive) {
/* IOC -> IOD: OutputCR */
- if (addresses_equal(&(pinfo->src), conversation_key_addr1(conversation->key_ptr)) && addresses_equal(&(pinfo->dst), conversation_key_addr2(conversation->key_ptr))) {
- outputFlag = TRUE;
- inputFlag = FALSE;
+ 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;
}
/* IOD -> IOC: InputCR */
- if (addresses_equal(&(pinfo->dst), conversation_key_addr1(conversation->key_ptr)) && addresses_equal(&(pinfo->src), conversation_key_addr2(conversation->key_ptr))) {
- inputFlag = TRUE;
- outputFlag = FALSE;
+ 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;
}
}
}
@@ -268,24 +268,24 @@ 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 temporaray buffer for generating this CRC */
+ /* try to build a temporary buffer for generating this CRC */
if (!pinfo->src.data || !pinfo->dst.data ||
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 +302,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 +310,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 +330,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 +345,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 +389,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 +403,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 +435,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,42 +443,42 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
"PROFINET IO Cyclic Service Data Unit");
}
- return FALSE;
+ return false;
}
-/* for reasemble processing we need some inits.. */
+/* for reassemble processing we need some inits.. */
/* Register PNIO defrag table init routine. */
static reassembly_table pdu_reassembly_table;
-static GHashTable *reasembled_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;
- reasembled_frag_table = g_hash_table_new(NULL, NULL);
+ reassembled_frag_table = g_hash_table_new(NULL, NULL);
}
static void
pnio_defragment_cleanup(void)
{
- g_hash_table_destroy(reasembled_frag_table);
+ g_hash_table_destroy(reassembled_frag_table);
}
/* 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 +488,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 +520,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;
@@ -547,15 +547,15 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
if (pdu_frag && !bMoreFollows) /* PDU is complete! and last fragment */
{ /* store this fragment as the completed fragment in hash table */
- g_hash_table_insert(reasembled_frag_table, GUINT_TO_POINTER(pinfo->num), pdu_frag);
+ g_hash_table_insert(reassembled_frag_table, GUINT_TO_POINTER(pinfo->num), pdu_frag);
start_frag_OR_ID[u32FragID] = 0; /* reset the starting frame counter */
}
if (!bMoreFollows) /* last fragment */
{
- pdu_frag = (fragment_head *)g_hash_table_lookup(reasembled_frag_table, GUINT_TO_POINTER(pinfo->num));
+ 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 +569,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 +584,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 +655,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 +749,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 +764,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 +783,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 +825,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 +950,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 +1127,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,
@@ -1166,7 +1166,7 @@ proto_register_pn_rt(void)
&pnio_desegment);
/* register heuristics anchor for payload dissectors */
- heur_subdissector_list = register_heur_dissector_list("pn_rt", proto_pn_rt);
+ heur_subdissector_list = register_heur_dissector_list_with_description("pn_rt", "PROFINET RT payload", proto_pn_rt);
init_pn (proto_pn_rt);
register_init_routine(pnio_defragment_init);
diff --git a/plugins/epan/profinet/packet-pn-rtc-one.c b/plugins/epan/profinet/packet-pn-rtc-one.c
index 383909a2..6bed963d 100644
--- a/plugins/epan/profinet/packet-pn-rtc-one.c
+++ b/plugins/epan/profinet/packet-pn-rtc-one.c
@@ -71,76 +71,76 @@
#define PA_PROFILE_API 0x9700u
-static int proto_pn_io_rtc1 = -1;
+static int proto_pn_io_rtc1;
/* General module information */
-static int hf_pn_io_frame_info_type = -1;
-static int hf_pn_io_frame_info_vendor = -1;
-static int hf_pn_io_frame_info_nameofstation = -1;
-static int hf_pn_io_frame_info_gsd_found = -1;
-static int hf_pn_io_frame_info_gsd_error = -1;
-static int hf_pn_io_frame_info_gsd_path = -1;
-static int hf_pn_io_io_data_object = -1;
-static int hf_pn_io_io_data_object_info_module_diff = -1;
-static int hf_pn_io_io_data_object_info_moduleidentnumber = -1;
-static int hf_pn_io_io_data_object_info_submoduleidentnumber = -1;
-
-static int hf_pn_io_iocs = -1;
-static int hf_pn_io_iops = -1;
-static int hf_pn_io_ioxs_extension = -1;
-static int hf_pn_io_ioxs_res14 = -1;
-static int hf_pn_io_ioxs_instance = -1;
-static int hf_pn_io_ioxs_datastate = -1;
+static int hf_pn_io_frame_info_type;
+static int hf_pn_io_frame_info_vendor;
+static int hf_pn_io_frame_info_nameofstation;
+static int hf_pn_io_frame_info_gsd_found;
+static int hf_pn_io_frame_info_gsd_error;
+static int hf_pn_io_frame_info_gsd_path;
+static int hf_pn_io_io_data_object;
+static int hf_pn_io_io_data_object_info_module_diff;
+static int hf_pn_io_io_data_object_info_moduleidentnumber;
+static int hf_pn_io_io_data_object_info_submoduleidentnumber;
+
+static int hf_pn_io_iocs;
+static int hf_pn_io_iops;
+static int hf_pn_io_ioxs_extension;
+static int hf_pn_io_ioxs_res14;
+static int hf_pn_io_ioxs_instance;
+static int hf_pn_io_ioxs_datastate;
/* PROFIsafe statusbyte and controlbyte */
-static int hf_pn_io_ps_sb = -1;
-static int hf_pn_io_ps_sb_iparOK = -1;
-static int hf_pn_io_ps_sb_DeviceFault = -1;
-static int hf_pn_io_ps_sb_CECRC = -1;
-static int hf_pn_io_ps_sb_WDtimeout = -1;
-static int hf_pn_io_ps_sb_FVactivated = -1;
-static int hf_pn_io_ps_sb_Toggle_d = -1;
-static int hf_pn_io_ps_sb_ConsNr_reset = -1;
-static int hf_pn_io_ps_sb_res = -1;
-static int hf_pn_io_ps_sb_toggelBitChanged = -1;
-static int hf_pn_io_ps_sb_toggelBitChange_slot_nr = -1;
-static int hf_pn_io_ps_sb_toggelBitChange_subslot_nr = -1;
-
-static int hf_pn_io_ps_cb = -1;
-static int hf_pn_io_ps_cb_iparEN = -1;
-static int hf_pn_io_ps_cb_OAReq = -1;
-static int hf_pn_io_ps_cb_resetConsNr = -1;
-static int hf_pn_io_ps_cb_useTO2 = -1;
-static int hf_pn_io_ps_cb_activateFV = -1;
-static int hf_pn_io_ps_cb_Toggle_h = -1;
-static int hf_pn_io_ps_cb_Chf_ACK = -1;
-static int hf_pn_io_ps_cb_loopcheck = -1;
-static int hf_pn_io_ps_cb_toggelBitChanged = -1;
-static int hf_pn_io_ps_cb_toggelBitChange_slot_nr = -1;
-static int hf_pn_io_ps_cb_toggelBitChange_subslot_nr = -1;
+static int hf_pn_io_ps_sb;
+static int hf_pn_io_ps_sb_iparOK;
+static int hf_pn_io_ps_sb_DeviceFault;
+static int hf_pn_io_ps_sb_CECRC;
+static int hf_pn_io_ps_sb_WDtimeout;
+static int hf_pn_io_ps_sb_FVactivated;
+static int hf_pn_io_ps_sb_Toggle_d;
+static int hf_pn_io_ps_sb_ConsNr_reset;
+static int hf_pn_io_ps_sb_res;
+static int hf_pn_io_ps_sb_toggelBitChanged;
+static int hf_pn_io_ps_sb_toggelBitChange_slot_nr;
+static int hf_pn_io_ps_sb_toggelBitChange_subslot_nr;
+
+static int hf_pn_io_ps_cb;
+static int hf_pn_io_ps_cb_iparEN;
+static int hf_pn_io_ps_cb_OAReq;
+static int hf_pn_io_ps_cb_resetConsNr;
+static int hf_pn_io_ps_cb_useTO2;
+static int hf_pn_io_ps_cb_activateFV;
+static int hf_pn_io_ps_cb_Toggle_h;
+static int hf_pn_io_ps_cb_Chf_ACK;
+static int hf_pn_io_ps_cb_loopcheck;
+static int hf_pn_io_ps_cb_toggelBitChanged;
+static int hf_pn_io_ps_cb_toggelBitChange_slot_nr;
+static int hf_pn_io_ps_cb_toggelBitChange_subslot_nr;
/* PROFIsafe */
-static int hf_pn_io_ps_f_dest_adr = -1;
-static int hf_pn_io_ps_f_data = -1;
+static int hf_pn_io_ps_f_dest_adr;
+static int hf_pn_io_ps_f_data;
/* PA Profile 4.02 */
-static int hf_pn_pa_profile_status = -1;
-static int hf_pn_pa_profile_status_quality = -1;
-static int hf_pn_pa_profile_status_substatus_bad = -1;
-static int hf_pn_pa_profile_status_substatus_uncertain = -1;
-static int hf_pn_pa_profile_status_substatus_good = -1;
-static int hf_pn_pa_profile_status_update_event = -1;
-static int hf_pn_pa_profile_status_simulate = -1;
-static int hf_pn_pa_profile_value_8bit = -1;
-static int hf_pn_pa_profile_value_16bit = -1;
-static int hf_pn_pa_profile_value_float = -1;
-
-static gint ett_pn_io_rtc = -1;
-static gint ett_pn_io_ioxs = -1;
-static gint ett_pn_io_io_data_object = -1;
-static gint ett_pn_pa_profile_status = -1;
-
-static expert_field ei_pn_io_too_many_data_objects = EI_INIT;
+static int hf_pn_pa_profile_status;
+static int hf_pn_pa_profile_status_quality;
+static int hf_pn_pa_profile_status_substatus_bad;
+static int hf_pn_pa_profile_status_substatus_uncertain;
+static int hf_pn_pa_profile_status_substatus_good;
+static int hf_pn_pa_profile_status_update_event;
+static int hf_pn_pa_profile_status_simulate;
+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 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;
static const value_string pn_io_ioxs_extension[] = {
{ 0x00 /* 0*/, "No IOxS octet follows" },
@@ -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 comparation 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" */
+ /* Count & offset for comparison of the arrays */
+ 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 9bdbc3cc..e841df25 100644
--- a/plugins/epan/profinet/packet-pn.c
+++ b/plugins/epan/profinet/packet-pn.c
@@ -20,59 +20,59 @@
#include "packet-pn.h"
-static int hf_pn_padding = -1;
-static int hf_pn_undecoded_data = -1;
-static int hf_pn_user_data = -1;
-static int hf_pn_user_bytes = -1;
-static int hf_pn_frag_bytes = -1;
-static int hf_pn_malformed = -1;
-
-static int hf_pn_io_status = -1;
-
-static int hf_pn_io_error_code = -1;
-static int hf_pn_io_error_decode = -1;
-static int hf_pn_io_error_code1 = -1;
-static int hf_pn_io_error_code1_pniorw = -1;
-static int hf_pn_io_error_code1_pnio = -1;
-static int hf_pn_io_error_code2 = -1;
-static int hf_pn_io_error_code2_pniorw = -1;
-static int hf_pn_io_error_code2_pnio_1 = -1;
-static int hf_pn_io_error_code2_pnio_2 = -1;
-static int hf_pn_io_error_code2_pnio_3 = -1;
-static int hf_pn_io_error_code2_pnio_4 = -1;
-static int hf_pn_io_error_code2_pnio_5 = -1;
-static int hf_pn_io_error_code2_pnio_6 = -1;
-static int hf_pn_io_error_code2_pnio_7 = -1;
-static int hf_pn_io_error_code2_pnio_8 = -1;
-static int hf_pn_io_error_code2_pnio_13 = -1;
-static int hf_pn_io_error_code2_pnio_20 = -1;
-static int hf_pn_io_error_code2_pnio_21 = -1;
-static int hf_pn_io_error_code2_pnio_22 = -1;
-static int hf_pn_io_error_code2_pnio_23 = -1;
-static int hf_pn_io_error_code2_pnio_40 = -1;
-static int hf_pn_io_error_code2_pnio_60 = -1;
-static int hf_pn_io_error_code2_pnio_61 = -1;
-static int hf_pn_io_error_code2_pnio_62 = -1;
-static int hf_pn_io_error_code2_pnio_63 = -1;
-static int hf_pn_io_error_code2_pnio_64 = -1;
-static int hf_pn_io_error_code2_pnio_65 = -1;
-static int hf_pn_io_error_code2_pnio_66 = -1;
-static int hf_pn_io_error_code2_pnio_70 = -1;
-static int hf_pn_io_error_code2_pnio_71 = -1;
-static int hf_pn_io_error_code2_pnio_72 = -1;
-static int hf_pn_io_error_code2_pnio_73 = -1;
-static int hf_pn_io_error_code2_pnio_74 = -1;
-static int hf_pn_io_error_code2_pnio_75 = -1;
-static int hf_pn_io_error_code2_pnio_76 = -1;
-static int hf_pn_io_error_code2_pnio_77 = -1;
-static int hf_pn_io_error_code2_pnio_253 = -1;
-static int hf_pn_io_error_code2_pnio_255 = -1;
-
-static gint ett_pn_io_status = -1;
-
-static expert_field ei_pn_undecoded_data = EI_INIT;
-static expert_field ei_pn_io_error_code1 = EI_INIT;
-static expert_field ei_pn_io_error_code2 = EI_INIT;
+static int hf_pn_padding;
+static int hf_pn_undecoded_data;
+static int hf_pn_user_data;
+static int hf_pn_user_bytes;
+static int hf_pn_frag_bytes;
+static int hf_pn_malformed;
+
+static int hf_pn_io_status;
+
+static int hf_pn_io_error_code;
+static int hf_pn_io_error_decode;
+static int hf_pn_io_error_code1;
+static int hf_pn_io_error_code1_pniorw;
+static int hf_pn_io_error_code1_pnio;
+static int hf_pn_io_error_code2;
+static int hf_pn_io_error_code2_pniorw;
+static int hf_pn_io_error_code2_pnio_1;
+static int hf_pn_io_error_code2_pnio_2;
+static int hf_pn_io_error_code2_pnio_3;
+static int hf_pn_io_error_code2_pnio_4;
+static int hf_pn_io_error_code2_pnio_5;
+static int hf_pn_io_error_code2_pnio_6;
+static int hf_pn_io_error_code2_pnio_7;
+static int hf_pn_io_error_code2_pnio_8;
+static int hf_pn_io_error_code2_pnio_13;
+static int hf_pn_io_error_code2_pnio_20;
+static int hf_pn_io_error_code2_pnio_21;
+static int hf_pn_io_error_code2_pnio_22;
+static int hf_pn_io_error_code2_pnio_23;
+static int hf_pn_io_error_code2_pnio_40;
+static int hf_pn_io_error_code2_pnio_60;
+static int hf_pn_io_error_code2_pnio_61;
+static int hf_pn_io_error_code2_pnio_62;
+static int hf_pn_io_error_code2_pnio_63;
+static int hf_pn_io_error_code2_pnio_64;
+static int hf_pn_io_error_code2_pnio_65;
+static int hf_pn_io_error_code2_pnio_66;
+static int hf_pn_io_error_code2_pnio_70;
+static int hf_pn_io_error_code2_pnio_71;
+static int hf_pn_io_error_code2_pnio_72;
+static int hf_pn_io_error_code2_pnio_73;
+static int hf_pn_io_error_code2_pnio_74;
+static int hf_pn_io_error_code2_pnio_75;
+static int hf_pn_io_error_code2_pnio_76;
+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 int ett_pn_io_status;
+
+static expert_field ei_pn_undecoded_data;
+static expert_field ei_pn_io_error_code1;
+static expert_field ei_pn_io_error_code2;
static const value_string pn_io_error_code[] = {
{ 0x00, "OK" },
@@ -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 f2c0743d..c0370cda 100644
--- a/plugins/epan/profinet/packet-pn.h
+++ b/plugins/epan/profinet/packet-pn.h
@@ -13,7 +13,7 @@
*
* Added new structures to packet-pn.h to transfer the gained data of
* packet-pn-dcp.c and packet-dcerpc-pn-io.c to packet-pn-rtc-one.c for
- * detailled dissection of cyclic PNIO RTC1 dataframes.
+ * detailed dissection of cyclic PNIO RTC1 dataframes.
*
*/
@@ -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/pinfo_stats_tree.c b/plugins/epan/stats_tree/pinfo_stats_tree.c
index fd2a97d8..68d7322b 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/All Addresses";
-static const gchar *st_str_ipv6 = "IPv6 Statistics/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/Source and Destination Addresses";
-static const gchar *st_str_ipv6_srcdst = "IPv6 Statistics/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/IP Protocol Types";
-static const gchar *st_str_ipv6_ptype = "IPv6 Statistics/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/Destinations and Ports";
-static const gchar *st_str_ipv6_dsts = "IPv6 Statistics/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/Source TTLs";
-static const gchar* st_str_ipv6_src_ttls = "IPv6 Statistics/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);
@@ -334,14 +335,15 @@ void register_tap_listener_pinfo_stat_tree(void)
stats_tree_register_plugin("ipv6", "ipv6_hop", st_str_ipv6_src_ttls, 0, ipv6_src_ttl_stats_tree_packet, ipv6_src_ttl_stats_tree_init, NULL);
- stats_tree_register_with_group("frame", "plen", st_str_plen, 0, plen_stats_tree_packet, plen_stats_tree_init, NULL, REGISTER_STAT_GROUP_GENERIC);
+ stats_tree_cfg *st_config = stats_tree_register("frame", "plen", st_str_plen, 0, plen_stats_tree_packet, plen_stats_tree_init, NULL);
+ stats_tree_set_group(st_config, REGISTER_STAT_GROUP_GENERIC);
stat_module = prefs_register_stat("stat_tree", "Stats Tree", "Stats Tree", NULL);
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/decoders.c b/plugins/epan/transum/decoders.c
index c430f588..a67db053 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 80475ae3..92c3a144 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 d56134a6..c5bb5f18 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 1022423a..496e5f56 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,27 +130,27 @@ static int highest_udp_stream_no;
wmem_map_t *tcp_stream_exceptions;
-static gint ett_transum = -1;
-static gint ett_transum_header = -1;
-static gint ett_transum_data = -1;
-
-static int proto_transum = -1;
-
-static int hf_tsum_status = -1;
-//static int hf_tsum_time_units = -1;
-static int hf_tsum_req_first_seg = -1;
-static int hf_tsum_req_last_seg = -1;
-static int hf_tsum_rsp_first_seg = -1;
-static int hf_tsum_rsp_last_seg = -1;
-static int hf_tsum_apdu_rsp_time = -1;
-static int hf_tsum_service_time = -1;
-static int hf_tsum_req_spread = -1;
-static int hf_tsum_rsp_spread = -1;
-static int hf_tsum_clip_filter = -1;
-static int hf_tsum_calculation = -1;
-static int hf_tsum_summary = -1;
-static int hf_tsum_req_search = -1;
-static int hf_tsum_rsp_search = -1;
+static int ett_transum;
+static int ett_transum_header;
+static int ett_transum_data;
+
+static int proto_transum;
+
+static int hf_tsum_status;
+//static int hf_tsum_time_units;
+static int hf_tsum_req_first_seg;
+static int hf_tsum_req_last_seg;
+static int hf_tsum_rsp_first_seg;
+static int hf_tsum_rsp_last_seg;
+static int hf_tsum_apdu_rsp_time;
+static int hf_tsum_service_time;
+static int hf_tsum_req_spread;
+static int hf_tsum_rsp_spread;
+static int hf_tsum_clip_filter;
+static int hf_tsum_calculation;
+static int hf_tsum_summary;
+static int hf_tsum_req_search;
+static int hf_tsum_rsp_search;
static const enum_val_t capture_position_vals[] = {
{ "TRACE_CAP_CLIENT", "Client", TRACE_CAP_CLIENT },
@@ -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 c8915e14..d21b02fa 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 96eea06a..240565e1 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/audio.h b/plugins/epan/unistim/audio.h
index bc062cd4..743b4ac7 100644
--- a/plugins/epan/unistim/audio.h
+++ b/plugins/epan/unistim/audio.h
@@ -13,119 +13,119 @@
#ifndef UNISTIM_AUDIO_H
#define UNISTIM_AUDIO_H
-static int hf_audio_mgr_attr=-1;
-static int hf_audio_mgr_opts=-1;
-static int hf_audio_mgr_alert=-1;
-static int hf_audio_mgr_adj_rx_vol=-1;
-static int hf_audio_mgr_def_rx_vol=-1;
-static int hf_audio_mgr_handset=-1;
-static int hf_audio_mgr_headset=-1;
-static int hf_audio_default_rx_vol_id=-1;
-
-static int hf_audio_mgr_opt_max_vol=-1;
-static int hf_audio_mgr_opt_adj_vol=-1;
-static int hf_audio_mgr_opt_aa_rx_vol_rpt=-1;
-static int hf_audio_mgr_opt_hs_on_air=-1;
-static int hf_audio_mgr_opt_hd_on_air=-1;
-static int hf_audio_mgr_opt_noise_squelch=-1;
-
-static int hf_audio_mgr_mute=-1;
-static int hf_audio_mgr_tx_rx=-1;
-static int hf_audio_mgr_stream_id=-1;
-
-static int hf_audio_mgr_transducer_based_tone_id=-1;
-static int hf_audio_mgr_attenuated=-1;
-static int hf_audio_mgr_warbler_select=-1;
-static int hf_audio_mgr_transducer_routing=-1;
-static int hf_audio_mgr_tone_vol_range=-1;
-static int hf_audio_mgr_cadence_select=-1;
-static int hf_audio_special_tone=-1;
-static int hf_audio_tone_level=-1;
-static int hf_audio_visual_tones=-1;
-
-static int hf_audio_stream_based_tone_id=-1;
-static int hf_audio_stream_based_tone_rx_tx=-1;
-static int hf_audio_stream_based_tone_mute=-1;
-static int hf_audio_stream_id=-1;
-static int hf_audio_stream_based_volume=-1;
-
-static int hf_audio_apb_number=-1;
-static int hf_audio_apb_op_code=-1;
-static int hf_audio_apb_param_len=-1;
-static int hf_audio_apb_data=-1;
-static int hf_audio_vocoder_id=-1;
-static int hf_audio_vocoder_param=-1;
-static int hf_audio_vocoder_entity=-1;
-static int hf_audio_vocoder_annexa=-1;
-static int hf_audio_vocoder_annexb=-1;
-static int hf_audio_sample_rate=-1;
-static int hf_audio_rtp_type=-1;
-static int hf_audio_bytes_per_frame=-1;
-
-static int hf_audio_rx_stream_id=-1;
-static int hf_audio_tx_stream_id=-1;
-static int hf_rx_vocoder_type=-1;
-static int hf_tx_vocoder_type=-1;
-static int hf_frames_per_packet=-1;
-static int hf_audio_tos=-1;
-static int hf_audio_precedence=-1;
-static int hf_audio_frf_11=-1;
-static int hf_rtcp_bucket_id=-1;
-static int hf_audio_lcl_rtp_port=-1;
-static int hf_audio_lcl_rtcp_port=-1;
-static int hf_audio_far_rtp_port=-1;
-static int hf_audio_far_rtcp_port=-1;
-static int hf_audio_far_ip_add=-1;
-static int hf_audio_rtcp_bucket_id=-1;
-static int hf_audio_clear_bucket=-1;
-
-static int hf_audio_transducer_pair=-1;
-static int hf_audio_rx_enable=-1;
-static int hf_audio_tx_enable=-1;
-static int hf_audio_sidetone_disable=-1;
-static int hf_audio_destruct_additive=-1;
-static int hf_audio_dont_force_active=-1;
-static int hf_audio_source_descr=-1;
-static int hf_audio_sdes_rtcp_bucket=-1;
-static int hf_audio_desired_jitter=-1;
-static int hf_audio_high_water_mark=-1;
-static int hf_audio_early_packet_resync_thresh=-1;
-static int hf_audio_late_packet_resync_thresh=-1;
-static int hf_audio_resolve_phone_port=-1;
-static int hf_audio_far_end_echo_port=-1;
-static int hf_audio_far_end_ip_address=-1;
-static int hf_audio_nat_port=-1;
-static int hf_audio_nat_ip_address=-1;
-static int hf_audio_direction_code=-1;
-static int hf_audio_hf_support=-1;
-static int hf_audio_opt_rpt_max=-1;
-static int hf_audio_opt_rpt_adj_vol=-1;
-static int hf_audio_opt_rpt_auto_adj_vol=-1;
-static int hf_audio_opt_rpt_hs_on_air=-1;
-static int hf_audio_opt_rpt_hd_on_air=-1;
-static int hf_audio_opt_rpt_noise_squelch=-1;
-static int hf_audio_rx_vol_apb_rpt=-1;
-static int hf_audio_rx_vol_vol_up=-1;
-static int hf_audio_rx_vol_vol_floor=-1;
-static int hf_audio_rx_vol_vol_ceiling=-1;
-static int hf_audio_current_adj_vol_id=-1;
-static int hf_audio_current_rx_level=-1;
-static int hf_audio_current_rx_range=-1;
-static int hf_audio_cadence_select=-1;
-static int hf_audio_warbler_select=-1;
-static int hf_audio_open_stream_rpt=-1;
-static int hf_audio_sdes_rpt_source_desc=-1;
-static int hf_audio_sdes_rpt_buk_id=-1;
-static int hf_audio_phone_port=-1;
-static int hf_audio_phone_ip=-1;
-
-static int hf_audio_phone_add_len=-1;
-static int hf_audio_nat_listen_port=-1;
-static int hf_audio_nat_ip=-1;
-static int hf_audio_nat_add_len=-1;
-static int hf_audio_stream_direction_code=-1;
-static int hf_audio_stream_state=-1;
-static int hf_audio_transducer_list_length=-1;
+static int hf_audio_mgr_attr;
+static int hf_audio_mgr_opts;
+static int hf_audio_mgr_alert;
+static int hf_audio_mgr_adj_rx_vol;
+static int hf_audio_mgr_def_rx_vol;
+static int hf_audio_mgr_handset;
+static int hf_audio_mgr_headset;
+static int hf_audio_default_rx_vol_id;
+
+static int hf_audio_mgr_opt_max_vol;
+static int hf_audio_mgr_opt_adj_vol;
+static int hf_audio_mgr_opt_aa_rx_vol_rpt;
+static int hf_audio_mgr_opt_hs_on_air;
+static int hf_audio_mgr_opt_hd_on_air;
+static int hf_audio_mgr_opt_noise_squelch;
+
+static int hf_audio_mgr_mute;
+static int hf_audio_mgr_tx_rx;
+static int hf_audio_mgr_stream_id;
+
+static int hf_audio_mgr_transducer_based_tone_id;
+static int hf_audio_mgr_attenuated;
+static int hf_audio_mgr_warbler_select;
+static int hf_audio_mgr_transducer_routing;
+static int hf_audio_mgr_tone_vol_range;
+static int hf_audio_mgr_cadence_select;
+static int hf_audio_special_tone;
+static int hf_audio_tone_level;
+static int hf_audio_visual_tones;
+
+static int hf_audio_stream_based_tone_id;
+static int hf_audio_stream_based_tone_rx_tx;
+static int hf_audio_stream_based_tone_mute;
+static int hf_audio_stream_id;
+static int hf_audio_stream_based_volume;
+
+static int hf_audio_apb_number;
+static int hf_audio_apb_op_code;
+static int hf_audio_apb_param_len;
+static int hf_audio_apb_data;
+static int hf_audio_vocoder_id;
+static int hf_audio_vocoder_param;
+static int hf_audio_vocoder_entity;
+static int hf_audio_vocoder_annexa;
+static int hf_audio_vocoder_annexb;
+static int hf_audio_sample_rate;
+static int hf_audio_rtp_type;
+static int hf_audio_bytes_per_frame;
+
+static int hf_audio_rx_stream_id;
+static int hf_audio_tx_stream_id;
+static int hf_rx_vocoder_type;
+static int hf_tx_vocoder_type;
+static int hf_frames_per_packet;
+static int hf_audio_tos;
+static int hf_audio_precedence;
+static int hf_audio_frf_11;
+static int hf_rtcp_bucket_id;
+static int hf_audio_lcl_rtp_port;
+static int hf_audio_lcl_rtcp_port;
+static int hf_audio_far_rtp_port;
+static int hf_audio_far_rtcp_port;
+static int hf_audio_far_ip_add;
+static int hf_audio_rtcp_bucket_id;
+static int hf_audio_clear_bucket;
+
+static int hf_audio_transducer_pair;
+static int hf_audio_rx_enable;
+static int hf_audio_tx_enable;
+static int hf_audio_sidetone_disable;
+static int hf_audio_destruct_additive;
+static int hf_audio_dont_force_active;
+static int hf_audio_source_descr;
+static int hf_audio_sdes_rtcp_bucket;
+static int hf_audio_desired_jitter;
+static int hf_audio_high_water_mark;
+static int hf_audio_early_packet_resync_thresh;
+static int hf_audio_late_packet_resync_thresh;
+static int hf_audio_resolve_phone_port;
+static int hf_audio_far_end_echo_port;
+static int hf_audio_far_end_ip_address;
+static int hf_audio_nat_port;
+static int hf_audio_nat_ip_address;
+static int hf_audio_direction_code;
+static int hf_audio_hf_support;
+static int hf_audio_opt_rpt_max;
+static int hf_audio_opt_rpt_adj_vol;
+static int hf_audio_opt_rpt_auto_adj_vol;
+static int hf_audio_opt_rpt_hs_on_air;
+static int hf_audio_opt_rpt_hd_on_air;
+static int hf_audio_opt_rpt_noise_squelch;
+static int hf_audio_rx_vol_apb_rpt;
+static int hf_audio_rx_vol_vol_up;
+static int hf_audio_rx_vol_vol_floor;
+static int hf_audio_rx_vol_vol_ceiling;
+static int hf_audio_current_adj_vol_id;
+static int hf_audio_current_rx_level;
+static int hf_audio_current_rx_range;
+static int hf_audio_cadence_select;
+static int hf_audio_warbler_select;
+static int hf_audio_open_stream_rpt;
+static int hf_audio_sdes_rpt_source_desc;
+static int hf_audio_sdes_rpt_buk_id;
+static int hf_audio_phone_port;
+static int hf_audio_phone_ip;
+
+static int hf_audio_phone_add_len;
+static int hf_audio_nat_listen_port;
+static int hf_audio_nat_ip;
+static int hf_audio_nat_add_len;
+static int hf_audio_stream_direction_code;
+static int hf_audio_stream_state;
+static int hf_audio_transducer_list_length;
static const value_string audio_switch_msgs[]={
diff --git a/plugins/epan/unistim/basic.h b/plugins/epan/unistim/basic.h
index 9429ce98..793c7e82 100644
--- a/plugins/epan/unistim/basic.h
+++ b/plugins/epan/unistim/basic.h
@@ -13,27 +13,27 @@
#ifndef UNISTIM_BASIC_H
#define UNISTIM_BASIC_H
-static int hf_basic_switch_query_flags=-1;
-static int hf_basic_switch_query_attr=-1;
-static int hf_basic_switch_query_opts=-1;
-static int hf_basic_switch_query_fw=-1;
-static int hf_basic_switch_query_hw_id=-1;
-static int hf_basic_switch_query_it_type=-1;
-static int hf_basic_switch_query_prod_eng_code=-1;
-static int hf_basic_switch_query_gray_mkt_info=-1;
-static int hf_basic_switch_options_secure=-1;
-static int hf_basic_switch_element_id=-1;
-static int hf_basic_switch_eeprom_data=-1;
-static int hf_basic_switch_terminal_id=-1;
+static int hf_basic_switch_query_flags;
+static int hf_basic_switch_query_attr;
+static int hf_basic_switch_query_opts;
+static int hf_basic_switch_query_fw;
+static int hf_basic_switch_query_hw_id;
+static int hf_basic_switch_query_it_type;
+static int hf_basic_switch_query_prod_eng_code;
+static int hf_basic_switch_query_gray_mkt_info;
+static int hf_basic_switch_options_secure;
+static int hf_basic_switch_element_id;
+static int hf_basic_switch_eeprom_data;
+static int hf_basic_switch_terminal_id;
-static int hf_basic_phone_eeprom_stat_cksum=-1;
-static int hf_basic_phone_eeprom_dynam=-1;
-static int hf_basic_phone_eeprom_net_config_cksum=-1;
-static int hf_basic_phone_hw_id=-1;
-static int hf_basic_phone_fw_ver=-1;
-static int hf_basic_it_type=-1;
-static int hf_basic_prod_eng_code=-1;
-static int hf_basic_ether_address=-1;
+static int hf_basic_phone_eeprom_stat_cksum;
+static int hf_basic_phone_eeprom_dynam;
+static int hf_basic_phone_eeprom_net_config_cksum;
+static int hf_basic_phone_hw_id;
+static int hf_basic_phone_fw_ver;
+static int hf_basic_it_type;
+static int hf_basic_prod_eng_code;
+static int hf_basic_ether_address;
static const value_string it_types[]={
{0x02,"i2004"},
diff --git a/plugins/epan/unistim/broadcast.h b/plugins/epan/unistim/broadcast.h
index 4c85afc4..e8edd524 100644
--- a/plugins/epan/unistim/broadcast.h
+++ b/plugins/epan/unistim/broadcast.h
@@ -13,14 +13,14 @@
#ifndef UNISTIM_BROADCAST_H
#define UNISTIM_BROADCAST_H
-static int hf_broadcast_year=-1;
-static int hf_broadcast_month=-1;
-static int hf_broadcast_day=-1;
-static int hf_broadcast_hour=-1;
-static int hf_broadcast_minute=-1;
-static int hf_broadcast_second=-1;
-static int hf_broadcast_icon_state=-1;
-static int hf_broadcast_icon_cadence=-1;
+static int hf_broadcast_year;
+static int hf_broadcast_month;
+static int hf_broadcast_day;
+static int hf_broadcast_hour;
+static int hf_broadcast_minute;
+static int hf_broadcast_second;
+static int hf_broadcast_icon_state;
+static int hf_broadcast_icon_cadence;
static const value_string broadcast_switch_msgs[]={
diff --git a/plugins/epan/unistim/display.h b/plugins/epan/unistim/display.h
index 829441d6..7b478cdd 100644
--- a/plugins/epan/unistim/display.h
+++ b/plugins/epan/unistim/display.h
@@ -13,102 +13,102 @@
#ifndef UNISTIM_DISPLAY_H
#define UNISTIM_DISPLAY_H
-static int hf_display_write_cursor_move=-1;
-static int hf_display_write_clear_left=-1;
-static int hf_display_write_clear_right=-1;
-static int hf_display_write_shift_left=-1;
-static int hf_display_write_shift_right=-1;
-static int hf_display_write_highlight=-1;
-static int hf_display_write_tag=-1;
-static int hf_display_write_address_numeric=-1;
-static int hf_display_write_address_context=-1;
-static int hf_display_write_address_line=-1;
-static int hf_display_write_address_soft_key=-1;
-static int hf_display_write_address_soft_label=-1;
-static int hf_display_write_address_softkey_id=-1;
-static int hf_display_write_address_char_pos=-1;
-static int hf_display_write_address_line_number=-1;
-static int hf_display_cursor_move_cmd=-1;
-static int hf_display_cursor_blink=-1;
-static int hf_icon_id=-1;
-static int hf_display_arrow=-1;
-static int hf_display_clear_numeric =-1;
-static int hf_display_clear_context =-1;
-static int hf_display_clear_date =-1;
-static int hf_display_clear_time =-1;
-static int hf_display_clear_line =-1;
-static int hf_display_clear_status_bar_icon =-1;
-static int hf_display_clear_softkey =-1;
-static int hf_display_clear_softkey_label =-1;
-static int hf_display_clear_line_1 =-1;
-static int hf_display_clear_line_2 =-1;
-static int hf_display_clear_line_3 =-1;
-static int hf_display_clear_line_4 =-1;
-static int hf_display_clear_line_5 =-1;
-static int hf_display_clear_line_6 =-1;
-static int hf_display_clear_line_7 =-1;
-static int hf_display_clear_line_8 =-1;
-static int hf_display_clear_status_bar_icon_1 =-1;
-static int hf_display_clear_status_bar_icon_2 =-1;
-static int hf_display_clear_status_bar_icon_3 =-1;
-static int hf_display_clear_status_bar_icon_4 =-1;
-static int hf_display_clear_status_bar_icon_5 =-1;
-static int hf_display_clear_status_bar_icon_6 =-1;
-static int hf_display_clear_status_bar_icon_7 =-1;
-static int hf_display_clear_status_bar_icon_8 =-1;
-static int hf_display_clear_soft_key_1 =-1;
-static int hf_display_clear_soft_key_2 =-1;
-static int hf_display_clear_soft_key_3 =-1;
-static int hf_display_clear_soft_key_4 =-1;
-static int hf_display_clear_soft_key_5 =-1;
-static int hf_display_clear_soft_key_6 =-1;
-static int hf_display_clear_soft_key_7 =-1;
-static int hf_display_clear_soft_key_8 =-1;
-static int hf_display_clear_sk_label_key_id=-1;
-static int hf_display_clear_all_slks=-1;
+static int hf_display_write_cursor_move;
+static int hf_display_write_clear_left;
+static int hf_display_write_clear_right;
+static int hf_display_write_shift_left;
+static int hf_display_write_shift_right;
+static int hf_display_write_highlight;
+static int hf_display_write_tag;
+static int hf_display_write_address_numeric;
+static int hf_display_write_address_context;
+static int hf_display_write_address_line;
+static int hf_display_write_address_soft_key;
+static int hf_display_write_address_soft_label;
+static int hf_display_write_address_softkey_id;
+static int hf_display_write_address_char_pos;
+static int hf_display_write_address_line_number;
+static int hf_display_cursor_move_cmd;
+static int hf_display_cursor_blink;
+static int hf_icon_id;
+static int hf_display_arrow;
+static int hf_display_clear_numeric;
+static int hf_display_clear_context;
+static int hf_display_clear_date;
+static int hf_display_clear_time;
+static int hf_display_clear_line;
+static int hf_display_clear_status_bar_icon;
+static int hf_display_clear_softkey;
+static int hf_display_clear_softkey_label;
+static int hf_display_clear_line_1;
+static int hf_display_clear_line_2;
+static int hf_display_clear_line_3;
+static int hf_display_clear_line_4;
+static int hf_display_clear_line_5;
+static int hf_display_clear_line_6;
+static int hf_display_clear_line_7;
+static int hf_display_clear_line_8;
+static int hf_display_clear_status_bar_icon_1;
+static int hf_display_clear_status_bar_icon_2;
+static int hf_display_clear_status_bar_icon_3;
+static int hf_display_clear_status_bar_icon_4;
+static int hf_display_clear_status_bar_icon_5;
+static int hf_display_clear_status_bar_icon_6;
+static int hf_display_clear_status_bar_icon_7;
+static int hf_display_clear_status_bar_icon_8;
+static int hf_display_clear_soft_key_1;
+static int hf_display_clear_soft_key_2;
+static int hf_display_clear_soft_key_3;
+static int hf_display_clear_soft_key_4;
+static int hf_display_clear_soft_key_5;
+static int hf_display_clear_soft_key_6;
+static int hf_display_clear_soft_key_7;
+static int hf_display_clear_soft_key_8;
+static int hf_display_clear_sk_label_key_id;
+static int hf_display_clear_all_slks;
-static int hf_display_line_width=-1;
-static int hf_display_lines=-1;
-static int hf_display_softkey_width=-1;
-static int hf_display_softkeys=-1;
-static int hf_display_icon=-1;
-static int hf_display_softlabel_key_width=-1;
-static int hf_display_context_width=-1;
-static int hf_display_numeric_width=-1;
-static int hf_display_time_width=-1;
-static int hf_display_date_width=-1;
-static int hf_display_char_dload=-1;
-static int hf_display_freeform_icon_dload=-1;
-static int hf_display_icon_type=-1;
-static int hf_display_charsets=-1;
-static int hf_display_contrast=-1;
-static int hf_display_cursor_numeric=-1;
-static int hf_display_cursor_context =-1;
-static int hf_display_cursor_line =-1;
-static int hf_display_cursor_softkey =-1;
-static int hf_display_cursor_softkey_id =-1;
-static int hf_display_cursor_char_pos =-1;
-static int hf_display_cursor_line_number =-1;
-static int hf_display_hlight_start=-1;
-static int hf_display_hlight_end=-1;
-static int hf_display_date_format=-1;
-static int hf_display_time_format=-1;
-static int hf_display_use_time_format=-1;
-static int hf_display_use_date_format=-1;
-static int hf_display_context_format=-1;
-static int hf_display_context_field=-1;
-static int hf_display_char_address=-1;
-static int hf_display_layer_number=-1;
-static int hf_display_layer_skey_id=-1;
-static int hf_display_layer_all_skeys=-1;
-static int hf_display_once_or_cyclic=-1;
-static int hf_display_layer_duration=-1;
-static int hf_display_call_timer_mode=-1;
-static int hf_display_call_timer_reset=-1;
-static int hf_display_call_timer_display=-1;
-static int hf_display_call_timer_delay=-1;
-static int hf_display_call_timer_id=-1;
+static int hf_display_line_width;
+static int hf_display_lines;
+static int hf_display_softkey_width;
+static int hf_display_softkeys;
+static int hf_display_icon;
+static int hf_display_softlabel_key_width;
+static int hf_display_context_width;
+static int hf_display_numeric_width;
+static int hf_display_time_width;
+static int hf_display_date_width;
+static int hf_display_char_dload;
+static int hf_display_freeform_icon_dload;
+static int hf_display_icon_type;
+static int hf_display_charsets;
+static int hf_display_contrast;
+static int hf_display_cursor_numeric;
+static int hf_display_cursor_context;
+static int hf_display_cursor_line;
+static int hf_display_cursor_softkey;
+static int hf_display_cursor_softkey_id;
+static int hf_display_cursor_char_pos;
+static int hf_display_cursor_line_number;
+static int hf_display_hlight_start;
+static int hf_display_hlight_end;
+static int hf_display_date_format;
+static int hf_display_time_format;
+static int hf_display_use_time_format;
+static int hf_display_use_date_format;
+static int hf_display_context_format;
+static int hf_display_context_field;
+static int hf_display_char_address;
+static int hf_display_layer_number;
+static int hf_display_layer_skey_id;
+static int hf_display_layer_all_skeys;
+static int hf_display_once_or_cyclic;
+static int hf_display_layer_duration;
+static int hf_display_call_timer_mode;
+static int hf_display_call_timer_reset;
+static int hf_display_call_timer_display;
+static int hf_display_call_timer_delay;
+static int hf_display_call_timer_id;
static const value_string arrow_dirs[]={
diff --git a/plugins/epan/unistim/expansion.h b/plugins/epan/unistim/expansion.h
index 4081ca84..50ffc2a6 100644
--- a/plugins/epan/unistim/expansion.h
+++ b/plugins/epan/unistim/expansion.h
@@ -12,7 +12,7 @@
#ifndef UNISTIM_EXPANSION_H
#define UNISTIM_EXPANSION_H
-static int hf_expansion_softlabel_number=-1;
+static int hf_expansion_softlabel_number;
static const value_string expansion_switch_msgs[]={
{0x17,"Next Display/Write command regards expansion module"},
diff --git a/plugins/epan/unistim/key.h b/plugins/epan/unistim/key.h
index 43acba8d..bf7d68b3 100644
--- a/plugins/epan/unistim/key.h
+++ b/plugins/epan/unistim/key.h
@@ -14,32 +14,32 @@
#define UNISTIM_KEY_H
-static int hf_key_icon_id=-1;
-static int hf_key_led_cadence=-1;
-static int hf_key_led_id=-1;
-static int hf_key_programmable_keys=-1;
-static int hf_keys_soft_keys=-1;
-static int hf_keys_hd_key=-1;
-static int hf_keys_mute_key=-1;
-static int hf_keys_quit_key=-1;
-static int hf_keys_copy_key=-1;
-static int hf_keys_mwi_key=-1;
-static int hf_keys_num_nav_keys=-1;
-static int hf_keys_num_conspic_keys=-1;
-static int hf_keys_send_key_rel=-1;
-static int hf_keys_enable_vol=-1;
-static int hf_keys_conspic_prog_key=-1;
-static int hf_keys_acd_super_control=-1;
-static int hf_keys_local_dial_feedback=-1;
-static int hf_keys_admin_command=-1;
-static int hf_keys_logical_icon_id=-1;
-static int hf_keys_repeat_timer_one=-1;
-static int hf_keys_repeat_timer_two=-1;
-static int hf_keys_led_id=-1;
-static int hf_keys_phone_icon_id=-1;
-static int hf_keys_cadence_on_time=-1;
-static int hf_keys_cadence_off_time=-1;
-static int hf_keys_user_activity_timeout=-1;
+static int hf_key_icon_id;
+static int hf_key_led_cadence;
+static int hf_key_led_id;
+static int hf_key_programmable_keys;
+static int hf_keys_soft_keys;
+static int hf_keys_hd_key;
+static int hf_keys_mute_key;
+static int hf_keys_quit_key;
+static int hf_keys_copy_key;
+static int hf_keys_mwi_key;
+static int hf_keys_num_nav_keys;
+static int hf_keys_num_conspic_keys;
+static int hf_keys_send_key_rel;
+static int hf_keys_enable_vol;
+static int hf_keys_conspic_prog_key;
+static int hf_keys_acd_super_control;
+static int hf_keys_local_dial_feedback;
+static int hf_keys_admin_command;
+static int hf_keys_logical_icon_id;
+static int hf_keys_repeat_timer_one;
+static int hf_keys_repeat_timer_two;
+static int hf_keys_led_id;
+static int hf_keys_phone_icon_id;
+static int hf_keys_cadence_on_time;
+static int hf_keys_cadence_off_time;
+static int hf_keys_user_activity_timeout;
static const value_string keys_led_ids[]={
{0x00,"Message Waiting LED"},
diff --git a/plugins/epan/unistim/network.h b/plugins/epan/unistim/network.h
index 561ef8dc..06ee76bf 100644
--- a/plugins/epan/unistim/network.h
+++ b/plugins/epan/unistim/network.h
@@ -14,48 +14,48 @@
#define UNISTIM_NETWORK_H
-static int hf_net_diag_flag=-1;
-static int hf_net_managers_flag=-1;
-static int hf_net_attributes_flag=-1;
-static int hf_net_serv_info_flag=-1;
-static int hf_net_options_flag=-1;
-static int hf_net_sanity_flag=-1;
-static int hf_net_enable_diag=-1;
-static int hf_net_enable_rudp=-1;
-static int hf_net_server_id=-1;
-static int hf_net_server_port=-1;
-static int hf_net_server_action=-1;
-static int hf_net_server_retry_count=-1;
-static int hf_net_server_failover_id=-1;
-static int hf_net_server_ip_address=-1;
-static int hf_net_server_time_out=-1;
-static int hf_net_server_config_element=-1;
-static int hf_net_server_recovery_time_low=-1;
-static int hf_net_server_recovery_time_high=-1;
-static int hf_net_phone_rx_ovr_flag=-1;
-static int hf_net_phone_tx_ovr_flag=-1;
-static int hf_net_phone_rx_empty_flag=-1;
-static int hf_net_phone_invalid_msg_flag=-1;
-static int hf_net_phone_eeprom_insane_flag=-1;
-static int hf_net_phone_eeprom_unsafe_flag=-1;
-static int hf_net_phone_diag=-1;
-static int hf_net_phone_rudp=-1;
+static int hf_net_diag_flag;
+static int hf_net_managers_flag;
+static int hf_net_attributes_flag;
+static int hf_net_serv_info_flag;
+static int hf_net_options_flag;
+static int hf_net_sanity_flag;
+static int hf_net_enable_diag;
+static int hf_net_enable_rudp;
+static int hf_net_server_id;
+static int hf_net_server_port;
+static int hf_net_server_action;
+static int hf_net_server_retry_count;
+static int hf_net_server_failover_id;
+static int hf_net_server_ip_address;
+static int hf_net_server_time_out;
+static int hf_net_server_config_element;
+static int hf_net_server_recovery_time_low;
+static int hf_net_server_recovery_time_high;
+static int hf_net_phone_rx_ovr_flag;
+static int hf_net_phone_tx_ovr_flag;
+static int hf_net_phone_rx_empty_flag;
+static int hf_net_phone_invalid_msg_flag;
+static int hf_net_phone_eeprom_insane_flag;
+static int hf_net_phone_eeprom_unsafe_flag;
+static int hf_net_phone_diag;
+static int hf_net_phone_rudp;
-static int hf_net_phone_primary_server_id=-1;
-static int hf_net_phone_server_port=-1;
-static int hf_net_phone_server_action=-1;
-static int hf_net_phone_server_retry_count=-1;
-static int hf_net_phone_server_failover_id=-1;
-static int hf_net_phone_server_ip=-1;
-static int hf_net_file_xfer_mode =-1;
-static int hf_net_force_download =-1;
-static int hf_net_use_file_server_port =-1;
-static int hf_net_use_local_port=-1;
-static int hf_net_file_server_port=-1;
-static int hf_net_local_port=-1;
-static int hf_net_file_server_address=-1;
-static int hf_net_full_pathname=-1;
-static int hf_net_file_identifier=-1;
+static int hf_net_phone_primary_server_id;
+static int hf_net_phone_server_port;
+static int hf_net_phone_server_action;
+static int hf_net_phone_server_retry_count;
+static int hf_net_phone_server_failover_id;
+static int hf_net_phone_server_ip;
+static int hf_net_file_xfer_mode;
+static int hf_net_force_download;
+static int hf_net_use_file_server_port;
+static int hf_net_use_local_port;
+static int hf_net_file_server_port;
+static int hf_net_local_port;
+static int hf_net_file_server_address;
+static int hf_net_full_pathname;
+static int hf_net_file_identifier;
static const value_string file_xfer_modes[]={
{0x00,"TFTP"},
@@ -73,8 +73,8 @@ static const value_string action_bytes[]={
{0,NULL}
};
-static int hf_key_code=-1;
-static int hf_key_command=-1;
+static int hf_key_code;
+static int hf_key_command;
static const value_string key_cmds[]={
{0x00,"Key Released"},
diff --git a/plugins/epan/unistim/packet-unistim.c b/plugins/epan/unistim/packet-unistim.c
index 861ac763..e6094c2e 100644
--- a/plugins/epan/unistim/packet-unistim.c
+++ b/plugins/epan/unistim/packet-unistim.c
@@ -35,76 +35,76 @@ void proto_register_unistim(void);
static dissector_handle_t unistim_handle;
static unistim_info_t *uinfo;
-static int unistim_tap = -1;
+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 int proto_unistim = -1;
-static int hf_unistim_seq_nu = -1;
-static int hf_unistim_packet_type = -1;
-static int hf_unistim_payload = -1;
-static int hf_unistim_cmd_add = -1;
-static int hf_unistim_len =-1;
-static int hf_terminal_id=-1;
-static int hf_basic_bit_field=-1;
-
-static int hf_basic_switch_cmd=-1;
-static int hf_basic_phone_cmd=-1;
-static int hf_broadcast_switch_cmd=-1;
-/* static int hf_broadcast_phone_cmd=-1; */
-static int hf_audio_switch_cmd=-1;
-static int hf_audio_phone_cmd=-1;
-static int hf_display_switch_cmd=-1;
-static int hf_display_phone_cmd=-1;
-static int hf_key_switch_cmd=-1;
-static int hf_key_phone_cmd=-1;
-static int hf_network_switch_cmd=-1;
-static int hf_network_phone_cmd=-1;
-static int hf_expansion_switch_cmd=-1;
-static int hf_expansion_phone_cmd=-1;
-static int hf_module_key_number=-1;
-
-static int hf_generic_data=-1;
-static int hf_generic_string=-1;
-
-static gint ett_unistim = -1;
-
-static expert_field ei_unistim_len = EI_INIT;
+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;
+static int hf_unistim_seq_nu;
+static int hf_unistim_packet_type;
+static int hf_unistim_payload;
+static int hf_unistim_cmd_add;
+static int hf_unistim_len;
+static int hf_terminal_id;
+static int hf_basic_bit_field;
+
+static int hf_basic_switch_cmd;
+static int hf_basic_phone_cmd;
+static int hf_broadcast_switch_cmd;
+/* static int hf_broadcast_phone_cmd; */
+static int hf_audio_switch_cmd;
+static int hf_audio_phone_cmd;
+static int hf_display_switch_cmd;
+static int hf_display_phone_cmd;
+static int hf_key_switch_cmd;
+static int hf_key_phone_cmd;
+static int hf_network_switch_cmd;
+static int hf_network_phone_cmd;
+static int hf_expansion_switch_cmd;
+static int hf_expansion_phone_cmd;
+static int hf_module_key_number;
+
+static int hf_generic_data;
+static int hf_generic_string;
+
+static int ett_unistim;
+
+static expert_field ei_unistim_len;
static const value_string packet_names[]={
{0,"NAK"},
@@ -159,18 +159,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 +217,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 +238,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 +246,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;
@@ -292,24 +291,24 @@ dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, gint offset, pac
break;
}
- /* Handle UFTP seperately because it is significantly different
+ /* Handle UFTP separately because it is significantly different
than standard UNISTIM */
while (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_unistim_message(unistim_tree,pinfo,tvb,offset);
}
-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 +364,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 +479,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 +569,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 +648,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 +674,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 +720,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 +731,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 +804,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 +895,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 +905,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 +967,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 +992,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 +1087,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 +1185,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 +1237,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 +1297,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 +1415,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 +1510,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 +1653,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 +1700,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 +1722,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 +1767,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 +1789,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 +1833,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 +2049,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 +2111,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 +2177,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 +2269,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 +2414,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 +2461,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 +2743,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 +3825,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 b1462a6a..0eb8db94 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/unistim/uftp.h b/plugins/epan/unistim/uftp.h
index 865f23b5..c6d9fa7a 100644
--- a/plugins/epan/unistim/uftp.h
+++ b/plugins/epan/unistim/uftp.h
@@ -13,11 +13,11 @@
#ifndef UNISTIM_UFTP_H
#define UNISTIM_UFTP_H
-static int hf_uftp_datablock_size=-1;
-static int hf_uftp_datablock_limit=-1;
-static int hf_uftp_filename=-1;
-static int hf_uftp_datablock=-1;
-static int hf_uftp_command=-1;
+static int hf_uftp_datablock_size;
+static int hf_uftp_datablock_limit;
+static int hf_uftp_filename;
+static int hf_uftp_datablock;
+static int hf_uftp_command;
static const value_string uftp_commands[]={
{0x00,"Connection Granted"},
diff --git a/plugins/epan/wimax/README.wimax b/plugins/epan/wimax/README.wimax
index 4f7981fc..6dbe2158 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 4bc74a2a..0aacc4d6 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 43c5faf1..eaf2f6f4 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 0dcc8b27..b399cf3c 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 d083103a..8c69eb77 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 = -1;
-static gint ett_mac_header_generic_decoder = -1;
-/* static gint ett_mac_subheader_decoder = -1; */
-static gint ett_mac_mesh_subheader_decoder = -1;
-static gint ett_mac_frag_subheader_decoder = -1;
-static gint ett_mac_grant_mgmt_subheader_decoder = -1;
-static gint ett_mac_pkt_subheader_decoder = -1;
-static gint ett_mac_fast_fb_subheader_decoder = -1;
-static gint ett_mac_ext_subheader_decoder = -1;
-static gint ett_mac_ext_subheader_dl_decoder = -1;
-static gint ett_mac_ext_subheader_ul_decoder = -1;
-static gint ett_mac_arq_fb_payload_decoder = -1;
-static gint ett_mac_data_pdu_decoder = -1;
-static gint hf_mac_header_generic_value_bytes = -1;
-
-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;
@@ -142,23 +142,23 @@ static address save_dst;
#define WIMAX_MAC_HEADER_GENERIC_EKS_MASK 0x30
#define WIMAX_MAC_HEADER_GENERIC_LEN_MASK 0x07
-static int hf_mac_header_generic_ht = -1;
-static int hf_mac_header_generic_ec = -1;
-static int hf_mac_header_generic_type_0 = -1;
-static int hf_mac_header_generic_type_1 = -1;
-static int hf_mac_header_generic_type_2 = -1;
-static int hf_mac_header_generic_type_3 = -1;
-static int hf_mac_header_generic_type_4 = -1;
-static int hf_mac_header_generic_type_5 = -1;
-static int hf_mac_header_generic_esf = -1;
-static int hf_mac_header_generic_ci = -1;
-static int hf_mac_header_generic_eks = -1;
-static int hf_mac_header_generic_rsv = -1;
-static int hf_mac_header_generic_len = -1;
-static int hf_mac_header_generic_cid = -1;
-static int hf_mac_header_generic_hcs = -1;
-static int hf_mac_header_generic_crc = -1;
-static int hf_mac_header_generic_crc_status = -1;
+static int hf_mac_header_generic_ht;
+static int hf_mac_header_generic_ec;
+static int hf_mac_header_generic_type_0;
+static int hf_mac_header_generic_type_1;
+static int hf_mac_header_generic_type_2;
+static int hf_mac_header_generic_type_3;
+static int hf_mac_header_generic_type_4;
+static int hf_mac_header_generic_type_5;
+static int hf_mac_header_generic_esf;
+static int hf_mac_header_generic_ci;
+static int hf_mac_header_generic_eks;
+static int hf_mac_header_generic_rsv;
+static int hf_mac_header_generic_len;
+static int hf_mac_header_generic_cid;
+static int hf_mac_header_generic_hcs;
+static int hf_mac_header_generic_crc;
+static int hf_mac_header_generic_crc_status;
/* MAC Header types */
static const value_string ht_msgs[] =
@@ -369,21 +369,21 @@ static const value_string fb_types[] =
};
/* common fields */
-static gint hf_mac_header_generic_ext_subheader_rsv = -1;
+static int hf_mac_header_generic_ext_subheader_rsv;
/* DL sub-header */
-static gint hf_mac_header_generic_ext_subheader_type_dl = -1;
-static gint hf_mac_header_generic_ext_subheader_sdu_sn = -1;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_pscid = -1;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_op = -1;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_fswe = -1;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_fswb = -1;
-static gint hf_mac_header_generic_ext_subheader_dl_sleep_control_rsv = -1;
-static gint hf_mac_header_generic_ext_subheader_fb_req_uiuc = -1;
-static gint hf_mac_header_generic_ext_subheader_fb_req_fb_type = -1;
-static gint hf_mac_header_generic_ext_subheader_fb_req_ofdma_symbol_offset = -1;
-static gint hf_mac_header_generic_ext_subheader_fb_req_subchannel_offset = -1;
-static gint hf_mac_header_generic_ext_subheader_fb_req_slots = -1;
-static gint hf_mac_header_generic_ext_subheader_fb_req_frame_offset = -1;
+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 = -1;
-static gint hf_mac_header_generic_ext_subheader_mimo_mode_fb_type = -1;
-static gint hf_mac_header_generic_ext_subheader_mimo_fb_content = -1;
-static gint hf_mac_header_generic_ext_subheader_ul_tx_pwr_rep = -1;
-static gint hf_mac_header_generic_ext_subheader_mini_fb_type = -1;
-static gint hf_mac_header_generic_ext_subheader_mini_fb_content = -1;
+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 = -1;
-static gint hf_mac_header_generic_ext_subheader_pdu_sn_long = -1;
+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 = -1;
-static gint hf_mac_header_generic_ext_subheader_sn_req_rep_ind_2 = -1;
-static gint hf_mac_header_generic_ext_subheader_sn_req_rsv = -1;
+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 = -1;
+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 = -1;
#define FIRST_FRAG 2
#define MIDDLE_FRAG 3
-static gint hf_mac_header_generic_frag_subhd_fc = -1;
-static gint hf_mac_header_generic_frag_subhd_fc_ext = -1;
-static gint hf_mac_header_generic_frag_subhd_bsn = -1;
-static gint hf_mac_header_generic_frag_subhd_fsn = -1;
-static gint hf_mac_header_generic_frag_subhd_fsn_ext = -1;
-static gint hf_mac_header_generic_frag_subhd_rsv = -1;
-static gint hf_mac_header_generic_frag_subhd_rsv_ext = -1;
+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 = -1;
-static gint hf_mac_header_generic_packing_subhd_fc_ext = -1;
-static gint hf_mac_header_generic_packing_subhd_bsn = -1;
-static gint hf_mac_header_generic_packing_subhd_fsn = -1;
-static gint hf_mac_header_generic_packing_subhd_fsn_ext = -1;
-static gint hf_mac_header_generic_packing_subhd_len = -1;
-static gint hf_mac_header_generic_packing_subhd_len_ext = -1;
+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 = -1;
-static gint hf_mac_header_generic_fast_fb_subhd_fb_type = -1;
+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 = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_si = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_pm = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_fli = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_fl = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ugs_rsv = -1;
-static gint hf_mac_header_generic_grant_mgmt_ext_rtps_tree = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ext_pbr = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ext_fli = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_ext_fl = -1;
-static gint hf_mac_header_generic_grant_mgmt_ext_pbr_tree = -1;
-static gint hf_mac_header_generic_grant_mgmt_subhd_pbr = -1;
+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,27 +555,27 @@ 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 = -1;
-static gint hf_mac_header_generic_arq_fb_ie_last = -1;
-static gint hf_mac_header_generic_arq_fb_ie_ack_type = -1;
-static gint hf_mac_header_generic_arq_fb_ie_bsn = -1;
-static gint hf_mac_header_generic_arq_fb_ie_num_maps = -1;
-static gint hf_ack_type_reserved = -1;
-static gint hf_mac_header_generic_arq_fb_ie_sel_ack_map = -1;
-static gint hf_mac_header_generic_arq_fb_ie_seq_format = -1;
-static gint hf_mac_header_generic_arq_fb_ie_seq_ack_map = -1;
-static gint hf_mac_header_generic_arq_fb_ie_seq1_length = -1;
-static gint hf_mac_header_generic_arq_fb_ie_seq2_length = -1;
-static gint hf_mac_header_generic_arq_fb_ie_seq3_length = -1;
-static gint hf_mac_header_generic_arq_fb_ie_seq_ack_map_2 = -1;
-static gint hf_mac_header_generic_arq_fb_ie_seq1_length_6 = -1;
-static gint hf_mac_header_generic_arq_fb_ie_seq2_length_6 = -1;
-static gint hf_mac_header_generic_arq_fb_ie_rsv = -1;
-static gint hf_mac_header_payload_fragment = -1;
-
-static expert_field ei_mac_crc_malformed = EI_INIT;
-static expert_field ei_mac_crc_missing = EI_INIT;
-static expert_field ei_mac_header_generic_crc = EI_INIT;
+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;
+static expert_field ei_mac_header_generic_crc;
/* Last IE Indicators */
static const value_string last_ie_msgs[] =
@@ -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 6713e920..3b843c0f 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 = -1;
-static gint ett_mac_header_type_1_decoder = -1;
-static gint hf_mac_header_type_1_value_bytes = -1;
+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
@@ -64,7 +64,7 @@ static const char *type1_subtype_abbrv[TYPE_I_SUBTYPE_MAX] =
#define WIMAX_MAC_HEADER_TYPE_1_SUB_TYPE_MASK 0x38
-/* WIMAX MAC HEADER TYPE I FILEDS */
+/* WIMAX MAC HEADER TYPE I FIELDS */
/* 1st to 3rd bytes */
/* Common Fields */
#define WIMAX_MAC_HEADER_TYPE_1_HT 0x800000
@@ -106,40 +106,40 @@ static const char *type1_subtype_abbrv[TYPE_I_SUBTYPE_MAX] =
*#define WIMAX_MAC_HEADER_TYPE_1_HCS 0xFF
*/
/* Common Fields */
-static int hf_mac_header_type_1_ht = -1;
-static int hf_mac_header_type_1_ec = -1;
-static int hf_mac_header_type_1_type = -1;
+static int hf_mac_header_type_1_ht;
+static int hf_mac_header_type_1_ec;
+static int hf_mac_header_type_1_type;
/* type 0 & type 1 only */
-static int hf_mac_header_type_1_br = -1;
+static int hf_mac_header_type_1_br;
/* type 3, type 4, & type 5 only */
-static int hf_mac_header_type_1_br_3 = -1;
+static int hf_mac_header_type_1_br_3;
/* type 2 only */
-static int hf_mac_header_type_1_diuc = -1;
-static int hf_mac_header_type_1_ultxpwr = -1;
-static int hf_mac_header_type_1_ulhdrm = -1;
-static int hf_mac_header_type_1_rsv_2 = -1;
+static int hf_mac_header_type_1_diuc;
+static int hf_mac_header_type_1_ultxpwr;
+static int hf_mac_header_type_1_ulhdrm;
+static int hf_mac_header_type_1_rsv_2;
/* type 3 only */
-static int hf_mac_header_type_1_ultxpwr_3 = -1;
+static int hf_mac_header_type_1_ultxpwr_3;
/* type 4 only */
-static int hf_mac_header_type_1_cinr = -1;
-static int hf_mac_header_type_1_dci = -1;
+static int hf_mac_header_type_1_cinr;
+static int hf_mac_header_type_1_dci;
/* type 5 only */
-static int hf_mac_header_type_1_pscid = -1;
-static int hf_mac_header_type_1_op = -1;
-static int hf_mac_header_type_1_rsv_5 = -1;
+static int hf_mac_header_type_1_pscid;
+static int hf_mac_header_type_1_op;
+static int hf_mac_header_type_1_rsv_5;
/* type 6 only */
-static int hf_mac_header_type_1_last = -1;
-static int hf_mac_header_type_1_sdu_sn1 = -1;
-static int hf_mac_header_type_1_sdu_sn2 = -1;
-static int hf_mac_header_type_1_sdu_sn3 = -1;
+static int hf_mac_header_type_1_last;
+static int hf_mac_header_type_1_sdu_sn1;
+static int hf_mac_header_type_1_sdu_sn2;
+static int hf_mac_header_type_1_sdu_sn3;
/* type 7 only */
-static int hf_mac_header_type_1_fb_type = -1;
-static int hf_mac_header_type_1_fbssi = -1;
-static int hf_mac_header_type_1_period = -1;
-static int hf_mac_header_type_1_rsv_7 = -1;
+static int hf_mac_header_type_1_fb_type;
+static int hf_mac_header_type_1_fbssi;
+static int hf_mac_header_type_1_period;
+static int hf_mac_header_type_1_rsv_7;
/* Common Fields */
-static int hf_mac_header_type_1_cid = -1;
-static int hf_mac_header_type_1_hcs = -1;
+static int hf_mac_header_type_1_cid;
+static int hf_mac_header_type_1_hcs;
/* MAC Header Type I Sub-Types */
static const value_string sub_types[] =
@@ -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)
@@ -260,7 +260,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_ultxpwr, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Decode and display the UL Headroom */
proto_tree_add_item(ti_tree, hf_mac_header_type_1_ulhdrm, tvb, offset, 3, ENC_BIG_ENDIAN);
- /* Decode and display the reserved filed */
+ /* Decode and display the reserved field */
proto_tree_add_item(ti_tree, hf_mac_header_type_1_rsv_2, tvb, offset, 3, ENC_BIG_ENDIAN);
break;
case BR_WITH_UL_TX_POWER_REPORT:
@@ -284,7 +284,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_pscid, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Decode and display the Operation */
proto_tree_add_item(ti_tree, hf_mac_header_type_1_op, tvb, offset, 3, ENC_BIG_ENDIAN);
- /* Decode and display the reserved filed */
+ /* Decode and display the reserved field */
proto_tree_add_item(ti_tree, hf_mac_header_type_1_rsv_5, tvb, offset, 3, ENC_BIG_ENDIAN);
break;
case SN_REPORT:
@@ -302,9 +302,9 @@ 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_fb_type, tvb, offset, 3, ENC_BIG_ENDIAN);
/* Decode and display the FBSSI */
proto_tree_add_item(ti_tree, hf_mac_header_type_1_fbssi, tvb, offset, 3, ENC_BIG_ENDIAN);
- /* Decode and display the Prreferred-period */
+ /* Decode and display the Preferred-period */
proto_tree_add_item(ti_tree, hf_mac_header_type_1_period, tvb, offset, 3, ENC_BIG_ENDIAN);
- /* Decode and display the reserved filed */
+ /* Decode and display the reserved field */
proto_tree_add_item(ti_tree, hf_mac_header_type_1_rsv_7, tvb, offset, 3, ENC_BIG_ENDIAN);
break;
}
@@ -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 466b4b20..551ad369 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 = -1;
-static gint ett_mac_header_type_2_decoder = -1;
-static gint hf_mac_header_type_2_value_bytes = -1;
+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
@@ -81,23 +81,23 @@ static const char *type2_fb_type_abbrv[TYPE_II_FB_TYPE_MAX] =
#define WIMAX_MAC_HEADER_TYPE_2_TYPE 0x20
#define WIMAX_MAC_HEADER_TYPE_2_CII 0x10
#define WIMAX_MAC_HEADER_TYPE_2_FB_TYPE 0x0F
-static int hf_mac_header_type_2_ht = -1;
-static int hf_mac_header_type_2_ec = -1;
-static int hf_mac_header_type_2_type = -1;
-static int hf_mac_header_type_2_cii = -1;
-static int hf_mac_header_type_2_fb_type = -1;
+static int hf_mac_header_type_2_ht;
+static int hf_mac_header_type_2_ec;
+static int hf_mac_header_type_2_type;
+static int hf_mac_header_type_2_cii;
+static int hf_mac_header_type_2_fb_type;
/* 2nd to 5th bytes (varies by different fb types) */
-static int hf_mac_header_type_2_cid = -1;
-static int hf_mac_header_type_2_no_cid = -1;
+static int hf_mac_header_type_2_cid;
+static int hf_mac_header_type_2_no_cid;
/* CQI and MIMO Feedback */
/* 2nd & 3rd bytes */
#define WIMAX_MAC_HEADER_TYPE_2_CQI_FB_TYPE 0xE000
#define WIMAX_MAC_HEADER_TYPE_2_CQI_PAYLOAD 0x1F80
#define WIMAX_MAC_HEADER_TYPE_2_CQI_RSV 0x007F
-static int hf_mac_header_type_2_cqi_fb_type = -1;
-static int hf_mac_header_type_2_cqi_payload = -1;
-static int hf_mac_header_type_2_cqi_rsv = -1;
+static int hf_mac_header_type_2_cqi_fb_type;
+static int hf_mac_header_type_2_cqi_payload;
+static int hf_mac_header_type_2_cqi_rsv;
/* 4th & 5th without CID */
/*#define WIMAX_MAC_HEADER_TYPE_2_NO_CID 0xFFFF*/
@@ -105,8 +105,8 @@ static int hf_mac_header_type_2_cqi_rsv = -1;
/* 2nd byte */
#define WIMAX_MAC_HEADER_TYPE_2_DL_AVE_CINR 0xF800
#define WIMAX_MAC_HEADER_TYPE_2_DL_AVE_RSV 0x07FF
-static int hf_mac_header_type_2_dl_ave_cinr = -1;
-static int hf_mac_header_type_2_dl_ave_rsv = -1;
+static int hf_mac_header_type_2_dl_ave_cinr;
+static int hf_mac_header_type_2_dl_ave_rsv;
/* MIMO Coefficients Feedback */
/* 2nd & 3rd bytes */
@@ -114,26 +114,26 @@ static int hf_mac_header_type_2_dl_ave_rsv = -1;
#define WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF_AI 0x3000
#define WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF 0x0F80
#define WIMAX_MAC_HEADER_TYPE_2_MIMO_COEF_RSV 0x007F
-static int hf_mac_header_type_2_mimo_coef_ni = -1;
-static int hf_mac_header_type_2_mimo_coef_ai = -1;
-static int hf_mac_header_type_2_mimo_coef = -1;
-static int hf_mac_header_type_2_mimo_coef_rsv = -1;
+static int hf_mac_header_type_2_mimo_coef_ni;
+static int hf_mac_header_type_2_mimo_coef_ai;
+static int hf_mac_header_type_2_mimo_coef;
+static int hf_mac_header_type_2_mimo_coef_rsv;
/* Preferred DL Channel DIUC Feedback */
/* 2nd byte */
#define WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_DIUC 0xF000
#define WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_DCD 0x0F00
#define WIMAX_MAC_HEADER_TYPE_2_DL_CHAN_RSV 0x00FF
-static int hf_mac_header_type_2_dl_chan_diuc = -1;
-static int hf_mac_header_type_2_dl_chan_dcd = -1;
-static int hf_mac_header_type_2_dl_chan_rsv = -1;
+static int hf_mac_header_type_2_dl_chan_diuc;
+static int hf_mac_header_type_2_dl_chan_dcd;
+static int hf_mac_header_type_2_dl_chan_rsv;
/* UL Transmission Power */
/* 2nd byte */
#define WIMAX_MAC_HEADER_TYPE_2_UL_TX_PWR 0xFF00
#define WIMAX_MAC_HEADER_TYPE_2_UL_TX_PWR_RSV 0x00FF
-static int hf_mac_header_type_2_ul_tx_pwr = -1;
-static int hf_mac_header_type_2_ul_tx_pwr_rsv = -1;
+static int hf_mac_header_type_2_ul_tx_pwr;
+static int hf_mac_header_type_2_ul_tx_pwr_rsv;
/* PHY Channel Feedback */
/* 2nd to 4th bytes */
@@ -141,10 +141,10 @@ static int hf_mac_header_type_2_ul_tx_pwr_rsv = -1;
#define WIMAX_MAC_HEADER_TYPE_2_PHY_UL_TX_PWR 0x0FF000
#define WIMAX_MAC_HEADER_TYPE_2_PHY_UL_HDRM 0x000FC0
#define WIMAX_MAC_HEADER_TYPE_2_PHY_RSV 0x00003F
-static int hf_mac_header_type_2_phy_diuc = -1;
-static int hf_mac_header_type_2_phy_ul_tx_pwr = -1;
-static int hf_mac_header_type_2_phy_ul_hdrm = -1;
-static int hf_mac_header_type_2_phy_rsv = -1;
+static int hf_mac_header_type_2_phy_diuc;
+static int hf_mac_header_type_2_phy_ul_tx_pwr;
+static int hf_mac_header_type_2_phy_ul_hdrm;
+static int hf_mac_header_type_2_phy_rsv;
/* AMC Band Indication Bitmap */
/* 2nd to 5th bytes */
@@ -153,27 +153,27 @@ static int hf_mac_header_type_2_phy_rsv = -1;
#define WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_2 0x00007C00
#define WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_3 0x000003E0
#define WIMAX_MAC_HEADER_TYPE_2_AMC_CQI_4 0x0000001F
-static int hf_mac_header_type_2_amc_bitmap = -1;
-static int hf_mac_header_type_2_amc_cqi_1 = -1;
-static int hf_mac_header_type_2_amc_cqi_2 = -1;
-static int hf_mac_header_type_2_amc_cqi_3 = -1;
-static int hf_mac_header_type_2_amc_cqi_4 = -1;
+static int hf_mac_header_type_2_amc_bitmap;
+static int hf_mac_header_type_2_amc_cqi_1;
+static int hf_mac_header_type_2_amc_cqi_2;
+static int hf_mac_header_type_2_amc_cqi_3;
+static int hf_mac_header_type_2_amc_cqi_4;
/* Life Span of Short-term Precoding Feedback */
/* 2nd byte */
#define WIMAX_MAC_HEADER_TYPE_2_LIFE_SPAN 0xF000
#define WIMAX_MAC_HEADER_TYPE_2_LIFE_SPAN_RSV 0x0FFF
-static int hf_mac_header_type_2_life_span = -1;
-static int hf_mac_header_type_2_life_span_rsv = -1;
+static int hf_mac_header_type_2_life_span;
+static int hf_mac_header_type_2_life_span_rsv;
/* Multiple Types of Feedback */
/* 2nd to 5th bytes ??? */
#define WIMAX_MAC_HEADER_TYPE_2_MT_NUM_FB_TYPES 0xC0000000
#define WIMAX_MAC_HEADER_TYPE_2_MT_OCCU_FB_TYPE 0x3C000000
#define WIMAX_MAC_HEADER_TYPE_2_MT_FB_CONTENTS 0x03FFFFFF
-static int hf_mac_header_type_2_mt_num_fb_types = -1;
-static int hf_mac_header_type_2_mt_occu_fb_type = -1;
-static int hf_mac_header_type_2_mt_fb_contents = -1;
+static int hf_mac_header_type_2_mt_num_fb_types;
+static int hf_mac_header_type_2_mt_occu_fb_type;
+static int hf_mac_header_type_2_mt_fb_contents;
/* Long-term Precoding Feedback */
/* 2nd & 3rd bytes */
@@ -181,17 +181,17 @@ static int hf_mac_header_type_2_mt_fb_contents = -1;
#define WIMAX_MAC_HEADER_TYPE_2_LT_RANK 0x0300
#define WIMAX_MAC_HEADER_TYPE_2_LT_FEC_QAM 0x00FC
#define WIMAX_MAC_HEADER_TYPE_2_LT_RSV 0x0003
-static int hf_mac_header_type_2_lt_id_fb = -1;
-static int hf_mac_header_type_2_lt_rank = -1;
-static int hf_mac_header_type_2_lt_fec_qam = -1;
-static int hf_mac_header_type_2_lt_rsv = -1;
+static int hf_mac_header_type_2_lt_id_fb;
+static int hf_mac_header_type_2_lt_rank;
+static int hf_mac_header_type_2_lt_fec_qam;
+static int hf_mac_header_type_2_lt_rsv;
/* Combined DL Average CINR of Active BSs */
/* 2nd & 3rd bytes */
#define WIMAX_MAC_HEADER_TYPE_2_COMB_DL_AVE 0xF800
#define WIMAX_MAC_HEADER_TYPE_2_COMB_DL_RSV 0x0EFF
-static int hf_mac_header_type_2_comb_dl_ave = -1;
-static int hf_mac_header_type_2_comb_dl_rsv = -1;
+static int hf_mac_header_type_2_comb_dl_ave;
+static int hf_mac_header_type_2_comb_dl_rsv;
/* MIMO Channel Feedback */
/* 2nd byte */
@@ -211,28 +211,28 @@ static int hf_mac_header_type_2_comb_dl_rsv = -1;
#define WIMAX_MAC_HEADER_TYPE_2_MI 0x0000C0
#define WIMAX_MAC_HEADER_TYPE_2_CT 0x000020
#define WIMAX_MAC_HEADER_TYPE_2_CQI 0x00001F
-static int hf_mac_header_type_2_mimo_diuc = -1;
-static int hf_mac_header_type_2_mimo_pbwi = -1;
-static int hf_mac_header_type_2_mimo_slpb = -1;
-static int hf_mac_header_type_2_mimo_bpri = -1;
-static int hf_mac_header_type_2_mimo_bpri_cid = -1;
-static int hf_mac_header_type_2_mimo_cid = -1;
-static int hf_mac_header_type_2_mimo_cti = -1;
-static int hf_mac_header_type_2_mimo_ai_0 = -1;
-static int hf_mac_header_type_2_mimo_ai_1 = -1;
-static int hf_mac_header_type_2_mimo_ai_2 = -1;
-static int hf_mac_header_type_2_mimo_ai_3 = -1;
-static int hf_mac_header_type_2_mimo_mi = -1;
-static int hf_mac_header_type_2_mimo_ct = -1;
-static int hf_mac_header_type_2_mimo_cqi = -1;
+static int hf_mac_header_type_2_mimo_diuc;
+static int hf_mac_header_type_2_mimo_pbwi;
+static int hf_mac_header_type_2_mimo_slpb;
+static int hf_mac_header_type_2_mimo_bpri;
+static int hf_mac_header_type_2_mimo_bpri_cid;
+static int hf_mac_header_type_2_mimo_cid;
+static int hf_mac_header_type_2_mimo_cti;
+static int hf_mac_header_type_2_mimo_ai_0;
+static int hf_mac_header_type_2_mimo_ai_1;
+static int hf_mac_header_type_2_mimo_ai_2;
+static int hf_mac_header_type_2_mimo_ai_3;
+static int hf_mac_header_type_2_mimo_mi;
+static int hf_mac_header_type_2_mimo_ct;
+static int hf_mac_header_type_2_mimo_cqi;
/* CINR Feedback */
/* 2nd byte */
/*#define WIMAX_MAC_HEADER_TYPE_2_CINR_MEAN 0xFF*/
/* 3rd byte */
/*#define WIMAX_MAC_HEADER_TYPE_2_CINR_DEVI 0xFF*/
-static int hf_mac_header_type_2_cinr_mean = -1;
-static int hf_mac_header_type_2_cinr_devi = -1;
+static int hf_mac_header_type_2_cinr_mean;
+static int hf_mac_header_type_2_cinr_devi;
/* Close-loop MIMO Feedback */
/* 2nd & 3rd bytes */
@@ -247,21 +247,21 @@ static int hf_mac_header_type_2_cinr_devi = -1;
#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CODEBOOK_ID 0x3F00
#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_CQI_2 0x00F8
#define WIMAX_MAC_HEADER_TYPE_2_CL_MIMO_RSV_2 0x000E
-static int hf_mac_header_type_2_cl_mimo_type = -1;
-static int hf_mac_header_type_2_cl_mimo_ant_id = -1;
-static int hf_mac_header_type_2_cl_mimo_cqi = -1;
-static int hf_mac_header_type_2_cl_mimo_cqi_1 = -1;
-static int hf_mac_header_type_2_cl_mimo_cqi_2 = -1;
-static int hf_mac_header_type_2_cl_mimo_rsv = -1;
-static int hf_mac_header_type_2_cl_mimo_rsv_1 = -1;
-static int hf_mac_header_type_2_cl_mimo_rsv_2 = -1;
-static int hf_mac_header_type_2_cl_mimo_streams = -1;
-static int hf_mac_header_type_2_cl_mimo_ant_sel = -1;
-static int hf_mac_header_type_2_cl_mimo_codebook_id = -1;
+static int hf_mac_header_type_2_cl_mimo_type;
+static int hf_mac_header_type_2_cl_mimo_ant_id;
+static int hf_mac_header_type_2_cl_mimo_cqi;
+static int hf_mac_header_type_2_cl_mimo_cqi_1;
+static int hf_mac_header_type_2_cl_mimo_cqi_2;
+static int hf_mac_header_type_2_cl_mimo_rsv;
+static int hf_mac_header_type_2_cl_mimo_rsv_1;
+static int hf_mac_header_type_2_cl_mimo_rsv_2;
+static int hf_mac_header_type_2_cl_mimo_streams;
+static int hf_mac_header_type_2_cl_mimo_ant_sel;
+static int hf_mac_header_type_2_cl_mimo_codebook_id;
/* last byte */
/*#define WIMAX_MAC_HEADER_TYPE_2_HCS 0xFF*/
-static int hf_mac_header_type_2_hcs = -1;
+static int hf_mac_header_type_2_hcs;
/* CID Inclusion Indication messages */
static const value_string cii_msgs[] =
@@ -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 */
@@ -624,7 +624,7 @@ static int dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo,
/* Decode and display the Long-term precoding feedback */
/* Feedback of index */
proto_tree_add_item(ti_tree, hf_mac_header_type_2_lt_id_fb, tvb, offset, 2, ENC_BIG_ENDIAN);
- /* rank of prrecoding codebook */
+ /* rank of precoding codebook */
proto_tree_add_item(ti_tree, hf_mac_header_type_2_lt_rank, tvb, offset, 2, ENC_BIG_ENDIAN);
/* EFC and QAM feedback */
proto_tree_add_item(ti_tree, hf_mac_header_type_2_lt_fec_qam, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -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 57c03977..edd2ed04 100644
--- a/plugins/epan/wimax/mac_mgmt_msg_decoder.c
+++ b/plugins/epan/wimax/mac_mgmt_msg_decoder.c
@@ -23,13 +23,13 @@
void proto_register_mac_mgmt_msg(void);
void proto_reg_handoff_mac_mgmt_msg(void);
-static gint proto_mac_mgmt_msg_decoder = -1;
-static gint ett_mac_mgmt_msg_decoder = -1;
+static int proto_mac_mgmt_msg_decoder;
+static int ett_mac_mgmt_msg_decoder;
-static gint hf_mac_mgmt_msg_type = -1;
-static gint hf_mac_mgmt_msg_values = -1;
+static int hf_mac_mgmt_msg_type;
+static int hf_mac_mgmt_msg_values;
-static expert_field ei_empty_payload = EI_INIT;
+static expert_field ei_empty_payload;
static dissector_table_t subdissector_message_table;
@@ -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 1e6166fd..48573893 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 = -1;
-static gint ett_mac_mgmt_msg_aas_beam_select_decoder = -1;
-static gint ett_mac_mgmt_msg_aas_beam_req_decoder = -1;
-static gint ett_mac_mgmt_msg_aas_beam_rsp_decoder = -1;
+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,25 +61,25 @@ static const value_string vals_resolution_parameter[] =
#endif
/* fix fields */
-/* static gint hf_aas_beam_unknown_type = -1; */
-static gint hf_aas_beam_select_index = -1;
-static gint hf_aas_beam_select_reserved = -1;
+/* 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 = -1;
-static gint hf_aas_beam_feedback_request_number = -1;
-static gint hf_aas_beam_measurement_report_type = -1;
-static gint hf_aas_beam_resolution_parameter = -1;
-static gint hf_aas_beam_beam_bit_mask = -1;
-static int hf_aas_beam_freq_value_re = -1;
-static int hf_aas_beam_freq_value_im = -1;
-static int hf_aas_beam_rssi_value = -1;
-static int hf_aas_beam_cinr_value = -1;
+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;
+static int hf_aas_beam_cinr_value;
#endif
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 31162822..a82451d7 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 = -1;
-static gint ett_mac_mgmt_msg_aas_fbck_req_decoder = -1;
-static gint ett_mac_mgmt_msg_aas_fbck_rsp_decoder = -1;
+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[] =
{
@@ -66,29 +66,29 @@ static const value_string vals_resolutions_1[] =
};
/* fix fields */
-/* static int hf_aas_fbck_unknown_type = -1; */
-static int hf_aas_fbck_frame_number = -1;
-static int hf_aas_fbck_number_of_frames = -1;
-static int hf_aas_fbck_req_data_type = -1;
-static int hf_aas_fbck_rsp_data_type = -1;
-static int hf_aas_fbck_req_counter = -1;
-static int hf_aas_fbck_rsp_counter = -1;
-static int hf_aas_fbck_req_resolution_0 = -1;
-static int hf_aas_fbck_rsp_resolution_0 = -1;
-static int hf_aas_fbck_req_resolution_1 = -1;
-static int hf_aas_fbck_rsp_resolution_1 = -1;
-static int hf_aas_fbck_req_reserved = -1;
-static int hf_aas_fbck_rsp_reserved = -1;
-static int hf_aas_fbck_freq_value_re = -1;
-static int hf_aas_fbck_freq_value_im = -1;
-static int hf_aas_fbck_rssi_value = -1;
-static int hf_aas_fbck_cinr_value = -1;
+/* static int hf_aas_fbck_unknown_type; */
+static int hf_aas_fbck_frame_number;
+static int hf_aas_fbck_number_of_frames;
+static int hf_aas_fbck_req_data_type;
+static int hf_aas_fbck_rsp_data_type;
+static int hf_aas_fbck_req_counter;
+static int hf_aas_fbck_rsp_counter;
+static int hf_aas_fbck_req_resolution_0;
+static int hf_aas_fbck_rsp_resolution_0;
+static int hf_aas_fbck_req_resolution_1;
+static int hf_aas_fbck_rsp_resolution_1;
+static int hf_aas_fbck_req_reserved;
+static int hf_aas_fbck_rsp_reserved;
+static int hf_aas_fbck_freq_value_re;
+static int hf_aas_fbck_freq_value_im;
+static int hf_aas_fbck_rssi_value;
+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 c99a66a2..bff0c570 100644
--- a/plugins/epan/wimax/msg_arq.c
+++ b/plugins/epan/wimax/msg_arq.c
@@ -30,43 +30,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 = -1;
+static int proto_mac_mgmt_msg_arq_decoder;
-static gint ett_mac_mgmt_msg_arq_decoder = -1;
+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 = -1;
-static gint hf_arq_last = -1;
-static gint hf_arq_ack_type = -1;
-static gint hf_ack_type_reserved = -1;
-static gint hf_arq_bsn = -1;
-static gint hf_arq_num_ack_maps = -1;
-static gint hf_arq_selective_map = -1;
-static gint hf_arq_seq_format = -1;
-static gint hf_arq_0seq_ack_map = -1;
-static gint hf_arq_0seq1_len = -1;
-static gint hf_arq_0seq2_len = -1;
-static gint hf_arq_1seq_ack_map = -1;
-static gint hf_arq_1seq1_len = -1;
-static gint hf_arq_1seq2_len = -1;
-static gint hf_arq_1seq3_len = -1;
-static gint hf_arq_reserved = -1;
-
-static gint hf_arq_discard_cid = -1;
-static gint hf_arq_discard_reserved = -1;
-static gint hf_arq_discard_bsn = -1;
-
-static gint hf_arq_reset_cid = -1;
-static gint hf_arq_reset_type = -1;
-static gint hf_arq_reset_direction = -1;
-static gint hf_arq_reset_reserved = -1;
+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 +298,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 +326,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 +355,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 3fac08db..95411ef0 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 = -1;
+static int proto_mac_mgmt_msg_clk_cmp_decoder;
-static gint ett_mac_mgmt_msg_clk_cmp_decoder = -1;
+static int ett_mac_mgmt_msg_clk_cmp_decoder;
/* CLK_CMP fields */
-static gint hf_clk_cmp_clock_count = -1;
-static gint hf_clk_cmp_clock_id = -1;
-static gint hf_clk_cmp_seq_number = -1;
-static gint hf_clk_cmp_comparison_value = -1;
-/* static gint hf_clk_cmp_invalid_tlv = -1; */
+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 167e0742..787cd0af 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 = -1;
-static gint ett_mac_mgmt_msg_dcd_decoder = -1;
+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 = -1;
-static gint hf_dcd_config_change_count = -1;
-static gint hf_dcd_dl_burst_profile_rsv = -1;
-static gint hf_dcd_dl_burst_profile_diuc = -1;
+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 = -1;
-static gint hf_dcd_frame_duration = -1;
-static gint hf_dcd_phy_type = -1;
-static gint hf_dcd_power_adjustment = -1;
-static gint hf_dcd_channel_nr = -1;
-static gint hf_dcd_ttg = -1;
-static gint hf_dcd_rtg = -1;
+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 = -1;
+static int hf_dcd_rss;
#endif
-static gint hf_dcd_channel_switch_frame_nr = -1;
-static gint hf_dcd_frequency = -1;
-static gint hf_dcd_bs_id = -1;
-static gint hf_dcd_frame_duration_code = -1;
-static gint hf_dcd_frame_nr = -1;
+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 = -1;
-static gint hf_dcd_h_arq_ack_delay_dl = -1;
+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 = -1;
+static int hf_dcd_h_arq_ack_delay_ul;
#endif
-static gint hf_dcd_mac_version = -1;
-static gint hf_dcd_restart_count = -1;
+static int hf_dcd_mac_version;
+static int hf_dcd_restart_count;
-/* static gint hf_dl_burst_reserved = -1; */
-/* static gint hf_dl_burst_diuc = -1; */
-static gint hf_dcd_burst_freq = -1;
-static gint hf_dcd_burst_fec = -1;
-static gint hf_dcd_burst_diuc_exit_threshold = -1;
-static gint hf_dcd_burst_diuc_entry_threshold = -1;
-static gint hf_dcd_burst_tcs = -1;
-static gint hf_dcd_tlv_t_19_permutation_type_for_broadcast_regions_in_harq_zone = -1;
-static gint hf_dcd_tlv_t_20_maximum_retransmission = -1;
-static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter = -1;
-static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_physical_cinr_measurements = -1;
-static gint hf_dcd_tlv_t_21_default_rssi_and_cinr_averaging_parameter_rssi_measurements = -1;
-static gint hf_dcd_tlv_t_22_dl_amc_allocated_physical_bands_bitmap = -1;
+/* 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 = -1;
-static gint hf_dcd_tlv_t_34_dl_region_definition_num_region = -1;
-static gint hf_dcd_tlv_t_34_dl_region_definition_reserved = -1;
-static gint hf_dcd_tlv_t_34_dl_region_definition_symbol_offset = -1;
-static gint hf_dcd_eirxp = -1;
-static gint hf_dcd_tlv_t_34_dl_region_definition_subchannel_offset = -1;
-static gint hf_dcd_tlv_t_34_dl_region_definition_num_symbols = -1;
-static gint hf_dcd_tlv_t_34_dl_region_definition_num_subchannels = -1;
-static gint hf_dcd_tlv_t_50_ho_type_support = -1;
-static gint hf_dcd_tlv_t_50_ho_type_support_ho = -1;
-static gint hf_dcd_tlv_t_50_ho_type_support_mdho = -1;
-static gint hf_dcd_tlv_t_50_ho_type_support_fbss_ho = -1;
-static gint hf_dcd_tlv_t_50_ho_type_support_reserved = -1;
-static gint hf_dcd_tlv_t_31_h_add_threshold = -1;
-static gint hf_dcd_tlv_t_45_paging_interval_length = -1;
-static gint hf_dcd_tlv_t_45_paging_interval_reserved = -1;
-static gint hf_dcd_tlv_t_32_h_delete_threshold = -1;
-static gint hf_dcd_tlv_t_33_asr = -1;
-static gint hf_dcd_tlv_t_33_asr_m = -1;
-static gint hf_dcd_tlv_t_33_asr_l = -1;
-static gint hf_dcd_tlv_t_35_paging_group_id = -1;
-static gint hf_dcd_tlv_t_36_tusc1_permutation_active_subchannels_bitmap = -1;
-static gint hf_dcd_tlv_t_37_tusc2_permutation_active_subchannels_bitmap = -1;
-static gint hf_dcd_tlv_t_51_hysteresis_margin = -1;
-static gint hf_dcd_tlv_t_52_time_to_trigger_duration = -1;
-static gint hf_dcd_tlv_t_60_noise_interference = -1;
-static gint hf_dcd_tlv_t_153_downlink_burst_profile_for_mutiple_fec_types = -1;
+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 = -1;
-static gint hf_dcd_tlv_t_541_type = -1;
-static gint hf_dcd_tlv_t_541_function = -1;
-static gint hf_dcd_tlv_t_541_action = -1;
-static gint hf_dcd_tlv_t_542_trigger_value = -1;
-static gint hf_dcd_tlv_t_543_trigger_averaging_duration = -1;
+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 = -1;
-static gint hf_dcd_invalid_tlv = -1;
+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 4df5f213..aba33af5 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 = -1;
-
-static gint ett_dlmap = -1;
-static gint ett_dlmap_ie = -1;
-/* static gint ett_dlmap_c_ie = -1; */
-static gint ett_109x = -1; /* SUB-DL-UL-MAP */
-static gint ett_109x_dl = -1;
-static gint ett_109x_ul = -1;
-static gint ett_275_phy = -1;
-static gint ett_275_1 = -1;
-static gint ett_277 = -1;
-static gint ett_277b = -1;
-static gint ett_278 = -1;
-static gint ett_279 = -1;
-static gint ett_280 = -1;
-static gint ett_281 = -1;
-static gint ett_282 = -1;
-static gint ett_283 = -1;
-static gint ett_284 = -1;
-static gint ett_285 = -1;
-static gint ett_286 = -1;
-static gint ett_286a = -1;
-static gint ett_286b = -1;
-static gint ett_286c = -1;
-static gint ett_286d = -1;
-static gint ett_286e = -1;
-static gint ett_286f = -1;
-static gint ett_286g = -1;
-static gint ett_286h = -1;
-static gint ett_286i = -1;
-static gint ett_286j = -1;
-static gint ett_286k = -1;
-static gint ett_286l = -1;
-static gint ett_286m = -1;
-static gint ett_286n = -1;
-static gint ett_286o = -1;
-static gint ett_286p = -1;
-static gint ett_286q = -1;
-static gint ett_286r = -1;
-static gint ett_286s = -1;
-static gint ett_286t = -1;
-static gint ett_286u = -1;
-static gint ett_286v = -1;
-static gint ett_286w = -1;
-static gint ett_286x = -1;
-static gint ett_286y = -1;
-static gint ett_286z = -1;
-static gint ett_305 = -1;
-/* static gint ett_305_dl = -1; */
-static gint ett_308a = -1;
+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,368 +233,368 @@ static const value_string frames_per_second[] =
};
/* dl-map fields */
-static gint hf_dlmap_phy_fdur = -1;
-static gint hf_dlmap_phy_fdur_ms = -1;
-static gint hf_dlmap_phy_fdur_per_sec = -1;
-static gint hf_dlmap_phy_fnum = -1;
-/* static gint hf_dlmap_fch_expected = -1; */
-static gint hf_dlmap_dcd = -1;
-static gint hf_dlmap_bsid = -1;
-static gint hf_dlmap_ofdma_sym = -1;
-/* static gint hf_dlmap_ie = -1; */
-static gint hf_dlmap_ie_diuc = -1;
-static gint hf_dlmap_ie_reserved_extended2_duic = -1;
-static gint hf_dlmap_ie_reserved_extended_duic = -1;
-static gint hf_dlmap_ie_diuc_ext = -1;
-static gint hf_dlmap_ie_diuc_ext2 = -1;
-static gint hf_dlmap_ie_length = -1;
-static gint hf_dlmap_ie_bitmap = -1;
-static gint hf_dlmap_ie_bitmap_cqi = -1;
-static gint hf_dlmap_ie_bitmap_pusc = -1;
-static gint hf_dlmap_ie_bitmap_opt_pusc = -1;
-static gint hf_dlmap_ie_bitmap_amc = -1;
-static gint hf_dlmap_ie_bitmap_aas = -1;
-static gint hf_dlmap_ie_bitmap_periodic_ranging = -1;
-static gint hf_dlmap_ie_bitmap_sounding = -1;
-static gint hf_dlmap_ie_bitmap_mimo = -1;
-static gint hf_dlmap_ie_ncid = -1;
-static gint hf_dlmap_ie_cid = -1;
-static gint hf_dlmap_ie_offsym = -1;
-static gint hf_dlmap_ie_offsub = -1;
-static gint hf_dlmap_ie_boosting = -1;
-static gint hf_dlmap_ie_numsym = -1;
-static gint hf_dlmap_ie_numsub = -1;
-static gint hf_dlmap_ie_rep = -1;
-static gint hf_dlmap_ie_offsym2 = -1;
-static gint hf_dlmap_ie_offsub2 = -1;
-static gint hf_dlmap_ie_boosting2 = -1;
-static gint hf_dlmap_ie_numsym2 = -1;
-static gint hf_dlmap_ie_numsub2 = -1;
-static gint hf_dlmap_ie_rep2 = -1;
-
-/* static gint hf_dlmap_xie_diuc = -1; */
-/* static gint hf_dlmap_xie_len = -1; */
-
-static gint hf_dlmapc_compr = -1;
-static gint hf_dlmapc_ulmap = -1;
-static gint hf_dlmapc_rsv = -1;
-static gint hf_dlmapc_len = -1;
-/* static gint hf_dlmapc_sync = -1; */
-static gint hf_dlmapc_opid = -1;
-static gint hf_dlmapc_secid = -1;
-static gint hf_dlmapc_count = -1;
+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 = -1;
-static gint hf_109x_len = -1;
-static gint hf_109x_rcid = -1;
-static gint hf_109x_haoi = -1;
-static gint hf_109x_dl = -1;
-static gint hf_109x_ul = -1;
-static gint hf_109x_dlie = -1;
-static gint hf_109x_symofs = -1;
-static gint hf_109x_subofs = -1;
-static gint hf_109x_rsv = -1;
+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 = -1;
-static gint hf_308a_ulmap = -1;
-static gint hf_308a_type = -1;
-static gint hf_308a_mult = -1;
-static gint hf_308a_rsv = -1;
-static gint hf_mac_header_compress_dlmap_crc = -1;
-static gint hf_mac_header_compress_dlmap_crc_status = -1;
-static gint hf_crc16 = -1;
-static gint hf_crc16_status = -1;
-static gint hf_padding = -1;
-static gint hf_cid_mask = -1;
-static gint hf_reserved = -1;
+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 = -1;
-static int hf_dlmap_rcid_ie_prefix = -1;
-static int hf_dlmap_rcid_ie_cid11 = -1;
-static int hf_dlmap_rcid_ie_cid7 = -1;
-static int hf_dlmap_rcid_ie_cid3 = -1;
-static int hf_dlmap_dedicated_dl_control_length = -1;
-static int hf_dlmap_dedicated_dl_control_control_header = -1;
-static int hf_dlmap_dedicated_dl_control_num_sdma_layers = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_length = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_control_header_mimo_control_info = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_control_header_cqi_control_info = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_control_header_closed_mimo_control_info = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_n_layer = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_matrix = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_num_beamformed_streams = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_period = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_frame_offset = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_duration = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_allocation_index = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_cqich_num = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_feedback_type = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_antenna_grouping_index = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_num_stream = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_antenna_selection_index = -1;
-static int hf_dlmap_dedicated_mimo_dl_control_codebook_precoding_index = -1;
-static int hf_dlmap_n_sub_burst_isi = -1;
-static int hf_dlmap_harq_chase_n_ack_channel = -1;
-static int hf_dlmap_harq_chase_duration = -1;
-static int hf_dlmap_harq_chase_sub_burst_diuc_indicator = -1;
-static int hf_dlmap_reserved_uint = -1;
-static int hf_dlmap_harq_chase_diuc = -1;
-static int hf_dlmap_harq_chase_repetition_coding_indication = -1;
-static int hf_dlmap_harq_chase_acid = -1;
-static int hf_dlmap_harq_chase_ai_sn = -1;
-static int hf_dlmap_harq_chase_ack_disable = -1;
-static int hf_dlmap_harq_chase_dedicated_dl_control_indicator = -1;
-static int hf_dlmap_harq_chase_allocation_index = -1;
-static int hf_dlmap_harq_chase_period = -1;
-static int hf_dlmap_harq_chase_frame_offset = -1;
-static int hf_dlmap_harq_ir_ctc_n_ack_channel = -1;
-static int hf_dlmap_harq_ir_ctc_nep = -1;
-static int hf_dlmap_harq_ir_ctc_nsch = -1;
-static int hf_dlmap_harq_ir_ctc_spid = -1;
-static int hf_dlmap_harq_ir_ctc_acid = -1;
-static int hf_dlmap_harq_ir_ctc_ai_sn = -1;
-static int hf_dlmap_harq_ir_ctc_ack_disable = -1;
-static int hf_dlmap_harq_ir_ctc_dedicated_dl_control_indicator = -1;
-static int hf_dlmap_harq_ir_ctc_duration = -1;
-static int hf_dlmap_harq_ir_ctc_allocation_index = -1;
-static int hf_dlmap_harq_ir_ctc_period = -1;
-static int hf_dlmap_harq_ir_ctc_frame_offset = -1;
-static int hf_dlmap_harq_ir_cc_n_ack_channel = -1;
-static int hf_dlmap_harq_ir_cc_duration = -1;
-static int hf_dlmap_harq_ir_cc_sub_burst_diuc_indicator = -1;
-static int hf_dlmap_harq_ir_cc_diuc = -1;
-static int hf_dlmap_harq_ir_cc_repetition_coding_indication = -1;
-static int hf_dlmap_harq_ir_cc_acid = -1;
-static int hf_dlmap_harq_ir_cc_ai_sn = -1;
-static int hf_dlmap_harq_ir_cc_spid = -1;
-static int hf_dlmap_harq_ir_cc_ack_disable = -1;
-static int hf_dlmap_harq_ir_cc_dedicated_dl_control_indicator = -1;
-static int hf_dlmap_harq_ir_cc_allocation_index = -1;
-static int hf_dlmap_harq_ir_cc_period = -1;
-static int hf_dlmap_harq_ir_cc_frame_offset = -1;
-static int hf_dlmap_mimo_dl_chase_harq_n_ack_channel = -1;
-static int hf_dlmap_mimo_dl_chase_harq_mu_indicator = -1;
-static int hf_dlmap_mimo_dl_chase_harq_dedicated_mimo_dl_control_indicator = -1;
-static int hf_dlmap_mimo_dl_chase_harq_ack_disable = -1;
-static int hf_dlmap_mimo_dl_chase_harq_duration = -1;
-static int hf_dlmap_mimo_dl_chase_harq_diuc = -1;
-static int hf_dlmap_mimo_dl_chase_harq_repetition_coding_indication = -1;
-static int hf_dlmap_mimo_dl_chase_harq_acid = -1;
-static int hf_dlmap_mimo_dl_chase_harq_ai_sn = -1;
-static int hf_dlmap_mimo_dl_ir_harq_n_ack_channel = -1;
-static int hf_dlmap_mimo_dl_ir_harq_mu_indicator = -1;
-static int hf_dlmap_mimo_dl_ir_harq_dedicated_mimo_dl_control_indicator = -1;
-static int hf_dlmap_mimo_dl_ir_harq_ack_disable = -1;
-static int hf_dlmap_mimo_dl_ir_harq_nsch = -1;
-static int hf_dlmap_mimo_dl_ir_harq_nep = -1;
-static int hf_dlmap_mimo_dl_ir_harq_spid = -1;
-static int hf_dlmap_mimo_dl_ir_harq_acid = -1;
-static int hf_dlmap_mimo_dl_ir_harq_ai_sn = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_n_ack_channel = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_mu_indicator = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_dedicated_mimo_dl_control_indicator = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_ack_disable = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_duration = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_diuc = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_repetition_coding_indication = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_acid = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_ai_sn = -1;
-static int hf_dlmap_mimo_dl_ir_harq_cc_spid = -1;
-static int hf_dlmap_mimo_dl_stc_harq_n_ack_channel = -1;
-static int hf_dlmap_mimo_dl_stc_harq_tx_count = -1;
-static int hf_dlmap_mimo_dl_stc_harq_duration = -1;
-static int hf_dlmap_mimo_dl_stc_harq_sub_burst_offset_indication = -1;
-static int hf_dlmap_mimo_dl_stc_harq_sub_burst_offset = -1;
-static int hf_dlmap_mimo_dl_stc_harq_ack_disable = -1;
-static int hf_dlmap_mimo_dl_stc_harq_dedicated_mimo_dl_control_indicator = -1;
-static int hf_dlmap_mimo_dl_stc_harq_diuc = -1;
-static int hf_dlmap_mimo_dl_stc_harq_repetition_coding_indication = -1;
-static int hf_dlmap_mimo_dl_stc_harq_acid = -1;
-static int hf_dlmap_mbs_map_extended_2_diuc = -1;
-static int hf_dlmap_mbs_map_mbs_zone_identifier = -1;
-static int hf_dlmap_mbs_map_macro_diversity_enhanced = -1;
-static int hf_dlmap_mbs_map_permutation = -1;
-static int hf_dlmap_mbs_map_dl_permbase = -1;
-static int hf_dlmap_mbs_map_prbs_id = -1;
-static int hf_dlmap_mbs_map_ofdma_symbol_offset = -1;
-static int hf_dlmap_mbs_map_diuc_change_indication = -1;
-static int hf_dlmap_mbs_map_boosting = -1;
-static int hf_dlmap_mbs_map_diuc = -1;
-static int hf_dlmap_mbs_map_num_subchannels = -1;
-static int hf_dlmap_mbs_map_num_ofdma_symbols = -1;
-static int hf_dlmap_mbs_map_repetition_coding_indication = -1;
-static int hf_dlmap_mbs_map_cid = -1;
-static int hf_dlmap_mbs_map_ofdma_symbols_offset = -1;
-static int hf_dlmap_mbs_map_subchannel_offset = -1;
-static int hf_dlmap_mbs_map_slc_3_indication = -1;
-static int hf_dlmap_mbs_map_next_mbs_map_ie_frame_offset = -1;
-static int hf_dlmap_skip_extended_2_diuc = -1;
-static int hf_dlmap_skip_mode = -1;
-static int hf_dlmap_harq_dl_map_extended_2_diuc = -1;
-static int hf_dlmap_harq_dl_map_rcid_type = -1;
-static int hf_dlmap_harq_dl_map_boosting = -1;
-static int hf_dlmap_harq_dl_map_region_id_use_indicator = -1;
-static int hf_dlmap_harq_dl_map_ofdma_symbol_offset = -1;
-static int hf_dlmap_harq_dl_map_subchannel_offset = -1;
-static int hf_dlmap_harq_dl_map_number_of_ofdma_symbols = -1;
-static int hf_dlmap_harq_dl_map_number_of_subchannels = -1;
-static int hf_dlmap_harq_dl_map_rectangular_sub_burst_indicator = -1;
-static int hf_dlmap_harq_dl_map_region_id = -1;
-static int hf_dlmap_harq_dl_map_mode = -1;
-static int hf_dlmap_harq_dl_map_sub_burst_ie_length = -1;
-static int hf_dlmap_harq_dl_map_reserved_mode = -1;
-static int hf_dlmap_harq_ack_bitmap_data = -1;
-static int hf_dlmap_enhanced_dl_map_extended_2_diuc = -1;
-static int hf_dlmap_enhanced_dl_map_num_assignment = -1;
-static int hf_dlmap_enhanced_dl_map_n_cid = -1;
-static int hf_dlmap_enhanced_dl_map_cid = -1;
-static int hf_dlmap_enhanced_dl_map_diuc = -1;
-static int hf_dlmap_enhanced_dl_map_boosting = -1;
-static int hf_dlmap_enhanced_dl_map_repetition_coding_indication = -1;
-static int hf_dlmap_enhanced_dl_map_region_id = -1;
-static int hf_dlmap_aas_sdma_dl_extended_2_diuc = -1;
-static int hf_dlmap_aas_sdma_dl_rcid_type = -1;
-static int hf_dlmap_aas_sdma_dl_num_burst_region = -1;
-static int hf_dlmap_aas_sdma_dl_ofdma_symbol_offset = -1;
-static int hf_dlmap_aas_sdma_dl_subchannel_offset = -1;
-static int hf_dlmap_aas_sdma_dl_num_ofdma_triple_symbols = -1;
-static int hf_dlmap_aas_sdma_dl_num_subchannels = -1;
-static int hf_dlmap_aas_sdma_dl_number_of_users = -1;
-static int hf_dlmap_aas_sdma_dl_encoding_mode = -1;
-static int hf_dlmap_aas_sdma_dl_cqich_allocation = -1;
-static int hf_dlmap_aas_sdma_dl_ackch_allocation = -1;
-static int hf_dlmap_aas_sdma_dl_pilot_pattern_modifier = -1;
-static int hf_dlmap_aas_sdma_dl_preamble_modifier_index = -1;
-static int hf_dlmap_aas_sdma_dl_pilot_pattern = -1;
-static int hf_dlmap_aas_sdma_dl_diuc = -1;
-static int hf_dlmap_aas_sdma_dl_repetition_coding_indication = -1;
-static int hf_dlmap_aas_sdma_dl_ack_ch_index = -1;
-static int hf_dlmap_aas_sdma_dl_acid = -1;
-static int hf_dlmap_aas_sdma_dl_ai_sn = -1;
-static int hf_dlmap_aas_sdma_dl_nep = -1;
-static int hf_dlmap_aas_sdma_dl_nsch = -1;
-static int hf_dlmap_aas_sdma_dl_spid = -1;
-static int hf_dlmap_aas_sdma_dl_allocation_index = -1;
-static int hf_dlmap_aas_sdma_dl_period = -1;
-static int hf_dlmap_aas_sdma_dl_frame_offset = -1;
-static int hf_dlmap_aas_sdma_dl_duration = -1;
-static int hf_dlmap_channel_measurement_channel_nr = -1;
-static int hf_dlmap_channel_measurement_ofdma_symbol_offset = -1;
-static int hf_dlmap_channel_measurement_cid = -1;
-static int hf_dlmap_stc_zone_ofdma_symbol_offset = -1;
-static int hf_dlmap_stc_zone_permutations = -1;
-static int hf_dlmap_stc_zone_use_all_sc_indicator = -1;
-static int hf_dlmap_stc_zone_stc = -1;
-static int hf_dlmap_stc_zone_matrix_indicator = -1;
-static int hf_dlmap_stc_zone_dl_permbase = -1;
-static int hf_dlmap_stc_zone_prbs_id = -1;
-static int hf_dlmap_stc_zone_amc_type = -1;
-static int hf_dlmap_stc_zone_midamble_presence = -1;
-static int hf_dlmap_stc_zone_midamble_boosting = -1;
-static int hf_dlmap_stc_zone_2_3_antenna_select = -1;
-static int hf_dlmap_stc_zone_dedicated_pilots = -1;
-static int hf_dlmap_aas_dl_ofdma_symbol_offset = -1;
-static int hf_dlmap_aas_dl_permutation = -1;
-static int hf_dlmap_aas_dl_dl_permbase = -1;
-static int hf_dlmap_aas_dl_downlink_preamble_config = -1;
-static int hf_dlmap_aas_dl_preamble_type = -1;
-static int hf_dlmap_aas_dl_prbs_id = -1;
-static int hf_dlmap_aas_dl_diversity_map = -1;
-static int hf_dlmap_data_location_another_bs_segment = -1;
-static int hf_dlmap_data_location_another_bs_used_subchannels = -1;
-static int hf_dlmap_data_location_another_bs_diuc = -1;
-static int hf_dlmap_data_location_another_bs_frame_advance = -1;
-static int hf_dlmap_data_location_another_bs_ofdma_symbol_offset = -1;
-static int hf_dlmap_data_location_another_bs_subchannel_offset = -1;
-static int hf_dlmap_data_location_another_bs_boosting = -1;
-static int hf_dlmap_data_location_another_bs_preamble_index = -1;
-static int hf_dlmap_data_location_another_bs_num_ofdma_symbols = -1;
-static int hf_dlmap_data_location_another_bs_num_subchannels = -1;
-static int hf_dlmap_data_location_another_bs_repetition_coding_indication = -1;
-static int hf_dlmap_data_location_another_bs_cid = -1;
-static int hf_dlmap_harq_map_pointer_diuc = -1;
-static int hf_dlmap_harq_map_pointer_num_slots = -1;
-static int hf_dlmap_harq_map_pointer_repetition_coding_indication = -1;
-static int hf_dlmap_harq_map_pointer_map_version = -1;
-static int hf_dlmap_harq_map_pointer_idle_users = -1;
-static int hf_dlmap_harq_map_pointer_sleep_users = -1;
-static int hf_dlmap_harq_map_pointer_cid_mask_length = -1;
-static int hf_dlmap_phymod_dl_preamble_modifier_type = -1;
-static int hf_dlmap_phymod_dl_preamble_frequency_shift_index = -1;
-static int hf_dlmap_phymod_dl_preamble_time_shift_index = -1;
-static int hf_dlmap_phymod_dl_pilot_pattern_modifier = -1;
-static int hf_dlmap_phymod_dl_pilot_pattern_index = -1;
-static int hf_dlmap_broadcast_ctrl_ptr_dcd_ucd_transmission_frame = -1;
-static int hf_dlmap_broadcast_ctrl_ptr_skip_broadcast_system_update = -1;
-static int hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_type = -1;
-static int hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_transmission_frame = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_cid = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_diuc = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_segment = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_boosting = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_idcell = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_dl_permbase = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_prbs_id = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_repetition_coding_indication = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_used_subchannels = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_ofdma_symbol_offset = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_num_ofdma_symbols = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_subchannel_offset = -1;
-static int hf_dlmap_dl_pusc_burst_allocation_num_subchannels = -1;
-static int hf_dlmap_pusc_asca_alloc_diuc = -1;
-static int hf_dlmap_pusc_asca_alloc_short_basic_cid = -1;
-static int hf_dlmap_pusc_asca_alloc_ofdma_symbol_offset = -1;
-static int hf_dlmap_pusc_asca_alloc_subchannel_offset = -1;
-static int hf_dlmap_pusc_asca_alloc_num_ofdma_symbols = -1;
-static int hf_dlmap_pusc_asca_alloc_num_symbols = -1;
-static int hf_dlmap_pusc_asca_alloc_repetition_coding_information = -1;
-static int hf_dlmap_pusc_asca_alloc_permutation_id = -1;
-static int hf_dlmap_reduced_aas_num_ie = -1;
-static int hf_dlmap_reduced_aas_periodicity = -1;
-static int hf_dlmap_reduced_aas_cid_included = -1;
-static int hf_dlmap_reduced_aas_dcd_count_included = -1;
-static int hf_dlmap_reduced_aas_phy_modification_included = -1;
-static int hf_dlmap_reduced_aas_cqich_control_indicator = -1;
-static int hf_dlmap_reduced_aas_encoding_mode = -1;
-static int hf_dlmap_reduced_aas_separate_mcs_enabled = -1;
-static int hf_dlmap_reduced_aas_duration = -1;
-static int hf_dlmap_reduced_aas_diuc = -1;
-static int hf_dlmap_reduced_aas_repetition_coding_indication = -1;
-static int hf_dlmap_reduced_aas_cid = -1;
-static int hf_dlmap_reduced_aas_allocation_index = -1;
-static int hf_dlmap_reduced_aas_report_period = -1;
-static int hf_dlmap_reduced_aas_frame_offset = -1;
-static int hf_dlmap_reduced_aas_report_duration = -1;
-static int hf_dlmap_reduced_aas_cqi_measurement_type = -1;
-static int hf_dlmap_reduced_aas_dcd_count = -1;
-static int hf_dlmap_reduced_aas_preamble_select = -1;
-static int hf_dlmap_reduced_aas_preamble_shift_index = -1;
-static int hf_dlmap_reduced_aas_pilot_pattern_modifier = -1;
-static int hf_dlmap_reduced_aas_pilot_pattern_index = -1;
-static int hf_dlmap_reduced_aas_dl_frame_offset = -1;
-static int hf_dlmap_reduced_aas_zone_symbol_offset = -1;
-static int hf_dlmap_reduced_aas_ofdma_symbol_offset = -1;
-static int hf_dlmap_reduced_aas_subchannel_offset = -1;
-static int hf_dlmap_reduced_aas_num_ofdma_triple_symbol = -1;
-static int hf_dlmap_reduced_aas_num_subchannels = -1;
-static int hf_dlmap_reduced_aas_num_ofdma_symbols = -1;
-static int hf_dlmap_reduced_aas_diuc_nep = -1;
-static int hf_dlmap_reduced_aas_dl_harq_ack_bitmap = -1;
-static int hf_dlmap_reduced_aas_ack_allocation_index = -1;
-static int hf_dlmap_reduced_aas_acid = -1;
-static int hf_dlmap_reduced_aas_ai_sn = -1;
-static int hf_dlmap_reduced_aas_nsch = -1;
-static int hf_dlmap_reduced_aas_spid = -1;
-
-
-
-static expert_field ei_dlmap_not_implemented = EI_INIT;
-static expert_field ei_crc16 = EI_INIT;
-static expert_field ei_mac_header_compress_dlmap_crc = EI_INIT;
-static expert_field ei_mac_header_invalid_length = EI_INIT;
+static int hf_dlmap_rcid_ie_cid;
+static int hf_dlmap_rcid_ie_prefix;
+static int hf_dlmap_rcid_ie_cid11;
+static int hf_dlmap_rcid_ie_cid7;
+static int hf_dlmap_rcid_ie_cid3;
+static int hf_dlmap_dedicated_dl_control_length;
+static int hf_dlmap_dedicated_dl_control_control_header;
+static int hf_dlmap_dedicated_dl_control_num_sdma_layers;
+static int hf_dlmap_dedicated_mimo_dl_control_length;
+static int hf_dlmap_dedicated_mimo_dl_control_control_header_mimo_control_info;
+static int hf_dlmap_dedicated_mimo_dl_control_control_header_cqi_control_info;
+static int hf_dlmap_dedicated_mimo_dl_control_control_header_closed_mimo_control_info;
+static int hf_dlmap_dedicated_mimo_dl_control_n_layer;
+static int hf_dlmap_dedicated_mimo_dl_control_matrix;
+static int hf_dlmap_dedicated_mimo_dl_control_num_beamformed_streams;
+static int hf_dlmap_dedicated_mimo_dl_control_period;
+static int hf_dlmap_dedicated_mimo_dl_control_frame_offset;
+static int hf_dlmap_dedicated_mimo_dl_control_duration;
+static int hf_dlmap_dedicated_mimo_dl_control_allocation_index;
+static int hf_dlmap_dedicated_mimo_dl_control_cqich_num;
+static int hf_dlmap_dedicated_mimo_dl_control_feedback_type;
+static int hf_dlmap_dedicated_mimo_dl_control_antenna_grouping_index;
+static int hf_dlmap_dedicated_mimo_dl_control_num_stream;
+static int hf_dlmap_dedicated_mimo_dl_control_antenna_selection_index;
+static int hf_dlmap_dedicated_mimo_dl_control_codebook_precoding_index;
+static int hf_dlmap_n_sub_burst_isi;
+static int hf_dlmap_harq_chase_n_ack_channel;
+static int hf_dlmap_harq_chase_duration;
+static int hf_dlmap_harq_chase_sub_burst_diuc_indicator;
+static int hf_dlmap_reserved_uint;
+static int hf_dlmap_harq_chase_diuc;
+static int hf_dlmap_harq_chase_repetition_coding_indication;
+static int hf_dlmap_harq_chase_acid;
+static int hf_dlmap_harq_chase_ai_sn;
+static int hf_dlmap_harq_chase_ack_disable;
+static int hf_dlmap_harq_chase_dedicated_dl_control_indicator;
+static int hf_dlmap_harq_chase_allocation_index;
+static int hf_dlmap_harq_chase_period;
+static int hf_dlmap_harq_chase_frame_offset;
+static int hf_dlmap_harq_ir_ctc_n_ack_channel;
+static int hf_dlmap_harq_ir_ctc_nep;
+static int hf_dlmap_harq_ir_ctc_nsch;
+static int hf_dlmap_harq_ir_ctc_spid;
+static int hf_dlmap_harq_ir_ctc_acid;
+static int hf_dlmap_harq_ir_ctc_ai_sn;
+static int hf_dlmap_harq_ir_ctc_ack_disable;
+static int hf_dlmap_harq_ir_ctc_dedicated_dl_control_indicator;
+static int hf_dlmap_harq_ir_ctc_duration;
+static int hf_dlmap_harq_ir_ctc_allocation_index;
+static int hf_dlmap_harq_ir_ctc_period;
+static int hf_dlmap_harq_ir_ctc_frame_offset;
+static int hf_dlmap_harq_ir_cc_n_ack_channel;
+static int hf_dlmap_harq_ir_cc_duration;
+static int hf_dlmap_harq_ir_cc_sub_burst_diuc_indicator;
+static int hf_dlmap_harq_ir_cc_diuc;
+static int hf_dlmap_harq_ir_cc_repetition_coding_indication;
+static int hf_dlmap_harq_ir_cc_acid;
+static int hf_dlmap_harq_ir_cc_ai_sn;
+static int hf_dlmap_harq_ir_cc_spid;
+static int hf_dlmap_harq_ir_cc_ack_disable;
+static int hf_dlmap_harq_ir_cc_dedicated_dl_control_indicator;
+static int hf_dlmap_harq_ir_cc_allocation_index;
+static int hf_dlmap_harq_ir_cc_period;
+static int hf_dlmap_harq_ir_cc_frame_offset;
+static int hf_dlmap_mimo_dl_chase_harq_n_ack_channel;
+static int hf_dlmap_mimo_dl_chase_harq_mu_indicator;
+static int hf_dlmap_mimo_dl_chase_harq_dedicated_mimo_dl_control_indicator;
+static int hf_dlmap_mimo_dl_chase_harq_ack_disable;
+static int hf_dlmap_mimo_dl_chase_harq_duration;
+static int hf_dlmap_mimo_dl_chase_harq_diuc;
+static int hf_dlmap_mimo_dl_chase_harq_repetition_coding_indication;
+static int hf_dlmap_mimo_dl_chase_harq_acid;
+static int hf_dlmap_mimo_dl_chase_harq_ai_sn;
+static int hf_dlmap_mimo_dl_ir_harq_n_ack_channel;
+static int hf_dlmap_mimo_dl_ir_harq_mu_indicator;
+static int hf_dlmap_mimo_dl_ir_harq_dedicated_mimo_dl_control_indicator;
+static int hf_dlmap_mimo_dl_ir_harq_ack_disable;
+static int hf_dlmap_mimo_dl_ir_harq_nsch;
+static int hf_dlmap_mimo_dl_ir_harq_nep;
+static int hf_dlmap_mimo_dl_ir_harq_spid;
+static int hf_dlmap_mimo_dl_ir_harq_acid;
+static int hf_dlmap_mimo_dl_ir_harq_ai_sn;
+static int hf_dlmap_mimo_dl_ir_harq_cc_n_ack_channel;
+static int hf_dlmap_mimo_dl_ir_harq_cc_mu_indicator;
+static int hf_dlmap_mimo_dl_ir_harq_cc_dedicated_mimo_dl_control_indicator;
+static int hf_dlmap_mimo_dl_ir_harq_cc_ack_disable;
+static int hf_dlmap_mimo_dl_ir_harq_cc_duration;
+static int hf_dlmap_mimo_dl_ir_harq_cc_diuc;
+static int hf_dlmap_mimo_dl_ir_harq_cc_repetition_coding_indication;
+static int hf_dlmap_mimo_dl_ir_harq_cc_acid;
+static int hf_dlmap_mimo_dl_ir_harq_cc_ai_sn;
+static int hf_dlmap_mimo_dl_ir_harq_cc_spid;
+static int hf_dlmap_mimo_dl_stc_harq_n_ack_channel;
+static int hf_dlmap_mimo_dl_stc_harq_tx_count;
+static int hf_dlmap_mimo_dl_stc_harq_duration;
+static int hf_dlmap_mimo_dl_stc_harq_sub_burst_offset_indication;
+static int hf_dlmap_mimo_dl_stc_harq_sub_burst_offset;
+static int hf_dlmap_mimo_dl_stc_harq_ack_disable;
+static int hf_dlmap_mimo_dl_stc_harq_dedicated_mimo_dl_control_indicator;
+static int hf_dlmap_mimo_dl_stc_harq_diuc;
+static int hf_dlmap_mimo_dl_stc_harq_repetition_coding_indication;
+static int hf_dlmap_mimo_dl_stc_harq_acid;
+static int hf_dlmap_mbs_map_extended_2_diuc;
+static int hf_dlmap_mbs_map_mbs_zone_identifier;
+static int hf_dlmap_mbs_map_macro_diversity_enhanced;
+static int hf_dlmap_mbs_map_permutation;
+static int hf_dlmap_mbs_map_dl_permbase;
+static int hf_dlmap_mbs_map_prbs_id;
+static int hf_dlmap_mbs_map_ofdma_symbol_offset;
+static int hf_dlmap_mbs_map_diuc_change_indication;
+static int hf_dlmap_mbs_map_boosting;
+static int hf_dlmap_mbs_map_diuc;
+static int hf_dlmap_mbs_map_num_subchannels;
+static int hf_dlmap_mbs_map_num_ofdma_symbols;
+static int hf_dlmap_mbs_map_repetition_coding_indication;
+static int hf_dlmap_mbs_map_cid;
+static int hf_dlmap_mbs_map_ofdma_symbols_offset;
+static int hf_dlmap_mbs_map_subchannel_offset;
+static int hf_dlmap_mbs_map_slc_3_indication;
+static int hf_dlmap_mbs_map_next_mbs_map_ie_frame_offset;
+static int hf_dlmap_skip_extended_2_diuc;
+static int hf_dlmap_skip_mode;
+static int hf_dlmap_harq_dl_map_extended_2_diuc;
+static int hf_dlmap_harq_dl_map_rcid_type;
+static int hf_dlmap_harq_dl_map_boosting;
+static int hf_dlmap_harq_dl_map_region_id_use_indicator;
+static int hf_dlmap_harq_dl_map_ofdma_symbol_offset;
+static int hf_dlmap_harq_dl_map_subchannel_offset;
+static int hf_dlmap_harq_dl_map_number_of_ofdma_symbols;
+static int hf_dlmap_harq_dl_map_number_of_subchannels;
+static int hf_dlmap_harq_dl_map_rectangular_sub_burst_indicator;
+static int hf_dlmap_harq_dl_map_region_id;
+static int hf_dlmap_harq_dl_map_mode;
+static int hf_dlmap_harq_dl_map_sub_burst_ie_length;
+static int hf_dlmap_harq_dl_map_reserved_mode;
+static int hf_dlmap_harq_ack_bitmap_data;
+static int hf_dlmap_enhanced_dl_map_extended_2_diuc;
+static int hf_dlmap_enhanced_dl_map_num_assignment;
+static int hf_dlmap_enhanced_dl_map_n_cid;
+static int hf_dlmap_enhanced_dl_map_cid;
+static int hf_dlmap_enhanced_dl_map_diuc;
+static int hf_dlmap_enhanced_dl_map_boosting;
+static int hf_dlmap_enhanced_dl_map_repetition_coding_indication;
+static int hf_dlmap_enhanced_dl_map_region_id;
+static int hf_dlmap_aas_sdma_dl_extended_2_diuc;
+static int hf_dlmap_aas_sdma_dl_rcid_type;
+static int hf_dlmap_aas_sdma_dl_num_burst_region;
+static int hf_dlmap_aas_sdma_dl_ofdma_symbol_offset;
+static int hf_dlmap_aas_sdma_dl_subchannel_offset;
+static int hf_dlmap_aas_sdma_dl_num_ofdma_triple_symbols;
+static int hf_dlmap_aas_sdma_dl_num_subchannels;
+static int hf_dlmap_aas_sdma_dl_number_of_users;
+static int hf_dlmap_aas_sdma_dl_encoding_mode;
+static int hf_dlmap_aas_sdma_dl_cqich_allocation;
+static int hf_dlmap_aas_sdma_dl_ackch_allocation;
+static int hf_dlmap_aas_sdma_dl_pilot_pattern_modifier;
+static int hf_dlmap_aas_sdma_dl_preamble_modifier_index;
+static int hf_dlmap_aas_sdma_dl_pilot_pattern;
+static int hf_dlmap_aas_sdma_dl_diuc;
+static int hf_dlmap_aas_sdma_dl_repetition_coding_indication;
+static int hf_dlmap_aas_sdma_dl_ack_ch_index;
+static int hf_dlmap_aas_sdma_dl_acid;
+static int hf_dlmap_aas_sdma_dl_ai_sn;
+static int hf_dlmap_aas_sdma_dl_nep;
+static int hf_dlmap_aas_sdma_dl_nsch;
+static int hf_dlmap_aas_sdma_dl_spid;
+static int hf_dlmap_aas_sdma_dl_allocation_index;
+static int hf_dlmap_aas_sdma_dl_period;
+static int hf_dlmap_aas_sdma_dl_frame_offset;
+static int hf_dlmap_aas_sdma_dl_duration;
+static int hf_dlmap_channel_measurement_channel_nr;
+static int hf_dlmap_channel_measurement_ofdma_symbol_offset;
+static int hf_dlmap_channel_measurement_cid;
+static int hf_dlmap_stc_zone_ofdma_symbol_offset;
+static int hf_dlmap_stc_zone_permutations;
+static int hf_dlmap_stc_zone_use_all_sc_indicator;
+static int hf_dlmap_stc_zone_stc;
+static int hf_dlmap_stc_zone_matrix_indicator;
+static int hf_dlmap_stc_zone_dl_permbase;
+static int hf_dlmap_stc_zone_prbs_id;
+static int hf_dlmap_stc_zone_amc_type;
+static int hf_dlmap_stc_zone_midamble_presence;
+static int hf_dlmap_stc_zone_midamble_boosting;
+static int hf_dlmap_stc_zone_2_3_antenna_select;
+static int hf_dlmap_stc_zone_dedicated_pilots;
+static int hf_dlmap_aas_dl_ofdma_symbol_offset;
+static int hf_dlmap_aas_dl_permutation;
+static int hf_dlmap_aas_dl_dl_permbase;
+static int hf_dlmap_aas_dl_downlink_preamble_config;
+static int hf_dlmap_aas_dl_preamble_type;
+static int hf_dlmap_aas_dl_prbs_id;
+static int hf_dlmap_aas_dl_diversity_map;
+static int hf_dlmap_data_location_another_bs_segment;
+static int hf_dlmap_data_location_another_bs_used_subchannels;
+static int hf_dlmap_data_location_another_bs_diuc;
+static int hf_dlmap_data_location_another_bs_frame_advance;
+static int hf_dlmap_data_location_another_bs_ofdma_symbol_offset;
+static int hf_dlmap_data_location_another_bs_subchannel_offset;
+static int hf_dlmap_data_location_another_bs_boosting;
+static int hf_dlmap_data_location_another_bs_preamble_index;
+static int hf_dlmap_data_location_another_bs_num_ofdma_symbols;
+static int hf_dlmap_data_location_another_bs_num_subchannels;
+static int hf_dlmap_data_location_another_bs_repetition_coding_indication;
+static int hf_dlmap_data_location_another_bs_cid;
+static int hf_dlmap_harq_map_pointer_diuc;
+static int hf_dlmap_harq_map_pointer_num_slots;
+static int hf_dlmap_harq_map_pointer_repetition_coding_indication;
+static int hf_dlmap_harq_map_pointer_map_version;
+static int hf_dlmap_harq_map_pointer_idle_users;
+static int hf_dlmap_harq_map_pointer_sleep_users;
+static int hf_dlmap_harq_map_pointer_cid_mask_length;
+static int hf_dlmap_phymod_dl_preamble_modifier_type;
+static int hf_dlmap_phymod_dl_preamble_frequency_shift_index;
+static int hf_dlmap_phymod_dl_preamble_time_shift_index;
+static int hf_dlmap_phymod_dl_pilot_pattern_modifier;
+static int hf_dlmap_phymod_dl_pilot_pattern_index;
+static int hf_dlmap_broadcast_ctrl_ptr_dcd_ucd_transmission_frame;
+static int hf_dlmap_broadcast_ctrl_ptr_skip_broadcast_system_update;
+static int hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_type;
+static int hf_dlmap_broadcast_ctrl_ptr_broadcast_system_update_transmission_frame;
+static int hf_dlmap_dl_pusc_burst_allocation_cid;
+static int hf_dlmap_dl_pusc_burst_allocation_diuc;
+static int hf_dlmap_dl_pusc_burst_allocation_segment;
+static int hf_dlmap_dl_pusc_burst_allocation_boosting;
+static int hf_dlmap_dl_pusc_burst_allocation_idcell;
+static int hf_dlmap_dl_pusc_burst_allocation_dl_permbase;
+static int hf_dlmap_dl_pusc_burst_allocation_prbs_id;
+static int hf_dlmap_dl_pusc_burst_allocation_repetition_coding_indication;
+static int hf_dlmap_dl_pusc_burst_allocation_used_subchannels;
+static int hf_dlmap_dl_pusc_burst_allocation_ofdma_symbol_offset;
+static int hf_dlmap_dl_pusc_burst_allocation_num_ofdma_symbols;
+static int hf_dlmap_dl_pusc_burst_allocation_subchannel_offset;
+static int hf_dlmap_dl_pusc_burst_allocation_num_subchannels;
+static int hf_dlmap_pusc_asca_alloc_diuc;
+static int hf_dlmap_pusc_asca_alloc_short_basic_cid;
+static int hf_dlmap_pusc_asca_alloc_ofdma_symbol_offset;
+static int hf_dlmap_pusc_asca_alloc_subchannel_offset;
+static int hf_dlmap_pusc_asca_alloc_num_ofdma_symbols;
+static int hf_dlmap_pusc_asca_alloc_num_symbols;
+static int hf_dlmap_pusc_asca_alloc_repetition_coding_information;
+static int hf_dlmap_pusc_asca_alloc_permutation_id;
+static int hf_dlmap_reduced_aas_num_ie;
+static int hf_dlmap_reduced_aas_periodicity;
+static int hf_dlmap_reduced_aas_cid_included;
+static int hf_dlmap_reduced_aas_dcd_count_included;
+static int hf_dlmap_reduced_aas_phy_modification_included;
+static int hf_dlmap_reduced_aas_cqich_control_indicator;
+static int hf_dlmap_reduced_aas_encoding_mode;
+static int hf_dlmap_reduced_aas_separate_mcs_enabled;
+static int hf_dlmap_reduced_aas_duration;
+static int hf_dlmap_reduced_aas_diuc;
+static int hf_dlmap_reduced_aas_repetition_coding_indication;
+static int hf_dlmap_reduced_aas_cid;
+static int hf_dlmap_reduced_aas_allocation_index;
+static int hf_dlmap_reduced_aas_report_period;
+static int hf_dlmap_reduced_aas_frame_offset;
+static int hf_dlmap_reduced_aas_report_duration;
+static int hf_dlmap_reduced_aas_cqi_measurement_type;
+static int hf_dlmap_reduced_aas_dcd_count;
+static int hf_dlmap_reduced_aas_preamble_select;
+static int hf_dlmap_reduced_aas_preamble_shift_index;
+static int hf_dlmap_reduced_aas_pilot_pattern_modifier;
+static int hf_dlmap_reduced_aas_pilot_pattern_index;
+static int hf_dlmap_reduced_aas_dl_frame_offset;
+static int hf_dlmap_reduced_aas_zone_symbol_offset;
+static int hf_dlmap_reduced_aas_ofdma_symbol_offset;
+static int hf_dlmap_reduced_aas_subchannel_offset;
+static int hf_dlmap_reduced_aas_num_ofdma_triple_symbol;
+static int hf_dlmap_reduced_aas_num_subchannels;
+static int hf_dlmap_reduced_aas_num_ofdma_symbols;
+static int hf_dlmap_reduced_aas_diuc_nep;
+static int hf_dlmap_reduced_aas_dl_harq_ack_bitmap;
+static int hf_dlmap_reduced_aas_ack_allocation_index;
+static int hf_dlmap_reduced_aas_acid;
+static int hf_dlmap_reduced_aas_ai_sn;
+static int hf_dlmap_reduced_aas_nsch;
+static int hf_dlmap_reduced_aas_spid;
+
+
+
+static expert_field ei_dlmap_not_implemented;
+static expert_field ei_crc16;
+static expert_field ei_mac_header_compress_dlmap_crc;
+static expert_field ei_mac_header_invalid_length;
/* Copied and renamed from proto.c because global value_strings don't work for plugins */
static const value_string plugin_proto_checksum_vals[] = {
@@ -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 8c0cd650..2428f97e 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 = -1;
-static gint proto_mac_mgmt_msg_dreg_cmd_decoder = -1;
+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 = -1;
+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 = -1; */
-static gint hf_dreg_cmd_action = -1;
-static gint hf_dreg_cmd_action_cor2 = -1;
-static gint hf_dreg_cmd_reserved = -1;
-static gint hf_dreg_paging_cycle = -1;
-static gint hf_dreg_paging_offset = -1;
-static gint hf_dreg_paging_group_id = -1;
-static gint hf_dreg_req_duration = -1;
-static gint hf_paging_controller_id = -1;
-static gint hf_mac_hash_skip_threshold = -1;
-static gint hf_dreg_paging_cycle_request = -1;
-static gint hf_dreg_retain_ms_service_sbc = -1;
-static gint hf_dreg_retain_ms_service_pkm = -1;
-static gint hf_dreg_retain_ms_service_reg = -1;
-static gint hf_dreg_retain_ms_service_network_address = -1;
-static gint hf_dreg_retain_ms_service_tod = -1;
-static gint hf_dreg_retain_ms_service_tftp = -1;
-static gint hf_dreg_retain_ms_service_full_service = -1;
-static gint hf_dreg_consider_paging_pref = -1;
-static gint hf_tlv_value = -1;
-static gint hf_dreg_req_action = -1;
-static gint hf_dreg_req_reserved = -1;
-static gint hf_dreg_invalid_tlv = -1;
+/* 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 72280baa..e6c9e98e 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 = -1;
-static gint ett_mac_mgmt_msg_dsa_req_decoder = -1;
-static gint ett_mac_mgmt_msg_dsa_rsp_decoder = -1;
-static gint ett_mac_mgmt_msg_dsa_ack_decoder = -1;
+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 = -1;
-static gint hf_dsa_confirmation_code = -1;
+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 8f681965..7ac6a290 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 = -1;
-static gint ett_mac_mgmt_msg_dsc_req_decoder = -1;
-static gint ett_mac_mgmt_msg_dsc_rsp_decoder = -1;
-static gint ett_mac_mgmt_msg_dsc_ack_decoder = -1;
+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 = -1;
-static gint hf_dsc_confirmation_code = -1;
+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 6f7c4c07..06de174b 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 = -1;
-static gint ett_mac_mgmt_msg_dsd_req_decoder = -1;
-static gint ett_mac_mgmt_msg_dsd_rsp_decoder = -1;
-/* static gint ett_dsd_ul_sfe_decoder = -1; */
-/* static gint ett_dsd_dl_sfe_decoder = -1; */
-/* static gint ett_dsd_hmac_tuple = -1; */
-/* static gint ett_dsd_cmac_tuple = -1; */
+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 = -1;
-static gint hf_dsd_service_flow_id = -1;
-static gint hf_dsd_confirmation_code = -1;
-static gint hf_dsd_invalid_tlv = -1;
-static gint hf_dsd_unknown_type = -1;
+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 4362a9ef..8fbbfb55 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 = -1;
-static gint ett_mac_mgmt_msg_dsx_rvd_decoder = -1;
+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 = -1;
-static gint hf_dsx_rvd_confirmation_code = -1;
+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 42b50141..9fc08769 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 = -1;
+static int proto_mac_mgmt_msg_fpc_decoder;
-static gint ett_mac_mgmt_msg_fpc_decoder = -1;
+static int ett_mac_mgmt_msg_fpc_decoder;
/* FPC fields */
-static gint hf_fpc_number_of_stations = -1;
-static gint hf_fpc_basic_cid = -1;
-static gint hf_fpc_power_adjust = -1;
-static gint hf_fpc_power_measurement_frame = -1;
-/* static gint hf_fpc_invalid_tlv = -1; */
+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 b91f2601..fc12f067 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 = -1;
-static gint ett_mac_mgmt_msg_pkm_req_decoder = -1;
-static gint ett_mac_mgmt_msg_pkm_rsp_decoder = -1;
+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 = -1;
-static gint hf_pkm_msg_pkm_id = -1;
+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 7fe16e04..75e95b63 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 = -1;
-static gint proto_mac_mgmt_msg_pmc_rsp_decoder = -1;
+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 = -1;
+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 = -1;
-static gint hf_pmc_req_pwr_control_mode_change_cor2 = -1;
-static gint hf_pmc_req_tx_power_level = -1;
-static gint hf_pmc_req_confirmation = -1;
-static gint hf_pmc_req_reserved = -1;
-static gint hf_pmc_rsp_start_frame = -1;
-static gint hf_pmc_rsp_power_adjust = -1;
-static gint hf_pmc_rsp_offset_BS_per_MS = -1;
+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 f8b5b97f..b6599ca7 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 = -1;
+static int proto_mac_mgmt_msg_prc_lt_ctrl_decoder;
-static gint ett_mac_mgmt_msg_prc_lt_ctrl_decoder = -1;
+static int ett_mac_mgmt_msg_prc_lt_ctrl_decoder;
/* PRC-LT-CTRL fields */
-static gint hf_prc_lt_ctrl_precoding = -1;
-static gint hf_prc_lt_ctrl_precoding_delay = -1;
-/* static gint hf_prc_lt_ctrl_invalid_tlv = -1; */
+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 f0ba1a5f..ede763dd 100644
--- a/plugins/epan/wimax/msg_reg_req.c
+++ b/plugins/epan/wimax/msg_reg_req.c
@@ -22,129 +22,128 @@
#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 = -1;
-static gint ett_mac_mgmt_msg_reg_req_decoder = -1;
+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 = -1;
-static gint hf_reg_ip_mgmt_mode = -1;
-static gint hf_reg_ip_version = -1;
-static gint hf_reg_req_secondary_mgmt_cid = -1;
-static gint hf_reg_ul_cids = -1;
-static gint hf_reg_max_classifiers = -1;
-static gint hf_reg_phs = -1;
-static gint hf_reg_arq = -1;
-static gint hf_reg_dsx_flow_control = -1;
-static gint hf_reg_mac_crc_support = -1;
-static gint hf_reg_mca_flow_control = -1;
-static gint hf_reg_mcast_polling_cids = -1;
-static gint hf_reg_num_dl_trans_cid = -1;
-static gint hf_reg_mac_address = -1;
-static gint hf_reg_tlv_t_20_1_max_mac_level_data_per_dl_frame = -1;
-static gint hf_reg_tlv_t_20_2_max_mac_level_data_per_ul_frame = -1;
-static gint hf_reg_tlv_t_21_packing_support = -1;
-static gint hf_reg_tlv_t_22_mac_extended_rtps_support = -1;
-static gint hf_reg_tlv_t_23_max_num_bursts_concurrently_to_the_ms = -1;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcp = -1;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_mobile_ipv4 = -1;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_dhcpv6 = -1;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_ipv6 = -1;
-static gint hf_reg_method_for_allocating_ip_addr_sec_mgmt_conn_rsvd = -1;
-static gint hf_reg_tlv_t_27_handover_fbss_mdho_ho_disable = -1;
-static gint hf_reg_tlv_t_27_handover_fbss_mdho_dl_rf_monitoring_maps = -1;
-static gint hf_reg_tlv_t_27_handover_mdho_dl_monitoring_single_map = -1;
-static gint hf_reg_tlv_t_27_handover_mdho_dl_monitoring_maps = -1;
-static gint hf_reg_tlv_t_27_handover_mdho_ul_multiple = -1;
-static gint hf_reg_tlv_t_27_handover_reserved = -1;
-static gint hf_reg_tlv_t_29_ho_process_opt_ms_timer = -1;
-static gint hf_reg_tlv_t_31_mobility_handover = -1;
-static gint hf_reg_tlv_t_31_mobility_sleep_mode = -1;
-static gint hf_reg_tlv_t_31_mobility_idle_mode = -1;
-static gint hf_reg_req_tlv_t_32_sleep_mode_recovery_time = -1;
-static gint hf_ms_previous_ip_address_v4 = -1;
-static gint hf_ms_previous_ip_address_v6 = -1;
-static gint hf_idle_mode_timeout = -1;
-static gint hf_reg_req_tlv_t_45_ms_periodic_ranging_timer = -1;
-static gint hf_reg_tlv_t_40_arq_ack_type_selective_ack_entry = -1;
-static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_entry = -1;
-static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_with_selective_ack_entry = -1;
-static gint hf_reg_tlv_t_40_arq_ack_type_cumulative_ack_with_block_sequence_ack = -1;
-static gint hf_reg_tlv_t_40_arq_ack_type_reserved = -1;
-static gint hf_reg_tlv_t_41_ho_connections_param_processing_time = -1;
-static gint hf_reg_tlv_t_42_ho_tek_processing_time = -1;
-static gint hf_reg_tlv_t_43_bandwidth_request_ul_tx_power_report_header_support = -1;
-static gint hf_reg_tlv_t_43_bandwidth_request_cinr_report_header_support = -1;
-static gint hf_reg_tlv_t_43_cqich_allocation_request_header_support = -1;
-static gint hf_reg_tlv_t_43_phy_channel_report_header_support = -1;
-static gint hf_reg_tlv_t_43_bandwidth_request_ul_sleep_control_header_support = -1;
-static gint hf_reg_tlv_t_43_sn_report_header_support = -1;
-static gint hf_reg_tlv_t_43_feedback_header_support = -1;
-static gint hf_reg_tlv_t_43_sdu_sn_extended_subheader_support_and_parameter = -1;
-static gint hf_reg_tlv_t_43_sdu_sn_parameter = -1;
-static gint hf_reg_tlv_t_43_dl_sleep_control_extended_subheader = -1;
-static gint hf_reg_tlv_t_43_feedback_request_extended_subheader = -1;
-static gint hf_reg_tlv_t_43_mimo_mode_feedback_extended_subheader = -1;
-static gint hf_reg_tlv_t_43_ul_tx_power_report_extended_subheader = -1;
-static gint hf_reg_tlv_t_43_mini_feedback_extended_subheader = -1;
-static gint hf_reg_tlv_t_43_sn_request_extended_subheader = -1;
-static gint hf_reg_tlv_t_43_pdu_sn_short_extended_subheader = -1;
-static gint hf_reg_tlv_t_43_pdu_sn_long_extended_subheader = -1;
-static gint hf_reg_tlv_t_43_reserved = -1;
-static gint hf_reg_tlv_t_46_handover_indication_readiness_timer = -1;
-static gint hf_reg_req_min_time_for_intra_fa = -1;
-static gint hf_reg_req_min_time_for_inter_fa = -1;
-static gint hf_reg_encap_atm_4 = -1;
-static gint hf_reg_encap_ipv4_4 = -1;
-static gint hf_reg_encap_ipv6_4 = -1;
-static gint hf_reg_encap_802_3_4 = -1;
-static gint hf_reg_encap_802_1q_4 = -1;
-static gint hf_reg_encap_ipv4_802_3_4 = -1;
-static gint hf_reg_encap_ipv6_802_3_4 = -1;
-static gint hf_reg_encap_ipv4_802_1q_4 = -1;
-static gint hf_reg_encap_ipv6_802_1q_4 = -1;
-static gint hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_4 = -1;
-static gint hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_4 = -1;
-static gint hf_reg_encap_packet_ip_rohc_header_compression_4 = -1;
-static gint hf_reg_encap_packet_ip_ecrtp_header_compression_4 = -1;
-static gint hf_reg_encap_rsvd_4 = -1;
-static gint hf_reg_encap_atm_2 = -1;
-static gint hf_reg_encap_ipv4_2 = -1;
-static gint hf_reg_encap_ipv6_2 = -1;
-static gint hf_reg_encap_802_3_2 = -1;
-static gint hf_reg_encap_802_1q_2 = -1;
-static gint hf_reg_encap_ipv4_802_3_2 = -1;
-static gint hf_reg_encap_ipv6_802_3_2 = -1;
-static gint hf_reg_encap_ipv4_802_1q_2 = -1;
-static gint hf_reg_encap_ipv6_802_1q_2 = -1;
-static gint hf_reg_encap_packet_8023_ethernet_and_rohc_header_compression_2 = -1;
-static gint hf_reg_encap_packet_8023_ethernet_and_ecrtp_header_compression_2 = -1;
-static gint hf_reg_encap_packet_ip_rohc_header_compression_2 = -1;
-static gint hf_reg_encap_packet_ip_ecrtp_header_compression_2 = -1;
-static gint hf_reg_encap_rsvd_2 = -1;
-static gint hf_tlv_type = -1;
-static gint hf_reg_invalid_tlv = -1;
-static gint hf_reg_power_saving_class_type_i = -1;
-static gint hf_reg_power_saving_class_type_ii = -1;
-static gint hf_reg_power_saving_class_type_iii = -1;
-static gint hf_reg_multi_active_power_saving_classes = -1;
-static gint hf_reg_total_power_saving_class_instances = -1;
-static gint hf_reg_power_saving_class_reserved = -1;
-static gint hf_reg_power_saving_class_capability = -1;
-static gint hf_reg_ip_phs_sdu_encap = -1;
-static gint hf_reg_tlv_t_26_method_alloc_ip_addr_secondary_mgmnt_conn = -1;
-static gint hf_reg_tlv_t_27_handover_supported = -1;
-static gint hf_reg_tlv_t_31_mobility_features_supported = -1;
-static gint hf_reg_tlv_t_40_arq_ack_type = -1;
-static gint hf_reg_tlv_t_43_mac_header_ext_header_support = -1;
-static gint hf_reg_req_bs_switching_timer = -1;
+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 +212,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 +481,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 +594,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 +1403,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 a5f23650..3c7fe131 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 = -1;
-static gint ett_mac_mgmt_msg_reg_rsp_decoder = -1;
-static gint ett_reg_rsp_message_tree = -1;
+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 = -1;
-static gint hf_tlv_type = -1;
-/* static gint hf_tlv_value = -1; */
-static gint hf_reg_rsp_secondary_mgmt_cid = -1;
-static gint hf_reg_invalid_tlv = -1;
-static gint hf_reg_rsp_new_cid_after_ho = -1;
-static gint hf_reg_rsp_service_flow_id = -1;
-static gint hf_reg_rsp_system_resource_retain_time = -1;
-static gint hf_reg_total_provisioned_sf = -1;
+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 952e8f5f..707d4231 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 = -1;
-static gint ett_mac_mgmt_msg_rep_req_decoder = -1;
-static gint ett_mac_mgmt_msg_rep_rsp_decoder = -1;
+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 = -1;
-static gint hf_rep_invalid_tlv = -1;
+static int hf_rep_unknown_type;
+static int hf_rep_invalid_tlv;
-static gint hf_rep_req_report_request = -1;
-static gint hf_rep_req_report_type = -1;
-static gint hf_rep_req_rep_type_bit0 = -1;
-static gint hf_rep_req_rep_type_bit1 = -1;
-static gint hf_rep_req_rep_type_bit2 = -1;
-static gint hf_rep_req_rep_type_bit3_6 = -1;
-static gint hf_rep_req_rep_type_bit7 = -1;
-static gint hf_rep_req_channel_number = -1;
-static gint hf_rep_req_channel_type = -1;
-static gint hf_rep_req_channel_type_request = -1;
-static gint hf_rep_req_channel_type_reserved = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_request = -1;
-static gint hf_rep_req_preamble_phy_cinr_request = -1;
-static gint hf_rep_req_zone_spec_effective_cinr_request = -1;
-static gint hf_rep_req_preamble_effective_cinr_request = -1;
-static gint hf_rep_req_channel_selectivity_report = -1;
+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 = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit3 = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit4 = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit5_6 = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit7 = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit8_13 = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit14_17 = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit18 = -1;
-static gint hf_rep_req_zone_spec_phy_cinr_req_bit19_23 = -1;
+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 = -1;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit3 = -1;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit4 = -1;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit5_6 = -1;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit7 = -1;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit8_13 = -1;
-static gint hf_rep_req_zone_spec_effective_cinr_req_bit14_15 = -1;
+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 = -1;
-static gint hf_rep_req_preamble_phy_cinr_req_bit2_5 = -1;
-static gint hf_rep_req_preamble_phy_cinr_req_bit6 = -1;
-static gint hf_rep_req_preamble_phy_cinr_req_bit7 = -1;
+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 = -1;
-static gint hf_rep_req_preamble_effective_cinr_req_bit2_7 = -1;
+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 = -1;
-static gint hf_rep_req_channel_selectivity_rep_bit1_7 = -1;
+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 = -1;
-static gint hf_rep_rsp_report_type_channel_number = -1;
-static gint hf_rep_rsp_report_type_frame_number = -1;
-static gint hf_rep_rsp_report_type_duration = -1;
-static gint hf_rep_rsp_report_type_basic_report = -1;
-static gint hf_rep_rsp_report_type_basic_report_bit0 = -1;
-static gint hf_rep_rsp_report_type_basic_report_bit1 = -1;
-static gint hf_rep_rsp_report_type_basic_report_bit2 = -1;
-static gint hf_rep_rsp_report_type_basic_report_bit3 = -1;
-static gint hf_rep_rsp_report_type_basic_report_reserved = -1;
-static gint hf_rep_rsp_report_type_cinr_report = -1;
-static gint hf_rep_rsp_report_type_cinr_report_mean = -1;
-static gint hf_rep_rsp_report_type_cinr_report_deviation = -1;
-static gint hf_rep_rsp_report_type_rssi_report = -1;
-static gint hf_rep_rsp_report_type_rssi_report_mean = -1;
-static gint hf_rep_rsp_report_type_rssi_report_deviation = -1;
-static gint hf_rep_rsp_current_transmitted_power = -1;
-static gint hf_rep_rsp_channel_type_report = -1;
-static gint hf_rep_rsp_channel_type_subchannel = -1;
-static gint hf_rep_rsp_channel_type_band_amc = -1;
-static gint hf_rep_rsp_channel_type_safety_channel = -1;
-static gint hf_rep_rsp_channel_type_enhanced_band_amc = -1;
-static gint hf_rep_rsp_channel_type_sounding = -1;
+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 = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_mean = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_report_type = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_reserved1 = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_deviation = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_reserved2 = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc0 = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_pusc_sc1 = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_fusc = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_optional_fusc = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_safety_channel = -1;
-static gint hf_rep_rsp_zone_spec_phy_cinr_rep_amc = -1;
-static gint hf_rep_rsp_preamble_phy_cinr_report = -1;
-static gint hf_rep_rsp_preamble_phy_cinr_rep_configuration_1 = -1;
-static gint hf_rep_rsp_preamble_phy_cinr_rep_configuration_3 = -1;
-static gint hf_rep_rsp_preamble_phy_cinr_rep_band_amc_zone = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_report = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_effective_cinr = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_report_type = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_cqich_id = -1;
-static gint hf_rep_rsp_preamble_effective_cinr_report = -1;
-static gint hf_rep_rsp_preamble_effective_cinr_rep_cqich_id = -1;
-static gint hf_rep_rsp_channel_selectivity_report = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc0 = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_pusc_sc1 = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_fusc = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_optional_fusc = -1;
-static gint hf_rep_rsp_zone_spec_effective_cinr_rep_amc_aas = -1;
-static gint hf_rep_rsp_preamble_effective_cinr_rep_configuration_1 = -1;
-static gint hf_rep_rsp_preamble_effective_cinr_rep_configuration_3 = -1;
-static gint hf_rep_rsp_channel_selectivity_rep_frequency_a = -1;
-static gint hf_rep_rsp_channel_selectivity_rep_frequency_b = -1;
-static gint hf_rep_rsp_channel_selectivity_rep_frequency_c = -1;
+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 = -1;
/* 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 67d321da..9ac732f5 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 = -1;
-static gint ett_mac_mgmt_msg_res_cmd_decoder = -1;
+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 = -1;
-static gint hf_res_cmd_invalid_tlv = -1;
+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 68f9569b..f4f85d2e 100644
--- a/plugins/epan/wimax/msg_rng_req.c
+++ b/plugins/epan/wimax/msg_rng_req.c
@@ -20,56 +20,55 @@
#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 = -1;
-static gint ett_mac_mgmt_msg_rng_req_decoder = -1;
+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 = -1;
-static gint hf_rng_req_dl_burst_profile_diuc = -1;
-static gint hf_rng_req_dl_burst_profile_lsb_ccc = -1;
-static gint hf_rng_req_ss_mac_address = -1;
-static gint hf_rng_req_ranging_anomalies_max_power = -1;
-static gint hf_rng_req_ranging_anomalies_min_power = -1;
-static gint hf_rng_req_ranging_anomalies_timing_adj = -1;
-static gint hf_rng_req_aas_broadcast = -1;
-static gint hf_rng_req_serving_bs_id = -1;
-static gint hf_rng_req_ranging_purpose_ho_indication = -1;
-static gint hf_rng_req_ranging_purpose_location_update_request = -1;
-static gint hf_rng_req_ranging_purpose_reserved = -1;
-static gint hf_rng_req_ho_id = -1;
-static gint hf_rng_req_power_down_indicator = -1;
-static gint hf_rng_req_repetition_coding_level = -1;
-static gint hf_rng_req_requested_downlink_repetition_coding_level_reserved = -1;
-static gint hf_rng_req_cmac_key_count = -1;
-static gint hf_rng_definition_of_power_saving_class_present = -1;
-static gint hf_rng_activation_of_power_saving_class = -1;
-static gint hf_rng_trf_ind_required = -1;
-static gint hf_rng_power_saving_class_reserved = -1;
-static gint hf_rng_power_saving_class_id = -1;
-static gint hf_rng_power_saving_class_type = -1;
-static gint hf_rng_power_saving_first_sleep_window_frame = -1;
-static gint hf_rng_power_saving_initial_sleep_window = -1;
-static gint hf_rng_power_saving_listening_window = -1;
-static gint hf_rng_power_saving_final_sleep_window_base = -1;
-static gint hf_rng_power_saving_final_sleep_window_exp = -1;
-static gint hf_rng_power_saving_slpid = -1;
-static gint hf_rng_power_saving_included_cid = -1;
-static gint hf_rng_power_saving_mgmt_connection_direction = -1;
-static gint hf_tlv_type = -1;
-static gint hf_rng_invalid_tlv = -1;
-static gint hf_rng_power_saving_class_flags = -1;
-static gint hf_rng_req_dl_burst_profile = -1;
-static gint hf_rng_req_ranging_anomalies = -1;
-static gint hf_rng_req_ranging_purpose_indication = -1;
-static gint hf_rng_req_requested_rep_coding_level = -1;
+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 +111,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 +198,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 +594,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 f1587ebc..6b3506e0 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 = -1;
-static gint ett_mac_mgmt_msg_rng_rsp_decoder = -1;
-static gint ett_rng_rsp_message_tree = -1;
+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 = -1;
-/* static gint hf_rng_rsp_ul_channel_id = -1; */
-static gint hf_rng_rsp_timing_adjust = -1;
-static gint hf_rng_rsp_power_level_adjust = -1;
-static gint hf_rng_rsp_offset_freq_adjust = -1;
-static gint hf_rng_rsp_ranging_status = -1;
-static gint hf_rng_rsp_dl_freq_override = -1;
-static gint hf_rng_rsp_ul_chan_id_override = -1;
-static gint hf_rng_rsp_dl_operational_burst_profile = -1;
-static gint hf_rng_rsp_dl_operational_burst_profile_diuc = -1;
-static gint hf_rng_rsp_dl_operational_burst_profile_ccc = -1;
-static gint hf_rng_rsp_ss_mac_address = -1;
-static gint hf_rng_rsp_basic_cid = -1;
-static gint hf_rng_rsp_primary_mgmt_cid = -1;
-static gint hf_rng_rsp_broadcast = -1;
-static gint hf_rng_rsp_frame_number = -1;
-static gint hf_rng_rsp_opportunity_number = -1;
-static gint hf_rng_rsp_service_level_prediction = -1;
-static gint hf_rng_rsp_resource_retain_flag = -1;
-static gint hf_rng_rsp_ho_process_optimization = -1;
-static gint hf_rng_rsp_ho_process_optimization_0 = -1;
-static gint hf_rng_rsp_ho_process_optimization_1_2 = -1;
-static gint hf_rng_rsp_ho_process_optimization_3 = -1;
-static gint hf_rng_rsp_ho_process_optimization_4 = -1;
-static gint hf_rng_rsp_ho_process_optimization_5 = -1;
-static gint hf_rng_rsp_ho_process_optimization_6 = -1;
-static gint hf_rng_rsp_ho_process_optimization_7 = -1;
-static gint hf_rng_rsp_ho_process_optimization_8 = -1;
-static gint hf_rng_rsp_ho_process_optimization_9 = -1;
-static gint hf_rng_rsp_ho_process_optimization_10 = -1;
-static gint hf_rng_rsp_ho_process_optimization_11 = -1;
-static gint hf_rng_rsp_ho_process_optimization_12 = -1;
-static gint hf_rng_rsp_ho_process_optimization_13 = -1;
-static gint hf_rng_rsp_ho_process_optimization_14 = -1;
-static gint hf_rng_rsp_ho_process_optimization_15 = -1;
+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 = -1;
-static gint hf_rng_rsp_least_robust_diuc = -1;
-static gint hf_rng_rsp_repetition_coding_indication = -1;
-static gint hf_rng_rsp_config_change_count_of_dcd = -1;
+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 = -1;
-static gint hf_rng_rsp_location_update_response = -1;
+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 = -1;
-static gint hf_rng_rsp_paging_cycle = -1;
-static gint hf_rng_rsp_paging_offset = -1;
-static gint hf_rng_rsp_paging_group_id = -1;
-static gint hf_rng_rsp_bs_random = -1;
-static gint hf_rng_rsp_akid = -1;
-static gint hf_rng_rsp_ranging_subchan = -1;
-static gint hf_rng_rsp_time_symbol_reference = -1;
-static gint hf_rng_rsp_subchannel_reference = -1;
-static gint hf_rng_rsp_ranging_code_index = -1;
-static gint hf_rng_rsp_frame_number2 = -1;
-static gint hf_tlv_type = -1;
-/* static gint hf_tlv_value = -1; */
-static gint hf_rng_invalid_tlv = -1;
+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 cfdc2393..fd278d28 100644
--- a/plugins/epan/wimax/msg_sbc.c
+++ b/plugins/epan/wimax/msg_sbc.c
@@ -24,6 +24,7 @@
#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 +33,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 = -1;
-static gint ett_mac_mgmt_msg_sbc_decoder = -1;
-static gint ett_sbc_req_tlv_subtree = -1;
-static gint ett_sbc_rsp_tlv_subtree = -1;
+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 = -1;
+static int hf_sbc_unknown_type;
-static gint hf_sbc_bw_alloc_support = -1;
-static gint hf_sbc_bw_alloc_support_rsvd0 = -1;
-static gint hf_sbc_bw_alloc_support_duplex = -1;
-static gint hf_sbc_bw_alloc_support_rsvd1 = -1;
-static gint hf_sbc_curr_transmit_power = -1;
-static gint hf_sbc_transition_gaps = -1;
-static gint hf_sbc_ssttg = -1;
-static gint hf_sbc_ssrtg = -1;
-static gint hf_sbc_mac_pdu = -1;
-static gint hf_sbc_mac_pdu_piggybacked = -1;
-static gint hf_sbc_mac_pdu_fsn = -1;
-static gint hf_sbc_mac_pdu_rsvd = -1;
-static gint hf_sbc_max_transmit_power = -1;
-static gint hf_sbc_bpsk = -1;
-static gint hf_sbc_qpsk = -1;
-static gint hf_sbc_qam16 = -1;
-static gint hf_sbc_qam64 = -1;
-static gint hf_sbc_current_transmitted_power = -1;
-static gint hf_sbc_ss_fft_sizes = -1;
-static gint hf_sbc_ss_fft_256 = -1;
-static gint hf_sbc_ss_fft_2048 = -1;
-static gint hf_sbc_ss_fft_128 = -1;
-static gint hf_sbc_ss_fft_512 = -1;
-static gint hf_sbc_ss_fft_1024 = -1;
-static gint hf_sbc_ss_cinr_measure_capability = -1;
-static gint hf_sbc_ss_phy_cinr_measurement_preamble = -1;
-static gint hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_pilot_subcarriers = -1;
-static gint hf_sbc_ss_phy_cinr_measurement_permutation_zone_from_data_subcarriers = -1;
-static gint hf_sbc_ss_effective_cinr_measurement_preamble = -1;
-static gint hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_pilot_subcarriers = -1;
-static gint hf_sbc_ss_effective_cinr_measurement_permutation_zone_from_data_subcarriers = -1;
-static gint hf_sbc_ss_support_2_concurrent_cqi_channels = -1;
-static gint hf_sbc_ss_frequency_selectivity_characterization_report = -1;
+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 = -1;
-static gint hf_sbc_ss_fft_rsvd2 = -1;
-static gint hf_sbc_ss_demodulator = -1;
-static gint hf_sbc_ss_demodulator_64qam = -1;
-static gint hf_sbc_ss_demodulator_btc = -1;
-static gint hf_sbc_ss_demodulator_ctc = -1;
-static gint hf_sbc_ss_demodulator_stc = -1;
-static gint hf_sbc_ss_demodulator_cc_with_optional_interleaver = -1;
-static gint hf_sbc_ss_demodulator_harq_chase = -1;
-static gint hf_sbc_ss_demodulator_harq_ctc_ir = -1;
-static gint hf_sbc_ss_demodulator_reserved = -1;
-/* static gint hf_sbc_ss_demodulator_reserved1 = -1; */
-static gint hf_sbc_ss_demodulator_64qam_2 = -1;
-static gint hf_sbc_ss_demodulator_btc_2 = -1;
-static gint hf_sbc_ss_demodulator_ctc_2 = -1;
-static gint hf_sbc_ss_demodulator_stc_2 = -1;
-static gint hf_sbc_ss_demodulator_cc_with_optional_interleaver_2 = -1;
-static gint hf_sbc_ss_demodulator_harq_chase_2 = -1;
-static gint hf_sbc_ss_demodulator_harq_ctc_ir_2 = -1;
-static gint hf_sbc_ss_demodulator_reserved_2 = -1;
-static gint hf_sbc_ss_demodulator_harq_cc_ir_2 = -1;
-static gint hf_sbc_ss_demodulator_ldpc_2 = -1;
-static gint hf_sbc_ss_demodulator_dedicated_pilots_2 = -1;
-static gint hf_sbc_ss_demodulator_reserved1_2 = -1;
+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 = -1;
-static gint hf_sbc_ss_modulator_64qam = -1;
-static gint hf_sbc_ss_modulator_btc = -1;
-static gint hf_sbc_ss_modulator_ctc = -1;
-static gint hf_sbc_ss_modulator_stc = -1;
-static gint hf_sbc_ss_modulator_harq_chase = -1;
-static gint hf_sbc_ss_modulator_ctc_ir = -1;
-static gint hf_sbc_ss_modulator_cc_ir = -1;
-static gint hf_sbc_ss_modulator_ldpc = -1;
+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 = -1;
-static gint hf_sbc_number_dl_arq_ack_channel = -1;
-static gint hf_sbc_ss_permutation_support = -1;
-static gint hf_sbc_ss_optimal_pusc = -1;
-static gint hf_sbc_ss_optimal_fusc = -1;
-static gint hf_sbc_ss_amc_1x6 = -1;
-static gint hf_sbc_ss_amc_2x3 = -1;
-static gint hf_sbc_ss_amc_3x2 = -1;
-static gint hf_sbc_ss_amc_with_harq_map = -1;
-static gint hf_sbc_ss_tusc1_support = -1;
-static gint hf_sbc_ss_tusc2_support = -1;
-static gint hf_sbc_ss_ofdma_aas_private = -1;
-static gint hf_sbc_ofdma_aas_harq_map_capability = -1;
-static gint hf_sbc_ofdma_aas_private_map_support = -1;
-static gint hf_sbc_ofdma_aas_reduced_private_map_support = -1;
-static gint hf_sbc_ofdma_aas_private_chain_enable = -1;
-static gint hf_sbc_ofdma_aas_private_map_dl_frame_offset = -1;
-static gint hf_sbc_ofdma_aas_private_ul_frame_offset = -1;
-static gint hf_sbc_ofdma_aas_private_map_concurrency = -1;
-static gint hf_sbc_ofdma_aas_capabilities = -1;
-static gint hf_sbc_ss_ofdma_aas_zone = -1;
-static gint hf_sbc_ss_ofdma_aas_diversity_map_scan = -1;
-static gint hf_sbc_ss_ofdma_aas_fbck_rsp_support = -1;
-static gint hf_sbc_ss_ofdma_downlink_aas_preamble = -1;
-static gint hf_sbc_ss_ofdma_uplink_aas_preamble = -1;
-static gint hf_sbc_ss_ofdma_aas_capabilities_rsvd = -1;
+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 = -1;
-static gint hf_sbc_tlv_t_167_association_type_support_bit0 = -1;
-static gint hf_sbc_tlv_t_167_association_type_support_bit1 = -1;
-static gint hf_sbc_tlv_t_167_association_type_support_bit2 = -1;
-static gint hf_sbc_tlv_t_167_association_type_support_bit3 = -1;
-static gint hf_sbc_tlv_t_167_association_type_support_bit4 = -1;
-static gint hf_sbc_tlv_t_167_association_type_support_reserved = -1;
-static gint hf_sbc_ofdma_ss_uplink_power_control_support = -1;
-static gint hf_sbc_ofdma_ss_uplink_power_control_support_open_loop = -1;
-static gint hf_sbc_ofdma_ss_uplink_power_control_support_aas_preamble = -1;
-static gint hf_sbc_ofdma_ss_uplink_power_control_support_rsvd = -1;
-/* static gint hf_sbc_ofdm_ss_minimum_num_of_frames = -1; */
-static gint hf_sbc_tlv_t_27_extension_capability = -1;
-static gint hf_sbc_tlv_t_27_extension_capability_bit0 = -1;
-static gint hf_sbc_tlv_t_27_extension_capability_reserved = -1;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support = -1;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit0 = -1;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit1 = -1;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit2 = -1;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_bit3 = -1;
-static gint hf_sbc_tlv_t_28_ho_trigger_metric_support_reserved = -1;
-static gint hf_sbc_tlv_t_171_minimum_num_of_frames = -1;
-static gint hf_sbc_tlv_t_172_harq_map_capability = -1;
-static gint hf_sbc_tlv_t_172_extended_harq_ie_capability = -1;
-static gint hf_sbc_tlv_t_172_sub_map_capability_first_zone = -1;
-static gint hf_sbc_tlv_t_172_sub_map_capability_other_zones = -1;
-static gint hf_sbc_tlv_t_172_dl_region_definition_support = -1;
-static gint hf_sbc_tlv_t_172_reserved = -1;
-static gint hf_sbc_tlv_t_172 = -1;
-static gint hf_sbc_tlv_t_173_ul_ctl_channel_support = -1;
-static gint hf_sbc_tlv_t_173_3_bit_mimo_fast_feedback = -1;
-static gint hf_sbc_tlv_t_173_enhanced_fast_feedback = -1;
-static gint hf_sbc_tlv_t_173_ul_ack = -1;
-static gint hf_sbc_tlv_t_173_reserved = -1;
-static gint hf_sbc_tlv_t_173_uep_fast_feedback = -1;
-static gint hf_sbc_tlv_t_173_measurement_report = -1;
-static gint hf_sbc_tlv_t_173_primary_secondary_fast_feedback = -1;
-static gint hf_sbc_tlv_t_173_diuc_cqi_fast_feedback = -1;
-static gint hf_sbc_tlv_t_174_ofdma_ms_csit_capability = -1;
-static gint hf_sbc_tlv_t_174_csit_compatibility_type_a = -1;
-static gint hf_sbc_tlv_t_174_csit_compatibility_type_b = -1;
-static gint hf_sbc_tlv_t_174_power_assignment_capability = -1;
-static gint hf_sbc_tlv_t_174_sounding_rsp_time_capability = -1;
-static gint hf_sbc_tlv_t_174_max_num_simultanous_sounding_instructions = -1;
-static gint hf_sbc_tlv_t_174_ss_csit_type_a_support = -1;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets = -1;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_a = -1;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_phy_set_b = -1;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_harq_parameters_set = -1;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_a = -1;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_mac_set_b = -1;
-static gint hf_sbc_tlv_t_204_ofdma_parameters_sets_reserved = -1;
-static gint hf_sbc_tlv_t_174_ss_csit_reserved = -1;
-static gint hf_sbc_tlv_t_175_max_num_bst_per_frm_capability_harq = -1;
-static gint hf_sbc_tlv_t_175_max_num_ul_harq_bst = -1;
-static gint hf_sbc_tlv_t_175_max_num_ul_harq_per_frm_include_one_non_harq_bst = -1;
-static gint hf_sbc_tlv_t_175_max_num_dl_harq_bst_per_harq_per_frm = -1;
-static gint hf_sbc_tlv_t_176 = -1;
-static gint hf_sbc_tlv_t_176_bit0 = -1;
-static gint hf_sbc_tlv_t_176_bit1 = -1;
-static gint hf_sbc_tlv_t_176_bit2 = -1;
-/* static gint hf_sbc_tlv_t_176_bit2_cor2 = -1; */
-static gint hf_sbc_tlv_t_176_bit3 = -1;
-static gint hf_sbc_tlv_t_176_bit4 = -1;
-static gint hf_sbc_tlv_t_176_bit5 = -1;
-static gint hf_sbc_tlv_t_176_bit6 = -1;
-static gint hf_sbc_tlv_t_176_bit7 = -1;
-static gint hf_sbc_tlv_t_176_bit8 = -1;
-static gint hf_sbc_tlv_t_176_bit9 = -1;
-static gint hf_sbc_tlv_t_176_bit10 = -1;
-static gint hf_sbc_tlv_t_176_bit11 = -1;
-static gint hf_sbc_tlv_t_176_bit12 = -1;
-static gint hf_sbc_tlv_t_176_bit13 = -1;
-static gint hf_sbc_tlv_t_176_bit14 = -1;
-static gint hf_sbc_tlv_t_176_bit15 = -1;
-static gint hf_sbc_tlv_t_176_bit16 = -1;
-static gint hf_sbc_tlv_t_176_bit17 = -1;
-static gint hf_sbc_tlv_t_176_bit18 = -1;
-static gint hf_sbc_tlv_t_176_bit19 = -1;
-static gint hf_sbc_tlv_t_176_reserved = -1;
-static gint hf_sbc_tlv_t_177_ofdma_ss_modulator_for_mimo_support = -1;
-static gint hf_sbc_tlv_t_177_stc_matrix_a = -1;
-static gint hf_sbc_tlv_t_177_stc_matrix_b_vertical = -1;
-static gint hf_sbc_tlv_t_177_stc_matrix_b_horizontal = -1;
-static gint hf_sbc_tlv_t_177_two_transmit_antennas = -1;
-static gint hf_sbc_tlv_t_177_capable_of_transmit_diversity = -1;
-static gint hf_sbc_tlv_t_177_capable_of_spacial_multiplexing = -1;
-static gint hf_sbc_tlv_t_177_beamforming = -1;
-static gint hf_sbc_tlv_t_177_adaptive_rate_ctl = -1;
-static gint hf_sbc_tlv_t_177_single_antenna = -1;
-static gint hf_sbc_tlv_t_177_collaborative_sm_with_one_antenna = -1;
-static gint hf_sbc_tlv_t_177_collaborative_sm_with_two_antennas = -1;
-static gint hf_sbc_tlv_t_177_capable_of_two_antenna = -1;
-static gint hf_sbc_tlv_t_177_rsvd = -1;
-static gint hf_sbc_tlv_t_178_sdma_pilot_capability = -1;
-static gint hf_sbc_tlv_t_178_sdma_pilot_pattern_support_for_amc_zone = -1;
-static gint hf_sbc_tlv_t_178_reserved = -1;
-static gint hf_sbc_tlv_t_179_ofdma_multiple_dl_burst_profile_support = -1;
-static gint hf_sbc_tlv_t_179_dl_bst_profile_for_multiple_fec = -1;
-static gint hf_sbc_tlv_t_179_ul_bst_profile_for_multiple_fec = -1;
-static gint hf_sbc_tlv_t_179_reserved = -1;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability = -1;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_NEP = -1;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_dl = -1;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_aggregation_flag_for_ul = -1;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved1 = -1;
-static gint hf_sbc_tlv_t_162_ul_harq_incremental_redundancy_buffer_capability_NEP = -1;
-static gint hf_sbc_tlv_t_162_harq_incremental_redundancy_buffer_capability_reserved2 = -1;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability = -1;
-static gint hf_sbc_tlv_t_163_dl_harq_buffering_capability_for_chase_combining = -1;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_dl = -1;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved1 = -1;
-static gint hf_sbc_tlv_t_163_ul_harq_buffering_capability_for_chase_combining = -1;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_aggregation_flag_ul = -1;
-static gint hf_sbc_tlv_t_163_harq_chase_combining_and_cc_ir_buffer_capability_reserved2 = -1;
+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 = -1;
-static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_a = -1;
-static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_vertical = -1;
-static gint hf_sbc_ss_demodulator_mimo_2_ann_stc_matrix_b_horizontal = -1;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_a = -1;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_vertical = -1;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_b_horizontal = -1;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_vertical = -1;
-static gint hf_sbc_ss_demodulator_mimo_4_ann_stc_matrix_c_horizontal = -1;
-static gint hf_sbc_ss_demodulator_mimo_rsvd = -1;
-static gint hf_sbc_ss_mimo_uplink_support = -1;
-static gint hf_sbc_ss_mimo_uplink_support_2_ann_sttd = -1;
-static gint hf_sbc_ss_mimo_uplink_support_2_ann_sm_vertical = -1;
-static gint hf_sbc_ss_mimo_uplink_support_1_ann_coop_sm = -1;
-static gint hf_sbc_ss_mimo_uplink_support_rsvd = -1;
+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 = -1;
-static gint hf_sbc_power_save_class_types_capability_bit0 = -1;
-static gint hf_sbc_power_save_class_types_capability_bit1 = -1;
-static gint hf_sbc_power_save_class_types_capability_bit2 = -1;
-static gint hf_sbc_power_save_class_types_capability_bits34 = -1;
-static gint hf_sbc_power_save_class_types_capability_bits567 = -1;
+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 = -1;
-static gint hf_sbc_auth_policy = -1;
-static gint hf_sbc_privacy_802_16 = -1;
-static gint hf_sbc_privacy_rsvd = -1;
-static gint hf_sbc_max_security_associations = -1;
+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 = -1;
+static int hf_sbc_invalid_tlv;
static const true_false_string tfs_sbc_bw_alloc_support_duplex =
{
@@ -559,18 +556,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 +605,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 +775,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 +1020,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 +1074,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 +2791,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 ab6d811d..0779f4ab 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 = -1;
-static gint ett_mac_mgmt_msg_ucd_decoder = -1;
+static int proto_mac_mgmt_msg_ucd_decoder;
+static int ett_mac_mgmt_msg_ucd_decoder;
/* fix fields */
-static gint hf_ucd_res_timeout = -1;
-static gint hf_ucd_bw_req_size = -1;
-static gint hf_ucd_ranging_req_size = -1;
-static gint hf_ucd_freq = -1;
-/* static gint hf_ucd_subchan_params_num_chan = -1; */
-static gint hf_ucd_ul_allocated_subchannles_bitmap = -1;
-/* static gint hf_ucd_subchan_params_num_sym = -1; */
-/* static gint hf_ucd_subchan_codes = -1; */
+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 = -1;
-static gint hf_ucd_ul_burst_uiuc = -1;
-static gint hf_ucd_burst_fec = -1;
-static gint hf_ucd_burst_ranging_data_ratio = -1;
-/*static gint hf_ucd_burst_power_boost = -1;
-*static gint hf_ucd_burst_tcs_enable = -1;
+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 = -1;
-static gint hf_ucd_tlv_t_158_optional_permutation_ul_allocated_subchannels_bitmap = -1;
-static gint hf_ucd_tlv_t_160_band_amc_release_threshold = -1;
-static gint hf_ucd_tlv_t_161_band_amc_allocation_timer = -1;
-static gint hf_ucd_tlv_t_162_band_amc_release_timer = -1;
-static gint hf_ucd_tlv_t_163_band_status_report_max_period = -1;
-static gint hf_ucd_tlv_t_164_band_amc_retry_timer = -1;
-static gint hf_ucd_tlv_t_171_harq_ack_delay_dl_burst = -1;
-static gint hf_ucd_tlv_t_170_safety_channel_retry_timer = -1;
-static gint hf_ucd_tlv_t_172_cqich_band_amc_transition_delay = -1;
-static gint hf_ucd_tlv_t_174_maximum_retransmission = -1;
-static gint hf_ucd_tlv_t_177_normalized_cn_override2 = -1;
-static gint hf_ucd_tlv_t_177_normalized_cn_override2_first_line = -1;
-static gint hf_ucd_tlv_t_177_normalized_cn_override2_list = -1;
-static gint hf_ucd_tlv_t_176_size_of_cqich_id_field = -1;
-static gint hf_ucd_tlv_t_186_upper_bound_aas_preamble = -1;
-static gint hf_ucd_tlv_t_187_lower_bound_aas_preamble = -1;
-static gint hf_ucd_tlv_t_188_allow_aas_beam_select_message = -1;
-static gint hf_ucd_tlv_t_189_use_cqich_indication_flag = -1;
-static gint hf_ucd_tlv_t_190_ms_specific_up_power_addjustment_step = -1;
-static gint hf_ucd_tlv_t_191_ms_specific_down_power_addjustment_step = -1;
-static gint hf_ucd_tlv_t_192_min_level_power_offset_adjustment = -1;
-static gint hf_ucd_tlv_t_193_max_level_power_offset_adjustment = -1;
-static gint hf_ucd_tlv_t_194_handover_ranging_codes = -1;
-static gint hf_ucd_tlv_t_195_initial_ranging_interval = -1;
-static gint hf_ucd_tlv_t_196_tx_power_report = -1;
-static gint hf_ucd_tlv_t_196_tx_power_report_threshold = -1;
-static gint hf_ucd_tlv_t_196_tx_power_report_interval = -1;
-static gint hf_ucd_tlv_t_196_tx_power_report_a_p_avg = -1;
-static gint hf_ucd_tlv_t_196_tx_power_report_threshold_icqch = -1;
-static gint hf_ucd_tlv_t_196_tx_power_report_interval_icqch = -1;
-static gint hf_ucd_tlv_t_196_tx_power_report_a_p_avg_icqch = -1;
-/* static gint hf_ucd_tlv_t_197_normalized_cn_channel_sounding = -1; */
-static gint hf_ucd_tlv_t_202_uplink_burst_profile_for_multiple_fec_types = -1;
-static gint hf_ucd_tlv_t_203_ul_pusc_subchannel_rotation = -1;
-static gint hf_ucd_tlv_t_205_relative_power_offset_ul_harq_burst = -1;
-static gint hf_ucd_tlv_t_206_relative_power_offset_ul_burst_containing_mac_mgmt_msg = -1;
-static gint hf_ucd_tlv_t_207_ul_initial_transmit_timing = -1;
-static gint hf_ucd_tlv_t_210_fast_feedback_region = -1;
-static gint hf_ucd_tlv_t_211_harq_ack_region = -1;
-static gint hf_ucd_tlv_t_212_ranging_region = -1;
-static gint hf_ucd_tlv_t_213_sounding_region = -1;
-static gint hf_ucd_tlv_t_150_initial_ranging_codes = -1;
-static gint hf_ucd_tlv_t_151_periodic_ranging_codes = -1;
-static gint hf_ucd_tlv_t_152_bandwidth_request_codes = -1;
-static gint hf_ucd_tlv_t_155_start_of_ranging_codes_group = -1;
-static gint hf_ucd_tlv_t_156_permutation_base = -1;
-static gint hf_ucd_ho_ranging_start = -1;
-static gint hf_ucd_ho_ranging_end = -1;
-static gint hf_ucd_initial_range_backoff_start = -1;
-static gint hf_ucd_initial_range_backoff_end = -1;
-static gint hf_ucd_bandwidth_backoff_start = -1;
-static gint hf_ucd_bandwidth_backoff_end = -1;
-static gint hf_ucd_periodic_ranging_backoff_start = -1;
-static gint hf_ucd_periodic_ranging_backoff_end = -1;
-static gint hf_ucd_config_change_count = -1;
-static gint hf_ucd_ranging_backoff_start = -1;
-static gint hf_ucd_ranging_backoff_end = -1;
-static gint hf_ucd_request_backoff_start = -1;
-static gint hf_ucd_request_backoff_end = -1;
+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 = -1; */
-static gint hf_ucd_invalid_tlv = -1;
+/* 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 b4909cc5..d0794266 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 = -1;
-
-static gint ett_ulmap = -1;
-static gint ett_ulmap_ie = -1;
-static gint ett_ulmap_ffb = -1;
-/* static gint ett_ulmap_c = -1; */
-/* static gint ett_ulmap_c_ie = -1; */
-/* static gint ett_ulmap_s = -1; */
-/* static gint ett_ulmap_s_ie = -1; */
-static gint ett_287_1 = -1;
-static gint ett_287_2 = -1;
-static gint ett_289 = -1;
-static gint ett_290 = -1;
-static gint ett_290b = -1;
-static gint ett_291 = -1;
-static gint ett_292 = -1;
-static gint ett_293 = -1;
-static gint ett_294 = -1;
-static gint ett_295 = -1;
-static gint ett_299 = -1;
-static gint ett_300 = -1;
-static gint ett_302 = -1;
-static gint ett_302a = -1;
-static gint ett_302b = -1;
-static gint ett_302c = -1;
-static gint ett_302d = -1;
-static gint ett_302e = -1;
-static gint ett_302f = -1;
-static gint ett_302g = -1;
-static gint ett_302h = -1;
-static gint ett_302i = -1;
-static gint ett_302j = -1;
-static gint ett_302k = -1;
-static gint ett_302l = -1;
-static gint ett_302m = -1;
-static gint ett_302n = -1;
-static gint ett_302o = -1;
-static gint ett_302p = -1;
-static gint ett_302q = -1;
-static gint ett_302r = -1;
-static gint ett_302s = -1;
-static gint ett_302t = -1;
-static gint ett_302u = -1;
-static gint ett_302v = -1;
-static gint ett_306 = -1;
-static gint ett_306_ul = -1;
-static gint ett_308b = -1;
-static gint ett_315d = -1;
+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,348 +197,348 @@ static const value_string boost_msgs[] =
#endif
/* ul-map fields */
-static gint hf_ulmap_reserved = -1;
-static gint hf_ulmap_ucd_count = -1;
-static gint hf_ulmap_alloc_start_time = -1;
-static gint hf_ulmap_ofdma_sym = -1;
-static gint hf_ulmap_ie_diuc_ext = -1;
-static gint hf_ulmap_ie_diuc_ext2 = -1;
-static gint hf_ulmap_ie_length = -1;
-static gint hf_ulmap_ie_reserved_extended2_duic = -1;
-static gint hf_ulmap_ie_reserved_extended_duic = -1;
-/* static gint hf_ulmap_fch_expected = -1; */
-
-/* static gint hf_ulmap_ie = -1; */
-
-static gint hf_ulmap_ie_cid = -1;
-static gint hf_ulmap_ie_uiuc = -1;
-static gint hf_ulmap_uiuc12_symofs = -1;
-static gint hf_ulmap_uiuc12_subofs = -1;
-static gint hf_ulmap_uiuc12_numsym = -1;
-static gint hf_ulmap_uiuc12_numsub = -1;
-static gint hf_ulmap_uiuc12_method = -1;
-static gint hf_ulmap_uiuc12_dri = -1;
-static gint hf_ulmap_uiuc10_dur = -1;
-static gint hf_ulmap_uiuc10_rep = -1;
-static gint hf_ulmap_uiuc10_slot_offset = -1;
-
-static gint hf_ulmap_uiuc14_dur = -1;
-static gint hf_ulmap_uiuc14_uiuc = -1;
-static gint hf_ulmap_uiuc14_rep = -1;
-static gint hf_ulmap_uiuc14_idx = -1;
-static gint hf_ulmap_uiuc14_code = -1;
-static gint hf_ulmap_uiuc14_sym = -1;
-static gint hf_ulmap_uiuc14_sub = -1;
-static gint hf_ulmap_uiuc14_bwr = -1;
-
-/* static gint hf_ulmap_uiuc11_ext = -1; */
-/* static gint hf_ulmap_uiuc11_len = -1; */
-/* static gint hf_ulmap_uiuc11_data = -1; */
-/* static gint hf_ulmap_uiuc15_ext = -1; */
-/* static gint hf_ulmap_uiuc15_len = -1; */
-/* static gint hf_ulmap_uiuc15_data = -1; */
-
-static gint hf_ulmap_uiuc0_symofs = -1;
-static gint hf_ulmap_uiuc0_subofs = -1;
-static gint hf_ulmap_uiuc0_numsym = -1;
-static gint hf_ulmap_uiuc0_numsub = -1;
-static gint hf_ulmap_uiuc0_rsv = -1;
-
-static gint hf_ulmap_uiuc13_symofs = -1;
-static gint hf_ulmap_uiuc13_subofs = -1;
-static gint hf_ulmap_uiuc13_numsym = -1;
-static gint hf_ulmap_uiuc13_numsub = -1;
-static gint hf_ulmap_uiuc13_papr = -1;
-static gint hf_ulmap_uiuc13_zone = -1;
-static gint hf_ulmap_uiuc13_rsv = -1;
-/* static gint hf_ulmap_crc16 = -1; */
-/* static gint hf_ulmap_crc16_status = -1; */
-static gint hf_ulmap_padding = -1;
+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 = -1;
-static int hf_ulmap_dedicated_ul_control_control_header = -1;
-static int hf_ulmap_dedicated_ul_control_num_sdma_layers = -1;
-static int hf_ulmap_dedicated_ul_control_pilot_pattern = -1;
-static int hf_ulmap_dedicated_mimo_ul_control_matrix = -1;
-static int hf_ulmap_dedicated_mimo_ul_control_n_layer = -1;
-static int hf_ulmap_harq_chase_dedicated_ul_control_indicator = -1;
-static int hf_ulmap_harq_chase_uiuc = -1;
-static int hf_ulmap_harq_chase_repetition_coding_indication = -1;
-static int hf_ulmap_harq_chase_duration = -1;
-static int hf_ulmap_harq_chase_acid = -1;
-static int hf_ulmap_harq_chase_ai_sn = -1;
-static int hf_ulmap_harq_chase_ack_disable = -1;
-static int hf_ulmap_reserved_uint = -1;
-static int hf_ulmap_harq_ir_ctc_dedicated_ul_control_indicator = -1;
-static int hf_ulmap_harq_ir_ctc_nep = -1;
-static int hf_ulmap_harq_ir_ctc_nsch = -1;
-static int hf_ulmap_harq_ir_ctc_spid = -1;
-static int hf_ulmap_harq_ir_ctc_acin = -1;
-static int hf_ulmap_harq_ir_ctc_ai_sn = -1;
-static int hf_ulmap_harq_ir_ctc_ack_disable = -1;
-static int hf_ulmap_harq_ir_cc_dedicated_ul_control_indicator = -1;
-static int hf_ulmap_harq_ir_cc_uiuc = -1;
-static int hf_ulmap_harq_ir_cc_repetition_coding_indication = -1;
-static int hf_ulmap_harq_ir_cc_duration = -1;
-static int hf_ulmap_harq_ir_cc_spid = -1;
-static int hf_ulmap_harq_ir_cc_acid = -1;
-static int hf_ulmap_harq_ir_cc_ai_sn = -1;
-static int hf_ulmap_harq_ir_cc_ack_disable = -1;
-static int hf_ulmap_mimo_ul_chase_harq_mu_indicator = -1;
-static int hf_ulmap_mimo_ul_chase_harq_dedicated_mimo_ulcontrol_indicator = -1;
-static int hf_ulmap_mimo_ul_chase_harq_ack_disable = -1;
-static int hf_ulmap_mimo_ul_chase_harq_matrix = -1;
-static int hf_ulmap_mimo_ul_chase_harq_duration = -1;
-static int hf_ulmap_mimo_ul_chase_harq_uiuc = -1;
-static int hf_ulmap_mimo_ul_chase_harq_repetition_coding_indication = -1;
-static int hf_ulmap_mimo_ul_chase_harq_acid = -1;
-static int hf_ulmap_mimo_ul_chase_harq_ai_sn = -1;
-static int hf_ulmap_mimo_ul_ir_harq_mu_indicator = -1;
-static int hf_ulmap_mimo_ul_ir_harq_dedicated_mimo_ul_control_indicator = -1;
-static int hf_ulmap_mimo_ul_ir_harq_ack_disable = -1;
-static int hf_ulmap_mimo_ul_ir_harq_matrix = -1;
-static int hf_ulmap_mimo_ul_ir_harq_nsch = -1;
-static int hf_ulmap_mimo_ul_ir_harq_nep = -1;
-static int hf_ulmap_mimo_ul_ir_harq_spid = -1;
-static int hf_ulmap_mimo_ul_ir_harq_acid = -1;
-static int hf_ulmap_mimo_ul_ir_harq_ai_sn = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_mu_indicator = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_dedicated_mimo_ul_control_indicator = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_ack_disable = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_matrix = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_duration = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_uiuc = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_repetition_coding_indication = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_acid = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_ai_sn = -1;
-static int hf_ulmap_mimo_ul_ir_harq_cc_spid = -1;
-static int hf_ulmap_mimo_ul_stc_harq_tx_count = -1;
-static int hf_ulmap_mimo_ul_stc_harq_duration = -1;
-static int hf_ulmap_mimo_ul_stc_harq_sub_burst_offset_indication = -1;
-static int hf_ulmap_mimo_ul_stc_harq_sub_burst_offset = -1;
-static int hf_ulmap_mimo_ul_stc_harq_ack_disable = -1;
-static int hf_ulmap_mimo_ul_stc_harq_uiuc = -1;
-static int hf_ulmap_mimo_ul_stc_harq_repetition_coding_indication = -1;
-static int hf_ulmap_mimo_ul_stc_harq_acid = -1;
-static int hf_ulmap_power_control = -1;
-static int hf_ulmap_power_measurement_frame = -1;
-static int hf_ulmap_mini_subcha_alloc_extended_2_uiuc = -1;
-static int hf_ulmap_mini_subcha_alloc_length = -1;
-static int hf_ulmap_mini_subcha_alloc_ctype = -1;
-static int hf_ulmap_mini_subcha_alloc_duration = -1;
-static int hf_ulmap_mini_subcha_alloc_cid = -1;
-static int hf_ulmap_mini_subcha_alloc_uiuc = -1;
-static int hf_ulmap_mini_subcha_alloc_repetition = -1;
-static int hf_ulmap_mini_subcha_alloc_padding = -1;
-static int hf_ulmap_aas_ul_extended_uiuc = -1;
-static int hf_ulmap_aas_ul_length = -1;
-static int hf_ulmap_aas_ul_permutation = -1;
-static int hf_ulmap_aas_ul_ul_permbase = -1;
-static int hf_ulmap_aas_ul_ofdma_symbol_offset = -1;
-static int hf_ulmap_aas_ul_aas_zone_length = -1;
-static int hf_ulmap_aas_ul_uplink_preamble_config = -1;
-static int hf_ulmap_aas_ul_preamble_type = -1;
-static int hf_ulmap_cqich_alloc_extended_uiuc = -1;
-static int hf_ulmap_cqich_alloc_length = -1;
-static int hf_ulmap_cqich_alloc_cqich_id = -1;
-static int hf_ulmap_cqich_alloc_allocation_offset = -1;
-static int hf_ulmap_cqich_alloc_period = -1;
-static int hf_ulmap_cqich_alloc_frame_offset = -1;
-static int hf_ulmap_cqich_alloc_duration = -1;
-static int hf_ulmap_cqich_alloc_report_configuration_included = -1;
-static int hf_ulmap_cqich_alloc_feedback_type = -1;
-static int hf_ulmap_cqich_alloc_report_type = -1;
-static int hf_ulmap_cqich_alloc_cinr_preamble_report_type = -1;
-static int hf_ulmap_cqich_alloc_zone_permutation = -1;
-static int hf_ulmap_cqich_alloc_zone_type = -1;
-static int hf_ulmap_cqich_alloc_zone_prbs_id = -1;
-static int hf_ulmap_cqich_alloc_major_group_indication = -1;
-static int hf_ulmap_cqich_alloc_pusc_major_group_bitmap = -1;
-static int hf_ulmap_cqich_alloc_cinr_zone_measurement_type = -1;
-static int hf_ulmap_cqich_alloc_averaging_parameter_included = -1;
-static int hf_ulmap_cqich_alloc_averaging_parameter = -1;
-static int hf_ulmap_cqich_alloc_mimo_permutation_feedback_cycle = -1;
-static int hf_ulmap_zone_extended_uiuc = -1;
-static int hf_ulmap_zone_length = -1;
-static int hf_ulmap_zone_ofdma_symbol_offset = -1;
-static int hf_ulmap_zone_permutation = -1;
-static int hf_ulmap_zone_ul_permbase = -1;
-static int hf_ulmap_zone_amc_type = -1;
-static int hf_ulmap_zone_use_all_sc_indicator = -1;
-static int hf_ulmap_zone_disable_subchannel_rotation = -1;
-static int hf_ulmap_phymod_ul_extended_uiuc = -1;
-static int hf_ulmap_phymod_ul_length = -1;
-static int hf_ulmap_phymod_ul_preamble_modifier_type = -1;
-static int hf_ulmap_phymod_ul_preamble_frequency_shift_index = -1;
-static int hf_ulmap_phymod_ul_preamble_time_shift_index = -1;
-static int hf_ulmap_phymod_ul_pilot_pattern_modifier = -1;
-static int hf_ulmap_phymod_ul_pilot_pattern_index = -1;
-static int hf_ulmap_fast_tracking_extended_uiuc = -1;
-static int hf_ulmap_fast_tracking_length = -1;
-static int hf_ulmap_fast_tracking_map_index = -1;
-static int hf_ulmap_fast_tracking_power_correction = -1;
-static int hf_ulmap_fast_tracking_frequency_correction = -1;
-static int hf_ulmap_fast_tracking_time_correction = -1;
-static int hf_ulmap_pusc_burst_allocation_extended_uiuc = -1;
-static int hf_ulmap_pusc_burst_allocation_length = -1;
-static int hf_ulmap_pusc_burst_allocation_uiuc = -1;
-static int hf_ulmap_pusc_burst_allocation_segment = -1;
-static int hf_ulmap_pusc_burst_allocation_ul_permbase = -1;
-static int hf_ulmap_pusc_burst_allocation_ofdma_symbol_offset = -1;
-static int hf_ulmap_pusc_burst_allocation_subchannel_offset = -1;
-static int hf_ulmap_pusc_burst_allocation_duration = -1;
-static int hf_ulmap_pusc_burst_allocation_repetition_coding_indication = -1;
-static int hf_ulmap_fast_ranging_extended_uiuc = -1;
-static int hf_ulmap_fast_ranging_length = -1;
-static int hf_ulmap_fast_ranging_ho_id_indicator = -1;
-static int hf_ulmap_fast_ranging_ho_id = -1;
-static int hf_ulmap_fast_ranging_mac_address = -1;
-static int hf_ulmap_fast_ranging_uiuc = -1;
-static int hf_ulmap_fast_ranging_duration = -1;
-static int hf_ulmap_fast_ranging_repetition_coding_indication = -1;
-static int hf_ulmap_allocation_start_extended_uiuc = -1;
-static int hf_ulmap_allocation_start_length = -1;
-static int hf_ulmap_allocation_start_ofdma_symbol_offset = -1;
-static int hf_ulmap_allocation_start_subchannel_offset = -1;
-static int hf_ulmap_cqich_enhanced_alloc_extended_2_uiuc = -1;
-static int hf_ulmap_cqich_enhanced_alloc_length = -1;
-static int hf_ulmap_cqich_enhanced_alloc_cqich_id = -1;
-static int hf_ulmap_cqich_enhanced_alloc_period = -1;
-static int hf_ulmap_cqich_enhanced_alloc_frame_offset = -1;
-static int hf_ulmap_cqich_enhanced_alloc_duration = -1;
-static int hf_ulmap_cqich_enhanced_alloc_cqich_num = -1;
-static int hf_ulmap_cqich_enhanced_alloc_feedback_type = -1;
-static int hf_ulmap_cqich_enhanced_alloc_allocation_index = -1;
-static int hf_ulmap_cqich_enhanced_alloc_cqich_type = -1;
-static int hf_ulmap_cqich_enhanced_alloc_sttd_indication = -1;
-static int hf_ulmap_cqich_enhanced_alloc_band_amc_precoding_mode = -1;
-static int hf_ulmap_cqich_enhanced_alloc_nr_precoders_feedback = -1;
-static int hf_ulmap_anchor_bs_switch_extended_2_uiuc = -1;
-static int hf_ulmap_anchor_bs_switch_length = -1;
-static int hf_ulmap_anchor_bs_switch_n_anchor_bs_switch = -1;
-static int hf_ulmap_anchor_bs_switch_reduced_cid = -1;
-static int hf_ulmap_anchor_bs_switch_action_code = -1;
-static int hf_ulmap_anchor_bs_switch_action_time = -1;
-static int hf_ulmap_anchor_bs_switch_temp_bs_id = -1;
-static int hf_ulmap_anchor_bs_switch_ak_change_indicator = -1;
-static int hf_ulmap_anchor_bs_switch_cqich_allocation_indicator = -1;
-static int hf_ulmap_anchor_bs_switch_cqich_id = -1;
-static int hf_ulmap_anchor_bs_switch_feedback_channel_offset = -1;
-static int hf_ulmap_anchor_bs_switch_period = -1;
-static int hf_ulmap_anchor_bs_switch_frame_offset = -1;
-static int hf_ulmap_anchor_bs_switch_duration = -1;
-static int hf_ulmap_anchor_bs_switch_mimo_permutation_feedback_code = -1;
-static int hf_ulmap_sounding_command_extended_2_uiuc = -1;
-static int hf_ulmap_sounding_command_length = -1;
-static int hf_ulmap_sounding_command_type = -1;
-static int hf_ulmap_sounding_command_send_sounding_report_flag = -1;
-static int hf_ulmap_sounding_command_relevance_flag = -1;
-static int hf_ulmap_sounding_command_relevance = -1;
-static int hf_ulmap_sounding_command_include_additional_feedback = -1;
-static int hf_ulmap_sounding_command_num_sounding_symbols = -1;
-static int hf_ulmap_sounding_command_separability_type = -1;
-static int hf_ulmap_sounding_command_max_cyclic_shift_index_p = -1;
-static int hf_ulmap_sounding_command_decimation_value = -1;
-static int hf_ulmap_sounding_command_decimation_offset_randomization = -1;
-static int hf_ulmap_sounding_command_symbol_index = -1;
-static int hf_ulmap_sounding_command_number_of_cids = -1;
-static int hf_ulmap_sounding_command_shorted_basic_cid = -1;
-static int hf_ulmap_sounding_command_power_assignment_method = -1;
-static int hf_ulmap_sounding_command_power_boost = -1;
-static int hf_ulmap_sounding_command_multi_antenna_flag = -1;
-static int hf_ulmap_sounding_command_allocation_mode = -1;
-static int hf_ulmap_sounding_command_band_bit_map = -1;
-static int hf_ulmap_sounding_command_starting_frequency_band = -1;
-static int hf_ulmap_sounding_command_number_of_frequency_bands = -1;
-static int hf_ulmap_sounding_command_cyclic_time_shift_index = -1;
-static int hf_ulmap_sounding_command_decimation_offset = -1;
-static int hf_ulmap_sounding_command_use_same_symbol_for_additional_feedback = -1;
-static int hf_ulmap_sounding_command_periodicity = -1;
-static int hf_ulmap_sounding_command_permutation = -1;
-static int hf_ulmap_sounding_command_dl_permbase = -1;
-static int hf_ulmap_sounding_command_shortened_basic_cid = -1;
-static int hf_ulmap_sounding_command_subchannel_offset = -1;
-static int hf_ulmap_sounding_command_number_of_subchannels = -1;
-static int hf_ulmap_harq_ulmap_extended_2_uiuc = -1;
-static int hf_ulmap_harq_ulmap_length = -1;
-static int hf_ulmap_harq_ulmap_rcid_type = -1;
-static int hf_ulmap_harq_ulmap_mode = -1;
-static int hf_ulmap_harq_ulmap_allocation_start_indication = -1;
-static int hf_ulmap_harq_ulmap_ofdma_symbol_offset = -1;
-static int hf_ulmap_harq_ulmap_subchannel_offset = -1;
-static int hf_ulmap_harq_ulmap_n_sub_burst = -1;
-static int hf_ulmap_harq_ackch_region_alloc_extended_2_uiuc = -1;
-static int hf_ulmap_harq_ackch_region_alloc_length = -1;
-static int hf_ulmap_harq_ackch_region_alloc_ofdma_symbol_offset = -1;
-static int hf_ulmap_harq_ackch_region_alloc_subchannel_offset = -1;
-static int hf_ulmap_harq_ackch_region_alloc_num_ofdma_symbols = -1;
-static int hf_ulmap_harq_ackch_region_alloc_num_subchannels = -1;
-static int hf_ulmap_aas_sdma_extended_2_uiuc = -1;
-static int hf_ulmap_aas_sdma_length = -1;
-static int hf_ulmap_aas_sdma_rcid_type = -1;
-static int hf_ulmap_aas_sdma_num_burst_region = -1;
-static int hf_ulmap_aas_sdma_slot_offset = -1;
-static int hf_ulmap_aas_sdma_slot_duration = -1;
-static int hf_ulmap_aas_sdma_number_of_users = -1;
-static int hf_ulmap_aas_sdma_encoding_mode = -1;
-static int hf_ulmap_aas_sdma_power_adjust = -1;
-static int hf_ulmap_aas_sdma_pilot_pattern_modifier = -1;
-static int hf_ulmap_aas_sdma_preamble_modifier_index = -1;
-static int hf_ulmap_aas_sdma_pilot_pattern = -1;
-static int hf_ulmap_aas_sdma_diuc = -1;
-static int hf_ulmap_aas_sdma_repetition_coding_indication = -1;
-static int hf_ulmap_aas_sdma_acid = -1;
-static int hf_ulmap_aas_sdma_ai_sn = -1;
-static int hf_ulmap_aas_sdma_nep = -1;
-static int hf_ulmap_aas_sdma_nsch = -1;
-static int hf_ulmap_aas_sdma_spid = -1;
-static int hf_ulmap_aas_sdma_power_adjustment = -1;
-static int hf_ulmap_feedback_polling_extended_2_uiuc = -1;
-static int hf_ulmap_feedback_polling_length = -1;
-static int hf_ulmap_feedback_polling_num_allocation = -1;
-static int hf_ulmap_feedback_polling_dedicated_ul_allocation_included = -1;
-static int hf_ulmap_feedback_polling_basic_cid = -1;
-static int hf_ulmap_feedback_polling_allocation_duration = -1;
-static int hf_ulmap_feedback_polling_type = -1;
-static int hf_ulmap_feedback_polling_frame_offset = -1;
-static int hf_ulmap_feedback_polling_period = -1;
-static int hf_ulmap_feedback_polling_uiuc = -1;
-static int hf_ulmap_feedback_polling_ofdma_symbol_offset = -1;
-static int hf_ulmap_feedback_polling_subchannel_offset = -1;
-static int hf_ulmap_feedback_polling_duration = -1;
-static int hf_ulmap_feedback_polling_repetition_coding_indication = -1;
-static int hf_ulmap_reduced_aas_aas_zone_configuration_included = -1;
-static int hf_ulmap_reduced_aas_aas_zone_position_included = -1;
-static int hf_ulmap_reduced_aas_ul_map_information_included = -1;
-static int hf_ulmap_reduced_aas_phy_modification_included = -1;
-static int hf_ulmap_reduced_aas_power_control_included = -1;
-static int hf_ulmap_reduced_aas_include_feedback_header = -1;
-static int hf_ulmap_reduced_aas_encoding_mode = -1;
-static int hf_ulmap_reduced_aas_permutation = -1;
-static int hf_ulmap_reduced_aas_ul_permbase = -1;
-static int hf_ulmap_reduced_aas_preamble_indication = -1;
-static int hf_ulmap_reduced_aas_padding = -1;
-static int hf_ulmap_reduced_aas_zone_symbol_offset = -1;
-static int hf_ulmap_reduced_aas_zone_length = -1;
-static int hf_ulmap_reduced_aas_ucd_count = -1;
-static int hf_ulmap_reduced_aas_private_map_alloc_start_time = -1;
-static int hf_ulmap_reduced_aas_pilot_pattern_index = -1;
-static int hf_ulmap_reduced_aas_preamble_select = -1;
-static int hf_ulmap_reduced_aas_preamble_shift_index = -1;
-static int hf_ulmap_reduced_aas_pilot_pattern_modifier = -1;
-static int hf_ulmap_reduced_aas_power_control = -1;
-static int hf_ulmap_reduced_aas_ul_frame_offset = -1;
-static int hf_ulmap_reduced_aas_slot_offset = -1;
-static int hf_ulmap_reduced_aas_slot_duration = -1;
-static int hf_ulmap_reduced_aas_uiuc_nep = -1;
-static int hf_ulmap_reduced_aas_acid = -1;
-static int hf_ulmap_reduced_aas_ai_sn = -1;
-static int hf_ulmap_reduced_aas_nsch = -1;
-static int hf_ulmap_reduced_aas_spid = -1;
-static int hf_ulmap_reduced_aas_repetition_coding_indication = -1;
-
-static expert_field ei_ulmap_not_implemented = EI_INIT;
+static int hf_ulmap_dedicated_ul_control_length;
+static int hf_ulmap_dedicated_ul_control_control_header;
+static int hf_ulmap_dedicated_ul_control_num_sdma_layers;
+static int hf_ulmap_dedicated_ul_control_pilot_pattern;
+static int hf_ulmap_dedicated_mimo_ul_control_matrix;
+static int hf_ulmap_dedicated_mimo_ul_control_n_layer;
+static int hf_ulmap_harq_chase_dedicated_ul_control_indicator;
+static int hf_ulmap_harq_chase_uiuc;
+static int hf_ulmap_harq_chase_repetition_coding_indication;
+static int hf_ulmap_harq_chase_duration;
+static int hf_ulmap_harq_chase_acid;
+static int hf_ulmap_harq_chase_ai_sn;
+static int hf_ulmap_harq_chase_ack_disable;
+static int hf_ulmap_reserved_uint;
+static int hf_ulmap_harq_ir_ctc_dedicated_ul_control_indicator;
+static int hf_ulmap_harq_ir_ctc_nep;
+static int hf_ulmap_harq_ir_ctc_nsch;
+static int hf_ulmap_harq_ir_ctc_spid;
+static int hf_ulmap_harq_ir_ctc_acin;
+static int hf_ulmap_harq_ir_ctc_ai_sn;
+static int hf_ulmap_harq_ir_ctc_ack_disable;
+static int hf_ulmap_harq_ir_cc_dedicated_ul_control_indicator;
+static int hf_ulmap_harq_ir_cc_uiuc;
+static int hf_ulmap_harq_ir_cc_repetition_coding_indication;
+static int hf_ulmap_harq_ir_cc_duration;
+static int hf_ulmap_harq_ir_cc_spid;
+static int hf_ulmap_harq_ir_cc_acid;
+static int hf_ulmap_harq_ir_cc_ai_sn;
+static int hf_ulmap_harq_ir_cc_ack_disable;
+static int hf_ulmap_mimo_ul_chase_harq_mu_indicator;
+static int hf_ulmap_mimo_ul_chase_harq_dedicated_mimo_ulcontrol_indicator;
+static int hf_ulmap_mimo_ul_chase_harq_ack_disable;
+static int hf_ulmap_mimo_ul_chase_harq_matrix;
+static int hf_ulmap_mimo_ul_chase_harq_duration;
+static int hf_ulmap_mimo_ul_chase_harq_uiuc;
+static int hf_ulmap_mimo_ul_chase_harq_repetition_coding_indication;
+static int hf_ulmap_mimo_ul_chase_harq_acid;
+static int hf_ulmap_mimo_ul_chase_harq_ai_sn;
+static int hf_ulmap_mimo_ul_ir_harq_mu_indicator;
+static int hf_ulmap_mimo_ul_ir_harq_dedicated_mimo_ul_control_indicator;
+static int hf_ulmap_mimo_ul_ir_harq_ack_disable;
+static int hf_ulmap_mimo_ul_ir_harq_matrix;
+static int hf_ulmap_mimo_ul_ir_harq_nsch;
+static int hf_ulmap_mimo_ul_ir_harq_nep;
+static int hf_ulmap_mimo_ul_ir_harq_spid;
+static int hf_ulmap_mimo_ul_ir_harq_acid;
+static int hf_ulmap_mimo_ul_ir_harq_ai_sn;
+static int hf_ulmap_mimo_ul_ir_harq_cc_mu_indicator;
+static int hf_ulmap_mimo_ul_ir_harq_cc_dedicated_mimo_ul_control_indicator;
+static int hf_ulmap_mimo_ul_ir_harq_cc_ack_disable;
+static int hf_ulmap_mimo_ul_ir_harq_cc_matrix;
+static int hf_ulmap_mimo_ul_ir_harq_cc_duration;
+static int hf_ulmap_mimo_ul_ir_harq_cc_uiuc;
+static int hf_ulmap_mimo_ul_ir_harq_cc_repetition_coding_indication;
+static int hf_ulmap_mimo_ul_ir_harq_cc_acid;
+static int hf_ulmap_mimo_ul_ir_harq_cc_ai_sn;
+static int hf_ulmap_mimo_ul_ir_harq_cc_spid;
+static int hf_ulmap_mimo_ul_stc_harq_tx_count;
+static int hf_ulmap_mimo_ul_stc_harq_duration;
+static int hf_ulmap_mimo_ul_stc_harq_sub_burst_offset_indication;
+static int hf_ulmap_mimo_ul_stc_harq_sub_burst_offset;
+static int hf_ulmap_mimo_ul_stc_harq_ack_disable;
+static int hf_ulmap_mimo_ul_stc_harq_uiuc;
+static int hf_ulmap_mimo_ul_stc_harq_repetition_coding_indication;
+static int hf_ulmap_mimo_ul_stc_harq_acid;
+static int hf_ulmap_power_control;
+static int hf_ulmap_power_measurement_frame;
+static int hf_ulmap_mini_subcha_alloc_extended_2_uiuc;
+static int hf_ulmap_mini_subcha_alloc_length;
+static int hf_ulmap_mini_subcha_alloc_ctype;
+static int hf_ulmap_mini_subcha_alloc_duration;
+static int hf_ulmap_mini_subcha_alloc_cid;
+static int hf_ulmap_mini_subcha_alloc_uiuc;
+static int hf_ulmap_mini_subcha_alloc_repetition;
+static int hf_ulmap_mini_subcha_alloc_padding;
+static int hf_ulmap_aas_ul_extended_uiuc;
+static int hf_ulmap_aas_ul_length;
+static int hf_ulmap_aas_ul_permutation;
+static int hf_ulmap_aas_ul_ul_permbase;
+static int hf_ulmap_aas_ul_ofdma_symbol_offset;
+static int hf_ulmap_aas_ul_aas_zone_length;
+static int hf_ulmap_aas_ul_uplink_preamble_config;
+static int hf_ulmap_aas_ul_preamble_type;
+static int hf_ulmap_cqich_alloc_extended_uiuc;
+static int hf_ulmap_cqich_alloc_length;
+static int hf_ulmap_cqich_alloc_cqich_id;
+static int hf_ulmap_cqich_alloc_allocation_offset;
+static int hf_ulmap_cqich_alloc_period;
+static int hf_ulmap_cqich_alloc_frame_offset;
+static int hf_ulmap_cqich_alloc_duration;
+static int hf_ulmap_cqich_alloc_report_configuration_included;
+static int hf_ulmap_cqich_alloc_feedback_type;
+static int hf_ulmap_cqich_alloc_report_type;
+static int hf_ulmap_cqich_alloc_cinr_preamble_report_type;
+static int hf_ulmap_cqich_alloc_zone_permutation;
+static int hf_ulmap_cqich_alloc_zone_type;
+static int hf_ulmap_cqich_alloc_zone_prbs_id;
+static int hf_ulmap_cqich_alloc_major_group_indication;
+static int hf_ulmap_cqich_alloc_pusc_major_group_bitmap;
+static int hf_ulmap_cqich_alloc_cinr_zone_measurement_type;
+static int hf_ulmap_cqich_alloc_averaging_parameter_included;
+static int hf_ulmap_cqich_alloc_averaging_parameter;
+static int hf_ulmap_cqich_alloc_mimo_permutation_feedback_cycle;
+static int hf_ulmap_zone_extended_uiuc;
+static int hf_ulmap_zone_length;
+static int hf_ulmap_zone_ofdma_symbol_offset;
+static int hf_ulmap_zone_permutation;
+static int hf_ulmap_zone_ul_permbase;
+static int hf_ulmap_zone_amc_type;
+static int hf_ulmap_zone_use_all_sc_indicator;
+static int hf_ulmap_zone_disable_subchannel_rotation;
+static int hf_ulmap_phymod_ul_extended_uiuc;
+static int hf_ulmap_phymod_ul_length;
+static int hf_ulmap_phymod_ul_preamble_modifier_type;
+static int hf_ulmap_phymod_ul_preamble_frequency_shift_index;
+static int hf_ulmap_phymod_ul_preamble_time_shift_index;
+static int hf_ulmap_phymod_ul_pilot_pattern_modifier;
+static int hf_ulmap_phymod_ul_pilot_pattern_index;
+static int hf_ulmap_fast_tracking_extended_uiuc;
+static int hf_ulmap_fast_tracking_length;
+static int hf_ulmap_fast_tracking_map_index;
+static int hf_ulmap_fast_tracking_power_correction;
+static int hf_ulmap_fast_tracking_frequency_correction;
+static int hf_ulmap_fast_tracking_time_correction;
+static int hf_ulmap_pusc_burst_allocation_extended_uiuc;
+static int hf_ulmap_pusc_burst_allocation_length;
+static int hf_ulmap_pusc_burst_allocation_uiuc;
+static int hf_ulmap_pusc_burst_allocation_segment;
+static int hf_ulmap_pusc_burst_allocation_ul_permbase;
+static int hf_ulmap_pusc_burst_allocation_ofdma_symbol_offset;
+static int hf_ulmap_pusc_burst_allocation_subchannel_offset;
+static int hf_ulmap_pusc_burst_allocation_duration;
+static int hf_ulmap_pusc_burst_allocation_repetition_coding_indication;
+static int hf_ulmap_fast_ranging_extended_uiuc;
+static int hf_ulmap_fast_ranging_length;
+static int hf_ulmap_fast_ranging_ho_id_indicator;
+static int hf_ulmap_fast_ranging_ho_id;
+static int hf_ulmap_fast_ranging_mac_address;
+static int hf_ulmap_fast_ranging_uiuc;
+static int hf_ulmap_fast_ranging_duration;
+static int hf_ulmap_fast_ranging_repetition_coding_indication;
+static int hf_ulmap_allocation_start_extended_uiuc;
+static int hf_ulmap_allocation_start_length;
+static int hf_ulmap_allocation_start_ofdma_symbol_offset;
+static int hf_ulmap_allocation_start_subchannel_offset;
+static int hf_ulmap_cqich_enhanced_alloc_extended_2_uiuc;
+static int hf_ulmap_cqich_enhanced_alloc_length;
+static int hf_ulmap_cqich_enhanced_alloc_cqich_id;
+static int hf_ulmap_cqich_enhanced_alloc_period;
+static int hf_ulmap_cqich_enhanced_alloc_frame_offset;
+static int hf_ulmap_cqich_enhanced_alloc_duration;
+static int hf_ulmap_cqich_enhanced_alloc_cqich_num;
+static int hf_ulmap_cqich_enhanced_alloc_feedback_type;
+static int hf_ulmap_cqich_enhanced_alloc_allocation_index;
+static int hf_ulmap_cqich_enhanced_alloc_cqich_type;
+static int hf_ulmap_cqich_enhanced_alloc_sttd_indication;
+static int hf_ulmap_cqich_enhanced_alloc_band_amc_precoding_mode;
+static int hf_ulmap_cqich_enhanced_alloc_nr_precoders_feedback;
+static int hf_ulmap_anchor_bs_switch_extended_2_uiuc;
+static int hf_ulmap_anchor_bs_switch_length;
+static int hf_ulmap_anchor_bs_switch_n_anchor_bs_switch;
+static int hf_ulmap_anchor_bs_switch_reduced_cid;
+static int hf_ulmap_anchor_bs_switch_action_code;
+static int hf_ulmap_anchor_bs_switch_action_time;
+static int hf_ulmap_anchor_bs_switch_temp_bs_id;
+static int hf_ulmap_anchor_bs_switch_ak_change_indicator;
+static int hf_ulmap_anchor_bs_switch_cqich_allocation_indicator;
+static int hf_ulmap_anchor_bs_switch_cqich_id;
+static int hf_ulmap_anchor_bs_switch_feedback_channel_offset;
+static int hf_ulmap_anchor_bs_switch_period;
+static int hf_ulmap_anchor_bs_switch_frame_offset;
+static int hf_ulmap_anchor_bs_switch_duration;
+static int hf_ulmap_anchor_bs_switch_mimo_permutation_feedback_code;
+static int hf_ulmap_sounding_command_extended_2_uiuc;
+static int hf_ulmap_sounding_command_length;
+static int hf_ulmap_sounding_command_type;
+static int hf_ulmap_sounding_command_send_sounding_report_flag;
+static int hf_ulmap_sounding_command_relevance_flag;
+static int hf_ulmap_sounding_command_relevance;
+static int hf_ulmap_sounding_command_include_additional_feedback;
+static int hf_ulmap_sounding_command_num_sounding_symbols;
+static int hf_ulmap_sounding_command_separability_type;
+static int hf_ulmap_sounding_command_max_cyclic_shift_index_p;
+static int hf_ulmap_sounding_command_decimation_value;
+static int hf_ulmap_sounding_command_decimation_offset_randomization;
+static int hf_ulmap_sounding_command_symbol_index;
+static int hf_ulmap_sounding_command_number_of_cids;
+static int hf_ulmap_sounding_command_shorted_basic_cid;
+static int hf_ulmap_sounding_command_power_assignment_method;
+static int hf_ulmap_sounding_command_power_boost;
+static int hf_ulmap_sounding_command_multi_antenna_flag;
+static int hf_ulmap_sounding_command_allocation_mode;
+static int hf_ulmap_sounding_command_band_bit_map;
+static int hf_ulmap_sounding_command_starting_frequency_band;
+static int hf_ulmap_sounding_command_number_of_frequency_bands;
+static int hf_ulmap_sounding_command_cyclic_time_shift_index;
+static int hf_ulmap_sounding_command_decimation_offset;
+static int hf_ulmap_sounding_command_use_same_symbol_for_additional_feedback;
+static int hf_ulmap_sounding_command_periodicity;
+static int hf_ulmap_sounding_command_permutation;
+static int hf_ulmap_sounding_command_dl_permbase;
+static int hf_ulmap_sounding_command_shortened_basic_cid;
+static int hf_ulmap_sounding_command_subchannel_offset;
+static int hf_ulmap_sounding_command_number_of_subchannels;
+static int hf_ulmap_harq_ulmap_extended_2_uiuc;
+static int hf_ulmap_harq_ulmap_length;
+static int hf_ulmap_harq_ulmap_rcid_type;
+static int hf_ulmap_harq_ulmap_mode;
+static int hf_ulmap_harq_ulmap_allocation_start_indication;
+static int hf_ulmap_harq_ulmap_ofdma_symbol_offset;
+static int hf_ulmap_harq_ulmap_subchannel_offset;
+static int hf_ulmap_harq_ulmap_n_sub_burst;
+static int hf_ulmap_harq_ackch_region_alloc_extended_2_uiuc;
+static int hf_ulmap_harq_ackch_region_alloc_length;
+static int hf_ulmap_harq_ackch_region_alloc_ofdma_symbol_offset;
+static int hf_ulmap_harq_ackch_region_alloc_subchannel_offset;
+static int hf_ulmap_harq_ackch_region_alloc_num_ofdma_symbols;
+static int hf_ulmap_harq_ackch_region_alloc_num_subchannels;
+static int hf_ulmap_aas_sdma_extended_2_uiuc;
+static int hf_ulmap_aas_sdma_length;
+static int hf_ulmap_aas_sdma_rcid_type;
+static int hf_ulmap_aas_sdma_num_burst_region;
+static int hf_ulmap_aas_sdma_slot_offset;
+static int hf_ulmap_aas_sdma_slot_duration;
+static int hf_ulmap_aas_sdma_number_of_users;
+static int hf_ulmap_aas_sdma_encoding_mode;
+static int hf_ulmap_aas_sdma_power_adjust;
+static int hf_ulmap_aas_sdma_pilot_pattern_modifier;
+static int hf_ulmap_aas_sdma_preamble_modifier_index;
+static int hf_ulmap_aas_sdma_pilot_pattern;
+static int hf_ulmap_aas_sdma_diuc;
+static int hf_ulmap_aas_sdma_repetition_coding_indication;
+static int hf_ulmap_aas_sdma_acid;
+static int hf_ulmap_aas_sdma_ai_sn;
+static int hf_ulmap_aas_sdma_nep;
+static int hf_ulmap_aas_sdma_nsch;
+static int hf_ulmap_aas_sdma_spid;
+static int hf_ulmap_aas_sdma_power_adjustment;
+static int hf_ulmap_feedback_polling_extended_2_uiuc;
+static int hf_ulmap_feedback_polling_length;
+static int hf_ulmap_feedback_polling_num_allocation;
+static int hf_ulmap_feedback_polling_dedicated_ul_allocation_included;
+static int hf_ulmap_feedback_polling_basic_cid;
+static int hf_ulmap_feedback_polling_allocation_duration;
+static int hf_ulmap_feedback_polling_type;
+static int hf_ulmap_feedback_polling_frame_offset;
+static int hf_ulmap_feedback_polling_period;
+static int hf_ulmap_feedback_polling_uiuc;
+static int hf_ulmap_feedback_polling_ofdma_symbol_offset;
+static int hf_ulmap_feedback_polling_subchannel_offset;
+static int hf_ulmap_feedback_polling_duration;
+static int hf_ulmap_feedback_polling_repetition_coding_indication;
+static int hf_ulmap_reduced_aas_aas_zone_configuration_included;
+static int hf_ulmap_reduced_aas_aas_zone_position_included;
+static int hf_ulmap_reduced_aas_ul_map_information_included;
+static int hf_ulmap_reduced_aas_phy_modification_included;
+static int hf_ulmap_reduced_aas_power_control_included;
+static int hf_ulmap_reduced_aas_include_feedback_header;
+static int hf_ulmap_reduced_aas_encoding_mode;
+static int hf_ulmap_reduced_aas_permutation;
+static int hf_ulmap_reduced_aas_ul_permbase;
+static int hf_ulmap_reduced_aas_preamble_indication;
+static int hf_ulmap_reduced_aas_padding;
+static int hf_ulmap_reduced_aas_zone_symbol_offset;
+static int hf_ulmap_reduced_aas_zone_length;
+static int hf_ulmap_reduced_aas_ucd_count;
+static int hf_ulmap_reduced_aas_private_map_alloc_start_time;
+static int hf_ulmap_reduced_aas_pilot_pattern_index;
+static int hf_ulmap_reduced_aas_preamble_select;
+static int hf_ulmap_reduced_aas_preamble_shift_index;
+static int hf_ulmap_reduced_aas_pilot_pattern_modifier;
+static int hf_ulmap_reduced_aas_power_control;
+static int hf_ulmap_reduced_aas_ul_frame_offset;
+static int hf_ulmap_reduced_aas_slot_offset;
+static int hf_ulmap_reduced_aas_slot_duration;
+static int hf_ulmap_reduced_aas_uiuc_nep;
+static int hf_ulmap_reduced_aas_acid;
+static int hf_ulmap_reduced_aas_ai_sn;
+static int hf_ulmap_reduced_aas_nsch;
+static int hf_ulmap_reduced_aas_spid;
+static int hf_ulmap_reduced_aas_repetition_coding_indication;
+
+static expert_field ei_ulmap_not_implemented;
/* This gets called each time a capture file is loaded. */
void init_wimax_globals(void)
@@ -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 bd08ebb1..d14f3e19 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 = -1;
+static int proto_m2m;
-static gint ett_m2m = -1;
-static gint ett_m2m_tlv = -1;
-static gint ett_m2m_fch = -1;
-static gint ett_m2m_cdma = -1;
-static gint ett_m2m_ffb = -1;
+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,31 +118,31 @@ static const value_string tlv_crc16_status[] =
{ 0, NULL }
};
-static gint hf_m2m_sequence_number = -1;
-static gint hf_m2m_frame_number = -1;
-static gint hf_m2m_tlv_count = -1;
-
-static gint hf_m2m_type = -1;
-static gint hf_m2m_len = -1;
-static gint hf_m2m_len_size = -1;
-/* static gint hf_m2m_value_bytes = -1; */
-static gint hf_wimax_invalid_tlv = -1;
-static gint hf_m2m_value_protocol_vers_uint8 = -1;
-static gint hf_m2m_value_burst_num_uint8 = -1;
-static gint hf_m2m_value_frag_type_uint8 = -1;
-static gint hf_m2m_value_frag_num_uint8 = -1;
-static gint hf_m2m_value_pdu_burst = -1;
-static gint hf_m2m_value_fast_fb = -1;
-static gint hf_m2m_value_fch_burst_uint24 = -1;
-static gint hf_m2m_value_cdma_code_uint24 = -1;
-static gint hf_m2m_value_crc16_status_uint8 = -1;
-static gint hf_m2m_value_burst_power_uint16 = -1;
-static gint hf_m2m_value_burst_cinr_uint16 = -1;
-static gint hf_m2m_value_preamble_uint16 = -1;
-static gint hf_m2m_value_harq_ack_burst_bytes = -1;
-static gint hf_m2m_phy_attributes = -1;
-
-static expert_field ei_m2m_unexpected_length = EI_INIT;
+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;
/* WiMax MAC to MAC protocol dissector */
@@ -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 5a38b111..b1f12509 100644
--- a/plugins/epan/wimax/packet-wmx.c
+++ b/plugins/epan/wimax/packet-wmx.c
@@ -23,34 +23,38 @@
#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 = -1;
-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;
-static int hf_tlv_type = -1;
-static int hf_tlv_length = -1;
-static int hf_tlv_length_size = -1;
+static int hf_tlv_type;
+static int hf_tlv_length;
+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 (
@@ -291,7 +295,6 @@ void proto_register_wimax(void)
/* Register the ett TLV array to retrieve unique subtree identifiers */
for (i = 0; i < MAX_NUM_TLVS; i++)
{
- ett_tlv[i] = -1;
ett_reg[i] = &ett_tlv[i];
}
@@ -313,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 f844d549..5f1c34ad 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 65b52109..45bae8d9 100644
--- a/plugins/epan/wimax/wimax_cdma_code_decoder.c
+++ b/plugins/epan/wimax/wimax_cdma_code_decoder.c
@@ -19,16 +19,16 @@
#include <epan/packet.h>
#include "wimax-int.h"
-static int proto_wimax_cdma_code_decoder = -1;
-static gint ett_wimax_cdma_code_decoder = -1;
+static int proto_wimax_cdma_code_decoder;
+static int ett_wimax_cdma_code_decoder;
-static int hf_wimax_ranging_code = -1;
-static int hf_wimax_ranging_symbol_offset = -1;
-static int hf_wimax_ranging_subchannel_offset = -1;
+static int hf_wimax_ranging_code;
+static int hf_wimax_ranging_symbol_offset;
+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 c69bd687..615ff085 100644
--- a/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c
+++ b/plugins/epan/wimax/wimax_compact_dlmap_ie_decoder.c
@@ -20,7 +20,7 @@
#include "wimax-int.h"
#include "wimax_compact_dlmap_ie_decoder.h"
-extern gint proto_wimax;
+extern int proto_wimax;
/* MASKs */
#define MSB_NIBBLE_MASK 0xF0
@@ -32,33 +32,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 = -1;
+static int proto_wimax_compact_dlmap_ie_decoder;
#if 0 /* not used ?? */
-static gint ett_wimax_compact_dlmap_ie_decoder = -1;
-static gint ett_wimax_format_configuration_ie_decoder = -1;
-static gint ett_wimax_rcid_ie_decoder = -1;
-static gint ett_wimax_harq_control_ie_decoder = -1;
-static gint ett_wimax_extended_diuc_dependent_ie_decoder = -1;
-static gint ett_wimax_cqich_control_ie_decoder = -1;
-static gint ett_wimax_extension_type_ie_decoder = -1;
+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 +142,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 = -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_dl_map_type_1 = -1;
-static gint hf_cdlmap_ul_map_append_1 = -1;
-static gint hf_cdlmap_reserved_1 = -1;
-static gint hf_cdlmap_nep_code_1 = -1;
-static gint hf_cdlmap_nsch_code_1 = -1;
-static gint hf_cdlmap_num_bands_1 = -1;
-/*static gint hf_cdlmap_band_index_1 = -1;*/
-static gint hf_cdlmap_nb_bitmap_1 = -1;
-
-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_shortened_diuc_1 = -1;
-static gint hf_cdlmap_companded_sc_1 = -1;
-static gint hf_cdlmap_shortened_uiuc_1 = -1;
-
-static gint hf_cdlmap_bin_offset = -1;
-static gint hf_cdlmap_bin_offset_1 = -1;
-
-static gint hf_cdlmap_diuc_num_of_subchannels = -1;
-static gint hf_cdlmap_diuc_num_of_subchannels_1 = -1;
-static gint hf_cdlmap_diuc_repetition_coding_indication = -1;
-static gint hf_cdlmap_diuc_repetition_coding_indication_1 = -1;
-static gint hf_cdlmap_diuc_reserved = -1;
-static gint hf_cdlmap_diuc_reserved_1 = -1;
-
-static gint hf_cdlmap_bit_map_length = -1;
-static gint hf_cdlmap_bit_map_length_1 = -1;
-static gint hf_cdlmap_bit_map = -1;
-
-static gint hf_cdlmap_diuc = -1;
-static gint hf_cdlmap_diuc_1 = -1;
-
-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_allocation_mode_1 = -1;
-static gint hf_cdlmap_allocation_mode_rsvd_1 = -1;
-static gint hf_cdlmap_num_subchannels_1 = -1;
-
-/* static gint hf_cdlmap_reserved_type = -1; */
-static gint hf_cdlmap_reserved_type_1 = -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 = -1;
-static gint hf_format_config_ie_dl_map_type_1 = -1;
-static gint hf_format_config_ie_dl_map_type_32 = -1;
-static gint hf_format_config_ie_new_format_indication = -1;
-static gint hf_format_config_ie_new_format_indication_1 = -1;
-static gint hf_format_config_ie_new_format_indication_32 = -1;
-static gint hf_format_config_ie_cid_type = -1;
-static gint hf_format_config_ie_cid_type_1 = -1;
-static gint hf_format_config_ie_safety_pattern = -1;
-static gint hf_format_config_ie_safety_pattern_1 = -1;
-static gint hf_format_config_ie_subchannel_type = -1;
-static gint hf_format_config_ie_subchannel_type_1 = -1;
-static gint hf_format_config_ie_max_logical_bands = -1;
-static gint hf_format_config_ie_max_logical_bands_1 = -1;
-static gint hf_format_config_ie_num_of_broadcast_symbol = -1;
-static gint hf_format_config_ie_num_of_broadcast_symbol_1 = -1;
-static gint hf_format_config_ie_num_of_dl_band_amc_symbol = -1;
-static gint hf_format_config_ie_num_of_dl_band_amc_symbol_1 = -1;
-static gint hf_format_config_ie_num_of_ul_band_amc_symbol = -1;
-static gint hf_format_config_ie_num_of_ul_band_amc_symbol_1 = -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 +235,18 @@ static gint hf_format_config_ie_num_of_ul_band_amc_symbol_1 = -1;
#define NUM_UL_AMC_SYMBOLS_MASK 0x000003F0
/* display indexies */
-static gint hf_harq_rcid_ie_prefix = -1;
-static gint hf_harq_rcid_ie_prefix_1 = -1;
-static gint hf_harq_rcid_ie_normal_cid = -1;
-static gint hf_harq_rcid_ie_normal_cid_1 = -1;
-static gint hf_harq_rcid_ie_cid3 = -1;
-static gint hf_harq_rcid_ie_cid3_1 = -1;
-static gint hf_harq_rcid_ie_cid7 = -1;
-static gint hf_harq_rcid_ie_cid7_1 = -1;
-static gint hf_harq_rcid_ie_cid11 = -1;
-static gint hf_harq_rcid_ie_cid11_1 = -1;
-static gint hf_harq_rcid_ie_cid11_2 = -1;
-static gint hf_harq_rcid_ie_cid11_3 = -1;
+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 +260,16 @@ static gint hf_harq_rcid_ie_cid11_3 = -1;
#define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
/* HARQ MAP HARQ Control IE display indexies */
-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 gint hf_harq_control_ie_prefix_1 = -1;
-static gint hf_harq_control_ie_ai_sn_1 = -1;
-static gint hf_harq_control_ie_spid_1 = -1;
-static gint hf_harq_control_ie_acid_1 = -1;
-static gint hf_harq_control_ie_reserved_1 = -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 +284,18 @@ static gint hf_harq_control_ie_reserved_1 = -1;
#define WIMAX_HARQ_CONTROL_IE_RESERVED_MASK_1 0x0700
/* HARQ MAP CQICH Control IE display indexies */
-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 gint hf_cqich_control_ie_indicator_1 = -1;
-static gint hf_cqich_control_ie_alloc_id_1 = -1;
-static gint hf_cqich_control_ie_period_1 = -1;
-static gint hf_cqich_control_ie_frame_offset_1 = -1;
-static gint hf_cqich_control_ie_duration_1 = -1;
-static gint hf_cqich_control_ie_cqi_rep_threshold_1 = -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 +319,37 @@ static gint hf_cqich_control_ie_cqi_rep_threshold_1 = -1;
#define EXTENSION_LENGTH_MASK 0x00F0
#define EXTENSION_LENGTH_MASK_1 0x000F
-static gint hf_cdlmap_extension_type = -1;
-static gint hf_cdlmap_extension_subtype = -1;
-static gint hf_cdlmap_extension_length = -1;
-static gint hf_cdlmap_extension_type_1 = -1;
-static gint hf_cdlmap_extension_subtype_1 = -1;
-static gint hf_cdlmap_extension_length_1 = -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 = -1;
-static gint hf_cdlmap_extension_harq_mode = -1;
-static gint hf_cdlmap_extension_unknown_sub_type = -1;
-static gint hf_cdlmap_extension_time_diversity_mbs_1 = -1;
-static gint hf_cdlmap_extension_harq_mode_1 = -1;
-static gint hf_cdlmap_extension_unknown_sub_type_1 = -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 = -1;
-static gint hf_extended_diuc_dependent_ie_diuc_1 = -1;
-static gint hf_extended_diuc_dependent_ie_length = -1;
-static gint hf_extended_diuc_dependent_ie_length_1 = -1;
-static gint hf_extended_diuc_dependent_ie_channel_measurement = -1;
-static gint hf_extended_diuc_dependent_ie_stc_zone = -1;
-static gint hf_extended_diuc_dependent_ie_aas_dl = -1;
-static gint hf_extended_diuc_dependent_ie_data_location = -1;
-static gint hf_extended_diuc_dependent_ie_cid_switch = -1;
-static gint hf_extended_diuc_dependent_ie_mimo_dl_basic = -1;
-static gint hf_extended_diuc_dependent_ie_mimo_dl_enhanced = -1;
-static gint hf_extended_diuc_dependent_ie_harq_map_pointer = -1;
-static gint hf_extended_diuc_dependent_ie_phymod_dl = -1;
-static gint hf_extended_diuc_dependent_ie_dl_pusc_burst_allocation = -1;
-static gint hf_extended_diuc_dependent_ie_ul_interference_and_noise_level = -1;
-static gint hf_extended_diuc_dependent_ie_unknown_diuc = -1;
+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 +363,12 @@ static gint hf_extended_diuc_dependent_ie_unknown_diuc = -1;
#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 +377,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 +560,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 +630,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 +829,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 +842,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 +905,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 +932,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 +963,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 +977,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 +1083,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 +1101,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 +1138,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 +1171,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 +1226,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 +1293,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 +1329,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 +1390,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 +1405,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 +2073,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 f91c8d23..40d22479 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 efa90abd..778748cd 100644
--- a/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c
+++ b/plugins/epan/wimax/wimax_compact_ulmap_ie_decoder.c
@@ -30,30 +30,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 = -1;
+static int proto_wimax_compact_ulmap_ie_decoder;
#if 0 /* not used ?? */
-static gint ett_wimax_compact_ulmap_ie_decoder = -1;
-static gint ett_wimax_rcid_ie_decoder = -1;
-static gint ett_wimax_harq_control_ie_decoder = -1;
-static gint ett_wimax_extended_uiuc_dependent_ie_decoder = -1;
-static gint ett_wimax_extension_type_ie_decoder = -1;
+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 +122,83 @@ static const value_string vals_ctypes[] =
#define ALLOCATION_MODE_MASK_1 0x0C
/* display indexies */
-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_ul_map_type_1 = -1;
-static gint hf_culmap_reserved_1 = -1;
-static gint hf_culmap_nep_code_1 = -1;
-static gint hf_culmap_nsch_code_1 = -1;
-static gint hf_culmap_num_bands_1 = -1;
-/*static gint hf_culmap_band_index_1 = -1;*/
-static gint hf_culmap_nb_bitmap_1 = -1;
-
-static gint hf_culmap_shortened_uiuc = -1;
-static gint hf_culmap_companded_sc = -1;
-static gint hf_culmap_shortened_uiuc_1 = -1;
-static gint hf_culmap_companded_sc_1 = -1;
-
-static gint hf_culmap_bin_offset = -1;
-static gint hf_culmap_bin_offset_1 = -1;
-
-static gint hf_culmap_uiuc_ofdma_symbol_offset = -1;
-static gint hf_culmap_uiuc_ofdma_symbol_offset_1 = -1;
-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_subchannel_offset_7_1 = -1;
-static gint hf_culmap_uiuc_num_of_ofdma_symbols_7_1 = -1;
-static gint hf_culmap_uiuc_num_of_subchannels_7_1 = -1;
-static gint hf_culmap_uiuc_ranging_method_1 = -1;
-static gint hf_culmap_uiuc_reserved_1 = -1;
-static gint hf_culmap_uiuc_repetition_coding_indication = -1;
-static gint hf_culmap_uiuc_repetition_coding_indication_1 = -1;
-/* static gint hf_culmap_uiuc_reserved1 = -1; */
-/* static gint hf_culmap_uiuc_reserved11_1 = -1; */
-static gint hf_culmap_uiuc_subchannel_offset = -1;
-static gint hf_culmap_uiuc_subchannel_offset_1 = -1;
-static gint hf_culmap_uiuc_num_of_ofdma_symbols = -1;
-static gint hf_culmap_uiuc_num_of_ofdma_symbols_1 = -1;
-static gint hf_culmap_uiuc_num_of_subchannels = -1;
-static gint hf_culmap_uiuc_num_of_subchannels_1 = -1;
-
-static gint hf_culmap_harq_region_change_indication = -1;
-static gint hf_culmap_harq_region_change_indication_1 = -1;
-static gint hf_culmap_cqi_region_change_indication = -1;
-static gint hf_culmap_cqi_region_change_indication_1 = -1;
-
-static gint hf_culmap_uiuc = -1;
-static gint hf_culmap_uiuc_1 = -1;
-
-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_allocation_mode_1 = -1;
-static gint hf_culmap_allocation_mode_rsvd_1 = -1;
-static gint hf_culmap_num_subchannels_1 = -1;
-
-/* static gint hf_culmap_reserved_type = -1; */
-static gint hf_culmap_reserved_type_1 = -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 = -1;
-static gint hf_rcid_ie_prefix_1 = -1;
-static gint hf_rcid_ie_normal_cid = -1;
-static gint hf_rcid_ie_normal_cid_1 = -1;
-static gint hf_rcid_ie_cid3 = -1;
-static gint hf_rcid_ie_cid3_1 = -1;
-static gint hf_rcid_ie_cid7 = -1;
-static gint hf_rcid_ie_cid7_1 = -1;
-static gint hf_rcid_ie_cid11 = -1;
-static gint hf_rcid_ie_cid11_1 = -1;
-static gint hf_rcid_ie_cid11_2 = -1;
-static gint hf_rcid_ie_cid11_3 = -1;
+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 +212,16 @@ static gint hf_rcid_ie_cid11_3 = -1;
#define WIMAX_RCID_IE_CID11_MASK_1 0x07FF
/* HARQ MAP HARQ Control IE display indexies */
-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 gint hf_harq_control_ie_prefix_1 = -1;
-static gint hf_harq_control_ie_ai_sn_1 = -1;
-static gint hf_harq_control_ie_spid_1 = -1;
-static gint hf_harq_control_ie_acid_1 = -1;
-static gint hf_harq_control_ie_reserved_1 = -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 +243,19 @@ static gint hf_harq_control_ie_reserved_1 = -1;
#define EXTENSION_LENGTH_MASK 0x00F0
#define EXTENSION_LENGTH_MASK_1 0x000F
-static gint hf_culmap_extension_type = -1;
-static gint hf_culmap_extension_subtype = -1;
-static gint hf_culmap_extension_length = -1;
-static gint hf_culmap_extension_type_1 = -1;
-static gint hf_culmap_extension_subtype_1 = -1;
-static gint hf_culmap_extension_length_1 = -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 = -1; */
-static gint hf_culmap_extension_harq_mode = -1;
-static gint hf_culmap_extension_unknown_sub_type = -1;
-/* static gint hf_culmap_extension_time_diversity_mbs_1 = -1; */
-static gint hf_culmap_extension_harq_mode_1 = -1;
-static gint hf_culmap_extension_unknown_sub_type_1 = -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 +275,22 @@ static gint hf_culmap_extension_unknown_sub_type_1 = -1;
#define CDMA_ALLOCATION_RANGING_SUBCHANNEL_MASK_1 0x00000FE0
#define CDMA_ALLOCATION_BW_REQUEST_MANDATORY_MASK_1 0x00000010
-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 gint hf_cdma_allocation_duration_1 = -1;
-static gint hf_cdma_allocation_uiuc_1 = -1;
-static gint hf_cdma_allocation_repetition_1 = -1;
-static gint hf_cdma_allocation_frame_number_index_1 = -1;
-static gint hf_cdma_allocation_ranging_code_1 = -1;
-static gint hf_cdma_allocation_ranging_symbol_1 = -1;
-static gint hf_cdma_allocation_ranging_subchannel_1 = -1;
-static gint hf_cdma_allocation_bw_req_1 = -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 +312,42 @@ static gint hf_cdma_allocation_bw_req_1 = -1;
#define MINI_SUBCHANNEL_PADDING_MASK 0xF0
#define MINI_SUBCHANNEL_PADDING_MASK_1 0x0000000F
-static gint hf_extended_uiuc_ie_uiuc = -1;
-static gint hf_extended_uiuc_ie_length = -1;
-static gint hf_extended_uiuc_ie_uiuc_1 = -1;
-static gint hf_extended_uiuc_ie_length_1 = -1;
-static gint hf_extended_uiuc_ie_power_control = -1;
-static gint hf_extended_uiuc_ie_power_measurement_frame = -1;
-static gint hf_extended_uiuc_ie_power_control_24 = -1;
-static gint hf_extended_uiuc_ie_power_measurement_frame_24 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_ctype = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_duration = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_ctype_16 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_duration_16 = -1;
-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_padding = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_1 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_1 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_1 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_2 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_2 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_2 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_cid_3 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_uiuc_3 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_repetition_3 = -1;
-static gint hf_extended_uiuc_ie_mini_subchannel_alloc_padding_1 = -1;
-static gint hf_extended_uiuc_ie_aas_ul = -1;
-static gint hf_extended_uiuc_ie_cqich_alloc = -1;
-static gint hf_extended_uiuc_ie_ul_zone = -1;
-static gint hf_extended_uiuc_ie_phymod_ul = -1;
-static gint hf_extended_uiuc_ie_mimo_ul_basic = -1;
-static gint hf_extended_uiuc_ie_fast_tracking = -1;
-static gint hf_extended_uiuc_ie_ul_pusc_burst_allocation = -1;
-static gint hf_extended_uiuc_ie_fast_ranging = -1;
-static gint hf_extended_uiuc_ie_ul_allocation_start = -1;
-static gint hf_extended_uiuc_ie_unknown_uiuc = -1;
+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 +361,14 @@ static gint hf_extended_uiuc_ie_unknown_uiuc = -1;
#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 +377,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 +515,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 +585,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 +723,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 +936,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 +951,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 +969,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 +1006,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 +1039,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 +1102,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 +1134,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 +1178,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 +1238,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 +1249,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 +1258,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 +2090,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 ef0d832f..5511e6a4 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 60f0251b..4e828a49 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 = -1;
-static gint ett_wimax_fch_decoder = -1;
+static int proto_wimax_fch_decoder;
+static int ett_wimax_fch_decoder;
#define FCH_BURST_LENGTH 3
/* FCH Burst bits */
@@ -42,17 +42,17 @@ static gint ett_wimax_fch_decoder = -1;
#define DL_MAP_LENGTH 0x000FF0
#define FCH_RESERVED_2 0x00000F
-static int hf_fch_used_subchannel_group0 = -1;
-static int hf_fch_used_subchannel_group1 = -1;
-static int hf_fch_used_subchannel_group2 = -1;
-static int hf_fch_used_subchannel_group3 = -1;
-static int hf_fch_used_subchannel_group4 = -1;
-static int hf_fch_used_subchannel_group5 = -1;
-static int hf_fch_reserved_1 = -1;
-static int hf_fch_repetition_coding_indication = -1;
-static int hf_fch_coding_indication = -1;
-static int hf_fch_dlmap_length = -1;
-static int hf_fch_reserved_2 = -1;
+static int hf_fch_used_subchannel_group0;
+static int hf_fch_used_subchannel_group1;
+static int hf_fch_used_subchannel_group2;
+static int hf_fch_used_subchannel_group3;
+static int hf_fch_used_subchannel_group4;
+static int hf_fch_used_subchannel_group5;
+static int hf_fch_reserved_1;
+static int hf_fch_repetition_coding_indication;
+static int hf_fch_coding_indication;
+static int hf_fch_dlmap_length;
+static int hf_fch_reserved_2;
static const value_string used_or_not_used[] =
{
@@ -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 8a9ccad3..661bee3d 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 = -1;
-static gint ett_wimax_ffb_decoder = -1;
+static int proto_wimax_ffb_decoder;
+static int ett_wimax_ffb_decoder;
-/* static gint hf_ffb_burst = -1; */
-static gint hf_ffb_num_of_ffbs = -1;
-static gint hf_ffb_type = -1;
-static gint hf_ffb_subchannel = -1;
-static gint hf_ffb_symboloffset = -1;
-static gint hf_ffb_value = -1;
+/* 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 1c44e299..19442d0c 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 = -1;
-static gint ett_wimax_hack_decoder = -1;
+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 = -1; */
-static gint hf_hack_num_of_hacks = -1;
-static gint hf_hack_half_slot_flag = -1;
-static gint hf_hack_subchannel = -1;
-static gint hf_hack_symboloffset = -1;
-static gint hf_hack_value = -1;
+/* 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 ec99de00..02921119 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 = -1;
-static gint ett_wimax_harq_map_decoder = -1;
+static int proto_wimax_harq_map_decoder;
+static int ett_wimax_harq_map_decoder;
/* MASKs */
#define LSB_NIBBLE_MASK 0x0F
@@ -41,15 +41,15 @@ static gint ett_wimax_harq_map_decoder = -1;
#define WIMAX_HARQ_MAP_DL_IE_COUNT_SHIFT 4
/* HARQ MAP display indexies */
-static gint hf_harq_map_indicator = -1;
-static gint hf_harq_ul_map_appended = -1;
-static gint hf_harq_map_reserved = -1;
-static gint hf_harq_map_msg_length = -1;
-static gint hf_harq_dl_ie_count = -1;
-static gint hf_harq_map_msg_crc = -1;
-static gint hf_harq_map_msg_crc_status = -1;
+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 = EI_INIT;
+static expert_field ei_harq_map_msg_crc;
/* Copied and renamed from proto.c because global value_strings don't work for plugins */
@@ -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 a7e7eaf2..0fe05ad6 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 = -1;
-static gint ett_wimax_pdu_decoder = -1;
+static int proto_wimax_pdu_decoder;
+static int ett_wimax_pdu_decoder;
-static int hf_wimax_value_bytes = -1;
+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 25572401..646040d3 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 = -1;
-static gint ett_wimax_phy_attributes_decoder = -1;
+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 = -1;
-static gint hf_phy_attributes_permbase = -1;
-static gint hf_phy_attributes_modulation_rate = -1;
-static gint hf_phy_attributes_encoding_type = -1;
-static gint hf_phy_attributes_num_repeat = -1;
-static gint hf_phy_attributes_symbol_offset = -1;
-static gint hf_phy_attributes_num_of_slots = -1;
-static gint hf_phy_attributes_subchannel = -1;
+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 00000000..e2edad96
--- /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 fe06728b..b447208f 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 0011c563..2242e960 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 226c536a..329a4dce 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 = -1;
-static gint ett_wimax_service_flow_encodings = -1;
-static gint ett_wimax_cst_encoding_rules = -1;
-static gint ett_wimax_error_parameter_set = -1;
-static gint ett_wimax_hmac_tuple = -1;
-static gint ett_wimax_cmac_tuple = -1;
-static gint ett_wimax_short_hmac_tuple = -1;
-static gint ett_security_negotiation_parameters = -1;
-static gint ett_pkm_tlv_encoded_attributes_decoder = -1;
-static gint ett_sa_descriptor_decoder = -1;
-static gint ett_cryptographic_suite_list_decoder = -1;
-static gint ett_security_capabilities_decoder = -1;
-static gint ett_vendor_specific_info_decoder = -1;
-static gint ett_vendor_id_encoding_decoder = -1;
-static gint ett_ul_service_flow_decoder = -1;
-static gint ett_dl_service_flow_decoder = -1;
-
-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 = -1;
-static gint hf_sfe_sf_id = -1;
-static gint hf_sfe_cid = -1;
-static gint hf_sfe_service_class_name = -1;
-static gint hf_sfe_mbs_service = -1;
-static gint hf_sfe_qos_params_set = -1;
-static gint hf_sfe_set_provisioned = -1;
-static gint hf_sfe_set_admitted = -1;
-static gint hf_sfe_set_active = -1;
-static gint hf_sfe_set_rsvd = -1;
-static gint hf_sfe_traffic_priority = -1;
-static gint hf_sfe_max_str = -1;
-static gint hf_sfe_max_traffic_burst = -1;
-static gint hf_sfe_min_rtr = -1;
-static gint hf_sfe_reserved_10 = -1;
-static gint hf_sfe_ul_grant_scheduling = -1;
-static gint hf_sfe_req_tx_policy = -1;
-static gint hf_sfe_policy_broadcast_bwr = -1;
-static gint hf_sfe_policy_multicast_bwr = -1;
-static gint hf_sfe_policy_piggyback = -1;
-static gint hf_sfe_policy_fragment = -1;
-static gint hf_sfe_policy_headers = -1;
-static gint hf_sfe_policy_packing = -1;
-static gint hf_sfe_policy_crc = -1;
-static gint hf_sfe_policy_rsvd1 = -1;
-static gint hf_sfe_jitter = -1;
-static gint hf_sfe_max_latency = -1;
-static gint hf_sfe_fixed_len_sdu = -1;
-static gint hf_sfe_sdu_size = -1;
-static gint hf_sfe_target_said = -1;
-static gint hf_sfe_cs_specification = -1;
-static gint hf_sfe_type_of_data_delivery_services = -1;
-static gint hf_sfe_sdu_inter_arrival_interval = -1;
-static gint hf_sfe_time_base = -1;
-static gint hf_sfe_paging_preference = -1;
-static gint hf_sfe_mbs_zone_identifier_assignment = -1;
-static gint hf_sfe_sn_feedback_enabled = -1;
-static gint hf_sfe_harq_service_flows = -1;
-static gint hf_sfe_harq_channel_mapping_index = -1;
-static gint hf_sfe_fsn_size = -1;
-static gint hf_sfe_unsolicited_grant_interval = -1;
-static gint hf_sfe_unsolicited_polling_interval = -1;
-/* static gint hf_sfe_harq_channel_mapping = -1; */
-static gint hf_sfe_global_service_class_name = -1;
-static gint hf_sfe_reserved_36 = -1;
-static gint hf_sfe_reserved_34 = -1;
-
-static gint hf_sfe_arq_enable = -1;
-static gint hf_sfe_arq_transmitter_delay = -1;
-static gint hf_sfe_arq_receiver_delay = -1;
-static gint hf_sfe_arq_block_lifetime = -1;
-static gint hf_sfe_arq_sync_loss_timeout = -1;
-static gint hf_sfe_arq_transmitter_delay_cor2 = -1;
-static gint hf_sfe_arq_receiver_delay_cor2 = -1;
-static gint hf_sfe_arq_block_lifetime_cor2 = -1;
-static gint hf_sfe_arq_sync_loss_timeout_cor2 = -1;
-static gint hf_sfe_arq_deliver_in_order = -1;
-static gint hf_sfe_arq_rx_purge_timeout = -1;
-static gint hf_sfe_arq_window_size = -1;
-static gint hf_sfe_arq_block_size = -1;
-static gint hf_sfe_arq_block_size_cor2 = -1;
-static gint hf_sfe_arq_min_block_size = -1;
-static gint hf_sfe_arq_max_block_size = -1;
-
-/* static gint hf_sfe_cid_alloc_for_active_bs = -1; */
-static gint hf_sfe_cid_alloc_for_active_bs_cid = -1;
-static gint hf_sfe_pdu_sn_ext_subheader_reorder = -1;
-static gint hf_sfe_mbs_contents_ids = -1;
-static gint hf_sfe_mbs_contents_ids_id = -1;
-static gint hf_sfe_authorization_token = -1;
-
-static gint hf_cst_classifier_dsc_action = -1;
-static gint hf_cst_error_set_errored_param = -1;
-static gint hf_cst_error_set_error_code = -1;
-static gint hf_cst_error_set_error_msg = -1;
-
-static gint hf_cst_pkt_class_rule = -1;
-
-static gint hf_cst_pkt_class_rule_priority = -1;
-static gint hf_cst_pkt_class_rule_range_mask = -1;
-static gint hf_cst_pkt_class_rule_tos_low = -1;
-static gint hf_cst_pkt_class_rule_tos_high = -1;
-static gint hf_cst_pkt_class_rule_tos_mask = -1;
-static gint hf_cst_pkt_class_rule_protocol = -1;
-/*static gint hf_cst_pkt_class_rule_protocol_number = -1;*/
-static gint hf_cst_pkt_class_rule_ip_masked_src_address = -1;
-static gint hf_cst_pkt_class_rule_ip_masked_dest_address = -1;
-static gint hf_cst_pkt_class_rule_src_ipv4 = -1;
-static gint hf_cst_pkt_class_rule_dest_ipv4 = -1;
-static gint hf_cst_pkt_class_rule_mask_ipv4 = -1;
-static gint hf_cst_pkt_class_rule_src_ipv6 = -1;
-static gint hf_cst_pkt_class_rule_dest_ipv6 = -1;
-static gint hf_cst_pkt_class_rule_mask_ipv6 = -1;
-static gint hf_cst_pkt_class_rule_prot_src_port_range = -1;
-static gint hf_cst_pkt_class_rule_src_port_low = -1;
-static gint hf_cst_pkt_class_rule_src_port_high = -1;
-static gint hf_cst_pkt_class_rule_prot_dest_port_range = -1;
-static gint hf_cst_pkt_class_rule_dest_port_low = -1;
-static gint hf_cst_pkt_class_rule_dest_port_high = -1;
-static gint hf_cst_pkt_class_rule_dest_mac_address = -1;
-static gint hf_cst_pkt_class_rule_dest_mac = -1;
-static gint hf_cst_pkt_class_rule_src_mac_address = -1;
-static gint hf_cst_pkt_class_rule_src_mac = -1;
-static gint hf_cst_pkt_class_rule_mask_mac = -1;
-static gint hf_cst_pkt_class_rule_ethertype = -1;
-static gint hf_cst_pkt_class_rule_etype = -1;
-static gint hf_cst_pkt_class_rule_eprot1 = -1;
-static gint hf_cst_pkt_class_rule_eprot2 = -1;
-static gint hf_cst_pkt_class_rule_user_priority = -1;
-static gint hf_cst_pkt_class_rule_pri_low = -1;
-static gint hf_cst_pkt_class_rule_pri_high = -1;
-static gint hf_cst_pkt_class_rule_vlan_id = -1;
-static gint hf_cst_pkt_class_rule_vlan_id1 = -1;
-static gint hf_cst_pkt_class_rule_vlan_id2 = -1;
-static gint hf_cst_pkt_class_rule_phsi = -1;
-static gint hf_cst_pkt_class_rule_index = -1;
-static gint hf_cst_pkt_class_rule_ipv6_flow_label = -1;
-static gint hf_cst_pkt_class_rule_vendor_spec = -1;
-static gint hf_cst_pkt_class_rule_classifier_action_rule = -1;
-static gint hf_cst_pkt_class_rule_classifier_action_rule_bit0 = -1;
-static gint hf_cst_pkt_class_rule_classifier_action_rule_bit1 = -1;
-
-static gint hf_cst_large_context_id = -1;
-static gint hf_cst_short_format_context_id = -1;
-
-static gint hf_cst_phs_dsc_action = -1;
-static gint hf_cst_phs_rule = -1;
-static gint hf_cst_phs_phsi = -1;
-static gint hf_cst_phs_phsf = -1;
-static gint hf_cst_phs_phsm = -1;
-static gint hf_cst_phs_phss = -1;
-static gint hf_cst_phs_phsv = -1;
-static gint hf_cst_phs_vendor_spec = -1;
-static gint hf_cst_invalid_tlv = -1;
-
-static gint hf_csper_atm_switching_encoding = -1;
-static gint hf_csper_atm_classifier = -1;
-static gint hf_csper_atm_classifier_vpi = -1;
-static gint hf_csper_atm_classifier_vci = -1;
-static gint hf_csper_atm_classifier_id = -1;
-/*static gint hf_csper_atm_classifier_dsc_action = -1;*/
-static gint hf_csper_unknown_type = -1;
-
-static gint hf_xmac_tuple_rsvd = -1;
-static gint hf_xmac_tuple_key_seq_num = -1;
-static gint hf_hmac_tuple_hmac_digest = -1;
-static gint hf_packet_number_counter = -1;
-static gint hf_cmac_tuple_cmac_value = -1;
-static gint hf_cmac_tuple_bsid = -1;
+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 = -1;
#define XMAC_TUPLE_KEY_SEQ_NUM 0x0F
/* WiMax Security Negotiation Parameters display */
-static gint hf_snp_pkm_version_support = -1;
-static gint hf_snp_pkm_version_support_bit0 = -1;
-static gint hf_snp_pkm_version_support_bit1 = -1;
-static gint hf_snp_pkm_version_support_reserved = -1;
-static gint hf_snp_auth_policy_support = -1;
-static gint hf_snp_auth_policy_support_bit0 = -1;
-static gint hf_snp_auth_policy_support_bit1 = -1;
-static gint hf_snp_auth_policy_support_bit2 = -1;
-static gint hf_snp_auth_policy_support_bit3 = -1;
-static gint hf_snp_auth_policy_support_bit4 = -1;
-static gint hf_snp_auth_policy_support_bit5 = -1;
-static gint hf_snp_auth_policy_support_bit6 = -1;
-static gint hf_snp_auth_policy_support_bit7 = -1;
-static gint hf_snp_mac_mode = -1;
-static gint hf_snp_mac_mode_bit0 = -1;
-static gint hf_snp_mac_mode_bit1 = -1;
-static gint hf_snp_mac_mode_bit1_rsvd = -1;
-static gint hf_snp_mac_mode_bit2 = -1;
-static gint hf_snp_mac_mode_bit3 = -1;
-static gint hf_snp_mac_mode_bit4 = -1;
-static gint hf_snp_mac_mode_bit5 = -1;
-static gint hf_snp_mac_mode_reserved = -1;
-static gint hf_snp_mac_mode_reserved1 = -1;
-static gint hf_snp_pn_window_size = -1;
-static gint hf_snp_max_conc_transactions = -1;
-static gint hf_snp_max_suppt_sec_assns = -1;
-static gint hf_snp_unknown_type = -1;
+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,65 +633,65 @@ static gint hf_snp_unknown_type = -1;
#define SNP_MAC_MODE_RSV1 0xC0
/* PKM display */
-static gint hf_pkm_msg_unknown_type = -1;
-static gint hf_pkm_msg_attr_display = -1;
-static gint hf_pkm_config_settings_authorize_waitout = -1;
-static gint hf_pkm_config_settings_reauthorize_waitout = -1;
-static gint hf_pkm_config_settings_grace_time = -1;
-static gint hf_pkm_config_settings_operational_waittime = -1;
-static gint hf_pkm_msg_attr_auth_key = -1;
-static gint hf_pkm_msg_attr_tek = -1;
-static gint hf_pkm_msg_attr_key_life_time = -1;
-static gint hf_pkm_msg_attr_key_seq_num = -1;
-static gint hf_pkm_msg_attr_hmac_digest = -1;
-static gint hf_pkm_msg_attr_said = -1;
-static gint hf_pkm_msg_attr_cbc_iv = -1;
-static gint hf_pkm_msg_attr_error_code = -1;
-static gint hf_pkm_msg_attr_ca_certificate = -1;
-static gint hf_pkm_msg_attr_ss_certificate = -1;
-static gint hf_pkm_attr_auth_result_code = -1;
-static gint hf_pkm_attr_sa_service_type = -1;
-static gint hf_pkm_attr_frame_number = -1;
-static gint hf_pkm_attr_ss_random = -1;
-static gint hf_pkm_attr_bs_random = -1;
-static gint hf_pkm_attr_pre_pak = -1;
-static gint hf_pkm_attr_bs_certificate = -1;
-static gint hf_pkm_attr_sig_bs = -1;
-static gint hf_pkm_attr_ms_mac_address = -1;
-static gint hf_pkm_attr_cmac_digest = -1;
-static gint hf_pkm_attr_cmac_digest_pn = -1;
-static gint hf_pkm_attr_cmac_digest_value = -1;
-static gint hf_pkm_attr_eap_payload = -1;
-static gint hf_pkm_attr_nonce = -1;
-static gint hf_pkm_sa_type = -1;
-static gint hf_pkm_msg_crypto_suite = -1;
-static gint hf_pkm_msg_crypto_suite_msb = -1;
-static gint hf_pkm_msg_crypto_suite_middle = -1;
-static gint hf_pkm_msg_crypto_suite_lsb = -1;
-/*static gint hf_pkm_msg_version = -1;*/
-static gint hf_pkm_attr_push_modes = -1;
-static gint hf_pkm_attr_key_push_counter = -1;
-static gint hf_pkm_attr_gkek = -1;
-static gint hf_pkm_attr_sig_ss = -1;
-static gint hf_pkm_attr_akid = -1;
-static gint hf_pkm_config_settings_rekey_wait_timeout = -1;
-static gint hf_pkm_config_settings_tek_grace_time = -1;
-static gint hf_pkm_config_settings_authorize_reject_wait_timeout = -1;
-
-/* static gint hf_pkm_attr_pak_ak_seq_number = -1; */
-static gint hf_pkm_attr_associated_gkek_seq_number = -1;
-/* static gint hf_pkm_attr_gkek_params = -1; */
-
-/* static gint hf_common_tlv_unknown_type = -1; */
-static gint hf_common_tlv_mac_version = -1;
-static gint hf_common_tlv_vendor_id = -1;
-static gint hf_common_tlv_vendor_specific_type = -1;
-static gint hf_common_tlv_vendor_specific_length = -1;
-static gint hf_common_tlv_vendor_specific_length_size = -1;
-static gint hf_common_tlv_vendor_specific_value = -1;
-static gint hf_common_current_transmitted_power = -1;
-
-static expert_field ei_common_tlv_info = EI_INIT;
+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;
/* Register WiMax Utility Routines */
void wimax_proto_register_wimax_utility_decoders(void)
@@ -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,
@@ -1679,7 +1682,7 @@ void wimax_proto_register_wimax_utility_decoders(void)
expert_module_t* expert_wimax_utility;
- if(proto_wimax_utility_decoders == -1)
+ if(proto_wimax_utility_decoders <= 0)
{
proto_wimax_utility_decoders = proto_register_protocol (
"WiMax Sub-TLV Messages",
@@ -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 0a78e223..ef41dd3c 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/packet-wimaxasncp.c b/plugins/epan/wimaxasncp/packet-wimaxasncp.c
index 4de30ff3..e5d6e6bb 100644
--- a/plugins/epan/wimaxasncp/packet-wimaxasncp.c
+++ b/plugins/epan/wimaxasncp/packet-wimaxasncp.c
@@ -37,71 +37,71 @@ void proto_register_wimaxasncp(void);
void proto_reg_handoff_wimaxasncp(void);
/* Initialize the protocol and registered fields */
-static int proto_wimaxasncp = -1;
-static int hf_wimaxasncp_version = -1;
-static int hf_wimaxasncp_flags = -1;
-static int hf_wimaxasncp_function_type = -1;
-static int hf_wimaxasncp_op_id = -1;
-static int hf_wimaxasncp_message_type = -1;
-/* static int hf_wimaxasncp_qos_msg = -1; */
-/* static int hf_wimaxasncp_ho_control_msg = -1; */
-/* static int hf_wimaxasncp_data_path_control_msg = -1; */
-/* static int hf_wimaxasncp_context_delivery_msg = -1; */
-/* static int hf_wimaxasncp_r3_mobility_msg = -1; */
-/* static int hf_wimaxasncp_paging_msg = -1; */
-/* static int hf_wimaxasncp_rrm_msg = -1; */
-/* static int hf_wimaxasncp_authentication_msg = -1; */
-/* static int hf_wimaxasncp_ms_state_msg = -1; */
-/* static int hf_wimaxasncp_reauthentication_msg = -1; */
-/* static int hf_wimaxasncp_session_msg = -1; */
-static int hf_wimaxasncp_length = -1;
-static int hf_wimaxasncp_msid = -1;
-static int hf_wimaxasncp_reserved1 = -1;
-static int hf_wimaxasncp_transaction_id = -1;
-static int hf_wimaxasncp_reserved2 = -1;
-/* static int hf_wimaxasncp_tlv = -1; */
-static int hf_wimaxasncp_tlv_type = -1;
-static int hf_wimaxasncp_tlv_length = -1;
-static int hf_wimaxasncp_tlv_value_bytes = -1;
-static int hf_wimaxasncp_tlv_value_bitflags8 = -1;
-static int hf_wimaxasncp_tlv_value_bitflags16 = -1;
-static int hf_wimaxasncp_tlv_value_bitflags32 = -1;
-/* static int hf_wimaxasncp_tlv_value_protocol = -1; */
-/* static int hf_wimaxasncp_tlv_value_vendor_id = -1; */
+static int proto_wimaxasncp;
+static int hf_wimaxasncp_version;
+static int hf_wimaxasncp_flags;
+static int hf_wimaxasncp_function_type;
+static int hf_wimaxasncp_op_id;
+static int hf_wimaxasncp_message_type;
+/* static int hf_wimaxasncp_qos_msg; */
+/* static int hf_wimaxasncp_ho_control_msg; */
+/* static int hf_wimaxasncp_data_path_control_msg; */
+/* static int hf_wimaxasncp_context_delivery_msg; */
+/* static int hf_wimaxasncp_r3_mobility_msg; */
+/* static int hf_wimaxasncp_paging_msg; */
+/* static int hf_wimaxasncp_rrm_msg; */
+/* static int hf_wimaxasncp_authentication_msg; */
+/* static int hf_wimaxasncp_ms_state_msg; */
+/* static int hf_wimaxasncp_reauthentication_msg; */
+/* static int hf_wimaxasncp_session_msg; */
+static int hf_wimaxasncp_length;
+static int hf_wimaxasncp_msid;
+static int hf_wimaxasncp_reserved1;
+static int hf_wimaxasncp_transaction_id;
+static int hf_wimaxasncp_reserved2;
+/* static int hf_wimaxasncp_tlv; */
+static int hf_wimaxasncp_tlv_type;
+static int hf_wimaxasncp_tlv_length;
+static int hf_wimaxasncp_tlv_value_bytes;
+static int hf_wimaxasncp_tlv_value_bitflags8;
+static int hf_wimaxasncp_tlv_value_bitflags16;
+static int hf_wimaxasncp_tlv_value_bitflags32;
+/* static int hf_wimaxasncp_tlv_value_protocol; */
+/* 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 = -1;
-static gint ett_wimaxasncp_flags = -1;
-static gint ett_wimaxasncp_tlv = -1;
-static gint ett_wimaxasncp_tlv_value_bitflags8 = -1;
-static gint ett_wimaxasncp_tlv_value_bitflags16 = -1;
-static gint ett_wimaxasncp_tlv_value_bitflags32 = -1;
-static gint ett_wimaxasncp_tlv_protocol_list = -1;
-static gint ett_wimaxasncp_tlv_port_range_list = -1;
-static gint ett_wimaxasncp_tlv_ip_address_mask_list = -1;
-static gint ett_wimaxasncp_tlv_ip_address_mask = -1;
-static gint ett_wimaxasncp_tlv_eap = -1;
-static gint ett_wimaxasncp_tlv_vendor_specific_information_field = -1;
-static gint ett_wimaxasncp_port_range = -1;
-
-static expert_field ei_wimaxasncp_tlv_type = EI_INIT;
-static expert_field ei_wimaxasncp_function_type = EI_INIT;
-static expert_field ei_wimaxasncp_op_id = EI_INIT;
-static expert_field ei_wimaxasncp_message_type = EI_INIT;
-static expert_field ei_wimaxasncp_length_bad = EI_INIT;
+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;
+static expert_field ei_wimaxasncp_op_id;
+static expert_field ei_wimaxasncp_message_type;
+static expert_field ei_wimaxasncp_length_bad;
/* Header size, up to, but not including, the TLV fields. */
#define WIMAXASNCP_HEADER_SIZE 20
-/* Offset to end of the length field in the headder. */
+/* Offset to end of the length field in the header. */
#define WIMAXASNCP_HEADER_LENGTH_END 6
#define WIMAXASNCP_BIT32(n) (1U << (31 - (n)))
@@ -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;
@@ -402,7 +402,7 @@ static const ver_value_string wimaxasncp_ms_state_msg_vals[] =
/* ------------------------------------------------------------------------- */
-/* note - function type 10-im_operation, was once used for re-authrntication */
+/* note - function type 10-im_operation, was once used for re-authentication */
static const ver_value_string wimaxasncp_im_operations_msg_vals[] =
{
{0, { 1, "AR_EAP_Start"}},
@@ -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,14 +568,14 @@ 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 != -1)
+ if (tlv_info->hf_ipv4 > 0)
{
hf_value = tlv_info->hf_ipv4;
}
@@ -603,14 +603,14 @@ 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 != -1)
+ if (tlv_info->hf_ipv4 > 0)
{
hf_value = tlv_info->hf_ipv6;
}
@@ -638,15 +638,15 @@ 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 != -1)
+ if (tlv_info->hf_bsid > 0)
{
hf_value = tlv_info->hf_bsid;
}
@@ -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,
@@ -1790,12 +1790,12 @@ static void wimaxasncp_dissect_tlv_value(
/* ========================================================================= */
// NOLINTNEXTLINE(misc-no-recursion)
-static guint dissect_wimaxasncp_tlvs(
+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))
@@ -1804,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
@@ -1829,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,
@@ -1931,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;
/* ------------------------------------------------------------------------
@@ -1980,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)
{
@@ -1995,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
{
@@ -2064,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;
@@ -2095,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;
@@ -2103,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
@@ -2131,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;
}
@@ -2162,7 +2162,7 @@ dissect_wimaxasncp(
offset = 0;
/* Register protocol fields, etc if haven't done yet. */
- if (hf_wimaxasncp_version == -1)
+ if (hf_wimaxasncp_version <= 0)
{
proto_registrar_get_byname("wimaxasncp.version");
}
@@ -2196,7 +2196,7 @@ dissect_wimaxasncp(
* ------------------------------------------------------------------------
*/
- ui8 = tvb_get_guint8(tvb, offset);
+ ui8 = tvb_get_uint8(tvb, offset);
if (tree)
{
@@ -2211,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,
@@ -2239,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 */
@@ -2264,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,
@@ -2299,7 +2299,7 @@ dissect_wimaxasncp(
* ------------------------------------------------------------------------
*/
- ui8 = tvb_get_guint8(tvb, offset);
+ ui8 = tvb_get_uint8(tvb, offset);
/* --------------------------------------------------------------------
@@ -2776,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
@@ -2788,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
}
},
{
@@ -3212,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,
@@ -3278,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));
@@ -3373,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);
@@ -3432,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 6f136522..fffb9965 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 05fa2e51..ca8cf99d 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;
@@ -449,18 +449,6 @@ since_attr since=\042
D(("tlv_start\n"));
yyextra->tlv = wmem_new0(wmem_epan_scope(), wimaxasncp_dict_tlv_t);
- yyextra->tlv->hf_root = -1;
- yyextra->tlv->hf_value = -1;
- yyextra->tlv->hf_ipv4 = -1;
- yyextra->tlv->hf_ipv6 = -1;
- yyextra->tlv->hf_bsid = -1;
- yyextra->tlv->hf_protocol = -1;
- yyextra->tlv->hf_port_low = -1;
- yyextra->tlv->hf_port_high = -1;
- yyextra->tlv->hf_ipv4_mask = -1;
- yyextra->tlv->hf_ipv6_mask = -1;
- yyextra->tlv->hf_vendor_id = -1;
- yyextra->tlv->hf_vendor_rest_of_info = -1;
if (! yyextra->dict->tlvs )
yyextra->last_tlv = yyextra->dict->tlvs = yyextra->tlv;
@@ -521,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);
@@ -531,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)));
}
@@ -567,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)
@@ -588,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;
@@ -603,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;
@@ -619,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 ) {
@@ -635,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",
@@ -661,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;
@@ -837,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/packet-wimaxmacphy.c b/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
index 908d50b4..81f55575 100644
--- a/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
+++ b/plugins/epan/wimaxmacphy/packet-wimaxmacphy.c
@@ -21,274 +21,274 @@
/* Initialize the protocol and registered fields */
static dissector_handle_t wimaxmacphy_handle;
-static int proto_wimaxmacphy = -1;
-static int hf_wimaxmacphy_hdr_phy_entity_id = -1;
-static int hf_wimaxmacphy_hdr_message_segmentation = -1;
-static int hf_wimaxmacphy_hdr_message_type = -1;
-static int hf_wimaxmacphy_unknown = -1;
-static int hf_wimaxmacphy_prim_length_of_txvector = -1;
-static int hf_wimaxmacphy_prim_length_of_rxvector = -1;
-static int hf_wimaxmacphy_prim_status = -1;
-static int hf_wimaxmacphy_prim_txstart_indication_status = -1;
-static int hf_wimaxmacphy_prim_reserved1 = -1;
-static int hf_wimaxmacphy_prim_reserved2 = -1;
-static int hf_wimaxmacphy_prim_reserved3 = -1;
-static int hf_wimaxmacphy_prim_reserved4 = -1;
-static int hf_wimaxmacphy_prim_reserved5 = -1;
-static int hf_wimaxmacphy_prim_next_frame_number = -1;
-static int hf_wimaxmacphy_prim_extended_frame_number = -1;
-static int hf_wimaxmacphy_prim_current_frame_number_lsn = -1;
-static int hf_wimaxmacphy_prim_initial_frame_number = -1;
-static int hf_wimaxmacphy_prim_dl_zone_number = -1;
-static int hf_wimaxmacphy_prim_sub_burst_burst_split_point = -1;
-static int hf_wimaxmacphy_prim_dl_sub_burst_burst_number = -1;
-static int hf_wimaxmacphy_prim_phy_sdu = -1;
-static int hf_wimaxmacphy_prim_phy_request = -1;
-static int hf_wimaxmacphy_prim_requested_aas_calibration_zone_size = -1;
-static int hf_wimaxmacphy_prim_requested_aas_calibration_zone_alloc = -1;
-static int hf_wimaxmacphy_prim_number_of_consecutive_frames_with_aas = -1;
-static int hf_wimaxmacphy_prim_frame_number = -1;
-static int hf_wimaxmacphy_prim_issid = -1;
-static int hf_wimaxmacphy_prim_integrity = -1;
-static int hf_wimaxmacphy_prim_number_of_bytes_received = -1;
-static int hf_wimaxmacphy_prim_rssi_per_subcarrier_level = -1;
-static int hf_wimaxmacphy_prim_cinr = -1;
-static int hf_wimaxmacphy_prim_power_offset = -1;
-static int hf_wimaxmacphy_prim_current_frame_number_msn = -1;
-static int hf_wimaxmacphy_prim_acid_for_harq_data_bursts = -1;
-static int hf_wimaxmacphy_prim_indication_type = -1;
-static int hf_wimaxmacphy_prim_zone_permutation_type = -1;
-static int hf_wimaxmacphy_prim_update_aas_handle_in_mac = -1;
-static int hf_wimaxmacphy_prim_aas_handle = -1;
-static int hf_wimaxmacphy_prim_time_deviation = -1;
-static int hf_wimaxmacphy_prim_frequency_deviation = -1;
-static int hf_wimaxmacphy_prim_phy_aas_report_present = -1;
-static int hf_wimaxmacphy_prim_number_of_affected_ss = -1;
-static int hf_wimaxmacphy_prim_zonexid = -1;
-static int hf_wimaxmacphy_prim_cdma_code = -1;
-static int hf_wimaxmacphy_prim_cdma_symbol = -1;
-static int hf_wimaxmacphy_prim_cdma_subchannel = -1;
-static int hf_wimaxmacphy_prim_harq_ack_issid = -1;
-static int hf_wimaxmacphy_prim_harq_ack_acid = -1;
-static int hf_wimaxmacphy_prim_harq_ack_reserved1 = -1;
-static int hf_wimaxmacphy_prim_harq_ack_ack_valid = -1;
-static int hf_wimaxmacphy_prim_harq_ack_unnamed = -1;
-static int hf_wimaxmacphy_prim_harq_ack_reserved2 = -1;
-static int hf_wimaxmacphy_prim_fast_issid = -1;
-static int hf_wimaxmacphy_prim_fast_cqich_id = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit0 = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit1 = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit2 = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit3 = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit4 = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit5 = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit6 = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit7 = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_valid = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_sub_type = -1;
-static int hf_wimaxmacphy_prim_fast_reserved = -1;
-static int hf_wimaxmacphy_prim_fast_feedback_value = -1;
-static int hf_wimaxmacphy_subframe_subframe_type = -1;
-static int hf_wimaxmacphy_subframe_frame_number = -1;
-static int hf_wimaxmacphy_subframe_downlink_reserved1 = -1;
-static int hf_wimaxmacphy_subframe_phy_sap_version_number = -1;
-static int hf_wimaxmacphy_subframe_downlink_reserved2 = -1;
-static int hf_wimaxmacphy_subframe_allocation_start_time = -1;
-static int hf_wimaxmacphy_number_of_zone_descriptors = -1;
-static int hf_wimaxmacphy_zone_padding = -1;
-static int hf_wimaxmacphy_dl_zone_type = -1;
-static int hf_wimaxmacphy_ul_zone_type = -1;
-static int hf_wimaxmacphy_zone_number = -1;
-static int hf_wimaxmacphy_zone_start_symbol_offset = -1;
-static int hf_wimaxmacphy_zone_end_symbol_offset = -1;
-static int hf_wimaxmacphy_dl_zone_permutation_type = -1;
-static int hf_wimaxmacphy_ul_zone_permutation_type = -1;
-static int hf_wimaxmacphy_dl_zone_use_all_subchannels_indicator = -1;
-static int hf_wimaxmacphy_ul_zone_use_all_subchannels_indicator = -1;
-static int hf_wimaxmacphy_ul_zone_disable_pusc_subchannel_rotation = -1;
-static int hf_wimaxmacphy_zone_dl_perm_base = -1;
-static int hf_wimaxmacphy_zone_ul_perm_base = -1;
-static int hf_wimaxmacphy_zone_prbs_id = -1;
-static int hf_wimaxmacphy_zone_agc_range_extension = -1;
-static int hf_wimaxmacphy_zone_dedicated_pilots = -1;
-static int hf_wimaxmacphy_zone_reserved = -1;
-static int hf_wimaxmacphy_zone_stc_type = -1;
-static int hf_wimaxmacphy_zone_matrix_indicator = -1;
-static int hf_wimaxmacphy_zone_midamble_presence = -1;
-static int hf_wimaxmacphy_zone_midamble_boosting = -1;
-static int hf_wimaxmacphy_zone_preamble_configuration = -1;
-static int hf_wimaxmacphy_zone_sdma_supported_indication = -1;
-static int hf_wimaxmacphy_zone_preamble_type = -1;
-static int hf_wimaxmacphy_dl_zone_aas_reserved = -1;
-static int hf_wimaxmacphy_ul_zone_aas_reserved = -1;
-static int hf_wimaxmacphy_number_of_burst_descriptors = -1;
-static int hf_wimaxmacphy_burst_padding = -1;
-static int hf_wimaxmacphy_dl_burst_type = -1;
-static int hf_wimaxmacphy_ul_burst_type = -1;
-static int hf_wimaxmacphy_burst_type_extension = -1;
-static int hf_wimaxmacphy_burst_number = -1;
-static int hf_wimaxmacphy_burst_modulation_fec_code_type = -1;
-static int hf_wimaxmacphy_burst_data_length = -1;
-static int hf_wimaxmacphy_burst_ofdma_symbol_offset = -1;
-static int hf_wimaxmacphy_burst_subchannel_offset = -1;
-static int hf_wimaxmacphy_burst_boosting = -1;
-static int hf_wimaxmacphy_burst_reserved = -1;
-static int hf_wimaxmacphy_burst_repetition_coding_indication = -1;
-static int hf_wimaxmacphy_burst_issid = -1;
-static int hf_wimaxmacphy_burst_aas_handle = -1;
-static int hf_wimaxmacphy_dl_burst_map_number_of_slots = -1;
-static int hf_wimaxmacphy_dl_burst_map_reserved = -1;
-static int hf_wimaxmacphy_dl_burst_normal_number_of_symbols = -1;
-static int hf_wimaxmacphy_dl_burst_normal_number_of_subchannels = -1;
-static int hf_wimaxmacphy_dl_burst_normal_aas_handle = -1;
-static int hf_wimaxmacphy_ul_burst_normal_number_of_slots = -1;
-static int hf_wimaxmacphy_ul_burst_normal_reserved = -1;
-static int hf_wimaxmacphy_burst_papr_number_of_symbols = -1;
-static int hf_wimaxmacphy_burst_papr_number_of_subchannels = -1;
-static int hf_wimaxmacphy_burst_papr_reserved = -1;
-static int hf_wimaxmacphy_ul_burst_papr_unnamed = -1;
-static int hf_wimaxmacphy_ul_burst_harq_ack_number_of_symbols = -1;
-static int hf_wimaxmacphy_ul_burst_harq_ack_number_of_subchannels = -1;
-static int hf_wimaxmacphy_ul_burst_harq_ack_reserved = -1;
-static int hf_wimaxmacphy_ul_burst_fast_number_of_symbols = -1;
-static int hf_wimaxmacphy_ul_burst_fast_number_of_subchannels = -1;
-static int hf_wimaxmacphy_ul_burst_fast_reserved = -1;
-static int hf_wimaxmacphy_ul_burst_initial_number_of_symbols = -1;
-static int hf_wimaxmacphy_ul_burst_initial_number_of_subchannels = -1;
-static int hf_wimaxmacphy_ul_burst_initial_ranging_method = -1;
-static int hf_wimaxmacphy_ul_burst_initial_reserved1 = -1;
-static int hf_wimaxmacphy_ul_burst_initial_zone_xid = -1;
-static int hf_wimaxmacphy_ul_burst_initial_reserved2 = -1;
-static int hf_wimaxmacphy_ul_burst_periodic_number_of_symbols = -1;
-static int hf_wimaxmacphy_ul_burst_periodic_number_of_subchannels = -1;
-static int hf_wimaxmacphy_ul_burst_periodic_ranging_method = -1;
-static int hf_wimaxmacphy_ul_burst_periodic_reserved1 = -1;
-static int hf_wimaxmacphy_ul_burst_periodic_zone_xid = -1;
-static int hf_wimaxmacphy_ul_burst_periodic_reserved2 = -1;
-static int hf_wimaxmacphy_ul_burst_sounding_number_of_symbols = -1;
-static int hf_wimaxmacphy_ul_burst_sounding_number_of_subchannels = -1;
-static int hf_wimaxmacphy_ul_burst_sounding_type = -1;
-static int hf_wimaxmacphy_ul_burst_sounding_separability_type = -1;
-static int hf_wimaxmacphy_ul_burst_sounding_max_cyclic_shift_indx = -1;
-static int hf_wimaxmacphy_ul_burst_sounding_decimation_value = -1;
-static int hf_wimaxmacphy_ul_burst_sounding_decimation_offset_rand = -1;
-static int hf_wimaxmacphy_ul_burst_sounding_reserved = -1;
-static int hf_wimaxmacphy_ul_burst_noise_number_of_symbols = -1;
-static int hf_wimaxmacphy_ul_burst_noise_number_of_subchannels = -1;
-static int hf_wimaxmacphy_ul_burst_noise_reserved = -1;
-static int hf_wimaxmacphy_burst_opt_aas_preamble_modifier_type = -1;
-static int hf_wimaxmacphy_burst_opt_aas_preamble_shift_index = -1;
-static int hf_wimaxmacphy_burst_opt_aas_reserved = -1;
-static int hf_wimaxmacphy_burst_opt_mimo_matrix_indicator = -1;
-static int hf_wimaxmacphy_burst_opt_mimo_layer_index = -1;
-static int hf_wimaxmacphy_dl_burst_opt_mimo_reserved = -1;
-static int hf_wimaxmacphy_ul_burst_opt_mimo_matrix_indicator = -1;
-static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns = -1;
-static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns_bit0 = -1;
-static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns_bit1 = -1;
-static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns_bit2 = -1;
-static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns_bit3 = -1;
-static int hf_wimaxmacphy_ul_burst_opt_mimo_collaborative = -1;
-static int hf_wimaxmacphy_ul_burst_opt_mimo_antenna_unnamed = -1;
-static int hf_wimaxmacphy_number_of_sub_burst_descriptors = -1;
-static int hf_wimaxmacphy_sub_burst_padding = -1;
-static int hf_wimaxmacphy_dl_sub_burst_type = -1;
-static int hf_wimaxmacphy_ul_sub_burst_type = -1;
-static int hf_wimaxmacphy_sub_burst_number = -1;
-static int hf_wimaxmacphy_sub_burst_symbol_offset = -1;
-static int hf_wimaxmacphy_sub_burst_subchannel_offset = -1;
-static int hf_wimaxmacphy_sub_burst_number_of_slots = -1;
-static int hf_wimaxmacphy_sub_burst_reserved1 = -1;
-static int hf_wimaxmacphy_sub_burst_reserved2 = -1;
-static int hf_wimaxmacphy_sub_burst_modulation_fec_code_type = -1;
-static int hf_wimaxmacphy_sub_burst_issid = -1;
-static int hf_wimaxmacphy_sub_burst_aas_handle = -1;
-static int hf_wimaxmacphy_sub_burst_boosting = -1;
-static int hf_wimaxmacphy_sub_burst_repetition_coding_indication = -1;
-static int hf_wimaxmacphy_sub_burst_data_length = -1;
-static int hf_wimaxmacphy_sub_burst_harq_chase_harq_channel_id = -1;
-static int hf_wimaxmacphy_sub_burst_harq_chase_harq_sequence_number = -1;
-static int hf_wimaxmacphy_sub_burst_harq_chase_flush_unnamed = -1;
-static int hf_wimaxmacphy_sub_burst_harq_chase_reserved = -1;
-static int hf_wimaxmacphy_sub_burst_mimo_chase_harq_channel_id = -1;
-static int hf_wimaxmacphy_sub_burst_mimo_chase_harq_sequence_number = -1;
-static int hf_wimaxmacphy_sub_burst_mimo_chase_flush_unnamed = -1;
-static int hf_wimaxmacphy_sub_burst_mimo_chase_layer_index = -1;
-static int hf_wimaxmacphy_ul_sub_burst_ctype = -1;
-static int hf_wimaxmacphy_ul_sub_burst_mini_subchannel_index = -1;
-static int hf_wimaxmacphy_ul_sub_burst_mini_reserved = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit0 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit1 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit2 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit3 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit4 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit5 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit6 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit7 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_reserved1 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_sub_type = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_cqich_id = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_reserved2 = -1;
-static int hf_wimaxmacphy_ul_sub_burst_feedback_slot_offset = -1;
-static int hf_wimaxmacphy_ul_sub_burst_harq_ack_acid = -1;
-static int hf_wimaxmacphy_ul_sub_burst_harq_ack_reserved = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_symbol_index = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_power_assignment = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_power_boost = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_allocation_mode = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_start_freq_band = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_num_freq_bands = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_band_bit_map = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_cyclic_time_shift = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_decimation_offset = -1;
-static int hf_wimaxmacphy_ul_sub_burst_sounding_reserved = -1;
-static int hf_wimaxmacphy_ul_sub_burst_mimo_chase_matrix = -1;
+static int proto_wimaxmacphy;
+static int hf_wimaxmacphy_hdr_phy_entity_id;
+static int hf_wimaxmacphy_hdr_message_segmentation;
+static int hf_wimaxmacphy_hdr_message_type;
+static int hf_wimaxmacphy_unknown;
+static int hf_wimaxmacphy_prim_length_of_txvector;
+static int hf_wimaxmacphy_prim_length_of_rxvector;
+static int hf_wimaxmacphy_prim_status;
+static int hf_wimaxmacphy_prim_txstart_indication_status;
+static int hf_wimaxmacphy_prim_reserved1;
+static int hf_wimaxmacphy_prim_reserved2;
+static int hf_wimaxmacphy_prim_reserved3;
+static int hf_wimaxmacphy_prim_reserved4;
+static int hf_wimaxmacphy_prim_reserved5;
+static int hf_wimaxmacphy_prim_next_frame_number;
+static int hf_wimaxmacphy_prim_extended_frame_number;
+static int hf_wimaxmacphy_prim_current_frame_number_lsn;
+static int hf_wimaxmacphy_prim_initial_frame_number;
+static int hf_wimaxmacphy_prim_dl_zone_number;
+static int hf_wimaxmacphy_prim_sub_burst_burst_split_point;
+static int hf_wimaxmacphy_prim_dl_sub_burst_burst_number;
+static int hf_wimaxmacphy_prim_phy_sdu;
+static int hf_wimaxmacphy_prim_phy_request;
+static int hf_wimaxmacphy_prim_requested_aas_calibration_zone_size;
+static int hf_wimaxmacphy_prim_requested_aas_calibration_zone_alloc;
+static int hf_wimaxmacphy_prim_number_of_consecutive_frames_with_aas;
+static int hf_wimaxmacphy_prim_frame_number;
+static int hf_wimaxmacphy_prim_issid;
+static int hf_wimaxmacphy_prim_integrity;
+static int hf_wimaxmacphy_prim_number_of_bytes_received;
+static int hf_wimaxmacphy_prim_rssi_per_subcarrier_level;
+static int hf_wimaxmacphy_prim_cinr;
+static int hf_wimaxmacphy_prim_power_offset;
+static int hf_wimaxmacphy_prim_current_frame_number_msn;
+static int hf_wimaxmacphy_prim_acid_for_harq_data_bursts;
+static int hf_wimaxmacphy_prim_indication_type;
+static int hf_wimaxmacphy_prim_zone_permutation_type;
+static int hf_wimaxmacphy_prim_update_aas_handle_in_mac;
+static int hf_wimaxmacphy_prim_aas_handle;
+static int hf_wimaxmacphy_prim_time_deviation;
+static int hf_wimaxmacphy_prim_frequency_deviation;
+static int hf_wimaxmacphy_prim_phy_aas_report_present;
+static int hf_wimaxmacphy_prim_number_of_affected_ss;
+static int hf_wimaxmacphy_prim_zonexid;
+static int hf_wimaxmacphy_prim_cdma_code;
+static int hf_wimaxmacphy_prim_cdma_symbol;
+static int hf_wimaxmacphy_prim_cdma_subchannel;
+static int hf_wimaxmacphy_prim_harq_ack_issid;
+static int hf_wimaxmacphy_prim_harq_ack_acid;
+static int hf_wimaxmacphy_prim_harq_ack_reserved1;
+static int hf_wimaxmacphy_prim_harq_ack_ack_valid;
+static int hf_wimaxmacphy_prim_harq_ack_unnamed;
+static int hf_wimaxmacphy_prim_harq_ack_reserved2;
+static int hf_wimaxmacphy_prim_fast_issid;
+static int hf_wimaxmacphy_prim_fast_cqich_id;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit0;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit1;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit2;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit3;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit4;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit5;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit6;
+static int hf_wimaxmacphy_prim_fast_feedback_type_coding_bit7;
+static int hf_wimaxmacphy_prim_fast_feedback_valid;
+static int hf_wimaxmacphy_prim_fast_feedback_sub_type;
+static int hf_wimaxmacphy_prim_fast_reserved;
+static int hf_wimaxmacphy_prim_fast_feedback_value;
+static int hf_wimaxmacphy_subframe_subframe_type;
+static int hf_wimaxmacphy_subframe_frame_number;
+static int hf_wimaxmacphy_subframe_downlink_reserved1;
+static int hf_wimaxmacphy_subframe_phy_sap_version_number;
+static int hf_wimaxmacphy_subframe_downlink_reserved2;
+static int hf_wimaxmacphy_subframe_allocation_start_time;
+static int hf_wimaxmacphy_number_of_zone_descriptors;
+static int hf_wimaxmacphy_zone_padding;
+static int hf_wimaxmacphy_dl_zone_type;
+static int hf_wimaxmacphy_ul_zone_type;
+static int hf_wimaxmacphy_zone_number;
+static int hf_wimaxmacphy_zone_start_symbol_offset;
+static int hf_wimaxmacphy_zone_end_symbol_offset;
+static int hf_wimaxmacphy_dl_zone_permutation_type;
+static int hf_wimaxmacphy_ul_zone_permutation_type;
+static int hf_wimaxmacphy_dl_zone_use_all_subchannels_indicator;
+static int hf_wimaxmacphy_ul_zone_use_all_subchannels_indicator;
+static int hf_wimaxmacphy_ul_zone_disable_pusc_subchannel_rotation;
+static int hf_wimaxmacphy_zone_dl_perm_base;
+static int hf_wimaxmacphy_zone_ul_perm_base;
+static int hf_wimaxmacphy_zone_prbs_id;
+static int hf_wimaxmacphy_zone_agc_range_extension;
+static int hf_wimaxmacphy_zone_dedicated_pilots;
+static int hf_wimaxmacphy_zone_reserved;
+static int hf_wimaxmacphy_zone_stc_type;
+static int hf_wimaxmacphy_zone_matrix_indicator;
+static int hf_wimaxmacphy_zone_midamble_presence;
+static int hf_wimaxmacphy_zone_midamble_boosting;
+static int hf_wimaxmacphy_zone_preamble_configuration;
+static int hf_wimaxmacphy_zone_sdma_supported_indication;
+static int hf_wimaxmacphy_zone_preamble_type;
+static int hf_wimaxmacphy_dl_zone_aas_reserved;
+static int hf_wimaxmacphy_ul_zone_aas_reserved;
+static int hf_wimaxmacphy_number_of_burst_descriptors;
+static int hf_wimaxmacphy_burst_padding;
+static int hf_wimaxmacphy_dl_burst_type;
+static int hf_wimaxmacphy_ul_burst_type;
+static int hf_wimaxmacphy_burst_type_extension;
+static int hf_wimaxmacphy_burst_number;
+static int hf_wimaxmacphy_burst_modulation_fec_code_type;
+static int hf_wimaxmacphy_burst_data_length;
+static int hf_wimaxmacphy_burst_ofdma_symbol_offset;
+static int hf_wimaxmacphy_burst_subchannel_offset;
+static int hf_wimaxmacphy_burst_boosting;
+static int hf_wimaxmacphy_burst_reserved;
+static int hf_wimaxmacphy_burst_repetition_coding_indication;
+static int hf_wimaxmacphy_burst_issid;
+static int hf_wimaxmacphy_burst_aas_handle;
+static int hf_wimaxmacphy_dl_burst_map_number_of_slots;
+static int hf_wimaxmacphy_dl_burst_map_reserved;
+static int hf_wimaxmacphy_dl_burst_normal_number_of_symbols;
+static int hf_wimaxmacphy_dl_burst_normal_number_of_subchannels;
+static int hf_wimaxmacphy_dl_burst_normal_aas_handle;
+static int hf_wimaxmacphy_ul_burst_normal_number_of_slots;
+static int hf_wimaxmacphy_ul_burst_normal_reserved;
+static int hf_wimaxmacphy_burst_papr_number_of_symbols;
+static int hf_wimaxmacphy_burst_papr_number_of_subchannels;
+static int hf_wimaxmacphy_burst_papr_reserved;
+static int hf_wimaxmacphy_ul_burst_papr_unnamed;
+static int hf_wimaxmacphy_ul_burst_harq_ack_number_of_symbols;
+static int hf_wimaxmacphy_ul_burst_harq_ack_number_of_subchannels;
+static int hf_wimaxmacphy_ul_burst_harq_ack_reserved;
+static int hf_wimaxmacphy_ul_burst_fast_number_of_symbols;
+static int hf_wimaxmacphy_ul_burst_fast_number_of_subchannels;
+static int hf_wimaxmacphy_ul_burst_fast_reserved;
+static int hf_wimaxmacphy_ul_burst_initial_number_of_symbols;
+static int hf_wimaxmacphy_ul_burst_initial_number_of_subchannels;
+static int hf_wimaxmacphy_ul_burst_initial_ranging_method;
+static int hf_wimaxmacphy_ul_burst_initial_reserved1;
+static int hf_wimaxmacphy_ul_burst_initial_zone_xid;
+static int hf_wimaxmacphy_ul_burst_initial_reserved2;
+static int hf_wimaxmacphy_ul_burst_periodic_number_of_symbols;
+static int hf_wimaxmacphy_ul_burst_periodic_number_of_subchannels;
+static int hf_wimaxmacphy_ul_burst_periodic_ranging_method;
+static int hf_wimaxmacphy_ul_burst_periodic_reserved1;
+static int hf_wimaxmacphy_ul_burst_periodic_zone_xid;
+static int hf_wimaxmacphy_ul_burst_periodic_reserved2;
+static int hf_wimaxmacphy_ul_burst_sounding_number_of_symbols;
+static int hf_wimaxmacphy_ul_burst_sounding_number_of_subchannels;
+static int hf_wimaxmacphy_ul_burst_sounding_type;
+static int hf_wimaxmacphy_ul_burst_sounding_separability_type;
+static int hf_wimaxmacphy_ul_burst_sounding_max_cyclic_shift_indx;
+static int hf_wimaxmacphy_ul_burst_sounding_decimation_value;
+static int hf_wimaxmacphy_ul_burst_sounding_decimation_offset_rand;
+static int hf_wimaxmacphy_ul_burst_sounding_reserved;
+static int hf_wimaxmacphy_ul_burst_noise_number_of_symbols;
+static int hf_wimaxmacphy_ul_burst_noise_number_of_subchannels;
+static int hf_wimaxmacphy_ul_burst_noise_reserved;
+static int hf_wimaxmacphy_burst_opt_aas_preamble_modifier_type;
+static int hf_wimaxmacphy_burst_opt_aas_preamble_shift_index;
+static int hf_wimaxmacphy_burst_opt_aas_reserved;
+static int hf_wimaxmacphy_burst_opt_mimo_matrix_indicator;
+static int hf_wimaxmacphy_burst_opt_mimo_layer_index;
+static int hf_wimaxmacphy_dl_burst_opt_mimo_reserved;
+static int hf_wimaxmacphy_ul_burst_opt_mimo_matrix_indicator;
+static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns;
+static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns_bit0;
+static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns_bit1;
+static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns_bit2;
+static int hf_wimaxmacphy_ul_burst_opt_mimo_pilot_patterns_bit3;
+static int hf_wimaxmacphy_ul_burst_opt_mimo_collaborative;
+static int hf_wimaxmacphy_ul_burst_opt_mimo_antenna_unnamed;
+static int hf_wimaxmacphy_number_of_sub_burst_descriptors;
+static int hf_wimaxmacphy_sub_burst_padding;
+static int hf_wimaxmacphy_dl_sub_burst_type;
+static int hf_wimaxmacphy_ul_sub_burst_type;
+static int hf_wimaxmacphy_sub_burst_number;
+static int hf_wimaxmacphy_sub_burst_symbol_offset;
+static int hf_wimaxmacphy_sub_burst_subchannel_offset;
+static int hf_wimaxmacphy_sub_burst_number_of_slots;
+static int hf_wimaxmacphy_sub_burst_reserved1;
+static int hf_wimaxmacphy_sub_burst_reserved2;
+static int hf_wimaxmacphy_sub_burst_modulation_fec_code_type;
+static int hf_wimaxmacphy_sub_burst_issid;
+static int hf_wimaxmacphy_sub_burst_aas_handle;
+static int hf_wimaxmacphy_sub_burst_boosting;
+static int hf_wimaxmacphy_sub_burst_repetition_coding_indication;
+static int hf_wimaxmacphy_sub_burst_data_length;
+static int hf_wimaxmacphy_sub_burst_harq_chase_harq_channel_id;
+static int hf_wimaxmacphy_sub_burst_harq_chase_harq_sequence_number;
+static int hf_wimaxmacphy_sub_burst_harq_chase_flush_unnamed;
+static int hf_wimaxmacphy_sub_burst_harq_chase_reserved;
+static int hf_wimaxmacphy_sub_burst_mimo_chase_harq_channel_id;
+static int hf_wimaxmacphy_sub_burst_mimo_chase_harq_sequence_number;
+static int hf_wimaxmacphy_sub_burst_mimo_chase_flush_unnamed;
+static int hf_wimaxmacphy_sub_burst_mimo_chase_layer_index;
+static int hf_wimaxmacphy_ul_sub_burst_ctype;
+static int hf_wimaxmacphy_ul_sub_burst_mini_subchannel_index;
+static int hf_wimaxmacphy_ul_sub_burst_mini_reserved;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit0;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit1;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit2;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit3;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit4;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit5;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit6;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_type_coding_bit7;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_reserved1;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_sub_type;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_cqich_id;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_reserved2;
+static int hf_wimaxmacphy_ul_sub_burst_feedback_slot_offset;
+static int hf_wimaxmacphy_ul_sub_burst_harq_ack_acid;
+static int hf_wimaxmacphy_ul_sub_burst_harq_ack_reserved;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_symbol_index;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_power_assignment;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_power_boost;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_allocation_mode;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_start_freq_band;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_num_freq_bands;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_band_bit_map;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_cyclic_time_shift;
+static int hf_wimaxmacphy_ul_sub_burst_sounding_decimation_offset;
+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 = -1;
-static gint ett_wimaxmacphy_primitive = -1;
-static gint ett_wimaxmacphy_prim_harq_ack = -1;
-static gint ett_wimaxmacphy_prim_fast_feedback = -1;
-static gint ett_wimaxmacphy_prim_fast_feedback_type_coding = -1;
-static gint ett_wimaxmacphy_dl_zone_descriptor = -1;
-static gint ett_wimaxmacphy_dl_zone_stc = -1;
-static gint ett_wimaxmacphy_dl_zone_aas = -1;
-static gint ett_wimaxmacphy_dl_burst_descriptor = -1;
-static gint ett_wimaxmacphy_dl_burst_map = -1;
-static gint ett_wimaxmacphy_dl_burst_normal = -1;
-static gint ett_wimaxmacphy_dl_burst_papr = -1;
-static gint ett_wimaxmacphy_dl_sub_burst_descriptor = -1;
-static gint ett_wimaxmacphy_dl_sub_burst_harq_chase = -1;
-static gint ett_wimaxmacphy_dl_sub_burst_mimo_chase = -1;
-static gint ett_wimaxmacphy_dl_burst_opt_aas = -1;
-static gint ett_wimaxmacphy_dl_burst_opt_mimo = -1;
-static gint ett_wimaxmacphy_ul_zone_descriptor = -1;
-static gint ett_wimaxmacphy_ul_zone_aas = -1;
-static gint ett_wimaxmacphy_ul_burst_descriptor = -1;
-static gint ett_wimaxmacphy_ul_burst_harq_ack = -1;
-static gint ett_wimaxmacphy_ul_burst_fast_feedback = -1;
-static gint ett_wimaxmacphy_ul_burst_initial_ranging = -1;
-static gint ett_wimaxmacphy_ul_burst_periodic_ranging = -1;
-static gint ett_wimaxmacphy_ul_burst_papr_safety_zone = -1;
-static gint ett_wimaxmacphy_ul_burst_sounding_zone = -1;
-static gint ett_wimaxmacphy_ul_burst_noise_floor = -1;
-static gint ett_wimaxmacphy_ul_burst_normal_data = -1;
-static gint ett_wimaxmacphy_ul_burst_opt_aas = -1;
-static gint ett_wimaxmacphy_ul_burst_opt_mimo = -1;
-static gint ett_wimaxmacphy_ul_sub_burst_descriptor = -1;
-static gint ett_wimaxmacphy_ul_pilot_patterns = -1;
-static gint ett_wimaxmacphy_ul_feedback_type_coding = -1;
-static gint ett_wimaxmacphy_ul_sub_burst_mini_subchannel = -1;
-static gint ett_wimaxmacphy_ul_sub_burst_fast_feedback = -1;
-static gint ett_wimaxmacphy_ul_sub_burst_harq_ack = -1;
-static gint ett_wimaxmacphy_ul_sub_burst_sounding_signal = -1;
-static gint ett_wimaxmacphy_ul_sub_burst_harq_chase = -1;
-static gint ett_wimaxmacphy_ul_sub_burst_mimo_chase = -1;
-static gint ett_wimaxmacphy_ul_sub_burst_sub_allocation_specific = -1;
-
-static expert_field ei_wimaxmacphy_unknown = EI_INIT;
+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;
/* PHY SAP message header size */
#define WIMAXMACPHY_HEADER_SIZE 2
@@ -989,13 +989,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 +1080,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 +1206,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 +1217,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 +1232,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 +1312,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 +1323,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 +1340,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 +1362,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 +1374,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 +1389,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 +1466,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 +1585,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 +1833,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 +1844,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 +1859,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 +1921,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 +1932,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 +1946,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 +1967,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 +1983,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 +1997,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 +2017,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 +2029,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 +2047,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 +2062,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 +2082,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 +2104,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 +2125,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 +2137,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 +2149,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 +2179,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 +2258,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 +2286,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 +2340,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 +2359,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 +5353,7 @@ proto_register_wimaxmacphy(void)
};
/* Protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_wimaxmacphy,
&ett_wimaxmacphy_primitive,
&ett_wimaxmacphy_prim_harq_ack,