MCPcopy Create free account

hub / github.com/canndrew/netsim / functions

Functions164 in github.com/canndrew/netsim

↓ 21 callersFunctionspawn
(func: F)
src/namespace.rs:72
↓ 20 callersMethodpush
(self: Pin<&mut Self>, delay: Duration, value: T)
src/adapter/delay.rs:38
↓ 18 callersMethodipv4_header_len
(&self)
src/packet.rs:374
↓ 18 callersMethodsource_addr
(&self)
src/packet.rs:286
↓ 17 callersMethoddestination_addr
(&self)
src/packet.rs:293
↓ 13 callersMethodbuild
Builds the interface. The returned [`IpIface`](crate::IpIface) can be used to send/receive packets to/from this interface. # Panics If there is no t
src/iface/create.rs:105
↓ 11 callersMethodwrite_u16
(&mut self, word: u16)
src/packet.rs:27
↓ 10 callersMethodfix_checksum
(&mut self)
src/packet.rs:378
↓ 10 callersMethodspawn
Executes a future on the machine. The future will start executing immediately. You can use the returned [`JoinHandle`](crate::JoinHandle) to await the
src/machine.rs:67
↓ 9 callersMethodadd_ip_iface
Adds a network interface to the machine. See the [`IpIfaceBuilder`](crate::IpIfaceBuilder) docs for details.
src/machine.rs:83
↓ 9 callersMethodfinish
(self)
src/packet.rs:49
↓ 9 callersMethodipv4_addr
Sets the interface's IPv4 address.
src/iface/create.rs:41
↓ 9 callersMethodipv4_default_route
Adds an IPv4 route for this interface to the machine's routing table and sets it as the default route.
src/iface/create.rs:76
↓ 8 callersMethodcontains
Checks whether this range contains the given IPv4 address.
src/network.rs:101
↓ 8 callersMethodinsert_iface
Insert a `Sink`/`Stream` of IP packets into the hub. Any packet created by this `Stream` will be forwarded to all other inserted `Sink`s and this `Sin
src/device/hub.rs:32
↓ 8 callersMethodnext
(&mut self)
src/network.rs:379
↓ 7 callersMethodstart_send
(self: Pin<&mut Self>, packet: T)
src/device/channel.rs:54
↓ 6 callersFunctionsocket
(domain: libc::c_int, ty: libc::c_int, protocol: libc::c_int)
src/iface/configure.rs:316
↓ 5 callersFunctionconnect
Convenience method for connecting two [`IpSinkStream`](crate::IpSinkStream)s to each other. Packets from either `IpSinkStream` are forwarded to the o
src/connect.rs:7
↓ 5 callersMethodpoll_next
(self: Pin<&mut Self>, cx: &mut task::Context)
src/device/channel.rs:30
↓ 5 callersMethodrandom_addr
Generate a random address in this range and not in any reserved IPv4 range strictly contained within this range.
src/network.rs:141
↓ 4 callersFunctionas_io_error
(err: SendError)
src/device/channel.rs:132
↓ 4 callersMethoddestination_port
(&self)
src/packet.rs:490
↓ 4 callersMethodprotocol_number
(&self)
src/packet.rs:435
↓ 4 callersMethodreset
(&mut self, switch_instant: Instant)
src/adapter/loss.rs:37
↓ 4 callersFunctionround_up
( x: usize, multiple: usize, )
src/iface/configure.rs:63
↓ 4 callersMethodsubnet_mask_bits
The length of the subnet mask.
src/network.rs:122
↓ 4 callersMethodwrite_u32
(&mut self, word: u32)
src/packet.rs:42
↓ 3 callersFunctionas_sockaddr_in6
(ptr: &mut libc::sockaddr)
src/iface/configure.rs:261
↓ 3 callersMethoddispatch_incoming_external
(&mut self, packet: Box<IpPacket>)
src/device/nat/mod.rs:269
↓ 3 callersFunctionexpovariate_duration
( mean_duration: Duration, rng: &mut R, )
src/adapter/mod.rs:15
↓ 3 callersMethodjoin
Wait for the future executing on the machine to complete and get its result. # Returns `Ok(Some(value))` if the future completed normally and return
src/machine.rs:102
↓ 3 callersFunctionnew_req
(iface_name: &str)
src/iface/configure.rs:301
↓ 3 callersMethodpoll_flush
(self: Pin<&mut Self>, cx: &mut task::Context)
src/device/channel.rs:39
↓ 3 callersMethodpoll_ready
(self: Pin<&mut Self>, cx: &mut task::Context)
src/device/channel.rs:44
↓ 3 callersMethodprotocol_box
(self: Box<Ipv4Packet>)
src/packet.rs:315
↓ 3 callersMethodset_destination_addr
(&mut self, addr: Ipv4Addr)
src/packet.rs:369
↓ 3 callersMethodset_source_addr
(&mut self, addr: Ipv4Addr)
src/packet.rs:364
↓ 3 callersMethodversion_box
(self: Box<IpPacket>)
src/packet.rs:251
↓ 3 callersMethodversion_ref
(&self)
src/packet.rs:269
↓ 2 callersMethodadvance
(&mut self)
src/adapter/loss.rs:43
↓ 2 callersMethodbase_addr
The base address of the network range. Not necessarily the same value passed to `Ipv4Network::new` since the address will be masked to zero all bits a
src/network.rs:117
↓ 2 callersMethodcontains_network
Checks whether this range contains the given range.
src/network.rs:109
↓ 2 callersMethodcurrently_dropping
(&self)
src/adapter/loss.rs:56
↓ 2 callersMethoddestination_ip_addr
(&self)
src/packet.rs:480
↓ 2 callersMethodincoming_addr
(&self, port: u16)
src/device/nat/port_map.rs:51
↓ 2 callersMethodincoming_allowed
(&self, external_port: u16, source_addr: SocketAddrV4)
src/device/nat/restrictions.rs:26
↓ 2 callersMethodjoin_inner
(&mut self, ret_rx: oneshot::Receiver<thread::Result<R>>)
src/namespace.rs:30
↓ 2 callersMethodoutgoing_port
(&mut self, internal_addr: SocketAddrV4)
src/device/nat/port_map.rs:20
↓ 2 callersMethodpop
(self: Pin<&mut Self>, cx: &mut task::Context)
src/adapter/delay.rs:56
↓ 2 callersMethodport_restricted
Makes this NAT [port restricted](https://en.wikipedia.org/wiki/Network_address_translation#Methods_of_translation).
src/device/nat/mod.rs:65
↓ 2 callersMethodprotocol_ref
(&self)
src/packet.rs:335
↓ 2 callersFunctionput_up
(iface_name: &str)
src/iface/configure.rs:3
↓ 2 callersMethodsending
(&mut self, external_port: u16, destination_addr: SocketAddrV4)
src/device/nat/restrictions.rs:14
↓ 2 callersMethodseq_number
(&self)
src/packet.rs:508
↓ 2 callersMethodset_destination_port
(&mut self, port: u16)
src/packet.rs:556
↓ 2 callersMethodset_next_switch_instant
(&mut self)
src/adapter/loss.rs:60
↓ 2 callersMethodset_source_port
(&mut self, port: u16)
src/packet.rs:550
↓ 2 callersMethodsource_ip_addr
(&self)
src/packet.rs:476
↓ 2 callersMethodsource_port
(&self)
src/packet.rs:484
↓ 2 callersMethodwith_delay
Delays items sent/received through this `Sink`/`Stream`. `min_delay` is the minimum delay which is applied to all items. `mean_additional_delay` is t
src/stream_ext.rs:11
↓ 2 callersMethodwith_loss
Randomly drops items sent through this `Sink`/`Stream`. `loss_rate` is what proportion of the items to drop. Setting to `1.0` will drop everything, s
src/stream_ext.rs:29
↓ 1 callersMethodack_number
(&self)
src/packet.rs:514
↓ 1 callersFunctionadd_ipv4_route
( iface_name: &str, destination: Ipv4Network, gateway_opt: Option<Ipv4Addr>, )
src/iface/configure.rs:201
↓ 1 callersFunctionadd_ipv6_route
( iface_name: &str, destination: Ipv6Network, next_hop: Ipv6Addr, )
src/iface/configure.rs:251
↓ 1 callersMethodbuild_raw
Builds the interface, returning a raw file descriptor to the interface's TUN device. Unlike [`build`](Self::build) this can be called in non-async con
src/iface/create.rs:112
↓ 1 callersFunctioncreate_tun_interface
(build_config: BuildConfig)
src/iface/create.rs:125
↓ 1 callersMethoddispatch_incoming_internal
(&mut self, iface_index: usize, packet: Box<IpPacket>)
src/device/nat/mod.rs:396
↓ 1 callersMethodflags
(&self)
src/packet.rs:520
↓ 1 callersFunctionfutex
( uaddr: *mut u32, futex_op: c_int, val: u32, timeout: *const libc::timespec, uaddr2: *mut
src/namespace.rs:14
↓ 1 callersFunctionfutex_wait
(ptr: *mut u32, value: u32)
src/namespace.rs:25
↓ 1 callersMethodinto_iter
(self)
src/network.rs:484
↓ 1 callersMethodipv4_route
Adds an IPv4 route for this interface to the machine's routing table.
src/iface/create.rs:57
↓ 1 callersMethodipv4_route_with_gateway
Adds an IPv4 route to the machine's routing table which forwards through this interface via the specified gateway.
src/iface/create.rs:64
↓ 1 callersMethodjoin
(mut self)
src/namespace.rs:58
↓ 1 callersMethodjoin_blocking
Block the current thread, wait for the future executing on the machine the complete and get its result. # Returns `Ok(Some(value))` if the future co
src/machine.rs:118
↓ 1 callersFunctionparse_ipv4_network
(s: &str)
netsim-macros/src/lib.rs:39
↓ 1 callersFunctionparse_ipv6_network
(s: &str)
netsim-macros/src/lib.rs:89
↓ 1 callersMethodpoll
(self: Pin<&mut Self>, cx: &mut task::Context)
src/device/hub.rs:172
↓ 1 callersMethodpoll_flush_outgoing
(&mut self, cx: &mut task::Context)
src/device/hub.rs:42
↓ 1 callersMethodpoll_flush_outgoing
(&mut self, cx: &mut task::Context)
src/device/nat/mod.rs:144
↓ 1 callersMethodpoll_inner
(&mut self, cx: &mut task::Context)
src/device/hub.rs:136
↓ 1 callersMethodpoll_inner
(&mut self, cx: &mut task::Context)
src/device/nat/mod.rs:521
↓ 1 callersMethodpoll_next_incoming
(&mut self, cx: &mut task::Context)
src/device/hub.rs:118
↓ 1 callersMethodpoll_next_incoming_external
(&mut self, cx: &mut task::Context)
src/device/nat/mod.rs:229
↓ 1 callersMethodpoll_next_incoming_internal
(&mut self, cx: &mut task::Context)
src/device/nat/mod.rs:245
↓ 1 callersMethodpoll_ready
(self: Pin<&mut Self>, _cx: &mut task::Context)
src/adapter/delay.rs:148
↓ 1 callersMethodpoll_ready_outgoing
(&mut self, cx: &mut task::Context)
src/device/hub.rs:65
↓ 1 callersMethodpoll_ready_outgoing
(&mut self, cx: &mut task::Context)
src/device/nat/mod.rs:184
↓ 1 callersMethodreply_with_rst_to_unexpected_tcp_packets
(mut self)
src/device/nat/mod.rs:53
↓ 1 callersMethodset_ack_number
(&mut self, ack_number: u32)
src/packet.rs:579
↓ 1 callersMethodset_flags
(&mut self, flags: TcpPacketFlags)
src/packet.rs:535
↓ 1 callersFunctionset_ipv4_addr
( iface_name: &str, ipv4_addr: Ipv4Addr, subnet_mask_bits: u8, )
src/iface/configure.rs:21
↓ 1 callersFunctionset_ipv6_addr
( iface_name: &str, ipv6_addr: Ipv6Addr, subnet_mask_bits: u8, )
src/iface/configure.rs:73
↓ 1 callersMethodstart_send
(self: Pin<&mut Self>, item: T)
src/adapter/delay.rs:152
↓ 1 callersMethodstart_send_outgoing
(&mut self, mut recv_index: usize, packet: Box<IpPacket>)
src/device/hub.rs:93
Methodaddress_restricted
Makes this NAT [address restricted](https://en.wikipedia.org/wiki/Network_address_translation#Methods_of_translation).
src/device/nat/mod.rs:59
Methodbuild
Build the NAT. The returned `IpChannel` is the external interface of the NAT.
src/device/nat/mod.rs:71
Functionclone_cb
(arg: *mut c_void)
src/namespace.rs:105
Functionconnect_to_outside_world
()
src/tests/nat.rs:4
next →1–100 of 164, ranked by callers