htons, ntohs, htonl, ntohl for W5500

Hi,

I am using some third party libraries that call these functions. I download the driver source code from WIZnet for W5500 and I cannot find these functions. Could anyone point me to where I can find them? Thanks.

In the Linux source tree? These functions are not W5500 specific.

Do you know how to create them? I did some research and looks like they just re-arrange the bytes for little-endian and big-endian data types. How do I determine if I need little-endian or big-endian type? Does it depend on the application that uses Ethernet or on the processor that I use (in my case a microcontroller)?

The compiler and those functions (basing on compiler/platform settings) know how to convert (and if to convert at all). Look into their code.