]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/m_bpf.c
treewide: refactor help messages
[mirror_iproute2.git] / tc / m_bpf.c
index 3e8468c683246955145269b650de73791e132d8b..e247da8da579f42a42dc2d8d385524f8e12c4582 100644 (file)
@@ -25,32 +25,34 @@ static const enum bpf_prog_type bpf_type = BPF_PROG_TYPE_SCHED_ACT;
 
 static void explain(void)
 {
-       fprintf(stderr, "Usage: ... bpf ... [ index INDEX ]\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "BPF use case:\n");
-       fprintf(stderr, " bytecode BPF_BYTECODE\n");
-       fprintf(stderr, " bytecode-file FILE\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "eBPF use case:\n");
-       fprintf(stderr, " object-file FILE [ section ACT_NAME ] [ export UDS_FILE ]");
-       fprintf(stderr, " [ verbose ]\n");
-       fprintf(stderr, " object-pinned FILE\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where BPF_BYTECODE := \'s,c t f k,c t f k,c t f k,...\'\n");
-       fprintf(stderr, "c,t,f,k and s are decimals; s denotes number of 4-tuples\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where FILE points to a file containing the BPF_BYTECODE string,\n");
-       fprintf(stderr, "an ELF file containing eBPF map definitions and bytecode, or a\n");
-       fprintf(stderr, "pinned eBPF program.\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where ACT_NAME refers to the section name containing the\n");
-       fprintf(stderr, "action (default \'%s\').\n", bpf_prog_to_default_section(bpf_type));
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where UDS_FILE points to a unix domain socket file in order\n");
-       fprintf(stderr, "to hand off control of all created eBPF maps to an agent.\n");
-       fprintf(stderr, "\n");
-       fprintf(stderr, "Where optionally INDEX points to an existing action, or\n");
-       fprintf(stderr, "explicitly specifies an action index upon creation.\n");
+       fprintf(stderr,
+               "Usage: ... bpf ... [ index INDEX ]\n"
+               "\n"
+               "BPF use case:\n"
+               " bytecode BPF_BYTECODE\n"
+               " bytecode-file FILE\n"
+               "\n"
+               "eBPF use case:\n"
+               " object-file FILE [ section ACT_NAME ] [ export UDS_FILE ]"
+               " [ verbose ]\n"
+               " object-pinned FILE\n"
+               "\n"
+               "Where BPF_BYTECODE := \'s,c t f k,c t f k,c t f k,...\'\n"
+               "c,t,f,k and s are decimals; s denotes number of 4-tuples\n"
+               "\n"
+               "Where FILE points to a file containing the BPF_BYTECODE string,\n"
+               "an ELF file containing eBPF map definitions and bytecode, or a\n"
+               "pinned eBPF program.\n"
+               "\n"
+               "Where ACT_NAME refers to the section name containing the\n"
+               "action (default \'%s\').\n"
+               "\n"
+               "Where UDS_FILE points to a unix domain socket file in order\n"
+               "to hand off control of all created eBPF maps to an agent.\n"
+               "\n"
+               "Where optionally INDEX points to an existing action, or\n"
+               "explicitly specifies an action index upon creation.\n",
+               bpf_prog_to_default_section(bpf_type));
 }
 
 static void bpf_cbpf_cb(void *nl, const struct sock_filter *ops, int ops_len)