Wireshark-dev: Re: [Wireshark-dev] tcp_dissect_pdus Does not work
From: Michael Tüxen <Michael.Tuexen@xxxxxxxxxxxxxxxxx>
Date: Thu, 23 Apr 2009 16:48:46 +0200
Hi,

what is the value of HEADER_LENGTH?

Best regards
Michael

On Apr 23, 2009, at 7:06 AM, mirtaher@xxxxxxxxx wrote:

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



___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe