[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-members] RFC: ntohs HTONS
From: |
Jani Monoses |
Subject: |
[lwip-members] RFC: ntohs HTONS |
Date: |
Fri, 21 Feb 2003 11:37:46 +0200 |
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.
- [lwip-members] RFC: ntohs HTONS,
Jani Monoses <=