tls_handshake.go 673 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2018 The GoPacket Authors. All rights reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style license
  4. // that can be found in the LICENSE file in the root of the source
  5. // tree.
  6. package layers
  7. import (
  8. "github.com/google/gopacket"
  9. )
  10. // TLSHandshakeRecord defines the structure of a Handshare Record
  11. type TLSHandshakeRecord struct {
  12. TLSRecordHeader
  13. }
  14. // DecodeFromBytes decodes the slice into the TLS struct.
  15. func (t *TLSHandshakeRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error {
  16. // TLS Record Header
  17. t.ContentType = h.ContentType
  18. t.Version = h.Version
  19. t.Length = h.Length
  20. // TODO
  21. return nil
  22. }