eBPF¶
Instruction¶
- class Instruction : public LIEF::assembly::Instruction¶
This class represents an eBPF instruction.
Public Types
- using operands_it = iterator_range<Operand::Iterator>¶
Public Functions
- OPCODE opcode() const¶
The instruction opcode as defined in LLVM.
- operands_it operands() const¶
Iterator over the operands of the current instruction.
- virtual ~Instruction() override = default¶
Public Static Functions
- static bool classof(const assembly::Instruction *inst)¶
True if
instis an effective instance of ebpf::Instruction.
- using operands_it = iterator_range<Operand::Iterator>¶
Opcodes¶
See LIEF::assembly::ebpf::OPCODE in include/asm/ebpf/opcodes.hpp
Operands¶
- class Operand¶
This class represents an operand for an eBPF instruction.
Subclassed by LIEF::assembly::ebpf::operands::Immediate, LIEF::assembly::ebpf::operands::Memory, LIEF::assembly::ebpf::operands::PCRelative, LIEF::assembly::ebpf::operands::Register
Public Functions
- std::string to_string() const¶
Pretty representation of the operand.
- template<class T>
inline const T *as() const¶ This function can be used to down cast an Operand instance:
std::unique_ptr<assembly::ebpf::Operand> op = ...; if (const auto* imm = inst->as<assembly::ebpf::operands::Immediate>()) { const int64_t value = imm->value(); }
- virtual ~Operand()¶
- std::string to_string() const¶