‎02-04-2003 03:50 PM
‎02-06-2003 10:26 AM
‎02-06-2003 11:19 AM
‎02-06-2003 11:27 AM
‎02-06-2003 02:48 PM
‎02-06-2003 02:58 PM
‎02-06-2003 03:06 PM
‎02-06-2003 06:50 PM
‎02-07-2003
02:10 AM
- last edited on
‎12-01-2025
06:57 PM
by
Content Cleaner
Well, just tried to interface LabView with WinPCap (BTW, this WinPCap thing is Windows port of Unix-flavours libcap, thus it's OpenSource too). I've implemented the C structures with clusters and I think I got the idea on DLL importing. But..
I have to work with pointers and many kind of C structures. I'm just trying to do the interface promisc-uous "open", but LabView crashes (using WinXP, I'll try Win98 tomorrow). I don't know if it's my mistake, so I'd like to check the code if you can, it's available at http://bars2.gaesi.com/~nmct/labview/
You will need all the files, as I use (from the examples section) G
etMemoryByPtr() and SizeOf() .
I'd like that someone pointed me my mistake, because I've spent some time building this little thing, otherwise I'll have to try Ethereal (as Underflow) interface, though it's not WinPCap fault, for certain...
Technically, what this VI does is:
I assumed C pointers are treated as I32 (in C, pointers are usually cast'ed to "long int", so I referred to this), then I get the memory position returned by pcap_open_live(). I also assume that GetMemoryByPtr() stops on NULL (otherwise it should be a valid pointer). Then I've instructed the control FlattenFromString to split that memory block in a cluster I've designed (which represents C "struct pcap" - and its composed by other structs/clusters).
Note: Use TestApp.EXE to test your device (after installing WinPCap) to get to WPCAP devi
ce.
‎02-13-2003 06:37 PM