diff --git a/pub/bin.h b/pub/bin.h index 287237a2..0959f739 100644 --- a/pub/bin.h +++ b/pub/bin.h @@ -212,6 +212,7 @@ class Binary * @param[in] length of memory buffer * @return address * @note Support MAC addresses + * @remark keep for ABI backward compatibility. */ static std::string bufToId(const uint8_t *id, size_t length); /** diff --git a/pub/sock.h b/pub/sock.h index d184cfba..3fbc162e 100644 --- a/pub/sock.h +++ b/pub/sock.h @@ -269,6 +269,7 @@ class SockUnix : public SockBase * @note address can not be changed after initializing. * User can close the socket, change this value, and * initialize a new socket. + * @remark keep for ABI backward compatibility. */ bool setSelfAddress(const std::string &string); /** @@ -312,6 +313,7 @@ class SockUnix : public SockBase * @return true if message is sent * @note true does @b NOT guarantee the frame was successfully * arrives its target. Only the network layer sends it. + * @remark keep for ABI backward compatibility. */ bool sendTo(const void *msg, size_t len, const std::string &addrStr) const; /** @@ -678,6 +680,17 @@ class SockRaw : public SockBaseIf * initialize a new socket. */ bool setPtpDstMac(const void *ptp_dst_mac, size_t len); + /** + * Set PTP multicast address using binary from + * @param[in] ptp_dst_mac address in binary form + * @param[in] len address length + * @return true if PTP multicast address is updated + * @note PTP multicast address can not be changed after initializing. + * User can close the socket, change this value, and + * initialize a new socket. + * @remark keep for ABI backward compatibility. + */ + bool setPtpDstMac(const uint8_t *ptp_dst_mac, size_t len); /** * Set PTP multicast address using configuration file * @param[in] cfg reference to configuration file object diff --git a/src/sock.cpp b/src/sock.cpp index d43afb93..51135c8b 100644 --- a/src/sock.cpp +++ b/src/sock.cpp @@ -680,6 +680,10 @@ bool SockRaw::setPtpDstMac(const void *mac, size_t len) { return setPtpDstMac(Binary(mac, len)); } +bool SockRaw::setPtpDstMac(const uint8_t *mac, size_t len) +{ + return setPtpDstMac(Binary(mac, len)); +} bool SockRaw::setPtpDstMac(const ConfigFile &cfg, const string §ion) { if(m_isInit) {