func NewEndpoint(typ EndpointType, raw []byte) (e Endpoint) {
	e.len = len(raw)
	if e.len > MaxEndpointSize {
		panic("raw byte length greater than MaxEndpointSize")
	}
	e.typ = typ
	copy(e.raw[:], raw)
	return
}
NewEndpoint creates a new Endpoint object.

The size of raw must be less than MaxEndpointSize, otherwise this function
will panic.
package gopacket
import (
	"bytes"
	"fmt"
	"strconv"
)
const MaxEndpointSize = 16
type Endpoint struct {
	typ EndpointType
	len int
	raw [MaxEndpointSize]byte
}
func (a Endpoint) EndpointType() EndpointType { return a.typ }
func (a Endpoint) Raw() []byte { return a.raw[:a.len] }
func (a Endpoint) LessThan(b Endpoint) bool {
	return a.typ < b.typ || (a.typ == b.typ && bytes.Compare(a.raw[:a.len], b.raw[:b.len]) < 0)
}
func fnvHash(s []byte) (h uint64) {
	h = fnvBasis
	for i := 0; i < len(s); i++ {
		h ^= uint64(s[i])
		h *= fnvPrime
	}
	return
}
const fnvBasis = 14695981039346656037
const fnvPrime = 1099511628211
func (a Endpoint) FastHash() (h uint64) {
	h = fnvHash(a.raw[:a.len])
	h ^= uint64(a.typ)
	h *= fnvPrime
	return
}