mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
f0e28d48c8
commit
f02db315b8
2 changed files with 22 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue