Ethereal-dev: [Ethereal-dev] New dissector for Nortel Networks

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

From: Charles Wilkinson <c_s_wilkinson@xxxxxxxxxxx>
Date: Mon, 29 Aug 2005 10:53:24 +0100 (BST)
Hi list, I'm new to writing dissectors and especially
in  a linux setting. 
I am trying to extend the packet-ip.c source to
dissect an IP header where some of the fields have
been replaced. I need to pick out the protocol ID
section of the 20 octets header but comparisons with
the value 129 or 0x81 seem to be false. Not much doc
out there so I joined the list hoping someone could
help ethereal be able to dissect Optical Ethernet (a
new protocol developed by Nortel on the Metro boxes.)
I can't get this condition  to be true when dissecting
the packets. Here's my test (it doesn't work but I
don't know what the return value is so I can't get the
test to result in the execution of my dissector rather
than the IP one) here's the code that I need to get to
work:

  if (  tvb_get_guint8(tvb, offset + 9) == 0x81)
  {
  	dissectOptical(tvb, pinfo, parent_tree);
...
  }
offset + 9  is the protocol Id of the IP header if it
is equal to 129 in decimal or 81 in hex I want to
dissect it myself. The condition is always false :(

Any help appreciated.
All the best to the list and thx in advance for any
help.
contact: c_s_wilkinson@xxxxxxxxxxx



		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com