github.com/koomox/wireguard-go@v0.0.0-20230722134753-17a50b2f22a3/device/ip.go (about) 1 /* SPDX-License-Identifier: MIT 2 * 3 * Copyright (C) 2017-2023 WireGuard LLC. All Rights Reserved. 4 */ 5 6 package device 7 8 import ( 9 "net" 10 ) 11 12 const ( 13 IPv4offsetTotalLength = 2 14 IPv4offsetSrc = 12 15 IPv4offsetDst = IPv4offsetSrc + net.IPv4len 16 ) 17 18 const ( 19 IPv6offsetPayloadLength = 4 20 IPv6offsetSrc = 8 21 IPv6offsetDst = IPv6offsetSrc + net.IPv6len 22 )