mptcpd
Multipath TCP Daemon
Loading...
Searching...
No Matches
Functions
listener_manager.h File Reference

Map of MPTCP local address to listener. More...

#include <stdbool.h>
#include <mptcpd/export.h>
Include dependency graph for listener_manager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

MPTCPD_API int mptcpd_lm_listen (struct mptcpd_lm *lm, struct sockaddr *sa)
 Listen on the given MPTCP local address.
 
MPTCPD_API int mptcpd_lm_close (struct mptcpd_lm *lm, struct sockaddr const *sa)
 Stop listening on a MPTCP local address.
 

Detailed Description

Map of MPTCP local address to listener.

Copyright (c) 2022, Intel Corporation

Function Documentation

◆ mptcpd_lm_close()

MPTCPD_API int mptcpd_lm_close ( struct mptcpd_lm lm,
struct sockaddr const *  sa 
)

Stop listening on a MPTCP local address.

Parameters
[in]lmThe mptcpd address listener manager object.
[in]saThe MPTCP local address with a non-zero port, such as the one assigned by mptcpd_lm_listen(), i.e. the non-zero port provided by the user or the ephemeral port chosen by the kernel.
Returns
0 if operation was successful. -1 or errno otherwise.

◆ mptcpd_lm_listen()

MPTCPD_API int mptcpd_lm_listen ( struct mptcpd_lm lm,
struct sockaddr *  sa 
)

Listen on the given MPTCP local address.

Create a MPTCP listening socket for the given local address. This is needed to accept subflows, e.g. during a MP_JOIN operation.

Parameters
[in]lmThe mptcpd address listener manager object.
[in,out]saThe MPTCP local address. If the port is zero an ephemeral port will be chosen, and assigned to the appropriate underlying address family-specific port member, e.g. sin_port or sin6_port. The port will be in network byte order.
Returns
0 if operation was successful. -1 or errno otherwise.