3131#include "saibuffer.h"
3232#include "saifdb.h"
3333#include "saihash.h"
34- #include "saihostintf .h"
34+ #include "saihostif .h"
3535#include "sailag.h"
3636#include "saimirror.h"
3737#include "saineighbor.h"
4040#include "saiobject.h"
4141#include "saipolicer.h"
4242#include "saiport.h"
43- #include "saiqosmaps .h"
43+ #include "saiqosmap .h"
4444#include "saiqueue.h"
4545#include "sairoute.h"
46- #include "sairouter .h"
47- #include "sairouterintf .h"
46+ #include "saivirtualrouter .h"
47+ #include "sairouterinterface .h"
4848#include "saisamplepacket.h"
4949#include "saischedulergroup.h"
5050#include "saischeduler.h"
6060#include "sairpfgroup.h"
6161#include "sail2mcgroup.h"
6262#include "saiipmcgroup.h"
63- #include "saimcfdb .h"
63+ #include "saimcastfdb .h"
6464
6565/**
6666 * @defgroup SAI SAI - Entry point specific API definitions.
@@ -89,18 +89,18 @@ typedef enum _sai_api_t
8989 SAI_API_ROUTER_INTERFACE = 9 , /**< sai_router_interface_api_t */
9090 SAI_API_NEIGHBOR = 10 , /**< sai_neighbor_api_t */
9191 SAI_API_ACL = 11 , /**< sai_acl_api_t */
92- SAI_API_HOST_INTERFACE = 12 , /**< sai_host_interface_api_t */
92+ SAI_API_HOSTIF = 12 , /**< sai_hostif_api_t */
9393 SAI_API_MIRROR = 13 , /**< sai_mirror_api_t */
9494 SAI_API_SAMPLEPACKET = 14 , /**< sai_samplepacket_api_t */
9595 SAI_API_STP = 15 , /**< sai_stp_api_t */
9696 SAI_API_LAG = 16 , /**< sai_lag_api_t */
9797 SAI_API_POLICER = 17 , /**< sai_policer_api_t */
9898 SAI_API_WRED = 18 , /**< sai_wred_api_t */
99- SAI_API_QOS_MAPS = 19 , /**< sai_qos_map_api_t */
99+ SAI_API_QOS_MAP = 19 , /**< sai_qos_map_api_t */
100100 SAI_API_QUEUE = 20 , /**< sai_queue_api_t */
101101 SAI_API_SCHEDULER = 21 , /**< sai_scheduler_api_t */
102102 SAI_API_SCHEDULER_GROUP = 22 , /**< sai_scheduler_group_api_t */
103- SAI_API_BUFFERS = 23 , /**< sai_buffer_api_t */
103+ SAI_API_BUFFER = 23 , /**< sai_buffer_api_t */
104104 SAI_API_HASH = 24 , /**< sai_hash_api_t */
105105 SAI_API_UDF = 25 , /**< sai_udf_api_t */
106106 SAI_API_TUNNEL = 26 , /**< sai_tunnel_api_t */
@@ -111,6 +111,7 @@ typedef enum _sai_api_t
111111 SAI_API_IPMC_GROUP = 31 , /**< sai_ipmc_group_api_t */
112112 SAI_API_MCAST_FDB = 32 , /**< sai_mcast_fdb_api_t */
113113 SAI_API_BRIDGE = 33 , /**< sai_bridge_api_t */
114+ SAI_API_MAX = 34 , /**< total number of apis */
114115} sai_api_t ;
115116
116117/**
@@ -138,6 +139,15 @@ typedef enum _sai_log_level_t
138139
139140} sai_log_level_t ;
140141
142+ typedef const char * (* sai_profile_get_value_fn )(
143+ _In_ sai_switch_profile_id_t profile_id ,
144+ _In_ const char * variable );
145+
146+ typedef int (* sai_profile_get_next_value_fn )(
147+ _In_ sai_switch_profile_id_t profile_id ,
148+ _Out_ const char * * variable ,
149+ _Out_ const char * * value );
150+
141151/**
142152 * @brief Method table that contains function pointers for services exposed by
143153 * adapter host for adapter.
@@ -147,20 +157,15 @@ typedef struct _service_method_table_t
147157 /**
148158 * @brief Get variable value given its name
149159 */
150- const char * (* profile_get_value )(
151- _In_ sai_switch_profile_id_t profile_id ,
152- _In_ const char * variable );
160+ sai_profile_get_value_fn profile_get_value ;
153161
154162 /**
155163 * @brief Enumerate all the K/V pairs in a profile.
156164 *
157165 * Pointer to NULL passed as variable restarts enumeration. Function
158166 * returns 0 if next value exists, -1 at the end of the list.
159167 */
160- int (* profile_get_next_value )(
161- _In_ sai_switch_profile_id_t profile_id ,
162- _Out_ const char * * variable ,
163- _Out_ const char * * value );
168+ sai_profile_get_next_value_fn profile_get_next_value ;
164169
165170} service_method_table_t ;
166171
@@ -222,14 +227,27 @@ sai_object_type_t sai_object_type_query(
222227 _In_ sai_object_id_t sai_object_id );
223228
224229/**
225- * @brief Generate dump file. The dump file may include SAI state information and vendor SDK information.
226- *
227- * @param[in] dump_file_name Full path for dump file
228- *
229- * @return #SAI_STATUS_SUCCESS on success Failure status code on error
230- */
230+ * @brief Query sai switch id.
231+ *
232+ * @param[in] sai_object_id Object id
233+ *
234+ * @return Return #SAI_NULL_OBJECT_ID when sai_object_id is not valid.
235+ * Otherwise, return a valid SAI_OBJECT_TYPE_SWITCH object on which
236+ * provided object id belongs. If valid switch id object is provided
237+ * as input parameter it should returin itself.
238+ */
239+ sai_object_id_t sai_switch_id_query (
240+ _In_ sai_object_id_t sai_object_id );
241+
242+ /**
243+ * @brief Generate dump file. The dump file may include SAI state information and vendor SDK information.
244+ *
245+ * @param[in] dump_file_name Full path for dump file
246+ *
247+ * @return #SAI_STATUS_SUCCESS on success Failure status code on error
248+ */
231249sai_status_t sai_dbg_generate_dump (
232- _In_ const char * dump_file_name );
250+ _In_ const char * dump_file_name );
233251
234252/**
235253 * @}
0 commit comments