EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c
From: Andrew Johnson <[email protected]>
To: Michael Davidsaver <[email protected]>
Cc: "[email protected]" <[email protected]>, "Slepicka, Hugo Henrique" <[email protected]>
Date: Wed, 23 Aug 2017 14:32:12 -0500
On 08/23/2017 01:31 PM, Michael Davidsaver wrote:
> This seems a reasonable way to go if test coverage is added as well.

Ok, the attached patch does everything except add the test coverage,
which will take me a little while to implement. I have cross-built the
result with MinGW but not MSVC yet. I will add this patch to the 3.15.5
Known Problems page so Ernest can use it, but I won't commit anything to
Git until I have the tests to go along with it.

I reserve the right to change my mind about using blockingSockTest.cpp
for these tests.

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
diff --git src/ca/client/udpiiu.cpp src/ca/client/udpiiu.cpp
index beae075..ccb2556 100644
--- src/ca/client/udpiiu.cpp
+++ src/ca/client/udpiiu.cpp
@@ -165,7 +165,7 @@ udpiiu::udpiiu (
 
 #ifdef IP_ADD_MEMBERSHIP
     {
-        int flag = 1;
+        osiSockOptMcastLoop_t flag = 1;
         if ( setsockopt ( this->sock, IPPROTO_IP, IP_MULTICAST_LOOP,
                           (char *) &flag, sizeof ( flag ) ) == -1 ) {
             char sockErrBuf[64];
diff --git src/ioc/rsrv/caservertask.c src/ioc/rsrv/caservertask.c
index 50bc650..fda4421 100644
--- src/ioc/rsrv/caservertask.c
+++ src/ioc/rsrv/caservertask.c
@@ -308,7 +308,7 @@ void rsrv_build_addr_lists(void)
         }
 #ifdef IP_ADD_MEMBERSHIP
         {
-            int flag = 1;
+            osiSockOptMcastLoop_t flag = 1;
             if (setsockopt(beaconSocket, IPPROTO_IP, IP_MULTICAST_LOOP,
                            (char *)&flag, sizeof(flag))<0) {
                 char sockErrBuf[64];
diff --git src/libCom/osi/os/Darwin/osdSock.h src/libCom/osi/os/Darwin/osdSock.h
index 1d4556e..e7c3440 100644
--- src/libCom/osi/os/Darwin/osdSock.h
+++ src/libCom/osi/os/Darwin/osdSock.h
@@ -31,6 +31,7 @@ typedef int                     SOCKET;
 #define socket_ioctl(A,B,C)     ioctl(A,B,C)
 typedef int osiSockIoctl_t;
 typedef socklen_t osiSocklen_t;
+typedef int osiSockOptMcastLoop_t;
 
 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
 
diff --git src/libCom/osi/os/Linux/osdSock.h src/libCom/osi/os/Linux/osdSock.h
index 614f3f9..7164a54 100644
--- src/libCom/osi/os/Linux/osdSock.h
+++ src/libCom/osi/os/Linux/osdSock.h
@@ -35,6 +35,7 @@ typedef int                     SOCKET;
 #define socket_ioctl(A,B,C)     ioctl(A,B,C)
 typedef int osiSockIoctl_t;
 typedef socklen_t osiSocklen_t;
+typedef int osiSockOptMcastLoop_t;
 
 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
 
diff --git src/libCom/osi/os/RTEMS/osdSock.h src/libCom/osi/os/RTEMS/osdSock.h
index 930ed0e..6177c30 100644
--- src/libCom/osi/os/RTEMS/osdSock.h
+++ src/libCom/osi/os/RTEMS/osdSock.h
@@ -42,6 +42,7 @@ typedef int                     SOCKET;
 #define socket_ioctl(A,B,C)     ioctl(A,B,C)
 typedef int osiSockIoctl_t;
 typedef socklen_t osiSocklen_t;
+typedef char osiSockOptMcastLoop_t;
 
 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
 
diff --git src/libCom/osi/os/WIN32/osdSock.h src/libCom/osi/os/WIN32/osdSock.h
index d92e187..2ff23c4 100644
--- src/libCom/osi/os/WIN32/osdSock.h
+++ src/libCom/osi/os/WIN32/osdSock.h
@@ -28,6 +28,7 @@
 #define socket_ioctl(A,B,C)	ioctlsocket(A,B,C)
 typedef u_long FAR osiSockIoctl_t;
 typedef int osiSocklen_t;
+typedef BOOL osiSockOptMcastLoop_t;
 
 #ifndef SHUT_RD
 #   define SHUT_RD SD_RECEIVE
diff --git src/libCom/osi/os/cygwin32/osdSock.h src/libCom/osi/os/cygwin32/osdSock.h
index d642cad..75288c8 100644
--- src/libCom/osi/os/cygwin32/osdSock.h
+++ src/libCom/osi/os/cygwin32/osdSock.h
@@ -34,6 +34,7 @@ typedef int                     SOCKET;
 #define socket_ioctl(A,B,C)     ioctl(A,B,C)
 typedef int osiSockIoctl_t;
 typedef int osiSocklen_t;
+typedef int osiSockOptMcastLoop_t;
 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE&&(FD)>=0)
 #ifndef SHUT_RD
 #define SHUT_RD 0
diff --git src/libCom/osi/os/freebsd/osdSock.h src/libCom/osi/os/freebsd/osdSock.h
index fe28d4c..b402ec1 100644
--- src/libCom/osi/os/freebsd/osdSock.h
+++ src/libCom/osi/os/freebsd/osdSock.h
@@ -36,6 +36,7 @@ typedef int                     SOCKET;
 #define socket_ioctl(A,B,C)     ioctl(A,B,C)
 typedef int osiSockIoctl_t;
 typedef socklen_t osiSocklen_t;
+typedef int osiSockOptMcastLoop_t;
 
 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
 
diff --git src/libCom/osi/os/iOS/osdSock.h src/libCom/osi/os/iOS/osdSock.h
index 0b3b3f6..08849a8 100644
--- src/libCom/osi/os/iOS/osdSock.h
+++ src/libCom/osi/os/iOS/osdSock.h
@@ -32,6 +32,7 @@ typedef int                     SOCKET;
 #define socket_ioctl(A,B,C)     ioctl(A,B,C)
 typedef int osiSockIoctl_t;
 typedef socklen_t osiSocklen_t;
+typedef int osiSockOptMcastLoop_t;
 
 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE)
 
diff --git src/libCom/osi/os/solaris/osdSock.h src/libCom/osi/os/solaris/osdSock.h
index a39c6c3..872a08d 100644
--- src/libCom/osi/os/solaris/osdSock.h
+++ src/libCom/osi/os/solaris/osdSock.h
@@ -42,6 +42,7 @@ typedef int osiSockIoctl_t;
 #else
     typedef int osiSocklen_t;
 #endif
+typedef int osiSockOptMcastLoop_t;
 
 #define DOES_NOT_ACCEPT_ZERO_LENGTH_UDP
 
diff --git src/libCom/osi/os/vxWorks/osdSock.h src/libCom/osi/os/vxWorks/osdSock.h
index 80464ef..d949b25 100644
--- src/libCom/osi/os/vxWorks/osdSock.h
+++ src/libCom/osi/os/vxWorks/osdSock.h
@@ -65,6 +65,7 @@ typedef int                     SOCKET;
 #define socket_ioctl(A,B,C)     ioctl(A,B,(int)C)
 typedef int osiSockIoctl_t;
 typedef int osiSocklen_t;
+typedef int osiSockOptMcastLoop_t;
 
 #define FD_IN_FDSET(FD) ((FD)<FD_SETSIZE&&(FD)>=0)
 

Replies:
RE: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Williams Jr., Ernest L.
References:
RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Heinz Junkes
Re: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Heinz Junkes
Re: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Michael Davidsaver
Re: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Andrew Johnson
RE: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Williams Jr., Ernest L.
Re: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Andrew Johnson
Re: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Michael Davidsaver

Navigate by Date:
Prev: Re: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Michael Davidsaver
Next: Re: Still can not successful compile/run epicsV4CPP from github Heinz P. Junkes
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Michael Davidsaver
Next: RE: RTEMS: rsrv: failed to set mcast loopback in src/ioc/rsrv/caservertask.c Williams Jr., Ernest L.
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·