lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] Why use a struct for ip_addr?


From: Chris Jones
Subject: [lwip-devel] Why use a struct for ip_addr?
Date: Thu, 8 Apr 2004 17:26:49 -0400

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





reply via email to

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