-
Notifications
You must be signed in to change notification settings - Fork 8
/
quic.go
33 lines (29 loc) · 845 Bytes
/
quic.go
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
// Copyright (c) 2019, Adel "0x4d31" Karimi.
// All rights reserved.
// Licensed under the BSD 3-Clause license.
// For full license text, see the LICENSE file in the repo root
// or https://opensource.org/licenses/BSD-3-Clause
package quick
import (
"errors"
)
var (
ErrWrongType = errors.New("not a QUIC ClientHello message")
ErrBadPFlags = errors.New("QUIC packet has 0x00 public flags")
ErrBadLength = errors.New("QUIC packet has a malformed length")
ErrBadFtDLen = errors.New("QUIC packet has a malformed data length in Frame Type")
)
type QUICMessage struct {
Raw []byte
PublicFlags byte
PfVersion bool
PfReset bool
PfDivNonce bool
PfCIDLen bool
PfPacketNumLen uint8
PfMultipath bool
PfReserved bool
CID []byte
Version string
PacketNumber uint
}