diff options
author | Francesco Fusco <ffusco@redhat.com> | 2013-09-24 15:43:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-28 15:21:51 -0700 |
commit | f02db315b8d888570cb0d4496cfbb7e4acb047cb (patch) | |
tree | e7ab8fcd05f0ba442a6eb3914ff4c894611a97a6 /include/net/ip.h | |
parent | f0e28d48c8641beac1239e484383c2b4764b1f02 (diff) | |
download | lwn-f02db315b8d888570cb0d4496cfbb7e4acb047cb.tar.gz lwn-f02db315b8d888570cb0d4496cfbb7e4acb047cb.zip |
ipv4: IP_TOS and IP_TTL can be specified as ancillary data
This patch enables the IP_TTL and IP_TOS values passed from userspace to
be stored in the ipcm_cookie struct. Three fields are added to the struct:
- the TTL, expressed as __u8.
The allowed values are in the [1-255].
A value of 0 means that the TTL is not specified.
- the TOS, expressed as __s16.
The allowed values are in the range [0,255].
A value of -1 means that the TOS is not specified.
- the priority, expressed as a char and computed when
handling the ancillary data.
Signed-off-by: Francesco Fusco <ffusco@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index c1f192b8cd0e..0135f3823e66 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -56,6 +56,9 @@ struct ipcm_cookie { int oif; struct ip_options_rcu *opt; __u8 tx_flags; + __u8 ttl; + __s16 tos; + char priority; }; #define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb)) |