Commit 24ddc95e authored by jdelange's avatar jdelange

* po_hi_driver_sockets.h

   - Define the TIMEOUT maccro for Linux and RTEMS



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@3186 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent f24847a6
......@@ -35,18 +35,11 @@ typedef char* __po_hi_inetaddr_t;
extern __po_hi_node_t __po_hi_mynode;
/* We only need to set the timeout for the NE2000 driver socket.
* So, this function is used only for this driver.
*/
#ifdef __PO_HI_NEED_DRIVER_RTEMS_NE2000_SOCKETS
#include <sys/time.h>
#define __PO_HI_SET_SOCKET_TIMEOUT(mysocket,nsec) { struct timeval timeout; \
timeout.tv_sec = nsec; \
timeout.tv_usec = 0; \
setsockopt (mysocket, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout,sizeof (timeout)); }
#else
#define __PO_HI_SET_SOCKET_TIMEOUT(mysocket,nsec)
#endif
#include <sys/time.h>
#define __PO_HI_SET_SOCKET_TIMEOUT(mysocket,nsec) { struct timeval timeout; \
timeout.tv_sec = 0; \
timeout.tv_usec = nsec; \
setsockopt (mysocket, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout,sizeof (timeout)); }
#define __PO_HI_TRANSPORT_SOCKET_NEED_RECEIVER_TASK() \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment