Results 1 to 1 of 1
Hi,
suppose I am working on a multiple network interface machine and doing socket programming. The code runs
as
sockfd =socket(AF_INET,SOCK_STREAM,0);
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = inet_addr("172.16.28.200");
servaddr.sin_port=htons(32000);
bind(listenfd,(struct sockaddr ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-10-2007 #1Just Joined!
- Join Date
- Dec 2006
- Posts
- 7
How the kernel maps from IP address to the network interface .
Hi,
suppose I am working on a multiple network interface machine and doing socket programming. The code runs
asI 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.sockfd =socket(AF_INET,SOCK_STREAM,0);
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = inet_addr("172.16.28.200");
servaddr.sin_port=htons(32000);
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.?


Reply With Quote
