mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-08-09 11:45:18 +08:00
优化抓包性能
This commit is contained in:
27
vendor/github.com/google/gopacket/layers/stp.go
generated
vendored
27
vendor/github.com/google/gopacket/layers/stp.go
generated
vendored
@@ -1,27 +0,0 @@
|
||||
// Copyright 2017 Google, Inc. 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"
|
||||
)
|
||||
|
||||
// STP decode spanning tree protocol packets to transport BPDU (bridge protocol data unit) message.
|
||||
type STP struct {
|
||||
BaseLayer
|
||||
}
|
||||
|
||||
// LayerType returns gopacket.LayerTypeSTP.
|
||||
func (s *STP) LayerType() gopacket.LayerType { return LayerTypeSTP }
|
||||
|
||||
func decodeSTP(data []byte, p gopacket.PacketBuilder) error {
|
||||
stp := &STP{}
|
||||
stp.Contents = data[:]
|
||||
// TODO: parse the STP protocol into actual subfields.
|
||||
p.AddLayer(stp)
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user