ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView (Ethernet, TCP/IP) Packet Capture

Within LabVIEW memory you will have to know *exactly* what you are
doing. Mistakes are not allowed. It is much easier to capture packets
than memory.

I think LabVIEW (your vi) will stop crashing after removing the sizeof
line to the GetMemoryByPtr(). Take a look inside GetMemoryByPtr() and
see what you have done 🙂

If the data to be expected is not properly being delivered by
GetMemoryByPtr(), what I would do is write a few simple routines, put
those routines inside a dll together with testdata. Then start testing
GetMemoryByPtr() inside LabVIEW by positioning that dll in a fast
running while loop, to check if that vi really works the way you think
it works and keeps on working after some time. Taking a look inside
extcode.h will help too.

Good luck !
Jac.

On Fri, 7 Feb 2003 02:10:42 -0600 (CST), Nuno Tavares
wrote:

>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)
>href="http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CBB45111EE034080020E7...
.
>
>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
>href="http://zone.ni.com/devzone/conceptd.nsf/webmain/B26A875ACA51C567862567CA0055FF24?opendocument...
),
>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
>href="http://winpcap.polito.it/">WinPCap
) to get to WPCAP device.
0 Kudos
Message 11 of 11
(1,651 Views)