Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WireGuard/wireguard-go
/ functions
Functions
712 in github.com/WireGuard/wireguard-go
⨍
Functions
712
◇
Types & classes
136
↓ 89 callers
Method
Close
Close closes the Bind listener. All fns returned by Open must return net.ErrClosed after a call to Close.
conn/conn.go:42
↓ 53 callers
Method
Close
Close stops the Device and closes the Event channel.
tun/tun.go:47
↓ 44 callers
Method
Read
Read one or more packets from the Device (without any additional headers). On a successful read it returns the number of packets read, and sets packet
tun/tun.go:29
↓ 41 callers
Method
Write
Write one or more packets to the device (without any additional headers). On a successful write it returns the number of packets written. A nonzero of
tun/tun.go:35
↓ 25 callers
Function
tcp4Packet
(srcIPPort, dstIPPort netip.AddrPort, flags header.TCPFlags, segmentSize, seq uint32)
tun/offload_linux_test.go:129
↓ 23 callers
Method
Error
()
device/uapi.go:29
↓ 23 callers
Method
Wait
()
device/device.go:402
↓ 23 callers
Function
ipcErrorf
(code int64, msg string, args ...any)
device/uapi.go:41
↓ 21 callers
Function
udp4Packet
(srcIPPort, dstIPPort netip.AddrPort, payloadLen int)
tun/offload_linux_test.go:92
↓ 20 callers
Method
Addr
()
tun/netstack/tun.go:307
↓ 19 callers
Method
Open
Open puts the Bind into a listening state on a given port and reports the actual port that it bound to. Passing zero results in a random selection. fn
conn/conn.go:38
↓ 17 callers
Function
randomPipePath
()
ipc/namedpipe/namedpipe_test.go:27
↓ 17 callers
Function
setZero
* This function is not used as pervasively as it should because this is mostly impossible in Go at the moment */
device/noise-helpers.go:74
↓ 17 callers
Function
tcp6Packet
(srcIPPort, dstIPPort netip.AddrPort, flags header.TCPFlags, segmentSize, seq uint32)
tun/offload_linux_test.go:165
↓ 15 callers
Method
Send
Send writes one or more packets in bufs to address ep. The length of bufs must not exceed BatchSize().
conn/conn.go:50
↓ 14 callers
Method
PutMessageBuffer
(msg *[MaxMessageSize]byte)
device/pools.go:101
↓ 13 callers
Function
DialTimeout
DialTimeout calls DialConfig.DialTimeout using an empty configuration.
ipc/namedpipe/namedpipe.go:214
↓ 13 callers
Method
Get
()
device/pools.go:26
↓ 13 callers
Method
RemoveByPeer
(peer *Peer)
device/allowedips.go:280
↓ 13 callers
Method
Reset
Reset resets the filter to empty state.
replay/replay.go:30
↓ 12 callers
Function
Listen
Listen calls ListenConfig.Listen using an empty configuration.
ipc/namedpipe/namedpipe.go:435
↓ 12 callers
Method
Put
(x any)
device/pools.go:38
↓ 11 callers
Function
checksum
(b []byte, initial uint64)
tun/checksum.go:86
↓ 11 callers
Method
timersActive
()
device/timers.go:75
↓ 11 callers
Function
udp6Packet
(srcIPPort, dstIPPort netip.AddrPort, payloadLen int)
tun/offload_linux_test.go:60
↓ 10 callers
Method
Accept
()
ipc/namedpipe/namedpipe.go:454
↓ 10 callers
Method
SrcIP
()
conn/sticky_linux.go:17
↓ 10 callers
Method
SrcIfidx
()
conn/sticky_linux.go:32
↓ 10 callers
Method
Stop
()
device/peer.go:259
↓ 10 callers
Method
String
()
device/peer.go:147
↓ 10 callers
Method
publicKey
()
device/noise-helpers.go:91
↓ 10 callers
Method
sharedSecret
(pk NoisePublicKey)
device/noise-helpers.go:100
↓ 9 callers
Method
PutOutboundElement
(elem *QueueOutboundElement)
device/pools.go:118
↓ 9 callers
Method
PutOutboundElementsContainer
(c *QueueOutboundElementsContainer)
device/pools.go:89
↓ 9 callers
Method
String
()
tun/netstack/tun.go:294
↓ 9 callers
Function
mixHash
(dst, h *[blake2s.Size]byte, data []byte)
device/noise-protocol.go:238
↓ 8 callers
Method
After
(t2 Timestamp)
tai64n/tai64n.go:35
↓ 8 callers
Method
DeleteKeypair
(key *Keypair)
device/keypair.go:48
↓ 8 callers
Method
Lookup
(id uint32)
device/indextable.go:94
↓ 8 callers
Function
NewDefaultBind
()
conn/default.go:10
↓ 8 callers
Function
NewWaitPool
(max uint32, new func() any)
device/pools.go:20
↓ 8 callers
Method
Up
()
device/device.go:209
↓ 8 callers
Method
choose
(ip []byte)
device/allowedips.go:69
↓ 8 callers
Function
convertToFullAddr
(endpoint netip.AddrPort)
tun/netstack/tun.go:194
↓ 8 callers
Function
tunDestroy
Destroy a named system interface
tun/tun_freebsd.go:145
↓ 7 callers
Method
BatchSize
BatchSize returns the BatchSize for the device as a whole which is the max of the bind batch size and the tun batch size. The batch size reported by d
device/device.go:332
↓ 7 callers
Method
DstIP
used for mac2 cookie calculations
conn/conn.go:83
↓ 7 callers
Method
Handle
()
ipc/namedpipe/namedpipe.go:104
↓ 7 callers
Method
IpcSet
(uapiConf string)
device/uapi.go:415
↓ 7 callers
Function
KDF2
(t0, t1 *[blake2s.Size]byte, key, input []byte)
device/noise-helpers.go:48
↓ 7 callers
Method
Mod
(d time.Duration)
device/timers.go:48
↓ 7 callers
Method
NewTimer
(expirationFunction func(*Peer))
device/timers.go:28
↓ 7 callers
Function
assertEqual
(t *testing.T, a, b []byte)
device/noise_test.go:53
↓ 7 callers
Function
assertNil
(t *testing.T, err error)
device/noise_test.go:47
↓ 7 callers
Method
mixHash
(data []byte)
device/noise-protocol.go:255
↓ 7 callers
Function
uapiCfg
uapiCfg returns a string that contains cfg formatted use with IpcSet. cfg is a series of alternating key/value strings. uapiCfg exists because editors
device/device_test.go:35
↓ 6 callers
Method
CheckMAC2
(msg, src []byte)
device/cookie.go:86
↓ 6 callers
Method
Del
()
device/timers.go:55
↓ 6 callers
Function
HMAC1
* KDF related functions. * HMAC-based Key Derivation Function (HKDF) * https://tools.ietf.org/html/rfc5869 */
device/noise-helpers.go:24
↓ 6 callers
Method
Init
(pk NoisePublicKey)
device/cookie.go:44
↓ 6 callers
Method
Listen
Listen creates a listener on a Windows named pipe path,such as \\.\pipe\mypipe. The pipe must not already exist.
ipc/namedpipe/namedpipe.go:405
↓ 6 callers
Method
Lookup
(ip []byte)
device/allowedips.go:306
↓ 6 callers
Function
RetryAfterError
(err error)
rwcancel/rwcancel.go:41
↓ 6 callers
Method
SendKeepalive
* Queues a keepalive if no packets are queued for peer */
device/send.go:81
↓ 6 callers
Method
Start
()
device/peer.go:173
↓ 6 callers
Function
assertEquals
(t *testing.T, a, b string)
device/kdf_test.go:23
↓ 6 callers
Function
checksumRef
(b []byte, initial uint16)
tun/checksum_test.go:12
↓ 6 callers
Function
checksumValid
(pkt []byte, iphLen, proto uint8, isV6 bool)
tun/offload_linux.go:388
↓ 6 callers
Function
commonBits
(ip1, ip2 []byte)
device/allowedips.go:35
↓ 6 callers
Method
encode
(b []byte)
tun/offload_linux.go:46
↓ 6 callers
Function
genTestPair
genTestPair creates a testPair.
device/device_test.go:152
↓ 6 callers
Method
isClosed
isClosed reports whether the device is closed (or is closing). See device.state.state comments for how to interpret this value.
device/device.go:118
↓ 6 callers
Method
isUp
isUp reports whether the device is up (or is attempting to come up). See device.state.state comments for how to interpret this value.
device/device.go:124
↓ 6 callers
Function
newPrivateKey
()
device/noise-helpers.go:85
↓ 6 callers
Method
operateOnFd
(fn func(fd uintptr))
tun/operateonfd.go:14
↓ 6 callers
Method
timersAnyAuthenticatedPacketTraversal
* Should be called before a packet with authentication -- keepalive, data, or handshake -- is sent, or after one is received. */
device/timers.go:194
↓ 5 callers
Method
AddMacs
(msg []byte)
device/cookie.go:215
↓ 5 callers
Method
DelSync
()
device/timers.go:62
↓ 5 callers
Method
Delete
(index uint32)
device/indextable.go:38
↓ 5 callers
Method
DstToString
returns the local source address (ip:port)
conn/conn.go:81
↓ 5 callers
Method
Equals
(tar NoisePublicKey)
device/noise-types.go:72
↓ 5 callers
Method
Insert
(prefix netip.Prefix, peer *Peer)
device/allowedips.go:291
↓ 5 callers
Function
NewDevice
(tunDevice tun.Device, bind conn.Bind, logger *Logger)
device/device.go:284
↓ 5 callers
Function
NewLogger
NewLogger constructs a Logger that writes to stdout. It logs at the specified log level and above. It decorates log lines with the log level, date, ti
device/logger.go:36
↓ 5 callers
Method
Remove
(prefix netip.Prefix, peer *Peer)
device/allowedips.go:259
↓ 5 callers
Method
SendHandshakeInitiation
(isRetry bool)
device/send.go:98
↓ 5 callers
Function
checksumNoFold
TODO: Explore SIMD and/or other assembly optimizations.
tun/checksum.go:9
↓ 5 callers
Function
getSrcFromControl
getSrcFromControl parses the control for PKTINFO and if found updates ep with the source information found.
conn/sticky_linux.go:50
↓ 5 callers
Function
mixKey
(dst, c *[blake2s.Size]byte, data []byte)
device/noise-protocol.go:234
↓ 5 callers
Function
pseudoHeaderChecksumNoFold
(protocol uint8, srcAddr, dstAddr []byte, totalLen uint16)
tun/checksum.go:95
↓ 5 callers
Function
setSrcControl
setSrcControl sets an IP{V6}_PKTINFO in control based on the source address and source ifindex found in ep. control's len will be set to 0 in the even
conn/sticky_linux.go:100
↓ 5 callers
Function
tcp4PacketMutateIPFields
(srcIPPort, dstIPPort netip.AddrPort, flags header.TCPFlags, segmentSize, seq uint32, ipFn func(*header.IPv4Fi
tun/offload_linux_test.go:96
↓ 5 callers
Function
udp4PacketMutateIPFields
(srcIPPort, dstIPPort netip.AddrPort, payloadLen int, ipFn func(*header.IPv4Fields))
tun/offload_linux_test.go:31
↓ 4 callers
Method
BatchSize
BatchSize is the number of buffers expected to be passed to the ReceiveFuncs, and the maximum expected to be passed to SendBatch.
conn/conn.go:57
↓ 4 callers
Method
BeginSymmetricSession
* Derives a new keypair from the current handshake state * */
device/noise-protocol.go:612
↓ 4 callers
Method
Bind
()
device/device.go:438
↓ 4 callers
Method
CheckMAC1
(msg []byte)
device/cookie.go:69
↓ 4 callers
Method
CloseAndZero
()
conn/bind_windows.go:182
↓ 4 callers
Function
DequeueCompletion
(cq Cq, results []Result)
conn/winrio/rio_windows.go:200
↓ 4 callers
Method
DialContextTCPAddrPort
(ctx context.Context, addr netip.AddrPort)
tun/netstack/tun.go:208
next →
1–100 of 712, ranked by callers