From 51deb91ce7222040a8b372b0670f936bf59015a9 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 14 Sep 1999 23:40:02 +0000 Subject: [PATCH] removed fetch of local address for the EPICS_CA_ADDR_LIST --- src/ca/iocinf.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/ca/iocinf.c b/src/ca/iocinf.c index a9e13ceb8..ae6b79a32 100644 --- a/src/ca/iocinf.c +++ b/src/ca/iocinf.c @@ -1701,7 +1701,6 @@ void epicsShareAPI caAddConfiguredAddr(ELLLIST *pList, const ENV_PARAM *pEnv, const char *pStr; const char *pToken; caAddr addr; - caAddr localAddr; char buf[32u]; /* large enough to hold an IP address */ int status; @@ -1710,38 +1709,6 @@ void epicsShareAPI caAddConfiguredAddr(ELLLIST *pList, const ENV_PARAM *pEnv, return; } - /* - * obtain a local non-loopback address - * - * It has proven to be difficult to determine which - * of the local addresses is the correct server address - * to be embedded in beacons from a multi-inteface host - * when the user supplies the beacon destination - * due to routing complexities (a local ip address is - * supplied in the beacon message so that - * we can allow beacon repeaters). I have tried using - * connect() and getsockname() to obtain this information - * without success. For now we are using the local - * host address of the first non-loopback interface found - * for this. - */ - status = local_addr(socket, &localAddr.in); - if (status) { - /* - * some hosts do not provide local interface query - * capabilities. In this situation we default to - * zero and the clients will obtain the beacon's - * address from the UDP header. In this situation - * beacon repeaters will be required to detect - * the address INADDR_ANY in the beacon message - * and replace it with the correct address of the - * server. - */ - localAddr.in.sin_family = AF_INET; - localAddr.in.sin_addr.s_addr = htonl(INADDR_ANY); - localAddr.in.sin_port = htons(0); - } - while( (pToken = getToken(&pStr, buf, sizeof(buf))) ){ status = aToIPAddr(pToken, port, &addr.in); if (status<0) { @@ -1752,7 +1719,6 @@ void epicsShareAPI caAddConfiguredAddr(ELLLIST *pList, const ENV_PARAM *pEnv, pNode = (caAddrNode *) calloc (1, sizeof(*pNode)); if (pNode) { pNode->destAddr = addr; - pNode->srcAddr = localAddr; ellAdd (pList, &pNode->node); } }