github.com/bepass-org/wireguard-go@v1.0.4-rc2.0.20240304192354-ebce6572bc24/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 )