samirpatry has asked for the wisdom of the Perl Monks concerning the following question:


i was create the client/server program and i use the udp protocol .Now i send the session initiation protocol message to a different system i.e. remote address.In ethreal i catch the trace.But i want my program will retrive the send/recv message and store it in a file.so that i can use it in future.i want to know is there any module present which simplify my process.
  • Comment on How to catch all the message of a paticular protocol passed in LAN and store it in a file???

Replies are listed 'Best First'.
Re: How to catch all the message of a paticular protocol passed in LAN and store it in a file???
by bart (Canon) on Sep 01, 2006 at 10:28 UTC
    Corion has written a module that uses Pcap/WinPcap (which is something similar, or even related, to Ethereal) via Net::Pcap to sniff TCP connections, more specifically, HTTP connections: Sniffer::HTTP. I know, I know, you asked about UDP packets... But perhaps you can use it as a basis/inspiration for a tool for your purpose.
Re: How to catch all the message of a paticular protocol passed in LAN and store it in a file???
by aquarium (Curate) on Sep 01, 2006 at 14:34 UTC
    the usual way for any (serious) networking server application is to log requests and responses into a file. this way you'll actually see what got there and what was sent..as UDP is not guaranteed delivery..so a trace is not an accurate measure of the conversation.
    the hardest line to type correctly is: stty erase ^H