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

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

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

revision 1.5 by likewise, Wed Jan 8 10:09:42 2003 UTC revision 1.6 by jani, Fri Feb 21 16:43:46 2003 UTC
# Line 101  PACK_STRUCT_END Line 101  PACK_STRUCT_END
101  #  include "arch/epstruct.h"  #  include "arch/epstruct.h"
102  #endif  #endif
103    
104  #define ICMPH_TYPE(hdr) (NTOHS((hdr)->_type_code) >> 8)  #define ICMPH_TYPE(hdr) (ntohs((hdr)->_type_code) >> 8)
105  #define ICMPH_CODE(hdr) (NTOHS((hdr)->_type_code) & 0xff)  #define ICMPH_CODE(hdr) (ntohs((hdr)->_type_code) & 0xff)
106    
107  #define ICMPH_TYPE_SET(hdr, type) ((hdr)->_type_code = HTONS(ICMPH_CODE(hdr) | ((type) << 8)))  #define ICMPH_TYPE_SET(hdr, type) ((hdr)->_type_code = htons(ICMPH_CODE(hdr) | ((type) << 8)))
108  #define ICMPH_CODE_SET(hdr, code) ((hdr)->_type_code = HTONS((code) | (ICMPH_TYPE(hdr) << 8)))  #define ICMPH_CODE_SET(hdr, code) ((hdr)->_type_code = htons((code) | (ICMPH_TYPE(hdr) << 8)))
109    
110  #endif /* __LWIP_ICMP_H__ */  #endif /* __LWIP_ICMP_H__ */
111                        

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

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