git: wg: Port #20: rewrite ioctl API based on OpenBSD's version

Aaron LI aly at
Thu Feb 8 00:32:28 PST 2024

commit a4e2140561798188dfcdda3cb16a28a24b792e63
Author: Aaron LI <aly at>
Date:   Sat Oct 21 17:17:59 2023 +0800

    wg: Port #20: rewrite ioctl API based on OpenBSD's version
    DragonFly doesn't support the nv(9) API and I don't want to port it from
    FreeBSD.  So rewrite the ioctl API based on OpenBSD's version, which
    uses the wg_interface_io/wg_peer_io/wg_aip_io structs and is more
    - Replace if_wg.h with OpenBSD's version, with minor style adjustments.
      the FreeBSD WG supports the latter.
    - Add compile-time assertions to make sure WG_KEY_SIZE is big enough.
    - Replace 'wg_timespec64' struct with the standard 'timespec' struct
      since the former is no longer needed.
    - Bring in custom peer description support from OpenBSD.
    I'll later port the WG support to ifconfig(8) from OpenBSD as well.

Summary of changes:
 sys/net/wg/if_wg.c | 634 +++++++++++++++++++++++------------------------------
 sys/net/wg/if_wg.h |  87 +++++++-
 2 files changed, 352 insertions(+), 369 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list