mptcpd
Multipath TCP Daemon
|
Map of MPTCP local address ID to listener. More...
#include <assert.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <ell/ell.h>
#include <mptcpd/private/murmur_hash.h>
#include <mptcpd/private/listener_manager.h>
#include <mptcpd/listener_manager.h>
#include "hash_sockaddr.h"
Classes | |
struct | mptcpd_lm |
Internal mptcpd listern manager data. More... | |
struct | lm_value |
mptcpd listener map entry value. More... | |
struct | key_in |
Bundle IPv4 address and port as a hash key. More... | |
struct | key_in6 |
Bundle IPv6 address and port as a hash key. More... | |
Macros | |
#define | IPPROTO_MPTCP IPPROTO_TCP + 256 |
Functions | |
struct mptcpd_lm * | mptcpd_lm_create (void) |
Create a MPTCP listener manager. | |
void | mptcpd_lm_destroy (struct mptcpd_lm *lm) |
Destroy MPTCP listener manager. | |
int | mptcpd_lm_listen (struct mptcpd_lm *lm, struct sockaddr *sa) |
Listen on the given MPTCP local address. | |
int | mptcpd_lm_close (struct mptcpd_lm *lm, struct sockaddr const *sa) |
Stop listening on a MPTCP local address. | |
Map of MPTCP local address ID to listener.
Copyright (c) 2022, Intel Corporation
int mptcpd_lm_close | ( | struct mptcpd_lm * | lm, |
struct sockaddr const * | sa | ||
) |
Stop listening on a MPTCP local address.
[in] | lm | The mptcpd address listener manager object. |
[in] | sa | The 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. |
0
if operation was successful. -1 or errno
otherwise. struct mptcpd_lm * mptcpd_lm_create | ( | void | ) |
Create a MPTCP listener manager.
NULL
on failure. void mptcpd_lm_destroy | ( | struct mptcpd_lm * | lm | ) |
Destroy MPTCP listener manager.
[in,out] | lm | The mptcpd address listener manager object. |
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.
[in] | lm | The mptcpd address listener manager object. |
[in,out] | sa | The 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. |
0
if operation was successful. -1 or errno
otherwise.