diff options
-rw-r--r-- | share/man/man4/tun.4 | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/share/man/man4/tun.4 b/share/man/man4/tun.4 index f300f68568c..2668f68d8d7 100644 --- a/share/man/man4/tun.4 +++ b/share/man/man4/tun.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tun.4,v 1.47 2024/11/15 00:32:04 jsg Exp $ +.\" $OpenBSD: tun.4,v 1.48 2024/11/17 00:51:04 dlg Exp $ .\" .\" Copyright (c) 2003 Marcus D. Watts All rights reserved. .\" @@ -26,7 +26,7 @@ .\" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: November 15 2024 $ +.Dd $Mdocdate: November 17 2024 $ .Dt TUN 4 .Os .Sh NAME @@ -115,6 +115,42 @@ and must be set to the same values that the kernel provided. .It Dv TUNSIFMODE Fa int * is provided for backwards compatibility. The flags set must match what the kernel initialised them to. +.Pp +.It Dv TUNSCAP Fa struct tun_capabilities * +Enable the prepending of network packets with a +.Vt struct tun_hdr +offload header, +and set which interface offload capabilities that userland can +handle on behalf of the kernel. +.Bd -literal +struct tun_capabilities { + uint32_t tun_if_capabilities; +}; +.Ed +.Pp +The +.Fa tun_if_capabilities +field is set with IFCAP values from +.In net/if.h . +.Pp +The prepending of network packets with the a +.Vt struct tun_hdr +offload header is disabled, +and the interface offload capabilities are reset when the device +special file is closed. +.Pp +.It Dv TUNGCAP Fa struct tun_capabilities * +Get which interface offload capabilities are currently enabled. +If the interface has not been configured with +.Dv TUNSCAP +this command will fail with +.Er ENODEV . +.Pp +.It Dv TUNDCAP +Disable the prepending of network packets with the +.Vt struct tun_hdr +offload header, +and clear interface offload capabilities. .El .Pp The generic ioctls @@ -154,6 +190,7 @@ commands: .It Dv SIOCSIFADDR Fa uint8_t Ns [ETHER_ADDR_LEN] Get or set the link layer address (MAC address) of the interface. .El +.\" .Ss Network offload support .Sh FILES .Bl -tag -width /dev/tun* -compact .It Pa /dev/tun* |