Wireshark-dev: [Wireshark-dev] Dynamically allocated field array
From: "Kukosa, Tomas" <[email protected]>
Date: Wed, 28 Nov 2007 14:31:15 +0100
The packet-tpncp.c has dynamically allocated fields array and register them one by one:
 
    /*
     * The function proto_register_field_array can not work with dynamic arrays,
     * so passing dynamic array elements one-by-one in the loop.
     */
    for(index = 0; index < hf_size; index++) {
        proto_register_field_array(proto_tpncp, &hf[index], 1);
    }
 
Is it really necessary?
Why proto_register_field_array(proto_tpncp, hf, hf_size); can not be used?
I have probably missed something.
 
Tomas