static void delete_sliceable_switch( sliceable_switch *sliceable_switch ) { assert( sliceable_switch != NULL ); // Delete pathresolver table delete_pathresolver( sliceable_switch->pathresolver ); // Finalize libraries finalize_libtopology(); // Delete ports delete_all_ports( &sliceable_switch->switches ); // Delete forwarding database delete_fdb( sliceable_switch->fdb ); // Finalize packet filter finalize_filter(); // Finalize multiple slices support finalize_slice(); // Finalize redirector finalize_redirector(); // Delete sliceable_switch object xfree( sliceable_switch ); }
static void delete_broadcast_helper( broadcast_helper *broadcast_helper ) { assert( broadcast_helper != NULL ); // Finalize libraries finalize_libtopology(); // Delete ports delete_all_ports( &broadcast_helper->switches ); // Delete broadcast_helper object xfree( broadcast_helper ); }
int main( int argc, char *argv[] ) { init_trema( &argc, &argv ); init_topology_service_interface_options( &argc, &argv ); init_libtopology( get_topology_service_interface_name() ); get_all_port_status( print_all_port_status, NULL); start_trema(); finalize_libtopology(); finalize_topology_service_interface_options(); return 0; }
static void delete_routing_switch( routing_switch *routing_switch ) { assert( routing_switch != NULL ); // Finalize libraries finalize_libtopology(); // Delete outbound ports delete_outbound_all_ports( &routing_switch->switches ); // Delete forwarding database delete_fdb( routing_switch->fdb ); // Delete routing_switch object xfree( routing_switch ); }
static void delete_routing_switch( routing_switch *routing_switch ) { assert( routing_switch != NULL ); // Delete pathresolver table delete_path_resolver( routing_switch->path_resolver ); // Finalize libraries finalize_libtopology(); // Delete ports delete_all_ports( &routing_switch->switches ); // Delete forwarding database delete_fdb( routing_switch->fdb ); // Delete routing_switch object xfree( routing_switch ); }