12 #include <netlink/cli/utils.h>
13 #include <netlink/cli/tc.h>
15 static void print_usage(
void)
18 "Usage: nl-qdisc-add [...] blackhole [OPTIONS]...\n"
21 " --help Show this help text.\n"
24 " # Drop all outgoing packets on eth1\n"
25 " nl-qdisc-add --dev=eth1 --parent=root blackhole\n");
28 static void blackhole_parse_argv(
struct rtnl_tc *tc,
int argc,
char **argv)
32 static struct option long_opts[] = {
33 {
"help", 0, 0,
'h' },
37 c = getopt_long(argc, argv,
"h", long_opts, &optidx);
51 .tm_name =
"blackhole",
52 .tm_type = RTNL_TC_TYPE_QDISC,
53 .tm_parse_argv = blackhole_parse_argv,
56 static void __init blackhole_init(
void)
58 nl_cli_tc_register(&blackhole_module);
61 static void __exit blackhole_exit(
void)
63 nl_cli_tc_unregister(&blackhole_module);