Beispiel #1
0
switchlink_db_status_t
switchlink_db_bridge_delete(uint32_t ifindex) {
    switchlink_db_bridge_obj_t * obj;
    obj = tommy_trie_inplace_remove(&switchlink_db_bridge_obj_map, ifindex);
    if (!obj) {
        return SWITCHLINK_DB_STATUS_ITEM_NOT_FOUND;
    }
    switchlink_free(obj);
    return SWITCHLINK_DB_STATUS_SUCCESS;
}
Beispiel #2
0
switchlink_db_status_t switchlink_db_interface_delete(uint32_t ifindex) {
  switchlink_db_intf_obj_t *obj;
  obj = tommy_trie_inplace_remove(&switchlink_db_interface_obj_map, ifindex);
  if (!obj) {
    return SWITCHLINK_DB_STATUS_ITEM_NOT_FOUND;
  }
  tommy_trie_inplace_remove_existing(&switchlink_db_handle_obj_map,
                                     &obj->handle_node);
  switchlink_free(obj);
  return SWITCHLINK_DB_STATUS_SUCCESS;
}