ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] tcp_dissect_pdus Does not work

Date: Wed, 22 Apr 2009 22:06:04 -0700 (PDT)
Hi,

I am developing a dissector for MPICH over TCP and trying to use
tcp_dissect_pdus. But unfortunately I am getting a blank screen. My code
looks like this:

void
dissect_mpich_tcp_nonepm (tvbuff_t * tvb, packet_info * pinfo, proto_tree
* tree)
{
  tcp_dissect_pdus (tvb, pinfo, tree, mpich_desegment, HEADER_LENGTH,
get_mpich_pdu_len, dissect_mpich_tcp_nonepm_pdu);
}

guint
get_mpich_pdu_len (tvbuff_t * tvb, int offset)
{

  guint32 messageSize = 0;
  guint32 messagetype = 0;

  messagetype = tvb_get_ntohs(tvb, offset);

  if (messagetype == MPIDI_CH3_PKT_EAGER_SEND)
     messageSize = tvb_get_ntohs(tvb,offset + 12);


  return messageSize;

}


I noticed my code enter get_mpich_pdu_len but never goes beyond 
messagetype = tvb_get_ntohs(tvb, offset); line.

I am not sure what I am doing wrong.

Any help is fully appreciated.


Seyed.
_________________________________________



Seyed M. Mirtaheri
+1 (778) 883 3500
Department of Computer Science
University of British Columbia