Search code examples
c#udpmtu

Path MTU Discovery in C#


How do I find the path MTU between connection? I need this to define the packet size of my UDP connection. Is there things like Path MTU Discovery in .Net?


Solution

  • Taken from here:

    winsock doesn't support reporting the discovered MTU, even though other TCP/IP stacks do (e.g. AIX through a socket option IP_GETPMTU). As winsock cannot report that, .NET can't provide an API (which would have to be on top of winsock).