SAI Metadata
Loading...
Searching...
No Matches
SAI - Neighbor specific API definitions.

Classes

struct  _sai_neighbor_entry_t
 Neighbor entry. More...
 
struct  _sai_neighbor_api_t
 Neighbor table methods, retrieved via sai_api_query() More...
 

Typedefs

typedef enum _sai_neighbor_entry_attr_t sai_neighbor_entry_attr_t
 Attribute Id for SAI neighbor object.
 
typedef struct _sai_neighbor_entry_t sai_neighbor_entry_t
 Neighbor entry.
 
typedef sai_status_t(* sai_create_neighbor_entry_fn) (_In_ const sai_neighbor_entry_t *neighbor_entry, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)
 Create neighbor entry.
 
typedef sai_status_t(* sai_remove_neighbor_entry_fn) (_In_ const sai_neighbor_entry_t *neighbor_entry)
 Remove neighbor entry.
 
typedef sai_status_t(* sai_set_neighbor_entry_attribute_fn) (_In_ const sai_neighbor_entry_t *neighbor_entry, _In_ const sai_attribute_t *attr)
 Set neighbor attribute value.
 
typedef sai_status_t(* sai_get_neighbor_entry_attribute_fn) (_In_ const sai_neighbor_entry_t *neighbor_entry, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)
 Get neighbor attribute value.
 
typedef sai_status_t(* sai_remove_all_neighbor_entries_fn) (_In_ sai_object_id_t switch_id)
 Remove all neighbor entries.
 
typedef sai_status_t(* sai_bulk_create_neighbor_entry_fn) (_In_ uint32_t object_count, _In_ const sai_neighbor_entry_t *neighbor_entry, _In_ const uint32_t *attr_count, _In_ const sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)
 Bulk create Neighbor entry.
 
typedef sai_status_t(* sai_bulk_remove_neighbor_entry_fn) (_In_ uint32_t object_count, _In_ const sai_neighbor_entry_t *neighbor_entry, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)
 Bulk remove Neighbor entry.
 
typedef sai_status_t(* sai_bulk_set_neighbor_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_neighbor_entry_t *neighbor_entry, _In_ const sai_attribute_t *attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)
 Bulk set attribute on Neighbor entry.
 
typedef sai_status_t(* sai_bulk_get_neighbor_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_neighbor_entry_t *neighbor_entry, _In_ const uint32_t *attr_count, _Inout_ sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)
 Bulk get attribute on Neighbor entry.
 
typedef struct _sai_neighbor_api_t sai_neighbor_api_t
 Neighbor table methods, retrieved via sai_api_query()
 

Enumerations

enum  _sai_neighbor_entry_attr_t {
  SAI_NEIGHBOR_ENTRY_ATTR_START , SAI_NEIGHBOR_ENTRY_ATTR_DST_MAC_ADDRESS = SAI_NEIGHBOR_ENTRY_ATTR_START , SAI_NEIGHBOR_ENTRY_ATTR_PACKET_ACTION , SAI_NEIGHBOR_ENTRY_ATTR_USER_TRAP_ID ,
  SAI_NEIGHBOR_ENTRY_ATTR_NO_HOST_ROUTE , SAI_NEIGHBOR_ENTRY_ATTR_META_DATA , SAI_NEIGHBOR_ENTRY_ATTR_COUNTER_ID , SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_INDEX ,
  SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_IMPOSE_INDEX , SAI_NEIGHBOR_ENTRY_ATTR_IS_LOCAL , SAI_NEIGHBOR_ENTRY_ATTR_IP_ADDR_FAMILY , SAI_NEIGHBOR_ENTRY_ATTR_END ,
  SAI_NEIGHBOR_ENTRY_ATTR_CUSTOM_RANGE_START = 0x10000000 , SAI_NEIGHBOR_ENTRY_ATTR_CUSTOM_RANGE_END
}
 Attribute Id for SAI neighbor object. More...
 

Detailed Description

Typedef Documentation

◆ sai_bulk_create_neighbor_entry_fn

typedef sai_status_t(* sai_bulk_create_neighbor_entry_fn) (_In_ uint32_t object_count, _In_ const sai_neighbor_entry_t *neighbor_entry, _In_ const uint32_t *attr_count, _In_ const sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)

Bulk create Neighbor entry.

Parameters
[in]object_countNumber of objects to create
[in]neighbor_entryList of object to create
[in]attr_countList of attr_count. Caller passes the number of attribute for each object to create.
[in]attr_listList of attributes for every object.
[in]modeBulk operation error handling mode.
[out]object_statusesList of status for every object. Caller needs to allocate the buffer
Returns
SAI_STATUS_SUCCESS on success when all objects are created or SAI_STATUS_FAILURE when any of the objects fails to create. When there is failure, Caller is expected to go through the list of returned statuses to find out which fails and which succeeds.

Definition at line 289 of file saineighbor.h.

◆ sai_bulk_get_neighbor_entry_attribute_fn

typedef sai_status_t(* sai_bulk_get_neighbor_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_neighbor_entry_t *neighbor_entry, _In_ const uint32_t *attr_count, _Inout_ sai_attribute_t **attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)

Bulk get attribute on Neighbor entry.

Parameters
[in]object_countNumber of objects to get attribute
[in]neighbor_entryList of objects to get attribute
[in]attr_countList of attr_count. Caller passes the number of attribute for each object to get
[in,out]attr_listList of attributes to get on objects, one attribute per object
[in]modeBulk operation error handling mode
[out]object_statusesList of status for every object. Caller needs to allocate the buffer
Returns
SAI_STATUS_SUCCESS on success when all objects are get or SAI_STATUS_FAILURE when any of the objects fails to get. When there is failure, Caller is expected to go through the list of returned statuses to find out which fails and which succeeds.

Definition at line 356 of file saineighbor.h.

◆ sai_bulk_remove_neighbor_entry_fn

typedef sai_status_t(* sai_bulk_remove_neighbor_entry_fn) (_In_ uint32_t object_count, _In_ const sai_neighbor_entry_t *neighbor_entry, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)

Bulk remove Neighbor entry.

Parameters
[in]object_countNumber of objects to remove
[in]neighbor_entryList of objects to remove
[in]modeBulk operation error handling mode.
[out]object_statusesList of status for every object. Caller needs to allocate the buffer
Returns
SAI_STATUS_SUCCESS on success when all objects are removed or SAI_STATUS_FAILURE when any of the objects fails to remove. When there is failure, Caller is expected to go through the list of returned statuses to find out which fails and which succeeds.

Definition at line 311 of file saineighbor.h.

◆ sai_bulk_set_neighbor_entry_attribute_fn

typedef sai_status_t(* sai_bulk_set_neighbor_entry_attribute_fn) (_In_ uint32_t object_count, _In_ const sai_neighbor_entry_t *neighbor_entry, _In_ const sai_attribute_t *attr_list, _In_ sai_bulk_op_error_mode_t mode, _Out_ sai_status_t *object_statuses)

Bulk set attribute on Neighbor entry.

Parameters
[in]object_countNumber of objects to set attribute
[in]neighbor_entryList of objects to set attribute
[in]attr_listList of attributes to set on objects, one attribute per object
[in]modeBulk operation error handling mode.
[out]object_statusesList of status for every object. Caller needs to allocate the buffer
Returns
SAI_STATUS_SUCCESS on success when all objects are set or SAI_STATUS_FAILURE when any of the objects fails to set. When there is failure, Caller is expected to go through the list of returned statuses to find out which fails and which succeeds.

Definition at line 332 of file saineighbor.h.

◆ sai_create_neighbor_entry_fn

typedef sai_status_t(* sai_create_neighbor_entry_fn) (_In_ const sai_neighbor_entry_t *neighbor_entry, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list)

Create neighbor entry.

Note: IP address expected in Network Byte Order.

Parameters
[in]neighbor_entryNeighbor entry
[in]attr_countNumber of attributes
[in]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 219 of file saineighbor.h.

◆ sai_get_neighbor_entry_attribute_fn

typedef sai_status_t(* sai_get_neighbor_entry_attribute_fn) (_In_ const sai_neighbor_entry_t *neighbor_entry, _In_ uint32_t attr_count, _Inout_ sai_attribute_t *attr_list)

Get neighbor attribute value.

Parameters
[in]neighbor_entryNeighbor entry
[in]attr_countNumber of attributes
[in,out]attr_listArray of attributes
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 257 of file saineighbor.h.

◆ sai_remove_all_neighbor_entries_fn

typedef sai_status_t(* sai_remove_all_neighbor_entries_fn) (_In_ sai_object_id_t switch_id)

Remove all neighbor entries.

Parameters
[in]switch_idSwitch id
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 269 of file saineighbor.h.

◆ sai_remove_neighbor_entry_fn

typedef sai_status_t(* sai_remove_neighbor_entry_fn) (_In_ const sai_neighbor_entry_t *neighbor_entry)

Remove neighbor entry.

Note: IP address expected in Network Byte Order.

Parameters
[in]neighbor_entryNeighbor entry
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 233 of file saineighbor.h.

◆ sai_set_neighbor_entry_attribute_fn

typedef sai_status_t(* sai_set_neighbor_entry_attribute_fn) (_In_ const sai_neighbor_entry_t *neighbor_entry, _In_ const sai_attribute_t *attr)

Set neighbor attribute value.

Parameters
[in]neighbor_entryNeighbor entry
[in]attrAttribute
Returns
SAI_STATUS_SUCCESS on success, failure status code on error

Definition at line 244 of file saineighbor.h.

Enumeration Type Documentation

◆ _sai_neighbor_entry_attr_t

Attribute Id for SAI neighbor object.

Enumerator
SAI_NEIGHBOR_ENTRY_ATTR_START 

Start of attributes.

SAI_NEIGHBOR_ENTRY_ATTR_DST_MAC_ADDRESS 

Destination MAC address for the neighbor Valid only when SAI_NEIGHBOR_ENTRY_ATTR_IS_LOCAL == true.

Value Type:
sai_mac_t
Flags:
MANDATORY_ON_CREATE | CREATE_AND_SET
SAI_NEIGHBOR_ENTRY_ATTR_PACKET_ACTION 

L3 forwarding action for this neighbor.

Value Type:
sai_packet_action_t
Flags:
CREATE_AND_SET
Default value:
SAI_PACKET_ACTION_FORWARD
SAI_NEIGHBOR_ENTRY_ATTR_USER_TRAP_ID 

Generate User Defined Trap ID for trap/log actions.

When it is SAI_NULL_OBJECT_ID, then packet will not be trapped.

Value Type:
sai_object_id_t
Flags:
CREATE_AND_SET
Allowed object types
SAI_OBJECT_TYPE_HOSTIF_USER_DEFINED_TRAP
Allows NULL object ID
true
Default value:
SAI_NULL_OBJECT_ID
SAI_NEIGHBOR_ENTRY_ATTR_NO_HOST_ROUTE 

Neighbor not to be programmed as a host route entry in ASIC and to be only used to setup next-hop purpose.

Typical use-case is to set this true for neighbor with IPv6 link-local addresses.

Value Type:
bool
Flags:
CREATE_AND_SET
Default value:
false
SAI_NEIGHBOR_ENTRY_ATTR_META_DATA 

User based Meta Data.

Value Range SAI_SWITCH_ATTR_NEIGHBOR_DST_USER_META_DATA_RANGE

Value Type:
sai_uint32_t
Flags:
CREATE_AND_SET
Default value:
0
SAI_NEIGHBOR_ENTRY_ATTR_COUNTER_ID 

Attach a counter.

When it is empty, then packet hits won't be counted

Value Type:
sai_object_id_t
Flags:
CREATE_AND_SET
Allowed object types
SAI_OBJECT_TYPE_COUNTER
Allows NULL object ID
true
Default value:
SAI_NULL_OBJECT_ID
SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_INDEX 

Encapsulation Index.

Defines the neighbor's encapsulation index

Value Type:
sai_uint32_t
Flags:
CREATE_AND_SET
Default value:
internal
SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_IMPOSE_INDEX 

Encapsulation index is imposed. This is deprecated.

This attribute is deprecated This is a flag which states that the encap index was imposed. On create and set the SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_INDEX must be present.

Value Type:
bool
Flags:
CREATE_AND_SET
Default value:
false
Deprecated:
true
SAI_NEIGHBOR_ENTRY_ATTR_IS_LOCAL 

Is Neighbor Local.

This is a flag which states that the neighbor being created is local. This can be used to sanity check the impose index flag. For example, in some implementations imposing an encap index when the RIF is port-based and the neighbor is local may not be allowed.

Value Type:
bool
Flags:
CREATE_AND_SET
Default value:
true
SAI_NEIGHBOR_ENTRY_ATTR_IP_ADDR_FAMILY 

Neighbor entry IP address family.

READ-ONLY

Value Type:
sai_ip_addr_family_t
Flags:
READ_ONLY
IsResourceType:
true
SAI_NEIGHBOR_ENTRY_ATTR_END 

End of attributes.

SAI_NEIGHBOR_ENTRY_ATTR_CUSTOM_RANGE_START 

Custom range base value

SAI_NEIGHBOR_ENTRY_ATTR_CUSTOM_RANGE_END 

End of custom range base

Definition at line 44 of file saineighbor.h.