Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00028 #ifndef __NL_CORE
00029 #define __NL_CORE
00030
00031 #include "netlink/config.h"
00032
00033 #define NL_NAMESPACE_NAME NL
00034
00035 #define NL_NAMESPACE namespace NL_NAMESPACE_NAME {
00036 #define NL_NAMESPACE_END };
00037 #define NL_NAMESPACE_USE using namespace NL_NAMESPACE_NAME;
00038
00039
00040 #if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER)
00041
00042 #define OS_WIN32
00043
00044
00045
00046 #include <winsock2.h>
00047 #include <ws2tcpip.h>
00048
00049
00050
00051
00052
00053 #define snprintf _snprintf
00054
00055 #else
00056
00057 #define OS_LINUX
00058
00059 #include <arpa/inet.h>
00060 #include <sys/fcntl.h>
00061 #include <sys/types.h>
00062 #include <sys/socket.h>
00063 #include <sys/unistd.h>
00064 #include <sys/time.h>
00065 #include <netdb.h>
00066 #include <sys/ioctl.h>
00067 #include <errno.h>
00068
00069 #endif
00070
00071 #include <string>
00072
00073
00074 NL_NAMESPACE
00075
00076 using std::string;
00077
00078
00079 void init();
00080
00081
00088 enum Protocol {
00089
00090 TCP,
00091 UDP
00092 };
00093
00094
00101 enum IPVer {
00102
00103 IP4,
00104 IP6,
00105 ANY
00106 };
00107
00108
00115 enum SocketType {
00116
00117 CLIENT,
00118 SERVER
00119 };
00120
00121 NL_NAMESPACE_END
00122
00123
00124 #include "netlink/exception.h"
00125 #include "netlink/release_manager.h"
00126 #include "netlink/util.h"
00127
00128 #endif