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

tcp_dissect_pdus warning message

  • retag add tags

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;
}
Kim's avatar
1
Kim
asked 2019-09-23 17:32:55 +0000
Guy Harris's avatar
19.9k
Guy Harris
updated 2019-09-23 18:50:44 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

"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.

Guy Harris's avatar
19.9k
Guy Harris
answered 2019-09-23 18:56:14 +0000
grahamb's avatar
23.8k
grahamb
updated 2019-10-08 15:03:46 +0000
edit flag offensive 0 remove flag delete link

Comments

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