New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to convert MutableArpPacket to &[u8] , so that it can be set_payload to MutableEthernetPacket #614
Comments
ether_packet.set_payload(arp_packet.packet()); or ether_packet.set_payload(&arp_buffer); should do the trick |
the new version cannot find MutableArpPacket, it just has Arp, like above and I tried but the same question,how to convert Arp to vec, it's too hard i just want to find all device's ip in LAN |
it's panicking probably because ether_buffer is too small. Try to make it a little larger something like let mut ether_buffer = [0u8; 100]; And see if it still panics. EDIT:
Types like MutableArpPacket, ArpPacket e.t.c are generated with macro magic stuff. This is probably why your IDE couldn't find these types. |
Thing I'm trying to tell: "dealing with @swithun-liu are you sure you are on the right track? (I think you are (because learning) and I think that you should rethink your path to your goal.) |
@stappersg I want to broadcast ff-ff-ff-ff-ff-ff to in Lan, and then the devices send back response, then I will get it's ip |
The text was updated successfully, but these errors were encountered: