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
↓ 2 callers
Method
LocalAddr
()
tun/netstack/tun.go:389
↓ 2 callers
Method
Lookup
(addr []byte)
device/allowedips_rand_test.go:60
↓ 2 callers
Method
LookupContextHost
(ctx context.Context, host string)
tun/netstack/tun.go:813
↓ 2 callers
Method
LookupPeer
(pk NoisePublicKey)
device/device.go:341
↓ 2 callers
Method
MTU
MTU returns the MTU of the Device.
tun/tun.go:38
↓ 2 callers
Function
NewChannelTUN
()
tun/tuntest/tuntest.go:91
↓ 2 callers
Method
NewIndexForHandshake
(peer *Peer, handshake *Handshake)
device/indextable.go:58
↓ 2 callers
Function
Notify
(cq Cq)
conn/winrio/rio_windows.go:248
↓ 2 callers
Function
Ping
(dst, src netip.Addr)
tun/tuntest/tuntest.go:17
↓ 2 callers
Method
PrettyName
()
conn/conn.go:92
↓ 2 callers
Method
Push
()
conn/bind_windows.go:45
↓ 2 callers
Method
ReadBatch
([]ipv6.Message, int)
conn/bind_std.go:219
↓ 2 callers
Method
Receive
(buf []byte, isOpen *atomic.Uint32)
conn/bind_windows.go:355
↓ 2 callers
Function
RegisterPointer
(ptr unsafe.Pointer, size uint32)
conn/winrio/rio_windows.go:224
↓ 2 callers
Method
RemoveAllPeers
()
device/device.go:359
↓ 2 callers
Method
RemoveByPeer
(peer *Peer)
device/allowedips_rand_test.go:70
↓ 2 callers
Method
RemovePeer
(key NoisePublicKey)
device/device.go:348
↓ 2 callers
Method
Return
(count uint32)
conn/bind_windows.go:57
↓ 2 callers
Method
SetMark
SetMark sets the mark for each packet sent through this Bind. This mark is passed to the kernel as the socket option SO_MARK.
conn/conn.go:46
↓ 2 callers
Method
SetPrivateKey
(sk NoisePrivateKey)
device/device.go:229
↓ 2 callers
Method
SetReadDeadline
(t time.Time)
tun/netstack/tun.go:473
↓ 2 callers
Method
SetWriteDeadline
(deadline time.Time)
ipc/namedpipe/file.go:236
↓ 2 callers
Function
Socket
(af, typ, proto int32)
conn/winrio/rio_windows.go:147
↓ 2 callers
Method
StagePackets
(elems *QueueOutboundElementsContainer)
device/send.go:318
↓ 2 callers
Method
TUN
()
tun/tuntest/tuntest.go:103
↓ 2 callers
Function
UAPIListen
(name string, file *os.File)
ipc/uapi_linux.go:53
↓ 2 callers
Method
ValidateCounter
ValidateCounter checks if the counter should be accepted. Overlimit counters (>= limit) are always rejected.
replay/replay.go:37
↓ 2 callers
Method
WriteTo
(p []byte, addr net.Addr)
tun/netstack/tun.go:407
↓ 2 callers
Method
ZeroAndFlushAll
()
device/peer.go:214
↓ 2 callers
Function
bindSocketToInterface4
(handle windows.Handle, interfaceIndex uint32)
conn/bind_windows.go:585
↓ 2 callers
Function
bindSocketToInterface6
(handle windows.Handle, interfaceIndex uint32)
conn/bind_windows.go:598
↓ 2 callers
Method
changeState
changeState attempts to change the device state to match want.
device/device.go:139
↓ 2 callers
Function
checkResponse
(reqID uint16, reqQues dnsmessage.Question, respHdr dnsmessage.Header, respQues dnsmessage.Question)
tun/netstack/tun.go:586
↓ 2 callers
Method
cleanup
()
ratelimiter/ratelimiter.go:84
↓ 2 callers
Method
clearPointers
clearPointers clears elem fields that contain pointers. This makes the garbage collector's life easier and avoids accidentally keeping other objects a
device/send.go:72
↓ 2 callers
Method
closeAndZero
()
conn/bind_windows.go:214
↓ 2 callers
Function
closeBindLocked
closeBindLocked closes the device's net.bind. The caller must hold the net mutex.
device/device.go:425
↓ 2 callers
Function
coalesceMessages
(addr *net.UDPAddr, ep *StdNetEndpoint, bufs [][]byte, msgs []ipv6.Message, setGSO setGSOFunc)
conn/bind_std.go:450
↓ 2 callers
Method
downLocked
downLocked attempts to bring the device down. The caller must hold device.state.mu and is responsible for updating device.state.state.
device/device.go:195
↓ 2 callers
Function
ensureEOFOnClose
(t *testing.T, r io.Reader, w io.Closer)
ipc/namedpipe/namedpipe_test.go:308
↓ 2 callers
Function
fastrandn
go:linkname fastrandn runtime.fastrandn
device/timers.go:17
↓ 2 callers
Method
getMessages
()
conn/bind_std.go:209
↓ 2 callers
Function
goroutineLeakCheck
(t *testing.T)
device/device_test.go:395
↓ 2 callers
Function
handleVirtioRead
handleVirtioRead splits in into bufs, leaving offset bytes at the front of each buffer. It mutates sizes to reflect the size of each element of bufs,
tun/tun_linux.go:375
↓ 2 callers
Method
initFromFlags
(name string)
tun/tun_linux.go:511
↓ 2 callers
Function
ipHeadersCanCoalesce
ipHeadersCanCoalesce returns true if the IP headers found in pktA and pktB meet all requirements to be merged as part of a GRO operation, otherwise it
tun/offload_linux.go:279
↓ 2 callers
Function
listenNet
(network string, port int)
conn/bind_std.go:122
↓ 2 callers
Method
lookupOrInsert
lookupOrInsert looks up a flow for the provided packet and metadata, returning the packets found for the flow, or inserting a new one if none is found
tun/offload_linux.go:100
↓ 2 callers
Function
makeFile
makeFile makes a new file from an existing file handle
ipc/namedpipe/file.go:71
↓ 2 callers
Method
makeReceiveFunc
(ch chan []byte)
conn/bindtest/bindtest.go:96
↓ 2 callers
Function
makeServerPipeHandle
(path string, sd *windows.SECURITY_DESCRIPTOR, c *ListenConfig, isFirstPipe bool)
ipc/namedpipe/namedpipe.go:237
↓ 2 callers
Function
newTCPFlowKey
(pkt []byte, srcAddrOffset, dstAddrOffset, tcphOffset int)
tun/offload_linux.go:85
↓ 2 callers
Function
newUDPFlowKey
(pkt []byte, srcAddrOffset, dstAddrOffset, udphOffset int)
tun/offload_linux.go:193
↓ 2 callers
Function
packetIsGROCandidate
(b []byte, canUDPGRO bool)
tun/offload_linux.go:751
↓ 2 callers
Method
putMessages
(msgs *[]ipv6.Message)
conn/bind_std.go:201
↓ 2 callers
Function
randDevice
(t *testing.T)
device/noise_test.go:35
↓ 2 callers
Method
receiveIP
( br batchReader, conn *net.UDPConn, rxOffload bool, bufs [][]byte, sizes []int, eps []Endpoint, )
conn/bind_std.go:226
↓ 2 callers
Method
remove
()
device/allowedips.go:226
↓ 2 callers
Method
removeFromPeerEntries
()
device/allowedips.go:62
↓ 2 callers
Method
reset
()
tun/offload_linux.go:161
↓ 2 callers
Method
send
(conn *net.UDPConn, pc batchWriter, msgs []ipv6.Message)
conn/bind_std.go:412
↓ 2 callers
Method
set
(deadline time.Time)
ipc/namedpipe/file.go:248
↓ 2 callers
Function
splitCoalescedMessages
(msgs []ipv6.Message, firstMsgAt int, getGSO getGSOFunc)
conn/bind_std.go:502
↓ 2 callers
Function
supportsUDPOffload
(conn *net.UDPConn)
conn/features_linux.go:14
↓ 2 callers
Function
tcpGRO
tcpGRO evaluates the TCP packet at pktI in bufs for coalescing with existing packets tracked in table. It returns a groResultNoop when no action was t
tun/offload_linux.go:531
↓ 2 callers
Method
timersHandshakeComplete
* Should be called after a handshake response message is received and processed or when getting key confirmation via the first data message. */
device/timers.go:177
↓ 2 callers
Method
timersSessionDerived
* Should be called after an ephemeral key is created, which is before sending a handshake response or after receiving a handshake response. */
device/timers.go:187
↓ 2 callers
Method
tryOneName
(ctx context.Context, name string, qtype dnsmessage.Type)
tun/netstack/tun.go:746
↓ 2 callers
Function
tunName
(fd uintptr)
tun/tun_freebsd.go:135
↓ 2 callers
Function
udpGRO
udpGRO evaluates the UDP packet at pktI in bufs for coalescing with existing packets tracked in table. It returns a groResultNoop when no action was t
tun/offload_linux.go:786
↓ 2 callers
Function
udpPacketsCanCoalesce
udpPacketsCanCoalesce evaluates if pkt can be coalesced with the packet described by item. iphLen and gsoSize describe pkt. bufs is the vector of pack
tun/offload_linux.go:314
↓ 2 callers
Method
unmarshal
(b []byte)
device/noise-protocol.go:153
↓ 2 callers
Method
update
(packetLen uint64)
tun/tun_windows.go:228
↓ 2 callers
Method
updateAt
(item tcpGROItem, i int)
tun/offload_linux.go:131
↓ 1 callers
Method
Accept
()
ipc/uapi_linux.go:24
↓ 1 callers
Method
Accept
()
ipc/uapi_windows.go:32
↓ 1 callers
Method
BindClose
()
device/device.go:531
↓ 1 callers
Method
BindSetMark
(mark uint32)
device/device.go:444
↓ 1 callers
Method
Close
()
tun/tun_darwin.go:246
↓ 1 callers
Method
Close
()
tun/tun_openbsd.go:246
↓ 1 callers
Method
Close
()
tun/tun_freebsd.go:378
↓ 1 callers
Method
Close
()
device/device.go:370
↓ 1 callers
Method
Close
()
ratelimiter/ratelimiter.go:36
↓ 1 callers
Function
CreateTUNFromFile
(file *os.File, mtu int)
tun/tun_darwin.go:135
↓ 1 callers
Function
CreateTUNFromFile
(file *os.File, mtu int)
tun/tun_openbsd.go:143
↓ 1 callers
Function
CreateTUNFromFile
(file *os.File, mtu int)
tun/tun_freebsd.go:264
↓ 1 callers
Function
CreateTUNWithRequestedGUID
CreateTUNWithRequestedGUID creates a Wintun interface with the given name and a requested GUID. Should a Wintun interface with the same name exist, it
tun/tun_windows.go:68
↓ 1 callers
Function
DeregisterBuffer
(id BufferId)
conn/winrio/rio_windows.go:212
↓ 1 callers
Method
DialContext
(ctx context.Context, network, address string)
tun/netstack/tun.go:957
↓ 1 callers
Method
DialContextTCP
(ctx context.Context, addr *net.TCPAddr)
tun/netstack/tun.go:213
↓ 1 callers
Method
DialTCP
(addr *net.TCPAddr)
tun/netstack/tun.go:226
↓ 1 callers
Method
DialTimeout
DialTimeout connects to the specified named pipe by path, timing out if the connection takes longer than the specified duration. If timeout is zero,
ipc/namedpipe/namedpipe.go:149
↓ 1 callers
Method
EntriesForPeer
(peer *Peer, cb func(prefix netip.Prefix) bool)
device/allowedips.go:213
↓ 1 callers
Method
Equals
(tar NoisePrivateKey)
device/noise-types.go:44
↓ 1 callers
Method
ErrorCode
()
device/uapi.go:37
↓ 1 callers
Method
Events
Events returns a channel of type Event, which is fed Device events.
tun/tun.go:44
↓ 1 callers
Method
ExpireCurrentKeypairs
()
device/peer.go:240
↓ 1 callers
Method
FromMaybeZeroHex
(src string)
device/noise-types.go:54
↓ 1 callers
Method
GetInboundElement
()
device/pools.go:105
↓ 1 callers
Method
GetInboundElementsContainer
()
device/pools.go:69
← previous
next →
201–300 of 712, ranked by callers