MCPcopy Create free account

hub / github.com/WireGuard/wireguard-rs / functions

Functions320 in github.com/WireGuard/wireguard-rs

↓ 82 callersMethodlock
(&self)
src/configuration/config.rs:41
↓ 37 callersMethodlen
(&self)
src/wireguard/handshake/device.rs:70
↓ 32 callersMethodpush
(&self, job: J)
src/wireguard/router/queue.rs:40
↓ 31 callersMethodget
Enables lookup by public key without exposing internal peer type.
src/wireguard/handshake/device.rs:83
↓ 31 callersMethodwrite
(&self, _buf: &[u8], _dst: &mut UnitEndpoint)
src/platform/dummy/udp.rs:57
↓ 30 callersMethodparse
(bytes: B)
src/wireguard/handshake/messages.rs:93
↓ 30 callersMethodread
(&self, _buf: &mut [u8])
src/platform/dummy/udp.rs:49
↓ 20 callersMethodclone
(&self)
src/wireguard/wireguard.rs:83
↓ 19 callersFunctionnow
()
src/wireguard/handshake/timestamp.rs:9
↓ 12 callersMethodclone
(&self)
src/wireguard/router/send.rs:30
↓ 12 callersFunctionsafe_cast
(v: &mut T)
src/platform/linux/udp.rs:128
↓ 12 callersMethodtimers
(&self)
src/wireguard/peer.rs:77
↓ 10 callersMethoditer
Enables enumeration of (public key, opaque) pairs without exposing internal peer type.
src/wireguard/handshake/device.rs:76
↓ 10 callersMethodprocess
Process a CookieReply message # Arguments - reply: CookieReply to process # Returns Can fail if the cookie reply fails to validate (either indicat
src/wireguard/handshake/macs.rs:141
↓ 9 callersMethodclone
(&self)
src/wireguard/router/peer.rs:78
↓ 8 callersMethodclear
(&mut self)
src/wireguard/handshake/device.rs:65
↓ 8 callersMethodopaque
(&self)
src/wireguard/router/peer.rs:368
↓ 7 callersMethodlocal_id
(&self)
src/wireguard/types.rs:53
↓ 7 callersMethodreset
(&self)
src/wireguard/router/tests/bench.rs:37
↓ 6 callersMethodadd_allowed_ip
Map a subnet to the peer # Arguments - `ip`, the mask of the subnet - `masklen`, the length of the mask # Note The `ip` must not have any bits set
src/wireguard/router/peer.rs:519
↓ 6 callersMethodadd_keypair
Add a new keypair # Arguments - new: The new confirmed/unconfirmed key pair # Returns A vector of ids which has been released. These should be rel
src/wireguard/router/peer.rs:436
↓ 6 callersMethodconsume
(&self)
src/wireguard/router/queue.rs:44
↓ 6 callersFunctionmake_packet
(size: usize, src: IpAddr, dst: IpAddr, id: u64)
src/wireguard/tests.rs:15
↓ 6 callersMethodrelease
Release an id back to the pool # Arguments `id` - The (sender) id to release
src/wireguard/handshake/device.rs:268
↓ 6 callersMethodremove
(&self, value: &T)
src/wireguard/router/route.rs:62
↓ 6 callersMethodsend
(&self, v: T)
src/wireguard/queue.rs:29
↓ 5 callersMethodbegin
Begin a new handshake # Arguments `pk` - Public key of peer to initiate handshake for
src/wireguard/handshake/device.rs:278
↓ 5 callersFunctiondummy_keypair
(initiator: bool)
src/wireguard/router/tests/mod.rs:24
↓ 5 callersMethodinsert
(&self, ip: IpAddr, cidr: u32, value: T)
src/wireguard/router/route.rs:40
↓ 5 callersMethodnew_peer
Adds a new peer to the device # Returns A atomic ref. counted peer (with liftime matching the device)
src/wireguard/router/device.rs:172
↓ 5 callersMethodnext
(&mut self)
src/wireguard/handshake/device.rs:52
↓ 5 callersMethodpacket_send_queued_handshake_initiation
(&self, is_retry: bool)
src/wireguard/timers.rs:225
↓ 5 callersMethodrecv
Receive an encrypted transport message # Arguments - src: Source address of the packet - msg: Encrypted transport message # Returns
src/wireguard/router/device.rs:211
↓ 5 callersFunctionsetsockopt_int
( fd: RawFd, level: libc::c_int, name: libc::c_int, value: libc::c_int, )
src/platform/linux/udp.rs:108
↓ 4 callersFunctionhammer
(queue: &Arc<Queue<TestJob>>, cnt: Arc<AtomicUsize>)
src/wireguard/router/queue.rs:124
↓ 4 callersMethodlog
(&self, e: E)
src/wireguard/router/tests/tests.rs:35
↓ 4 callersFunctionpad
(msg: &[u8])
src/wireguard/router/tests/mod.rs:18
↓ 4 callersMethodremove
Remove a peer by public key To remove public keys, you must create a new machine instance # Arguments `pk` - The public key of the peer to remove #
src/wireguard/handshake/device.rs:213
↓ 4 callersMethodsend
(t: &Self::Opaque, size: usize, sent: bool, _keypair: &Arc<KeyPair>, _counter: u64)
src/wireguard/router/tests/tests.rs:104
↓ 4 callersMethodset_outbound_writer
Set outbound writer
src/wireguard/router/device.rs:253
↓ 4 callersMethodtimers_any_authenticated_packet_traversal
Should be called before a packet with authentication, whether * keepalive, data, or handshake is sent, or after one is received. */
src/wireguard/timers.rs:173
↓ 3 callersMethodadd
Add a new public key to the state machine To remove public keys, you must create a new machine instance # Arguments `pk` - The public key to add `id
src/wireguard/handshake/device.rs:174
↓ 3 callersMethodadd_tun_reader
(&self, reader: T::Reader)
src/wireguard/wireguard.rs:251
↓ 3 callersMethodadd_udp_reader
Begin consuming messages from the reader. Multiple readers can be added to support multi-queue and individual Ipv6/Ipv4 sockets interfaces Any previo
src/wireguard/wireguard.rs:240
↓ 3 callersMethodallow
(&self, addr: &IpAddr)
src/wireguard/handshake/ratelimiter.rs:48
↓ 3 callersMethodclone
(&self)
src/wireguard/router/device.rs:58
↓ 3 callersFunctionnew_peer
( device: Device<E, C, T, B>, opaque: C::Opaque, )
src/wireguard/router/peer.rs:187
↓ 3 callersFunctionprofiler_stop
()
src/main.rs:30
↓ 3 callersMethodsend_keepalive
(&self)
src/wireguard/router/peer.rs:500
↓ 3 callersMethodsend_raw
Send a raw message to the peer (used for handshake messages) # Arguments - `msg`, message body to send to peer # Returns Unit if packet was sent,
src/wireguard/router/peer.rs:225
↓ 3 callersMethodset_endpoint
Set the endpoint of the peer # Arguments - `endpoint`, socket address converted to bind endpoint # Note This API still permits support for the "st
src/wireguard/router/peer.rs:363
↓ 3 callersMethodset_key
(&self, sk: Option<StaticSecret>)
src/wireguard/wireguard.rs:185
↓ 3 callersMethodset_sk
Update the secret key of the device # Arguments `sk` - x25519 scalar representing the local private key
src/wireguard/handshake/device.rs:134
↓ 3 callersMethodset_writer
(&self, writer: B::Writer)
src/wireguard/wireguard.rs:247
↓ 3 callersMethodtimers_any_authenticated_packet_sent
Should be called after any type of authenticated packet is sent, whether: * - keepalive * - data * - handshake */
src/wireguard/timers.rs:112
↓ 3 callersMethodtimers_mut
(&self)
src/wireguard/peer.rs:82
↓ 3 callersMethodup
Brings the WireGuard device up. Usually called when the associated interface is brought up.
src/wireguard/wireguard.rs:153
↓ 3 callersFunctionwait
()
src/wireguard/handshake/tests.rs:52
↓ 2 callersFunctionCMSG_LEN
(len: usize)
src/platform/linux/udp.rs:123
↓ 2 callersMethodadd_peer
(&self, pk: PublicKey)
src/wireguard/wireguard.rs:205
↓ 2 callersFunctionaddr_to_mac_bytes
(addr: &SocketAddr)
src/wireguard/handshake/macs.rs:95
↓ 2 callersMethodallocate
Internal function Allocated a new receiver identifier for the peer. Implemented via rejection sampling.
src/wireguard/handshake/device.rs:463
↓ 2 callersMethodcheck_mac1
Check the mac1 field against the inner message # Arguments - inner: The inner message covered by the mac1 field - macs: The mac footer
src/wireguard/handshake/macs.rs:264
↓ 2 callersMethodcheck_mac2
(&self, inner: &[u8], src: &SocketAddr, macs: &MacsFooter)
src/wireguard/handshake/macs.rs:273
↓ 2 callersMethodclear_src
(&self)
src/wireguard/router/peer.rs:542
↓ 2 callersMethodcontains_key
(&self, pk: &PublicKey)
src/wireguard/handshake/device.rs:87
↓ 2 callersMethodcreate_cookie_reply
( &self, rng: &mut R, receiver: u32, // receiver id of incoming message
src/wireguard/handshake/macs.rs:237
↓ 2 callersFunctionerrno
()
src/platform/linux/udp.rs:71
↓ 2 callersFunctionfork_and_exit
()
src/util.rs:31
↓ 2 callersMethodgenerate
Generate both mac fields for an inner message # Arguments - inner: A byteslice representing the inner message to be covered - macs: The destination
src/wireguard/handshake/macs.rs:165
↓ 2 callersMethodget_peers
(&self)
src/configuration/config.rs:354
↓ 2 callersFunctioninit
()
src/wireguard/router/tests/mod.rs:14
↓ 2 callersMethodinto_address
(&self)
src/platform/linux/udp.rs:168
↓ 2 callersMethodlookup_id
Internal function Return the peer currently associated with the receiver identifier
src/wireguard/handshake/device.rs:445
↓ 2 callersFunctionmax
(a: usize, b: usize)
src/wireguard/handshake/messages.rs:26
↓ 2 callersFunctionmessage_data_len
(payload: usize)
src/wireguard/router/mod.rs:30
↓ 2 callersFunctionmin
(a: usize, b: usize)
src/wireguard/workers.rs:49
↓ 2 callersMethodparallel_work
(&self)
src/wireguard/router/send.rs:59
↓ 2 callersMethodparse_line
(&mut self, key: &str, value: &str)
src/configuration/uapi/set.rs:55
↓ 2 callersMethodqueue
(&self)
src/wireguard/router/send.rs:55
↓ 2 callersFunctionreadline
read string up to maximum length (why is this not in std?)
src/configuration/uapi/mod.rs:19
↓ 2 callersMethodrecv
(t: &Self::Opaque, size: usize, sent: bool, _keypair: &Arc<KeyPair>)
src/wireguard/router/tests/tests.rs:108
↓ 2 callersMethodremove_peer
(&self, peer: &PublicKey)
src/configuration/config.rs:299
↓ 2 callersMethodsend
Encrypt and send a message to the peer Arguments: - `msg` : A padded vector holding the message (allows in-place construction of the transport heade
src/wireguard/router/peer.rs:252
↓ 2 callersMethodsend_staged
Transmit all staged packets
src/wireguard/router/peer.rs:301
↓ 2 callersMethodset_fwmark
(&self, mark: Option<u32>)
src/configuration/config.rs:281
↓ 2 callersMethodset_psk
Add a psk to the peer # Arguments `pk` - The public key of the peer `psk` - The psk to set / unset # Returns The call might fail if the public key
src/wireguard/handshake/device.rs:235
↓ 2 callersFunctionsetsockopt
( fd: RawFd, level: libc::c_int, name: libc::c_int, value: &V, )
src/platform/linux/udp.rs:82
↓ 2 callersFunctionsetup_devices
( rng1: &mut R, rng2: &mut R, rng3: &mut R, )
src/wireguard/handshake/tests.rs:17
↓ 2 callersFunctionstart_listener
( mut cfg: MutexGuard<Inner<T, B>>, )
src/configuration/config.rs:195
↓ 2 callersMethodtimers_handshake_complete
Should be called after a handshake response message is received and processed * or when getting key confirmation via the first data message.
src/wireguard/timers.rs:146
↓ 2 callersMethodzero_keys
Zero all key-material related to the peer
src/wireguard/router/peer.rs:383
↓ 1 callersFunctionCMSG_ALIGN
(len: usize)
src/platform/linux/udp.rs:118
↓ 1 callersMethodadd_allowed_ip
(&self, peer: &PublicKey, ip: IpAddr, masklen: u32)
src/configuration/config.rs:329
↓ 1 callersMethodadd_peer
(&self, peer: &PublicKey)
src/configuration/config.rs:303
↓ 1 callersMethodcheck
Returns true if check is passed, i.e., not a replay or too old. Unlike RFC 6479, zero is allowed.
src/wireguard/router/anti_replay.rs:50
↓ 1 callersMethodcheck_replay_flood
Set the mutable state of the peer conditioned on the timestamp being newer # Arguments st_new - The updated state of the peer ts_new - The associate
src/wireguard/handshake/peer.rs:87
↓ 1 callersMethodcheck_route
(&self, peer: &T, packet: &[u8])
src/wireguard/router/route.rs:117
↓ 1 callersMethodclear_peers
(&self)
src/wireguard/wireguard.rs:177
↓ 1 callersMethodclear_sending_keys
A new secret key has been set for the device. According to WireGuard semantics, this should cause all "sending" keys to be discarded.
src/wireguard/router/device.rs:162
next →1–100 of 320, ranked by callers