int tipc_net_start(u32 addr) { char addr_string[16]; int res; if (tipc_mode != TIPC_NODE_MODE) return -ENOPROTOOPT; tipc_subscr_stop(); tipc_cfg_stop(); tipc_own_addr = addr; tipc_mode = TIPC_NET_MODE; tipc_named_reinit(); tipc_port_reinit(); if ((res = tipc_cltr_init()) || (res = tipc_bclink_init())) { return res; } tipc_k_signal((Handler)tipc_subscr_start, 0); tipc_k_signal((Handler)tipc_cfg_init, 0); info("Started in network mode\n"); info("Own node address %s, network identity %u\n", tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); return 0; }
/** * tipc_core_stop - switch TIPC from SINGLE NODE to NOT RUNNING mode */ static void tipc_core_stop(void) { tipc_netlink_stop(); tipc_cfg_stop(); tipc_subscr_stop(); tipc_nametbl_stop(); tipc_ref_table_stop(); tipc_socket_stop(); tipc_unregister_sysctl(); }
static void tipc_core_stop(void) { tipc_netlink_stop(); tipc_handler_stop(); tipc_cfg_stop(); tipc_subscr_stop(); tipc_nametbl_stop(); tipc_ref_table_stop(); tipc_socket_stop(); tipc_log_resize(0); }
void tipc_core_stop(void) { if (tipc_mode != TIPC_NODE_MODE) return; tipc_mode = TIPC_NOT_RUNNING; tipc_netlink_stop(); tipc_handler_stop(); tipc_cfg_stop(); tipc_subscr_stop(); tipc_reg_stop(); tipc_nametbl_stop(); tipc_ref_table_stop(); tipc_socket_stop(); }