DOCA Policy for Security Association (SA) Attributes (IPSec):
+--------------—+--------------—+--------------------—+-------------------—+ | MSG length (4) | +--------------—+--------------—+--------------------—+-------------------—+ | src_port (2) | dst_port (2) | +--------------—+--------------—+--------------------—+-------------------—+ | l3_protocol (1) | l4_protocol (1) | outer_l3_protocol (1) | direction (1) | +--------------—+--------------—+--------------------—+-------------------—+ | layer_mode (1) | ESN (1) | icv_length (1) | key_type (1) | +--------------—+--------------—+--------------------—+-------------------—+ | SPI (4) | +--------------—+--------------—+--------------------—+-------------------—+ | salt (4) | +--------------—+--------------—+--------------------—+-------------------—+ | | | src_ip_addr (47) | | | +--------------—+--------------—+--------------------—+-------------------—+ | | | dst_ip_addr (47) | | | +--------------—+--------------—+--------------------—+-------------------—+ | | | outer_src_ip (47) | | | +--------------—+--------------—+--------------------—+-------------------—+ | | | outer_dst_ip (47) | | | +--------------—+--------------—+--------------------—+-------------------—+ | | | enc_key (K) | | | +--------------—+--------------—+--------------------—+-------------------—+
Notes:
- All fields are to be represented in Network-Order (Big Endian)
- Each message over UDS transport starts with 4 bytes message length for policy record size
- Valid policy record sizes (not including message length): 224 bytes (K = 16), 240 Bytes (K = 32)
Fields Explained:
src_port - Inner source port (L4) dst_port - Inner destination port (L4) l3_protocol - Inner L3 protocol: {IPPROTO_IPV4 (0x04), IPPROTO_IPV6 (0x06)} l4_protocol - Inner L4 protocol: {IPPROTO_UDP (0x11), IPPROTO_TCP (0x06)} outer_l3_protocol - Outer L3 protocol: {IPPROTO_IPV4 (0x04), IPPROTO_IPV6 (0x06)} direction - Traffic direction {Ingress traffic (0), Egress traffic (1)} layer_mode - IPSEC mode: {POLICY_MODE_TRANSPORT (0), POLICY_MODE_TUNNEL (1)} ESN - Is ESN enabled? {FALSE (0), TRUE (1)} icv_length - ICV length: {8, 12, 16} key_type - AES Key type: {128 Bits (0), 256 Bits (1)} SPI - Security Parameter Index (SPI) salt - Cryptographic salt src_ip_addr - Inner IP source address - String format, padded with \0 bytes to max size (INET6_ADDRSTRLEN := 46) dst_ip_addr - Inner IP destination address - String format, padded with \0 bytes to max size (INET6_ADDRSTRLEN := 46) outer_src_ip - Outer IP source address - String format, padded with \0 bytes to max size (INET6_ADDRSTRLEN := 46) outer_dst_ip - Outer IP destination address - String format, padded with \0 bytes to max size (INET6_ADDRSTRLEN := 46) enc_key - Encryption key - Length (K) matching key_type (16 bytes / 32 bytes)
Definition at line 108 of file policy.h.