Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Magnus Westbergh" <magnus@comcon.se>
To: netfilter@lists.netfilter.org
Subject: capture arp in hook and queue to userspace
Date: Wed, 25 Aug 2004 11:24:30 +0200	[thread overview]
Message-ID: <000201c48a85$59540ae0$0c02a8c0@Comcon2> (raw)

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




             reply	other threads:[~2004-08-25  9:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-25  9:24 Magnus Westbergh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-08-25 10:16 capture arp in hook and queue to userspace aksingh
2004-08-25 15:06 Hudson Delbert J Contr 61 CS/SCBN
2004-08-25 15:09 Piszcz, Justin Michael
2004-08-25 15:17 ` Cedric Blancher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000201c48a85$59540ae0$0c02a8c0@Comcon2' \
    --to=magnus@comcon.se \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox