/[lwip]/lwip/src/include/lwip/tcp.h
ViewVC logotype

Diff of /lwip/src/include/lwip/tcp.h

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

revision 1.13 by davidhaas, Tue Feb 18 19:27:48 2003 UTC revision 1.14 by jani, Fri Feb 21 16:43:46 2003 UTC
# Line 168  PACK_STRUCT_END Line 168  PACK_STRUCT_END
168  #  include "arch/epstruct.h"  #  include "arch/epstruct.h"
169  #endif  #endif
170    
171  #define TCPH_OFFSET(hdr) (NTOHS((hdr)->_offset_flags) >> 8)  #define TCPH_OFFSET(hdr) (ntohs((hdr)->_offset_flags) >> 8)
172  #define TCPH_FLAGS(hdr) (NTOHS((hdr)->_offset_flags) & 0xff)  #define TCPH_FLAGS(hdr) (ntohs((hdr)->_offset_flags) & 0xff)
173    
174  #define TCPH_OFFSET_SET(hdr, offset) (hdr)->_offset_flags = HTONS(((offset) << 8) | TCPH_FLAGS(hdr))  #define TCPH_OFFSET_SET(hdr, offset) (hdr)->_offset_flags = htons(((offset) << 8) | TCPH_FLAGS(hdr))
175  #define TCPH_FLAGS_SET(hdr, flags) (hdr)->_offset_flags = HTONS((TCPH_OFFSET(hdr) << 8) | (flags))  #define TCPH_FLAGS_SET(hdr, flags) (hdr)->_offset_flags = htons((TCPH_OFFSET(hdr) << 8) | (flags))
176    
177  #define TCP_TCPLEN(seg) ((seg)->len + ((TCPH_FLAGS((seg)->tcphdr) & TCP_FIN || \  #define TCP_TCPLEN(seg) ((seg)->len + ((TCPH_FLAGS((seg)->tcphdr) & TCP_FIN || \
178                                          TCPH_FLAGS((seg)->tcphdr) & TCP_SYN)? 1: 0))                                          TCPH_FLAGS((seg)->tcphdr) & TCP_SYN)? 1: 0))

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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