[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] sniffit



On Sun, 14 November 1999, sudheer@xxxxxxxxxxxxx wrote:
> I have a doubt. suppose the machine has 2 NICs. Then, while opening
> raw socket how can one specify which NIC has to be accessed.
   I dont think a socket is ever associated to a device on the user
side (I may be wrong). I went through the kernel source code some
time back(kern. 2.2.10). The only talk of devices comes (for
PF_PACKET, SOCK_RAW) at /usr/src/linux/net/packet/af_packet.c in
packet_create(). Also, tried a raw socket without turning any intrface
promiscous. The device for normal sockets may be decided based on
the routing table + destination. In a raw socket, all available
packets might be read. For a machine with 2 NICs, if you turn both
cards PROMISC, you might get (extra) packets from both networks
through the same socket...
Bye,
--vml,
Model Engg. College, Cochin


_______________________________________________________
Are you a Techie? Get Your Free Tech Email Address Now!
Many to choose from! Visit http://www.TechEmail.com
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.