ip: Add offset parameter to ip_cmsg_recv
authorTom Herbert <therbert@google.com>
Mon, 5 Jan 2015 21:56:17 +0000 (13:56 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jan 2015 03:44:46 +0000 (22:44 -0500)
Add ip_cmsg_recv_offset function which takes an offset argument
that indicates the starting offset in skb where data is being received
from. This will be useful in the case of UDP and provided checksum
to user space.

ip_cmsg_recv is an inline call to ip_cmsg_recv_offset with offset of
zero.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_sock.h
include/uapi/linux/in.h
net/ipv4/ip_sockglue.c
net/ipv4/udp.c

index 605ca42..eb16c7b 100644 (file)
@@ -203,6 +203,7 @@ struct inet_sock {
 #define IP_CMSG_RETOPTS                BIT(4)
 #define IP_CMSG_PASSSEC                BIT(5)
 #define IP_CMSG_ORIGDSTADDR    BIT(6)
+#define IP_CMSG_CHECKSUM       BIT(7)
 
 static inline struct inet_sock *inet_sk(const struct sock *sk)
 {
Simple merge
Simple merge
diff --cc net/ipv4/udp.c
Simple merge