Ethereal-dev: [Ethereal-dev] Pls advise for supporting new Ascend/Lucent format

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

Date Next Thread Next
From: Motonori Shindo <mshindo@xxxxxxxxxxx>
Date: Sat, 01 Dec 2001 21:54:59 +0900 (JST)
Hi,

I'm now working on supporting a new Ascend/Lucent format, which was
introduced in TAOS 9.0 (possibly in 8.0??; I will confirm it later).
I have completed most of the work but I can't come up with a solution
for just one thing. I appreciate if anybody here gives me an advise
how to address the issue described below.

The new format (in wandisplay command's case, for example) looks like

XMIT-44: (task "freedm_task" at 0xe051fd10, time: 6258.66) 29 octets @ 0x606d1f00
  [0000]: ff 03 c0 21 01 01 00 19  01 04 05 f4 11 04 05 f4    ...!.... ........
  [0010]: 13 09 03 00 c0 7b 8d cf  04 17 04 2c 00             .....{.. ...,.

Among several changes from the old format, one most notable (and
annoying) change is that it now has a character display on the right
hand side of hex dump. 

The problem of this character display becomes apparent when it happens
to be a valid hex number. For example, 

XMIT-44: (task "freedm_task" at 0xe051fd10, time: 6261.63) 29 octets @ 0x606d7480
  [0000]: ff 03 c2 23 02 01 00 19  10 35 39 cd b5 84 9d 14    ...#.... .59.....
  [0010]: d5 03 27 da a9 8f af 5b  54 74 6e 74 34             ..'....[ Ttnt4

Since '59' is a valid hex number, current lexer recognizes it as a hex
number and pass it to the parser, ending up with a parse error because
there are 17 hex numbers on single line.

It is easy to handle this if I can ignore the old format, but I want
to support both old and new format.

It may be possible to handle the above case, but for example as an
extreme case like

  [0000]: ff 03 c2 23 02 01 00 19  10 35 39 cd b5 84 9d 14    ...#.... .59.....
  [0010]: 35 39                                               59

there's almost no way to distinguish this from the one in the old
format as follows:

  [0000]: ff 03 c2 23 02 01 00 19  10 35 39 cd b5 84 9d 14
  [0010]: 35 39 59

The only way I can think of is to invent a new lexer/parser, which is
95% similar to current Ascend/Lucent lexer/parser and have it be
called from wiretap, which is ugly...

Any advise will be highly appreciated.

Regards,

=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=
 +----+----+     
 |.. .|    |     Motonori Shindo
 |_~__|    |     
 | .. |~~_~|     Sr. Systems Engineer
 | .  |    |     CoSine Communications Inc.
 +----+----+     
 C o S i n e     e-mail:  mshindo@xxxxxxxxxxxxx 
Communications
=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=