aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-selfm.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2023-11-20 08:16:40 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2023-11-20 08:20:54 +0100
commit2a9bc63325c99653c5da873c273430add3b5e9dd (patch)
tree120dee357b44bb38baf6ca9cf592e0cef6e4bea3 /epan/dissectors/packet-selfm.c
parente8e16400d8e3f933bd0eb1f06c661557a28e4ed4 (diff)
Remove init of proto variables
Remove init of proto, header field, expert info and subtree variables. This will reduces the binary size by approximate 1266320 bytes due to using .bss to zero-initialize the fields. The conversion is done using the tools/convert-proto-init.py script.
Diffstat (limited to 'epan/dissectors/packet-selfm.c')
-rw-r--r--epan/dissectors/packet-selfm.c372
1 files changed, 186 insertions, 186 deletions
diff --git a/epan/dissectors/packet-selfm.c b/epan/dissectors/packet-selfm.c
index f1212473a0..5a5d8b2660 100644
--- a/epan/dissectors/packet-selfm.c
+++ b/epan/dissectors/packet-selfm.c
@@ -63,185 +63,185 @@
void proto_register_selfm(void);
/* Initialize the protocol and registered fields */
-static int proto_selfm = -1;
-static int hf_selfm_msgtype = -1;
-static int hf_selfm_padbyte = -1;
-static int hf_selfm_checksum = -1;
-static int hf_selfm_relaydef_len = -1;
-static int hf_selfm_relaydef_numproto = -1;
-static int hf_selfm_relaydef_numfm = -1;
-static int hf_selfm_relaydef_numflags = -1;
-static int hf_selfm_relaydef_fmcfg_cmd = -1;
-static int hf_selfm_relaydef_fmdata_cmd = -1;
-static int hf_selfm_relaydef_statbit = -1;
-static int hf_selfm_relaydef_statbit_cmd = -1;
-static int hf_selfm_relaydef_proto = -1;
-static int hf_selfm_fmconfig_len = -1;
-static int hf_selfm_fmconfig_numflags = -1;
-static int hf_selfm_fmconfig_loc_sf = -1;
-static int hf_selfm_fmconfig_num_sf = -1;
-static int hf_selfm_fmconfig_num_ai = -1;
-static int hf_selfm_fmconfig_num_samp = -1;
-static int hf_selfm_fmconfig_num_dig = -1;
-static int hf_selfm_fmconfig_num_calc = -1;
-static int hf_selfm_fmconfig_ofs_ai = -1;
-static int hf_selfm_fmconfig_ofs_ts = -1;
-static int hf_selfm_fmconfig_ofs_dig = -1;
-static int hf_selfm_fmconfig_ai_type = -1;
-static int hf_selfm_fmconfig_ai_sf_type = -1;
-static int hf_selfm_fmconfig_ai_sf_ofs = -1;
-static int hf_selfm_fmconfig_cblk_rot = -1;
-static int hf_selfm_fmconfig_cblk_vconn = -1;
-static int hf_selfm_fmconfig_cblk_iconn = -1;
-static int hf_selfm_fmconfig_cblk_ctype = -1;
-static int hf_selfm_fmconfig_cblk_deskew_ofs = -1;
-static int hf_selfm_fmconfig_cblk_rs_ofs = -1;
-static int hf_selfm_fmconfig_cblk_xs_ofs = -1;
-static int hf_selfm_fmconfig_cblk_ia_idx = -1;
-static int hf_selfm_fmconfig_cblk_ib_idx = -1;
-static int hf_selfm_fmconfig_cblk_ic_idx = -1;
-static int hf_selfm_fmconfig_cblk_va_idx = -1;
-static int hf_selfm_fmconfig_cblk_vb_idx = -1;
-static int hf_selfm_fmconfig_cblk_vc_idx = -1;
-static int hf_selfm_fmconfig_ai_sf_float = -1;
-static int hf_selfm_fmdata_len = -1;
-static int hf_selfm_fmdata_flagbyte = -1;
-static int hf_selfm_fmdata_dig_b0 = -1;
-static int hf_selfm_fmdata_dig_b1 = -1;
-static int hf_selfm_fmdata_dig_b2 = -1;
-static int hf_selfm_fmdata_dig_b3 = -1;
-static int hf_selfm_fmdata_dig_b4 = -1;
-static int hf_selfm_fmdata_dig_b5 = -1;
-static int hf_selfm_fmdata_dig_b6 = -1;
-static int hf_selfm_fmdata_dig_b7 = -1;
-static int hf_selfm_fmdata_ai_sf_fp = -1;
-static int hf_selfm_foconfig_len = -1;
-static int hf_selfm_foconfig_num_brkr = -1;
-static int hf_selfm_foconfig_num_rb = -1;
-static int hf_selfm_foconfig_prb_supp = -1;
-static int hf_selfm_foconfig_reserved = -1;
-static int hf_selfm_foconfig_brkr_open = -1;
-static int hf_selfm_foconfig_brkr_close = -1;
-static int hf_selfm_foconfig_rb_cmd = -1;
-static int hf_selfm_fastop_len = -1;
-static int hf_selfm_fastop_rb_code = -1;
-static int hf_selfm_fastop_br_code = -1;
-static int hf_selfm_fastop_valid = -1;
-static int hf_selfm_alt_foconfig_len = -1;
-static int hf_selfm_alt_foconfig_num_ports = -1;
-static int hf_selfm_alt_foconfig_num_brkr = -1;
-static int hf_selfm_alt_foconfig_num_rb = -1;
-static int hf_selfm_alt_foconfig_funccode = -1;
-static int hf_selfm_alt_fastop_len = -1;
-static int hf_selfm_alt_fastop_code = -1;
-static int hf_selfm_alt_fastop_valid = -1;
-
-static int hf_selfm_fastmsg_len = -1;
-static int hf_selfm_fastmsg_routing_addr = -1;
-static int hf_selfm_fastmsg_status = -1;
-static int hf_selfm_fastmsg_funccode = -1;
-static int hf_selfm_fastmsg_response_code = -1;
-static int hf_selfm_fastmsg_seq = -1;
-static int hf_selfm_fastmsg_seq_fir = -1;
-static int hf_selfm_fastmsg_seq_fin = -1;
-static int hf_selfm_fastmsg_seq_cnt = -1;
-static int hf_selfm_fastmsg_resp_num = -1;
-static int hf_selfm_fastmsg_crc16 = -1;
-static int hf_selfm_fastmsg_def_route_sup = -1;
-static int hf_selfm_fastmsg_def_rx_stat = -1;
-static int hf_selfm_fastmsg_def_tx_stat = -1;
-static int hf_selfm_fastmsg_def_rx_maxfr = -1;
-static int hf_selfm_fastmsg_def_tx_maxfr = -1;
-static int hf_selfm_fastmsg_def_rx_num_fc = -1;
-static int hf_selfm_fastmsg_def_rx_fc = -1;
-static int hf_selfm_fastmsg_def_tx_num_fc = -1;
-static int hf_selfm_fastmsg_def_tx_fc = -1;
-static int hf_selfm_fastmsg_uns_en_fc = -1;
-static int hf_selfm_fastmsg_uns_en_fc_data = -1;
-static int hf_selfm_fastmsg_uns_dis_fc = -1;
-static int hf_selfm_fastmsg_uns_dis_fc_data = -1;
-static int hf_selfm_fastmsg_baseaddr = -1;
-static int hf_selfm_fastmsg_numwords = -1;
-static int hf_selfm_fastmsg_flags = -1;
-static int hf_selfm_fastmsg_datafmt_resp_numitem = -1;
-static int hf_selfm_fastmsg_dataitem_qty = -1;
-static int hf_selfm_fastmsg_dataitem_type = -1;
-static int hf_selfm_fastmsg_dataitem_uint16 = -1;
-static int hf_selfm_fastmsg_dataitem_int16 = -1;
-static int hf_selfm_fastmsg_dataitem_uint32 = -1;
-static int hf_selfm_fastmsg_dataitem_int32 = -1;
-static int hf_selfm_fastmsg_dataitem_float = -1;
-static int hf_selfm_fastmsg_devdesc_num_region = -1;
-static int hf_selfm_fastmsg_devdesc_num_ctrl = -1;
-static int hf_selfm_fastmsg_unsresp_orig = -1;
-static int hf_selfm_fastmsg_unsresp_doy = -1;
-static int hf_selfm_fastmsg_unsresp_year = -1;
-static int hf_selfm_fastmsg_unsresp_todms = -1;
-static int hf_selfm_fastmsg_unsresp_num_elmt = -1;
-static int hf_selfm_fastmsg_unsresp_elmt_idx = -1;
-static int hf_selfm_fastmsg_unsresp_elmt_ts_ofs = -1;
-static int hf_selfm_fastmsg_unsresp_elmt_status = -1;
-static int hf_selfm_fastmsg_unsresp_eor = -1;
-static int hf_selfm_fastmsg_unsresp_elmt_statword = -1;
-static int hf_selfm_fastmsg_unswrite_addr1 = -1;
-static int hf_selfm_fastmsg_unswrite_addr2 = -1;
-static int hf_selfm_fastmsg_unswrite_num_reg = -1;
-static int hf_selfm_fastmsg_unswrite_reg_val = -1;
-static int hf_selfm_fastmsg_soe_req_orig = -1;
-static int hf_selfm_fastmsg_soe_resp_numblks = -1;
-static int hf_selfm_fastmsg_soe_resp_orig = -1;
-static int hf_selfm_fastmsg_soe_resp_numbits = -1;
-static int hf_selfm_fastmsg_soe_resp_pad = -1;
-static int hf_selfm_fastmsg_soe_resp_doy = -1;
-static int hf_selfm_fastmsg_soe_resp_year = -1;
-static int hf_selfm_fastmsg_soe_resp_tod = -1;
-static int hf_selfm_fastmsg_soe_resp_data = -1;
+static int proto_selfm;
+static int hf_selfm_msgtype;
+static int hf_selfm_padbyte;
+static int hf_selfm_checksum;
+static int hf_selfm_relaydef_len;
+static int hf_selfm_relaydef_numproto;
+static int hf_selfm_relaydef_numfm;
+static int hf_selfm_relaydef_numflags;
+static int hf_selfm_relaydef_fmcfg_cmd;
+static int hf_selfm_relaydef_fmdata_cmd;
+static int hf_selfm_relaydef_statbit;
+static int hf_selfm_relaydef_statbit_cmd;
+static int hf_selfm_relaydef_proto;
+static int hf_selfm_fmconfig_len;
+static int hf_selfm_fmconfig_numflags;
+static int hf_selfm_fmconfig_loc_sf;
+static int hf_selfm_fmconfig_num_sf;
+static int hf_selfm_fmconfig_num_ai;
+static int hf_selfm_fmconfig_num_samp;
+static int hf_selfm_fmconfig_num_dig;
+static int hf_selfm_fmconfig_num_calc;
+static int hf_selfm_fmconfig_ofs_ai;
+static int hf_selfm_fmconfig_ofs_ts;
+static int hf_selfm_fmconfig_ofs_dig;
+static int hf_selfm_fmconfig_ai_type;
+static int hf_selfm_fmconfig_ai_sf_type;
+static int hf_selfm_fmconfig_ai_sf_ofs;
+static int hf_selfm_fmconfig_cblk_rot;
+static int hf_selfm_fmconfig_cblk_vconn;
+static int hf_selfm_fmconfig_cblk_iconn;
+static int hf_selfm_fmconfig_cblk_ctype;
+static int hf_selfm_fmconfig_cblk_deskew_ofs;
+static int hf_selfm_fmconfig_cblk_rs_ofs;
+static int hf_selfm_fmconfig_cblk_xs_ofs;
+static int hf_selfm_fmconfig_cblk_ia_idx;
+static int hf_selfm_fmconfig_cblk_ib_idx;
+static int hf_selfm_fmconfig_cblk_ic_idx;
+static int hf_selfm_fmconfig_cblk_va_idx;
+static int hf_selfm_fmconfig_cblk_vb_idx;
+static int hf_selfm_fmconfig_cblk_vc_idx;
+static int hf_selfm_fmconfig_ai_sf_float;
+static int hf_selfm_fmdata_len;
+static int hf_selfm_fmdata_flagbyte;
+static int hf_selfm_fmdata_dig_b0;
+static int hf_selfm_fmdata_dig_b1;
+static int hf_selfm_fmdata_dig_b2;
+static int hf_selfm_fmdata_dig_b3;
+static int hf_selfm_fmdata_dig_b4;
+static int hf_selfm_fmdata_dig_b5;
+static int hf_selfm_fmdata_dig_b6;
+static int hf_selfm_fmdata_dig_b7;
+static int hf_selfm_fmdata_ai_sf_fp;
+static int hf_selfm_foconfig_len;
+static int hf_selfm_foconfig_num_brkr;
+static int hf_selfm_foconfig_num_rb;
+static int hf_selfm_foconfig_prb_supp;
+static int hf_selfm_foconfig_reserved;
+static int hf_selfm_foconfig_brkr_open;
+static int hf_selfm_foconfig_brkr_close;
+static int hf_selfm_foconfig_rb_cmd;
+static int hf_selfm_fastop_len;
+static int hf_selfm_fastop_rb_code;
+static int hf_selfm_fastop_br_code;
+static int hf_selfm_fastop_valid;
+static int hf_selfm_alt_foconfig_len;
+static int hf_selfm_alt_foconfig_num_ports;
+static int hf_selfm_alt_foconfig_num_brkr;
+static int hf_selfm_alt_foconfig_num_rb;
+static int hf_selfm_alt_foconfig_funccode;
+static int hf_selfm_alt_fastop_len;
+static int hf_selfm_alt_fastop_code;
+static int hf_selfm_alt_fastop_valid;
+
+static int hf_selfm_fastmsg_len;
+static int hf_selfm_fastmsg_routing_addr;
+static int hf_selfm_fastmsg_status;
+static int hf_selfm_fastmsg_funccode;
+static int hf_selfm_fastmsg_response_code;
+static int hf_selfm_fastmsg_seq;
+static int hf_selfm_fastmsg_seq_fir;
+static int hf_selfm_fastmsg_seq_fin;
+static int hf_selfm_fastmsg_seq_cnt;
+static int hf_selfm_fastmsg_resp_num;
+static int hf_selfm_fastmsg_crc16;
+static int hf_selfm_fastmsg_def_route_sup;
+static int hf_selfm_fastmsg_def_rx_stat;
+static int hf_selfm_fastmsg_def_tx_stat;
+static int hf_selfm_fastmsg_def_rx_maxfr;
+static int hf_selfm_fastmsg_def_tx_maxfr;
+static int hf_selfm_fastmsg_def_rx_num_fc;
+static int hf_selfm_fastmsg_def_rx_fc;
+static int hf_selfm_fastmsg_def_tx_num_fc;
+static int hf_selfm_fastmsg_def_tx_fc;
+static int hf_selfm_fastmsg_uns_en_fc;
+static int hf_selfm_fastmsg_uns_en_fc_data;
+static int hf_selfm_fastmsg_uns_dis_fc;
+static int hf_selfm_fastmsg_uns_dis_fc_data;
+static int hf_selfm_fastmsg_baseaddr;
+static int hf_selfm_fastmsg_numwords;
+static int hf_selfm_fastmsg_flags;
+static int hf_selfm_fastmsg_datafmt_resp_numitem;
+static int hf_selfm_fastmsg_dataitem_qty;
+static int hf_selfm_fastmsg_dataitem_type;
+static int hf_selfm_fastmsg_dataitem_uint16;
+static int hf_selfm_fastmsg_dataitem_int16;
+static int hf_selfm_fastmsg_dataitem_uint32;
+static int hf_selfm_fastmsg_dataitem_int32;
+static int hf_selfm_fastmsg_dataitem_float;
+static int hf_selfm_fastmsg_devdesc_num_region;
+static int hf_selfm_fastmsg_devdesc_num_ctrl;
+static int hf_selfm_fastmsg_unsresp_orig;
+static int hf_selfm_fastmsg_unsresp_doy;
+static int hf_selfm_fastmsg_unsresp_year;
+static int hf_selfm_fastmsg_unsresp_todms;
+static int hf_selfm_fastmsg_unsresp_num_elmt;
+static int hf_selfm_fastmsg_unsresp_elmt_idx;
+static int hf_selfm_fastmsg_unsresp_elmt_ts_ofs;
+static int hf_selfm_fastmsg_unsresp_elmt_status;
+static int hf_selfm_fastmsg_unsresp_eor;
+static int hf_selfm_fastmsg_unsresp_elmt_statword;
+static int hf_selfm_fastmsg_unswrite_addr1;
+static int hf_selfm_fastmsg_unswrite_addr2;
+static int hf_selfm_fastmsg_unswrite_num_reg;
+static int hf_selfm_fastmsg_unswrite_reg_val;
+static int hf_selfm_fastmsg_soe_req_orig;
+static int hf_selfm_fastmsg_soe_resp_numblks;
+static int hf_selfm_fastmsg_soe_resp_orig;
+static int hf_selfm_fastmsg_soe_resp_numbits;
+static int hf_selfm_fastmsg_soe_resp_pad;
+static int hf_selfm_fastmsg_soe_resp_doy;
+static int hf_selfm_fastmsg_soe_resp_year;
+static int hf_selfm_fastmsg_soe_resp_tod;
+static int hf_selfm_fastmsg_soe_resp_data;
/* Generated from convert_proto_tree_add_text.pl */
-static int hf_selfm_fmconfig_ai_channel = -1;
-static int hf_selfm_fmdata_ai_value16 = -1;
-static int hf_selfm_fmdata_ai_scale_factor = -1;
-static int hf_selfm_fmdata_ai_value_float = -1;
-static int hf_selfm_fmdata_ai_value_double = -1;
-static int hf_selfm_fmdata_data_type = -1;
-static int hf_selfm_fmdata_quantity = -1;
-static int hf_selfm_fmdata_ai_value_string = -1;
-static int hf_selfm_fastmsg_unsresp_elmt_ts_ofs_decoded = -1;
-static int hf_selfm_fid = -1;
-static int hf_selfm_rid = -1;
-static int hf_selfm_fastmsg_data_region_name = -1;
-static int hf_selfm_fmdata_timestamp = -1;
-static int hf_selfm_fmdata_frame_data_format_reference = -1;
-static int hf_selfm_fastmsg_bit_label_name = -1;
+static int hf_selfm_fmconfig_ai_channel;
+static int hf_selfm_fmdata_ai_value16;
+static int hf_selfm_fmdata_ai_scale_factor;
+static int hf_selfm_fmdata_ai_value_float;
+static int hf_selfm_fmdata_ai_value_double;
+static int hf_selfm_fmdata_data_type;
+static int hf_selfm_fmdata_quantity;
+static int hf_selfm_fmdata_ai_value_string;
+static int hf_selfm_fastmsg_unsresp_elmt_ts_ofs_decoded;
+static int hf_selfm_fid;
+static int hf_selfm_rid;
+static int hf_selfm_fastmsg_data_region_name;
+static int hf_selfm_fmdata_timestamp;
+static int hf_selfm_fmdata_frame_data_format_reference;
+static int hf_selfm_fastmsg_bit_label_name;
/* Initialize the subtree pointers */
-static gint ett_selfm = -1;
-static gint ett_selfm_relaydef = -1;
-static gint ett_selfm_relaydef_fm = -1;
-static gint ett_selfm_relaydef_proto = -1;
-static gint ett_selfm_relaydef_flags = -1;
-static gint ett_selfm_fmconfig = -1;
-static gint ett_selfm_fmconfig_ai = -1;
-static gint ett_selfm_fmconfig_calc = -1;
-static gint ett_selfm_foconfig = -1;
-static gint ett_selfm_foconfig_brkr = -1;
-static gint ett_selfm_foconfig_rb = -1;
-static gint ett_selfm_fastop = -1;
-static gint ett_selfm_fmdata = -1;
-static gint ett_selfm_fmdata_ai = -1;
-static gint ett_selfm_fmdata_dig = -1;
-static gint ett_selfm_fmdata_ai_ch = -1;
-static gint ett_selfm_fmdata_dig_ch = -1;
-static gint ett_selfm_fastmsg = -1;
-static gint ett_selfm_fastmsg_seq = -1;
-static gint ett_selfm_fastmsg_def_fc = -1;
-static gint ett_selfm_fastmsg_datareg = -1;
-static gint ett_selfm_fastmsg_soeblk = -1;
-static gint ett_selfm_fastmsg_tag = -1;
-static gint ett_selfm_fastmsg_element_list = -1;
-static gint ett_selfm_fastmsg_element = -1;
+static gint ett_selfm;
+static gint ett_selfm_relaydef;
+static gint ett_selfm_relaydef_fm;
+static gint ett_selfm_relaydef_proto;
+static gint ett_selfm_relaydef_flags;
+static gint ett_selfm_fmconfig;
+static gint ett_selfm_fmconfig_ai;
+static gint ett_selfm_fmconfig_calc;
+static gint ett_selfm_foconfig;
+static gint ett_selfm_foconfig_brkr;
+static gint ett_selfm_foconfig_rb;
+static gint ett_selfm_fastop;
+static gint ett_selfm_fmdata;
+static gint ett_selfm_fmdata_ai;
+static gint ett_selfm_fmdata_dig;
+static gint ett_selfm_fmdata_ai_ch;
+static gint ett_selfm_fmdata_dig_ch;
+static gint ett_selfm_fastmsg;
+static gint ett_selfm_fastmsg_seq;
+static gint ett_selfm_fastmsg_def_fc;
+static gint ett_selfm_fastmsg_datareg;
+static gint ett_selfm_fastmsg_soeblk;
+static gint ett_selfm_fastmsg_tag;
+static gint ett_selfm_fastmsg_element_list;
+static gint ett_selfm_fastmsg_element;
/* Expert fields */
-static expert_field ei_selfm_crc16_incorrect = EI_INIT;
+static expert_field ei_selfm_crc16_incorrect;
static dissector_handle_t selfm_handle;
@@ -791,18 +791,18 @@ static reassembly_table selfm_reassembly_table;
/* ************************************************************************* */
/* Header values for reassembly */
/* ************************************************************************* */
-static int hf_selfm_fragment = -1;
-static int hf_selfm_fragments = -1;
-static int hf_selfm_fragment_overlap = -1;
-static int hf_selfm_fragment_overlap_conflict = -1;
-static int hf_selfm_fragment_multiple_tails = -1;
-static int hf_selfm_fragment_too_long_fragment = -1;
-static int hf_selfm_fragment_error = -1;
-static int hf_selfm_fragment_count = -1;
-static int hf_selfm_fragment_reassembled_in = -1;
-static int hf_selfm_fragment_reassembled_length = -1;
-static gint ett_selfm_fragment = -1;
-static gint ett_selfm_fragments = -1;
+static int hf_selfm_fragment;
+static int hf_selfm_fragments;
+static int hf_selfm_fragment_overlap;
+static int hf_selfm_fragment_overlap_conflict;
+static int hf_selfm_fragment_multiple_tails;
+static int hf_selfm_fragment_too_long_fragment;
+static int hf_selfm_fragment_error;
+static int hf_selfm_fragment_count;
+static int hf_selfm_fragment_reassembled_in;
+static int hf_selfm_fragment_reassembled_length;
+static gint ett_selfm_fragment;
+static gint ett_selfm_fragments;
static const fragment_items selfm_frag_items = {
&ett_selfm_fragment,