plugin.h
Go to the documentation of this file.
// SPDX-License-Identifier: BSD-3-Clause
#ifndef MPTCPD_PRIVATE_PLUGIN_H
#define MPTCPD_PRIVATE_PLUGIN_H
#include <stdbool.h>
#include <mptcpd/export.h>
#include <mptcpd/types.h>
#include <ell/queue.h>
#ifdef __cplusplus
extern "C" {
#endif
struct sockaddr;
struct mptcpd_pm;
struct mptcpd_interface;
MPTCPD_API bool mptcpd_plugin_load(char const *dir,
char const *default_name,
struct l_queue const *plugins_to_load,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_unload(struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_new_connection(
char const *name,
mptcpd_token_t token,
struct sockaddr const *laddr,
struct sockaddr const *raddr,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_connection_established(
mptcpd_token_t token,
struct sockaddr const *laddr,
struct sockaddr const *raddr,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_connection_closed(
mptcpd_token_t token,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_new_address(mptcpd_token_t token,
mptcpd_aid_t id,
struct sockaddr const *addr,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_address_removed(mptcpd_token_t token,
mptcpd_aid_t id,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_new_subflow(
mptcpd_token_t token,
struct sockaddr const *laddr,
struct sockaddr const *raddr,
bool backup,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_subflow_closed(
mptcpd_token_t token,
struct sockaddr const *laddr,
struct sockaddr const *raddr,
bool backup,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_subflow_priority(
mptcpd_token_t token,
struct sockaddr const *laddr,
struct sockaddr const *raddr,
bool backup,
struct mptcpd_pm *pm);
MPTCPD_API void mptcpd_plugin_new_interface(
struct mptcpd_interface const *i,
void *pm);
MPTCPD_API void mptcpd_plugin_update_interface(
struct mptcpd_interface const *i,
void *pm);
MPTCPD_API void mptcpd_plugin_delete_interface(
struct mptcpd_interface const *i,
void *pm);
MPTCPD_API void mptcpd_plugin_new_local_address(
struct mptcpd_interface const *i,
struct sockaddr const *sa,
void *pm);
MPTCPD_API void mptcpd_plugin_delete_local_address(
struct mptcpd_interface const *i,
struct sockaddr const *sa,
void *pm);
#ifdef __cplusplus
}
#endif
#endif // MPTCPD_PRIVATE_PLUGIN_H
/*
Local Variables:
c-file-style: "linux"
End:
*/
export.h
mptcpd shared library symbol export/import macros.
mptcpd_plugin_new_interface
MPTCPD_API void mptcpd_plugin_new_interface(struct mptcpd_interface const *i, void *pm)
Notify plugin of new network interface.
Definition: plugin.c:781
mptcpd_plugin_new_local_address
MPTCPD_API void mptcpd_plugin_new_local_address(struct mptcpd_interface const *i, struct sockaddr const *sa, void *pm)
Notify plugin of new network address.
Definition: plugin.c:814
mptcpd_plugin_new_subflow
MPTCPD_API void mptcpd_plugin_new_subflow(mptcpd_token_t token, struct sockaddr const *laddr, struct sockaddr const *raddr, bool backup, struct mptcpd_pm *pm)
Notify plugin that a peer has joined the MPTCP connection.
Definition: plugin.c:635
mptcpd_plugin_new_connection
MPTCPD_API void mptcpd_plugin_new_connection(char const *name, mptcpd_token_t token, struct sockaddr const *laddr, struct sockaddr const *raddr, struct mptcpd_pm *pm)
Notify plugin of new MPTCP connection pending completion.
Definition: plugin.c:576
mptcpd_plugin_subflow_priority
MPTCPD_API void mptcpd_plugin_subflow_priority(mptcpd_token_t token, struct sockaddr const *laddr, struct sockaddr const *raddr, bool backup, struct mptcpd_pm *pm)
Notify plugin of MPTCP subflow priority change.
Definition: plugin.c:660
mptcpd_plugin_delete_local_address
MPTCPD_API void mptcpd_plugin_delete_local_address(struct mptcpd_interface const *i, struct sockaddr const *sa, void *pm)
Notify plugin of removed network address.
Definition: plugin.c:827
mptcpd_plugin_load
MPTCPD_API bool mptcpd_plugin_load(char const *dir, char const *default_name, struct l_queue const *plugins_to_load, struct mptcpd_pm *pm)
Load mptcpd plugins.
Definition: plugin.c:433
mptcpd_plugin_unload
MPTCPD_API void mptcpd_plugin_unload(struct mptcpd_pm *pm)
Unload mptcpd plugins.
Definition: plugin.c:502
mptcpd_plugin_update_interface
MPTCPD_API void mptcpd_plugin_update_interface(struct mptcpd_interface const *i, void *pm)
Notify plugin of updated network interface.
Definition: plugin.c:792
mptcpd_plugin_address_removed
MPTCPD_API void mptcpd_plugin_address_removed(mptcpd_token_t token, mptcpd_aid_t id, struct mptcpd_pm *pm)
Notify plugin of address no longer advertised by a peer.
Definition: plugin.c:625
mptcpd_plugin_connection_established
MPTCPD_API void mptcpd_plugin_connection_established(mptcpd_token_t token, struct sockaddr const *laddr, struct sockaddr const *raddr, struct mptcpd_pm *pm)
Notify plugin of MPTCP connection completion.
Definition: plugin.c:594
mptcpd_plugin_delete_interface
MPTCPD_API void mptcpd_plugin_delete_interface(struct mptcpd_interface const *i, void *pm)
Notify plugin of removed network interface.
Definition: plugin.c:803
mptcpd_plugin_new_address
MPTCPD_API void mptcpd_plugin_new_address(mptcpd_token_t token, mptcpd_aid_t id, struct sockaddr const *addr, struct mptcpd_pm *pm)
Notify plugin of new address advertised by a peer.
Definition: plugin.c:614
mptcpd_plugin_subflow_closed
MPTCPD_API void mptcpd_plugin_subflow_closed(mptcpd_token_t token, struct sockaddr const *laddr, struct sockaddr const *raddr, bool backup, struct mptcpd_pm *pm)
Notify plugin of MPTCP subflow closure.
Definition: plugin.c:647
mptcpd_plugin_connection_closed
MPTCPD_API void mptcpd_plugin_connection_closed(mptcpd_token_t token, struct mptcpd_pm *pm)
Notify plugin of MPTCP connection closure.
Definition: plugin.c:605
mptcpd_interface
Network interface-specific information.
Definition: network_monitor.h:30
mptcpd_interface::name
char name[IF_NAMESIZE]
Network interface name.
Definition: network_monitor.h:67
mptcpd_pm
Data needed to run the path manager.
Definition: path_manager.h:43
types.h
mptcpd user space path manager attribute types.
mptcpd_token_t
uint32_t mptcpd_token_t
MPTCP connection token type.
Definition: types.h:26
mptcpd_aid_t
uint8_t mptcpd_aid_t
MPTCP address ID type.
Definition: types.h:29