libca: enable mcast loopback

This commit is contained in:
Michael Davidsaver
2016-01-11 20:59:08 -05:00
parent 568ece9c27
commit 98504d1cdc
+13
View File
@@ -163,6 +163,19 @@ udpiiu::udpiiu (
throwWithLocation ( noSocket () );
}
#ifdef IP_ADD_MEMBERSHIP
{
int flag = 1;
if(setsockopt(this->sock, IPPROTO_IP, IP_MULTICAST_LOOP, &flag, sizeof(flag))==-1)
{
char sockErrBuf[64];
epicsSocketConvertErrnoToString (
sockErrBuf, sizeof ( sockErrBuf ) );
errlogPrintf("CAC: failed to set mcast loopback\n");
}
}
#endif
int boolValue = true;
int status = setsockopt ( this->sock, SOL_SOCKET, SO_BROADCAST,
(char *) &boolValue, sizeof ( boolValue ) );