blob: 31699a81f3fdaa0c373b27f4fc0548b126880c78 [file] [log] [blame]
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +00001/*
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +00002 * 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
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000010 */
11
12#include <stdio.h>
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000013#include <string.h>
14
15#include "utils.h"
16#include "tc_util.h"
17
18static void explain(void)
19{
Daniel Borkmann0d45c4b2016-01-12 01:42:19 +010020 fprintf(stderr, "Usage: ... ingress\n");
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000021}
22
Daniel Borkmann0d45c4b2016-01-12 01:42:19 +010023static int ingress_parse_opt(struct qdisc_util *qu, int argc, char **argv,
24 struct nlmsghdr *n)
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000025{
Daniel Borkmannec6f5ab2015-05-09 22:59:17 +020026 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;
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000034 }
35 }
36
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000037 return 0;
38}
39
Daniel Borkmann0d45c4b2016-01-12 01:42:19 +010040static int ingress_print_opt(struct qdisc_util *qu, FILE *f,
41 struct rtattr *opt)
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000042{
Daniel Borkmannec6f5ab2015-05-09 22:59:17 +020043 fprintf(f, "---------------- ");
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000044 return 0;
45}
46
net[shemminger]!kaber95812b52004-09-28 18:35:49 +000047struct qdisc_util ingress_qdisc_util = {
osdl.net!shemmingerf2f99e22004-08-31 17:45:21 +000048 .id = "ingress",
49 .parse_qopt = ingress_parse_opt,
50 .print_qopt = ingress_print_opt,
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000051};