mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-05-21 15:26:40 +02:00
Made Patricial library cross platform
This commit is contained in:
parent
e09d02e2d9
commit
dd755df567
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <winsock.h>
|
#include <winsock2.h>
|
||||||
#else
|
#else
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,7 +19,15 @@
|
||||||
static char copyright[] = "This product includes software developed by the University of Michigan, Merit"
|
static char copyright[] = "This product includes software developed by the University of Michigan, Merit"
|
||||||
"Network, Inc., and their contributors.";
|
"Network, Inc., and their contributors.";
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#include <arpa/inet.h> /* BSD, Linux, Solaris: for inet_addr */
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <winsock2.h>
|
||||||
|
#include <ws2tcpip.h> // for inet_ntop
|
||||||
|
#else
|
||||||
|
// for inet_addr
|
||||||
|
#include <arpa/inet.h> // for inet_addr
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <assert.h> /* assert */
|
#include <assert.h> /* assert */
|
||||||
#include <ctype.h> /* isdigit */
|
#include <ctype.h> /* isdigit */
|
||||||
#include <errno.h> /* errno */
|
#include <errno.h> /* errno */
|
||||||
|
|
|
@ -18,9 +18,18 @@
|
||||||
|
|
||||||
#include <errno.h> /* for EAFNOSUPPORT */
|
#include <errno.h> /* for EAFNOSUPPORT */
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
#include <winsock2.h>
|
||||||
|
#include <in6addr.h>
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#include <netinet/in.h> /* for struct in_addr */
|
#include <netinet/in.h> /* for struct in_addr */
|
||||||
#include <sys/socket.h> /* for AF_INET */
|
#include <sys/socket.h> /* for AF_INET */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue