Hi -
SUGGESTION:
The "id-utils" tools can be ENORMOUSLY helpful for finding stuff in large code bases - it's a bit like having your own private "google" for a source tree:
http://directory.fsf.org/GNU/idutils.html
All you have to do to use it is:
1) Install the GNU "id-utils" on your system (if it's not already there)
2) cd to your toplevel directory (e.g. "/usr/src/linux") and run "mkid" (no arguments, nothing special)
3) Whever you want to look up a function, variable name, constant, struct definition - just run "gid <NAME> | grep <FILTER>"
In this case:
cd /usr/src/linux-2.6.11.4-20a
gid NF_HOOK|less
include/linux/netfilter.h:156:#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) \
... <= MANY OTHER HITS: BUT THIS LINE IS OUR "BINGO!"
or:
gid output|grep skb|less
include/net/dst.h:228: err = skb->dst->output(skb);
net/bridge/br_netfilter.c:160: * skb->dst->output() which will make the packet enter br_nf_local_out()
net/bridge/br_netfilter.c:200: skb->dst->output(skb);
net/ipv4/ip_output.c:217: return dst->neighbour->output(skb);
net/ipv6/ip6_output.c:89: return dst->neighbour->output(skb);
And, finally, we look at line 160 in source file "net/bridge/br_netfilter" (as in "Bridge Netfilter"), and we see:
Quote:
* If skb->dst->dev equals the logical bridge device the packet
* came in on, we can consider this bridging. We then call
* skb->dst->output() which will make the packet enter br_nf_local_out()
* not much later. In that function it is assured that the iptables
* FORWARD chain is traversed for the packet.
|