Ethereal-dev: Re: [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: Dominique bastien <ip6helper@xxxxxxxxx>
Date: Mon, 29 Aug 2005 07:28:19 -0400 (EDT)
I think the best way is to create your own dissector
like packet-nortel.c you can register the protocol
with the following function call:


void
proto_reg_handoff_nortel(void)
{
  dissector_handle_t nortel_handle;
  ...
  dissector_add("ip.proto", 0x81, nortel_handle);
  ...
}

see example like packet-ipsec.c for new ip protocol
dissector.

Dominique

--- Charles Wilkinson <c_s_wilkinson@xxxxxxxxxxx>
wrote:

> 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
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
>
http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com