dev_add_pack() question

From: Rafal Wojtczuk (nergal@7bulls.com)
Date: Wed May 09 2001 - 09:29:06 EST


Hello,
I register a callback function with dev_add_pack() this way:
  memset (&proto, 0, sizeof proto);
  proto.type = htons (ETH_P_ALL);
  proto.func = my_callback_function;
  dev_add_pack (&proto);
my_callback_function() receives all packets with local src/dst IP (including
SNATed ones) as well as all incoming ones, but forwarded outgoing packets are
not passed to my_callback_function(). Looks like AF_PACKET sockets also rely
on dev_add_pack(), yet of course tcpdump (correctly) shows all the packets.
How should I register a callback with dev_add_pack() so that the callback
receives all the packets ?

Save yourself,
Nergal

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 15 2001 - 21:00:16 EST