From bc3583533928d549ea6bedd4dae13e0643da2a44 Mon Sep 17 00:00:00 2001 From: Sauci Date: Thu, 26 Nov 2020 06:39:54 -0800 Subject: [PATCH] add SockaddrCANJ1939 structure documentation --- unix/syscall_linux.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go index 82ebcca8..1fdfe48e 100644 --- a/unix/syscall_linux.go +++ b/unix/syscall_linux.go @@ -641,6 +641,10 @@ func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) { return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil } +// SockaddrCANJ1939 implements the Sockaddr interface for AF_CAN using J1939 +// protocol (https://en.wikipedia.org/wiki/SAE_J1939). For more information +// on the purposes of the fields, check the official linux kernel documentation +// available here: https://www.kernel.org/doc/Documentation/networking/j1939.rst type SockaddrCANJ1939 struct { Ifindex int Name uint64