I understand your point, but here are a couple of thoughts:
Displaying misplaced lines as misplaced *is* useful, because SDP is meant to
be very simple to parse and the 'v', 'a', 'i' or whatever lines are supposed
to be sent in a fixed order, not in the order the app chooses to. It would
be better if the SDP parser can flag all those errors, but this is a start.
-----Original Message-----
From: Guy Harris [mailto:gharris@xxxxxxxxx]
Sent: Tuesday, August 13, 2002 4:13 AM
To: Venna, Nagarjuna
Cc: 'ethereal-dev@xxxxxxxxxxxx'
Subject: Re: [Ethereal-dev] SDP Fix
On Mon, Jul 29, 2002 at 02:01:21PM -0400, Venna, Nagarjuna wrote:
> RFC 2327 states that the session attribute info should follow the time
info
> and not vice versa. Ethereal currently displays attribute lines specified
> after time info as misplaced whereas those specified before time info
should
> be displayed as misplaced.
Actually, there's no *need* to display them as misplaced. The only
reason I can see for the "section" variable is to distinguish between
per-session and per-medium versions of 'i', 'c', 'b', 'k', and 'a' -
and, for whatever reason, we only distinguish between them for 'i' and
'a' - so there's no need to have 't' as a section value. (In fact, I'd
just have a Boolean indicating whether we're in the "Media description"
section or not, which starts out as FALSE and gets set to TRUE when an
"m=" is seen.)
The dissector doesn't bother checking whether "p=", for example, is
before the time description, in the time description, after the time
description but before the media description, or in the media
description, so I don't see a need to check for anything other than
whether "a=" and "i=" are before the media description or in the media
description.