NatType.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. namespace STUN.Enums
  2. {
  3. /// <summary>
  4. /// https://tools.ietf.org/html/rfc3489#section-5
  5. /// https://tools.ietf.org/html/rfc3489#section-10.1
  6. /// </summary>
  7. public enum NatType
  8. {
  9. /// <summary>
  10. /// Unknown
  11. /// </summary>
  12. Unknown,
  13. /// <summary>
  14. /// Server is not unsupported for testing NAT type
  15. /// </summary>
  16. UnsupportedServer,
  17. /// <summary>
  18. /// UDP is always blocked.
  19. /// </summary>
  20. UdpBlocked,
  21. /// <summary>
  22. /// No NAT, public IP, no firewall.
  23. /// </summary>
  24. OpenInternet,
  25. /// <summary>
  26. /// No NAT, public IP, but symmetric UDP firewall.
  27. /// </summary>
  28. SymmetricUdpFirewall,
  29. /// <summary>
  30. /// A full cone NAT is one where all requests from the same internal IP address and port are
  31. /// mapped to the same external IP address and port. Furthermore, any external host can send
  32. /// a packet to the internal host, by sending a packet to the mapped external address.
  33. /// </summary>
  34. FullCone,
  35. /// <summary>
  36. /// A restricted cone NAT is one where all requests from the same internal IP address and
  37. /// port are mapped to the same external IP address and port. Unlike a full cone NAT, an external
  38. /// host (with IP address X) can send a packet to the internal host only if the internal host
  39. /// had previously sent a packet to IP address X.
  40. /// </summary>
  41. RestrictedCone,
  42. /// <summary>
  43. /// A port restricted cone NAT is like a restricted cone NAT, but the restriction
  44. /// includes port numbers. Specifically, an external host can send a packet, with source IP
  45. /// address X and source port P, to the internal host only if the internal host had previously
  46. /// sent a packet to IP address X and port P.
  47. /// </summary>
  48. PortRestrictedCone,
  49. /// <summary>
  50. /// A symmetric NAT is one where all requests from the same internal IP address and port,
  51. /// to a specific destination IP address and port, are mapped to the same external IP address and
  52. /// port. If the same host sends a packet with the same source address and port, but to
  53. /// a different destination, a different mapping is used. Furthermore, only the external host that
  54. /// receives a packet can send a UDP packet back to the internal host.
  55. /// </summary>
  56. Symmetric
  57. }
  58. }