public MTUConfig GetMTU(IPEndPoint ep) { var result = new MTUConfig(); if (ep == null) { result.MTU = 1484 - 28; // IPV4 28 byte UDP header result.MTUMax = 1484 - 28; result.MTUMin = 620 - 28; return(result); } switch (ep.AddressFamily) { case System.Net.Sockets.AddressFamily.InterNetwork: result.MTU = 1484 - 28; result.MTUMax = 1484 - 28; result.MTUMin = 620 - 28; break; case System.Net.Sockets.AddressFamily.InterNetworkV6: result.MTU = 1280 - 48; // IPV6 48 byte UDP header result.MTUMax = 1472 - 48; result.MTUMin = 1280 - 48; break; default: throw new NotImplementedException(ep.AddressFamily.ToString() + " not supported"); } return(result); }
public void MTUUsed(IPEndPoint ep, MTUConfig mtu) { }