Ethereal-dev: Re: [Ethereal-dev] packet-giop.c enhancements: ServiceContexts, RTCORBA prioriti

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 17 Feb 2003 17:14:39 -0800
On Sat, Feb 15, 2003 at 09:10:47AM -0500, Craig Rodrigues wrote:
> You *cannot* decrement the length of the sequence once it has
> been advanced past the byte order octet.  The length of the sequence
> is used for determining alignment when decoding the CDR encapsulated
> buffer.

The *length* is used?  Not the *offset* of the first byte after the byte
order octet?

That's *really* odd.  Are you certain that's the case?

> OK, you don't seem to be familiar with Service Context types,
> CDR encapsulation, and alignment rules.  Let me try to explain.
> What is a context_data type?  A sequence of octets, which is
> the sequence length (a long, 4 bytes) followed by the number of octets
> followed by the sequence length.  What is the format
> of the data in this sequence of octets?  For a Vendor Service Context (vcsid)
> of 0 (OMG), and for the Service Context id (scid) falling in the range
> I have in the dissector, the format of these service contexts are
> defined on page 498 of the PDF file.  Most of those are defined as being
> CDR encapsulated.  However, for a vcsid which is not 0, the format
> of context_data is implementation specific.

Where does it say that in the spec?

It says 

	The high-order 24 bits of a service context ID contain a 24-bit
	vendor service context codeset ID (VSCID); the low-order 8 bits
	contain the rest of the service context ID.  A vendor (or group
	of vendors) who wishes to define a specific set of service
	context IDs should obtain a unique VSCID from the OMG, and then
	define a specific set of service context IDs using the VSCID for
	the high-order bits.  The VSCIDs of zero to 15 inclusive
	(0x000000 to 0x00000f) are reserved for use for OMG-defined
	standard service context IDs (i.e., service context IDs in the
	range 0- 4095 are reserved as OMG standard service contexts).

which speaks of VSCIDs in the range 0 through 15, and doesn't seem to
say that the encapsulation rules for the context_data are different for
OMG standard service contexts and vendor-specific service contexts.  Is
that the intended implication?  (If so, it appears that the rules are
that for VSCIDs in the range 0 through 15, it uses the 15.3.3
encapsulation rules, not just for VSCID 0.)