PDA

View Full Version : Network Raw Programming



havij000
27th August 2013, 07:40
Hi every body,

I am new to qt and I write a raw socket programm when I sniff the ethernet data I receive each packet towice!

What shoud I do? :confused:

wysota
27th August 2013, 07:50
How is your problem related to Qt?

havij000
28th August 2013, 04:38
I have compiled the same code with gcc and I dont have this problem.

Lesiok
28th August 2013, 07:00
I have compiled the same code with gcc and I dont have this problem.

But Qt is NOT compiler or language. It is normal C++ library so your answer does not make sense.

wysota
28th August 2013, 07:26
I have compiled the same code with gcc and I dont have this problem.

Strangely enough Qt uses gcc for compilation.

havij000
28th August 2013, 11:45
I know.
I also have another problem with Qt when I use memcpy() function to copy a series of data in a specific address, each time the memcpy() function increase the source address by it self.

in the other hand whan I want to copy the data for the second time the first byte of data wont copy and when want to do it for the third time the 2 first bytes wont coppy ????

I have already checked the address before the memcpy function and all of the are ok.

:confused:

wysota
28th August 2013, 11:49
I also have another problem with Qt when I use memcpy() function to copy a series of data in a specific address, each time the memcpy() function increase the source address by it self.
memcpy() is a regular C function and not part of Qt. The fact that elsewhere in your code you are using some classes from Qt is not enough to state that Qt causes you problems with some code where you are not using it. If some address is increased then it is caused by the fact that you did something to increase it.