How to detect the change of interface address in the socket programming?
- From: jhyda@xxxxxxxxxxxxxxx
- Date: Thu, 13 Mar 2008 08:29:19 -0700 (PDT)
Dear all,
There is a socket programming issue as below. Please help to provide
your good idea for our reference. Thanks!
In our linux system, there are two network cards with two different IP
addresses (for example: 10.1.1.1 and 20.2.2.2). We write a server
program to bind a socket with one of above interfaces (10.1.1.1) for
receiving the requests from any client. After a period of operation,
the IP address of such interface would be chagned from 10.1.1.1 to
30.3.3.3. The original binding for socket would not identify such
change and fail to communicate with client. Is there any good solution
to detect the change of interface address and then re-bind the socket
to new IP address?
Best Regards,
Riker.
.
- Follow-Ups:
- Prev by Date: Re: Dynamic linking with LD_PRELOAD - get it compiled
- Next by Date: Re: Dynamic linking with LD_PRELOAD - get it compiled
- Previous by thread: driver.develop:error: redefinition of '__inittest'
- Next by thread: Re: How to detect the change of interface address in the socket programming?
- Index(es):
Relevant Pages
|