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
20 extern "C" {
21 #endif
22 
23 struct sockaddr;
24 struct mptcpd_pm;
25 struct mptcpd_interface;
26 
31 
43 MPTCPD_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 
53 MPTCPD_API void mptcpd_plugin_unload(struct mptcpd_pm *pm);
54 
64 MPTCPD_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 
91 MPTCPD_API void mptcpd_plugin_connection_closed(
92  mptcpd_token_t token,
93  struct mptcpd_pm *pm);
94 
103 MPTCPD_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 
115 MPTCPD_API void mptcpd_plugin_address_removed(mptcpd_token_t token,
116  mptcpd_aid_t id,
117  struct mptcpd_pm *pm);
118 
128 MPTCPD_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 
144 MPTCPD_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 
160 MPTCPD_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 
183 MPTCPD_API void mptcpd_plugin_new_interface(
184  struct mptcpd_interface const *i,
185  void *pm);
186 
193 MPTCPD_API void mptcpd_plugin_update_interface(
194  struct mptcpd_interface const *i,
195  void *pm);
196 
203 MPTCPD_API void mptcpd_plugin_delete_interface(
204  struct mptcpd_interface const *i,
205  void *pm);
206 
214 MPTCPD_API void mptcpd_plugin_new_local_address(
215  struct mptcpd_interface const *i,
216  struct sockaddr const *sa,
217  void *pm);
218 
226 MPTCPD_API void mptcpd_plugin_delete_local_address(
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:781
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_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_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_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_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_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_API void mptcpd_plugin_unload(struct mptcpd_pm *pm)
Unload mptcpd plugins.
Definition: plugin.c:502
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_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_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_API void mptcpd_plugin_delete_interface(struct mptcpd_interface const *i, void *pm)
Notify plugin of removed network interface.
Definition: plugin.c:803
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_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_API void mptcpd_plugin_connection_closed(mptcpd_token_t token, struct mptcpd_pm *pm)
Notify plugin of MPTCP connection closure.
Definition: plugin.c:605
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