Link Layer (Sockets) Question

Is there a way I can access link-layer socket information yet by chance?

This is a wireshark link layer capture of the information that I would like to access for example:


Looking at Libpcap so if you have any experience with OS X Declares using libpcap please let me know?

Thank you in advance :slight_smile:

[quote=267505:@jean-paul devulder]hi Mike,

using this tools ?[/quote]

I am looking for Xojo classes to perform these sniffer functions so after all of my research a plugin that wraps either this project or the libpcap project is going to be my solution for Xojo. :wink:

I’ve been tinkering with wpcap which is a Windows port/fork of libpcap. I’m not sure whether it provides link-layer info, though. It looks like it only does the capturing and leaves dissection to the user.

Thanks Andrew! I am good with the dissection. Ill give it a try! Thanks

[quote=267520:@jean-paul devulder]Hi Mike,

Can you try this example:

look the readme file![/quote]
Thanks Jean-Paul I will give it a try! Thank you so much!

[quote=267520:@jean-paul devulder]Hi Mike,

Can you try this example:

look the readme file![/quote]

Interesting how you did that! :slight_smile: It appears that some of the 0’s are being omitted (snipped) and some 00 are 0. Is there a way for me to control that?

IE. Wireshark Trace:

Xojo Sniffer Trace:

Thanks again JP!!!

Andrew have you seen this Exception? Im on OSX.


A FunctionNotFoundException means that a soft declare couldn’t be loaded at runtime (i.e. wpcap.dll wasn’t found)

Andrew knowing wpcap.dll is windows based does that limit my ability to use this only w/ Windows Platforms? I assume so, but wanted to check just in case. :wink:


The main wpcap API is supposed to be the same as libpcap, so it might be as simple as changing the lib name.

Thanks Andrew Will Try!

[quote=267546:@jean-paul devulder]Hi,

Please redownload

change output “0” to “00”

add Xcode project also[/quote]
Thank you JP!!! I so appreciate you work to help!

It works like a charm!!! THANK YOU!

In case you’re still interested I got libpcap working on Ubuntu and the same code using wpcap on Windows.