LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ip fragmentation flag (URGENT!!!)

hi,
 
I am sending a UDP packet with labview and i realized that the IP fragment flag in the IP header is always set to 0 (may fragment). however I need this bit to be 1 (dont fragment). how can I do it? please help!!!!!
 
Thanks
 
Yair
0 Kudos
Message 1 of 13
(4,672 Views)

Hello,

I recognize that your issue is urgent, so I'll be as brief as possible.  Unfortunatly you cannot do a lot of low-level operations with the networking VIs (see this link for info).  The solution to your problem is no doubt going to involve calling to some external libraries which implement the low level functionality you are after.  There might be some pre-built LabVIEW wrappers out there, but these aren’t distributed by us so I couldn’t say for certain.  If this is unacceptable for your application, we should try to find a way to accomplish your task without using the UDP functionality.  Please let us know what it is you are trying to accomplish and we might be able to make some additional suggestions.

 

Thanks for posting to the forums – I apologize that our networking VIs will not be able to achieve the low level functionality you request. Hopefully you will be able to be successful by using the external code interfacing features of LabVIEW!

Message Edited by Travis M. on 07-20-2006 12:46 PM

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 13
(4,655 Views)

Thanks fo rthe quick reply!

I am building a simulator the sends specific UDP messages. the receiver of those messages has to have the DF flag marked in order to accept those messages. does anyone know how can I access the Windows IP socket in order to enforce this bit to be 1? I tried the registry and found an option to change the TTL value but not this bit. do you have an idea of what you suggested about "external libraries which implement the low level functionality".

Thanks

Yair

0 Kudos
Message 3 of 13
(4,634 Views)

If we can figure out how this program does it. Still looking.

http://www.komodia.com/tools.htm

0 Kudos
Message 4 of 13
(4,625 Views)
Message 5 of 13
(4,616 Views)


@unclebump wrote:
Maybe one more option.
 


And probably the most LabVIEW only solution: \vi.lib\Utility\tcp.llb\UDP Get Raw Net Object.vi

This will return the native host socket (an int32 here) that LabVIEW associated with the UDP refnum. With this you can call Winsock (or BSD socket on other platforms) functions that expect a socket. One possible function that might be interesting is
int setsockopt(
SOCKET s,
int level,
int optname,
const char* optval,
int optlen
);

with the option IP_DONTFRAGMENT, BUT!!!!!

MSDN states: Indicates that data should not be fragmented regardless of the
local MTU. Valid only for message oriented protocols. All Microsoft providers
silently ignore this option.

So this might be a dead end.

Rolf Kalbermatter

Message Edited by rolfk on 07-23-2006 09:41 PM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 13
(4,607 Views)
Hi rolf,
 
can you give me an example how to use this VI and winsock function. do I need to wire the Connection ID of this vi to the UDP open connection out? (it does not work). how can i insert the winsock function call in my labview program?
what should be the parameters in this function?
 
Thanks
Yair
0 Kudos
Message 7 of 13
(4,596 Views)


@yairn wrote:
Hi rolf,
 
can you give me an example how to use this VI and winsock function. do I need to wire the Connection ID of this vi to the UDP open connection out? (it does not work). how can i insert the winsock function call in my labview program?
what should be the parameters in this function?
 
Thanks
Yair


It does work, but you need to make sure you use the UDP Get Raw Net Object.vi not the TCP Get Raw Net Object.vi. Those refnums are not wire compatible. And you will need to understand a little C as you will go to use the Call Libraray Node to call winsock functions directly.

As to the parameters for setsockopt refer to msdn.microsoft.com. They can explain everything a lot better than I could in many words.

Rolf Kalbermatter

Message Edited by rolfk on 07-24-2006 10:25 PM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 8 of 13
(4,575 Views)

Hi Rolf,

Thanks!!!! I managed to do it and it works great.

 

Yair

0 Kudos
Message 9 of 13
(4,566 Views)

Good find uncle and rolf -- thanks for your contribution!

Yair - if you appreciate their help, make sure you give them a 5-star message rating 🙂

Have a great week everybody-

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 10 of 13
(4,552 Views)