Changeset 9ca0b29 for lib


Ignore:
Timestamp:
06/27/11 10:14:15 (10 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
b7922c7
Parents:
d8e4595
Message:
  • Add support for ECN bits in the TCP header - note that this does change the makeup of the libtrace_tcp_t struct which will be a problem for people referencing the reserved bits or trying to work out ECN manually. Long term, I think the benefits outweigh the slight discomfort that might be caused by this change.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r9cc1266 r9ca0b29  
    535535    uint32_t ack_seq;           /**< Acknowledgement Number */
    536536#  if BYTE_ORDER == LITTLE_ENDIAN
    537     LT_BITFIELD8 res1:4;        /**< Reserved bits */
    538     LT_BITFIELD8 doff:4;        /**< Data Offset */     
    539     LT_BITFIELD8 fin:1;         /**< FIN */
    540     LT_BITFIELD8 syn:1;         /**< SYN flag */
    541     LT_BITFIELD8 rst:1;         /**< RST flag */
    542     LT_BITFIELD8 psh:1;         /**< PuSH flag */
    543     LT_BITFIELD8 ack:1;         /**< ACK flag */
    544     LT_BITFIELD8 urg:1;         /**< URG flag */
    545     LT_BITFIELD8 res2:2;        /**< Reserved */
     537    LT_BITFIELD8 ecn_ns:1;      /**< ECN Nonce Sum */
     538    LT_BITFIELD8 res1:3;        /**< Reserved bits */
     539    LT_BITFIELD8 doff:4;        /**< Data Offset */
     540    LT_BITFIELD8 fin:1;         /**< FIN */
     541    LT_BITFIELD8 syn:1;         /**< SYN flag */
     542    LT_BITFIELD8 rst:1;         /**< RST flag */
     543    LT_BITFIELD8 psh:1;         /**< PuSH flag */
     544    LT_BITFIELD8 ack:1;         /**< ACK flag */
     545    LT_BITFIELD8 urg:1;         /**< URG flag */
     546    LT_BITFIELD8 ece:1;         /**< ECN Echo */
     547    LT_BITFIELD8 cwr:1;         /**< ECN CWR */
    546548#  elif BYTE_ORDER == BIG_ENDIAN
    547     LT_BITFIELD8 doff:4;        /**< Data offset */
    548     LT_BITFIELD8 res1:4;        /**< Reserved bits */
    549     LT_BITFIELD8 res2:2;        /**< Reserved */
    550     LT_BITFIELD8 urg:1;         /**< URG flag */
    551     LT_BITFIELD8 ack:1;         /**< ACK flag */
    552     LT_BITFIELD8 psh:1;         /**< PuSH flag */
    553     LT_BITFIELD8 rst:1;         /**< RST flag */
    554     LT_BITFIELD8 syn:1;         /**< SYN flag */
    555     LT_BITFIELD8 fin:1;         /**< FIN flag */
     549    LT_BITFIELD8 doff:4;        /**< Data offset */
     550    LT_BITFIELD8 res1:3;        /**< Reserved bits */
     551    LT_BITFIELD8 ecn_ns:1;      /**< ECN Nonce Sum */
     552    LT_BITFIELD8 cwr:1;         /**< ECN CWR */
     553    LT_BITFIELD8 ece:1;         /**< ECN Echo */
     554    LT_BITFIELD8 urg:1;         /**< URG flag */
     555    LT_BITFIELD8 ack:1;         /**< ACK flag */
     556    LT_BITFIELD8 psh:1;         /**< PuSH flag */
     557    LT_BITFIELD8 rst:1;         /**< RST flag */
     558    LT_BITFIELD8 syn:1;         /**< SYN flag */
     559    LT_BITFIELD8 fin:1;         /**< FIN flag */
    556560#  else
    557561#   error "Adjust your <bits/endian.h> defines"
Note: See TracChangeset for help on using the changeset viewer.