buglwIP - A Lightweight TCP/IP stack - Bugs: bug #2015, htons and friends cleanup

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #2015: htons and friends cleanup

Submitted by:  Jani Monoses <jani>
Submitted on:  Wed 18 Dec 2002 03:26:56 PM UTC  
 
Category: NoneSeverity: 1,5
Item Group: Change RequestStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Wed 08 Jan 2003 10:58:17 AM UTC, comment #1:

My understanding is that define's are used wherever the compiler can do the endian-conversion at compile time, i.e. where constants are endianized. For example:
HTONS(PORT_NUMBER)

Functions are used wherever the compiler can do the endian-conversion at run time, i.e. where variables are endianized. For example: htons(seg_num)

A smart compiler would replace htons(PORT_NUMBER) to the endianized PORT_NUMBER as well.

Another instance of helping (inferior) compilers... <sigh>

Leon Woestenberg <likewise>
Project Member
Wed 18 Dec 2002 03:26:56 PM UTC, original submission:

Need to see if we can simplify the hairy defines that htons ntohs and their uppercase versions generate in the headers.
If we know endianness in lwip (which we know) these
can be defined.Anyway at least use just lower or just uppercase versions.

Jani Monoses <jani>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 24 Feb 2003 03:14:22 PM UTCjaniStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)
Thu 30 Jan 2003 03:52:33 PM UTClikewiseItem GroupNone=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1