/[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.29 by likewise, Thu Nov 25 13:33:07 2004 UTC revision 1.30 by christiaans, Fri Nov 25 12:03:39 2005 UTC
# Line 138  u8_t ip_addr_isbroadcast(struct ip_addr Line 138  u8_t ip_addr_isbroadcast(struct ip_addr
138  #define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))  #define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))
139    
140    
141  #define ip_addr_debug_print(debug, ipaddr) LWIP_DEBUGF(debug, ("%u.%u.%u.%u", \  #define ip_addr_debug_print(debug, ipaddr) LWIP_DEBUGF(debug, ("%"U16_F".%"U16_F".%"U16_F".%"U16_F, \
142          ipaddr?(unsigned int)(ntohl((ipaddr)->addr) >> 24) & 0xff:0, \          ipaddr?(u16_t)(ntohl((ipaddr)->addr) >> 24) & 0xff:0, \
143          ipaddr?(unsigned int)(ntohl((ipaddr)->addr) >> 16) & 0xff:0, \          ipaddr?(u16_t)(ntohl((ipaddr)->addr) >> 16) & 0xff:0, \
144          ipaddr?(unsigned int)(ntohl((ipaddr)->addr) >> 8) & 0xff:0, \          ipaddr?(u16_t)(ntohl((ipaddr)->addr) >> 8) & 0xff:0, \
145          ipaddr?(unsigned int)ntohl((ipaddr)->addr) & 0xff:0U))          ipaddr?(u16_t)ntohl((ipaddr)->addr) & 0xff:0U))
146    
147  /* cast to unsigned int, as it is used as argument to printf functions  /* cast to unsigned int, as it is used as argument to printf functions
148   * which expect integer arguments */   * which expect integer arguments. CSi: use cc.h formatters (conversion chars)! */
149  #define ip4_addr1(ipaddr) ((unsigned int)(ntohl((ipaddr)->addr) >> 24) & 0xff)  #define ip4_addr1(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 24) & 0xff)
150  #define ip4_addr2(ipaddr) ((unsigned int)(ntohl((ipaddr)->addr) >> 16) & 0xff)  #define ip4_addr2(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 16) & 0xff)
151  #define ip4_addr3(ipaddr) ((unsigned int)(ntohl((ipaddr)->addr) >> 8) & 0xff)  #define ip4_addr3(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 8) & 0xff)
152  #define ip4_addr4(ipaddr) ((unsigned int)(ntohl((ipaddr)->addr)) & 0xff)  #define ip4_addr4(ipaddr) ((u16_t)(ntohl((ipaddr)->addr)) & 0xff)
153  #endif /* __LWIP_IP_ADDR_H__ */  #endif /* __LWIP_IP_ADDR_H__ */
154    
155    

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

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