Ask Your Question
0

Dissector bug info: field casn1xxxprotocol is not of type FT_NONE

asked 2019-12-09 10:22:00 +0000

Dorababu gravatar image

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"

edit retag flag offensive 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 gravatar imagegrahamb ( 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 gravatar imageDorababu ( 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 gravatar imageDorababu ( 2019-12-11 07:41:10 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-11 10:16:56 +0000

grahamb gravatar image

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.

edit flag offensive delete link more

Comments

Thanks grahmb for your support

Dorababu gravatar imageDorababu ( 2019-12-11 13:28:23 +0000 )edit

Dissector bug fixed

Dorababu gravatar imageDorababu ( 2019-12-11 13:28:36 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-12-09 10:22:00 +0000

Seen: 84 times

Last updated: Dec 11 '19