lwip-members
[Top][All Lists]
Advanced

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

Re: [lwip-members] RFC: ntohs HTONS


From: Florian Schulze
Subject: Re: [lwip-members] RFC: ntohs HTONS
Date: Fri, 21 Feb 2003 12:45:57 +0100
User-agent: Opera7.0/Win32 M2 build 2637

On Fri, 21 Feb 2003 11:37:46 +0200, Jani Monoses <address@hidden> wrote:

I propose sticking to lowercase equivalents of this.
HTONS & co are in BSD variants used to change byte order in one statement
like this

HTONS(hdr->field);
the equivalent of
hdr->field = htons(hdr->field);

So we can have the uppercase variants but then we should use them as such. I don't think the differences are to hint at compilers about the constant nature of the argument

So if nobody objects I'll
1) make all lwip code use lowercase 2) put ntohs functions in inet.c so arch only define them if want to optimize
3) optionally put in uppercase if they match the use case above.

Comments?

Linux headers don't even seem to define upper case variants at all.

Will these not clash with functions defined in the c library? Maybe we should add a lwip_ prefix or something.

Florian







reply via email to

[Prev in Thread] Current Thread [Next in Thread]