Lines Matching defs:wg_peer

125  *   - It has a list of peers (struct wg_peer)
129 * - struct wg_peer is a representative of a peer
153 * - Each peer (struct wg_peer, wgp) has a mutex wgp_lock, which can be taken
455 struct wg_peer *wgs_peer;
511 struct wg_peer;
528 struct wg_peer *wga_peer;
539 struct wg_peer {
668 static int wg_send_data_msg(struct wg_peer *, struct wg_session *,
670 static int wg_send_cookie_msg(struct wg_softc *, struct wg_peer *,
673 static int wg_send_handshake_msg_resp(struct wg_softc *, struct wg_peer *,
675 static void wg_send_keepalive_msg(struct wg_peer *, struct wg_session *);
677 static struct wg_peer *
680 static struct wg_peer *
688 static void wg_update_endpoint_if_necessary(struct wg_peer *,
691 static void wg_schedule_rekey_timer(struct wg_peer *);
692 static void wg_schedule_session_dtor_timer(struct wg_peer *);
694 static bool wg_is_underload(struct wg_softc *, struct wg_peer *, int);
699 static void wg_get_peer(struct wg_peer *, struct psref *);
700 static void wg_put_peer(struct wg_peer *, struct psref *);
702 static int wg_send_so(struct wg_peer *, struct mbuf *);
703 static int wg_send_udp(struct wg_peer *, struct mbuf *);
718 static void wg_purge_pending_packets(struct wg_peer *);
724 int (*send_hs_msg)(struct wg_peer *, struct mbuf *);
725 int (*send_data_msg)(struct wg_peer *, struct mbuf *);
741 static int wg_send_user(struct wg_peer *, struct mbuf *);
754 PSLIST_READER_FOREACH((wgp), &(wg)->wg_peers, struct wg_peer, \
757 PSLIST_WRITER_FOREACH((wgp), &(wg)->wg_peers, struct wg_peer, \
766 struct wg_peer *wgr_peer;
1193 wg_get_stable_session(struct wg_peer *wgp, struct psref *psref)
1219 struct wg_peer *wgp = wgs->wgs_peer;
1254 struct wg_peer *wgp __diagused = wgs->wgs_peer;
1288 struct wg_peer *wgp __diagused = wgs->wgs_peer;
1322 wg_fill_msg_init(struct wg_softc *wg, struct wg_peer *wgp,
1422 struct wg_peer *wgp;
1636 wg_get_so_by_peer(struct wg_peer *wgp, struct wg_sockaddr *wgsa)
1643 wg_get_endpoint_sa(struct wg_peer *wgp, struct psref *psref)
1657 wg_put_sa(struct wg_peer *wgp, struct wg_sockaddr *wgsa, struct psref *psref)
1664 wg_send_so(struct wg_peer *wgp, struct mbuf *m)
1680 wg_send_handshake_msg_init(struct wg_softc *wg, struct wg_peer *wgp)
1741 wg_fill_msg_resp(struct wg_softc *wg, struct wg_peer *wgp,
1836 wg_swap_sessions(struct wg_peer *wgp)
1859 struct wg_peer *wgp;
2057 wg_send_handshake_msg_resp(struct wg_softc *wg, struct wg_peer *wgp,
2083 static struct wg_peer *
2087 struct wg_peer *wgp;
2099 wg_fill_msg_cookie(struct wg_softc *wg, struct wg_peer *wgp,
2160 wg_send_cookie_msg(struct wg_softc *wg, struct wg_peer *wgp,
2186 wg_is_underload(struct wg_softc *wg, struct wg_peer *wgp, int msgtype)
2293 wg_schedule_rekey_timer(struct wg_peer *wgp)
2301 wg_send_keepalive_msg(struct wg_peer *wgp, struct wg_session *wgs)
2332 wg_schedule_peer_task(struct wg_peer *wgp, unsigned int task)
2350 wg_change_endpoint(struct wg_peer *wgp, const struct sockaddr *new)
2414 wg_validate_route(struct wg_softc *wg, struct wg_peer *wgp_expected,
2420 struct wg_peer *wgp;
2455 struct wg_peer *wgp = arg;
2463 wg_schedule_session_dtor_timer(struct wg_peer *wgp)
2491 wg_update_endpoint_if_necessary(struct wg_peer *wgp,
2529 struct wg_peer *wgp;
2757 struct wg_peer *wgp;
2934 wg_get_peer(struct wg_peer *wgp, struct psref *psref)
2941 wg_put_peer(struct wg_peer *wgp, struct psref *psref)
2948 wg_task_send_init_message(struct wg_softc *wg, struct wg_peer *wgp)
2976 wg_task_retry_handshake(struct wg_softc *wg, struct wg_peer *wgp)
3015 wg_task_establish_session(struct wg_softc *wg, struct wg_peer *wgp)
3072 wg_task_endpoint_changed(struct wg_softc *wg, struct wg_peer *wgp)
3092 wg_task_send_keepalive_message(struct wg_softc *wg, struct wg_peer *wgp)
3108 wg_task_destroy_prev_session(struct wg_softc *wg, struct wg_peer *wgp)
3125 struct wg_peer *wgp = container_of(wk, struct wg_peer, wgp_work);
3331 struct wg_peer *wgp;
3337 wgp = M_GETCTX(m, struct wg_peer *);
3359 struct wg_peer *wgp = arg;
3365 wg_purge_pending_packets(struct wg_peer *wgp)
3377 struct wg_peer *wgp = arg;
3384 static struct wg_peer *
3387 struct wg_peer *wgp;
3442 wg_destroy_peer(struct wg_peer *wgp)
3519 struct wg_peer *wgp, *wgp0 __diagused;
3561 struct wg_peer *wgp, *wgp0 __diagused;
3782 static struct wg_peer *
3788 struct wg_peer *wgp = NULL;
3819 wg_fill_msg_data(struct wg_softc *wg, struct wg_peer *wgp,
3837 struct wg_peer *wgp = NULL;
3937 wg_send_udp(struct wg_peer *wgp, struct mbuf *m)
3990 wg_send_data_msg(struct wg_peer *wgp, struct wg_session *wgs,
4146 struct wg_peer **wgpp)
4176 struct wg_peer *wgp = wg_alloc_peer(wg);
4410 struct wg_peer *wgp = NULL, *wgp0 __diagused;
4499 struct wg_peer *wgp;
4930 wg_send_user(struct wg_peer *wgp, struct mbuf *m)