LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

winpcap send packet

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

 

0 Kudos
Message 1 of 8
(5,629 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 8
(5,623 Views)

Sorry I am not using TCP, this is low level packets below the IP level.

 

0 Kudos
Message 3 of 8
(5,620 Views)

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?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 8
(5,617 Views)

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

 

0 Kudos
Message 5 of 8
(5,609 Views)

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.

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 6 of 8
(5,540 Views)

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

 

Message 7 of 8
(5,530 Views)

Thanks for posting this. I have been looking for this code for what seems like forever.  Works perfect for my application.  

0 Kudos
Message 8 of 8
(3,290 Views)