blob: ba58e722f8dbcd8f36d2ab0e826f89e411951a9e [file] [log] [blame]
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +00001/*
2 *
3 * q_ingress.c INGRESS.
4 *
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.
9 *
10 * Authors: J Hadi Salim
11 *
12 * This is here just in case it is needed
13 * useless right now; might be useful in the future
14 *
15 */
16
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>
26
27#include "utils.h"
28#include "tc_util.h"
29
30static void explain(void)
31{
32 fprintf(stderr, "Usage: ... ingress \n");
33}
34
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000035static int ingress_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
36{
37
38 if (argc > 0) {
39 while (argc > 0) {
40
41 if (strcmp(*argv, "handle") == 0) {
42 NEXT_ARG();
43 argc--; argv++;
44 } else {
45 fprintf(stderr, "What is \"%s\"?\n", *argv);
46 explain();
47 return -1;
48 }
49 }
50 }
51
52 addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
53 return 0;
54}
55
56static int ingress_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
57{
58
59 fprintf(f, "---------------- ");
60 return 0;
61}
62
net[shemminger]!kaber95812b52004-09-28 18:35:49 +000063struct qdisc_util ingress_qdisc_util = {
osdl.net!shemmingerf2f99e22004-08-31 17:45:21 +000064 .id = "ingress",
65 .parse_qopt = ingress_parse_opt,
66 .print_qopt = ingress_print_opt,
osdl.org!shemmingeraba5acd2004-04-15 20:56:59 +000067};