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 
54 #define MPTCPD_ADDR_FLAG_SIGNAL (1U << 0)
55 
57 #define MPTCPD_ADDR_FLAG_SUBFLOW (1U << 1)
58 
60 #define MPTCPD_ADDR_FLAG_BACKUP (1U << 2)
62 
64 #define MPTCPD_NOTIFY_FLAG_EXISTING (1U << 0)
65 
67 #define MPTCPD_NOTIFY_FLAG_SKIP_LL (1U << 1)
68 
70 #define MPTCPD_NOTIFY_FLAG_SKIP_HOST (1U << 2)
71 
73 #define MPTCPD_NOTIFY_FLAG_ROUTE_CHECK (1U << 3)
74 
81 {
84 
87 };
88 
89 struct mptcpd_addr_info;
90 
97 {
99  uint16_t type;
100 
102  uint32_t limit;
103 };
104 
118 typedef void (*mptcpd_kpm_get_addr_cb_t)(
119  struct mptcpd_addr_info const *info,
120  void *callback_data);
121 
144 typedef void (*mptcpd_complete_func_t)(void *user_data);
145 
160 typedef void (*mptcpd_pm_get_limits_cb)(
161  struct mptcpd_limit const *limits,
162  size_t len,
163  void *callback_data);
164 
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 #endif /* MPTCPD_TYPES_H */
170 
171 /*
172  Local Variables:
173  c-file-style: "linux"
174  End:
175 */
Information associated with a network address.
Definition: addr_info.h:32
MPTCP resource type/limit pair.
Definition: types.h:97
uint32_t limit
MPTCP resource limit value.
Definition: types.h:102
uint16_t type
MPTCP resource type, e.g. MPTCPD_LIMIT_SUBFLOWS.
Definition: types.h:99
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:118
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:160
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:144
mptcpd_limit_types
MPTCP resource limit type identifiers.
Definition: types.h:81
@ MPTCPD_LIMIT_RCV_ADD_ADDRS
Maximum number of address advertisements to receive.
Definition: types.h:83
@ MPTCPD_LIMIT_SUBFLOWS
Maximum number of subflows.
Definition: types.h:86
uint8_t mptcpd_aid_t
MPTCP address ID type.
Definition: types.h:29