summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_bitmasks.h
blob: eb34ce6374bc18b722d09061d01e09892f59d9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_SPDY_SPDY_BITMASKS_H_
#define NET_SPDY_SPDY_BITMASKS_H_
#pragma once

namespace spdy {

// StreamId mask from the SpdyHeader
const unsigned int kStreamIdMask = 0x7fffffff;

// Control flag mask from the SpdyHeader
const unsigned int kControlFlagMask = 0x8000;

// Priority mask from the SYN_FRAME
const unsigned int kPriorityMask = 0xc0;

// Mask the lower 24 bits.
const unsigned int kLengthMask = 0xffffff;

// Mask the Id from a SETTINGS id.
const unsigned int kSettingsIdMask = 0xffffff;

// Legal flags on data packets.
const int kDataFlagsMask = 0x03;

// Legal flags on control packets.
const int kControlFlagsMask = 0x03;

}  // namespace spdy

#endif  // NET_SPDY_SPDY_BITMASKS_H_