[PATCH 3/7] tun_linux: document packet information header values

Simon Ruderich simon at ruderich.org
Sun Dec 31 17:16:50 CET 2017


---
 src/tun_linux.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tun_linux.go b/src/tun_linux.go
index 7fcbe00..dfa74a6 100644
--- a/src/tun_linux.go
+++ b/src/tun_linux.go
@@ -258,6 +258,8 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
 	buff = buff[offset-PIHeaderSize:]
 
 	// add packet information header
+	// bytes 0-1: flags
+	// bytes 2-3: protocol
 
 	buff[0] = 0x00
 	buff[1] = 0x00
-- 
2.15.1



More information about the WireGuard mailing list