diff options
author | Grégoire Baron <baronchon@n7mm.org> | 2010-08-18 09:10:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-20 04:42:59 -0400 |
commit | eb4d40654505e47aa9d2035bb97f631fa61d14b4 (patch) | |
tree | bed2a1c5026e9797c0ed48c67c48b050e7f07e3c /include/net | |
parent | 49e8ab03ebcacd8e37660ffec20c0c46721a2800 (diff) |
net/sched: add ACT_CSUM action to update packets checksums
net/sched: add ACT_CSUM action to update packets checksums
ACT_CSUM can be called just after ACT_PEDIT in order to re-compute some
altered checksums in IPv4 and IPv6 packets. The following checksums are
supported by this patch:
- IPv4: IPv4 header, ICMP, IGMP, TCP, UDP & UDPLite
- IPv6: ICMPv6, TCP, UDP & UDPLite
It's possible to request in the same action to update different kind of
checksums, if the packets flow mix TCP, UDP and UDPLite, ...
An example of usage is done in the associated iproute2 patch.
Version 3 changes:
- remove useless goto instructions
- improve IPv6 hop options decoding
Version 2 changes:
- coding style correction
- remove useless arguments of some functions
- use stack in tcf_csum_dump()
- add tcf_csum_skb_nextlayer() to factor code
Signed-off-by: Gregoire Baron <baronchon@n7mm.org>
Acked-by: jamal <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/tc_act/tc_csum.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/tc_act/tc_csum.h b/include/net/tc_act/tc_csum.h new file mode 100644 index 000000000000..9e8710be7a04 --- /dev/null +++ b/include/net/tc_act/tc_csum.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef __NET_TC_CSUM_H | ||
2 | #define __NET_TC_CSUM_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <net/act_api.h> | ||
6 | |||
7 | struct tcf_csum { | ||
8 | struct tcf_common common; | ||
9 | |||
10 | u32 update_flags; | ||
11 | }; | ||
12 | #define to_tcf_csum(pc) \ | ||
13 | container_of(pc,struct tcf_csum,common) | ||
14 | |||
15 | #endif /* __NET_TC_CSUM_H */ | ||