PDA

View Full Version : Is there any way to make Layer 2 Network Applications with Qt library ?



kosasker
25th January 2011, 20:06
Hi to all Trolls,Qt fans and other ones :)

As like you read!.. I want to make a Layer 2 application.. I need to work with arp packages. Didnt want to use libpcap...

Java can do it, i cant understand, how a C++ library can't do.. Don't make me cry :'(

Ok... Thats joke! But i'm reading documents nearly 2 weeks, searching, looking and also...

I looked at many many documents about winsock/winsock2... I need a native solution about this ? I'm really overloaded...

Best regards...

wysota
25th January 2011, 21:55
What exactly do you consider "working with arp packages"? I can tell you upfront Qt won't be able to help you but we'll try to find a viable solution for you.

ChrisW67
25th January 2011, 22:17
I think that was meant to be "ARP packets" rather than packages.


I looked at many many documents about winsock/winsock2... I need a native solution about this ? I'm really overloaded...

Which platform(s) does this have to work on? What exactly do you need/want to do with ARP requests/responses? Just listening, actively participating?

kosasker
26th January 2011, 06:39
Thanks to reply, and sorry for my bad english.

@wysota thanks :)
@Chris Windows. :) I need the mac addresses on my network. I searched about it, and only! arp packets can do it!! Am i right ?

So i want send arp packets to all computers on my local network and receive them. Thanks :)

kosasker
27th January 2011, 07:14
Any suggestion ?

tbscope
27th January 2011, 07:23
If on Windows only, you can use the arp command line tool.
Use a QProcess to run the arp tool.

kosasker
27th January 2011, 07:58
I tried this. But arp cant get mac addresses on the network. Its just show arp table. I can use ping for several ip's. But if any machine which is closed for ICMP packets, its didnt work too..

if i forget something please warn me. I cant send arp packets with using arp command. I'm looking for raw sockets now. Maybe i can find something.
Thanks for reply.
Please make suggestion again and again..
Best regards.

kosasker
27th January 2011, 15:24
Hi everyone. I made it, with winpcap. And its running good. I just didnt want to use winpcap more. By the way, my application running now and i can reach all mac addresses, on my local network. I need a different way about this. I'm thinking about write base codes with ASM.

I need your ideas too, when i have done, it's license will be BSD exactly. Rock & Roll

Best regards...

ChrisW67
27th January 2011, 21:55
Since it is Windows only:
http://msdn.microsoft.com/en-us/library/aa366358%28v=vs.85%29.aspx

This was the top hit on a Google search for "windows send receive arp".

squidge
27th January 2011, 23:13
Why are you talking about ASM? Changing the language doesn't do anything. You still have the same problem to solve.

ChrisW67's response is probably the best you'll get however if all you want to do is arp packets.

kosasker
28th January 2011, 08:50
Sorry, i always used "qt" in search areas :(

Thanks all :)