Development discussion of WireGuard
 help / color / mirror / Atom feed
* 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

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git