PFIL: how to get tcp/ip fields from mbuf
Lukasz Jaroszewski
lvj at nietykalni.org
Mon Feb 1 11:24:47 UTC 2010
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.
More information about the freebsd-hackers
mailing list