Operating System - Tru64 Unix
1752815 Members
6109 Online
108789 Solutions
New Discussion

Address in use after get_interface_addr()

 
Don Burt_2
Occasional Contributor

Address in use after get_interface_addr()

I have an application on Tru64 (5.1B, rev 2650) that opens a datagram socket. The user can optionally specify an interface. If so, get_interface_addr() is called to resolve the name to an address, which is supplied to the socket open. Otherwise it is opened with the wildcard address. In both cases a fixed port is applied

When an interface is supplied, the socket open fails with "Address is already in use", errno 48. When no interface is supplied it opens successfully. It certainly appears that the get_interface_addr() is causing the "in use" condition, because it is the only system call differing in the two paths. Can that be true?, and if so, what can I do about it?