mirror of
https://github.com/bettercap/bettercap
synced 2025-07-13 00:23:49 -07:00
fix: updated gopacket to fix compilation issues on macOS (ref #357)
This commit is contained in:
parent
5be3fcbf20
commit
a95ae94957
23 changed files with 1625 additions and 205 deletions
34
vendor/github.com/google/gopacket/layers/tls_appdata.go
generated
vendored
Normal file
34
vendor/github.com/google/gopacket/layers/tls_appdata.go
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
// Copyright 2018 The GoPacket Authors. All rights reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license
|
||||
// that can be found in the LICENSE file in the root of the source
|
||||
// tree.
|
||||
|
||||
package layers
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/google/gopacket"
|
||||
)
|
||||
|
||||
// TLSAppDataRecord contains all the information that each AppData Record types should have
|
||||
type TLSAppDataRecord struct {
|
||||
TLSRecordHeader
|
||||
Payload []byte
|
||||
}
|
||||
|
||||
// DecodeFromBytes decodes the slice into the TLS struct.
|
||||
func (t *TLSAppDataRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error {
|
||||
// TLS Record Header
|
||||
t.ContentType = h.ContentType
|
||||
t.Version = h.Version
|
||||
t.Length = h.Length
|
||||
|
||||
if len(data) != int(t.Length) {
|
||||
return errors.New("TLS Application Data length mismatch")
|
||||
}
|
||||
|
||||
t.Payload = data
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue