cargo-generate: sort program types

pull/71/head
Luca BRUNO 2 years ago committed by Michal Rostecki
parent 7fe5a39b7c
commit 463013a11e

@ -6,24 +6,24 @@ ignore = [".github", "test.sh"]
type = "string"
prompt = "Which type of eBPF program?"
choices = [
"kprobe",
"kretprobe",
"cgroup_skb",
"cgroup_sockopt",
"cgroup_sysctl",
"classifier",
"fentry",
"fexit",
"uprobe",
"uretprobe",
"kprobe",
"kretprobe",
"lsm",
"raw_tracepoint",
"sk_msg",
"sock_ops",
"socket_filter",
"sk_msg",
"xdp",
"classifier",
"cgroup_skb",
"cgroup_sysctl",
"cgroup_sockopt",
"tracepoint",
"lsm",
"tp_btf",
"raw_tracepoint"
"tracepoint",
"uprobe",
"uretprobe",
"xdp",
]
default = "xdp"

@ -15,35 +15,35 @@ trap clean_up EXIT
pushd $TMP_DIR
case "$PROG_TYPE" in
"kprobe"|"kretprobe")
ADDITIONAL_ARGS="-d kprobe=test"
"cgroup_sockopt")
ADDITIONAL_ARGS="-d sockopt_target=getsockopt"
;;
"classifier"|"cgroup_skb")
ADDITIONAL_ARGS="-d direction=Ingress"
;;
"fentry"|"fexit")
ADDITIONAL_ARGS="-d fn_name=try_to_wake_up"
;;
"uprobe"|"uretprobe")
ADDITIONAL_ARGS="-d uprobe_target=testlib -d uprobe_fn_name=testfn"
"kprobe"|"kretprobe")
ADDITIONAL_ARGS="-d kprobe=test"
;;
"tracepoint")
ADDITIONAL_ARGS="-d tracepoint_category=net -d tracepoint_name=net_dev_queue"
"lsm")
ADDITIONAL_ARGS="-d lsm_hook=file_open"
;;
"classifier"|"cgroup_skb")
ADDITIONAL_ARGS="-d direction=Ingress"
"raw_tracepoint")
ADDITIONAL_ARGS="-d tracepoint_name=sys_enter"
;;
"sk_msg")
ADDITIONAL_ARGS="-d sock_map=TEST"
;;
"lsm")
ADDITIONAL_ARGS="-d lsm_hook=file_open"
;;
"tp_btf")
ADDITIONAL_ARGS="-d tracepoint_name=net_dev_queue"
;;
"cgroup_sockopt")
ADDITIONAL_ARGS="-d sockopt_target=getsockopt"
"tracepoint")
ADDITIONAL_ARGS="-d tracepoint_category=net -d tracepoint_name=net_dev_queue"
;;
"raw_tracepoint")
ADDITIONAL_ARGS="-d tracepoint_name=sys_enter"
"uprobe"|"uretprobe")
ADDITIONAL_ARGS="-d uprobe_target=testlib -d uprobe_fn_name=testfn"
;;
*)
ADDITIONAL_ARGS=''

Loading…
Cancel
Save