Print this page
dccp: reset packet

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip_impl.h
          +++ new/usr/src/uts/common/inet/ip_impl.h
↓ open down ↓ 44 lines elided ↑ open up ↑
  45   45  
  46   46  #define IP_MOD_ID               5701
  47   47  
  48   48  #define INET_NAME       "ip"
  49   49  
  50   50  #ifdef  _BIG_ENDIAN
  51   51  #define IP_HDR_CSUM_TTL_ADJUST  256
  52   52  #define IP_TCP_CSUM_COMP        IPPROTO_TCP
  53   53  #define IP_UDP_CSUM_COMP        IPPROTO_UDP
  54   54  #define IP_ICMPV6_CSUM_COMP     IPPROTO_ICMPV6
       55 +#define IP_DCCP_CSUM_COMP       IPPROTO_DCCP
  55   56  #else
  56   57  #define IP_HDR_CSUM_TTL_ADJUST  1
  57   58  #define IP_TCP_CSUM_COMP        (IPPROTO_TCP << 8)
  58   59  #define IP_UDP_CSUM_COMP        (IPPROTO_UDP << 8)
  59   60  #define IP_ICMPV6_CSUM_COMP     (IPPROTO_ICMPV6 << 8)
       61 +#define IP_DCCP_CSUM_COMP       (IPPROTO_DCCP << 8)
  60   62  #endif
  61   63  
  62   64  #define TCP_CHECKSUM_OFFSET     16
  63   65  #define TCP_CHECKSUM_SIZE       2
  64   66  
  65   67  #define UDP_CHECKSUM_OFFSET     6
  66   68  #define UDP_CHECKSUM_SIZE       2
  67   69  
  68   70  #define ICMPV6_CHECKSUM_OFFSET  2
  69   71  #define ICMPV6_CHECKSUM_SIZE    2
  70   72  
       73 +#define DCCP_CHECKSUM_OFFSET    6
       74 +#define DCCP_CHECKSUM_SIZE      2
       75 +
  71   76  #define IPH_TCPH_CHECKSUMP(ipha, hlen)  \
  72   77          ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + TCP_CHECKSUM_OFFSET)))
  73   78  
  74   79  #define IPH_UDPH_CHECKSUMP(ipha, hlen)  \
  75   80          ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + UDP_CHECKSUM_OFFSET)))
  76   81  
  77   82  #define IPH_ICMPV6_CHECKSUMP(ipha, hlen)        \
  78   83          ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + ICMPV6_CHECKSUM_OFFSET)))
  79   84  
       85 +#define IPH_DCCPH_CHECKSUMP(ipha, hlen) \
       86 +        ((uint16_t *)(((uchar_t *)(ipha)) + ((hlen) + DCCP_CHECKSUM_OFFSET)))
       87 +
  80   88  #define ILL_HCKSUM_CAPABLE(ill)         \
  81   89          (((ill)->ill_capabilities & ILL_CAPAB_HCKSUM) != 0)
  82   90  
  83   91  /*
  84   92   * Macro to adjust a given checksum value depending on any prepended
  85   93   * or postpended data on the packet.  It expects the start offset to
  86   94   * begin at an even boundary and that the packet consists of at most
  87   95   * two mblks.
  88   96   */
  89   97  #define IP_ADJCKSUM_PARTIAL(cksum_start, mp, mp1, len, adj) {           \
↓ open down ↓ 118 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX