[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: endianness guide



On Thu, 10 Feb 2005, Guglielmo Dapavo wrote:

Is there any gide howto / utility that can help me to convert a module from little-endian to big-endian?

Thanks
--
Guglielmo

I don't know if by module you mean kernel module, but you should look at the ntoh[l|s] && hton[l|s] macros. That should help... (the "host" is supposed to be big endian, so if you work on a big endian machine, ntohX does nothing).
regards,

--
Rolando Abarca M. [rabarca.arroba@dcc.punto.uchile.punto.cl]
 "Tam pro papa quam pro rege bibunt omnes sine lege."



Reply to: