* event callback in netfilter-conntrack
@ 2010-08-13 11:39 Pete Kay
2010-08-13 12:56 ` Changli Gao
2010-08-13 13:49 ` Andrew Beverley
0 siblings, 2 replies; 3+ messages in thread
From: Pete Kay @ 2010-08-13 11:39 UTC (permalink / raw)
To: netfilter-devel
Hi,
Does anyone know how to obtain the original sport value from struct
nf_conntrack *ct within the event callback handler?
Any help will be greatly appreciated.
P
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: event callback in netfilter-conntrack
2010-08-13 11:39 event callback in netfilter-conntrack Pete Kay
@ 2010-08-13 12:56 ` Changli Gao
2010-08-13 13:49 ` Andrew Beverley
1 sibling, 0 replies; 3+ messages in thread
From: Changli Gao @ 2010-08-13 12:56 UTC (permalink / raw)
To: Pete Kay; +Cc: netfilter-devel
On Fri, Aug 13, 2010 at 7:39 PM, Pete Kay <petedao@gmail.com> wrote:
> Hi,
>
> Does anyone know how to obtain the original sport value from struct
> nf_conntrack *ct within the event callback handler?
>
> Any help will be greatly appreciated.
>
>From the tuple of the original direction.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: event callback in netfilter-conntrack
2010-08-13 11:39 event callback in netfilter-conntrack Pete Kay
2010-08-13 12:56 ` Changli Gao
@ 2010-08-13 13:49 ` Andrew Beverley
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Beverley @ 2010-08-13 13:49 UTC (permalink / raw)
To: Pete Kay; +Cc: netfilter-devel
> Does anyone know how to obtain the original sport value from struct
> nf_conntrack *ct within the event callback handler?
>
I imagine something like:
port = nfct_get_attr_u16(ct, ATTR_PORT_SRC);
Remember that you may need to use ntohs() to make it readable in the
format you want it.
Regards,
Andy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-13 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-13 11:39 event callback in netfilter-conntrack Pete Kay
2010-08-13 12:56 ` Changli Gao
2010-08-13 13:49 ` Andrew Beverley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).