Hi All,
Thanks for the reply.
Let me explain once again. I will be getting udp packets on my machine say 192.168.1.1 (eth1). I will verify this using
tcpdump
command. The output would look like this.
tcpdump -i eth1 dst 225.1.1.152
tcpdump: verbose output suppressed, use -v or -vv for full protocol de
+code
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
+
00:54:45.314015 IP 192.0.0.152.sieve > 225.1.1.152.sieve: UDP, length
+1316
00:54:45.314234 IP 192.0.0.152.sieve > 225.1.1.152.sieve: UDP, length
+1316
00:54:45.314580 IP 192.0.0.152.sieve > 225.1.1.152.sieve: UDP, length
+1316
00:54:45.314768 IP 192.0.0.152.sieve > 225.1.1.152.sieve: UDP, length
+1316
Now 'tcpdump' is a tool which can snif tcp/udp packets, to show that its is coming in properly. I can't every time login to system and run tcpdump and redirect the output to some file, parse the file, extract packet and see whether its fine or not. So i was thinking some script in Perl i can write to automate this. I don't want to use | (pipe) to tcpdump, get the output to a file etc. All i wanted to know is there any way in Perl to see packets are coming in to system? , say bind to system ip , listen for perticular port , check any data is coming in from destination ip etc(Some body told me about Socket programin, i thought i should try that before giving up on Perl). Since i am a newbie.. , Please guide me what kind of packages, tools do i need to use to achive this.
Your help is appreciated...
Thanks
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.