[-- Attachment #1.1: Type: text/plain, Size: 532 bytes --] Hey folks; While reading through some of the wireguard-go source I saw there is a TODO to implement: // https://git.zx2c4.com/wireguard-go/tree/tun/tun_linux.go?id=3957e9b9dd19#n359 func (tun *NativeTun) Flush() error The note suggests using sendmmsg, which, does not seem to be implemented by the syscall package in Go. (https://github.com/golang/go/issues/9402) Given that, I was wondering if anybody knows a way to interface with sendmmsg from Go? -- Regards, John S [-- Attachment #1.2: publickey - john@sys.casa - 5550f851.asc --] [-- Type: application/pgp-keys, Size: 3179 bytes --] [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 855 bytes --]
On Wed, Sep 1, 2021 at 9:59 AM john@sys.casa <john@sys.casa> wrote: > Given that, I was wondering if anybody knows a way to interface with > sendmmsg from Go? As an example, the golang.org/x/net/ipv4 package implements WriteBatch using sendmmsg: - https://pkg.go.dev/golang.org/x/net/ipv4#PacketConn.WriteBatch You can either use that method, or peek at the source code to see how the syscall is called. -- Wade Simmons