MCPcopy Create free account

hub / github.com/RingLinkPlatform/RingLink / functions

Functions127 in github.com/RingLinkPlatform/RingLink

↓ 22 callersMethodclone
(&self)
src/network.rs:378
↓ 13 callersMethodid
Get peer device id
src/peer.rs:85
↓ 8 callersMethodinsert
insert a new entry into the ARP table
examples/tunnel/ethernet/arp.rs:42
↓ 4 callersMethodclone
(&self)
src/topology.rs:210
↓ 3 callersMethodget_peer
Get a peer by id
src/topology.rs:90
↓ 3 callersMethodid
Get network id
src/network.rs:115
↓ 3 callersMethodremove
(&self, mac: MAC)
examples/tunnel/ethernet/arp.rs:51
↓ 2 callersMethodadd_peer
Add a peer to topology, return peer if success
src/topology.rs:96
↓ 2 callersMethodas_ref
(&self)
examples/tunnel/ethernet/mac.rs:31
↓ 2 callersFunctiondecrypt
Decrypt data with ChaCha20-Poly1305 # Arguments `key` - secret key `data` - data to decrypt `iv` - iv used to encrypt data # Returns `Ok(decrypted_d
src/crypto.rs:64
↓ 2 callersFunctionencrypt
Encrypt data with ChaCha20-Poly1305 # Arguments `key` - secret key `data` - data to encrypt # Returns `Ok((encrypted_data, iv))` - encrypted data an
src/crypto.rs:36
↓ 2 callersMethodexecute_peer
Execute a closure with a peer in this network # Returns None if peer is not in this network
src/network.rs:191
↓ 2 callersFunctionprint_identity
Print identity public keys to stdout
examples/tunnel/tunnel.rs:181
↓ 2 callersMethodsend_data
Send data packet to a peer in this network # Arguments `target` - target device id `data` - data to send
src/network.rs:225
↓ 2 callersFunctionsiocsifaddr
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:95
↓ 2 callersMethodsubscribe
Subscribe to data events The listener will be called when a [PacketBody::Data] packet is received
src/network.rs:202
↓ 2 callersMethodverify_kex
(&self, kex: &KeyExchange)
src/peer.rs:112
↓ 2 callersFunctionwrite
(fd: i32, buf: &[u8])
examples/tunnel/tap/bindings.rs:202
↓ 1 callersFunction_IOC
(dir: u32, type_: u32, nr: u32, size: u32)
examples/tunnel/tap/ffi.rs:182
↓ 1 callersMethodadd_ipv4
Set ipv4 address of the TAP device.
examples/tunnel/tap.rs:60
↓ 1 callersMethodadd_ipv6
Set ipv6 address of the TAP device.
examples/tunnel/tap.rs:74
↓ 1 callersMethodadd_member
Add a member to this network Member must be in the topology, otherwise this method will return an error
src/network.rs:134
↓ 1 callersMethodagent
Get underlying agent
src/peer.rs:131
↓ 1 callersMethodbroadcast
Broadcast data packet to all peers in this network # Arguments `data` - data to send
src/network.rs:253
↓ 1 callersMethodconnect
( id: NetId, identity: Identity, topology: Topology<Trans>, )
src/network.rs:84
↓ 1 callersFunctioncreate_tap
Create a tap device with the given configuration # Arguments `mac` - The MAC address for the tap device, can be derived from the identity and network
examples/tunnel/tunnel.rs:306
↓ 1 callersMethoddecrypt
(&self, data: &[u8], iv: &[u8])
src/peer.rs:99
↓ 1 callersMethodencrypt
(&self, data: &[u8])
src/peer.rs:94
↓ 1 callersMethodidentity
Get peer public identity
src/peer.rs:90
↓ 1 callersMethodis_broadcast
(&self)
examples/tunnel/ethernet/mac.rs:56
↓ 1 callersFunctionis_conflict
(old: &PublicIdentity, new: &PublicIdentity)
src/topology.rs:249
↓ 1 callersMethodis_multicast
(&self)
examples/tunnel/ethernet/mac.rs:60
↓ 1 callersFunctionload_identity
Load the identity from the file # Errors Error if the identity file is not found or invalid
examples/tunnel/tunnel.rs:295
↓ 1 callersMethodlookup
lookup a device id by MAC address
examples/tunnel/ethernet/arp.rs:36
↓ 1 callersMethodlookup_method
Lookup a path method for a peer
src/network.rs:182
↓ 1 callersMethodmake_kex
(&self)
src/peer.rs:135
↓ 1 callersMethodon_data
(&self, _device: DeviceID, _data: Bytes)
src/network.rs:53
↓ 1 callersMethodon_peer_state_changed
Called when a peer p2p state changed
src/network.rs:351
↓ 1 callersFunctionopen
bindings to libc open
examples/tunnel/tap/bindings.rs:145
↓ 1 callersMethodopen
open a new tap device use `IFF_MULTI_QUEUE`
examples/tunnel/tap.rs:103
↓ 1 callersFunctionparse_cidr
Parse the ip address and prefix from the given string If the prefix is not provided, default to 32 # Example ```rust fn main() { let cidr = "192.168
examples/tunnel/tunnel.rs:351
↓ 1 callersMethodprocess_data
Process data packet
src/ringlink.rs:130
↓ 1 callersMethodprocess_kex
(&self, kex: KeyExchange)
src/peer.rs:231
↓ 1 callersMethodprocess_kex_request
(&self, kex: KeyExchange)
src/peer.rs:170
↓ 1 callersMethodprocess_kex_response
(&self, kex: KeyExchange)
src/peer.rs:208
↓ 1 callersMethodprocess_local_frame_buff
Process incoming ethernet frame
examples/tunnel/ethernet.rs:101
↓ 1 callersMethodprocess_p2p
Process p2p message
src/ringlink.rs:166
↓ 1 callersMethodprocess_p2p_message
( &self, from: SocketAddr, binding: Binding, )
src/topology.rs:154
↓ 1 callersMethodprocess_remote_packet
Process remote packet from udp socket
src/ringlink.rs:172
↓ 1 callersFunctionread
(fd: i32, buf: &mut [u8])
examples/tunnel/tap/bindings.rs:191
↓ 1 callersMethodread
(&self, buf: &mut [u8])
examples/tunnel/tap.rs:131
↓ 1 callersMethodrefresh_paths_for
Refresh paths for given targets
src/network.rs:322
↓ 1 callersMethodrun
Run socket loop
src/ringlink.rs:192
↓ 1 callersFunctionrun_identity_command
(cmd: IdentityCommand)
examples/tunnel/tunnel.rs:145
↓ 1 callersFunctionrun_network_command
(cmd: NetworkCommand)
examples/tunnel/tunnel.rs:191
↓ 1 callersFunctionrun_ringlink
(config: Config)
examples/tunnel/tunnel.rs:206
↓ 1 callersFunctionselect
(nfds: c_int, rfds: Option<&mut fd_set>, wfds: Option<&mut fd_set>)
examples/tunnel/tap/bindings.rs:173
↓ 1 callersMethodsend_via
Send data to a peer
src/topology.rs:145
↓ 1 callersMethodset_candidates
(&self, candidates: HashSet<Candidate>)
src/peer.rs:117
↓ 1 callersMethodset_flags
(&mut self, flags: i16)
examples/tunnel/tap/ffi.rs:113
↓ 1 callersMethodset_hwaddr
(&mut self, mac: [u8; 6])
examples/tunnel/tap/ffi.rs:117
↓ 1 callersMethodset_ipv4
(&mut self, addr: Ipv4Addr)
examples/tunnel/tap/ffi.rs:129
↓ 1 callersMethodset_ipv4_mask
(&mut self, prefix: u8)
examples/tunnel/tap/ffi.rs:139
↓ 1 callersMethodset_ipv6
(&mut self, addr: Ipv6Addr)
examples/tunnel/tap/ffi.rs:150
↓ 1 callersMethodset_mac
Set mac address of the TAP device.
examples/tunnel/tap.rs:84
↓ 1 callersMethodset_mtu
Set mtu of the TAP device.
examples/tunnel/tap.rs:50
↓ 1 callersFunctionsiocsifflags
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:127
↓ 1 callersFunctionsiocsifhwaddr
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:63
↓ 1 callersFunctionsiocsifmtu
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:79
↓ 1 callersFunctionsiocsifnetmask
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:111
↓ 1 callersFunctionsocket
(domain: c_int, ty: c_int, protocol: c_int)
examples/tunnel/tap/bindings.rs:157
↓ 1 callersMethodstart_kex
(&self)
src/peer.rs:146
↓ 1 callersMethodsubscribe_p2p
(&self)
src/topology.rs:204
↓ 1 callersFunctiontrans_kex
transmit key exchange until got response or stop
src/peer.rs:245
↓ 1 callersFunctiontunsetiff
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:27
↓ 1 callersMethodunsubscribe
Unsubscribe release previous subscribed listener if exists This method has no effect if no listener is subscribed
src/network.rs:214
↓ 1 callersMethodup
(&mut self)
examples/tunnel/tap.rs:93
↓ 1 callersMethodwait_read
(&self)
examples/tunnel/tap.rs:170
↓ 1 callersMethodwatch_p2p
Watch peers p2p state # Arguments `rx` - send device id to add to watch list
src/topology.rs:223
↓ 1 callersMethodwatch_state
(&self)
src/network.rs:355
↓ 1 callersMethodwrite
Writes some bytes to the backend tap device.
examples/tunnel/tap.rs:157
Function_IOW
(type_: u32, nr: u32)
examples/tunnel/tap/ffi.rs:190
Methodas_mut
(&mut self)
examples/tunnel/ethernet/mac.rs:37
Functionclose
(fd: i32)
examples/tunnel/tap/bindings.rs:167
Methodconnect
Connect to a network # Arguments `id` - network id
src/ringlink.rs:98
Methodderef
(&self)
examples/tunnel/tap/ffi.rs:84
Methodderef_mut
(&mut self)
examples/tunnel/tap/ffi.rs:90
Methodderive
compute MAC address from identity and network id
examples/tunnel/ethernet/mac.rs:65
Methoddisconnect
Disconnect from a network
src/ringlink.rs:109
Methodempty
(target: DeviceID, meta: PathMeta)
src/path.rs:47
Methodfmt
(&self, f: &mut Formatter<'_>)
examples/tunnel/ethernet.rs:44
Methodfmt
(&self, f: &mut Formatter<'_>)
examples/tunnel/ethernet/mac.rs:43
Functionfsync
(fd: i32)
examples/tunnel/tap/bindings.rs:212
Methodidentity
Get underlying [Identity]
src/ringlink.rs:85
Functionlistener_fn
Returns a new [`ListenerFn`] with the given closure This lets you build a [`DataListener`] from a closure.
src/network.rs:389
Functionmain
()
examples/tunnel/tunnel.rs:123
Methodmembers
Get all members in this network
src/network.rs:159
Methodnew
( identity: &Identity, peer_identity: PublicIdentity, p2p: &P2PManager<T>, )
src/peer.rs:59
Methodnew
Create a new topology
src/topology.rs:59
Methodnew
Create a new RingLink instance Enable user manually configured RingLink topology # Arguments `identity` - [Identity] `transport` - [Transport] `topo
src/ringlink.rs:61
next →1–100 of 127, ranked by callers