diff --git a/README b/README index b247375..9c8f9be 100644 --- a/README +++ b/README @@ -171,7 +171,7 @@ Notes: parameters: $ cat /proc/sys/net/core/rmem_default $ cat /proc/sys/net/core/rmem_max - + Acknowledgements: - Big thanks to Digital Devices GmbH for providing the Octopus Net diff --git a/socket.c b/socket.c index 7ea436b..b51d6ea 100644 --- a/socket.c +++ b/socket.c @@ -28,8 +28,16 @@ #endif cSatipSocket::cSatipSocket() -: cSatipSocket(0) +: socketPortM(0), + socketDescM(-1), + isMulticastM(false), + useSsmM(false), + streamAddrM(htonl(INADDR_ANY)), + sourceAddrM(htonl(INADDR_ANY)), + rcvBufSizeM(0) { + debug1("%s", __PRETTY_FUNCTION__); + memset(&sockAddrM, 0, sizeof(sockAddrM)); } cSatipSocket::cSatipSocket(size_t rcvBufSizeP) diff --git a/socket.h b/socket.h index cd4b75d..289f96c 100644 --- a/socket.h +++ b/socket.h @@ -20,13 +20,14 @@ private: in_addr_t streamAddrM; in_addr_t sourceAddrM; size_t rcvBufSizeM; + bool CheckAddress(const char *addrP, in_addr_t *inAddrP); bool Join(void); bool Leave(void); public: cSatipSocket(); - cSatipSocket(size_t rcvBufSizeP); + explicit cSatipSocket(size_t rcvBufSizeP); virtual ~cSatipSocket(); bool Open(const int portP = 0, const bool reuseP = false); bool OpenMulticast(const int portP, const char *streamAddrP, const char *sourceAddrP);