Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
nat: Include platform specific headers on FreeBSD
[vpp.git]
/
src
/
plugins
/
wireguard
/
wireguard_peer.h
diff --git
a/src/plugins/wireguard/wireguard_peer.h
b/src/plugins/wireguard/wireguard_peer.h
index
f3d80fb
..
613c264
100644
(file)
--- a/
src/plugins/wireguard/wireguard_peer.h
+++ b/
src/plugins/wireguard/wireguard_peer.h
@@
-115,6
+115,9
@@
typedef struct wg_peer
u32 rehandshake_interval_tick;
bool timer_need_another_keepalive;
u32 rehandshake_interval_tick;
bool timer_need_another_keepalive;
+
+ /* Handshake is sent to main thread? */
+ bool handshake_is_sent;
} wg_peer_t;
typedef struct wg_peer_table_bind_ctx_t_
} wg_peer_t;
typedef struct wg_peer_table_bind_ctx_t_
@@
-144,6
+147,10
@@
adj_walk_rc_t wg_peer_adj_walk (adj_index_t ai, void *data);
void wg_api_peer_event (index_t peeri, wg_peer_flags flags);
void wg_peer_update_flags (index_t peeri, wg_peer_flags flag, bool add_del);
void wg_api_peer_event (index_t peeri, wg_peer_flags flags);
void wg_peer_update_flags (index_t peeri, wg_peer_flags flag, bool add_del);
+void wg_peer_update_endpoint (index_t peeri, const ip46_address_t *addr,
+ u16 port);
+void wg_peer_update_endpoint_from_mt (index_t peeri,
+ const ip46_address_t *addr, u16 port);
static inline bool
wg_peer_is_dead (wg_peer_t *peer)
static inline bool
wg_peer_is_dead (wg_peer_t *peer)
@@
-166,7
+173,7
@@
wg_peer_get (index_t peeri)
static inline index_t
wg_peer_get_by_adj_index (index_t ai)
{
static inline index_t
wg_peer_get_by_adj_index (index_t ai)
{
- if (ai > vec_len (wg_peer_by_adj_index))
+ if (ai >
=
vec_len (wg_peer_by_adj_index))
return INDEX_INVALID;
return (wg_peer_by_adj_index[ai]);
}
return INDEX_INVALID;
return (wg_peer_by_adj_index[ai]);
}
@@
-200,6
+207,12
@@
fib_prefix_is_cover_addr_46 (const fib_prefix_t *p1, const ip46_address_t *ip)
return (false);
}
return (false);
}
+static inline bool
+wg_peer_can_send (wg_peer_t *peer)
+{
+ return peer && peer->rewrite;
+}
+
#endif // __included_wg_peer_h__
/*
#endif // __included_wg_peer_h__
/*