Home
last modified time | relevance | path

Searched refs:config (Results 1 – 23 of 23) sorted by relevance

/smoltcp-0.9.1/src/phy/
Dfault_injector.rs51 fn refill(&mut self, config: &Config, timestamp: Instant) { in refill()
52 if timestamp - self.refilled_at > config.interval { in refill()
53 self.tx_bucket = config.max_tx_rate; in refill()
54 self.rx_bucket = config.max_rx_rate; in refill()
59 fn maybe_transmit(&mut self, config: &Config, timestamp: Instant) -> bool { in maybe_transmit()
60 if config.max_tx_rate == 0 { in maybe_transmit()
64 self.refill(config, timestamp); in maybe_transmit()
73 fn maybe_receive(&mut self, config: &Config, timestamp: Instant) -> bool { in maybe_receive()
74 if config.max_rx_rate == 0 { in maybe_receive()
78 self.refill(config, timestamp); in maybe_receive()
[all …]
/smoltcp-0.9.1/examples/
Ddhcp_client.rs31 let mut config = Config::new(); in main() localVariable
32 config.random_seed = rand::random(); in main()
34 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
36 let mut iface = Interface::new(config, &mut device); in main()
57 Some(dhcpv4::Event::Configured(config)) => { in main()
60 debug!("IP address: {}", config.address); in main()
61 set_ipv4_addr(&mut iface, config.address); in main()
63 if let Some(router) = config.router { in main()
71 for (i, s) in config.dns_servers.iter().enumerate() { in main()
Dsixlowpan.rs70 let mut config = Config::new(); in main() localVariable
71 config.random_seed = rand::random(); in main()
72 config.hardware_addr = in main()
74 config.pan_id = Some(Ieee802154Pan(0xbeef)); in main()
76 let mut iface = Interface::new(config, &mut device); in main()
Ddns.rs34 let mut config = Config::new(); in main() localVariable
35 config.random_seed = rand::random(); in main()
37 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
40 let mut iface = Interface::new(config, &mut device); in main()
Dclient.rs32 let mut config = Config::new(); in main() localVariable
33 config.random_seed = rand::random(); in main()
35 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
38 let mut iface = Interface::new(config, &mut device); in main()
Dsixlowpan_benchmark.rs150 let mut config = Config::new(); in main() localVariable
151 config.random_seed = rand::random(); in main()
152 config.hardware_addr = in main()
154 config.pan_id = Some(Ieee802154Pan(0xbeef)); in main()
156 let mut iface = Interface::new(config, &mut device); in main()
Dhttpclient.rs32 let mut config = Config::new(); in main() localVariable
33 config.random_seed = rand::random(); in main()
35 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
38 let mut iface = Interface::new(config, &mut device); in main()
Dmulticast.rs31 let mut config = Config::new(); in main() localVariable
32 config.random_seed = rand::random(); in main()
34 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
37 let mut iface = Interface::new(config, &mut device); in main()
Dbenchmark.rs91 let mut config = Config::new(); in main() localVariable
92 config.random_seed = rand::random(); in main()
94 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
97 let mut iface = Interface::new(config, &mut device); in main()
Dserver.rs27 let mut config = Config::new(); in main() localVariable
28 config.random_seed = rand::random(); in main()
30 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
33 let mut iface = Interface::new(config, &mut device); in main()
Dloopback.rs86 let mut config = Config::new(); in main() localVariable
87 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
89 let mut iface = Interface::new(config, &mut device); in main()
Dping.rs108 let mut config = Config::new(); in main() localVariable
109 config.random_seed = rand::random(); in main()
111 config.hardware_addr = Some(EthernetAddress([0x02, 0x00, 0x00, 0x00, 0x00, 0x01]).into()); in main()
114 let mut iface = Interface::new(config, &mut device); in main()
/smoltcp-0.9.1/src/socket/
Ddhcpv4.rs80 config: Config<'static>, field
201 pub fn set_retry_config(&mut self, config: RetryConfig) { in set_retry_config()
202 self.retry_config = config; in set_retry_config()
356 if let Some((config, renew_at, expires_at)) = in process()
360 config, in process()
373 if let Some((config, renew_at, expires_at)) = Self::parse_ack( in process()
377 state.config.server, in process()
387 state.config != config || self.receive_packet_buffer.is_some(); in process()
388 if state.config != config { in process()
389 state.config = config; in process()
[all …]
Ddns.rs7 use crate::config::{DNS_MAX_NAME_SIZE, DNS_MAX_RESULT_COUNT, DNS_MAX_SERVER_COUNT};
/smoltcp-0.9.1/src/
Dlib.rs133 mod config { module
150 mod config { module
/smoltcp-0.9.1/src/iface/interface/
Dtests.rs42 let mut config = Config::new(); in create_ip() localVariable
43 let mut iface = Interface::new(config, &mut device); in create_ip()
67 let mut config = Config::new(); in create_ethernet() localVariable
68 config.hardware_addr = Some(EthernetAddress::default().into()); in create_ethernet()
69 let mut iface = Interface::new(config, &mut device); in create_ethernet()
93 let mut config = Config::new(); in create_ieee802154() localVariable
94 config.hardware_addr = Some(Ieee802154Address::default().into()); in create_ieee802154()
95 let mut iface = Interface::new(config, &mut device); in create_ieee802154()
140 let config = Config::new(); in test_new_panic() localVariable
141 Interface::new(config, &mut device); in test_new_panic()
Dmod.rs33 use crate::config::{
471 pub fn new<D>(config: Config, device: &mut D) -> Self in new()
481 config in new()
488 config.hardware_addr.is_none(), in new()
495 config in new()
501 let mut rand = Rand::new(config.random_seed); in new()
564 pan_id: config.pan_id, in new()
/smoltcp-0.9.1/src/iface/
Dneighbor.rs6 use crate::config::IFACE_NEIGHBOR_CACHE_COUNT;
Droute.rs3 use crate::config::IFACE_MAX_ROUTE_COUNT;
Dfragmentation.rs7 use crate::config::{REASSEMBLY_BUFFER_COUNT, REASSEMBLY_BUFFER_SIZE};
/smoltcp-0.9.1/src/storage/
Dassembler.rs3 use crate::config::ASSEMBLER_MAX_SEGMENT_COUNT;
/smoltcp-0.9.1/
DCHANGELOG.md40 - socket/dhcpv4: indicate new config if there's a packet buffer provided (#685)
DREADME.md224 …X_ADDR_COUNT=3 cargo build`. You can also set them in the `[env]` section of `.cargo/config.toml`.