First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Dissector bug info: field casn1xxxprotocol is not of type FT_NONE

Hi , My plugin able to dissect packet data and displaying fields as well,while displaying sub tree which is xxx protocol info getting below error messages. I guess,i didn't use propr "proto_add_XXX_format fuction" could any body has idea on below error. "Dissector bug info: [Expert Info (Error/Malformed): e:\wireshark\epan\proto.c:3664: field casn1xxxprotocol is not of type FT_NONE"

Dorababu's avatar
5
Dorababu
asked 2019-12-09 10:22:00 +0000
edit flag offensive 0 remove flag close merge delete

Comments

So what does your code do for that field, please show us the proto_add_xxx function and the hf declaration.

grahamb's avatar grahamb (2019-12-09 13:08:50 +0000) edit

Hi Grahamb,

I refactored old dissector code, in place of proto_tree_add_text(frame_tree, tvb, 0, 0, "NO Length field") i used proto_tree_add_none_format()

/* data structure to dissects all the bits of itsapp protocol */
static hf_register_info hf[] = {

        { &hf_xx_length,
            { "xxx Frame Length","xxx.flength",
                        FT_UINT16, BASE_DEC,
                        NULL, 0x0,
            "", HFILL }
                },
        { &hf_xxx_code,
            { "xxx Frame Code?","itsapp.code",
                        FT_UINT8, BASE_HEX,
                        NULL, 0x0,
            "", HFILL }
                },

    };
static hf_register_info hf[] = {
            { &hf_hdr_src,
                { "source","xxx.source", FT_STRING, BASE_NONE, NULL, 0x0,
                "", HFILL }},

            { &hf_hdr_dst,
                { "destination","xxx.destination", FT_STRING, BASE_NONE, NULL, 0x0,
                "", HFILL }},

            { &hf_hdr_protocol,
                { "protocol","xxx.protocol", FT_UINT16, BASE_DEC, NULL, 0x0,
                "", HFILL }},

            { &hf_hdr_msg_number,
                { "messageNumber","xxx.messageNumber", FT_UINT32, BASE_DEC, NULL, 0x0,
                "", HFILL }},

            { &hf_hdr_seg_number,
                { "segmentNumber","xxx.segmentNumber", FT_UINT16, BASE_DEC, NULL, 0x0,
                "", HFILL }},

            { &hf_hdr_num_segments,
                { "numberOfSegments","xxx.numberOfSegments", FT_UINT16, BASE_DEC, NULL, 0x0,
                "", HFILL }},
            { &hf_hdr_payload,
                { "payload", "xxx.payload", FT_UINT8, BASE_DEC, NULL,0x0,
                NULL, HFILL }},
        };
Dorababu's avatar Dorababu (2019-12-11 07:26:18 +0000) edit

grahamb, i hope you remember about last conversation, I was debugged the dissector loading issue and fixed it.issue due to external dll dependency.

So what does your code do for that field, please show us the proto_add_xxx function and the hf declaration?

It will display sub protocol tree.

I Refactored old dissector code,in that they used proto_tree_add_text() which is obsoleted instead of that i replaced with proto_tree_add_none_format to display sub protocol tree.

Dorababu's avatar Dorababu (2019-12-11 07:41:10 +0000) edit
add a comment see more comments

1 Answer

0

As per README.dissector:

proto_tree_add_none_format is used to add an item of type FT_NONE.

So the hf field use with the call must have the correct type, as per your error message you aren't doing that.

grahamb's avatar
23.8k
grahamb
answered 2019-12-11 10:16:56 +0000
edit flag offensive 0 remove flag delete link

Comments

Thanks grahmb for your support

Dorababu's avatar Dorababu (2019-12-11 13:28:23 +0000) edit

Dissector bug fixed

Dorababu's avatar Dorababu (2019-12-11 13:28:36 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer