Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
v v is currently offline v vFriend
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 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
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 #1760235 is a reply to message #1760166] Tue, 25 April 2017 02:04 Go to previous messageGo to next message
v v is currently offline v vFriend
Messages: 2
Registered: April 2017
Junior Member
Thanks for your reply !

Very Happy
Re: Help Needed on Winpcap using TITAN [message #1761005 is a reply to message #1760235] Fri, 05 May 2017 08:52 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
Hello Elemer,

I'm working on ITS project and I got the same issues while trying to build PCAPasp port project.
Do you any hints to fix the issues above?

Many thanks in advance for your help,

Yann
Re: Help Needed on Winpcap using TITAN [message #1761006 is a reply to message #1761005] Fri, 05 May 2017 08:55 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Yann,

what is your environment?

BR

Elemer
Re: Help Needed on Winpcap using TITAN [message #1761029 is a reply to message #1761006] Fri, 05 May 2017 12:43 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
Hello Elemer,

I'm working on Windows 7, with cygwin 32-bit. I installed the latest version of WinPcap and I got the same errors than 'v v'.

Yann
Re: Help Needed on Winpcap using TITAN [message #1761031 is a reply to message #1761029] Fri, 05 May 2017 12:53 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
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





Re: Help Needed on Winpcap using TITAN [message #1761032 is a reply to message #1761031] Fri, 05 May 2017 12:59 Go to previous message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
Hello Elemer,

OK, many thanks for your support.

Have a nice WE,

Yann
Previous Topic: Lego Bob and Titan meets IoT
Next Topic:Compiler error
Goto Forum:
  


Current Time: Thu Apr 25 16:27:16 GMT 2024

Powered by FUDForum. Page generated in 0.04850 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top