Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RingLinkPlatform/RingLink
/ functions
Functions
127 in github.com/RingLinkPlatform/RingLink
⨍
Functions
127
◇
Types & classes
35
↓ 22 callers
Method
clone
(&self)
src/network.rs:378
↓ 13 callers
Method
id
Get peer device id
src/peer.rs:85
↓ 8 callers
Method
insert
insert a new entry into the ARP table
examples/tunnel/ethernet/arp.rs:42
↓ 4 callers
Method
clone
(&self)
src/topology.rs:210
↓ 3 callers
Method
get_peer
Get a peer by id
src/topology.rs:90
↓ 3 callers
Method
id
Get network id
src/network.rs:115
↓ 3 callers
Method
remove
(&self, mac: MAC)
examples/tunnel/ethernet/arp.rs:51
↓ 2 callers
Method
add_peer
Add a peer to topology, return peer if success
src/topology.rs:96
↓ 2 callers
Method
as_ref
(&self)
examples/tunnel/ethernet/mac.rs:31
↓ 2 callers
Function
decrypt
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 callers
Function
encrypt
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 callers
Method
execute_peer
Execute a closure with a peer in this network # Returns None if peer is not in this network
src/network.rs:191
↓ 2 callers
Function
print_identity
Print identity public keys to stdout
examples/tunnel/tunnel.rs:181
↓ 2 callers
Method
send_data
Send data packet to a peer in this network # Arguments `target` - target device id `data` - data to send
src/network.rs:225
↓ 2 callers
Function
siocsifaddr
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:95
↓ 2 callers
Method
subscribe
Subscribe to data events The listener will be called when a [PacketBody::Data] packet is received
src/network.rs:202
↓ 2 callers
Method
verify_kex
(&self, kex: &KeyExchange)
src/peer.rs:112
↓ 2 callers
Function
write
(fd: i32, buf: &[u8])
examples/tunnel/tap/bindings.rs:202
↓ 1 callers
Function
_IOC
(dir: u32, type_: u32, nr: u32, size: u32)
examples/tunnel/tap/ffi.rs:182
↓ 1 callers
Method
add_ipv4
Set ipv4 address of the TAP device.
examples/tunnel/tap.rs:60
↓ 1 callers
Method
add_ipv6
Set ipv6 address of the TAP device.
examples/tunnel/tap.rs:74
↓ 1 callers
Method
add_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 callers
Method
agent
Get underlying agent
src/peer.rs:131
↓ 1 callers
Method
broadcast
Broadcast data packet to all peers in this network # Arguments `data` - data to send
src/network.rs:253
↓ 1 callers
Method
connect
( id: NetId, identity: Identity, topology: Topology<Trans>, )
src/network.rs:84
↓ 1 callers
Function
create_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 callers
Method
decrypt
(&self, data: &[u8], iv: &[u8])
src/peer.rs:99
↓ 1 callers
Method
encrypt
(&self, data: &[u8])
src/peer.rs:94
↓ 1 callers
Method
identity
Get peer public identity
src/peer.rs:90
↓ 1 callers
Method
is_broadcast
(&self)
examples/tunnel/ethernet/mac.rs:56
↓ 1 callers
Function
is_conflict
(old: &PublicIdentity, new: &PublicIdentity)
src/topology.rs:249
↓ 1 callers
Method
is_multicast
(&self)
examples/tunnel/ethernet/mac.rs:60
↓ 1 callers
Function
load_identity
Load the identity from the file # Errors Error if the identity file is not found or invalid
examples/tunnel/tunnel.rs:295
↓ 1 callers
Method
lookup
lookup a device id by MAC address
examples/tunnel/ethernet/arp.rs:36
↓ 1 callers
Method
lookup_method
Lookup a path method for a peer
src/network.rs:182
↓ 1 callers
Method
make_kex
(&self)
src/peer.rs:135
↓ 1 callers
Method
on_data
(&self, _device: DeviceID, _data: Bytes)
src/network.rs:53
↓ 1 callers
Method
on_peer_state_changed
Called when a peer p2p state changed
src/network.rs:351
↓ 1 callers
Function
open
bindings to libc open
examples/tunnel/tap/bindings.rs:145
↓ 1 callers
Method
open
open a new tap device use `IFF_MULTI_QUEUE`
examples/tunnel/tap.rs:103
↓ 1 callers
Function
parse_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 callers
Method
process_data
Process data packet
src/ringlink.rs:130
↓ 1 callers
Method
process_kex
(&self, kex: KeyExchange)
src/peer.rs:231
↓ 1 callers
Method
process_kex_request
(&self, kex: KeyExchange)
src/peer.rs:170
↓ 1 callers
Method
process_kex_response
(&self, kex: KeyExchange)
src/peer.rs:208
↓ 1 callers
Method
process_local_frame_buff
Process incoming ethernet frame
examples/tunnel/ethernet.rs:101
↓ 1 callers
Method
process_p2p
Process p2p message
src/ringlink.rs:166
↓ 1 callers
Method
process_p2p_message
( &self, from: SocketAddr, binding: Binding, )
src/topology.rs:154
↓ 1 callers
Method
process_remote_packet
Process remote packet from udp socket
src/ringlink.rs:172
↓ 1 callers
Function
read
(fd: i32, buf: &mut [u8])
examples/tunnel/tap/bindings.rs:191
↓ 1 callers
Method
read
(&self, buf: &mut [u8])
examples/tunnel/tap.rs:131
↓ 1 callers
Method
refresh_paths_for
Refresh paths for given targets
src/network.rs:322
↓ 1 callers
Method
run
Run socket loop
src/ringlink.rs:192
↓ 1 callers
Function
run_identity_command
(cmd: IdentityCommand)
examples/tunnel/tunnel.rs:145
↓ 1 callers
Function
run_network_command
(cmd: NetworkCommand)
examples/tunnel/tunnel.rs:191
↓ 1 callers
Function
run_ringlink
(config: Config)
examples/tunnel/tunnel.rs:206
↓ 1 callers
Function
select
(nfds: c_int, rfds: Option<&mut fd_set>, wfds: Option<&mut fd_set>)
examples/tunnel/tap/bindings.rs:173
↓ 1 callers
Method
send_via
Send data to a peer
src/topology.rs:145
↓ 1 callers
Method
set_candidates
(&self, candidates: HashSet<Candidate>)
src/peer.rs:117
↓ 1 callers
Method
set_flags
(&mut self, flags: i16)
examples/tunnel/tap/ffi.rs:113
↓ 1 callers
Method
set_hwaddr
(&mut self, mac: [u8; 6])
examples/tunnel/tap/ffi.rs:117
↓ 1 callers
Method
set_ipv4
(&mut self, addr: Ipv4Addr)
examples/tunnel/tap/ffi.rs:129
↓ 1 callers
Method
set_ipv4_mask
(&mut self, prefix: u8)
examples/tunnel/tap/ffi.rs:139
↓ 1 callers
Method
set_ipv6
(&mut self, addr: Ipv6Addr)
examples/tunnel/tap/ffi.rs:150
↓ 1 callers
Method
set_mac
Set mac address of the TAP device.
examples/tunnel/tap.rs:84
↓ 1 callers
Method
set_mtu
Set mtu of the TAP device.
examples/tunnel/tap.rs:50
↓ 1 callers
Function
siocsifflags
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:127
↓ 1 callers
Function
siocsifhwaddr
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:63
↓ 1 callers
Function
siocsifmtu
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:79
↓ 1 callers
Function
siocsifnetmask
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:111
↓ 1 callers
Function
socket
(domain: c_int, ty: c_int, protocol: c_int)
examples/tunnel/tap/bindings.rs:157
↓ 1 callers
Method
start_kex
(&self)
src/peer.rs:146
↓ 1 callers
Method
subscribe_p2p
(&self)
src/topology.rs:204
↓ 1 callers
Function
trans_kex
transmit key exchange until got response or stop
src/peer.rs:245
↓ 1 callers
Function
tunsetiff
(fd: i32, req: IfReq)
examples/tunnel/tap/bindings.rs:27
↓ 1 callers
Method
unsubscribe
Unsubscribe release previous subscribed listener if exists This method has no effect if no listener is subscribed
src/network.rs:214
↓ 1 callers
Method
up
(&mut self)
examples/tunnel/tap.rs:93
↓ 1 callers
Method
wait_read
(&self)
examples/tunnel/tap.rs:170
↓ 1 callers
Method
watch_p2p
Watch peers p2p state # Arguments `rx` - send device id to add to watch list
src/topology.rs:223
↓ 1 callers
Method
watch_state
(&self)
src/network.rs:355
↓ 1 callers
Method
write
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
Method
as_mut
(&mut self)
examples/tunnel/ethernet/mac.rs:37
Function
close
(fd: i32)
examples/tunnel/tap/bindings.rs:167
Method
connect
Connect to a network # Arguments `id` - network id
src/ringlink.rs:98
Method
deref
(&self)
examples/tunnel/tap/ffi.rs:84
Method
deref_mut
(&mut self)
examples/tunnel/tap/ffi.rs:90
Method
derive
compute MAC address from identity and network id
examples/tunnel/ethernet/mac.rs:65
Method
disconnect
Disconnect from a network
src/ringlink.rs:109
Method
empty
(target: DeviceID, meta: PathMeta)
src/path.rs:47
Method
fmt
(&self, f: &mut Formatter<'_>)
examples/tunnel/ethernet.rs:44
Method
fmt
(&self, f: &mut Formatter<'_>)
examples/tunnel/ethernet/mac.rs:43
Function
fsync
(fd: i32)
examples/tunnel/tap/bindings.rs:212
Method
identity
Get underlying [Identity]
src/ringlink.rs:85
Function
listener_fn
Returns a new [`ListenerFn`] with the given closure This lets you build a [`DataListener`] from a closure.
src/network.rs:389
Function
main
()
examples/tunnel/tunnel.rs:123
Method
members
Get all members in this network
src/network.rs:159
Method
new
( identity: &Identity, peer_identity: PublicIdentity, p2p: &P2PManager<T>, )
src/peer.rs:59
Method
new
Create a new topology
src/topology.rs:59
Method
new
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