]>
Commit | Line | Data |
---|---|---|
aba5acdf | 1 | /* |
aba5acdf SH |
2 | * q_ingress.c INGRESS. |
3 | * | |
4 | * This program is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU General Public License | |
6 | * as published by the Free Software Foundation; either version | |
7 | * 2 of the License, or (at your option) any later version. | |
8 | * | |
9 | * Authors: J Hadi Salim | |
aba5acdf SH |
10 | */ |
11 | ||
12 | #include <stdio.h> | |
aba5acdf SH |
13 | #include <string.h> |
14 | ||
15 | #include "utils.h" | |
16 | #include "tc_util.h" | |
17 | ||
18 | static void explain(void) | |
19 | { | |
0d45c4b4 | 20 | fprintf(stderr, "Usage: ... ingress\n"); |
aba5acdf SH |
21 | } |
22 | ||
0d45c4b4 | 23 | static int ingress_parse_opt(struct qdisc_util *qu, int argc, char **argv, |
927e3cfb | 24 | struct nlmsghdr *n, const char *dev) |
aba5acdf | 25 | { |
ec6f5abc DB |
26 | while (argc > 0) { |
27 | if (strcmp(*argv, "handle") == 0) { | |
28 | NEXT_ARG(); | |
29 | argc--; argv++; | |
30 | } else { | |
31 | fprintf(stderr, "What is \"%s\"?\n", *argv); | |
32 | explain(); | |
33 | return -1; | |
aba5acdf SH |
34 | } |
35 | } | |
36 | ||
aba5acdf SH |
37 | return 0; |
38 | } | |
39 | ||
0d45c4b4 DB |
40 | static int ingress_print_opt(struct qdisc_util *qu, FILE *f, |
41 | struct rtattr *opt) | |
aba5acdf | 42 | { |
bf717756 | 43 | print_string(PRINT_FP, NULL, "---------------- ", NULL); |
aba5acdf SH |
44 | return 0; |
45 | } | |
46 | ||
95812b56 | 47 | struct qdisc_util ingress_qdisc_util = { |
f2f99e2e SH |
48 | .id = "ingress", |
49 | .parse_qopt = ingress_parse_opt, | |
50 | .print_qopt = ingress_print_opt, | |
aba5acdf | 51 | }; |