Now I got the bundleCPP working with RTEMS 4.11.99 (aka 4.12) and EPICS 3.16 with some changes I will discuss next week.
In the bundleCPP, in pvAccessCPP/src/remote/blockingUDPConnector.cpp
I had to change the sin_addr.s_addr for all interfaces except loopback or multicast prior the binding to INADDR_ANY.
Otherwise bind runs into an error (Not available or similiar). I made the descision with a stupid compare for these two used addresses (127.0.0.1 and 224.0.0.1, a better solution is welcome ;-) ):
if bindAddress.ia.sin_addr.s_addr & 0x00ffff00
rtems@epics:~$ diff -Naru ./FHI/EPICS/V4/ohneGit/EPICS-CPP-4.6.0-rc1/pvAccessCPP/src/remote/blockingUDPConnector.cpp ./EPICS/bundleCPP/pvAccessCPP/src/remote/blockingUDPConnector.cpp --- ./FHI/EPICS/V4/ohneGit/EPICS-CPP-4.6.0-rc1/pvAccessCPP/src/remote/blockingUDPConnector.cpp 2016-08-30 01:49:35.000000000 +0200 +++ ./EPICS/bundleCPP/pvAccessCPP/src/remote/blockingUDPConnector.cpp 2017-04-20 18:18:21.790608978 +0200 @@ -59,6 +59,11 @@ if (_reuseSocket) epicsSocketEnableAddressUseForDatagramFanout(socket);
+if (bindAddress.ia.sin_addr.s_addr & 0x00ffff00) { + LOG(logLevelDebug, "Try to bind to INADDR_ANY 0x%x:%d", + bindAddress.ia.sin_addr.s_addr, bindAddress.ia.sin_port); + bindAddress.ia.sin_addr.s_addr = htonl(INADDR_ANY); +} retval = ::bind(socket, (sockaddr*)&(bindAddress.sa), sizeof(sockaddr)); if(retval<0) { char errStr[64];
Heinz |