mptcpd_kpm_cmd_ops Struct Reference

Kernel-side MPTCP path management netlink commands. More...

`#include <path_manager.h>`

## Private Attributes

int(* | add_addr )(struct mptcpd_pm *pm, struct sockaddr const *addr, mptcpd_aid_t id, uint32_t flags, int index)
| Advertise new network address to peers. More...
int(* | remove_addr )(struct mptcpd_pm *pm, mptcpd_aid_t address_id)
| Stop advertising network address to peers. More...
Server-oriented Path Management Commands
Server-oriented path management commands supported by the upstream Linux kernel. Path management is handled by the kernel.
int(* | get_addr )(struct mptcpd_pm *pm, mptcpd_aid_t id, mptcpd_kpm_get_addr_cb_t callback, void *data, mptcpd_complete_func_t complete)
| Get network address corresponding to an address ID. More...
int(* | dump_addrs )(struct mptcpd_pm *pm, mptcpd_kpm_get_addr_cb_t callback, void *data, mptcpd_complete_func_t complete)
| Dump list of network addresses. More...
int(* | flush_addrs )(struct mptcpd_pm *pm)
| Flush MPTCP addresses. More...
int(* | set_limits )(struct mptcpd_pm *pm, struct mptcpd_limit const *limits, size_t len)
| Set MPTCP resource limits. More...
int(* | get_limits )(struct mptcpd_pm *pm, mptcpd_pm_get_limits_cb callback, void *data)
| Get MPTCP resource limits. More...
int(* | set_flags )(struct mptcpd_pm *pm, struct sockaddr const *addr, mptcpd_flags_t flags)
| Set MPTCP flags for a local IP address. More...

## Detailed Description

Kernel-side MPTCP path management netlink commands.

The set of functions that implement MPTCP path management generic netlink command calls for the in-kernel path manager.

## Member Data Documentation

## add_addr

int(* mptcpd_kpm_cmd_ops::add_addr) (struct mptcpd_pm *pm, struct sockaddr const *addr, mptcpd_aid_t id, uint32_t flags, int index)

private

Advertise new network address to peers.

Parameters

  [in] | pm | The mptcpd path manager object.
  [in] | addr | Local IP address and port to be advertised through the MPTCP protocol `ADD_ADDR` option. The port is optional, and is ignored if it is zero.
  [in] | id | MPTCP local address ID.
  [in] | flags |
  [in] | index | Network interface index (optional).

Returns
  `0` if operation was successful. -1 or `errno` otherwise.

## dump_addrs

int(* mptcpd_kpm_cmd_ops::dump_addrs) (struct mptcpd_pm *pm, mptcpd_kpm_get_addr_cb_t callback, void *data, mptcpd_complete_func_t complete)

private

Dump list of network addresses.

Parameters

  [in] | pm | The mptcpd path manager object.
  [in] | callback | Function to be called when a dump of network addresses has been retrieved. This function will be called when each address dump is available, or possibly not at all.
  [in] | data | Data to be passed to the callback function.
  [in] | complete | Function called when the asynchronous `dump_addrs` call completes.

Returns
  `0` if operation was successful. -1 or `errno` otherwise.

## flush_addrs

int(* mptcpd_kpm_cmd_ops::flush_addrs) (struct mptcpd_pm *pm)

private

Flush MPTCP addresses.

Purge all MPTCP addresses.

Parameters

  [in] | pm | The mptcpd path manager object.

Returns
  `0` if operation was successful. -1 or `errno` otherwise.

## get_addr

int(* mptcpd_kpm_cmd_ops::get_addr) (struct mptcpd_pm *pm, mptcpd_aid_t id, mptcpd_kpm_get_addr_cb_t callback, void *data, mptcpd_complete_func_t complete)

private

Get network address corresponding to an address ID.

Parameters

  [in] | pm | The mptcpd path manager object.
  [in] | id | MPTCP local address ID.
  [in] | callback | Function to be called when the network address corresponding to the given MPTCP address id has been retrieved.
  [in] | data | Data to be passed to the callback function.
  [in] | complete | Function called when the asynchronous `get_addr` call completes.

Returns
  `0` if operation was successful. -1 or `errno` otherwise.

## get_limits

int(* mptcpd_kpm_cmd_ops::get_limits) (struct mptcpd_pm *pm, mptcpd_pm_get_limits_cb callback, void *data)

private

Get MPTCP resource limits.

Parameters

  [in] | pm | The mptcpd path manager object.
  [in] | callback | Function to be called when the MPTCP resource limits have been retrieved.
  [in] | data | Data to be passed to the callback function.

Returns
  `0` if operation was successful. -1 or `errno` otherwise.

## remove_addr

int(* mptcpd_kpm_cmd_ops::remove_addr) (struct mptcpd_pm *pm, mptcpd_aid_t address_id)

private

Stop advertising network address to peers.

Parameters

  [in] | pm | The mptcpd path manager object.
  [in] | address_id | MPTCP local address ID.

Returns
  `0` if operation was successful. -1 or `errno` otherwise.

## set_flags

int(* mptcpd_kpm_cmd_ops::set_flags) (struct mptcpd_pm *pm, struct sockaddr const *addr, mptcpd_flags_t flags)

private

Set MPTCP flags for a local IP address.

Parameters

  [in] | pm | The mptcpd path manager object.
  [in] | addr | Local IP address information.
  [in] | flags | Flags to be associated with addr.

Returns
  `0` if operation was successful. -1 or `errno` otherwise.

## set_limits

int(* mptcpd_kpm_cmd_ops::set_limits) (struct mptcpd_pm *pm, struct mptcpd_limit const *limits, size_t len)

private

Set MPTCP resource limits.

Parameters

  [in] | pm | The mptcpd path manager object.
  [in] | limits | Array of MPTCP resource type/limit pairs.
  [in] | len | Length of the limits array.

Returns
  `0` if operation was successful. -1 or `errno` otherwise.

The documentation for this struct was generated from the following file:

- include/mptcpd/private/path_manager.h