pub struct OpSetDeviceDo<'r> { /* private fields */ }wireguard only.Expand description
Set WireGuard device ~~~~~~~~~~~~~~~~~~~~
This command should be called with a wgdevice set, containing one but not both of ``WGDEVICE_A_IFINDEX`` and ``WGDEVICE_A_IFNAME``.
It is possible that the amount of configuration data exceeds that of the maximum message length accepted by the kernel. In that case, several messages should be sent one after another, with each successive one filling in information not contained in the prior. Note that if ``WGDEVICE_F_REPLACE_PEERS`` is specified in the first message, it probably should not be specified in fragments that come after, so that the list of peers is only cleared the first time but appended after. Likewise for peers, if ``WGPEER_F_REPLACE_ALLOWEDIPS`` is specified in the first message of a peer, it likely should not be specified in subsequent fragments.
If an error occurs, ``NLMSG_ERROR`` will reply containing an errno.
Flags: uns-admin-perm Request attributes: