switch_handle_t
switch_nhop_create()
{
    switch_handle_t nhop_handle;
    _switch_handle_create(SWITCH_HANDLE_TYPE_NHOP, switch_nhop_info_t, switch_nhop_array, NULL, nhop_handle);
    return nhop_handle;
}
switch_handle_t
switch_stg_handle_create()
{
    switch_handle_t stg_handle;
    _switch_handle_create(SWITCH_HANDLE_TYPE_STP, switch_stp_info_t,
                      switch_stp_instance_array, NULL,
                      stg_handle);
    return stg_handle;
}
Exemple #3
0
switch_handle_t switch_neighbor_info_create() {
  switch_handle_t handle;
  _switch_handle_create(SWITCH_HANDLE_TYPE_ARP,
                        switch_neighbor_info_t,
                        switch_neighbor_array,
                        NULL,
                        handle);
  return handle;
}
Exemple #4
0
static switch_handle_t switch_sflow_ace_handle_create() {
  switch_handle_t sflow_ace_handle = SWITCH_API_INVALID_HANDLE;
  _switch_handle_create(SWITCH_HANDLE_TYPE_SFLOW_ACE,
                        switch_sflow_match_entry_t,
                        switch_sflow_ace_array,
                        NULL,
                        sflow_ace_handle);
  return sflow_ace_handle;
}
Exemple #5
0
static switch_handle_t switch_sflow_handle_create() {
  switch_handle_t sflow_handle = SWITCH_API_INVALID_HANDLE;
  _switch_handle_create(SWITCH_HANDLE_TYPE_SFLOW,
                        switch_sflow_info_t,
                        switch_sflow_array,
                        NULL,
                        sflow_handle);
  return sflow_handle;
}
/*
 * @function: switch_api_router_mac_group_create
 * Creates a RMAC Group
 * @return: Returns rmac group id if success
 */
switch_handle_t
switch_api_router_mac_group_create(switch_device_t device)
{
    switch_rmac_info_t                *rmac_info = NULL;
    switch_handle_t                    rmac_handle;

    _switch_handle_create(SWITCH_HANDLE_TYPE_MY_MAC, switch_rmac_info_t, switch_rmac_array, NULL, rmac_handle);
    rmac_info = switch_api_rmac_info_get_internal(rmac_handle);
    tommy_list_init(&(rmac_info->rmac_list));
    return rmac_handle;
}