[ofw] [PATCH] ND Provider: fix service ID byte ordering

Hefty, Sean sean.hefty at intel.com
Fri Feb 11 17:17:00 PST 2011


> I had intended to define the structure in network order (hence why the
> 'zero' field comes first.)  Maybe I botched it...

No, I think the layout you gave was okay, and I was confused.

> > your original patch is probably fine until then
> 
> Want me to wrap the #defines with CL_NTOH64, or not bother?

If the compiler isn't smart enough to not swap, I'd say just keep it as you defined them, with the comment.  Basically, either just use your patch as is (which seems optimal), or write the code without any big/little endian assumptions.



More information about the ofw mailing list