[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] Why use a struct for ip_addr?
From: |
Chris Jones |
Subject: |
RE: [lwip-users] Why use a struct for ip_addr? |
Date: |
Thu, 8 Apr 2004 17:47:22 -0400 |
I just figured it out ... Compatability with IPv6.
-Chris
-----Original Message-----
From: address@hidden
[mailto:address@hidden
Behalf Of Chris Jones
Sent: Thursday, April 08, 2004 4:27 PM
To: address@hidden; address@hidden
Subject: [lwip-users] Why use a struct for ip_addr?
Can anyone give me a reason why a structure with a single 32 bit value is
used to handle IP addresses.
struct ip_addr {
PACK_STRUCT_FIELD(u32_t addr);
} PACK_STRUCT_STRUCT;
In my port to the C55 DSP, I am using macros to access ALL elements of the
IP and TCP headers.
This struct 'ip_addr' is used in the definition of the IP header structuer
and then accessed directly in the code using macros from ip_addr.h.
I have had to change this design in order to use access macors for the
headers.
I see no reason why this ip_addr structure is used in the first place.
-Chris Jones
Engenium Technologies
www.engeniumtech.com
_______________________________________________
lwip-users mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lwip-users