12 #include <netlink/cli/utils.h>
13 #include <netlink/cli/tc.h>
14 #include <netlink/route/qdisc/fifo.h>
16 static void print_usage(
void)
19 "Usage: nl-qdisc-add [...] bfifo [OPTIONS]...\n"
22 " --help Show this help text.\n"
23 " --limit=LIMIT Maximum queue length in number of bytes.\n"
26 " # Attach bfifo with a 4KB bytes limit to eth1\n"
27 " nl-qdisc-add --dev=eth1 --parent=root bfifo --limit=4096\n");
30 static void bfifo_parse_argv(
struct rtnl_tc *tc,
int argc,
char **argv)
32 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);
59 "\"%s\": Invalid format.", optarg);
71 .tm_type = RTNL_TC_TYPE_QDISC,
72 .tm_parse_argv = bfifo_parse_argv,
75 static void __init bfifo_init(
void)
77 nl_cli_tc_register(&bfifo_module);
80 static void __exit bfifo_exit(
void)
82 nl_cli_tc_unregister(&bfifo_module);