Extended Berkeley Packet Filter (eBPF) assembler and virtual machine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
370 B

package ebpf
import (
"log"
"math"
)
func BuiltinProbeRead(r1, r2, r3, r4, r5 uint64) uint64 {
log.Println("probe read", r1, r2, r3, r4, r5)
return math.MaxUint64
}
func BuiltinStrcmp(r1, r2, r3, r4, r5 uint64) uint64 {
log.Println("strcmp", r1, r2, r3, r4, r5)
return math.MaxUint64
}
func (vm *VM) AttachBuiltin() {
vm.Attach(ProbeRead, BuiltinProbeRead)
}