On Nov 28, 2013, at 1:39 PM, Jakub Zawadzki <[email protected]> wrote:

> On Tue, Nov 19, 2013 at 07:15:54PM +0100, Jakub Zawadzki wrote:
>> htons(), htonl(), htonll() is kinda easier to write and looks prettier for 
>> me than hton16, hton32, hton64().
> 
> It seems that such change would get us to have name conflict with <endian.h> 
> (at least on Linux),

phtoXX() take a pointer and handles unaligned data; renaming them won't cause a 
conflict with the Linux #defines.

htoXX() take an argument and just byte-swaps as necessary; they're currently 
just wrappers for GLib macros:

        /* Turn host-byte-order values into little-endian values. */  
        #define htoles(s) GUINT16_TO_LE(s)
        #define htolel(l) GUINT32_TO_LE(l)

so one option would simply be to get rid of htoles() and htolel() and just use 
the GLib macros directly.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to