Does anyone have an example of reading/writing to ethernet devices for Win32 and Linux? I've seen blurbs about Net::Ethernet, NET::PCap, NET::PcapUtils..... I don't understand how they all work together.
I need to do the same thing tcpdump (Linux) and Ethereal do, read information from an ethernet port and display/modify the data. I need to write an application and not use Ethereal. We will be modifying the TCP/IP data and send it to the hardware we are producing. The ethernet data may be from FTP, TCP/IP, DNS, NTP or any other socket/port combo. I don't want to write a socket app for each combo.
Is this clearer?
2006-10-23 Retitled by Arunbear, as per Monastery guidelines
Original title: 'Ethernet'
As an example:
while data_available_on_ethernet_device
read_data
parse_data
if data_is_what_I_am_looking_for
modify/add to data
format new tcp/ip packet
send/forward packet
else
discard packet
end_while
Thanks for all your help. If I can only resolve the errors with loading Net::Ethernet, Pcap, PcapUtils and libpcap, I could probably get this to work.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.