diff options
author | Willem de Bruijn <willemb@google.com> | 2016-04-03 05:08:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-04 21:50:29 +0200 |
commit | 39771b127b412377d6354893c7d43ee8f2edecfd (patch) | |
tree | 065ed6db2e28f348f03feef14869503150547cdd /include/net/sock.h | |
parent | Merge branch 'stmmac-GMAC4.x' (diff) | |
download | linux-39771b127b412377d6354893c7d43ee8f2edecfd.tar.xz linux-39771b127b412377d6354893c7d43ee8f2edecfd.zip |
sock: break up sock_cmsg_snd into __sock_cmsg_snd and loop
To process cmsg's of the SOL_SOCKET level in addition to
cmsgs of another level, protocols can call sock_cmsg_send().
This causes a double walk on the cmsghdr list, one for SOL_SOCKET
and one for the other level.
Extract the inner demultiplex logic from the loop that walks the list,
to allow having this called directly from a walker in the protocol
specific code.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 255d3e03727b..03772d4b06e6 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1420,6 +1420,8 @@ struct sockcm_cookie { u32 mark; }; +int __sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct cmsghdr *cmsg, + struct sockcm_cookie *sockc); int sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct sockcm_cookie *sockc); |