github.com/dylandreimerink/gobpfld@v0.6.1-0.20220205171531-e79c330ad608/ebpf/exit.go (about)

     1  package ebpf
     2  
     3  var _ Instruction = (*Exit)(nil)
     4  
     5  type Exit struct{}
     6  
     7  func (e *Exit) Raw() ([]RawInstruction, error) {
     8  	return []RawInstruction{
     9  		{Op: BPF_EXIT | BPF_JMP, Reg: NewReg(0, 0)},
    10  	}, nil
    11  }
    12  
    13  func (e *Exit) String() string {
    14  	return "exit"
    15  }