github.com/criyle/go-sandbox@v0.10.3/pkg/seccomp/libseccomp/action.go (about)

     1  package libseccomp
     2  
     3  // Action is seccomp trap action
     4  type Action uint32
     5  
     6  // Action defines seccomp action to the syscall
     7  // default value 0 is invalid
     8  const (
     9  	ActionAllow Action = iota + 1
    10  	ActionErrno
    11  	ActionTrace
    12  	ActionKill
    13  )
    14  
    15  // MsgDisallow, Msghandle defines the action needed when trapped by
    16  // seccomp filter
    17  const (
    18  	MsgDisallow int16 = iota + 1
    19  	MsgHandle
    20  )
    21  
    22  // Action get the basic action
    23  func (a Action) Action() Action {
    24  	return Action(a & 0xffff)
    25  }