Home
last modified time | relevance | path

Searched refs:frame (Results 1 – 10 of 10) sorted by relevance

/smoltcp-0.9.1/fuzz/fuzz_targets/
Dsixlowpan_packet.rs32 if let Ok(frame) = SixlowpanFragPacket::new_checked(fuzz.data) {
33 if let Ok(repr) = SixlowpanFragRepr::parse(&frame) {
35 let mut frame = SixlowpanFragPacket::new_unchecked(&mut buffer[..]); localVariable
36 repr.emit(&mut frame);
41 if let Ok(frame) = SixlowpanIphcPacket::new_checked(fuzz.data) {
43 &frame,
52 let payload = frame.payload();
58 if let Ok(frame) =
61 if let Ok(repr) = SixlowpanExtHeaderRepr::parse(&frame)
73 if let Ok(frame) =
[all …]
Dieee802154_header.rs6 if let Ok(frame) = Ieee802154Frame::new_checked(data) {
7 if let Ok(repr) = Ieee802154Repr::parse(frame) {
15 let mut frame = Ieee802154Frame::new_unchecked(&mut buffer[..]); localVariable
16 repr.emit(&mut frame);
/smoltcp-0.9.1/src/wire/
Dethernet.rs232 let frame = match Frame::new_checked(buffer) { in pretty_print() localVariable
234 Ok(frame) => frame, in pretty_print()
238 match frame.ethertype() { in pretty_print()
242 super::ArpPacket::<&[u8]>::pretty_print(&frame.payload(), f, indent) in pretty_print()
247 super::Ipv4Packet::<&[u8]>::pretty_print(&frame.payload(), f, indent) in pretty_print()
252 super::Ipv6Packet::<&[u8]>::pretty_print(&frame.payload(), f, indent) in pretty_print()
270 pub fn parse<T: AsRef<[u8]> + ?Sized>(frame: &Frame<&T>) -> Result<Repr> { in parse()
271 frame.check_len()?; in parse()
273 src_addr: frame.src_addr(), in parse()
274 dst_addr: frame.dst_addr(), in parse()
[all …]
Dieee802154.rs810 pub fn emit<T: AsRef<[u8]> + AsMut<[u8]>>(&self, frame: &mut Frame<T>) { in emit()
811 frame.set_frame_type(self.frame_type); in emit()
812 frame.set_security_enabled(self.security_enabled); in emit()
813 frame.set_frame_pending(self.frame_pending); in emit()
814 frame.set_ack_request(self.ack_request); in emit()
815 frame.set_pan_id_compression(self.pan_id_compression); in emit()
816 frame.set_frame_version(self.frame_version); in emit()
819 frame.set_sequence_number(sequence_number); in emit()
823 frame.set_dst_pan_id(dst_pan_id); in emit()
826 frame.set_dst_addr(dst_addr); in emit()
[all …]
/smoltcp-0.9.1/src/iface/interface/
Dipv6.rs15 pub(super) fn process_ipv6<'frame, T: AsRef<[u8]> + ?Sized>( in process_ipv6() argument
18 ipv6_packet: &Ipv6Packet<&'frame T>, in process_ipv6()
19 ) -> Option<IpPacket<'frame>> { in process_ipv6() argument
47 pub(super) fn process_nxt_hdr<'frame>( in process_nxt_hdr()
53 ip_payload: &'frame [u8], in process_nxt_hdr()
54 ) -> Option<IpPacket<'frame>> { in process_nxt_hdr() argument
105 pub(super) fn process_icmpv6<'frame>( in process_icmpv6()
109 ip_payload: &'frame [u8], in process_icmpv6()
110 ) -> Option<IpPacket<'frame>> { in process_icmpv6() argument
177 pub(super) fn process_ndisc<'frame>( in process_ndisc()
[all …]
Dethernet.rs14 pub(super) fn process_ethernet<'frame, T: AsRef<[u8]>>( in process_ethernet() argument
17 frame: &'frame T, in process_ethernet()
18 fragments: &'frame mut FragmentsBuffer, in process_ethernet()
19 ) -> Option<EthernetPacket<'frame>> { in process_ethernet() argument
20 let eth_frame = check!(EthernetFrame::new_checked(frame)); in process_ethernet()
65 let mut frame = EthernetFrame::new_unchecked(tx_buffer); in dispatch_ethernet() localVariable
68 frame.set_src_addr(src_addr); in dispatch_ethernet()
70 f(frame); in dispatch_ethernet()
Dipv4.rs167 pub(super) fn process_arp<'frame, T: AsRef<[u8]>>( in process_arp() argument
170 eth_frame: &EthernetFrame<&'frame T>, in process_arp()
171 ) -> Option<EthernetPacket<'frame>> { in process_arp() argument
235 pub(super) fn process_icmpv4<'frame>( in process_icmpv4()
239 ip_payload: &'frame [u8], in process_icmpv4()
240 ) -> Option<IpPacket<'frame>> { in process_icmpv4() argument
291 pub(super) fn icmpv4_reply<'frame, 'icmp: 'frame>( in icmpv4_reply() argument
295 ) -> Option<IpPacket<'frame>> { in icmpv4_reply() argument
353 let mut frame = EthernetFrame::new_unchecked(tx_buffer); in dispatch_ipv4_frag() localVariable
356 frame.set_src_addr(src_addr); in dispatch_ipv4_frag()
[all …]
Dtests.rs164 let frame = Ipv4Packet::new_unchecked(&bytes); in test_no_icmp_no_unicast_ipv4() localVariable
173 .process_ipv4(&mut sockets, &frame, &mut iface.fragments), in test_no_icmp_no_unicast_ipv4()
198 let frame = Ipv6Packet::new_unchecked(&bytes); in test_no_icmp_no_unicast_ipv6() localVariable
203 assert_eq!(iface.inner.process_ipv6(&mut sockets, &frame), None); in test_no_icmp_no_unicast_ipv6()
223 let frame = Ipv4Packet::new_unchecked(&bytes); in test_icmp_error_no_payload() localVariable
256 .process_ipv4(&mut sockets, &frame, &mut iface.fragments), in test_icmp_error_no_payload()
533 let frame = { in test_handle_ipv4_broadcast() localVariable
563 .process_ipv4(&mut sockets, &frame, &mut iface.fragments), in test_handle_ipv4_broadcast()
717 let mut frame = EthernetFrame::new_unchecked(&mut eth_bytes); in test_handle_valid_arp_request() localVariable
718 frame.set_dst_addr(EthernetAddress::BROADCAST); in test_handle_valid_arp_request()
[all …]
Dmod.rs839 rx_token.consume(|frame| { in socket_ingress()
845 .process_ethernet(sockets, &frame, &mut self.fragments) in socket_ingress()
857 self.inner.process_ip(sockets, &frame, &mut self.fragments) in socket_ingress()
871 .process_ieee802154(sockets, &frame, &mut self.fragments) in socket_ingress()
1284 fn process_ip<'frame, T: AsRef<[u8]>>( in process_ip() argument
1287 ip_payload: &'frame T, in process_ip()
1288 frag: &'frame mut FragmentsBuffer, in process_ip()
1289 ) -> Option<IpPacket<'frame>> { in process_ip() argument
1356 fn process_udp<'frame>( in process_udp()
1362 udp_payload: &'frame [u8], in process_udp()
[all …]
Digmp.rs212 pub(super) fn process_igmp<'frame>( in process_igmp()
215 ip_payload: &'frame [u8], in process_igmp()
216 ) -> Option<IpPacket<'frame>> { in process_igmp() argument