aboutgitcodebugslistschat
path: root/port_fwd.h
diff options
context:
space:
mode:
Diffstat (limited to 'port_fwd.h')
-rw-r--r--port_fwd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/port_fwd.h b/port_fwd.h
index b938022..7e6a7d7 100644
--- a/port_fwd.h
+++ b/port_fwd.h
@@ -16,4 +16,16 @@ enum port_fwd_mode {
#define PORT_BITMAP_SIZE DIV_ROUND_UP(USHRT_MAX, 8)
+/**
+ * port_fwd - Describes port forwarding for one protocol and direction
+ * @mode: Overall forwarding mode (all, none, auto, specific ports)
+ * @map: Bitmap describing which ports are forwarded
+ * @delta: Offset between the original destination and mapped port number
+ */
+struct port_fwd {
+ enum port_fwd_mode mode;
+ uint8_t map[PORT_BITMAP_SIZE];
+ in_port_t delta[USHRT_MAX];
+};
+
#endif /* PORT_FWD_H */