Wireshark mailing list archives
Re: Merging wiretap pint macro to wsutil/pint.h
From: Guy Harris <guy () alum mit edu>
Date: Thu, 28 Nov 2013 13:40:31 -0800
On Nov 28, 2013, at 1:39 PM, Jakub Zawadzki <darkjames-ws () darkjames pl> 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 <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Merging wiretap pint macro to wsutil/pint.h Jakub Zawadzki (Nov 17)
- Re: Merging wiretap pint macro to wsutil/pint.h Michal Labedzki (Nov 17)
- Re: Merging wiretap pint macro to wsutil/pint.h Guy Harris (Nov 18)
- Re: Merging wiretap pint macro to wsutil/pint.h Jakub Zawadzki (Nov 19)
- Re: Merging wiretap pint macro to wsutil/pint.h Jakub Zawadzki (Nov 28)
- Re: Merging wiretap pint macro to wsutil/pint.h Guy Harris (Nov 28)
- Re: Merging wiretap pint macro to wsutil/pint.h Jakub Zawadzki (Nov 28)
- Re: Merging wiretap pint macro to wsutil/pint.h Guy Harris (Nov 28)
- Re: Merging wiretap pint macro to wsutil/pint.h Guy Harris (Nov 18)
- Re: Merging wiretap pint macro to wsutil/pint.h Michal Labedzki (Nov 17)