RE: capture arp in hook and queue to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



buy a sniffer or check out dug song's modules at monkey.org.

v/r,
~piranha

-----Original Message-----
From: netfilter-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:netfilter-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf Of
aksingh@xxxxxxxxxxx
Sent: Wednesday, August 25, 2004 3:16 AM
To: magnus@xxxxxxxxx
Cc: netfilter@xxxxxxxxxxxxxxxxxxx
Subject: Re: capture arp in hook and queue to userspace






ARP packets are not really IP packets, hence I dont think you can catch
them using netfilter hooks as they sit in the IP layer.

regards
Amit




"Magnus Westbergh" <magnus@xxxxxxxxx>@lists.netfilter.org on 08/25/2004
02:54:30 PM

Please respond to magnus@xxxxxxxxx

Sent by:    netfilter-bounces@xxxxxxxxxxxxxxxxxxx


To:    <netfilter@xxxxxxxxxxxxxxxxxxx>
cc:

Subject:    capture arp in hook and queue to userspace



Hello,

I intend to capture all incoming packets (IP and ARP) and queue them for
userspace using the ip_queue module, and let my userspace application make
all verdicts. I have written a module using netfilter, and successfully
queued all IP-packets, but now I have no clue how to capture the ARP
packets, using this hook...

my_pre.hook        = my_in_hook;
my_pre.hooknum     = NF_IP_PRE_ROUTING;
my_pre.pf          = PF_INET;
my_pre.priority    = NF_IP_PRI_FIRST;

unsigned int my_in_hook( unsigned int hooknum,
                         struct sk_buff **skb,
                         const struct net_device *in,
                         const struct net_device *out,
                         int ( *okfn ) ( struct sk_buff *) )


How does the ARP hook work? What do I have to change to capture all ARP
packets? Please show me an example
Thanks for helping me,

Sincerely Magnus





*****************    HSS-Unclassified    *************



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux