* Invoking sendmmsg from Go.
@ 2021-08-31 17:41 john
2021-09-03 14:57 ` Wade Simmons
0 siblings, 1 reply; 2+ messages in thread
From: john @ 2021-08-31 17:41 UTC (permalink / raw)
To: wireguard
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Invoking sendmmsg from Go.
2021-08-31 17:41 Invoking sendmmsg from Go john
@ 2021-09-03 14:57 ` Wade Simmons
0 siblings, 0 replies; 2+ messages in thread
From: Wade Simmons @ 2021-09-03 14:57 UTC (permalink / raw)
To: wireguard
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-05 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 17:41 Invoking sendmmsg from Go john
2021-09-03 14:57 ` Wade Simmons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).