Symbol: wg_peer
sbin/ifconfig/ifwg.c
177
wg_data_grow(sizeof(*wg_peer));
sbin/ifconfig/ifwg.c
180
wg_peer = &wg_interface->i_peers[0]; /* first peer */
sbin/ifconfig/ifwg.c
182
wg_peer = (struct wg_peer_io *)wg_aip; /* end of last peer */
sbin/ifconfig/ifwg.c
183
wg_aip = &wg_peer->p_aips[0];
sbin/ifconfig/ifwg.c
185
if (b64_pton(peerkey, wg_peer->p_public, WG_KEY_SIZE) != WG_KEY_SIZE)
sbin/ifconfig/ifwg.c
187
wg_peer->p_flags |= WG_PEER_HAS_PUBLIC;
sbin/ifconfig/ifwg.c
197
wg_peer->p_flags |= WG_PEER_REMOVE;
sbin/ifconfig/ifwg.c
260
if (wg_peer == NULL)
sbin/ifconfig/ifwg.c
268
wg_peer->p_flags |= WG_PEER_REPLACE_AIPS;
sbin/ifconfig/ifwg.c
269
wg_peer->p_aips_count++;
sbin/ifconfig/ifwg.c
280
if (wg_peer == NULL)
sbin/ifconfig/ifwg.c
283
if (b64_pton(psk, wg_peer->p_psk, WG_KEY_SIZE) != WG_KEY_SIZE)
sbin/ifconfig/ifwg.c
285
wg_peer->p_flags |= WG_PEER_HAS_PSK;
sbin/ifconfig/ifwg.c
294
if (wg_peer == NULL)
sbin/ifconfig/ifwg.c
298
memset(wg_peer->p_psk, 0, sizeof(wg_peer->p_psk));
sbin/ifconfig/ifwg.c
299
wg_peer->p_flags |= WG_PEER_HAS_PSK;
sbin/ifconfig/ifwg.c
310
if (wg_peer == NULL)
sbin/ifconfig/ifwg.c
314
wg_peer->p_pka = (uint16_t)strtonum(pka, 0, 43200, &errmsg);
sbin/ifconfig/ifwg.c
317
wg_peer->p_flags |= WG_PEER_HAS_PKA;
sbin/ifconfig/ifwg.c
326
if (wg_peer == NULL)
sbin/ifconfig/ifwg.c
329
wg_peer->p_pka = 0;
sbin/ifconfig/ifwg.c
330
wg_peer->p_flags |= WG_PEER_HAS_PKA;
sbin/ifconfig/ifwg.c
342
if (wg_peer == NULL)
sbin/ifconfig/ifwg.c
348
memcpy(&wg_peer->p_sa, ai->ai_addr, ai->ai_addrlen);
sbin/ifconfig/ifwg.c
349
wg_peer->p_flags |= WG_PEER_HAS_ENDPOINT;
sbin/ifconfig/ifwg.c
359
if (wg_peer == NULL)
sbin/ifconfig/ifwg.c
362
strlcpy(wg_peer->p_description, desc, sizeof(wg_peer->p_description));
sbin/ifconfig/ifwg.c
363
wg_peer->p_flags |= WG_PEER_SET_DESCRIPTION;
sbin/ifconfig/ifwg.c
372
if (wg_peer == NULL)
sbin/ifconfig/ifwg.c
375
memset(wg_peer->p_description, 0, sizeof(wg_peer->p_description));
sbin/ifconfig/ifwg.c
376
wg_peer->p_flags |= WG_PEER_SET_DESCRIPTION;
sbin/ifconfig/ifwg.c
429
wg_peer = &wg_interface->i_peers[0];
sbin/ifconfig/ifwg.c
431
b64_ntop(wg_peer->p_public, WG_KEY_SIZE,
sbin/ifconfig/ifwg.c
435
printf("\t\tid: %" PRIu64 "\n", wg_peer->p_id);
sbin/ifconfig/ifwg.c
436
if (wg_peer->p_description[0] != '\0')
sbin/ifconfig/ifwg.c
437
printf("\t\twgdescr: %s\n", wg_peer->p_description);
sbin/ifconfig/ifwg.c
438
if (wg_peer->p_flags & WG_PEER_HAS_PSK) {
sbin/ifconfig/ifwg.c
440
b64_ntop(wg_peer->p_psk, WG_KEY_SIZE,
sbin/ifconfig/ifwg.c
447
if ((wg_peer->p_flags & WG_PEER_HAS_PKA) && wg_peer->p_pka > 0)
sbin/ifconfig/ifwg.c
448
printf("\t\twgpka: %u (seconds)\n", wg_peer->p_pka);
sbin/ifconfig/ifwg.c
449
if (wg_peer->p_flags & WG_PEER_HAS_ENDPOINT) {
sbin/ifconfig/ifwg.c
450
if (getnameinfo(&wg_peer->p_sa, wg_peer->p_sa.sa_len,
sbin/ifconfig/ifwg.c
459
wg_peer->p_txbytes, wg_peer->p_rxbytes);
sbin/ifconfig/ifwg.c
461
if (wg_peer->p_last_handshake.tv_sec != 0) {
sbin/ifconfig/ifwg.c
464
now.tv_sec - wg_peer->p_last_handshake.tv_sec);
sbin/ifconfig/ifwg.c
467
for (j = 0; j < wg_peer->p_aips_count; j++) {
sbin/ifconfig/ifwg.c
468
wg_aip = &wg_peer->p_aips[j];
sbin/ifconfig/ifwg.c
474
wg_aip = &wg_peer->p_aips[wg_peer->p_aips_count];
sbin/ifconfig/ifwg.c
475
wg_peer = (struct wg_peer_io *)wg_aip;
sbin/ifconfig/ifwg.c
54
static struct wg_peer_io *wg_peer;
sbin/ifconfig/ifwg.c
78
peer_offset = (char *)wg_peer - (char *)wg_interface;
sbin/ifconfig/ifwg.c
89
if (wg_peer != NULL)
sbin/ifconfig/ifwg.c
90
wg_peer = (void *)((char *)wg_interface + peer_offset);
sys/net/wg/if_wg.c
1207
static void wg_timers_run_send_initiation(struct wg_peer *, bool);
sys/net/wg/if_wg.c
1215
wg_timers_enable(struct wg_peer *peer)
sys/net/wg/if_wg.c
1222
wg_timers_disable(struct wg_peer *peer)
sys/net/wg/if_wg.c
1236
wg_timers_set_persistent_keepalive(struct wg_peer *peer, uint16_t interval)
sys/net/wg/if_wg.c
1244
wg_timers_get_persistent_keepalive(struct wg_peer *peer, uint16_t *interval)
sys/net/wg/if_wg.c
1251
wg_timers_get_last_handshake(struct wg_peer *peer, struct timespec *time)
sys/net/wg/if_wg.c
1262
wg_timers_event_data_sent(struct wg_peer *peer)
sys/net/wg/if_wg.c
1279
wg_timers_event_data_received(struct wg_peer *peer)
sys/net/wg/if_wg.c
1298
wg_timers_event_any_authenticated_packet_sent(struct wg_peer *peer)
sys/net/wg/if_wg.c
1308
wg_timers_event_any_authenticated_packet_received(struct wg_peer *peer)
sys/net/wg/if_wg.c
1318
wg_timers_event_any_authenticated_packet_traversal(struct wg_peer *peer)
sys/net/wg/if_wg.c
1333
wg_timers_event_handshake_initiated(struct wg_peer *peer)
sys/net/wg/if_wg.c
1349
wg_timers_event_handshake_complete(struct wg_peer *peer)
sys/net/wg/if_wg.c
1367
wg_timers_event_session_derived(struct wg_peer *peer)
sys/net/wg/if_wg.c
1381
wg_timers_event_want_initiation(struct wg_peer *peer)
sys/net/wg/if_wg.c
1388
wg_timers_run_send_initiation(struct wg_peer *peer, bool is_retry)
sys/net/wg/if_wg.c
1399
struct wg_peer *peer = _peer;
sys/net/wg/if_wg.c
1430
struct wg_peer *peer = _peer;
sys/net/wg/if_wg.c
1445
struct wg_peer *peer = _peer;
sys/net/wg/if_wg.c
1454
struct wg_peer *peer = _peer;
sys/net/wg/if_wg.c
1465
struct wg_peer *peer = _peer;
sys/net/wg/if_wg.c
1477
wg_peer_send_buf(struct wg_peer *peer, const void *buf, size_t len)
sys/net/wg/if_wg.c
1491
wg_send_initiation(struct wg_peer *peer)
sys/net/wg/if_wg.c
1510
wg_send_response(struct wg_peer *peer)
sys/net/wg/if_wg.c
1545
wg_send_keepalive(struct wg_peer *peer)
sys/net/wg/if_wg.c
1599
struct wg_peer *peer;
sys/net/wg/if_wg.c
1839
struct wg_peer *peer;
sys/net/wg/if_wg.c
1876
struct wg_peer *peer, *allowed_peer;
sys/net/wg/if_wg.c
192
struct wg_peer *a_peer;
sys/net/wg/if_wg.c
1989
struct wg_peer *peer = arg;
sys/net/wg/if_wg.c
2035
struct wg_peer *peer = arg;
sys/net/wg/if_wg.c
2111
struct wg_peer *peer;
sys/net/wg/if_wg.c
2226
wg_peer_send_staged(struct wg_peer *peer)
sys/net/wg/if_wg.c
223
TAILQ_ENTRY(wg_peer) p_entry;
sys/net/wg/if_wg.c
2274
struct wg_peer *peer = NULL;
sys/net/wg/if_wg.c
2390
struct wg_peer *peer;
sys/net/wg/if_wg.c
2517
struct wg_peer *peer;
sys/net/wg/if_wg.c
2600
struct wg_peer *peer;
sys/net/wg/if_wg.c
2742
struct wg_peer *peer;
sys/net/wg/if_wg.c
2772
struct wg_peer *peer;
sys/net/wg/if_wg.c
279
TAILQ_HEAD(, wg_peer) sc_peers;
sys/net/wg/if_wg.c
317
static void wg_timers_enable(struct wg_peer *);
sys/net/wg/if_wg.c
318
static void wg_timers_disable(struct wg_peer *);
sys/net/wg/if_wg.c
321
static int wg_aip_add(struct wg_softc *, struct wg_peer *, sa_family_t,
sys/net/wg/if_wg.c
323
static struct wg_peer *
sys/net/wg/if_wg.c
325
static void wg_aip_remove_all(struct wg_softc *, struct wg_peer *);
sys/net/wg/if_wg.c
328
static void wg_send_initiation(struct wg_peer *);
sys/net/wg/if_wg.c
329
static void wg_send_response(struct wg_peer *);
sys/net/wg/if_wg.c
332
static void wg_send_keepalive(struct wg_peer *);
sys/net/wg/if_wg.c
335
static void wg_peer_send_staged(struct wg_peer *);
sys/net/wg/if_wg.c
576
static struct wg_peer *
sys/net/wg/if_wg.c
581
struct wg_peer *peer;
sys/net/wg/if_wg.c
636
wg_peer_destroy(struct wg_peer *peer)
sys/net/wg/if_wg.c
694
struct wg_peer *peer, *tpeer;
sys/net/wg/if_wg.c
701
wg_peer_set_sockaddr(struct wg_peer *peer, const struct sockaddr *remote)
sys/net/wg/if_wg.c
727
wg_peer_get_sockaddr(struct wg_peer *peer, struct sockaddr *remote)
sys/net/wg/if_wg.c
742
wg_peer_set_endpoint(struct wg_peer *peer, const struct wg_endpoint *e)
sys/net/wg/if_wg.c
755
wg_peer_get_endpoint(struct wg_peer *peer, struct wg_endpoint *e)
sys/net/wg/if_wg.c
769
wg_aip_add(struct wg_softc *sc, struct wg_peer *peer, sa_family_t af,
sys/net/wg/if_wg.c
849
static struct wg_peer *
sys/net/wg/if_wg.c
854
struct wg_peer *peer;
sys/net/wg/if_wg.c
886
wg_aip_remove_all(struct wg_softc *sc, struct wg_peer *peer)
sys/net/wg/selftest/allowedips.c
297
struct wg_peer **peers, *peer;
sys/net/wg/selftest/allowedips.c
59
static struct wg_peer *
sys/net/wg/selftest/allowedips.c
602
struct wg_peer *a = NULL, *b = NULL, *c = NULL, *d = NULL;
sys/net/wg/selftest/allowedips.c
603
struct wg_peer *e = NULL, *f = NULL, *g = NULL, *h = NULL;
sys/net/wg/selftest/allowedips.c
62
struct wg_peer *peer;