From 1e90474c377e92db7262a8968a45c1dd980ca9e5 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 22 Jan 2008 22:11:17 -0800 Subject: [NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API Convert packet schedulers to use the netlink API. Unfortunately a gradual conversion is not possible without breaking compilation in the middle or adding lots of casts, so this patch converts them all in one step. The patch has been mostly generated automatically with some minor edits to at least allow seperate conversion of classifiers and actions. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- net/sched/sch_ingress.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'net/sched/sch_ingress.c') diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c index 72525710b66f..f6decbb56645 100644 --- a/net/sched/sch_ingress.c +++ b/net/sched/sch_ingress.c @@ -57,7 +57,7 @@ static void ingress_put(struct Qdisc *sch, unsigned long cl) } static int ingress_change(struct Qdisc *sch, u32 classid, u32 parent, - struct rtattr **tca, unsigned long *arg) + struct nlattr **tca, unsigned long *arg) { return 0; } @@ -156,7 +156,7 @@ static struct nf_hook_ops ing_ops[] __read_mostly = { }; #endif -static int ingress_init(struct Qdisc *sch, struct rtattr *opt) +static int ingress_init(struct Qdisc *sch, struct nlattr *opt) { #if !defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NETFILTER) printk("Ingress scheduler: Classifier actions prefered over netfilter\n"); @@ -184,14 +184,14 @@ static void ingress_destroy(struct Qdisc *sch) static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb) { unsigned char *b = skb_tail_pointer(skb); - struct rtattr *rta; + struct nlattr *nla; - rta = (struct rtattr *)b; - RTA_PUT(skb, TCA_OPTIONS, 0, NULL); - rta->rta_len = skb_tail_pointer(skb) - b; + nla = (struct nlattr *)b; + NLA_PUT(skb, TCA_OPTIONS, 0, NULL); + nla->nla_len = skb_tail_pointer(skb) - b; return skb->len; -rtattr_failure: +nla_put_failure: nlmsg_trim(skb, b); return -1; } -- cgit v1.2.3-59-g8ed1b