So I'm not sure if this is a bug or a feature.  If NOX has a really coherent 
strategy towards byte order, I've never really figured it out. :)  But the 
problem is just that your bytes are getting swapped.  I'd say just call 
ntohs() on event.flow_dl_type.  (Equivalently, call htons() on whatever you're 
comparing it with... this probably makes more sense, but may be slightly less 
convenient.)

-- Murphy

On Monday, May 02, 2011 10:25:22 AM karim torkmen wrote:
> Hi,
> I am using the authenticator module.
> I registered to the flow in event :
> self.register_handler(Flow_in_event.static_get_name(),self.flow_in_call_bac
> k) When I try to get the EtherType of a flow through calling this
> parameter: type = event.flow.dl_type
> I get EtherType equal to "25480" which is "0x6388", however I am
> expecting to get a PPP type "34915 (0x8863)".
> Does any one have an idea about this, could it be a bug ?
> Thanks a lot for the help,
> Karim
> _______________________________________________
> nox-dev mailing list
> [email protected]
> http://noxrepo.org/mailman/listinfo/nox-dev
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to