Question about net subsystem
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�翳簕.n�+壏煯壄�+%娝�遍荻w�簕.n�+壏{炳G珴�妠ay�蕠跈�,jf"穐殢飦�戧鐉_璁(殠娸"濟�m���G珴�⒏?櫒璀�&x忈秈O曟瑉窔v豝�m����鹅�⒏?朓�
Quoted 5 lines · zhanglx
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.
Quoted 3 lines
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. :)
Quoted 2 lines
Does the webbrowser such as Firefox also use the series of
functions( sock(), connect(), send(),receive()...)to connect to internet?
Sure.
Hope this helps.