mptcp: add pm listener events
This patch adds two new MPTCP netlink event types for PM listening socket create and close, named MPTCP_EVENT_LISTENER_CREATED and MPTCP_EVENT_LISTENER_CLOSED. Add a new function mptcp_event_pm_listener() to push the new events with family, port and addr to userspace. Invoke mptcp_event_pm_listener() with MPTCP_EVENT_LISTENER_CREATED in mptcp_listen() and mptcp_pm_nl_create_listen_socket(), invoke it with MPTCP_EVENT_LISTENER_CLOSED in __mptcp_close_ssk(). Signed-off-by: Geliang Tang <geliang.tang@suse.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5f17f8e315
commit
f8c9dfbd87
4 changed files with 71 additions and 0 deletions
|
|
@ -160,6 +160,12 @@ struct mptcp_info {
|
|||
* daddr4 | daddr6, sport, dport, backup, if_idx
|
||||
* [, error]
|
||||
* The priority of a subflow has changed. 'error' should not be set.
|
||||
*
|
||||
* MPTCP_EVENT_LISTENER_CREATED: family, sport, saddr4 | saddr6
|
||||
* A new PM listener is created.
|
||||
*
|
||||
* MPTCP_EVENT_LISTENER_CLOSED: family, sport, saddr4 | saddr6
|
||||
* A PM listener is closed.
|
||||
*/
|
||||
enum mptcp_event_type {
|
||||
MPTCP_EVENT_UNSPEC = 0,
|
||||
|
|
@ -174,6 +180,9 @@ enum mptcp_event_type {
|
|||
MPTCP_EVENT_SUB_CLOSED = 11,
|
||||
|
||||
MPTCP_EVENT_SUB_PRIORITY = 13,
|
||||
|
||||
MPTCP_EVENT_LISTENER_CREATED = 15,
|
||||
MPTCP_EVENT_LISTENER_CLOSED = 16,
|
||||
};
|
||||
|
||||
enum mptcp_event_attr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue