SAI Metadata
Loading...
Searching...
No Matches
sai.h File Reference

This module defines an entry point into Switch Abstraction Interface (SAI) More...

#include "saiacl.h"
#include "saiars.h"
#include "saiarsprofile.h"
#include "saibridge.h"
#include "saibuffer.h"
#include "saicounter.h"
#include "saifdb.h"
#include "saihash.h"
#include "saihostif.h"
#include "saiipmcgroup.h"
#include "saiipmc.h"
#include "saiipsec.h"
#include "sail2mcgroup.h"
#include "sail2mc.h"
#include "sailag.h"
#include "saimacsec.h"
#include "saimcastfdb.h"
#include "saimirror.h"
#include "saimpls.h"
#include "saineighbor.h"
#include "sainexthopgroup.h"
#include "sainexthop.h"
#include "saiobject.h"
#include "saipolicer.h"
#include "saiport.h"
#include "saiqosmap.h"
#include "saiqueue.h"
#include "sairoute.h"
#include "sairouterinterface.h"
#include "sairpfgroup.h"
#include "saisamplepacket.h"
#include "saischedulergroup.h"
#include "saischeduler.h"
#include "saisrv6.h"
#include "saistatus.h"
#include "saistp.h"
#include "saiswitch.h"
#include "saisystemport.h"
#include "saitam.h"
#include "saitunnel.h"
#include "saitypes.h"
#include "saiudf.h"
#include "saivirtualrouter.h"
#include "saivlan.h"
#include "saiwred.h"
#include "saidtel.h"
#include "saibfd.h"
#include "sainat.h"
#include "saiisolationgroup.h"
#include "saidebugcounter.h"
#include "saimymac.h"
#include "saigenericprogrammable.h"
#include "saitwamp.h"
#include "saiversion.h"

Go to the source code of this file.

Classes

struct  _sai_service_method_table_t
 Method table that contains function pointers for services exposed by adapter host for adapter. More...
 

Typedefs

typedef enum _sai_api_t sai_api_t
 Defined API sets have assigned IDs.
 
typedef enum _sai_log_level_t sai_log_level_t
 Defines log level.
 
typedef const char *(* sai_profile_get_value_fn) (_In_ sai_switch_profile_id_t profile_id, _In_ const char *variable)
 
typedef int(* sai_profile_get_next_value_fn) (_In_ sai_switch_profile_id_t profile_id, _Out_ const char **variable, _Out_ const char **value)
 
typedef struct _sai_service_method_table_t sai_service_method_table_t
 Method table that contains function pointers for services exposed by adapter host for adapter.
 

Enumerations

enum  _sai_api_t {
  SAI_API_UNSPECIFIED = 0 , SAI_API_SWITCH = 1 , SAI_API_PORT = 2 , SAI_API_FDB = 3 ,
  SAI_API_VLAN = 4 , SAI_API_VIRTUAL_ROUTER = 5 , SAI_API_ROUTE = 6 , SAI_API_NEXT_HOP = 7 ,
  SAI_API_NEXT_HOP_GROUP = 8 , SAI_API_ROUTER_INTERFACE = 9 , SAI_API_NEIGHBOR = 10 , SAI_API_ACL = 11 ,
  SAI_API_HOSTIF = 12 , SAI_API_MIRROR = 13 , SAI_API_SAMPLEPACKET = 14 , SAI_API_STP = 15 ,
  SAI_API_LAG = 16 , SAI_API_POLICER = 17 , SAI_API_WRED = 18 , SAI_API_QOS_MAP = 19 ,
  SAI_API_QUEUE = 20 , SAI_API_SCHEDULER = 21 , SAI_API_SCHEDULER_GROUP = 22 , SAI_API_BUFFER = 23 ,
  SAI_API_HASH = 24 , SAI_API_UDF = 25 , SAI_API_TUNNEL = 26 , SAI_API_L2MC = 27 ,
  SAI_API_IPMC = 28 , SAI_API_RPF_GROUP = 29 , SAI_API_L2MC_GROUP = 30 , SAI_API_IPMC_GROUP = 31 ,
  SAI_API_MCAST_FDB = 32 , SAI_API_BRIDGE = 33 , SAI_API_TAM = 34 , SAI_API_SRV6 = 35 ,
  SAI_API_MPLS = 36 , SAI_API_DTEL = 37 , SAI_API_BFD = 38 , SAI_API_ISOLATION_GROUP = 39 ,
  SAI_API_NAT = 40 , SAI_API_COUNTER = 41 , SAI_API_DEBUG_COUNTER = 42 , SAI_API_MACSEC = 43 ,
  SAI_API_SYSTEM_PORT = 44 , SAI_API_MY_MAC = 45 , SAI_API_IPSEC = 46 , SAI_API_GENERIC_PROGRAMMABLE = 47 ,
  SAI_API_ARS = 48 , SAI_API_ARS_PROFILE = 49 , SAI_API_TWAMP = 50 , SAI_API_MAX ,
  SAI_API_CUSTOM_RANGE_START = 256 , SAI_API_CUSTOM_RANGE_END
}
 Defined API sets have assigned IDs. More...
 
enum  _sai_log_level_t {
  SAI_LOG_LEVEL_DEBUG = 0 , SAI_LOG_LEVEL_INFO = 1 , SAI_LOG_LEVEL_NOTICE = 2 , SAI_LOG_LEVEL_WARN = 3 ,
  SAI_LOG_LEVEL_ERROR = 4 , SAI_LOG_LEVEL_CRITICAL = 5
}
 Defines log level. More...
 

Functions

sai_status_t sai_api_initialize (_In_ uint64_t flags, _In_ const sai_service_method_table_t *services)
 Adapter module initialization call.
 
sai_status_t sai_api_query (_In_ sai_api_t api, _Out_ void **api_method_table)
 Retrieve a pointer to the C-style method table for desired SAI functionality as specified by the given sai_api_id.
 
sai_status_t sai_api_uninitialize (void)
 Uninitialize adapter module. SAI functionalities, retrieved via sai_api_query() cannot be used after this call.
 
sai_status_t sai_log_set (_In_ sai_api_t api, _In_ sai_log_level_t log_level)
 Set log level for SAI API module.
 
sai_object_type_t sai_object_type_query (_In_ sai_object_id_t object_id)
 Query SAI object type.
 
sai_object_id_t sai_switch_id_query (_In_ sai_object_id_t object_id)
 Query SAI switch id.
 
sai_status_t sai_dbg_generate_dump (_In_ const char *dump_file_name)
 Generate dump file. The dump file may include SAI state information and vendor SDK information.
 
sai_status_t sai_object_type_get_availability (_In_ sai_object_id_t switch_id, _In_ sai_object_type_t object_type, _In_ uint32_t attr_count, _In_ const sai_attribute_t *attr_list, _Out_ uint64_t *count)
 Get SAI object type resource availability.
 

Detailed Description

This module defines an entry point into Switch Abstraction Interface (SAI)

Copyright (c) 2014 Microsoft Open Technologies, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.

Microsoft would like to thank the following companies for their review and assistance with these files: Intel Corporation, Mellanox Technologies Ltd, Dell Products, L.P., Facebook, Inc., Marvell International Ltd.

Definition in file sai.h.