aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/libalias/alias.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/libalias/alias.h')
-rw-r--r--sys/netinet/libalias/alias.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/netinet/libalias/alias.h b/sys/netinet/libalias/alias.h
index 706184552429..96d8ceec28be 100644
--- a/sys/netinet/libalias/alias.h
+++ b/sys/netinet/libalias/alias.h
@@ -227,6 +227,26 @@ struct mbuf *m_megapullup(struct mbuf *, int);
*/
#define PKT_ALIAS_UNREGISTERED_CGN 0x400
+/*
+ * When this bit is set, UDP uses endpoint-independent mapping (EIM), as per
+ * RFC 4787 ("full cone" NAT of RFC 3489). All packets from the same internal
+ * address:port are mapped to the same NAT address:port, regardless of their
+ * destination address:port. If filtering rules allow, and if
+ * PKT_ALIAS_DENY_INCOMING is unset, any other external address:port can also
+ * send to the internal address:port through its mapped NAT address:port. This
+ * is more compatible with applications, and can reduce the need for port
+ * forwarding, but less scalable as each NAT address:port can only be
+ * concurrently used by at most one internal address:port.
+ *
+ * When this bit is unset, UDP packets use endpoint-dependent mapping (EDM)
+ * ("symmetric" NAT). Each connection from a particular internal address:port
+ * to different external addresses:ports is mapped to a random and
+ * unpredictable NAT address:port. Two appplications behind EDM NATs can only
+ * connect to each other by port forwarding on the NAT, or tunnelling through
+ * an in-between server.
+ */
+#define PKT_ALIAS_UDP_EIM 0x800
+
/* Function return codes. */
#define PKT_ALIAS_ERROR -1
#define PKT_ALIAS_OK 1