MCPcopy Create free account

hub / github.com/WireGuard/wgctrl-go / functions

Functions219 in github.com/WireGuard/wgctrl-go

↓ 49 callersFunctionm
(attrs ...netlink.Attribute)
internal/wglinux/client_linux_test.go:342
↓ 41 callersFunctionMustCIDR
MustCIDR converts CIDR string s into a net.IPNet or panics.
internal/wgtest/wgtest.go:12
↓ 21 callersMethodString
String returns the base64-encoded string representation of a Key. ParseKey can be used to produce a new Key from this string.
wgtypes/types.go:153
↓ 15 callersFunctionMustPublicKey
MustPublicKey generates a public key or panics.
internal/wgtest/wgtest.go:57
↓ 15 callersFunctionmustAllowedIPs
(ipns []net.IPNet)
internal/wglinux/client_linux_test.go:328
↓ 13 callersFunctionMustHexKey
MustHexKey decodes a hex string s as a key or panics.
internal/wgtest/wgtest.go:22
↓ 12 callersMethodDevice
(name string)
internal/wginternal/client.go:19
↓ 9 callersMethodClose
Close implements wginternal.Client.
internal/wguser/client.go:34
↓ 9 callersFunctionsockaddrPort
sockaddrPort interprets port as a big endian uint16 for use passing sockaddr structures to the kernel.
internal/wglinux/configure_linux.go:291
↓ 8 callersMethodClose
Close implements wginternal.Client.
internal/wglinux/client_linux.go:73
↓ 8 callersMethodConfigureDevice
(name string, cfg wgtypes.Config)
internal/wginternal/client.go:20
↓ 8 callersFunctionMustUDPAddr
MustUDPAddr parses s as a UDP address or panics.
internal/wgtest/wgtest.go:62
↓ 7 callersMethodDevices
()
internal/wginternal/client.go:18
↓ 7 callersMethodIP
IP returns IPv4 or IPv6 address, or nil if the address is neither.
internal/wgwindows/internal/ioctl/winipcfg_windows.go:64
↓ 7 callersMethodparseInt
parseInt parses an integer from a string.
internal/wguser/parse.go:201
↓ 6 callersMethodPublicKey
PublicKey computes a public key from the private key k. PublicKey should only be called when k is a private key.
wgtypes/types.go:137
↓ 6 callersFunctionkeyBytes
(s string)
internal/wglinux/configure_linux_test.go:511
↓ 6 callersFunctionpanicf
(format string, a ...interface{})
internal/wgtest/wgtest.go:71
↓ 6 callersFunctiontestClient
(t *testing.T, fn genltest.Func)
internal/wglinux/client_linux_test.go:284
↓ 5 callersMethodDevice
Device implements wginternal.Client.
internal/wgopenbsd/client_openbsd.go:110
↓ 5 callersFunctionNew
New creates a new Client.
internal/wguser/client.go:23
↓ 5 callersFunctionNewKey
NewKey creates a Key from an existing byte slice. The byte slice must be exactly 32 bytes in length.
wgtypes/types.go:112
↓ 5 callersMethodParse
Parse parses a single key/value pair into fields of a Device.
internal/wguser/parse.go:98
↓ 5 callersFunctiontryConfigure
(t *testing.T, c *wgctrl.Client, device string, cfg wgtypes.Config)
client_integration_test.go:410
↓ 4 callersFunctionMustPrivateKey
MustPrivateKey generates a private key or panics.
internal/wgtest/wgtest.go:47
↓ 4 callersFunctionbePort
bePort interprets a port integer stored in native endianness as a big endian value. This is necessary for proper endpoint port handling on little endi
internal/wgopenbsd/client_openbsd.go:338
↓ 4 callersFunctionpanicf
(format string, a ...interface{})
internal/wguser/client.go:97
↓ 4 callersFunctionparseKey
parseKey parses a wgtypes.Key from a byte slice.
internal/wglinux/parse_linux.go:181
↓ 4 callersFunctiontestClient
(t *testing.T, res []byte)
internal/wguser/client_test.go:62
↓ 3 callersMethodClose
Close releases resources used by a Client.
client.go:34
↓ 3 callersFunctionMustPresharedKey
MustPresharedKey generates a preshared key or panics.
internal/wgtest/wgtest.go:37
↓ 3 callersFunctiondevName
(name string)
internal/wgopenbsd/client_openbsd_test.go:333
↓ 3 callersFunctiondeviceName
deviceName infers a device name from an absolute file path with extension.
internal/wguser/client.go:93
↓ 3 callersFunctionfindUNIXSockets
findUNIXSockets looks for UNIX socket files in the specified directories.
internal/wguser/conn_unix.go:29
↓ 3 callersFunctiongenerateIPs
(n int)
internal/wglinux/configure_linux_test.go:516
↓ 3 callersFunctionhexKey
hexKey encodes a wgtypes.Key into a hexadecimal string.
internal/wguser/configure.go:104
↓ 3 callersFunctioninitClient
initClient is the internal Client constructor used in some tests.
internal/wglinux/client_linux.go:50
↓ 3 callersFunctionisValidIP
isValidIP determines if IP is a valid IPv4 or IPv6 address.
internal/wglinux/configure_linux.go:280
↓ 3 callersFunctionpanicf
(format string, a ...interface{})
internal/wgopenbsd/client_openbsd.go:370
↓ 3 callersFunctionpanicf
(format string, a ...interface{})
internal/wglinux/client_linux_test.go:348
↓ 3 callersMethodparseKey
parseKey parses a Key from a hex string.
internal/wguser/parse.go:180
↓ 3 callersFunctionunsafeSlice
unsafeSlice updates the slice slicePtr to be a slice referencing the provided data with its length & capacity set to lenCap. TODO: whenGo 1.17 is the
internal/wgwindows/internal/ioctl/configuration_windows.go:125
↓ 2 callersMethodDevice
Device implements wginternal.Client.
internal/wgfreebsd/client_freebsd.go:117
↓ 2 callersFunctionGenerateKey
GenerateKey generates a Key suitable for use as a pre-shared secret key from a cryptographically safe source. The output Key should not be used as a
wgtypes/types.go:84
↓ 2 callersFunctionGeneratePrivateKey
GeneratePrivateKey generates a Key suitable for use as a private key from a cryptographically safe source.
wgtypes/types.go:95
↓ 2 callersFunctionMarshal
Marshal encodes a Go map to a FreeBSD name-value list (nv(9))
internal/wgfreebsd/internal/nv/encode.go:21
↓ 2 callersFunctionNew
New creates a new Client.
client.go:22
↓ 2 callersFunctionNew
New creates a new Client and returns whether or not the generic netlink interface is available.
internal/wglinux/client_linux.go:32
↓ 2 callersFunctionParseKey
ParseKey parses a Key from a base64-encoded string, as produced by the Key.String method.
wgtypes/types.go:125
↓ 2 callersFunctionUnmarshal
Unmarshal decodes a FreeBSD name-value list (nv(9)) to a Go map
internal/wgfreebsd/internal/nv/decode.go:15
↓ 2 callersFunctioncountPeerIPs
(d *wgtypes.Device)
client_integration_test.go:422
↓ 2 callersFunctiondeviceName
deviceName converts an interface name string to the format required to pass with wgh.WGGetServ.
internal/wgopenbsd/client_openbsd.go:238
↓ 2 callersFunctiondeviceName
deviceName converts an interface name string to the format required to pass with wgh.WGGetServ.
internal/wgfreebsd/client_freebsd.go:219
↓ 2 callersFunctiondiffAttrs
(x, y []netlink.Attribute)
internal/wglinux/client_linux_test.go:308
↓ 2 callersFunctionencodeAllowedIPs
encodeAllowedIPs returns a function to encode allowed IP nested attributes.
internal/wglinux/configure_linux.go:250
↓ 2 callersMethodexecute
execute executes a single WireGuard netlink request with the specified command, header flags, and attribute arguments.
internal/wglinux/client_linux.go:149
↓ 2 callersFunctionfindNamedPipes
findNamedPipes looks for Windows named pipes that match the specified search string prefix.
internal/wguser/conn_windows.go:40
↓ 2 callersMethodgetDevice
The WireGuard userspace configuration protocol is described here: https://www.wireguard.com/xplatform/#cross-platform-userspace-implementation. getDev
internal/wguser/parse.go:22
↓ 2 callersFunctionhtons
(i uint16)
internal/wgwindows/internal/ioctl/winipcfg_windows.go:30
↓ 2 callersFunctionhtons
(i int)
internal/wgfreebsd/client_freebsd.go:264
↓ 2 callersFunctionintPtr
(v int)
internal/wguser/client_test.go:130
↓ 2 callersFunctionintPtr
(v int)
internal/wglinux/client_linux_test.go:346
↓ 2 callersFunctionintegrationClient
(t *testing.T)
client_integration_test.go:102
↓ 2 callersMethodinterfaceHandle
(name string)
internal/wgwindows/client_windows.go:87
↓ 2 callersFunctionioctl
ioctl is a raw wrapper for the ioctl system call.
internal/wgopenbsd/client_openbsd.go:360
↓ 2 callersFunctionioctl
ioctl is a raw wrapper for the ioctl system call.
internal/wgfreebsd/client_freebsd.go:246
↓ 2 callersFunctionisIPv6
isIPv6 determines if IP is a valid IPv6 address.
internal/wglinux/configure_linux.go:285
↓ 2 callersFunctionkeyPtr
(k wgtypes.Key)
wgtypes/types_test.go:114
↓ 2 callersFunctionkeyPtr
(k wgtypes.Key)
internal/wguser/client_test.go:129
↓ 2 callersFunctionkeyPtr
(k wgtypes.Key)
internal/wglinux/client_linux_test.go:345
↓ 2 callersFunctionmustKeyPair
()
wgtypes/types_test.go:105
↓ 2 callersFunctionntohs
(i uint16)
internal/wgwindows/internal/ioctl/winipcfg_windows.go:26
↓ 2 callersFunctionntohs
(i uint16)
internal/wgfreebsd/client_freebsd.go:259
↓ 2 callersMethodparseInt64
parseInt64 parses an int64 from a string.
internal/wguser/parse.go:216
↓ 2 callersFunctionparseRTNLInterfaces
parseRTNLInterfaces unpacks rtnetlink messages and returns WireGuard interface names.
internal/wglinux/client_linux.go:201
↓ 2 callersFunctionparseTimespec
parseTimespec parses a time.Time from raw timespec bytes.
internal/wglinux/parse_linux.go:256
↓ 2 callersMethodrefreshInterfaceCache
()
internal/wgwindows/client_windows.go:41
↓ 2 callersFunctionresetDevice
(t *testing.T, c *wgctrl.Client, d *wgtypes.Device)
client_integration_test.go:393
↓ 1 callersMethodAppendAllowedIP
(allowedIP *AllowedIP)
internal/wgwindows/internal/ioctl/configuration_windows.go:106
↓ 1 callersMethodAppendInterface
(interfaze *Interface)
internal/wgwindows/internal/ioctl/configuration_windows.go:94
↓ 1 callersMethodAppendPeer
(peer *Peer)
internal/wgwindows/internal/ioctl/configuration_windows.go:100
↓ 1 callersMethodClose
Close implements wginternal.Client.
internal/wgopenbsd/client_openbsd.go:59
↓ 1 callersMethodClose
Close implements wginternal.Client.
internal/wgfreebsd/client_freebsd.go:64
↓ 1 callersMethodConfigureDevice
ConfigureDevice configures a WireGuard device by its interface name. Because the zero value of some Go types may be significant to WireGuard for Conf
client.go:87
↓ 1 callersMethodDevice
Device retrieves a WireGuard device by its interface name. If the device specified by name does not exist or is not a WireGuard device, an error is r
client.go:63
↓ 1 callersMethodDevice
Device returns a Device or any errors that were encountered while parsing a Device.
internal/wguser/parse.go:86
↓ 1 callersMethodDevice
Device implements wginternal.Client.
internal/wgwindows/client_windows.go:141
↓ 1 callersMethodDevice
Device implements wginternal.Client.
internal/wglinux/client_linux.go:103
↓ 1 callersMethodDevices
Devices retrieves all WireGuard devices on this system.
client.go:45
↓ 1 callersMethodDevices
Devices implements wginternal.Client.
internal/wgopenbsd/client_openbsd.go:64
↓ 1 callersMethodFirstAllowedIP
()
internal/wgwindows/internal/ioctl/configuration_windows.go:76
↓ 1 callersMethodFirstPeer
()
internal/wgwindows/internal/ioctl/configuration_windows.go:68
↓ 1 callersMethodInterface
()
internal/wgwindows/internal/ioctl/configuration_windows.go:112
↓ 1 callersFunctionNew
New creates a new Client and returns whether or not the ioctl interface is available.
internal/wgopenbsd/client_openbsd.go:38
↓ 1 callersFunctionNew
New creates a new Client
internal/wgwindows/client_windows.go:131
↓ 1 callersFunctionNew
New creates a new Client and returns whether or not the ioctl interface is available.
internal/wgfreebsd/client_freebsd.go:43
↓ 1 callersMethodNextAllowedIP
()
internal/wgwindows/internal/ioctl/configuration_windows.go:80
↓ 1 callersMethodNextPeer
()
internal/wgwindows/internal/ioctl/configuration_windows.go:72
↓ 1 callersMethodPort
Port returns the port if the address if IPv4 or IPv6, or 0 if neither.
internal/wgwindows/internal/ioctl/winipcfg_windows.go:77
↓ 1 callersMethodPreallocate
(size uint32)
internal/wgwindows/internal/ioctl/configuration_windows.go:88
next →1–100 of 219, ranked by callers