diff options
author | Francesco Fusco <ffusco@redhat.com> | 2013-09-24 09:43:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-28 18:21:52 -0400 |
commit | aa6615814533c634190019ee3a5b10490026d545 (patch) | |
tree | 08543d020bd7e2500046143440d58cd031f9754c /include/net/inet_sock.h | |
parent | f02db315b8d888570cb0d4496cfbb7e4acb047cb (diff) |
ipv4: processing ancillary IP_TOS or IP_TTL
If IP_TOS or IP_TTL are specified as ancillary data, then sendmsg() sends out
packets with the specified TTL or TOS overriding the socket values specified
with the traditional setsockopt().
The struct inet_cork stores the values of TOS, TTL and priority that are
passed through the struct ipcm_cookie. If there are user-specified TOS
(tos != -1) or TTL (ttl != 0) in the struct ipcm_cookie, these values are
used to override the per-socket values. In case of TOS also the priority
is changed accordingly.
Two helper functions get_rttos and get_rtconn_flags are defined to take
into account the presence of a user specified TOS value when computing
RT_TOS and RT_CONN_FLAGS.
Signed-off-by: Francesco Fusco <ffusco@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_sock.h')
-rw-r--r-- | include/net/inet_sock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 636d203727a2..f3141773c14d 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -103,6 +103,9 @@ struct inet_cork { | |||
103 | int length; /* Total length of all frames */ | 103 | int length; /* Total length of all frames */ |
104 | struct dst_entry *dst; | 104 | struct dst_entry *dst; |
105 | u8 tx_flags; | 105 | u8 tx_flags; |
106 | __u8 ttl; | ||
107 | __s16 tos; | ||
108 | char priority; | ||
106 | }; | 109 | }; |
107 | 110 | ||
108 | struct inet_cork_full { | 111 | struct inet_cork_full { |