Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Creating an ARP Packet

by athomason (Curate)
on Oct 03, 2003 at 21:05 UTC ( #296393=note: print w/ replies, xml ) Need Help??

in reply to Creating an ARP Packet

If you need to use Perl, you'll probably get farthest by using the module hooks into libpcap, which implements raw socket functionality on *NIX and Windows. (A previous discussion of raw sockets in Perl is here).

Glancing at CPAN, there's NetPacket::ARP, but apparently encoding isn't implemented. Still, it shouldn't be too hard to finish that yourself since the meat of the decoder is in a fairly self-documenting call to unpack, which I imagine could be inverted fairly easily. Once you have the encoded packet, one or more of NetPacket::Ethernet, Net::PcapUtils, and Net::RawIP should help you get it on the wire.

Comment on Re: Creating an ARP Packet

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://296393]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2015-11-30 05:46 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (758 votes), past polls