Home
last modified time | relevance | path

Searched refs:new_checked (Results 1 – 25 of 37) sorted by relevance

12

/smoltcp-0.9.1/fuzz/fuzz_targets/
Dsixlowpan_packet.rs32 if let Ok(frame) = SixlowpanFragPacket::new_checked(fuzz.data) {
41 if let Ok(frame) = SixlowpanIphcPacket::new_checked(fuzz.data) {
59 SixlowpanExtHeaderPacket::new_checked(payload)
74 SixlowpanUdpNhcPacket::new_checked(payload)
105 if let Ok(frame) = Ipv6HopByHopHeader::new_checked(payload) {
115 if let Ok(frame) = Icmpv4Packet::new_checked(payload) {
130 if let Ok(frame) = IgmpPacket::new_checked(payload) {
139 if let Ok(frame) = TcpPacket::new_checked(payload) {
158 if let Ok(frame) = UdpPacket::new_checked(payload) {
180 if let Ok(frame) = Ipv6RoutingHeader::new_checked(payload) {
[all …]
Ddhcp_header.rs6 let _ = match DhcpPacket::new_checked(data) {
10 match DhcpPacket::new_checked(&mut dhcp_payload[..]) {
Dieee802154_header.rs6 if let Ok(frame) = Ieee802154Frame::new_checked(data) {
Dtcp_headers.rs82 let tcp_packet = TcpPacket::new_checked(&frame_data[tcp_packet_offset..]).unwrap(); in fuzz_packet()
/smoltcp-0.9.1/src/iface/interface/
Dethernet.rs20 let eth_frame = check!(EthernetFrame::new_checked(frame)); in process_ethernet()
35 let ipv4_packet = check!(Ipv4Packet::new_checked(eth_frame.payload())); in process_ethernet()
42 let ipv6_packet = check!(Ipv6Packet::new_checked(eth_frame.payload())); in process_ethernet()
Dsixlowpan.rs19 let ieee802154_frame = check!(Ieee802154Frame::new_checked(sixlowpan_payload)); in process_ieee802154()
82 self.process_ipv6(sockets, &check!(Ipv6Packet::new_checked(payload))) in process_sixlowpan()
96 let frag = check!(SixlowpanFragPacket::new_checked(payload)); in process_sixlowpan_fragment()
165 let iphc = SixlowpanIphcPacket::new_checked(iphc_payload)?; in decompress_sixlowpan()
183 let udp_packet = SixlowpanUdpNhcPacket::new_checked(iphc.payload())?; in decompress_sixlowpan()
232 let udp_packet = SixlowpanUdpNhcPacket::new_checked(iphc.payload())?; in decompress_sixlowpan()
Dipv6.rs60 let udp_packet = check!(UdpPacket::new_checked(ip_payload)); in process_nxt_hdr()
111 let icmp_packet = check!(Icmpv6Packet::new_checked(ip_payload)); in process_icmpv6()
258 let hbh_pkt = check!(Ipv6HopByHopHeader::new_checked(ip_payload)); in process_hopbyhop()
Dipv4.rs78 let udp_packet = check!(UdpPacket::new_checked(ip_payload)); in process_ipv4()
129 let udp_packet = check!(UdpPacket::new_checked(ip_payload)); in process_ipv4()
172 let arp_packet = check!(ArpPacket::new_checked(eth_frame.payload())); in process_arp()
241 let icmp_packet = check!(Icmpv4Packet::new_checked(ip_payload)); in process_icmpv4()
Dtests.rs1115 let eth_frame = EthernetFrame::new_checked(frame).ok()?; in test_handle_igmp()
1116 Ipv4Packet::new_checked(eth_frame.payload()).ok()? in test_handle_igmp()
1119 Medium::Ip => Ipv4Packet::new_checked(&frame[..]).ok()?, in test_handle_igmp()
1125 let igmp_packet = IgmpPacket::new_checked(ip_payload).ok()?; in test_handle_igmp()
1406 let request_first_part_packet = SixlowpanFragPacket::new_checked(&[ in test_echo_request_sixlowpan_128_bytes()
1418 SixlowpanIphcPacket::new_checked(request_first_part_packet.payload()).unwrap(); in test_echo_request_sixlowpan_128_bytes()
Digmp.rs217 let igmp_packet = check!(IgmpPacket::new_checked(ip_payload)); in process_igmp()
/smoltcp-0.9.1/src/wire/
Dicmpv4.rs195 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() method
421 let ip_packet = Ipv4Packet::new_checked(packet.data())?; in parse()
444 let ip_packet = Ipv4Packet::new_checked(packet.data())?; in parse()
620 let packet = match Packet::new_checked(buffer) { in pretty_print()
698 assert_eq!(Packet::new_checked(&[]), Err(Error)); in test_check_len()
699 assert_eq!(Packet::new_checked(&bytes[..4]), Err(Error)); in test_check_len()
700 assert!(Packet::new_checked(&bytes[..]).is_ok()); in test_check_len()
Dipv6hopbyhop.rs61 pub fn new_checked(buffer: T) -> Result<Header<T>> { in new_checked() method
303 assert_eq!(Header::new_checked(&bytes).unwrap_err(), Error); in test_header_len_overflow()
310 assert_eq!(Header::new_checked(&bytes).unwrap_err(), Error); in test_header_len_overflow()
Dsixlowpan.rs279 pub fn new_checked(buffer: T) -> Result<Self> { in new_checked() method
553 pub fn new_checked(buffer: T) -> Result<Self> { in new_checked() method
1523 pub fn new_checked(buffer: T) -> Result<Self> { in new_checked() method
1742 pub fn new_checked(buffer: T) -> Result<Self> { in new_checked() method
2059 let packet = ExtHeaderPacket::new_checked(&bytes[..]).unwrap(); in ext_header_nhc_fields()
2089 let packet = UdpNhcPacket::new_checked(&bytes[..]).unwrap(); in udp_nhc_fields()
2184 let ieee802154_frame = Ieee802154Frame::new_checked(frame1).unwrap(); in sixlowpan_three_fragments()
2191 frag::Packet::new_checked(ieee802154_frame.payload().unwrap()).unwrap() in sixlowpan_three_fragments()
2214 let ieee802154_frame = Ieee802154Frame::new_checked(frame2).unwrap(); in sixlowpan_three_fragments()
2221 frag::Packet::new_checked(ieee802154_frame.payload().unwrap()).unwrap() in sixlowpan_three_fragments()
[all …]
Dipv6routing.rs154 pub fn new_checked(buffer: T) -> Result<Header<T>> { in new_checked() method
637 let header = Header::new_checked(&BYTES_TYPE2[..]).unwrap(); in test_repr_parse_valid()
641 let header = Header::new_checked(&BYTES_SRH_FULL[..]).unwrap(); in test_repr_parse_valid()
645 let header = Header::new_checked(&BYTES_SRH_ELIDED[..]).unwrap(); in test_repr_parse_valid()
Dndiscoption.rs156 pub fn new_checked(buffer: T) -> Result<NdiscOption<T>> { in new_checked() method
619 match NdiscOption::new_checked(buffer) { in pretty_print()
681 assert_eq!(NdiscOption::new_checked(&[0x00, 0x00]), Err(Error)); in test_short_packet()
683 assert_eq!(NdiscOption::new_checked(&bytes), Err(Error)); in test_short_packet()
Dipv6option.rs99 pub fn new_checked(buffer: T) -> Result<Ipv6Option<T>> { in new_checked() method
317 match Ipv6Option::new_checked(&self.data[self.pos..]) { in next()
439 assert_eq!(Ipv6Option::new_checked(&bytes), Err(Error)); in test_option_deconstruct()
Dethernet.rs111 pub fn new_checked(buffer: T) -> Result<Frame<T>> { in new_checked() method
232 let frame = match Frame::new_checked(buffer) { in pretty_print()
Digmp.rs65 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() method
366 match Packet::new_checked(buffer) { in pretty_print()
Dudp.rs44 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() method
322 match Packet::new_checked(buffer) { in pretty_print()
Darp.rs76 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() method
378 match Packet::new_checked(buffer) { in pretty_print()
Dipv4.rs315 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() method
770 let (ip_repr, payload) = match Packet::new_checked(buffer) { in pretty_print()
874 assert_eq!(Packet::new_checked(&bytes).unwrap_err(), Error); in test_total_len_overflow()
919 assert_eq!(Packet::new_checked(&mut bytes), Err(Error)); in test_parse_total_len_less_than_header_len()
Dipv6.rs454 pub fn new_checked(buffer: T) -> Result<Packet<T>> { in new_checked() method
730 let (ip_repr, payload) = match Packet::new_checked(buffer) { in pretty_print()
1167 assert_eq!(Packet::new_checked(&bytes).unwrap_err(), Error); in test_total_len_overflow()
Dipv6fragment.rs47 pub fn new_checked(buffer: T) -> Result<Header<T>> { in new_checked() method
/smoltcp-0.9.1/examples/
Dmulticast.rs101 Ipv4Packet::new_checked(buf) in main()
102 .and_then(|ipv4_packet| IgmpPacket::new_checked(ipv4_packet.payload())) in main()
Dping.rs205 let icmp_packet = Icmpv4Packet::new_checked(&payload).unwrap(); in main()
218 let icmp_packet = Icmpv6Packet::new_checked(&payload).unwrap(); in main()

12