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.
#define | MPTCPD_NOTIFY_FLAG_EXISTING (1U << 0)
| Notify even the addresses already existing at startup-time.
#define | MPTCPD_NOTIFY_FLAG_SKIP_LL (1U << 1)
| Ignore link-local addresses.
#define | MPTCPD_NOTIFY_FLAG_SKIP_HOST (1U << 2)
| Ignore host (loopback) addresses.
#define | MPTCPD_NOTIFY_FLAG_ROUTE_CHECK (1U << 3)
| Notify address only if a default route is available from the given interface.

## Typedefs

typedef uint32_t | mptcpd_token_t
| MPTCP connection token type. More...
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. More...
typedef void(* | mptcpd_complete_func_t) (void *user_data)
| Type of function called on asynchronous call completion. More...
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. More...

## 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.:

mptcpd_flags_t flags =
MPTCPD_ADDR_FLAG_SUBFLOW | MPTCPD_ADDR_FLAG_BACKUP;
MPTCPD_ADDR_FLAG_BACKUP
#define MPTCPD_ADDR_FLAG_BACKUP
Set backup priority on the subflow.
Definition: types.h:60
MPTCPD_ADDR_FLAG_SUBFLOW
#define MPTCPD_ADDR_FLAG_SUBFLOW
Create a new subflow.
Definition: types.h:57
mptcpd_flags_t
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.
typedef uint32_t | mptcpd_flags_t
| MPTCP flags type. More...

## Detailed Description

mptcpd user space path manager attribute types.

Copyright (c) 2018-2021, Intel Corporation

## 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_data | Data 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] | info | Network address information. `NULL` on error.
  [in,out] | callback_data | Data 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] | limits | Array of MPTCP resource type/limit pairs. `NULL` on error.
  [in] | len | Length of the limits array. Zero on error.
  [in,out] | callback_data | Data 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

enum 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.