-
Notifications
You must be signed in to change notification settings - Fork 41
/
cargo-generate.toml
78 lines (66 loc) · 2.33 KB
/
cargo-generate.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[template]
cargo_generate_version = ">=0.10.0"
ignore = [".github", "test.sh"]
[placeholders.program_type]
type = "string"
prompt = "Which type of eBPF program?"
choices = [
"cgroup_skb",
"cgroup_sockopt",
"cgroup_sysctl",
"classifier",
"fentry",
"fexit",
"kprobe",
"kretprobe",
"lsm",
"perf_event",
"raw_tracepoint",
"sk_msg",
"sock_ops",
"socket_filter",
"tp_btf",
"tracepoint",
"uprobe",
"uretprobe",
"xdp",
]
default = "xdp"
[conditional.'program_type == "kprobe" || program_type == "kretprobe"'.placeholders.kprobe]
type = "string"
prompt = "Where to attach the (k|kret)probe? (e.g try_to_wake_up)"
[conditional.'program_type == "fentry" || program_type == "fexit"'.placeholders.fn_name]
type = "string"
prompt = "Where to attach the f(entry|exit)? (e.g try_to_wake_up)"
[conditional.'program_type == "uprobe" || program_type == "uretprobe"'.placeholders.uprobe_target]
type = "string"
prompt = "Target to attach the (u|uret)probe? (e.g libc)"
[conditional.'program_type == "uprobe" || program_type == "uretprobe"'.placeholders.uprobe_fn_name]
type = "string"
prompt = "Function name to attach the (u|uret)probe? (e.g getaddrinfo)"
[conditional.'program_type == "cgroup_skb" || program_type == "classifier"'.placeholders.direction]
type = "string"
prompt = "Attach direction?"
choices = ["Egress", "Ingress"]
[conditional.'program_type == "cgroup_sockopt"'.placeholders.sockopt_target]
type = "string"
prompt = "Which socket option?"
choices = ["getsockopt", "setsockopt"]
[conditional.'program_type == "sk_msg"'.placeholders.sock_map]
type = "string"
prompt = "Map Name (UPPER_CASE)?"
regex = "^[A-Z_]+$"
[conditional.'program_type == "tracepoint"'.placeholders.tracepoint_category]
type = "string"
prompt = "Which tracepoint category? (e.g sched, net etc...)"
regex = "^[a-z_]+$"
[conditional.'program_type == "tracepoint" || program_type == "tp_btf" || program_type == "raw_tracepoint"'.placeholders.tracepoint_name]
type = "string"
prompt = "Which tracepoint name? (e.g sched_switch, net_dev_queue)"
regex = "^[a-z_]+$"
[conditional.'program_type == "lsm"'.placeholders.lsm_hook]
type = "string"
prompt = "Which lsm hook? (e.g file_open, task_alloc) You can find a list of hooks in include/linux/lsm_hooks.h in the kernel source tree."
regex = "^[a-z_]+$"
[hooks]
pre = ["pre-script.rhai"]