aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_ecn.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-10-22 01:25:23 -0400
committerDavid S. Miller <davem@davemloft.net>2011-10-22 01:25:23 -0400
commitb5d9c9c281395f0967c8d93f42e8b0b8175b5180 (patch)
tree81c6e038b5b11a60b3501508257dec516b92cc67 /include/net/inet_ecn.h
parent2c67e9acb65da96ae1b0ba93ec04af7142533bef (diff)
inet: add rfc 3168 extract in front of INET_ECN_encapsulate()
INET_ECN_encapsulate() is better understood if we can read the official statement. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_ecn.h')
-rw-r--r--include/net/inet_ecn.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h
index 2fa8d1341a0a..2fa14691869c 100644
--- a/include/net/inet_ecn.h
+++ b/include/net/inet_ecn.h
@@ -30,6 +30,14 @@ static inline int INET_ECN_is_capable(__u8 dsfield)
30 return dsfield & INET_ECN_ECT_0; 30 return dsfield & INET_ECN_ECT_0;
31} 31}
32 32
33/*
34 * RFC 3168 9.1.1
35 * The full-functionality option for ECN encapsulation is to copy the
36 * ECN codepoint of the inside header to the outside header on
37 * encapsulation if the inside header is not-ECT or ECT, and to set the
38 * ECN codepoint of the outside header to ECT(0) if the ECN codepoint of
39 * the inside header is CE.
40 */
33static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) 41static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)
34{ 42{
35 outer &= ~INET_ECN_MASK; 43 outer &= ~INET_ECN_MASK;