10-15-2012 08:11 AM
Hi
I am looking for any updates on how best to send mac level packets from labview.
I have found:
http://zone.ni.com/devzone/cda/epd/p/id/2660
and
http://forums.ni.com/t5/LabVIEW/WinPCAP-for-LabView-v-0-1-alpha/m-p/343479/highlight/true#M175885
both of which are quite old.
The first works fine for reading packets but does not include the send function.
The second does include a send, in version 0_6, but seems to send the packet data in hex strings which are a little awkward.
Is this still the best way to send such packets?
David
10-15-2012 09:54 AM
TCP packets are just bytes. The format of teh data depends on what protocol you will be using. You wil need to format the packets according to the protocol specification for what you are doing.
10-15-2012 10:00 AM
Sorry I am not using TCP, this is low level packets below the IP level.
10-15-2012 10:02 AM
It's still just a bunch of bytes. There is still a protocol imvolved and you will need to format your data according to the protocol you are using. What protocol are you using?
10-15-2012 11:01 AM
I am quite happy with formating the bytes I need. There are a couple of protocols I am dealing with LLDP multicasts is the well known one, type 0x88cc. What I need is where to put my bytes of data to send the packet.
As I said the winpcap library is the only option I have found, and I am looking for either something better, or any update information on how to use the 0_6 alpha version of the library.
David
11-06-2012 12:30 AM
Hi,
Using Winpcap library i am able to receive data packet from the device but i am not able to send any raw packet to the device. If someone have experiance on sending raw packet please share with me.
11-06-2012 05:25 AM
Well as no one came up with anything better here, I pressed on with the 0.6 version of the code I linked to before.
http://forums.ni.com/ni/attachments/ni/170/184448/1/WinPCap%20Labview%200_6.zip
I have used it to send packets, and it works, so my thanks to the original author.
I am still suprised there is no cleaner way of doing this.
David
02-11-2021 01:28 PM
Thanks for posting this. I have been looking for this code for what seems like forever. Works perfect for my application.