* SNAT help
@ 2005-05-09 8:31 cranium2003
2005-05-10 17:12 ` Asim Shankar
0 siblings, 1 reply; 2+ messages in thread
From: cranium2003 @ 2005-05-09 8:31 UTC (permalink / raw)
To: net dev
hello,
I want to execute my code at
NF_IP_POST_ROUTING. For that First i want to know
which functions are executing at NF_IP_POST_ROUTING
Hook. Then i have enabled SNAT and I have wrriten code
at NF_IP_POST_ROUTING but i want to get outgoing
packets' IP address as new one SNAT'ed IP address not
the one that is before SNAT? How can i do that?
I observe that my code and SNAT are executing
at same HOOK NF_IP_POST_ROUTING. But my code is
executed first and then SNAT is doen but how to
reverse that?
regards,
cranium
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: SNAT help
2005-05-09 8:31 SNAT help cranium2003
@ 2005-05-10 17:12 ` Asim Shankar
0 siblings, 0 replies; 2+ messages in thread
From: Asim Shankar @ 2005-05-10 17:12 UTC (permalink / raw)
To: cranium2003; +Cc: net dev
> i have enabled SNAT and I have wrriten code
> at NF_IP_POST_ROUTING but i want to get outgoing
> packets' IP address as new one SNAT'ed IP address not
> the one that is before SNAT? How can i do that?
I think changing the priority (struct nf_hook_ops.priority) when
registering the hook would do your job. ip_nat_out_ops registers a
hook with a priority NF_IP_PRI_NAT_SRC.
If you register your hook with a priority greater than
NF_IP_PRI_NAT_SRC (like (NF_IP_PRI_NAT_SRC + 1) or NF_IP_PRI_LAST)
then your hook will be called after the ip_nat_out_ops hook.
Hope that helps,
-- Asim
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-10 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-09 8:31 SNAT help cranium2003
2005-05-10 17:12 ` Asim Shankar
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).