/[lwip]/lwip/src/include/ipv4/lwip/ip_addr.h
ViewVC logotype

Diff of /lwip/src/include/ipv4/lwip/ip_addr.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by likewise, Tue Apr 1 15:00:26 2003 UTC revision 1.6.2.1 by likewise, Thu Apr 17 09:56:11 2003 UTC
# Line 34  Line 34 
34    
35  #include "lwip/arch.h"  #include "lwip/arch.h"
36    
37  #define IP_ADDR_ANY (&ip_addr_any)  /** IP_ADDR_ can be used as a fixed IP address
38  #define IP_ADDR_BROADCAST (&ip_addr_broadcast)   *  for the wildcard and the broadcast address
39     */
40    #define IP_ADDR_ANY ((struct ip_addr *)&ip_addr_any)
41    #define IP_ADDR_BROADCAST ((struct ip_addr *)&ip_addr_broadcast)
42    
43  #ifdef PACK_STRUCT_USE_INCLUDES  #ifdef PACK_STRUCT_USE_INCLUDES
44  #  include "arch/bpstruct.h"  #  include "arch/bpstruct.h"
# Line 49  PACK_STRUCT_END Line 52  PACK_STRUCT_END
52  #  include "arch/epstruct.h"  #  include "arch/epstruct.h"
53  #endif  #endif
54    
55  extern struct ip_addr ip_addr_any;  extern const struct ip_addr ip_addr_any;
56  extern struct ip_addr ip_addr_broadcast;  extern const struct ip_addr ip_addr_broadcast;
57    
58  #define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = htonl(((u32_t)(a & 0xff) << 24) | ((u32_t)(b & 0xff) << 16) | \  #define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = htonl(((u32_t)(a & 0xff) << 24) | ((u32_t)(b & 0xff) << 16) | \
59                                                           ((u32_t)(c & 0xff) << 8) | (u32_t)(d & 0xff))                                                           ((u32_t)(c & 0xff) << 8) | (u32_t)(d & 0xff))
60    
61  #define ip_addr_set(dest, src) (dest)->addr = ((struct ip_addr *)src)->addr  #define ip_addr_set(dest, src) (dest)->addr = \
62                                   ((src) == NULL? 0:\
63                                   ((struct ip_addr *)src)->addr)
64  #define ip_addr_maskcmp(addr1, addr2, mask) (((addr1)->addr & \  #define ip_addr_maskcmp(addr1, addr2, mask) (((addr1)->addr & \
65                                                (mask)->addr) == \                                                (mask)->addr) == \
66                                               ((addr2)->addr & \                                               ((addr2)->addr & \

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26