mptcpd
Multipath TCP Daemon
plugin.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
10#ifndef MPTCPD_PRIVATE_PLUGIN_H
11#define MPTCPD_PRIVATE_PLUGIN_H
12
13#include <stdbool.h>
14
15#include <mptcpd/export.h>
16#include <mptcpd/types.h>
17#include <ell/queue.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23struct sockaddr;
24struct mptcpd_pm;
25struct mptcpd_interface;
26
31
43MPTCPD_API bool mptcpd_plugin_load(char const *dir,
44 char const *default_name,
45 struct l_queue const *plugins_to_load,
46 struct mptcpd_pm *pm);
47
53MPTCPD_API void mptcpd_plugin_unload(struct mptcpd_pm *pm);
54
64MPTCPD_API void mptcpd_plugin_new_connection(
65 char const *name,
66 mptcpd_token_t token,
67 struct sockaddr const *laddr,
68 struct sockaddr const *raddr,
69 struct mptcpd_pm *pm);
70
80 mptcpd_token_t token,
81 struct sockaddr const *laddr,
82 struct sockaddr const *raddr,
83 struct mptcpd_pm *pm);
84
92 mptcpd_token_t token,
93 struct mptcpd_pm *pm);
94
103MPTCPD_API void mptcpd_plugin_new_address(mptcpd_token_t token,
104 mptcpd_aid_t id,
105 struct sockaddr const *addr,
106 struct mptcpd_pm *pm);
107
116 mptcpd_aid_t id,
117 struct mptcpd_pm *pm);
118
128MPTCPD_API void mptcpd_plugin_new_subflow(
129 mptcpd_token_t token,
130 struct sockaddr const *laddr,
131 struct sockaddr const *raddr,
132 bool backup,
133 struct mptcpd_pm *pm);
134
144MPTCPD_API void mptcpd_plugin_subflow_closed(
145 mptcpd_token_t token,
146 struct sockaddr const *laddr,
147 struct sockaddr const *raddr,
148 bool backup,
149 struct mptcpd_pm *pm);
150
160MPTCPD_API void mptcpd_plugin_subflow_priority(
161 mptcpd_token_t token,
162 struct sockaddr const *laddr,
163 struct sockaddr const *raddr,
164 bool backup,
165 struct mptcpd_pm *pm);
167
177
183MPTCPD_API void mptcpd_plugin_new_interface(
184 struct mptcpd_interface const *i,
185 void *pm);
186
193MPTCPD_API void mptcpd_plugin_update_interface(
194 struct mptcpd_interface const *i,
195 void *pm);
196
203MPTCPD_API void mptcpd_plugin_delete_interface(
204 struct mptcpd_interface const *i,
205 void *pm);
206
214MPTCPD_API void mptcpd_plugin_new_local_address(
215 struct mptcpd_interface const *i,
216 struct sockaddr const *sa,
217 void *pm);
218
227 struct mptcpd_interface const *i,
228 struct sockaddr const *sa,
229 void *pm);
231
232
233#ifdef __cplusplus
234}
235#endif
236
237#endif // MPTCPD_PRIVATE_PLUGIN_H
238
239
240/*
241 Local Variables:
242 c-file-style: "linux"
243 End:
244*/
mptcpd shared library symbol export/import macros.
MPTCPD_API void mptcpd_plugin_new_interface(struct mptcpd_interface const *i, void *pm)
Notify plugin of new network interface.
Definition: plugin.c:784
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:817
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:638
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:579
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:663
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:830
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:436
MPTCPD_API void mptcpd_plugin_unload(struct mptcpd_pm *pm)
Unload mptcpd plugins.
Definition: plugin.c:505
MPTCPD_API void mptcpd_plugin_update_interface(struct mptcpd_interface const *i, void *pm)
Notify plugin of updated network interface.
Definition: plugin.c:795
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:628
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:597
MPTCPD_API void mptcpd_plugin_delete_interface(struct mptcpd_interface const *i, void *pm)
Notify plugin of removed network interface.
Definition: plugin.c:806
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:617
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:650
MPTCPD_API void mptcpd_plugin_connection_closed(mptcpd_token_t token, struct mptcpd_pm *pm)
Notify plugin of MPTCP connection closure.
Definition: plugin.c:608
Network interface-specific information.
Definition: network_monitor.h:30
char name[IF_NAMESIZE]
Network interface name.
Definition: network_monitor.h:67
Data needed to run the path manager.
Definition: path_manager.h:43
mptcpd user space path manager attribute types.
uint32_t mptcpd_token_t
MPTCP connection token type.
Definition: types.h:26
uint8_t mptcpd_aid_t
MPTCP address ID type.
Definition: types.h:29