How the kernel maps from IP address to the network interface .
suppose I am working on a multiple network interface machine and doing socket programming. The code runs
I want to ask how the kernel resolve that a particular IP address is given to a particular interface..Is it that kernel refers to a system file that stores a mapping from IP address to network interface. Can you please tell me where that file is stored in case of Red Hat 9 linux version 2.4.x>=20.
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = inet_addr("172.16.28.200");
bind(listenfd,(struct sockaddr *)&servaddr,sizeof(servaddr));
In case the interfaces pickup the IP addresses from dhcp , from where the machine gets the address of dhcp server at time of booting ?? and where the IP address got stored after the machine gets IP address.?