/smoltcp-0.9.1/src/iface/interface/ |
D | ipv6.rs | 108 ip_repr: IpRepr, in process_icmpv6() 113 &ip_repr.src_addr(), in process_icmpv6() 114 &ip_repr.dst_addr(), in process_icmpv6() 127 if icmp_socket.accepts(self, &ip_repr, &icmp_repr.into()) { in process_icmpv6() 128 icmp_socket.process(self, &ip_repr, &icmp_repr.into()); in process_icmpv6() 139 } => match ip_repr { in process_icmpv6() 157 Icmpv6Repr::Ndisc(repr) if ip_repr.hop_limit() == 0xff => match ip_repr { in process_icmpv6() 179 ip_repr: Ipv6Repr, in process_ndisc() 188 let ip_addr = ip_repr.src_addr.into(); in process_ndisc() 221 ip_repr.src_addr.into(), in process_ndisc() [all …]
|
D | mod.rs | 338 pub(crate) fn ip_repr(&self) -> IpRepr { in ip_repr() method 347 IpPacket::Raw((ip_repr, _)) => ip_repr.clone(), in ip_repr() 349 IpPacket::Udp((ip_repr, _, _)) => ip_repr.clone(), in ip_repr() 351 IpPacket::Tcp((ip_repr, _)) => ip_repr.clone(), in ip_repr() 911 neighbor_addr = Some(response.ip_repr().dst_addr()); in socket_egress() 1311 ip_repr: &IpRepr, in raw_socket_filter() 1321 if raw_socket.accepts(ip_repr) { in raw_socket_filter() 1322 raw_socket.process(self, ip_repr, ip_payload); in raw_socket_filter() 1359 ip_repr: IpRepr, in process_udp() 1370 if udp_socket.accepts(self, &ip_repr, &udp_repr) { in process_udp() [all …]
|
D | ipv4.rs | 68 let ip_repr = IpRepr::Ipv4(ipv4_repr); in process_ipv4() localVariable 71 let handled_by_raw_socket = self.raw_socket_filter(sockets, &ip_repr, ip_payload); in process_ipv4() 88 let (src_addr, dst_addr) = (ip_repr.src_addr(), ip_repr.dst_addr()); in process_ipv4() 122 IpProtocol::Icmp => self.process_icmpv4(sockets, ip_repr, ip_payload), in process_ipv4() 139 ip_repr, in process_ipv4() 148 IpProtocol::Tcp => self.process_tcp(sockets, ip_repr, ip_payload), in process_ipv4() 238 ip_repr: IpRepr, in process_icmpv4() 252 if icmp_socket.accepts(self, &ip_repr, &icmp_repr.into()) { in process_icmpv4() 253 icmp_socket.process(self, &ip_repr, &icmp_repr.into()); in process_icmpv4() 271 match ip_repr { in process_icmpv4()
|
D | tests.rs | 333 let ip_repr = IpRepr::Ipv4(Ipv4Repr { in test_icmp_error_port_unreachable() localVariable 344 &ip_repr.src_addr(), in test_icmp_error_port_unreachable() 345 &ip_repr.dst_addr(), in test_icmp_error_port_unreachable() 382 .process_udp(&mut sockets, ip_repr, udp_repr, false, &UDP_PAYLOAD, data), in test_icmp_error_port_unreachable() 386 let ip_repr = IpRepr::Ipv4(Ipv4Repr { in test_icmp_error_port_unreachable() localVariable 397 &ip_repr.src_addr(), in test_icmp_error_port_unreachable() 410 ip_repr, in test_icmp_error_port_unreachable() 450 let ip_repr = IpRepr::Ipv6(Ipv6Repr { in test_handle_udp_broadcast() localVariable 458 let ip_repr = IpRepr::Ipv4(Ipv4Repr { in test_handle_udp_broadcast() localVariable 474 &ip_repr.src_addr(), in test_handle_udp_broadcast() [all …]
|
D | sixlowpan.rs | 273 let ip_repr = packet.ip_repr(); in dispatch_ieee802154() localVariable 275 let (src_addr, dst_addr) = match (ip_repr.src_addr(), ip_repr.dst_addr()) { in dispatch_ieee802154() 317 hop_limit: ip_repr.hop_limit(), in dispatch_ieee802154() 328 let mut _uncompressed_headers_len = ip_repr.header_len(); in dispatch_ieee802154() 427 pkt.sixlowpan.datagram_size = (packet.ip_repr().payload_len() + 40) as u16; in dispatch_ieee802154()
|
/smoltcp-0.9.1/src/socket/ |
D | icmp.rs | 372 pub(crate) fn accepts(&self, cx: &mut Context, ip_repr: &IpRepr, icmp_repr: &IcmpRepr) -> bool { in accepts() 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() 441 pub(crate) fn process(&mut self, _cx: &mut Context, ip_repr: &IpRepr, icmp_repr: &IcmpRepr) { in process() 449 .enqueue(icmp_repr.buffer_len(), ip_repr.src_addr()) in process() 466 .enqueue(icmp_repr.buffer_len(), ip_repr.src_addr()) in process() 469 &ip_repr.src_addr(), in process() 470 &ip_repr.dst_addr(), in process() 518 let ip_repr = IpRepr::Ipv4(Ipv4Repr { in dispatch() localVariable 525 emit(cx, (ip_repr, IcmpRepr::Ipv4(repr))) in dispatch() [all …]
|
D | udp.rs | 373 pub(crate) fn accepts(&self, _cx: &mut Context, ip_repr: &IpRepr, repr: &UdpRepr) -> bool { in accepts() 378 && self.endpoint.addr != Some(ip_repr.dst_addr()) in accepts() 379 && !ip_repr.dst_addr().is_broadcast() in accepts() 380 && !ip_repr.dst_addr().is_multicast() in accepts() 391 ip_repr: &IpRepr, in process() 395 debug_assert!(self.accepts(cx, ip_repr, repr)); in process() 400 addr: ip_repr.src_addr(), in process() 458 let ip_repr = IpRepr::new( in dispatch() localVariable 465 emit(cx, (ip_repr, repr, payload_buf)) in dispatch() 650 socket.dispatch(&mut cx, |_, (ip_repr, udp_repr, payload)| { in test_send_dispatch() [all …]
|
D | raw.rs | 280 pub(crate) fn accepts(&self, ip_repr: &IpRepr) -> bool { in accepts() 281 if ip_repr.version() != self.ip_version { in accepts() 284 if ip_repr.next_header() != self.ip_protocol { in accepts() 291 pub(crate) fn process(&mut self, cx: &mut Context, ip_repr: &IpRepr, payload: &[u8]) { in process() 292 debug_assert!(self.accepts(ip_repr)); in process() 294 let header_len = ip_repr.header_len(); in process() 306 ip_repr.emit(&mut buf[..header_len], &cx.checksum_caps()); in process() 524 socket.dispatch(&mut cx, |_, (ip_repr, ip_payload)| { 525 assert_eq!(ip_repr, $hdr); 534 socket.dispatch(&mut cx, |_, (ip_repr, ip_payload)| { [all …]
|
D | dns.rs | 340 pub(crate) fn accepts(&self, ip_repr: &IpRepr, udp_repr: &UdpRepr) -> bool { in accepts() 345 .any(|server| *server == ip_repr.src_addr())) in accepts() 352 ip_repr: &IpRepr, in process() 356 debug_assert!(self.accepts(ip_repr, udp_repr)); in process() 363 ip_repr.src_addr(), in process() 589 let ip_repr = IpRepr::new( in dispatch() localVariable 600 ip_repr.dst_addr(), in dispatch() 604 emit(cx, (ip_repr, udp_repr, payload))?; in dispatch()
|
D | dhcpv4.rs | 279 ip_repr: &Ipv4Repr, in process() 283 let src_ip = ip_repr.src_addr; in process() 744 (ip_repr, udp_repr, dhcp_repr): (Ipv4Repr, UdpRepr, DhcpRepr), in send() argument 748 net_trace!("send: {:?}", ip_repr); in send() 757 s.socket.process(&mut s.cx, &ip_repr, &udp_repr, &payload) in send() 768 .dispatch(&mut s.cx, |_, (mut ip_repr, udp_repr, dhcp_repr)| { in recv() 769 assert_eq!(ip_repr.next_header, IpProtocol::Udp); in recv() 771 ip_repr.payload_len, in recv() 776 ip_repr.payload_len = 0; in recv() 778 net_trace!("recv: {:?}", ip_repr); in recv() [all …]
|
D | tcp.rs | 1168 pub(crate) fn reply(ip_repr: &IpRepr, repr: &TcpRepr) -> (IpRepr, TcpRepr<'static>) { in reply() 1183 ip_repr.dst_addr(), in reply() 1184 ip_repr.src_addr(), in reply() 1192 pub(crate) fn rst_reply(ip_repr: &IpRepr, repr: &TcpRepr) -> (IpRepr, TcpRepr<'static>) { in rst_reply() 1195 let (ip_reply_repr, mut reply_repr) = Self::reply(ip_repr, repr); in rst_reply() 1208 fn ack_reply(&mut self, ip_repr: &IpRepr, repr: &TcpRepr) -> (IpRepr, TcpRepr<'static>) { in ack_reply() 1209 let (mut ip_reply_repr, mut reply_repr) = Self::reply(ip_repr, repr); in ack_reply() 1268 ip_repr: &IpRepr, in challenge_ack_reply() 1278 return Some(self.ack_reply(ip_repr, repr)); in challenge_ack_reply() 1281 pub(crate) fn accepts(&self, _cx: &mut Context, ip_repr: &IpRepr, repr: &TcpRepr) -> bool { in accepts() [all …]
|
/smoltcp-0.9.1/src/wire/ |
D | ipv6.rs | 730 let (ip_repr, payload) = match Packet::new_checked(buffer) { in pretty_print() 734 Ok(ip_repr) => { in pretty_print() 736 (ip_repr, ip_packet.payload()) in pretty_print() 741 pretty_print_ip_payload(f, indent, ip_repr, payload) in pretty_print()
|
D | ndiscoption.rs | 471 let ip_repr = Ipv6Repr::parse(&ip_packet)?; in parse() localVariable 473 header: ip_repr, in parse() 475 [field::REDIRECTED_RESERVED.len() + ip_repr.buffer_len()..], in parse()
|
D | ipv4.rs | 770 let (ip_repr, payload) = match Packet::new_checked(buffer) { in pretty_print() 774 Ok(ip_repr) => { in pretty_print() 787 (ip_repr, ip_packet.payload()) in pretty_print() 793 pretty_print_ip_payload(f, indent, ip_repr, payload) in pretty_print()
|
D | ip.rs | 805 ip_repr: T, in pretty_print_ip_payload() 816 let repr = ip_repr.into(); in pretty_print_ip_payload()
|