Home
last modified time | relevance | path

Searched refs:s (Results 1 – 19 of 19) sorted by relevance

/smoltcp-0.9.1/src/socket/
Dtcp.rs1236 if let Some(last_seg_seq) = self.local_rx_last_seq.map(|s| s.0 as u32) { in ack_reply()
1239 .iter_data(reply_repr.ack_number.map(|s| s.0 as usize).unwrap_or(0)) in ack_reply()
1254 .iter_data(reply_repr.ack_number.map(|s| s.0 as usize).unwrap_or(0)) in ack_reply()
2547 let mut s = socket_with_buffer_sizes(tx_len, rx_len); in socket_syn_received_with_buffer_sizes() localVariable
2548 s.state = State::SynReceived; in socket_syn_received_with_buffer_sizes()
2549 s.tuple = Some(TUPLE); in socket_syn_received_with_buffer_sizes()
2550 s.local_seq_no = LOCAL_SEQ; in socket_syn_received_with_buffer_sizes()
2551 s.remote_seq_no = REMOTE_SEQ + 1; in socket_syn_received_with_buffer_sizes()
2552 s.remote_last_seq = LOCAL_SEQ; in socket_syn_received_with_buffer_sizes()
2553 s.remote_win_len = 256; in socket_syn_received_with_buffer_sizes()
[all …]
Ddhcpv4.rs453 .filter(|s| s.is_unicast()) in parse_ack()
742 s: &mut TestSocket, in send()
746 s.cx.set_now(timestamp); in send()
757 s.socket.process(&mut s.cx, &ip_repr, &udp_repr, &payload) in send()
760 fn recv(s: &mut TestSocket, timestamp: Instant, reprs: &[(Ipv4Repr, UdpRepr, DhcpRepr)]) { in recv()
761 s.cx.set_now(timestamp); in recv()
765 while s.socket.poll_at(&mut s.cx) <= PollAt::Time(timestamp) { in recv()
766 let _ = s in recv()
768 .dispatch(&mut s.cx, |_, (mut ip_repr, udp_repr, dhcp_repr)| { in recv()
978 let mut s = Socket::new(); in socket() localVariable
[all …]
Dmod.rs78 Socket::Raw(s) => s.poll_at(cx), in poll_at()
80 Socket::Icmp(s) => s.poll_at(cx), in poll_at()
82 Socket::Udp(s) => s.poll_at(cx), in poll_at()
84 Socket::Tcp(s) => s.poll_at(cx), in poll_at()
86 Socket::Dhcpv4(s) => s.poll_at(cx), in poll_at()
88 Socket::Dns(s) => s.poll_at(cx), in poll_at()
Dudp.rs593 let mut s = socket(buffer(0), buffer(1)); in test_set_hop_limit_zero() localVariable
594 s.set_hop_limit(Some(0)); in test_set_hop_limit_zero()
742 let mut s = socket(buffer(0), buffer(1)); in test_set_hop_limit() localVariable
745 assert_eq!(s.bind(LOCAL_END), Ok(())); in test_set_hop_limit()
747 s.set_hop_limit(Some(0x2a)); in test_set_hop_limit()
748 assert_eq!(s.send_slice(b"abcdef", REMOTE_END), Ok(())); in test_set_hop_limit()
750 s.dispatch(&mut cx, |_, (ip_repr, _, _)| { in test_set_hop_limit()
Dicmp.rs714 let mut s = socket(buffer(0), buffer(1)); in test_set_hop_limit_v4() localVariable
722 s.set_hop_limit(Some(0x2a)); in test_set_hop_limit_v4()
725 s.send_slice(&*packet.into_inner(), REMOTE_IPV4.into()), in test_set_hop_limit_v4()
729 s.dispatch(&mut cx, |_, (ip_repr, _)| { in test_set_hop_limit_v4()
961 let mut s = socket(buffer(0), buffer(1)); in test_set_hop_limit() localVariable
974 s.set_hop_limit(Some(0x2a)); in test_set_hop_limit()
977 s.send_slice(&*packet.into_inner(), REMOTE_IPV6.into()), in test_set_hop_limit()
981 s.dispatch(&mut cx, |_, (ip_repr, _)| { in test_set_hop_limit()
Ddns.rs225 for s in name.split(|&c| c == b'.') { in start_query()
226 if s.len() > 63 { in start_query()
230 if s.is_empty() { in start_query()
237 .push(s.len() as u8) in start_query()
240 .extend_from_slice(s) in start_query()
/smoltcp-0.9.1/fuzz/
Dutils.rs100 .map(|s| u8::from_str(&s).unwrap()) in parse_middleware_options()
104 .map(|s| u8::from_str(&s).unwrap()) in parse_middleware_options()
108 .map(|s| usize::from_str(&s).unwrap()) in parse_middleware_options()
112 .map(|s| u64::from_str(&s).unwrap()) in parse_middleware_options()
116 .map(|s| u64::from_str(&s).unwrap()) in parse_middleware_options()
120 .map(|s| u64::from_str(&s).unwrap()) in parse_middleware_options()
/smoltcp-0.9.1/examples/
Dutils.rs162 .map(|s| u8::from_str(&s).unwrap()) in parse_middleware_options()
166 .map(|s| u8::from_str(&s).unwrap()) in parse_middleware_options()
170 .map(|s| usize::from_str(&s).unwrap()) in parse_middleware_options()
174 .map(|s| u64::from_str(&s).unwrap()) in parse_middleware_options()
178 .map(|s| u64::from_str(&s).unwrap()) in parse_middleware_options()
182 .map(|s| u64::from_str(&s).unwrap()) in parse_middleware_options()
Dping.rs94 .map(|s| usize::from_str(&s).unwrap()) in main()
98 .map(|s| Duration::from_secs(u64::from_str(&s).unwrap())) in main()
103 .map(|s| u64::from_str(&s).unwrap()) in main()
Ddhcp_client.rs71 for (i, s) in config.dns_servers.iter().enumerate() { in main()
72 debug!("DNS server {}: {}", i, s); in main()
/smoltcp-0.9.1/src/
Dparsers.rs381 fn from_str(s: &str) -> Result<EthernetAddress> { in from_str()
382 Parser::new(s).until_eof(|p| p.accept_mac()) in from_str()
391 fn from_str(s: &str) -> Result<Ipv4Address> { in from_str()
392 Parser::new(s).until_eof(|p| p.accept_ipv4()) in from_str()
401 fn from_str(s: &str) -> Result<Ipv6Address> { in from_str()
402 Parser::new(s).until_eof(|p| p.accept_ipv6()) in from_str()
410 fn from_str(s: &str) -> Result<IpAddress> { in from_str()
411 Parser::new(s).until_eof(|p| p.accept_ip()) in from_str()
420 fn from_str(s: &str) -> Result<Ipv4Cidr> { in from_str()
421 Parser::new(s).until_eof(|p| { in from_str()
[all …]
Drand.rs20 let s = self.state.wrapping_mul(M).wrapping_add(A); in rand_u32() localVariable
21 self.state = s; in rand_u32()
23 let shift = 29 - (s >> 61); in rand_u32()
24 (s >> shift) as u32 in rand_u32()
/smoltcp-0.9.1/src/wire/
Dicmp.rs16 fn from(s: icmpv4::Repr<'a>) -> Self { in from()
17 Repr::Ipv4(s) in from()
22 fn from(s: icmpv6::Repr<'a>) -> Self { in from()
23 Repr::Ipv6(s) in from()
Dtcp.rs680 TcpOption::SackRange(s) => s.iter().filter(|s| s.is_some()).count() * 8 + 2, in buffer_len()
719 .filter(|s| s.is_some()) in emit()
721 .for_each(|(i, s)| { in emit()
722 let (first, second) = *s.as_ref().unwrap(); in emit()
952 } else if self.ack_number.is_some() && self.sack_ranges.iter().any(|s| s.is_some()) { in emit()
/smoltcp-0.9.1/utils/
Dpacket2pcap.rs52 let link_type = match matches.opt_str("t").as_ref().map(|s| &s[..]) { in main()
/smoltcp-0.9.1/
DCHANGELOG.md32 - iface: Change neighbor discovery timeout from 3s to 1s, to match Linux's behavior. (#620)
40 - socket/dhcpv4: indicate new config if there's a packet buffer provided (#685)
49 …source IP address unmodified (it was previously replaced with the interface's address if it was un…
89 - TCP: Add Nagle's Algorithm. ([#500](https://github.com/smoltcp-rs/smoltcp/pull/500))
91 - Add Nagle's Algorithm. ([#500](https://github.com/smoltcp-rs/smoltcp/pull/500))
175 - ip: Process broadcast packets directed to the subnet's broadcast address, such as 192.168.1.255. …
DREADME.md121 * Time-wait timeout has a fixed interval of 10 s.
124 * Nagle's algorithm is implemented.
300 It's possible to let _smoltcp_ access Internet by enabling routing for the tap interface:
303 sudo iptables -t nat -A POSTROUTING -s 192.168.69.0/24 -j MASQUERADE
305 sudo ip6tables -t nat -A POSTROUTING -s fdaa::/64 -j MASQUERADE
309 sudo iptables -A FORWARD -i tap0 -s 192.168.69.0/24 -j ACCEPT
319 NOTE: In this case, the examples' IP configuration must match your LAN's!
469 which will sink data. Also, keep-alive packets (every 1 s) and a user timeout (at 2 s)
/smoltcp-0.9.1/.github/workflows/
Dclippy.yml19 - run: sed -n 's,^rust-version = "\(.*\)"$,RUSTUP_TOOLCHAIN=\1,p' Cargo.toml >> $GITHUB_ENV
/smoltcp-0.9.1/src/iface/interface/
Dtests.rs12 fn fill_slice(s: &mut [u8], val: u8) { in fill_slice()
13 for x in s.iter_mut() { in fill_slice()