优化抓包性能

This commit is contained in:
hebo
2019-08-14 15:47:47 +08:00
parent d890396ba9
commit 30c0b35811
357 changed files with 129681 additions and 10546 deletions

View File

@@ -0,0 +1,28 @@
// 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 (
"github.com/google/gopacket"
)
// TLSHandshakeRecord defines the structure of a Handshare Record
type TLSHandshakeRecord struct {
TLSRecordHeader
}
// DecodeFromBytes decodes the slice into the TLS struct.
func (t *TLSHandshakeRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error {
// TLS Record Header
t.ContentType = h.ContentType
t.Version = h.Version
t.Length = h.Length
// TODO
return nil
}