Lines Matching refs:packet
292 let packet = wire::Ipv4Packet::new_unchecked(buf); in read() localVariable
296 addr: wire::IpAddress::Ipv4(packet.src_addr()), in read()
351 let mut packet: wire::Ipv4Packet<&mut Vec<u8>> = in write() localVariable
355 packet.set_version(4); in write()
356 packet.set_header_len(20); in write()
357 packet.set_total_len((20 + len) as u16); in write()
358 packet.set_src_addr(ipv4_src_addr); in write()
359 packet.set_dst_addr(ipv4_dst); in write()
362 packet.set_next_header(socket.ip_protocol().into()); in write()
365 let payload: &mut [u8] = packet.payload_mut(); in write()
369 packet.fill_checksum(); in write()