title: TCP flags present in the header
body: <p>on my ubuntu 9.04 the /usr/include/netinet/tcp.h defines the tcp header as follows</p>
  
  <pre><code>struct tcphdr
    {
      u_int16_t source;
      u_int16_t dest;
      u_int32_t seq;
      u_int32_t ack_seq;
  #  if __BYTE_ORDER == __LITTLE_ENDIAN
      u_int16_t res1:4;
      u_int16_t doff:4;
      u_int16_t fin:1;
      u_int16_t syn:1;
      u_int16_t rst:1;
      u_int16_t psh:1;
      u_int16_t ack:1;
      u_int16_t urg:1;
      u_int16_t res2:2;
  #  elif __BYTE_ORDER == __BIG_ENDIAN
      u_int16_t doff:4;
      u_int16_t res1:4;
      u_int16_t res2:2;
      u_int16_t urg:1;
      u_int16_t ack:1;
      u_int16_t psh:1;
      u_int16_t rst:1;
      u_int16_t syn:1;
      u_int16_t fin:1;
  #  else
  #   error "Adjust your &lt;bits/endian.h&gt; defines"
  #  endif
      u_int16_t window;
      u_int16_t check;
      u_int16_t urg_ptr;
  };
  </code></pre>
  
  <p>In the flags section, FIN,SYN,RST,PSH,ACK,URG values are defined whereas i can't find the ECE and CWR flags. What do the res1,res2 and doff values defined in the struct tcphdr mean?
  Is there anyway to access the ECE and CWR flag values too?</p>
  
  <p>Thanks.</p>