I want to capture packets whoes has a special target ip, then forward these packets by UDP. Does Ruby can do this ? thanks
A:
Packet, you mean? If you want see packets in userspace, not kernel-level then you can use several ways.
- libpcap: libpcap is packet capture library used in tcpdump/wireshark
- libipq: iptables packet queueing library. http://rubyipq.rubyforge.org/ for libipq, there is also ruby binding but it doesn't seems to be in activated. Actually libipq is deprecated by libnetfilter_queue
You can make ruby binding of libnetfilter_queue.
tisphie
2010-10-11 04:25:22
yes, packets :). However, libipq is too old .
why
2010-10-11 04:40:17