8#include <netlink/cli/utils.h>
9#include <netlink/cli/tc.h>
11static void print_usage(
void)
14"Usage: nl-qdisc-add [...] blackhole [OPTIONS]...\n"
17" --help Show this help text.\n"
20" # Drop all outgoing packets on eth1\n"
21" nl-qdisc-add --dev=eth1 --parent=root blackhole\n");
24static void blackhole_parse_argv(
struct rtnl_tc *tc,
int argc,
char **argv)
28 static struct option long_opts[] = {
29 {
"help", 0, 0,
'h' },
33 c = getopt_long(argc, argv,
"h", long_opts, &optidx);
47 .tm_name =
"blackhole",
48 .tm_type = RTNL_TC_TYPE_QDISC,
49 .tm_parse_argv = blackhole_parse_argv,
52static void _nl_init blackhole_init(
void)
54 nl_cli_tc_register(&blackhole_module);
57static void _nl_exit blackhole_exit(
void)
59 nl_cli_tc_unregister(&blackhole_module);