Home » Eclipse Projects » Eclipse Titan » Help Needed on Winpcap using TITAN
Help Needed on Winpcap using TITAN [message #1760008] |
Fri, 21 April 2017 08:29 |
v v Messages: 2 Registered: April 2017 |
Junior Member |
|
|
Hi,
I am planning to using winpcap in Titan Project,
and i have already installed winpcap and copy the files into /cygwin/user/include ,
But there are many errors appeared when #include "pcap.h" in MyPort.hh.
In file included from /usr/include/w32api/objbase.h:163:0,
from /usr/include/w32api/ole2.h:17,
from /usr/include/w32api/wtypes.h:12,
from /usr/include/w32api/winscard.h:10,
from /usr/include/w32api/windows.h:97,
from /usr/include/w32api/winsock2.h:23,
from /usr/include/pcap-stdinc.h:49,
from /usr/include/pcap/pcap.h:41,
from /usr/include/pcap.h:45,
from ../src/PCAPasp_PortType.hh:14,
from ../src/PCAPasp_PortType.cc:10:
/usr/include/w32api/urlmon.h:5772:23: error: macro "Read" passed 3 arguments, but takes just 0
ULONG *pcbRead) = 0;
^
In file included from /usr/include/w32api/winsock2.h:56:0,
from /usr/include/pcap-stdinc.h:49,
from /usr/include/pcap/pcap.h:41,
from /usr/include/pcap.h:45,
from ../src/PCAPasp_PortType.hh:14,
from ../src/MainTest.hh:145,
from ../src/MainTest.cc:11:
/usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp]
#warning "fd_set and associated macros have been defined in sys/types. \
^
In file included from /usr/include/w32api/winsock2.h:56:0,
from /usr/include/pcap-stdinc.h:49,
from /usr/include/pcap/pcap.h:41,
from /usr/include/pcap.h:45,
from ../src/PCAPasp_PortType.hh:14,
from ../src/PCAPasp_PortType.cc:10:
/usr/include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp]
#warning "fd_set and associated macros have been defined in sys/types. \
^
In file included from /usr/include/w32api/windef.h:8:0,
from /usr/include/w32api/windows.h:69,
from /usr/include/w32api/winsock2.h:23,
from /usr/include/pcap-stdinc.h:49,
from /usr/include/pcap/pcap.h:41,
from /usr/include/pcap.h:45,
from ../src/PCAPasp_PortType.hh:14,
from ../src/MainTest.hh:145,
from ../src/MainTest.cc:11:
/usr/include/w32api/minwindef.h:142:17: error: conflicting declaration 'typedef float FLOAT'
typedef float FLOAT;
^
In file included from /home/v/git/titan/Install/include/TTCN3.hh:48:0,
from ../src/MainTest.hh:19,
from ../src/MainTest.cc:11:
/home/v/git/titan/Install/include/Float.hh:37:7: note: previous declaration as 'class FLOAT'
class FLOAT : public Base_Type {
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from /usr/include/w32api/winsock2.h:23,
from /usr/include/pcap-stdinc.h:49,
from /usr/include/pcap/pcap.h:41,
from /usr/include/pcap.h:45,
from ../src/PCAPasp_PortType.hh:14,
from ../src/MainTest.hh:145,
from ../src/MainTest.cc:11:
/usr/include/w32api/winnt.h:278:16: error: conflicting declaration 'typedef char CHAR'
typedef char CHAR;
^
In file included from /home/v/git/titan/Install/include/TTCN3.hh:58:0,
from ../src/MainTest.hh:19,
from ../src/MainTest.cc:11:
/home/v/git/titan/Install/include/Charstring.hh:575:20: note: previous declaration as 'typedef class CHARSTRING CHAR'
typedef CHARSTRING CHAR;
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from /usr/include/w32api/winsock2.h:23,
from /usr/include/pcap-stdinc.h:49,
from /usr/include/pcap/pcap.h:41,
from /usr/include/pcap.h:45,
from ../src/PCAPasp_PortType.hh:14,
from ../src/MainTest.hh:145,
from ../src/MainTest.cc:11:
/usr/include/w32api/winnt.h:598:16: error: conflicting declaration 'typedef BYTE BOOLEAN'
typedef BYTE BOOLEAN;
^
In file included from /home/v/git/titan/Install/include/TTCN3.hh:49:0,
from ../src/MainTest.hh:19,
from ../src/MainTest.cc:11:
/home/v/git/titan/Install/include/Boolean.hh:35:7: note: previous declaration as 'class BOOLEAN'
class BOOLEAN : public Base_Type {
^
In file included from /usr/include/w32api/windef.h:8:0,
from /usr/include/w32api/windows.h:69,
from /usr/include/w32api/winsock2.h:23,
from /usr/include/pcap-stdinc.h:49,
from /usr/include/pcap/pcap.h:41,
from /usr/include/pcap.h:45,
from ../src/PCAPasp_PortType.hh:14,
from ../src/PCAPasp_PortType.cc:10:
/usr/include/w32api/minwindef.h:142:17: error: conflicting declaration 'typedef float FLOAT'
typedef float FLOAT;
^
In file included from /home/v/git/titan/Install/include/TTCN3.hh:48:0,
from ../src/MainTest.hh:19,
from ../src/PCAPasp_PortType.hh:13,
from ../src/PCAPasp_PortType.cc:10:
/home/v/git/titan/Install/include/Float.hh:37:7: note: previous declaration as 'class FLOAT'
class FLOAT : public Base_Type {
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from /usr/include/w32api/winsock2.h:23,
from /usr/include/pcap-stdinc.h:49,
from /usr/include/pcap/pcap.h:41,
from /usr/include/pcap.h:45,
from ../src/PCAPasp_PortType.hh:14,
from ../src/PCAPasp_PortType.cc:10:
/usr/include/w32api/winnt.h:278:16: error: conflicting declaration 'typedef char CHAR'
typedef char CHAR;
^
Could you help me fix it ?
Thanks in advance.
|
|
|
Re: Help Needed on Winpcap using TITAN [message #1760166 is a reply to message #1760008] |
Mon, 24 April 2017 07:48 |
|
Hi vv,
truth be told, we have never used the PCAP test port under Cygwin, and we are not sure whether it may or may not work.
We are looking into it, and if have any news, we'll come back to you;
Even if it compiles, problems may pop up when running it;
I believe you are better off if you use a proper Linux, either in a virtual machine, or WSL under Windows 10.
Best regards
Elemer
|
|
| | | | |
Re: Help Needed on Winpcap using TITAN [message #1761031 is a reply to message #1761029] |
Fri, 05 May 2017 12:53 |
|
Hi Yann,
unfortunately the best advice I can give you is that you should use a virtual Linux machine , or maybe a Linux server ( or WSL on Windows 10)
The PCAP test port was not intended to work with WinPcap libraries , it has never been used in this context and we see no guarantee it will work.
Cygwin, although might appear convenient, has it's limitations, especially when it comes to the networking stack.
Best regards
Elemer
|
|
| |
Goto Forum:
Current Time: Thu Sep 26 06:27:28 GMT 2024
Powered by FUDForum. Page generated in 0.06407 seconds
|