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

Map of network address to MPTCP address ID. More...

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

Go to the source code of this file.

Functions

MPTCPD_API struct mptcpd_idmmptcpd_idm_create (void)
 Create MPTCP address ID manager.
 
MPTCPD_API void mptcpd_idm_destroy (struct mptcpd_idm *idm)
 Destroy MPTCP address ID manager.
 
MPTCPD_API mptcpd_aid_t mptcpd_idm_get_id (struct mptcpd_idm *idm, struct sockaddr const *sa)
 Get MPTCP address ID.
 
MPTCPD_API mptcpd_aid_t mptcpd_idm_remove_id (struct mptcpd_idm *idm, struct sockaddr const *sa)
 Remove MPTCP address ID.
 

Detailed Description

Map of network address to MPTCP address ID.

Copyright (c) 2020, Intel Corporation

Function Documentation

◆ mptcpd_idm_create()

MPTCPD_API struct mptcpd_idm * mptcpd_idm_create ( void  )

Create MPTCP address ID manager.

Returns
Pointer to MPTCP address ID manager on success. NULL on failure.

◆ mptcpd_idm_destroy()

MPTCPD_API void mptcpd_idm_destroy ( struct mptcpd_idm idm)

Destroy MPTCP address ID manager.

Parameters
[in,out]idmThe mptcpd address ID manager object.

◆ mptcpd_idm_get_id()

MPTCPD_API mptcpd_aid_t mptcpd_idm_get_id ( struct mptcpd_idm idm,
struct sockaddr const *  sa 
)

Get MPTCP address ID.

Map an IP address to a MPTCP address ID, and return that ID.

Parameters
[in]idmThe mptcpd address ID manager object.
[in]saIP address information.
Returns
MPTCP address ID associated with the address sa, or zero on error.

◆ mptcpd_idm_remove_id()

MPTCPD_API mptcpd_aid_t mptcpd_idm_remove_id ( struct mptcpd_idm idm,
struct sockaddr const *  sa 
)

Remove MPTCP address ID.

Stop associating the MPTCP address ID with the given IP address.

Parameters
[in]idmThe mptcpd address ID manager object.
[in]saIP address information.
Returns
MPTCP address ID that was removed, or zero if no such ID is associated with the IP address sa. Zero will also be returned if either of the arguments are NULL.