func (a ScmpAction) String() string {
	switch a & 0xFFFF {
	case ActKill, ActKillThread:
		return "Action: Kill thread"
	case ActKillProcess:
		return "Action: Kill process"
	case ActTrap:
		return "Action: Send SIGSYS"
	case ActErrno:
		return fmt.Sprintf("Action: Return error code %d", (a >> 16))
	case ActTrace:
		return fmt.Sprintf("Action: Notify tracing processes with code %d",
			(a >> 16))
	case ActNotify:
		return "Action: Notify userspace"
	case ActLog:
		return "Action: Log system call"
	case ActAllow:
		return "Action: Allow system call"
	default:
		return fmt.Sprintf("Unrecognized Action %#x", uint(a))
	}
}
String returns a string representation of a seccomp match action
package seccomp
import (
	"fmt"
	"os"
	"runtime"
	"strings"
	"sync"
	"syscall"
	"unsafe"
)
import "C"
type VersionError struct {
	op                  string  
	major, minor, micro uint    
	curAPI, minAPI      uint    
}
func init() {
	_, _ = getAPI()
}
func (e VersionError) Error() string {
	if e.minAPI != 0 {
		return fmt.Sprintf("%s requires libseccomp >= %d.%d.%d and API level >= %d "+
			"(current version: %d.%d.%d, API level: %d)",
			e.op, e.major, e.minor, e.micro, e.minAPI,
			verMajor, verMinor, verMicro, e.curAPI)
	}
	return fmt.Sprintf("%s requires libseccomp >= %d.%d.%d (current version: %d.%d.%d)",
		e.op, e.major, e.minor, e.micro, verMajor, verMinor, verMicro)
}
type ScmpArch uint
type ScmpAction uint
type ScmpCompareOp uint
type ScmpCondition struct {
	Argument uint          `json:"argument,omitempty"`
	Op       ScmpCompareOp `json:"operator,omitempty"`
	Operand1 uint64        `json:"operand_one,omitempty"`
	Operand2 uint64        `json:"operand_two,omitempty"`
}
type ScmpSyscall int32
type ScmpFd int32
type ScmpNotifData struct {
	Syscall      ScmpSyscall `json:"syscall,omitempty"`
	Arch         ScmpArch    `json:"arch,omitempty"`
	InstrPointer uint64      `json:"instr_pointer,omitempty"`
	Args         []uint64    `json:"args,omitempty"`
}
type ScmpNotifReq struct {
	ID    uint64        `json:"id,omitempty"`
	Pid   uint32        `json:"pid,omitempty"`
	Flags uint32        `json:"flags,omitempty"`
	Data  ScmpNotifData `json:"data,omitempty"`
}
type ScmpNotifResp struct {
	ID    uint64 `json:"id,omitempty"`
	Error int32  `json:"error,omitempty"`
	Val   uint64 `json:"val,omitempty"`
	Flags uint32 `json:"flags,omitempty"`
}
const (
	ArchInvalid ScmpArch = iota
	ArchNative
	ArchX86
	ArchAMD64
	ArchX32
	ArchARM
	ArchARM64
	ArchMIPS
	ArchMIPS64
	ArchMIPS64N32
	ArchMIPSEL
	ArchMIPSEL64
	ArchMIPSEL64N32
	ArchPPC
	ArchPPC64
	ArchPPC64LE
	ArchS390
	ArchS390X
	ArchPARISC
	ArchPARISC64
	ArchRISCV64
)
const (
	ActInvalid ScmpAction = iota
	ActKill
	ActTrap
	ActNotify
	ActErrno
	ActTrace
	ActAllow
	ActLog
	ActKillThread
	ActKillProcess
)
const (
	CompareInvalid ScmpCompareOp = iota
	CompareNotEqual
	CompareLess
	CompareLessOrEqual
	CompareEqual
	CompareGreaterEqual
	CompareGreater
	CompareMaskedEqual
)
var ErrSyscallDoesNotExist = fmt.Errorf("could not resolve syscall name")
const (
	NotifRespFlagContinue uint32 = 1
)
func GetArchFromString(arch string) (ScmpArch, error) {
	if err := ensureSupportedVersion(); err != nil {
		return ArchInvalid, err
	}
	switch strings.ToLower(arch) {
	case "x86":
		return ArchX86, nil
	case "amd64", "x86-64", "x86_64", "x64":
		return ArchAMD64, nil
	case "x32":
		return ArchX32, nil
	case "arm":
		return ArchARM, nil
	case "arm64", "aarch64":
		return ArchARM64, nil
	case "mips":
		return ArchMIPS, nil
	case "mips64":
		return ArchMIPS64, nil
	case "mips64n32":
		return ArchMIPS64N32, nil
	case "mipsel":
		return ArchMIPSEL, nil
	case "mipsel64":
		return ArchMIPSEL64, nil
	case "mipsel64n32":
		return ArchMIPSEL64N32, nil
	case "ppc":
		return ArchPPC, nil
	case "ppc64":
		return ArchPPC64, nil
	case "ppc64le":
		return ArchPPC64LE, nil
	case "s390":
		return ArchS390, nil
	case "s390x":
		return ArchS390X, nil
	case "parisc":
		return ArchPARISC, nil
	case "parisc64":
		return ArchPARISC64, nil
	case "riscv64":
		return ArchRISCV64, nil
	default:
		return ArchInvalid, fmt.Errorf("cannot convert unrecognized string %q", arch)
	}
}
func (a ScmpArch) String() string {
	switch a {
	case ArchX86:
		return "x86"
	case ArchAMD64:
		return "amd64"
	case ArchX32:
		return "x32"
	case ArchARM:
		return "arm"
	case ArchARM64:
		return "arm64"
	case ArchMIPS:
		return "mips"
	case ArchMIPS64:
		return "mips64"
	case ArchMIPS64N32:
		return "mips64n32"
	case ArchMIPSEL:
		return "mipsel"
	case ArchMIPSEL64:
		return "mipsel64"
	case ArchMIPSEL64N32:
		return "mipsel64n32"
	case ArchPPC:
		return "ppc"
	case ArchPPC64:
		return "ppc64"
	case ArchPPC64LE:
		return "ppc64le"
	case ArchS390:
		return "s390"
	case ArchS390X:
		return "s390x"
	case ArchPARISC:
		return "parisc"
	case ArchPARISC64:
		return "parisc64"
	case ArchRISCV64:
		return "riscv64"
	case ArchNative:
		return "native"
	case ArchInvalid:
		return "Invalid architecture"
	default:
		return fmt.Sprintf("Unknown architecture %#x", uint(a))
	}
}
func (a ScmpCompareOp) String() string {
	switch a {
	case CompareNotEqual:
		return "Not equal"
	case CompareLess:
		return "Less than"
	case CompareLessOrEqual:
		return "Less than or equal to"
	case CompareEqual:
		return "Equal"
	case CompareGreaterEqual:
		return "Greater than or equal to"
	case CompareGreater:
		return "Greater than"
	case CompareMaskedEqual:
		return "Masked equality"
	case CompareInvalid:
		return "Invalid comparison operator"
	default:
		return fmt.Sprintf("Unrecognized comparison operator %#x", uint(a))
	}
}