From f284c14c7bd8731367ba3527cdfffa610a8c6de4 Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Wed, 2 Feb 2022 19:31:58 +0100 Subject: cnat: Add sctp support This patch adds SCTP support in the CNat translation primitives. It also exposes a clib_crc32c_with_init function allowing to set the init value to start the crc32 with instead of 0. Type: feature Change-Id: I86add4cfcac08f2a5a34d1e1841122fafd349fe7 Signed-off-by: Nathan Skrzypczak --- src/plugins/cnat/cnat_types.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/plugins/cnat/cnat_types.h') diff --git a/src/plugins/cnat/cnat_types.h b/src/plugins/cnat/cnat_types.h index 7b779a66a4e..bf2726fa63a 100644 --- a/src/plugins/cnat/cnat_types.h +++ b/src/plugins/cnat/cnat_types.h @@ -55,6 +55,17 @@ #define MIN_SRC_PORT ((u16) 0xC000) +typedef struct +{ + /* Source and destination port. */ + u16 src_port, dst_port; + + /* Random value to distinguish connections. */ + u32 verification_tag; + + u32 checksum; +} sctp_header_t; + typedef enum cnat_trk_flag_t_ { /* Endpoint is active (static or dhcp resolved) */ -- cgit 1.2.3-korg