static void after_subscribed( void *user_data ) { assert( user_data != NULL ); // Get all ports' status // init_last_stage() will be called get_all_port_status( init_last_stage, user_data ); }
static void after_subscribed( void *user_data ) { assert( user_data != NULL ); // Get all ports' status // init_second_stage() will be called add_callback_port_status_updated( port_status_updated, user_data ); get_all_port_status( init_second_stage, user_data ); }
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; }