/smoltcp-0.9.1/src/wire/ |
D | mod.rs | 290 HardwareAddress::Ethernet(addr) => addr.as_bytes(), in as_bytes() 292 HardwareAddress::Ieee802154(addr) => addr.as_bytes(), in as_bytes() 300 HardwareAddress::Ethernet(addr) => addr.is_unicast(), in is_unicast() 302 HardwareAddress::Ieee802154(addr) => addr.is_unicast(), in is_unicast() 310 HardwareAddress::Ethernet(addr) => addr.is_broadcast(), in is_broadcast() 312 HardwareAddress::Ieee802154(addr) => addr.is_broadcast(), in is_broadcast() 319 HardwareAddress::Ethernet(addr) => *addr, in ethernet_or_panic() 328 HardwareAddress::Ieee802154(addr) => *addr, in ieee802154_or_panic() 340 HardwareAddress::Ethernet(addr) => write!(f, "{addr}"), in fmt() 342 HardwareAddress::Ieee802154(addr) => write!(f, "{addr}"), in fmt() [all …]
|
D | ip.rs | 121 Address::Ipv4(addr) => addr.as_bytes(), in as_bytes() 123 Address::Ipv6(addr) => addr.as_bytes(), in as_bytes() 131 Address::Ipv4(addr) => addr.is_unicast(), in is_unicast() 133 Address::Ipv6(addr) => addr.is_unicast(), in is_unicast() 141 Address::Ipv4(addr) => addr.is_multicast(), in is_multicast() 143 Address::Ipv6(addr) => addr.is_multicast(), in is_multicast() 151 Address::Ipv4(addr) => addr.is_broadcast(), in is_broadcast() 161 Address::Ipv4(addr) => addr.is_unspecified(), in is_unspecified() 163 Address::Ipv6(addr) => addr.is_unspecified(), in is_unspecified() 232 fn from(addr: Ipv4Address) -> Self { in from() [all …]
|
D | ndiscoption.rs | 304 pub fn set_link_layer_addr(&mut self, addr: RawHardwareAddress) { in set_link_layer_addr() 306 data[2..2 + addr.len()].copy_from_slice(addr.as_bytes()) in set_link_layer_addr() 357 pub fn set_prefix(&mut self, addr: Ipv6Address) { in set_prefix() 359 data[field::PREFIX].copy_from_slice(addr.as_bytes()); in set_prefix() 504 &Repr::SourceLinkLayerAddr(addr) | &Repr::TargetLinkLayerAddr(addr) => { in buffer_len() 505 let len = 2 + addr.len(); in buffer_len() 524 Repr::SourceLinkLayerAddr(addr) => { in emit() 526 let opt_len = addr.len() + 2; in emit() 528 opt.set_link_layer_addr(addr); in emit() 530 Repr::TargetLinkLayerAddr(addr) => { in emit() [all …]
|
D | ndisc.rs | 260 NdiscOptionRepr::SourceLinkLayerAddr(addr) => lladdr = Some(addr), in parse() 271 NdiscOptionRepr::SourceLinkLayerAddr(addr) => lladdr = Some(addr), in parse() 293 NdiscOptionRepr::SourceLinkLayerAddr(addr) => lladdr = Some(addr), in parse() 307 NdiscOptionRepr::TargetLinkLayerAddr(addr) => lladdr = Some(addr), in parse() 323 NdiscOptionRepr::SourceLinkLayerAddr(addr) => lladdr = Some(addr), in parse() 343 Some(addr) => { in buffer_len() 344 field::UNUSED.end + { NdiscOptionRepr::SourceLinkLayerAddr(addr).buffer_len() } in buffer_len()
|
D | sixlowpan.rs | 81 AddressMode::FullInline(addr) => Ok(ipv6::Address::from_bytes(addr)), in resolve() 100 Some(addr @ LlAddress::Extended(_)) => match addr.as_eui_64() { in resolve() 101 Some(addr) => bytes[8..].copy_from_slice(&addr), in resolve() 147 Some(addr @ LlAddress::Extended(_)) => match addr.as_eui_64() { in resolve() 148 Some(addr) => bytes[8..].copy_from_slice(&addr), in resolve() 1005 .map(|addr| { in set_src_address() 1006 addr.as_eui_64() in set_src_address() 1007 .map(|addr| addr[..] == src[8..]) in set_src_address() 1093 .map(|addr| { in set_dst_address() 1094 addr.as_eui_64() in set_dst_address() [all …]
|
D | ipv6.rs | 364 pub fn contains_addr(&self, addr: &Address) -> bool { in contains_addr() 370 self.address.mask(self.prefix_len) == addr.mask(self.prefix_len) in contains_addr() 866 let addr = Address::new(0x0123, 0x4567, 0x89ab, 0, 0, 0, 0, 1); in test_mask() localVariable 868 addr.mask(11), in test_mask() 872 addr.mask(15), in test_mask() 876 addr.mask(26), in test_mask() 880 addr.mask(128), in test_mask() 884 addr.mask(127), in test_mask() 1033 for addr in inside_subnet.iter().map(|a| Address::from_bytes(a)) { in test_cidr() 1034 assert!(cidr.contains_addr(&addr)); in test_cidr() [all …]
|
D | igmp.rs | 157 pub fn set_group_address(&mut self, addr: Ipv4Address) { in set_group_address() 159 data[field::GROUP_ADDRESS].copy_from_slice(addr.as_bytes()); in set_group_address() 209 let addr = packet.group_addr(); in parse() localVariable 210 if !addr.is_unspecified() && !addr.is_multicast() { in parse() 226 group_addr: addr, in parse()
|
D | mld.rs | 111 pub fn set_mcast_addr(&mut self, addr: Ipv6Address) { in set_mcast_addr() 113 data[field::QUERY_MCAST_ADDR].copy_from_slice(addr.as_bytes()); in set_mcast_addr() 281 pub fn set_mcast_addr(&mut self, addr: Ipv6Address) { in set_mcast_addr() 282 assert!(addr.is_multicast()); in set_mcast_addr() 284 data[field::RECORD_MCAST_ADDR].copy_from_slice(addr.as_bytes()); in set_mcast_addr()
|
D | ipv4.rs | 173 pub fn from_netmask(addr: Address, netmask: Address) -> Result<Cidr> { in from_netmask() 177 address: addr, in from_netmask() 249 pub fn contains_addr(&self, addr: &Address) -> bool { in contains_addr() 257 let addr_prefix = NetworkEndian::read_u32(addr.as_bytes()) >> shift; in contains_addr() 985 for addr in inside_subnet.iter().map(|a| Address::from_bytes(a)) { in test_cidr() 986 assert!(cidr.contains_addr(&addr)); in test_cidr() 989 for addr in outside_subnet.iter().map(|a| Address::from_bytes(a)) { in test_cidr() 990 assert!(!cidr.contains_addr(&addr)); in test_cidr()
|
/smoltcp-0.9.1/src/iface/interface/ |
D | igmp.rs | 28 addr: T, in join_multicast_group() 36 match addr.into() { in join_multicast_group() 37 IpAddress::Ipv4(addr) => { in join_multicast_group() 41 .insert(addr, ()) in join_multicast_group() 46 } else if let Some(pkt) = self.inner.igmp_report_packet(IgmpVersion::Version2, addr) in join_multicast_group() 76 addr: T, in leave_multicast_group() 84 match addr.into() { in leave_multicast_group() 85 IpAddress::Ipv4(addr) => { in leave_multicast_group() 86 let was_not_present = self.inner.ipv4_multicast_groups.remove(&addr).is_none(); in leave_multicast_group() 89 } else if let Some(pkt) = self.inner.igmp_leave_packet(addr) { in leave_multicast_group() [all …]
|
D | mod.rs | 609 pub fn set_hardware_addr(&mut self, addr: HardwareAddress) { in set_hardware_addr() 621 InterfaceInner::check_hardware_addr(&addr); in set_hardware_addr() 622 self.inner.hardware_addr = Some(addr); in set_hardware_addr() 653 pub fn has_ip_addr<T: Into<IpAddress>>(&self, addr: T) -> bool { in has_ip_addr() 654 self.inner.has_ip_addr(addr) in has_ip_addr() 1074 let addr = cidr.address(); in get_source_address() localVariable 1075 if addr.version() == v { in get_source_address() 1076 return Some(addr); in get_source_address() 1198 fn check_hardware_addr(addr: &HardwareAddress) { in check_hardware_addr() 1199 if !addr.is_unicast() { in check_hardware_addr() [all …]
|
D | tests.rs | 266 addrs.iter_mut().next().map(|addr| { in test_local_subnet_broadcasts() 267 *addr = IpCidr::Ipv4(Ipv4Cidr::new(Ipv4Address([192, 168, 1, 23]), 24)); in test_local_subnet_broadcasts() 279 addrs.iter_mut().next().map(|addr| { in test_local_subnet_broadcasts() 280 *addr = IpCidr::Ipv4(Ipv4Cidr::new(Ipv4Address([192, 168, 23, 24]), 16)); in test_local_subnet_broadcasts() 297 addrs.iter_mut().next().map(|addr| { in test_local_subnet_broadcasts() 298 *addr = IpCidr::Ipv4(Ipv4Cidr::new(Ipv4Address([192, 168, 23, 24]), 8)); in test_local_subnet_broadcasts() 929 addrs.iter_mut().next().map(|addr| { in test_arp_flush_after_update_ip() 930 *addr = IpCidr::Ipv4(Ipv4Cidr::new(local_ip_addr_new, 24)); in test_arp_flush_after_update_ip() 1642 addr: IpAddress::Ipv6(Ipv6Address([ in test_sixlowpan_udp_with_fragmentation()
|
D | ipv4.rs | 217 Some(HardwareAddress::Ethernet(addr)) => addr, in process_arp()
|
/smoltcp-0.9.1/src/socket/ |
D | udp.rs | 240 if remote_endpoint.addr.is_unspecified() { in send() 278 if remote_endpoint.addr.is_unspecified() { in send_with() 377 if self.endpoint.addr.is_some() in accepts() 378 && self.endpoint.addr != Some(ip_repr.dst_addr()) in accepts() 400 addr: ip_repr.src_addr(), in process() 432 let src_addr = match endpoint.addr { in dispatch() 433 Some(addr) => addr, in dispatch() 434 None => match cx.get_source_address(remote_endpoint.addr) { in dispatch() 435 Some(addr) => addr, in dispatch() 460 remote_endpoint.addr, in dispatch() [all …]
|
D | dns.rs | 454 RecordData::A(addr) => { in process() 455 net_trace!("A: {:?}", addr); in process() 456 if addresses.push(addr.into()).is_err() { in process() 457 net_trace!("too many addresses in response, ignoring {:?}", addr); in process() 461 RecordData::Aaaa(addr) => { in process() 462 net_trace!("AAAA: {:?}", addr); in process() 463 if addresses.push(addr.into()).is_err() { in process() 464 net_trace!("too many addresses in response, ignoring {:?}", addr); in process()
|
D | icmp.rs | 385 ) if endpoint.addr.is_none() || endpoint.addr == Some(ip_repr.dst_addr()) => { in accepts() 404 ) if endpoint.addr.is_none() || endpoint.addr == Some(ip_repr.dst_addr()) => { in accepts() 498 Some(addr) => addr, in dispatch() 530 Some(addr) => addr, in dispatch() 621 addr: IpAddress::Ipv4(LOCAL_IPV4), 864 addr: IpAddress::Ipv6(LOCAL_IPV6),
|
D | tcp.rs | 778 if remote_endpoint.port == 0 || remote_endpoint.addr.is_unspecified() { in connect() 787 addr: match local_endpoint.addr { in connect() 788 Some(addr) => { in connect() 789 if addr.is_unspecified() { in connect() 792 addr in connect() 795 .get_source_address(remote_endpoint.addr) in connect() 801 if local_endpoint.addr.version() != remote_endpoint.addr.version() { in connect() 1295 ip_repr.dst_addr() == tuple.local.addr in accepts() 1297 && ip_repr.src_addr() == tuple.remote.addr in accepts() 1301 let addr_ok = match self.listen_endpoint.addr { in accepts() [all …]
|
/smoltcp-0.9.1/src/ |
D | parsers.rs | 267 let (mut addr, mut tail) = ([0u16; 8], [0u16; 6]); in accept_ipv6() 271 (&mut addr, &mut tail), in accept_ipv6() 278 addr[8 - tail_idx..].copy_from_slice(&tail[..tail_idx]); in accept_ipv6() 280 Ok(Ipv6Address::from_parts(&addr)) in accept_ipv6() 330 addr: IpAddress::Ipv4(ip), in accept_ipv4_endpoint() 345 addr: IpAddress::Ipv6(ip), in accept_ipv6_endpoint() 351 addr: IpAddress::Ipv6(ip), in accept_ipv6_endpoint() 725 addr: IpAddress::v4(127, 0, 0, 1), in test_endpoint_ipv4() 732 addr: IpAddress::v4(127, 0, 0, 1), in test_endpoint_ipv4() 746 addr: IpAddress::v6(0xfe80, 0, 0, 0, 0, 0, 0, 1), in test_endpoint_ipv6() [all …]
|
/smoltcp-0.9.1/ |
D | Cargo.toml | 85 iface-max-addr-count-1 = [] 86 iface-max-addr-count-2 = [] # Default 87 iface-max-addr-count-3 = [] 88 iface-max-addr-count-4 = [] 89 iface-max-addr-count-5 = [] 90 iface-max-addr-count-6 = [] 91 iface-max-addr-count-7 = [] 92 iface-max-addr-count-8 = []
|
D | README.md | 221 use dashes instead of underscores. For example. `iface-max-addr-count-3`. Only a selection of values 293 sudo ip addr add 192.168.69.100/24 dev tap0 294 sudo ip -6 addr add fe80::100/64 dev tap0 295 sudo ip -6 addr add fdaa::100/64 dev tap0
|
D | CHANGELOG.md | 158 - ndisc: Fix NeighborSolicit incorrectly asking for src addr instead of dst addr ([419](https://git…
|
/smoltcp-0.9.1/src/iface/ |
D | route.rs | 140 pub(crate) fn lookup(&self, addr: &IpAddress, timestamp: Instant) -> Option<IpAddress> { in lookup() 141 assert!(addr.is_unicast()); in lookup() 152 route.cidr.contains_addr(addr) in lookup()
|