views:

45

answers:

1

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.

  1. libpcap: libpcap is packet capture library used in tcpdump/wireshark
  2. 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
yes, packets :). However, libipq is too old .
why