From: Eric Leblond <eric@inl.fr>
To: David Boulding <davidboulding@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: your mail
Date: Mon, 28 Jul 2008 16:14:09 +0200 [thread overview]
Message-ID: <20080728141409.GC27519@khasse.inl.fr> (raw)
In-Reply-To: <009301c8ef85$a7389050$f5a9b0f0$@com>
Hello,
On Saturday, 2008 July 26 at 21:11:08 -0400, David Boulding wrote:
> Hey all,
>
> I'm developing with libnetfilter_queue, using "iptables -A FORWARD ." to
> capture packets of interest on a bridge for analysis (firewall).
> I use nfq_get_payload() to grab everything from the IP layer and on, but I
> was wondering if there was any way to get the raw MAC layer.
> Is there any command like nfq_get_payload() that will return everything
> similar to what you would get using wireshark or ethereal?
You can use nfq_get_packet_hw():
Retrieves the hardware address associated with the given queued packet.
For ethernet packets, the hardware address returned (if any) will be the
MAC address of the packet source host. The destination MAC address is not
known until after POSTROUTING and a successful ARP request, so cannot
currently be retrieved.
The nfqnl_msg_packet_hw structure is defined in "libnetfilter_queue/libnetfilter_queue.h" as:
struct nfqnl_msg_packet_hw {
u_int16_t hw_addrlen;
u_int16_t _pad;
u_int8_t hw_addr[8];
} __attribute__ ((packed));
.
http://lists.netfilter.org/pipermail/netfilter-devel/2006-February/023286.html
BR,
--
Eric Leblond
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
next prev parent reply other threads:[~2008-07-28 14:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-27 1:11 (unknown), David Boulding
2008-07-28 14:14 ` Eric Leblond [this message]
2008-07-28 14:42 ` your mail David Boulding
[not found] ` <5226fb870807280721kaa95f6esc6955cc87da42c18@mail.gmail.com>
2008-07-28 14:43 ` Eric Leblond
2008-07-28 15:33 ` David Boulding
2008-07-29 7:11 ` Eric Leblond
2008-07-29 20:09 ` David Boulding
[not found] <CAK9MGy3D5UBf06OY16UW=c+Cybm67x+0kH_OWJkX7ywdQD9CNA@mail.gmail.com>
2020-06-28 6:27 ` G.W. Haywood
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=20080728141409.GC27519@khasse.inl.fr \
--to=eric@inl.fr \
--cc=davidboulding@gmail.com \
--cc=netfilter@vger.kernel.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