X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Finc%2Fcaipinterface.h;h=62eb0fdd9eeae30c3ae7a4ac97501fc675dc22fe;hb=3c093548382bb2542c87a67e6e5fa32552c29cb3;hp=5cf683ae1b29860127d62dd71dd4a9fd46af2115;hpb=edcfc3d2329da7b914771c0dcff5f42c9b74fd93;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/inc/caipinterface.h b/resource/csdk/connectivity/inc/caipinterface.h index 5cf683a..62eb0fd 100644 --- a/resource/csdk/connectivity/inc/caipinterface.h +++ b/resource/csdk/connectivity/inc/caipinterface.h @@ -53,11 +53,12 @@ typedef enum * @param[in] sep network endpoint description. * @param[in] data Data received from remote OIC device. * @param[in] dataLength Length of data in bytes. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). * @pre Callback must be registered using CAIPSetPacketReceiveCallback(). */ -typedef void (*CAIPPacketReceivedCallback)(const CASecureEndpoint_t *sep, - const void *data, - uint32_t dataLength); +typedef CAResult_t (*CAIPPacketReceivedCallback)(const CASecureEndpoint_t *sep, + const void *data, + uint32_t dataLength); /** * Callback to notify error in the IP adapter. @@ -172,17 +173,37 @@ void CAIPPullData(); int CAGetPollingInterval(int interval); /** - * Tell the IP server an interface has been added. - */ -void CAWakeUpForChange(); - -/** * Set callback for error handling. * * @param[in] errorHandleCallback callback to notify error to the ipadapter. */ void CAIPSetErrorHandler(CAIPErrorHandleCallback errorHandleCallback); +/** + * Set udp multicast time to live value to control the scope of the multicasts. + * @param[in] ttl To be set to any value from 0 to 255. + * + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). + */ +CAResult_t CAIPSetMulticastTTL(size_t ttl); + +/** + * Get udp multicast time to live value. + * @param[out] ttl TTL pointer to get the stored multicast time to live. + * + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). + */ +CAResult_t CAIPGetMulticastTTL(size_t *ttl); + +/** + * Create multicast socket to receive multicast message from remote device. + */ +void CreateMulticastSocket(); + +/** + * Close multicast socket to stop receiving multicast message. + */ +void CloseMulticastSocket(); #ifdef __cplusplus } #endif