Lines Matching defs:wg_peer
135 * - It has a list of peers (struct wg_peer)
139 * - struct wg_peer is a representative of a peer
163 * - Each peer (struct wg_peer, wgp) has a mutex wgp_lock, which can be taken
541 struct wg_peer *wgs_peer;
599 struct wg_peer;
616 struct wg_peer *wga_peer;
627 struct wg_peer {
755 static void wg_send_data_msg(struct wg_peer *, struct wg_session *,
757 static void wg_send_cookie_msg(struct wg_softc *, struct wg_peer *,
760 static void wg_send_handshake_msg_resp(struct wg_softc *, struct wg_peer *,
762 static void wg_send_keepalive_msg(struct wg_peer *, struct wg_session *);
764 static struct wg_peer *
767 static struct wg_peer *
775 static void wg_update_endpoint_if_necessary(struct wg_peer *,
778 static void wg_schedule_session_dtor_timer(struct wg_peer *);
780 static bool wg_is_underload(struct wg_softc *, struct wg_peer *, int);
785 static void wg_get_peer(struct wg_peer *, struct psref *);
786 static void wg_put_peer(struct wg_peer *, struct psref *);
788 static int wg_send_hs(struct wg_peer *, struct mbuf *);
789 static int wg_send_data(struct wg_peer *, struct mbuf *);
804 static void wg_purge_pending_packets(struct wg_peer *);
810 int (*send_hs_msg)(struct wg_peer *, struct mbuf *);
811 int (*send_data_msg)(struct wg_peer *, struct mbuf *);
827 static int wg_send_hs_user(struct wg_peer *, struct mbuf *);
828 static int wg_send_data_user(struct wg_peer *, struct mbuf *);
841 PSLIST_READER_FOREACH((wgp), &(wg)->wg_peers, struct wg_peer, \
844 PSLIST_WRITER_FOREACH((wgp), &(wg)->wg_peers, struct wg_peer, \
853 struct wg_peer *wgr_peer;
1296 wg_get_stable_session(struct wg_peer *wgp, struct psref *psref)
1323 struct wg_peer *wgp = wgs->wgs_peer;
1367 struct wg_peer *wgp __diagused = wgs->wgs_peer;
1402 struct wg_peer *wgp __diagused = wgs->wgs_peer;
1435 wg_fill_msg_init(struct wg_softc *wg, struct wg_peer *wgp,
1571 wg_initiator_priority(struct wg_softc *wg, struct wg_peer *wgp)
1600 struct wg_peer *wgp;
1874 wg_get_so_by_peer(struct wg_peer *wgp, struct wg_sockaddr *wgsa)
1881 wg_get_endpoint_sa(struct wg_peer *wgp, struct psref *psref)
1895 wg_put_sa(struct wg_peer *wgp, struct wg_sockaddr *wgsa, struct psref *psref)
1902 wg_send_hs(struct wg_peer *wgp, struct mbuf *m)
1923 wg_send_handshake_msg_init(struct wg_softc *wg, struct wg_peer *wgp)
2006 wg_fill_msg_resp(struct wg_softc *wg, struct wg_peer *wgp,
2111 wg_swap_sessions(struct wg_softc *wg, struct wg_peer *wgp)
2204 struct wg_peer *wgp;
2389 wg_send_handshake_msg_resp(struct wg_softc *wg, struct wg_peer *wgp,
2419 static struct wg_peer *
2423 struct wg_peer *wgp;
2435 wg_fill_msg_cookie(struct wg_softc *wg, struct wg_peer *wgp,
2500 wg_send_cookie_msg(struct wg_softc *wg, struct wg_peer *wgp,
2529 wg_is_underload(struct wg_softc *wg, struct wg_peer *wgp, int msgtype)
2637 wg_send_keepalive_msg(struct wg_peer *wgp, struct wg_session *wgs)
2671 wg_schedule_peer_task(struct wg_peer *wgp, unsigned int task)
2689 wg_change_endpoint(struct wg_peer *wgp, const struct sockaddr *new)
2763 wg_validate_route(struct wg_softc *wg, struct wg_peer *wgp_expected,
2769 struct wg_peer *wgp;
2814 struct wg_peer *wgp = arg;
2823 wg_schedule_session_dtor_timer(struct wg_peer *wgp)
2862 wg_update_endpoint_if_necessary(struct wg_peer *wgp,
2900 struct wg_peer *wgp;
3154 struct wg_peer *wgp;
3340 wg_get_peer(struct wg_peer *wgp, struct psref *psref)
3347 wg_put_peer(struct wg_peer *wgp, struct psref *psref)
3354 wg_task_send_init_message(struct wg_softc *wg, struct wg_peer *wgp)
3388 wg_task_retry_handshake(struct wg_softc *wg, struct wg_peer *wgp)
3428 wg_task_establish_session(struct wg_softc *wg, struct wg_peer *wgp)
3470 wg_task_endpoint_changed(struct wg_softc *wg, struct wg_peer *wgp)
3490 wg_task_send_keepalive_message(struct wg_softc *wg, struct wg_peer *wgp)
3506 wg_task_destroy_prev_session(struct wg_softc *wg, struct wg_peer *wgp)
3567 struct wg_peer *wgp = container_of(wk, struct wg_peer, wgp_work);
3798 struct wg_peer *wgp;
3804 wgp = M_GETCTX(m, struct wg_peer *);
3857 wg_purge_pending_packets(struct wg_peer *wgp)
3873 struct wg_peer *wgp = arg;
3880 static struct wg_peer *
3883 struct wg_peer *wgp;
3936 wg_destroy_peer(struct wg_peer *wgp)
4012 struct wg_peer *wgp, *wgp0 __diagused;
4054 struct wg_peer *wgp, *wgp0 __diagused;
4276 static struct wg_peer *
4282 struct wg_peer *wgp = NULL;
4313 wg_fill_msg_data(struct wg_softc *wg, struct wg_peer *wgp,
4331 struct wg_peer *wgp = NULL;
4408 wg_send_data(struct wg_peer *wgp, struct mbuf *m)
4466 wg_send_data_msg(struct wg_peer *wgp, struct wg_session *wgs, struct mbuf *m)
4657 struct wg_peer **wgpp)
4687 struct wg_peer *wgp = wg_alloc_peer(wg);
4927 struct wg_peer *wgp = NULL, *wgp0 __diagused;
5016 struct wg_peer *wgp;
5461 wg_send_user(struct wg_peer *wgp, struct mbuf *m, bool handshake)
5493 wg_send_hs_user(struct wg_peer *wgp, struct mbuf *m)
5500 wg_send_data_user(struct wg_peer *wgp, struct mbuf *m)