Tomato 1.28
[tomato.git] / release / src / router / iproute2 / tc / q_ingress.c
blob71fbd493a8b919a29d69c35ce62dea16ce547fb6
1 /*
3 * q_ingress.c INGRESS.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
10 * Authors: J Hadi Salim
12 * This is here just in case it is needed
13 * useless right now; might be useful in the future
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include <unistd.h>
20 #include <syslog.h>
21 #include <fcntl.h>
22 #include <sys/socket.h>
23 #include <netinet/in.h>
24 #include <arpa/inet.h>
25 #include <string.h>
27 #include "utils.h"
28 #include "tc_util.h"
30 static void explain(void)
32 fprintf(stderr, "Usage: ... ingress \n");
35 #define usage() return(-1)
37 static int ingress_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
40 if (argc > 0) {
41 while (argc > 0) {
43 if (strcmp(*argv, "handle") == 0) {
44 NEXT_ARG();
45 argc--; argv++;
46 } else {
47 fprintf(stderr, "What is \"%s\"?\n", *argv);
48 explain();
49 return -1;
54 addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
55 return 0;
58 static int ingress_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
61 fprintf(f, "---------------- ");
62 return 0;
65 struct qdisc_util ingress_qdisc_util = {
66 .id = "ingress",
67 .parse_qopt = ingress_parse_opt,
68 .print_qopt = ingress_print_opt,