summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/lib
diff options
context:
space:
mode:
authorJon Loeliger <jdl@netgate.com>2022-08-17 12:08:31 -0500
committerJon Loeliger <jdl@netgate.com>2022-08-19 10:44:26 -0500
commit5b88feeb7f81905df0cffc5d7cb372c98cfa949e (patch)
treea010a06b274b237cdbf1d5d18b3d2881aa403c02 /src/plugins/nat/lib
parentc428fd5d9476baba02edc0a10552719460e85b1e (diff)
nat: simplify per-protocol code by using an array
rather than using obfuscated macro hacery, simplify the per-protocol data management by directly using an array of NAT protocol types. Type: refactor Signed-off-by: Jon Loeliger <jdl@netgate.com> Change-Id: I6fe987556ac9f402f8d490da0740e2b91440304c
Diffstat (limited to 'src/plugins/nat/lib')
-rw-r--r--src/plugins/nat/lib/nat_proto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/nat/lib/nat_proto.h b/src/plugins/nat/lib/nat_proto.h
index 9b20d9a71d1..4b57b994e22 100644
--- a/src/plugins/nat/lib/nat_proto.h
+++ b/src/plugins/nat/lib/nat_proto.h
@@ -28,6 +28,7 @@ typedef enum
#define _(N, i, n, s) NAT_PROTOCOL_##N = i,
foreach_nat_protocol
#undef _
+ NAT_N_PROTOCOLS
} nat_protocol_t;
always_inline nat_protocol_t