We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6489887 commit fb497f5Copy full SHA for fb497f5
compile.go
@@ -22,6 +22,8 @@ const (
22
MaxBpfInstructions = 4096
23
bpfInstructionBufferSize = 8 * MaxBpfInstructions
24
MAXIMUM_SNAPLEN = 262144
25
+
26
+ RejectAllExpr = "__reject_all__"
27
)
28
29
type StackOffset int
@@ -43,7 +45,7 @@ Steps:
43
45
3. [!DirectRead] Convert direct memory load to bpf_probe_read_kernel call
44
46
*/
47
func CompileEbpf(expr string, opts Options) (insts asm.Instructions, err error) {
- if expr == "__reject_all__" {
48
+ if expr == RejectAllExpr {
49
return asm.Instructions{
50
asm.Mov.Reg(asm.R4, asm.R5), // r4 = r5 (data = data_end)
51
}, nil
0 commit comments