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

Ethereal-dev: Re: [Ethereal-dev] OSI Session dissector in the works

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Sid Sid" <ysidelnikov@xxxxxxxxxxx>
Date: Thu, 04 Sep 2003 08:33:36 +0000
So by "TPKT PDU" do you mean a TPKT PDU that contains an OSI TP (COTP or CLTP) PDU?

Certainly.
If so, is the segmentation being done at the transport or session layer?
Segmentation is on transport level. No segmentation on session level at this moment.
Let's me try to explain problem as I see this.
Please, have a look:
Frame 9 (590 bytes on wire, 590 bytes captured)
TPKT
   Version: 3
   Reserved: 0
   Length: 2052
ISO 8073 COTP Connection-Oriented Transport Protocol
   Length indicator: 2
   TPDU code: 0xf (DT)
   TPDU number: 0x00 (fragment)
   Src port 102.Dst port 3568.
   Pdu type  2.
   Segmentation has been found
[Short Frame: COTP]

Frame 10 (1126 bytes on wire, 1126 bytes captured)
TPKT
   Version: 3
   Reserved: 0
   Length: 2052
ISO 8073 COTP Connection-Oriented Transport Protocol
   Length indicator: 2
   TPDU code: 0xf (DT)
   TPDU number: 0x00 (fragment)
   Pdu type  2.
   Segmentation has been found
[Short Frame: COTP]

Frame 11 (1126 bytes on wire, 1126 bytes captured)
TPKT
   Version: 3
   Reserved: 0
   Length: 2052
ISO 8073 COTP Connection-Oriented Transport Protocol
   Length indicator: 2
   TPDU code: 0xf (DT)
   TPDU number: 0x00 (fragment)
   Pdu type  2.
   Segmentation has been found
[Short Frame: COTP]

Frame 12 (1246 bytes on wire, 1246 bytes captured)
TPKT
   Version: 3
   Reserved: 0
   Length: 1166
ISO 8073 COTP Connection-Oriented Transport Protocol
   Length indicator: 2
   TPDU code: 0xf (DT)
   TPDU number: 0x00 (complete)
   Pdu type  2.
   No segmentation has been found
   Call dissector
ISO 8327-1 OSI Session Protocol
  ... skipped ...
TPKT
   Version: 3
   Reserved: 0
   Length: 2052
ISO 8073 COTP Connection-Oriented Transport Protocol
   Length indicator: 2
   TPDU code: 0xf (DT)
   TPDU number: 0x00 (fragment)
   Pdu type  2.
   Segmentation has been found
[Short Frame: COTP]

Frame 13 (1126 bytes on wire, 1126 bytes captured)
TPKT
   Version: 3
   Reserved: 0
   Length: 2052
ISO 8073 COTP Connection-Oriented Transport Protocol
   Length indicator: 2
   TPDU code: 0xf (DT)
   TPDU number: 0x00 (fragment)
   Pdu type  2.
   Segmentation has been found
[Short Frame: COTP]

Frame 14 (83 bytes on wire, 83 bytes captured)
TPKT
   Version: 3
   Reserved: 0
   Length: 29
ISO 8073 COTP Connection-Oriented Transport Protocol
   Length indicator: 2
   TPDU code: 0xf (DT)
   TPDU number: 0x00 (complete)
   Pdu type  2.
   No segmentation has been found
   Call dissector
ISO 8327-1 OSI Session Protocol
   Data transfer PDU:0x01
   User data len: 0x0


Frame 9 has first COTP segmented Pdu inside which included first part of (let's say, first ) session PDU. Frames 10-11 each have only one COTP segmented Pdu inside which continues our first session PDU. Frame 12 - most interesting one.Consist of two COTPs. First COTP - it is last COTP of our first session PDU. Second COTP - it is first segmented PDU which will be related to next session PDU.



If it's being done at the transport layer, note that reassembly of segmented transport PDUs is done by the COTP dissector, so your session dissector shouldn't have any reason to worry about segmented PDUs.
As I can see from dissector codes high level dissector has to know how much bytes do it want to and then ask low level dissector.AFAIK it is not always possible.
SPDU structure:
|SI|LI|Parameter field|User information field|
SI = type of SPDU
LI = length.The value of the LI field does not include either itself or ANY SUBSEQUENT USER INFORMATION.
So Session dissector don't know total length.

If there's segmentation being done at the session layer, then you'd have to do reassembly in your dissector.

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail