Home | History | Annotate | Download | only in spdy
      1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef NET_SPDY_SPDY_BITMASKS_H_
      6 #define NET_SPDY_SPDY_BITMASKS_H_
      7 #pragma once
      8 
      9 namespace spdy {
     10 
     11 // StreamId mask from the SpdyHeader
     12 const unsigned int kStreamIdMask = 0x7fffffff;
     13 
     14 // Control flag mask from the SpdyHeader
     15 const unsigned int kControlFlagMask = 0x8000;
     16 
     17 // Priority mask from the SYN_FRAME
     18 const unsigned int kPriorityMask = 0xc0;
     19 
     20 // Mask the lower 24 bits.
     21 const unsigned int kLengthMask = 0xffffff;
     22 
     23 // Mask the Id from a SETTINGS id.
     24 const unsigned int kSettingsIdMask = 0xffffff;
     25 
     26 // Legal flags on data packets.
     27 const int kDataFlagsMask = 0x03;
     28 
     29 // Legal flags on control packets.
     30 const int kControlFlagsMask = 0x03;
     31 
     32 }  // namespace spdy
     33 
     34 #endif  // NET_SPDY_SPDY_BITMASKS_H_
     35