mptcpd
Multipath TCP Daemon
types.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef MPTCPD_TYPES_H
11 #define MPTCPD_TYPES_H
12 
13 #include <stddef.h>
14 #include <inttypes.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
26 typedef uint32_t mptcpd_token_t;
27 
29 typedef uint8_t mptcpd_aid_t;
30 
32 #define MPTCPD_PRIxAID PRIx8
33 
46 
51 typedef uint32_t mptcpd_flags_t;
52 
58 #define MPTCPD_ADDR_FLAG_SIGNAL (1U << 0)
59 
61 #define MPTCPD_ADDR_FLAG_SUBFLOW (1U << 1)
62 
64 #define MPTCPD_ADDR_FLAG_BACKUP (1U << 2)
65 
75 #define MPTCPD_ADDR_FLAG_FULLMESH (1U << 3)
77 
84 {
87 
90 };
91 
92 struct mptcpd_addr_info;
93 
100 {
102  uint16_t type;
103 
105  uint32_t limit;
106 };
107 
121 typedef void (*mptcpd_kpm_get_addr_cb_t)(
122  struct mptcpd_addr_info const *info,
123  void *callback_data);
124 
147 typedef void (*mptcpd_complete_func_t)(void *user_data);
148 
163 typedef void (*mptcpd_pm_get_limits_cb)(
164  struct mptcpd_limit const *limits,
165  size_t len,
166  void *callback_data);
167 
168 #ifdef __cplusplus
169 }
170 #endif
171 
172 #endif /* MPTCPD_TYPES_H */
173 
174 /*
175  Local Variables:
176  c-file-style: "linux"
177  End:
178 */
Information associated with a network address.
Definition: addr_info.h:32
MPTCP resource type/limit pair.
Definition: types.h:100
uint32_t limit
MPTCP resource limit value.
Definition: types.h:105
uint16_t type
MPTCP resource type, e.g. MPTCPD_LIMIT_SUBFLOWS.
Definition: types.h:102
void(* mptcpd_kpm_get_addr_cb_t)(struct mptcpd_addr_info const *info, void *callback_data)
Type of function called when an address is available.
Definition: types.h:121
uint32_t mptcpd_flags_t
MPTCP flags type.
Definition: types.h:51
void(* mptcpd_pm_get_limits_cb)(struct mptcpd_limit const *limits, size_t len, void *callback_data)
Type of function called when MPTCP resource limits are available.
Definition: types.h:163
uint32_t mptcpd_token_t
MPTCP connection token type.
Definition: types.h:26
void(* mptcpd_complete_func_t)(void *user_data)
Type of function called on asynchronous call completion.
Definition: types.h:147
mptcpd_limit_types
MPTCP resource limit type identifiers.
Definition: types.h:84
@ MPTCPD_LIMIT_RCV_ADD_ADDRS
Maximum number of address advertisements to receive.
Definition: types.h:86
@ MPTCPD_LIMIT_SUBFLOWS
Maximum number of subflows.
Definition: types.h:89
uint8_t mptcpd_aid_t
MPTCP address ID type.
Definition: types.h:29