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

Ethereal-dev: [Ethereal-dev] Message direction

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

From: "Michael Lum" <mlum@xxxxxxxxxxxxx>
Date: Thu, 21 Aug 2003 08:44:32 -0700
For some of the protocols that I am writing dissectors for there
is a need to know the direction of the message.

For instance GSM SMS TPDUs (GSM 03.40) require different
dissection depending on whether the message is going towards
the mobile or from the mobile.

Does anybody know of a dissector that requires this that
I can look at, or does anyone have a good solution?

My current solution, which I don't necessarily like,
is the addition of a preference called "Source PC" in
my SCCP dissector.  My work involves Mobile Switching
Centre (MSC) development, so I set the Source PC to be
the point code of the MSC.  Any message with a DPC=Source PC
is an uplink message (towards the MSC) and any with
an OPC=Source PC is downlink (from the MSC).

I can think of 3 ways to pass the 'uplink/downlink' status
to other dissectors further up the stack.

1.  private_data pointer in the pinfo buffer
2.  global variable
3.  use "register_dissector_table()" twice

Does anybody have some experience with this problem?

--
Michael Lum                          Architect
4600 Jacombs Road               (604) 276-0055
Richmond, B.C.
Canada V6V 3B1

Telos Technology
Winner of the 2003 GSM Association Award
for Technology Innovation
Best Infrastructure