func (l *Loopback) NextLayerType() gopacket.LayerType {
	return l.Family.LayerType()
}
NextLayerType returns the layer type contained by this DecodingLayer.
package layers
import (
	"encoding/binary"
	"errors"
	"fmt"
	"github.com/google/gopacket"
)
type Loopback struct {
	BaseLayer
	Family ProtocolFamily
}
func (l *Loopback) LayerType() gopacket.LayerType { return LayerTypeLoopback }
func (l *Loopback) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error {
	if len(data) < 4 {
		return errors.New("Loopback packet too small")
	}
	var prot uint32
	if data[0] == 0 && data[1] == 0 {
		prot = binary.BigEndian.Uint32(data[:4])
	} else {
		prot = binary.LittleEndian.Uint32(data[:4])
	}
	if prot > 0xFF {
		return fmt.Errorf("Invalid loopback protocol %q", data[:4])
	}
	l.Family = ProtocolFamily(prot)
	l.BaseLayer = BaseLayer{data[:4], data[4:]}
	return nil
}
func (l *Loopback) CanDecode() gopacket.LayerClass {
	return LayerTypeLoopback
}