patch-2.2.4 linux/include/net/pkt_cls.h

Next file: linux/include/net/pkt_sched.h
Previous file: linux/include/net/neighbour.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.3/linux/include/net/pkt_cls.h linux/include/net/pkt_cls.h
@@ -50,7 +50,7 @@
 
 	unsigned long		(*get)(struct tcf_proto*, u32 handle);
 	void			(*put)(struct tcf_proto*, unsigned long);
-	int			(*change)(struct tcf_proto*, u32 handle, struct rtattr **, unsigned long *);
+	int			(*change)(struct tcf_proto*, unsigned long, u32 handle, struct rtattr **, unsigned long *);
 	int			(*delete)(struct tcf_proto*, unsigned long);
 	void			(*walk)(struct tcf_proto*, struct tcf_walker *arg);
 
@@ -75,6 +75,14 @@
 			return err;
 	}
 	return -1;
+}
+
+extern __inline__ unsigned long cls_set_class(unsigned long *clp, unsigned long cl)
+{
+	net_serialize_enter();
+	cl = xchg(clp, cl);
+	net_serialize_leave();
+	return cl;
 }
 
 extern int register_tcf_proto_ops(struct tcf_proto_ops *ops);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)