code: func (p *Packet) Decode() {
  	if len(p.Data) <= 14 {
  		return
  	}
  
  	p.Type = int(binary.BigEndian.Uint16(p.Data[12:14]))
  	p.DestMac = decodemac(p.Data[0:6])
  	p.SrcMac = decodemac(p.Data[6:12])
  
  	if len(p.Data) >= 15 {
  		p.Payload = p.Data[14:]
  	}
  
  	switch p.Type {
  	case TYPE_IP:
  		p.decodeIp()
  	case TYPE_IP6:
  		p.decodeIp6()
  	case TYPE_ARP:
  		p.decodeArp()
  	case TYPE_VLAN:
  		p.decodeVlan()
  	}
  }
docs: // Decode decodes the headers of a Packet.