Setting the IP_DF flag on my UDP socket not working

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting the IP_DF flag on my UDP socket not working

jill_adelstein
Hello,
I am working on an application where I am streaming data over UDP using lwip sendto().I am trying to set the don't fragment flag on my UDP socket as follows:

int enable = 1;
setsockopt(sock, SOL_SOCKET, IP_DF, reinterpret_cast<const void *>(&enable), static_cast<socklen_t>(sizeof enable));

When I look at my Wireshark capture, however, I see that the Don't fragment Flag is "Not set". Am I doing something wrong?  I am using a Xilinx zynq 7000 Ultrascale plus with the FreeRTOS bsp.
Thanks.
Jill
__________________________________________________________________________
Jill Adelstein | Firmware Engineer | MeterSystems R&D - Boise
Schweitzer Engineering Laboratories Inc.
2350 NE Hopkins Court | Pullman, WA 99163 | 509.334.4917 | [hidden email]
SEL: www.selinc.com



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Setting the IP_DF flag on my UDP socket not working

goldsimon@gmx.de
Am 29.10.2019 um 01:10 schrieb [hidden email]:
> Hello,
> I am working on an application where I am streaming data over UDP using
> lwip sendto().I am trying to set the don't fragment flag on my UDP
> socket as follows:
>
> int enable = 1;
> setsockopt(sock, SOL_SOCKET, IP_DF, reinterpret_cast<const void
> *>(&enable), static_cast<socklen_t>(sizeof enable));

Where did you get the idea to do it like that?

We try to follow the opengroup standard for socket functions. In other
words, try what you want on Linux/BSD (etc) and if it works, use that
code on lwIP.

However, I can tell you right now that this is not currently supported.
Adding support should not be that hard, however, and is probably a good
idea.

Care to open a task on our savannah bugtracker once you found out the
correct parameters to setsockopt?

Regards,
Simon

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users