From: zhanglx on
hello,

I have some questions about net subsystem.

Does the kernel code store the IP address of local machine, in which variable?

If there are two net cards, then there will be two IP and MAC address, how will the kernel store them? When there are two net cards, which card will the PC use to connect to net.

Does the webbrowser such as Firefox also use the series of functions( sock(), connect(), send(),receive()...) to connect to internet?

Thanks,
zhanglx
From: Américo Wang on
On Thu, Jul 22, 2010 at 09:21:30AM +0800, zhanglx wrote:
>hello,
>
>I have some questions about net subsystem.
>
>Does the kernel code store the IP address of local machine, in which variable?


Yes, it is in a per-interface struct, you must be interested in how
SIOCGIFADDR is handled.

>
>If there are two net cards, then there will be two IP and MAC address, how will the kernel store them? When there are two net cards, which card will the PC use to connect to net.
>


This depends on your route table. :)


>Does the webbrowser such as Firefox also use the series of functions( sock(), connect(), send(),receive()...) to connect to internet?
>

Sure.

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