summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tc/m_gact.c7
-rw-r--r--tc/m_police.c10
-rw-r--r--tc/q_atm.c19
-rw-r--r--tc/q_cbq.c14
-rw-r--r--tc/q_dsmark.c19
-rw-r--r--tc/q_fifo.c28
-rw-r--r--tc/q_gred.c15
-rw-r--r--tc/q_hfsc.c13
-rw-r--r--tc/q_htb.c26
-rw-r--r--tc/q_ingress.c13
-rw-r--r--tc/q_netem.c6
-rw-r--r--tc/q_prio.c14
-rw-r--r--tc/q_red.c9
-rw-r--r--tc/q_sfq.c14
-rw-r--r--tc/q_tbf.c13
15 files changed, 62 insertions, 158 deletions
diff --git a/tc/m_gact.c b/tc/m_gact.c
index 01f94004..d23cd7c3 100644
--- a/tc/m_gact.c
+++ b/tc/m_gact.c
@@ -239,15 +239,8 @@ print_gact(struct action_util *au,FILE * f, struct rtattr *arg)
return 0;
}
-int
-gact_print_xstats(struct action_util *au, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
struct action_util gact_util = {
.id = "gact",
.parse_aopt = parse_gact,
.print_aopt = print_gact,
- .print_xstats = gact_print_xstats,
};
diff --git a/tc/m_police.c b/tc/m_police.c
index 79025a5d..9a75ca6c 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -30,7 +30,6 @@ struct action_util police_util = {
.id = "police",
.parse_aopt = act_parse_police,
.print_aopt = print_police,
- .print_xstats = police_print_xstats,
};
static void explain(void)
@@ -309,7 +308,7 @@ int parse_police(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n)
}
int
-print_police(struct action_util *a,FILE *f, struct rtattr *arg)
+print_police(struct action_util *a, FILE *f, struct rtattr *arg)
{
SPRINT_BUF(b1);
struct tc_police *p;
@@ -359,10 +358,3 @@ int
tc_print_police(FILE *f, struct rtattr *arg) {
return print_police(&police_util,f,arg);
}
-
-int
-police_print_xstats(struct action_util *au, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
diff --git a/tc/q_atm.c b/tc/q_atm.c
index d1745387..2258f873 100644
--- a/tc/q_atm.c
+++ b/tc/q_atm.c
@@ -250,19 +250,10 @@ static int atm_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
}
-static int atm_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
-
struct qdisc_util atm_util = {
- NULL,
- "atm",
- atm_parse_opt,
- atm_print_opt,
- atm_print_xstats,
-
- atm_parse_class_opt,
- atm_print_opt
+ .id = "atm",
+ .parse_qopt = atm_parse_opt,
+ .print_qopt = atm_print_opt,
+ .parse_copt = atm_parse_class_opt,
+ .print_copt = atm_print_opt,
};
diff --git a/tc/q_cbq.c b/tc/q_cbq.c
index 51ed87a2..a3fc6518 100644
--- a/tc/q_cbq.c
+++ b/tc/q_cbq.c
@@ -543,13 +543,11 @@ static int cbq_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstat
}
struct qdisc_util cbq_util = {
- NULL,
- "cbq",
- cbq_parse_opt,
- cbq_print_opt,
- cbq_print_xstats,
-
- cbq_parse_class_opt,
- cbq_print_opt,
+ .id = "cbq",
+ .parse_qopt = cbq_parse_opt,
+ .print_qopt = cbq_print_opt,
+ .print_xstats = cbq_print_xstats,
+ .parse_copt = cbq_parse_class_opt,
+ .print_copt = cbq_print_opt,
};
diff --git a/tc/q_dsmark.c b/tc/q_dsmark.c
index 8a1cd4d8..68b33ee9 100644
--- a/tc/q_dsmark.c
+++ b/tc/q_dsmark.c
@@ -168,19 +168,10 @@ static int dsmark_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
}
-static int dsmark_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
-
struct qdisc_util dsmark_util = {
- NULL,
- "dsmark",
- dsmark_parse_opt,
- dsmark_print_opt,
- dsmark_print_xstats,
-
- dsmark_parse_class_opt,
- dsmark_print_opt
+ .id = "dsmark",
+ .parse_qopt = dsmark_parse_opt,
+ .print_qopt = dsmark_print_opt,
+ .parse_copt = dsmark_parse_class_opt,
+ .print_copt = dsmark_print_opt,
};
diff --git a/tc/q_fifo.c b/tc/q_fifo.c
index 8905c3d4..56bb9acd 100644
--- a/tc/q_fifo.c
+++ b/tc/q_fifo.c
@@ -78,33 +78,21 @@ static int fifo_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
-static int fifo_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
struct qdisc_util bfifo_util = {
- NULL,
- "bfifo",
- fifo_parse_opt,
- fifo_print_opt,
- fifo_print_xstats,
+ .id = "bfifo",
+ .parse_qopt = fifo_parse_opt,
+ .print_qopt = fifo_print_opt,
};
struct qdisc_util pfifo_util = {
- NULL,
- "pfifo",
- fifo_parse_opt,
- fifo_print_opt,
- fifo_print_xstats,
+ .id = "pfifo",
+ .parse_qopt = fifo_parse_opt,
+ .print_qopt = fifo_print_opt,
};
extern int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt);
struct qdisc_util pfifo_fast_util = {
- NULL,
- "pfifo_fast",
- NULL,
- prio_print_opt,
- fifo_print_xstats,
+ .id = "pfifo_fast",
+ .print_qopt = prio_print_opt,
};
diff --git a/tc/q_gred.c b/tc/q_gred.c
index b63f8ae7..22e336f9 100644
--- a/tc/q_gred.c
+++ b/tc/q_gred.c
@@ -329,17 +329,8 @@ static int gred_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
-static int gred_print_xstats(struct qdisc_util *qu, FILE *f,
- struct rtattr *xstats)
-{
- return 0;
-}
-
-
struct qdisc_util gred_util = {
- NULL,
- "gred",
- gred_parse_opt,
- gred_print_opt,
- gred_print_xstats,
+ .id = "gred",
+ .parse_qopt = gred_parse_opt,
+ .print_qopt = gred_print_opt,
};
diff --git a/tc/q_hfsc.c b/tc/q_hfsc.c
index 3dfdc59f..c8ec70f8 100644
--- a/tc/q_hfsc.c
+++ b/tc/q_hfsc.c
@@ -278,13 +278,12 @@ hfsc_print_class_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
}
struct qdisc_util hfsc_util = {
- NULL,
- "hfsc",
- hfsc_parse_opt,
- hfsc_print_opt,
- hfsc_print_xstats,
- hfsc_parse_class_opt,
- hfsc_print_class_opt,
+ .id = "hfsc",
+ .parse_qopt = hfsc_parse_opt,
+ .print_qopt = hfsc_print_opt,
+ .print_xstats = hfsc_print_xstats,
+ .parse_copt = hfsc_parse_class_opt,
+ .print_copt = hfsc_print_class_opt,
};
static int
diff --git a/tc/q_htb.c b/tc/q_htb.c
index 924cf089..94b1be7b 100644
--- a/tc/q_htb.c
+++ b/tc/q_htb.c
@@ -312,22 +312,20 @@ static int htb_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstat
}
struct qdisc_util htb_util = {
- NULL,
- "htb",
- htb_parse_opt,
- htb_print_opt,
- htb_print_xstats,
- htb_parse_class_opt,
- htb_print_opt,
+ .id = "htb",
+ .parse_qopt = htb_parse_opt,
+ .print_qopt = htb_print_opt,
+ .print_xstats = htb_print_xstats,
+ .parse_copt = htb_parse_class_opt,
+ .print_copt = htb_print_opt,
};
/* for testing of old one */
struct qdisc_util htb2_util = {
- NULL,
- "htb2",
- htb_parse_opt,
- htb_print_opt,
- htb_print_xstats,
- htb_parse_class_opt,
- htb_print_opt,
+ .id = "htb2",
+ .parse_qopt = htb_parse_opt,
+ .print_qopt = htb_print_opt,
+ .print_xstats = htb_print_xstats,
+ .parse_copt = htb_parse_class_opt,
+ .print_copt = htb_print_opt,
};
diff --git a/tc/q_ingress.c b/tc/q_ingress.c
index 0a089062..c7fded74 100644
--- a/tc/q_ingress.c
+++ b/tc/q_ingress.c
@@ -62,15 +62,8 @@ static int ingress_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
-static int ingress_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
struct qdisc_util ingress_util = {
- NULL,
- "ingress",
- ingress_parse_opt,
- ingress_print_opt,
- ingress_print_xstats,
+ .id = "ingress",
+ .parse_qopt = ingress_parse_opt,
+ .print_qopt = ingress_print_opt,
};
diff --git a/tc/q_netem.c b/tc/q_netem.c
index d0306683..604c4df6 100644
--- a/tc/q_netem.c
+++ b/tc/q_netem.c
@@ -285,15 +285,9 @@ static int netem_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
-static int netem_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
struct qdisc_util netem_util = {
.id = "netem",
.parse_qopt = netem_parse_opt,
.print_qopt = netem_print_opt,
- .print_xstats = netem_print_xstats,
};
diff --git a/tc/q_prio.c b/tc/q_prio.c
index 3da12e4c..2f65740b 100644
--- a/tc/q_prio.c
+++ b/tc/q_prio.c
@@ -111,17 +111,9 @@ int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
-static int prio_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
-
struct qdisc_util prio_util = {
- NULL,
- "prio",
- prio_parse_opt,
- prio_print_opt,
- prio_print_xstats,
+ .id = "prio",
+ .parse_qopt = prio_parse_opt,
+ .print_qopt = prio_print_opt,
};
diff --git a/tc/q_red.c b/tc/q_red.c
index c156d47c..549b877b 100644
--- a/tc/q_red.c
+++ b/tc/q_red.c
@@ -214,9 +214,8 @@ static int red_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstat
struct qdisc_util red_util = {
- NULL,
- "red",
- red_parse_opt,
- red_print_opt,
- red_print_xstats,
+ .id = "red",
+ .parse_qopt = red_parse_opt,
+ .print_qopt = red_print_opt,
+ .print_xstats = red_print_xstats,
};
diff --git a/tc/q_sfq.c b/tc/q_sfq.c
index d7a3c0fa..21354e0c 100644
--- a/tc/q_sfq.c
+++ b/tc/q_sfq.c
@@ -100,16 +100,8 @@ static int sfq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
-static int sfq_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
-
struct qdisc_util sfq_util = {
- NULL,
- "sfq",
- sfq_parse_opt,
- sfq_print_opt,
- sfq_print_xstats,
+ .id = "sfq",
+ .parse_qopt = sfq_parse_opt,
+ .print_qopt = sfq_print_opt,
};
diff --git a/tc/q_tbf.c b/tc/q_tbf.c
index 01d514fb..707d874a 100644
--- a/tc/q_tbf.c
+++ b/tc/q_tbf.c
@@ -257,16 +257,9 @@ static int tbf_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
return 0;
}
-static int tbf_print_xstats(struct qdisc_util *qu, FILE *f, struct rtattr *xstats)
-{
- return 0;
-}
-
struct qdisc_util tbf_util = {
- NULL,
- "tbf",
- tbf_parse_opt,
- tbf_print_opt,
- tbf_print_xstats,
+ .id = "tbf",
+ .parse_qopt = tbf_parse_opt,
+ .print_qopt = tbf_print_opt,
};