diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-29 14:09:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-29 22:10:39 +0200 |
commit | c0425a4249e9d313eec5f81c0bde8a286ebf9a63 (patch) | |
tree | dbe8e82ca86e471956cef038764adb299270b0ef /include/net/sock.h | |
parent | sctp: refactor sctp_setsockopt_bindx (diff) | |
download | linux-c0425a4249e9d313eec5f81c0bde8a286ebf9a63.tar.xz linux-c0425a4249e9d313eec5f81c0bde8a286ebf9a63.zip |
net: add a new bind_add method
The SCTP protocol allows to bind multiple address to a socket. That
feature is currently only exposed as a socket option. Add a bind_add
method struct proto that allows to bind additional addresses, and
switch the dlm code to use the method instead of going through the
socket option from kernel space.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index d994daa418ec..6e9f713a7860 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1156,7 +1156,9 @@ struct proto { int (*sendpage)(struct sock *sk, struct page *page, int offset, size_t size, int flags); int (*bind)(struct sock *sk, - struct sockaddr *uaddr, int addr_len); + struct sockaddr *addr, int addr_len); + int (*bind_add)(struct sock *sk, + struct sockaddr *addr, int addr_len); int (*backlog_rcv) (struct sock *sk, struct sk_buff *skb); @@ -2698,4 +2700,6 @@ void sock_set_reuseaddr(struct sock *sk); void sock_set_reuseport(struct sock *sk); void sock_set_sndtimeo(struct sock *sk, s64 secs); +int sock_bind_add(struct sock *sk, struct sockaddr *addr, int addr_len); + #endif /* _SOCK_H */ |