mptcpd
Multipath TCP Daemon
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations
types.h File Reference

mptcpd user space path manager attribute types. More...

#include <stddef.h>
#include <inttypes.h>
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mptcpd_limit
 MPTCP resource type/limit pair. More...
 

Macros

#define MPTCPD_PRIxAID   PRIx8
 MPTCP address ID format specifier.
 

Typedefs

typedef uint32_t mptcpd_token_t
 MPTCP connection token type.
 
typedef uint8_t mptcpd_aid_t
 MPTCP address ID type.
 
typedef void(* mptcpd_kpm_get_addr_cb_t) (struct mptcpd_addr_info const *info, void *callback_data)
 Type of function called when an address is available.
 
typedef void(* mptcpd_complete_func_t) (void *user_data)
 Type of function called on asynchronous call completion.
 
typedef void(* mptcpd_pm_get_limits_cb) (struct mptcpd_limit const *limits, size_t len, void *callback_data)
 Type of function called when MPTCP resource limits are available.
 

Enumerations

enum  mptcpd_limit_types { MPTCPD_LIMIT_RCV_ADD_ADDRS , MPTCPD_LIMIT_SUBFLOWS }
 MPTCP resource limit type identifiers. More...
 

MPTCP Address Flags

Each MPTCP address flag is meant to be set as a bit in a mptcpd_flags_t variable as needed, e.g.:

#define MPTCPD_ADDR_FLAG_BACKUP
Set backup priority on the subflow.
Definition types.h:64
#define MPTCPD_ADDR_FLAG_SUBFLOW
Create a new subflow.
Definition types.h:61
uint32_t mptcpd_flags_t
MPTCP flags type.
Definition types.h:51
#define MPTCPD_ADDR_FLAG_SIGNAL   (1U << 0)
 Trigger announcement of a new local IP address.
 
#define MPTCPD_ADDR_FLAG_SUBFLOW   (1U << 1)
 Create a new subflow.
 
#define MPTCPD_ADDR_FLAG_BACKUP   (1U << 2)
 Set backup priority on the subflow.
 
#define MPTCPD_ADDR_FLAG_FULLMESH   (1U << 3)
 Add local address to in-kernel fullmesh path management.
 
typedef uint32_t mptcpd_flags_t
 MPTCP flags type.
 

Detailed Description

mptcpd user space path manager attribute types.

Copyright (c) 2018-2021, Intel Corporation

Macro Definition Documentation

◆ MPTCPD_ADDR_FLAG_FULLMESH

#define MPTCPD_ADDR_FLAG_FULLMESH   (1U << 3)

Add local address to in-kernel fullmesh path management.

If this flag is set, create a subflow connection to each known remote address, originating from this local address. The total number of subflows is subject to the configured limits.

Note
Do not use with MPTCPD_ADDR_FLAG_SIGNAL.

◆ MPTCPD_ADDR_FLAG_SIGNAL

#define MPTCPD_ADDR_FLAG_SIGNAL   (1U << 0)

Trigger announcement of a new local IP address.

Note
Do not use with MPTCPD_ADDR_FLAG_FULLMESH.

Typedef Documentation

◆ mptcpd_complete_func_t

typedef void(* mptcpd_complete_func_t) (void *user_data)

Type of function called on asynchronous call completion.

The mptcpd path manager API has several functions that complete asynchronously. Those functions accept a parameter of this type to allow the caller to be notified of completion of the asynchronous functions.

Functions of this type differ from user provided callbacks that are called when asynchronous results are available in that this type of function is called regardless of whether or not asynchronous results are available. Furthermore, they are only called once at the very end of the asynchronous call, whereas those called upon availability of results may be called multiple times for a single asynchronous call, such as the mptcpd_kpm_dump_addrs() case.

Functions of this type are suitable for deallocating dynamically allocated user_data passed to asynchronous calls, for example.

Parameters
[in,out]user_dataData provided the user at the time of the asynchronous call.

◆ mptcpd_flags_t

typedef uint32_t mptcpd_flags_t

MPTCP flags type.

MPTCP address flags integer type that contains set of flag bits.

◆ mptcpd_kpm_get_addr_cb_t

typedef void(* mptcpd_kpm_get_addr_cb_t) (struct mptcpd_addr_info const *info, void *callback_data)

Type of function called when an address is available.

The mptcpd path manager will call a function of this type when the result of calling mptcpd_kpm_get_addr() or mptcpd_kpm_dump_addrs() is available.

Parameters
[in]infoNetwork address information. NULL on error.
[in,out]callback_dataData provided by the caller of mptcpd_kpm_get_addr() or mptcpd_kpm_dump_addrs().

◆ mptcpd_pm_get_limits_cb

typedef void(* mptcpd_pm_get_limits_cb) (struct mptcpd_limit const *limits, size_t len, void *callback_data)

Type of function called when MPTCP resource limits are available.

The mptcpd path manager will call a function of this type when the result of calling mptcpd_kpm_get_limits() is available.

Parameters
[in]limitsArray of MPTCP resource type/limit pairs. NULL on error.
[in]lenLength of the limits array. Zero on error.
[in,out]callback_dataData provided by the caller of mptcpd_kpm_get_limits().

◆ mptcpd_token_t

typedef uint32_t mptcpd_token_t

MPTCP connection token type.

Todo:
These rely on MPTCP genl related implementation details in the kernel. Should we move these typedefs to <linux/mptcp.h>, e.g. 'typedef uint32_t mptcp_token_t'?

Enumeration Type Documentation

◆ mptcpd_limit_types

MPTCP resource limit type identifiers.

Enumerator
MPTCPD_LIMIT_RCV_ADD_ADDRS 

Maximum number of address advertisements to receive.

MPTCPD_LIMIT_SUBFLOWS 

Maximum number of subflows.