Greetings Simon, The Linux man pages mention the IP_PMTUDISC_DO flag that "forces the don't-fragment flag to be set on all outgoing packets" in the setsockopt() description.
The documentation for setsockopt() for BSD 4.3 lists the similar flag "IP_DONTFRAG", with the qualifier "This option is supported for sockets with an address family of AF_INET and type of SOCK_DGRAM or SOCK_RAW only." The Microsoft documentation at: https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options lists an option called IP_DONTFRAGMENT, about which they state "Microsoft TCP/IP providers respect this option for UDP and ICMP." There is also a reference for the .NET framework at https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.dontfragment?view=netframework-4.8 if you have any interest in that. There is also a comment I do not completely understand in the lwIP ip.c file (line 790 in the ip_output_if() function, version 1.4.1) that states "don't fragment if interface has mtu set to 0." I am not very familiar with sockets programming. I did some 20 years ago, but I am sure it has changed since then. I have been using the lwIP callback API in all my products for the last 14 years. Since I am using the callback API, I will need something that works through that API. I hope this information is sufficient. I am very willing to patch my system and do testing for you. I just need some guidance about where to make the changes. I have been using lwIP for some time, but I have not paid that much attention to its interior. It has always just worked for me, straight out of the box. Regards, Roger W. Cover ________________________________________ From: lwip-users <lwip-users-bounces+rcover=specinst....@nongnu.org> on behalf of goldsi...@gmx.de <goldsi...@gmx.de> Sent: Saturday, March 7, 2020 2:02 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] Do not fragment (DF) in a UDP transmission. Am 06.03.2020 um 21:37 schrieb Roger Cover: > Greetings, > > I am writing a video transmitter. The protocol I am using requires that a > "test packet" has its do not fragment bit set. This is used to determine the > maximum usable MTU of the intervening network nodes. > > I would like to know the recommended method for setting this bit in my UDP > transmission. I am currently using the ip_output_if() function, and it does > not have any arguments to allow this. That's currently not supported (hasn't been requested so far). If you tell me a standard way to do that (e.g. how is it done on sockets), I guess adding this should not be too hard. Regards, Simon _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users