Date: Mon, 1 Feb 2010 12:02:07 +0100 From: Lukasz Jaroszewski <lvj@nietykalni.org> To: freebsd-hackers@freebsd.org Subject: PFIL: how to get tcp/ip fields from mbuf Message-ID: <3930e0781002010302r3758968cl5f010bd7a585cca4@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello,
I am wondering about most elegant and proper way to get IP header
fields from mbuf, using PFILs. I have read Murat Balaban paper on
PFIL_HOOKS where I found some example function. Question is how can I
access IP header field in such manner.
static int
hisar_chkinput(void *arg, struct mbuf **m, struct ifnet *ifp, int dir,
struct inpcb *inp)
{
in_bytes += (*m)->m_len;
return 0;
}
Regards
LVJ.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3930e0781002010302r3758968cl5f010bd7a585cca4>
