func uint32Bytes(i *uint32) []byte {
	return (*[4]byte)(unsafe.Pointer(i))[:]
}
Low level data transformation routines.
uint32Bytes creates a []byte b such that &b[0] is i.
package ebpf
import (
	"errors"
	"os"
	"unsafe"
	"golang.org/x/sys/unix"
)
type unwrapper interface {
	Unwrap() error
}
func unwrap(err error) error {
	for {
		werr, ok := err.(unwrapper)
		if !ok {
			break
		}
		err = werr.Unwrap()
	}
	return err
}
func IsNotExist(err error) bool {
	return os.IsNotExist(unwrap(err))
}
func IsExist(err error) bool {
	return os.IsExist(unwrap(err))
}
func IsTooBig(err error) bool {
	err = unwrap(err)
	if se, ok := err.(*os.SyscallError); ok {
		err = se.Err
	}
	return err == unix.E2BIG
}
func IsPerm(err error) bool {
	return os.IsPermission(unwrap(err))
}
type command int
const (
	cmdMapCreate command = iota
	cmdMapLookup
	cmdMapUpdate
	cmdMapDeleteElem
	cmdMapGetNextKey
	cmdProgLoad
	cmdObjPin
	cmdObjGet
	cmdProgAttach
	cmdProgDetach
	cmdProgTestRun
	cmdProgGetNextID
	cmdMapGetNextID
	cmdProgGetFDByID
	cmdMapGetFDByID
	cmdObjGetInfoByFD
	cmdProgQuery
	cmdRawTracepointOpen
	cmdBTFLoad
	cmdBTFGetFDByID
	cmdTaskFDQuery
)
func (cmd command) valid() bool {
	return cmd >= cmdMapCreate && cmd <= cmdTaskFDQuery
}
var commandNames = [...]string{
	cmdMapCreate:         "bpf_map_create",
	cmdMapLookup:         "bpf_map_lookup_elem",
	cmdMapUpdate:         "bpf_map_update_elem",
	cmdMapDeleteElem:     "bpf_map_delete_elem",
	cmdMapGetNextKey:     "bpf_map_get_next_key",
	cmdProgLoad:          "bpf_prog_load",
	cmdObjPin:            "bpf_obj_pin",
	cmdObjGet:            "bpf_obj_get",
	cmdProgAttach:        "bpf_prog_attach",
	cmdProgDetach:        "bpf_prog_detach",
	cmdProgTestRun:       "bpf_prog_test_run",
	cmdProgGetNextID:     "bpf_prog_get_next_id",
	cmdMapGetNextID:      "bpf_map_get_next_id",
	cmdProgGetFDByID:     "bpf_prog_get_fd_by_id",
	cmdMapGetFDByID:      "bpf_map_get_fd_by_id",
	cmdObjGetInfoByFD:    "bpf_obj_get_info_by_fd",
	cmdProgQuery:         "bpf_prog_query",
	cmdRawTracepointOpen: "bpf_raw_tracepoint_open",
	cmdBTFLoad:           "bpf_btf_load",
	cmdBTFGetFDByID:      "bpf_btf_get_fd_by_id",
	cmdTaskFDQuery:       "bpf_task_fd_query",
}
func (cmd command) String() string {
	if !cmd.valid() {
		return "bpf_unknown"
	}
	return commandNames[cmd]
}
var errNotImplemented = errors.New("ebpf: not implemented")
type objectName [16]byte
func newObjectName(s string) objectName {
	var name objectName
	if len(s) == 0 {
		return name
	}
	n := copy(name[:], s)
	name[n-1] = 0
	return name
}