Documentation ¶
Index ¶
- Variables
- func Decode(id string, data []byte, tl gopacket.TransportLayer) (err error)
- func DecodeUseProto(id string, data []byte, tl gopacket.TransportLayer, proto ApplicationPortocol) (err error)
- type ApplicationPortocol
- type Decoder
- type DecoderUnknown
- func (self *DecoderUnknown) CanDecode(data []byte, t gopacket.TransportLayer) bool
- func (self *DecoderUnknown) Decode(data []byte, t gopacket.TransportLayer) (app hook.Protocol, err error)
- func (self *DecoderUnknown) DetectPacketLength(data []byte, t gopacket.TransportLayer) (length uint64, off uint64, err error)
- func (self *DecoderUnknown) Name() string
- func (self *DecoderUnknown) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDecoderUnknown = errors.New("Layer type not currently supported")
View Source
var NfsProtocol = RegisterDecoder(2049, nfs.NewDecoder())
View Source
var UnknownProtocol = RegisterDecoder(0, NewDecoderUnknown())
Functions ¶
func DecodeUseProto ¶
func DecodeUseProto(id string, data []byte, tl gopacket.TransportLayer, proto ApplicationPortocol) (err error)
Types ¶
type ApplicationPortocol ¶
type ApplicationPortocol uint32
func DetectProtocol ¶
func DetectProtocol(data []byte, t gopacket.TransportLayer) ApplicationPortocol
func RegisterDecoder ¶
func RegisterDecoder(num uint32, decoder Decoder) ApplicationPortocol
type Decoder ¶
type Decoder interface { Name() string CanDecode(data []byte, t gopacket.TransportLayer) (canDecode bool) DetectPacketLength(data []byte, t gopacket.TransportLayer) (length uint64, off uint64, err error) Decode(data []byte, t gopacket.TransportLayer) (app hook.Protocol, err error) }
func GetDecoder ¶
func GetDecoder(p ApplicationPortocol) Decoder
type DecoderUnknown ¶
type DecoderUnknown struct {
// contains filtered or unexported fields
}
func NewDecoderUnknown ¶
func NewDecoderUnknown() *DecoderUnknown
func (*DecoderUnknown) CanDecode ¶
func (self *DecoderUnknown) CanDecode(data []byte, t gopacket.TransportLayer) bool
func (*DecoderUnknown) Decode ¶
func (self *DecoderUnknown) Decode(data []byte, t gopacket.TransportLayer) (app hook.Protocol, err error)
func (*DecoderUnknown) DetectPacketLength ¶
func (self *DecoderUnknown) DetectPacketLength(data []byte, t gopacket.TransportLayer) (length uint64, off uint64, err error)
func (*DecoderUnknown) Name ¶
func (self *DecoderUnknown) Name() string
func (*DecoderUnknown) String ¶
func (self *DecoderUnknown) String() string
Click to show internal directories.
Click to hide internal directories.