Go to the source code of this file.
|
| sx_status_t | sx_api_mpls_log_verbosity_level_set (const sx_api_handle_t handle, const sx_log_verbosity_target_t verbosity_target, const sx_verbosity_level_t module_verbosity_level, const sx_verbosity_level_t api_verbosity_level) |
| |
| sx_status_t | sx_api_mpls_log_verbosity_level_get (const sx_api_handle_t handle, const sx_log_verbosity_target_t verbosity_target, sx_verbosity_level_t *module_verbosity_level_p, sx_verbosity_level_t *api_verbosity_level_p) |
| |
| sx_status_t | sx_api_mpls_init_set (const sx_api_handle_t handle, const sx_mpls_general_params_t *general_params) |
| |
| sx_status_t | sx_api_mpls_deinit_set (const sx_api_handle_t handle) |
| |
| sx_status_t | sx_api_mpls_ilm_init_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_mpls_ilm_table_id_t ilm_table) |
| |
| sx_status_t | sx_api_mpls_in_segment_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_mpls_in_segment_key_t *in_segment_key_p, const sx_mpls_in_segment_params_t *in_segment_params_p) |
| |
| sx_status_t | sx_api_mpls_in_segment_get (const sx_api_handle_t handle, const sx_mpls_in_segment_key_t *in_segment_key_p, sx_mpls_in_segment_params_t *in_segment_params_p) |
| |
| sx_status_t | sx_api_mpls_in_segment_iter_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_mpls_in_segment_key_t *in_segment_key_p, const sx_in_segment_key_filter_t *filter_p, sx_mpls_in_segment_key_t *in_segment_key_list_p, uint32_t *in_segment_get_entries_cnt_p) |
| |
| sx_status_t | sx_api_mpls_router_interface_attributes_set (const sx_api_handle_t handle, const sx_router_interface_t rif, const sx_mpls_router_interface_attr_t rif_mpls_attr) |
| |
| sx_status_t | sx_api_mpls_router_interface_attributes_get (const sx_api_handle_t handle, const sx_router_interface_t rif, sx_mpls_router_interface_attr_t *rif_mpls_attr_p) |
| |
| sx_status_t | sx_api_mpls_ilm_counter_bind_set (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_mpls_in_segment_key_t *in_segment_key_p, const sx_flow_counter_id_t counter_id) |
| |
| sx_status_t | sx_api_mpls_ilm_counter_bind_get (const sx_api_handle_t handle, const sx_access_cmd_t cmd, const sx_mpls_in_segment_key_t *in_segment_key_p, sx_flow_counter_id_t *counter_id_p) |
| |
◆ sx_api_mpls_log_verbosity_level_set()
| sx_status_t sx_api_mpls_log_verbosity_level_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_log_verbosity_target_t |
verbosity_target, |
|
|
const sx_verbosity_level_t |
module_verbosity_level, |
|
|
const sx_verbosity_level_t |
api_verbosity_level |
|
) |
| |
This API sets the log verbosity level of MPLS MODULE. Supported devices: Spectrum.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | verbosity_target | - set verbosity of : API / MODULE / BOTH |
| [in] | module_verbosity_level | - MPLS module verbosity level |
| [in] | api_verbosity_level | - MPLS API verbosity level |
- Returns
- sx_status_t
◆ sx_api_mpls_log_verbosity_level_get()
| sx_status_t sx_api_mpls_log_verbosity_level_get |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_log_verbosity_target_t |
verbosity_target, |
|
|
sx_verbosity_level_t * |
module_verbosity_level_p, |
|
|
sx_verbosity_level_t * |
api_verbosity_level_p |
|
) |
| |
This API gets the log verbosity level of MPLS MODULE. Supported devices: Spectrum.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | verbosity_target | - get verbosity of : API / MODULE / BOTH |
| [out] | module_verbosity_level_p | - MPLS module verbosity level |
| [out] | api_verbosity_level_p | - MPLS API verbosity level |
- Returns
- sx_status_t
◆ sx_api_mpls_init_set()
| sx_status_t sx_api_mpls_init_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_mpls_general_params_t * |
general_params |
|
) |
| |
This function initiates the MPLS module in SDK. Supported devices: Spectrum.
Must be called after the router module is initialized.
- Parameters
-
| [in] | handle | - SX-API handle. |
| [in] | general_params_p | - MPLS general parameters |
- Returns
- sx_status_t
◆ sx_api_mpls_deinit_set()
| sx_status_t sx_api_mpls_deinit_set |
( |
const sx_api_handle_t |
handle | ) |
|
This function de-initiates the MPLS block in the SDK Supported devices: Spectrum.
Must called before the router module is de-initialized.
- Parameters
-
| [in] | handle | - SX-API handle. |
- Returns
- sx_status_t
◆ sx_api_mpls_ilm_init_set()
| sx_status_t sx_api_mpls_ilm_init_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_access_cmd_t |
cmd, |
|
|
const sx_mpls_ilm_table_id_t |
ilm_table |
|
) |
| |
This function creates ILM table Supported devices: Spectrum.
- Parameters
-
| [in] | handle | - SX-API handle. |
| [in] | cmd | - CREATE/ADD/DELETE/DESTROY |
| [in] | ilm_table | - MPLS ILM table ID |
Only label space 0 is currently supported (ilm_table).
- Returns
- sx_status_t
◆ sx_api_mpls_in_segment_set()
| sx_status_t sx_api_mpls_in_segment_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_access_cmd_t |
cmd, |
|
|
const sx_mpls_in_segment_key_t * |
in_segment_key_p, |
|
|
const sx_mpls_in_segment_params_t * |
in_segment_params_p |
|
) |
| |
This function sets an in-segment Supported devices: Spectrum.
Match on one label is currently supported. Only label space 0 is currently supported (ilm_table).
- Parameters
-
| [in] | handle | - SX-API handle. |
| [in] | cmd | - CREATE/EDIT/DESTROY |
| [in] | in_segment_key_p | - in-segment incoming label |
| [in] | in_segment_params_p | - parameters for in-segment |
- Returns
- sx_status_t
◆ sx_api_mpls_in_segment_get()
| sx_status_t sx_api_mpls_in_segment_get |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_mpls_in_segment_key_t * |
in_segment_key_p, |
|
|
sx_mpls_in_segment_params_t * |
in_segment_params_p |
|
) |
| |
This function gets an in-segment parameters Supported devices: Spectrum.
In-segment filter is currently unsupported.
- Parameters
-
| [in] | handle | - SX-API handle. |
| [in] | in_segment_key_p | - specify a in segment key |
| [out] | in_segment_params_p | - list of in segment params |
- Returns
- sx_status_t
◆ sx_api_mpls_in_segment_iter_get()
| sx_status_t sx_api_mpls_in_segment_iter_get |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_access_cmd_t |
cmd, |
|
|
const sx_mpls_in_segment_key_t * |
in_segment_key_p, |
|
|
const sx_in_segment_key_filter_t * |
filter_p, |
|
|
sx_mpls_in_segment_key_t * |
in_segment_key_list_p, |
|
|
uint32_t * |
in_segment_get_entries_cnt_p |
|
) |
| |
This function returns a list of one or more in segment key identifiers. The following use case scenarios apply with different input parameters X = don't-care
- 1) cmd = SX_ACCESS_CMD_GET, key = X, Filter = X, in_segment_key_list = X, Count =0: In this case the API will return the total number of in segment keys in the ILM
- 2) cmd = SX_ACCESS_CMD_GET, key = valid/invalid, Filter = X, in_segment_key_list = Valid, Count = 1: In this case the API will check if the specified key exists. if it does the key will be returned in the in_segment_key_list along with a count of 1. If the key does not exist an empty list will be returned with count = 0
- 3) cmd = SX_ACCESS_CMD_GET, key = valid, Filter = X, in_segment_key_list is Valid, Count > 1: A count >1 will be treated as a count of 1 and the behavior will be same as earlier GET use cases.
- 4) cmd = SX_ACCESS_CMD_GET_FIRST/SX_ACCESS_CMD_GETNEXT, key = X, Filter = X, in_segment_key_list = Null, Count =0: For either SX_ACCESS_CMD_GET_FIRST/SX_ACCESS_CMD_GETNEXT a zero count will return an empty list.
- 5) cmd = SX_ACCESS_CMD_GET_FIRST, key = X, Filter = X, in_segment_key_list = Valid, Count > 0: In this case the API will return the first count in segments starting from the head of the database. The total elements fetched will be returned as the return count. Note: return count may be less than or equal to the requested count. The key is dont-care.
- 6) cmd = SX_ACCESS_CMD_GETNEXT, key = valid/invalid, Filter = X, Rif_list = Valid, Count > 0: In this case the API will return the next set of in segments starting from the next valid in segment k after the specified key. The total elements fetched will be returned as the return count. Note: return count may be less than or equal to the requested count. If no valid next in segment exists in the db (key = end of list, or invalid key specified, or key too large), an empty list will be returned.
Supported devices: Spectrum.
- Parameters
-
| [in] | handle | : SX API handle |
| [in] | cmd | : GET/GET_FIRST/GET_NEXT |
| [in] | in_segment_key_p | : specify a in segment key |
| [in] | filter | : specify a filter parameter |
| [out] | in_segment_key_list_p | : return list of in segment keys |
| [in,out] | in_segment_get_entries_cnt_p | : [in] number of in segments to get : [out] number of in segments returned |
- Returns
- SX_STATUS_SUCCESS if operation completes successfully.
-
SX_STATUS_PARAM_EXCEEDS_RANGE if parameters exceed range.
-
SX_STATUS_PARAM_NULL if an unexpected NULL parameter was passed.
-
SX_STATUS_PARAM_ERROR if any input parameter is invalid.
-
SX_STATUS_ERROR general error.
-
SX_STATUS_CMD_UNSUPPORTED - if invalid cmd is passed
-
SX_STATUS_MODULE_UNINITIALIZED - if router module is uninitialized
-
SX_STATUS_CMD_ERROR - if internal RPC mechanism to SDK server fails
-
SX_STATUS_DB_NOT_INITIALIZED - if internal RIF DB is not initialized
◆ sx_api_mpls_router_interface_attributes_set()
| sx_status_t sx_api_mpls_router_interface_attributes_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_router_interface_t |
rif, |
|
|
const sx_mpls_router_interface_attr_t |
rif_mpls_attr |
|
) |
| |
This function sets the MPLS attributes of the interface Supported devices: Spectrum.
Must be called to enable/disable MPLS on a router interface. Only label space 0 is currently supported (ilm_table_id).
- Parameters
-
| [in] | handle | - SX-API handle. |
| [in] | rif_p | - router interface ID |
| [in] | rif_mpls_attr_p | - the MPLS attributes of the interface |
- Returns
- sx_status_t
◆ sx_api_mpls_router_interface_attributes_get()
| sx_status_t sx_api_mpls_router_interface_attributes_get |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_router_interface_t |
rif, |
|
|
sx_mpls_router_interface_attr_t * |
rif_mpls_attr_p |
|
) |
| |
This function gets the MPLS attributes of the interface Supported devices: Spectrum.
- Parameters
-
| [in] | handle | - SX-API handle. |
| [in] | rif_p | - router interface ID |
| [out] | rif_mpls_attr_p | - the MPLS attributes of the interface |
- Returns
- sx_status_t
◆ sx_api_mpls_ilm_counter_bind_set()
| sx_status_t sx_api_mpls_ilm_counter_bind_set |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_access_cmd_t |
cmd, |
|
|
const sx_mpls_in_segment_key_t * |
in_segment_key_p, |
|
|
const sx_flow_counter_id_t |
counter_id |
|
) |
| |
Binds or un-binds a flow counter to an existing ILM entry Supported devices: Spectrum.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | cmd | - BIND/UNBIND |
| [in] | in_segment_key | - in-segment identification |
| [in] | counter_id | - A flow counter identifier |
- Returns
- sx_status_t
◆ sx_api_mpls_ilm_counter_bind_get()
| sx_status_t sx_api_mpls_ilm_counter_bind_get |
( |
const sx_api_handle_t |
handle, |
|
|
const sx_access_cmd_t |
cmd, |
|
|
const sx_mpls_in_segment_key_t * |
in_segment_key_p, |
|
|
sx_flow_counter_id_t * |
counter_id_p |
|
) |
| |
Retrieves a flow counter identifier bounded to an existing ILM entry Supported devices: Spectrum.
- Parameters
-
| [in] | handle | - SX-API handle |
| [in] | cmd | - GET |
| [in] | in_segment_key_p | - in-segment identification |
| [out] | counter_id_p | - A flow counter identifier |
- Returns
- sx_status_t