func (f *ScmpFilter) getFilterAttr(attr scmpFilterAttr) (C.uint32_t, error) {
	f.lock.Lock()
	defer f.lock.Unlock()
	if !f.valid {
		return 0x0, errBadFilter
	}
	if !checkVersionAbove(2, 2, 0) && attr == filterAttrTsync {
		return 0x0, VersionError{
			message: "thread synchronization attribute is not supported",
			minimum: "2.2.0",
		}
	}
	var attribute C.uint32_t
	retCode := C.seccomp_attr_get(f.filterCtx, attr.toNative(), &attribute)
	if retCode != 0 {
		return 0x0, syscall.Errno(-1 * retCode)
	}
	return attribute, nil
}
Get a raw filter attribute
package seccomp
import (
	"fmt"
	"syscall"
)
import "C"
type scmpFilterAttr uint32
const (
	filterAttrActDefault scmpFilterAttr = iota
	filterAttrActBadArch scmpFilterAttr = iota
	filterAttrNNP        scmpFilterAttr = iota
	filterAttrTsync      scmpFilterAttr = iota
)
const (
	scmpError C.int = -1
	archStart ScmpArch = ArchNative
	archEnd   ScmpArch = ArchS390X
	actionStart ScmpAction = ActKill
	actionEnd   ScmpAction = ActAllow
	compareOpStart ScmpCompareOp = CompareNotEqual
	compareOpEnd   ScmpCompareOp = CompareMaskedEqual
)
var (
	errBadFilter = fmt.Errorf("filter is invalid or uninitialized")
	verMajor = int(C.C_VERSION_MAJOR)
	verMinor = int(C.C_VERSION_MINOR)
	verMicro = int(C.C_VERSION_MICRO)
)
func checkVersionAbove(major, minor, micro int) bool {
	return (verMajor > major) ||
		(verMajor == major && verMinor > minor) ||
		(verMajor == major && verMinor == minor && verMicro >= micro)
}
func ensureSupportedVersion() error {
	if !checkVersionAbove(2, 1, 0) {
		return VersionError{}
	}
	return nil
}
func filterFinalizer(f *ScmpFilter) {
	f.Release()
}