Class: Crabstone::BPF::Operand
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Crabstone::BPF::Operand
- Includes:
- Extension::Operand
- Defined in:
- lib/crabstone/arch/5/bpf.rb
Instance Method Summary collapse
- #ext? ⇒ Boolean
- #imm? ⇒ Boolean
- #mem? ⇒ Boolean
- #mmem? ⇒ Boolean
- #msh? ⇒ Boolean
- #off? ⇒ Boolean
- #reg? ⇒ Boolean
Methods included from Extension::Operand
Instance Method Details
#ext? ⇒ Boolean
67 68 69 |
# File 'lib/crabstone/arch/5/bpf.rb', line 67 def ext? self[:type] == OP_EXT end |
#imm? ⇒ Boolean
44 45 46 |
# File 'lib/crabstone/arch/5/bpf.rb', line 44 def imm? self[:type] == OP_IMM end |
#mem? ⇒ Boolean
52 53 54 55 56 57 |
# File 'lib/crabstone/arch/5/bpf.rb', line 52 def mem? [ OP_MEM, OP_MMEM ].include?(self[:type]) end |
#mmem? ⇒ Boolean
59 60 61 |
# File 'lib/crabstone/arch/5/bpf.rb', line 59 def mmem? self[:type] == OP_MMEM end |
#msh? ⇒ Boolean
63 64 65 |
# File 'lib/crabstone/arch/5/bpf.rb', line 63 def msh? self[:type] == OP_MSH end |
#off? ⇒ Boolean
48 49 50 |
# File 'lib/crabstone/arch/5/bpf.rb', line 48 def off? self[:type] == OP_OFF end |
#reg? ⇒ Boolean
40 41 42 |
# File 'lib/crabstone/arch/5/bpf.rb', line 40 def reg? self[:type] == OP_REG end |