xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/core/frames/quic_path_challenge_frame.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright (c) 2018 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 QUICHE_QUIC_CORE_FRAMES_QUIC_PATH_CHALLENGE_FRAME_H_
6 #define QUICHE_QUIC_CORE_FRAMES_QUIC_PATH_CHALLENGE_FRAME_H_
7 
8 #include <memory>
9 #include <ostream>
10 
11 #include "quiche/quic/core/frames/quic_inlined_frame.h"
12 #include "quiche/quic/core/quic_constants.h"
13 #include "quiche/quic/core/quic_types.h"
14 
15 namespace quic {
16 
17 struct QUICHE_EXPORT QuicPathChallengeFrame
18     : public QuicInlinedFrame<QuicPathChallengeFrame> {
19   QuicPathChallengeFrame();
20   QuicPathChallengeFrame(QuicControlFrameId control_frame_id,
21                          const QuicPathFrameBuffer& data_buff);
22   ~QuicPathChallengeFrame() = default;
23 
24   friend QUICHE_EXPORT std::ostream& operator<<(
25       std::ostream& os, const QuicPathChallengeFrame& frame);
26 
27   QuicFrameType type;
28 
29   // A unique identifier of this control frame. 0 when this frame is received,
30   // and non-zero when sent.
31   QuicControlFrameId control_frame_id = kInvalidControlFrameId;
32 
33   QuicPathFrameBuffer data_buffer{};
34 };
35 }  // namespace quic
36 
37 #endif  // QUICHE_QUIC_CORE_FRAMES_QUIC_PATH_CHALLENGE_FRAME_H_
38