2004-04-16 04:56:59 +08:00
|
|
|
/*
|
|
|
|
* q_ingress.c INGRESS.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version
|
|
|
|
* 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Authors: J Hadi Salim
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "utils.h"
|
|
|
|
#include "tc_util.h"
|
|
|
|
|
|
|
|
static void explain(void)
|
|
|
|
{
|
2016-01-12 08:42:19 +08:00
|
|
|
fprintf(stderr, "Usage: ... ingress\n");
|
2004-04-16 04:56:59 +08:00
|
|
|
}
|
|
|
|
|
2016-01-12 08:42:19 +08:00
|
|
|
static int ingress_parse_opt(struct qdisc_util *qu, int argc, char **argv,
|
2017-11-21 10:20:47 +08:00
|
|
|
struct nlmsghdr *n, const char *dev)
|
2004-04-16 04:56:59 +08:00
|
|
|
{
|
2015-05-10 04:59:17 +08:00
|
|
|
while (argc > 0) {
|
|
|
|
if (strcmp(*argv, "handle") == 0) {
|
|
|
|
NEXT_ARG();
|
|
|
|
argc--; argv++;
|
|
|
|
} else {
|
|
|
|
fprintf(stderr, "What is \"%s\"?\n", *argv);
|
|
|
|
explain();
|
|
|
|
return -1;
|
2004-04-16 04:56:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-01-12 08:42:19 +08:00
|
|
|
static int ingress_print_opt(struct qdisc_util *qu, FILE *f,
|
|
|
|
struct rtattr *opt)
|
2004-04-16 04:56:59 +08:00
|
|
|
{
|
2018-04-25 17:29:46 +08:00
|
|
|
print_string(PRINT_FP, NULL, "---------------- ", NULL);
|
2004-04-16 04:56:59 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-09-29 02:35:49 +08:00
|
|
|
struct qdisc_util ingress_qdisc_util = {
|
2004-09-01 01:45:21 +08:00
|
|
|
.id = "ingress",
|
|
|
|
.parse_qopt = ingress_parse_opt,
|
|
|
|
.print_qopt = ingress_print_opt,
|
2004-04-16 04:56:59 +08:00
|
|
|
};
|