source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/Capture/TcpipDefs.h @ 35

Last change on this file since 35 was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 1.0 KB
Line 
1/**
2 * @file TcpipDefs.h
3 * The file contains definitions needed for socket communication allowing to compile
4 * the code with VisualStudio (using Winsock2 library) and with g++ (using POSIX sockets).
5 * @author Tomas Urban
6 * @version 0.1
7 * @date 16/07/2009
8 */
9#ifndef TCPIP_DEFS_H
10#define TCPIP_DEFS_H
11
12#ifdef WIN32
13#include <Winsock2.h>
14#include <Ws2tcpip.h>
15#define SOCKET_TYPE SOCKET /**< Defines compiler-specific socket handle type */
16#define SOCKET_CALL_ERROR INVALID_SOCKET /**< Defines compiler-specific error value of some socket functions */
17#define CLOSE_SOCKET closesocket /**< Defines compiler-specific function for closing sockets */
18#else
19#include <sys/types.h>
20#include <sys/socket.h>
21#include <netinet/in.h>
22#include <netdb.h>
23#define SOCKET_TYPE int /**< Defines compiler-specific socket handle type */
24#define SOCKET_CALL_ERROR -1 /**< Defines compiler-specific error value of some socket functions */
25#define CLOSE_SOCKET close /**< Defines compiler-specific function for closing sockets */
26#endif
27
28#endif
Note: See TracBrowser for help on using the repository browser.