25#if !defined (__SAIIPSEC_H_)
42 SAI_IPSEC_DIRECTION_EGRESS,
43 SAI_IPSEC_DIRECTION_INGRESS,
51 SAI_IPSEC_CIPHER_AES128_GCM16,
52 SAI_IPSEC_CIPHER_AES256_GCM16,
53 SAI_IPSEC_CIPHER_AES128_GMAC,
54 SAI_IPSEC_CIPHER_AES256_GMAC,
737 _Out_ sai_object_id_t *ipsec_id,
738 _In_ sai_object_id_t switch_id,
739 _In_ uint32_t attr_count,
750 _In_ sai_object_id_t ipsec_id);
761 _In_ sai_object_id_t ipsec_id,
774 _In_ sai_object_id_t ipsec_id,
775 _In_ uint32_t attr_count,
789 _Out_ sai_object_id_t *ipsec_port_id,
790 _In_ sai_object_id_t switch_id,
791 _In_ uint32_t attr_count,
802 _In_ sai_object_id_t ipsec_port_id);
813 _In_ sai_object_id_t ipsec_port_id,
826 _In_ sai_object_id_t ipsec_port_id,
827 _In_ uint32_t attr_count,
841 _In_ sai_object_id_t ipsec_port_id,
842 _In_ uint32_t number_of_counters,
843 _In_
const sai_stat_id_t *counter_ids,
844 _Out_ uint64_t *counters);
858 _In_ sai_object_id_t ipsec_port_id,
859 _In_ uint32_t number_of_counters,
860 _In_
const sai_stat_id_t *counter_ids,
862 _Out_ uint64_t *counters);
874 _In_ sai_object_id_t ipsec_port_id,
875 _In_ uint32_t number_of_counters,
876 _In_
const sai_stat_id_t *counter_ids);
889 _Out_ sai_object_id_t *ipsec_sa_id,
890 _In_ sai_object_id_t switch_id,
891 _In_ uint32_t attr_count,
902 _In_ sai_object_id_t ipsec_sa_id);
913 _In_ sai_object_id_t ipsec_sa_id,
926 _In_ sai_object_id_t ipsec_sa_id,
927 _In_ uint32_t attr_count,
941 _In_ sai_object_id_t ipsec_sa_id,
942 _In_ uint32_t number_of_counters,
943 _In_
const sai_stat_id_t *counter_ids,
944 _Out_ uint64_t *counters);
958 _In_ sai_object_id_t ipsec_sa_id,
959 _In_ uint32_t number_of_counters,
960 _In_
const sai_stat_id_t *counter_ids,
962 _Out_ uint64_t *counters);
974 _In_ sai_object_id_t ipsec_sa_id,
975 _In_ uint32_t number_of_counters,
976 _In_
const sai_stat_id_t *counter_ids);
enum _sai_ipsec_port_attr_t sai_ipsec_port_attr_t
Attribute Id for sai_ipsec_port.
_sai_ipsec_attr_t
Attribute Id for sai_ipsec.
sai_status_t(* sai_remove_ipsec_fn)(_In_ sai_object_id_t ipsec_id)
Delete the IPsec object.
enum _sai_ipsec_sa_stat_t sai_ipsec_sa_stat_t
IPsec flow counter IDs in sai_get_ipsec_sa_stats() call.
sai_status_t(* sai_set_ipsec_attribute_fn)(_In_ sai_object_id_t ipsec_id, _In_ const sai_attribute_t *attr)
Set IPsec attribute.
_sai_ipsec_sa_octet_count_status_t
IPsec SA sequence number status type.
_sai_ipsec_sa_stat_t
IPsec flow counter IDs in sai_get_ipsec_sa_stats() call.
sai_status_t(* sai_set_ipsec_sa_attribute_fn)(_In_ sai_object_id_t ipsec_sa_id, _In_ const sai_attribute_t *attr)
Set IPsec Security Association attribute.
sai_status_t(* sai_create_ipsec_fn)(_Out_ sai_object_id_t *ipsec_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
Create a IPsec object.
struct _sai_ipsec_sa_status_notification_t sai_ipsec_sa_status_notification_t
IPsec SA status for notification.
enum _sai_ipsec_attr_t sai_ipsec_attr_t
Attribute Id for sai_ipsec.
sai_status_t(* sai_get_ipsec_sa_stats_fn)(_In_ sai_object_id_t ipsec_sa_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _Out_ uint64_t *counters)
Get IPsec Security Association counters.
struct _sai_ipsec_api_t sai_ipsec_api_t
IPsec methods table retrieved with sai_api_query()
sai_status_t(* sai_get_ipsec_attribute_fn)(_In_ sai_object_id_t ipsec_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
Get IPsec attribute.
sai_status_t(* sai_get_ipsec_sa_attribute_fn)(_In_ sai_object_id_t ipsec_sa_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
Get IPsec Security Association attribute.
sai_status_t(* sai_get_ipsec_port_attribute_fn)(_In_ sai_object_id_t ipsec_port_id, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
Get IPsec port attribute.
_sai_ipsec_sa_attr_t
Attribute Id for sai_ipsec_sa.
enum _sai_ipsec_direction_t sai_ipsec_direction_t
IPsec direction types For PHY ASIC Egress is system to line direction and ingress is the opposite.
sai_status_t(* sai_get_ipsec_port_stats_ext_fn)(_In_ sai_object_id_t ipsec_port_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _In_ sai_stats_mode_t mode, _Out_ uint64_t *counters)
Get IPsec port counters extended.
sai_status_t(* sai_create_ipsec_sa_fn)(_Out_ sai_object_id_t *ipsec_sa_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
Create a IPsec Security Association.
_sai_ipsec_port_attr_t
Attribute Id for sai_ipsec_port.
sai_status_t(* sai_create_ipsec_port_fn)(_Out_ sai_object_id_t *ipsec_port_id, _In_ sai_object_id_t switch_id, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
Create a IPsec port.
enum _sai_ipsec_sa_attr_t sai_ipsec_sa_attr_t
Attribute Id for sai_ipsec_sa.
sai_status_t(* sai_clear_ipsec_port_stats_fn)(_In_ sai_object_id_t ipsec_port_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids)
Clear IPsec port counters.
sai_status_t(* sai_remove_ipsec_sa_fn)(_In_ sai_object_id_t ipsec_sa_id)
Delete a IPsec Security Association.
sai_status_t(* sai_set_ipsec_port_attribute_fn)(_In_ sai_object_id_t ipsec_port_id, _In_ const sai_attribute_t *attr)
Set IPsec port attribute.
_sai_ipsec_cipher_t
IPsec cipher suite types.
enum _sai_ipsec_cipher_t sai_ipsec_cipher_t
IPsec cipher suite types.
sai_status_t(* sai_get_ipsec_port_stats_fn)(_In_ sai_object_id_t ipsec_port_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _Out_ uint64_t *counters)
Get IPsec port counters.
sai_status_t(* sai_get_ipsec_sa_stats_ext_fn)(_In_ sai_object_id_t ipsec_sa_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids, _In_ sai_stats_mode_t mode, _Out_ uint64_t *counters)
Get IPsec Security Association counters extended.
_sai_ipsec_port_stat_t
IPsec flow counter IDs in sai_get_ipsec_sa_stats() call.
sai_status_t(* sai_remove_ipsec_port_fn)(_In_ sai_object_id_t ipsec_port_id)
Delete a IPsec port.
_sai_ipsec_direction_t
IPsec direction types For PHY ASIC Egress is system to line direction and ingress is the opposite.
sai_status_t(* sai_clear_ipsec_sa_stats_fn)(_In_ sai_object_id_t ipsec_sa_id, _In_ uint32_t number_of_counters, _In_ const sai_stat_id_t *counter_ids)
Clear IPsec Security Association counters.
enum _sai_ipsec_port_stat_t sai_ipsec_port_stat_t
IPsec flow counter IDs in sai_get_ipsec_sa_stats() call.
enum _sai_ipsec_sa_octet_count_status_t sai_ipsec_sa_octet_count_status_t
IPsec SA sequence number status type.
void(* sai_ipsec_sa_status_change_notification_fn)(_In_ uint32_t count, _In_ const sai_ipsec_sa_status_notification_t *data)
IPsec SA status change notification.
@ SAI_IPSEC_ATTR_TERM_REMOTE_IP_MATCH_SUPPORTED
Security Engine supports matching source IP address for tunnel termination.
@ SAI_IPSEC_ATTR_STATS_MODE_READ_CLEAR_SUPPORTED
SAI_STATS_MODE_READ_CLEAR supported.
@ SAI_IPSEC_ATTR_MAX_VLAN_TAGS_PARSED
Maximum number of VLAN tags to parse.
@ SAI_IPSEC_ATTR_SYSTEM_SIDE_MTU
IPsec MTU capability on system side (not including IPsec overhead).
@ SAI_IPSEC_ATTR_STATS_MODE_READ_SUPPORTED
SAI_STATS_MODE_READ supported.
@ SAI_IPSEC_ATTR_START
Start of IPsec attributes.
@ SAI_IPSEC_ATTR_OCTET_COUNT_HIGH_WATERMARK
High watermark for byte count.
@ SAI_IPSEC_ATTR_WARM_BOOT_ENABLE
If false, disables creation of saiipsec objects during warm-boot.
@ SAI_IPSEC_ATTR_SUPPORTED_CIPHER_LIST
List of supported cipher suites.
@ SAI_IPSEC_ATTR_SWITCHING_MODE_CUT_THROUGH_SUPPORTED
SAI_SWITCH_SWITCHING_MODE_CUT_THROUGH supported.
@ SAI_IPSEC_ATTR_EXTERNAL_SA_INDEX_ENABLE
If true, SA Index is assigned by NOS. If false, SA Index is assigned by IPsec SAI driver.
@ SAI_IPSEC_ATTR_ESN_64BIT_SUPPORTED
Indicates if 64-bit Extended Sequence Number (ESN) is supported.
@ SAI_IPSEC_ATTR_WARM_BOOT_SUPPORTED
Warm boot is supported for all saiipsec objects.
@ SAI_IPSEC_ATTR_SA_LIST
IPsec SA list.
@ SAI_IPSEC_ATTR_OCTET_COUNT_LOW_WATERMARK
Low watermark for byte count.
@ SAI_IPSEC_ATTR_STATS_MODE
Global setting of read-clear or read-only for statistics read. The mode parameter for get_ipsec_<foo>...
@ SAI_IPSEC_ATTR_CTAG_TPID
TPID value used to identify C-tag.
@ SAI_IPSEC_ATTR_END
End of IPsec attributes.
@ SAI_IPSEC_ATTR_SN_32BIT_SUPPORTED
Indicates if 32-bit Sequence Number (SN) is supported.
@ SAI_IPSEC_ATTR_CUSTOM_RANGE_START
Custom range base value.
@ SAI_IPSEC_ATTR_STAG_TPID
TPID value used to identify S-tag.
@ SAI_IPSEC_ATTR_SWITCHING_MODE_STORE_AND_FORWARD_SUPPORTED
SAI_SWITCH_SWITCHING_MODE_STORE_AND_FORWARD supported.
@ SAI_IPSEC_ATTR_CUSTOM_RANGE_END
End of custom range base.
@ SAI_IPSEC_ATTR_AVAILABLE_IPSEC_SA
Available IPsec Security Associations.
@ SAI_IPSEC_SA_OCTET_COUNT_STATUS_BELOW_LOW_WATERMARK
@ SAI_IPSEC_SA_OCTET_COUNT_STATUS_ABOVE_HIGH_WATERMARK
@ SAI_IPSEC_SA_OCTET_COUNT_STATUS_BELOW_HIGH_WATERMARK
@ SAI_IPSEC_SA_STAT_GOOD_PKTS
Count of validated error-free received (ingress) packets for this SA. Valid only for ingress,...
@ SAI_IPSEC_SA_STAT_DUMMY_DROPPED_PKTS_IN
Count of dummy packets dropped by IPsec logic. These are packets with 59 as the next header field val...
@ SAI_IPSEC_SA_STAT_LATE_PKTS_IN
Count of packets outside the replay window. Always 0 if the hardware does not provide a separate coun...
@ SAI_IPSEC_SA_STAT_BAD_TRAILER_PKTS_IN
Count of packets with bad trailer. This could be due to insufficient or invalid padding,...
@ SAI_IPSEC_SA_STAT_AUTH_FAIL_PKTS_IN
Count of packets with authentication and integrity failure For cut-through switching,...
@ SAI_IPSEC_SA_STAT_REPLAYED_PKTS_IN
Count of replayed packets. This also includes late packets if the hardware does not provide a separat...
@ SAI_IPSEC_SA_STAT_OTHER_DROPPED_PKTS
Count of other packets dropped by IPsec logic. This could be due to not programmed or incorrectly pro...
@ SAI_IPSEC_SA_STAT_BAD_HEADER_PKTS_IN
Count of packets with bad header for this SA. This could be due the packet header being different fro...
@ SAI_IPSEC_SA_STAT_PROTECTED_PKTS
Count of Ethernet frames processed by this SA. This should normally be the sum of all the good and er...
@ SAI_IPSEC_SA_STAT_PROTECTED_OCTETS
Total octets in all Ethernet frames processed by this SA.
@ SAI_IPSEC_SA_ATTR_SALT
IPsec Salt portion of IV Network Byte order.
@ SAI_IPSEC_SA_ATTR_CUSTOM_RANGE_START
Custom range base value.
@ SAI_IPSEC_SA_ATTR_IPSEC_PORT_LIST
List of IPsec ports for this SA.
@ SAI_IPSEC_SA_ATTR_IPSEC_REPLAY_PROTECTION_ENABLE
Replay protection enable for this Security Association.
@ SAI_IPSEC_SA_ATTR_CUSTOM_RANGE_END
End of custom range base.
@ SAI_IPSEC_SA_ATTR_IPSEC_SPI
SPI value for this Security Association, carried in ESP header.
@ SAI_IPSEC_SA_ATTR_EGRESS_ESN
IPsec egress sequence number (SN). One less than the next SN.
@ SAI_IPSEC_SA_ATTR_OCTET_COUNT_STATUS
SA byte count status.
@ SAI_IPSEC_SA_ATTR_SA_INDEX
SA Index value for this Security Association.
@ SAI_IPSEC_SA_ATTR_MINIMUM_INGRESS_ESN
Minimum value of ingress IPsec sequence number (SN). Can be Updated by value from IPsec peer for gros...
@ SAI_IPSEC_SA_ATTR_TERM_SRC_IP
Remote IP address for tunnel termination.
@ SAI_IPSEC_SA_ATTR_EXTERNAL_SA_INDEX
Externally assigned SA Index value for this Security Association. Used only when SAI_IPSEC_ATTR_EXTER...
@ SAI_IPSEC_SA_ATTR_ENCRYPT_KEY
IPsec Traffic Encryption Key used for encryption/decryption. Network Byte order. AES128 uses only Byt...
@ SAI_IPSEC_SA_ATTR_IPSEC_ESN_ENABLE
Enable 64-bit ESN (vs 32-bit SN) for this Security Association.
@ SAI_IPSEC_SA_ATTR_IPSEC_DIRECTION
IPsec direction.
@ SAI_IPSEC_SA_ATTR_START
Start of IPsec Security Association attributes.
@ SAI_IPSEC_SA_ATTR_AUTH_KEY
IPsec Authentication Key Network Byte order.
@ SAI_IPSEC_SA_ATTR_IPSEC_CIPHER
Cipher suite for this SA.
@ SAI_IPSEC_SA_ATTR_TERM_VLAN_ID
Vlan Id for tunnel termination.
@ SAI_IPSEC_SA_ATTR_TERM_VLAN_ID_ENABLE
Match Vlan Id for tunnel termination.
@ SAI_IPSEC_SA_ATTR_TERM_DST_IP
SA local IP address for tunnel termination.
@ SAI_IPSEC_SA_ATTR_IPSEC_REPLAY_PROTECTION_WINDOW
Replay protection window for this Security Association.
@ SAI_IPSEC_SA_ATTR_IPSEC_ID
IPsec object id.
@ SAI_IPSEC_SA_ATTR_END
End of IPsec Security Association attributes.
@ SAI_IPSEC_SA_ATTR_TERM_SRC_IP_ENABLE
Match remote IP address for tunnel termination.
@ SAI_IPSEC_PORT_ATTR_START
Start of IPsec Port attributes.
@ SAI_IPSEC_PORT_ATTR_NATIVE_VLAN_ID
Port native Vlan Id used for Security Engine SA termination.
@ SAI_IPSEC_PORT_ATTR_VRF_FROM_PACKET_VLAN_ENABLE
Enable VRF identification from ingress parsed packet Vlan.
@ SAI_IPSEC_PORT_ATTR_CUSTOM_RANGE_END
End of custom range base.
@ SAI_IPSEC_PORT_ATTR_STAG_ENABLE
Enable vlan tag parsing for S-tag TPID.
@ SAI_IPSEC_PORT_ATTR_PORT_ID
Associated port id.
@ SAI_IPSEC_PORT_ATTR_CTAG_ENABLE
Enable vlan tag parsing for C-tag TPID.
@ SAI_IPSEC_PORT_ATTR_END
End of IPsec Port attributes.
@ SAI_IPSEC_PORT_ATTR_CUSTOM_RANGE_START
Custom range base value.
@ SAI_IPSEC_PORT_ATTR_SWITCH_SWITCHING_MODE
Switching mode for port. If configured as cut-through, the IPG for Tx MAC in the switch ASIC has to b...
@ SAI_IPSEC_PORT_STAT_TX_ERROR_PKTS
Packets dropped after receive MAC and before IPsec SA processing. This could be due to malformed head...
@ SAI_IPSEC_PORT_STAT_TX_IPSEC_PKTS
Packets mapped to an SA for IPsec processing.
@ SAI_IPSEC_PORT_STAT_RX_ERROR_PKTS
Packets dropped after receive MAC and before IPsec SA processing. This could be due to malformed head...
@ SAI_IPSEC_PORT_STAT_RX_IPSEC_PKTS
Packets mapped to an SA for IPsec processing.
@ SAI_IPSEC_PORT_STAT_TX_NON_IPSEC_PKTS
Non-IPsec packets that pass through this port.
@ SAI_IPSEC_PORT_STAT_RX_NON_IPSEC_PKTS
Non-IPsec packets that pass through this port.
enum _sai_stats_mode_t sai_stats_mode_t
SAI statistics modes.
This module defines SAI portable types.
IPsec methods table retrieved with sai_api_query()
IPsec SA status for notification.
bool ipsec_egress_sn_at_max_limit
IPsec egress SA sequence number at max limit.
sai_ipsec_sa_octet_count_status_t ipsec_sa_octet_count_status
IPsec SA byte count status.
sai_object_id_t ipsec_sa_id
IPsec SA object id.