github.com/tailscale/wireguard-go@v0.0.20201119-0.20210522003738-46b531feb08a/device/ip.go (about) 1 /* SPDX-License-Identifier: MIT 2 * 3 * Copyright (C) 2017-2021 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 )