Ethereal-dev: Re: [Ethereal-dev] PATCH: Separating the GSM SMS User-Data dissector from SMPP

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 26 Jan 2004 16:09:09 -0800

On Jan 26, 2004, at 3:51 PM, Chris Wilson wrote:

You'd want to be able to pass to the dissector, along with the tvb:

- Whether or not there is a UDH present
- The GSM DCS value (or at least whether the body is 7bit, 8bit or UCS2) - Whether 7bit infomation is packet into bytes (as in the GSM SMS TPDU) or with every 8th bit zero (as in an SMPP PDU).

Any thoughts how this information could be passed?

Define a structure in "packet-gsm_sms-ud.h" that contains all that information, and, in all dissectors that call the GSM SMS UD dissector:

	have a local variable that's a structure of that sort;

before calling the SMS UD dissector, fill in that structure and set "pinfo->private_data" to point to it;

and have the SMS UD dissector treat "pinfo->private_data" as a pointer to such a structure.