Class: Seccomp::Notify::BPF::Instruction

Inherits:
Struct
  • Object
show all
Defined in:
lib/seccomp/notify/bpf/instruction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



6
7
8
# File 'lib/seccomp/notify/bpf/instruction.rb', line 6

def code
  @code
end

#jfObject

Returns the value of attribute jf

Returns:

  • (Object)

    the current value of jf



6
7
8
# File 'lib/seccomp/notify/bpf/instruction.rb', line 6

def jf
  @jf
end

#jtObject

Returns the value of attribute jt

Returns:

  • (Object)

    the current value of jt



6
7
8
# File 'lib/seccomp/notify/bpf/instruction.rb', line 6

def jt
  @jt
end

#kObject

Returns the value of attribute k

Returns:

  • (Object)

    the current value of k



6
7
8
# File 'lib/seccomp/notify/bpf/instruction.rb', line 6

def k
  @k
end

Instance Method Details

#to_binaryObject



7
8
9
# File 'lib/seccomp/notify/bpf/instruction.rb', line 7

def to_binary
  [code, jt, jf, k].pack(Structs::INSTRUCTION_FORMAT)
end