summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/NATPortMapping.h')
-rw-r--r--Swiften/Network/NATPortMapping.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/Swiften/Network/NATPortMapping.h b/Swiften/Network/NATPortMapping.h
new file mode 100644
index 0000000..82f62bb
--- /dev/null
+++ b/Swiften/Network/NATPortMapping.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2011 Tobias Markmann
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Network/HostAddress.h>
+
+namespace Swift {
+ struct NATPortMapping {
+ enum Protocol {
+ TCP,
+ UDP,
+ };
+
+ NATPortMapping(int localPort, int publicPort, Protocol protocol = TCP, int leaseInSeconds = 60 * 60 * 24) : publicPort(publicPort), localPort(localPort), protocol(protocol), leaseInSeconds(leaseInSeconds) {
+
+ }
+
+ int publicPort;
+ int localPort;
+ Protocol protocol;
+ int leaseInSeconds;
+ };
+}