Exemple #1
0
switch_status_t switch_api_neighbor_print_all(void) {
  switch_handle_t neighbor_handle = 0;
  switch_handle_t next_neighbor_handle = 0;

  switch_handle_get_first(switch_neighbor_array, neighbor_handle);
  while (neighbor_handle) {
    switch_api_neighbor_print_entry(neighbor_handle);
    switch_handle_get_next(
        switch_neighbor_array, neighbor_handle, next_neighbor_handle);
    neighbor_handle = next_neighbor_handle;
  }
  return SWITCH_STATUS_SUCCESS;
}
switch_status_t
switch_api_stp_group_print_all(void)
{
    switch_handle_t                    stp_handle = 0;
    switch_handle_t                    next_stp_handle = 0;

    switch_handle_get_first(switch_stp_instance_array, stp_handle);
    while (stp_handle) {
        switch_api_stp_group_print_entry(stp_handle);
        switch_handle_get_next(switch_stp_instance_array, stp_handle, next_stp_handle);
        stp_handle = next_stp_handle;
    }
    return SWITCH_STATUS_SUCCESS;
}
switch_status_t
switch_api_router_mac_group_print_all(void)
{
    switch_handle_t                    rmac_handle = 0;
    switch_handle_t                    next_rmac_handle = 0;

    switch_handle_get_first(switch_rmac_array, rmac_handle);
    while (rmac_handle) {
        switch_api_router_mac_group_print_entry(rmac_handle);
        switch_handle_get_next(switch_rmac_array, rmac_handle, next_rmac_handle);
        rmac_handle = next_rmac_handle;
    }
    return SWITCH_STATUS_SUCCESS;
}