Ask Your Question
0

tcp_dissect_pdus warning message

asked 2019-09-23 17:32:55 +0000

Kim gravatar image

updated 2019-09-23 18:50:44 +0000

Guy Harris gravatar image

Warning message: passing argument 6 of 'tcp_dissect_pdus' from incompatible pointer type [enabled by default]

static int dissect_foo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *ptr)
{
  length = tvb_captured_length(tvb);
  tcp_dissect_pdus(tvb, pinfo, tree, TRUE, FRAME_HEADER_LEN, get_foo_message_len, dissect_foo_message, ptr); 
  return length;
}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-09-23 18:56:14 +0000

Guy Harris gravatar image

updated 2019-10-08 15:03:46 +0000

grahamb gravatar image

"Argument 6" is the pointer to the "get PDU length" routine.

The "get PDU length" routine MUST be a routine that is passed:

  • a packet_info * passed to the dissector that's calling tcp_dissect_pdu();
  • a tvbuff_t * pointing to the tvbuff containing the TCP data;
  • an int whose value is the offset in that tvbuff at which that PDU begins;
  • a void * that's the dissector data pointer passed to the dissector that's calling tcp_dissect_pdu();

and that returns the total length of the PDU, in bytes.

If that's not what your "get PDU length" routine does, you MUST change it to do so.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2019-09-23 17:32:55 +0000

Seen: 41 times

Last updated: Oct 08