func (s *SNAP) NextLayerType() gopacket.LayerType {
	return s.Type.LayerType()
}
NextLayerType returns the layer type contained by this DecodingLayer.
package layers
import (
	"encoding/binary"
	"errors"
	"github.com/google/gopacket"
)
type LLC struct {
	BaseLayer
	DSAP    uint8
	IG      bool  
	SSAP    uint8
	CR      bool  
	Control uint16
}
func (l *LLC) LayerType() gopacket.LayerType { return LayerTypeLLC }
func (l *LLC) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error {
	if len(data) < 3 {
		return errors.New("LLC header too small")
	}
	l.DSAP = data[0] & 0xFE
	l.IG = data[0]&0x1 != 0
	l.SSAP = data[1] & 0xFE
	l.CR = data[1]&0x1 != 0
	l.Control = uint16(data[2])
	if l.Control&0x1 == 0 || l.Control&0x3 == 0x1 {
		if len(data) < 4 {
			return errors.New("LLC header too small")
		}
		l.Control = l.Control<<8 | uint16(data[3])
		l.Contents = data[:4]
		l.Payload = data[4:]
	} else {
		l.Contents = data[:3]
		l.Payload = data[3:]
	}
	return nil
}
func (l *LLC) CanDecode() gopacket.LayerClass {
	return LayerTypeLLC
}
func (l *LLC) NextLayerType() gopacket.LayerType {
	switch {
	case l.DSAP == 0xAA && l.SSAP == 0xAA:
		return LayerTypeSNAP
	case l.DSAP == 0x42 && l.SSAP == 0x42:
		return LayerTypeSTP
	}
	return gopacket.LayerTypeZero  
}
type SNAP struct {
	BaseLayer
	OrganizationalCode []byte
	Type               EthernetType
}
func (s *SNAP) LayerType() gopacket.LayerType { return LayerTypeSNAP }
func (s *SNAP) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error {
	if len(data) < 5 {
		return errors.New("SNAP header too small")
	}
	s.OrganizationalCode = data[:3]
	s.Type = EthernetType(binary.BigEndian.Uint16(data[3:5]))
	s.BaseLayer = BaseLayer{data[:5], data[5:]}
	return nil
}
func (s *SNAP) CanDecode() gopacket.LayerClass {
	return LayerTypeSNAP
}