13 #include <netlink/cli/utils.h>
14 #include <netlink/cli/tc.h>
15 #include <netlink/route/qdisc/fifo.h>
17 static void print_usage(
void)
20 "Usage: nl-qdisc-add [...] pfifo [OPTIONS]...\n"
23 " --help Show this help text.\n"
24 " --limit=LIMIT Maximum queue length in number of packets.\n"
27 " # Attach pfifo with a 32 packet limit to eth1\n"
28 " nl-qdisc-add --dev=eth1 --parent=root pfifo --limit=32\n");
31 static void pfifo_parse_argv(
struct rtnl_tc *tc,
int argc,
char **argv)
33 struct rtnl_qdisc *qdisc = (
struct rtnl_qdisc *) tc;
40 static struct option long_opts[] = {
41 {
"help", 0, 0,
'h' },
42 {
"limit", 1, 0, ARG_LIMIT },
46 c = getopt_long(argc, argv,
"h", long_opts, &optidx);
65 .tm_type = RTNL_TC_TYPE_QDISC,
66 .tm_parse_argv = pfifo_parse_argv,
69 static void __init pfifo_init(
void)
71 nl_cli_tc_register(&pfifo_module);
74 static void __exit pfifo_exit(
void)
76 nl_cli_tc_unregister(&pfifo_module);