Example #1
0
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;
}
Example #2
0
File: net.c Project: 7799/linux
void tipc_net_start(u32 addr)
{
	char addr_string[16];

	write_lock_bh(&tipc_net_lock);
	tipc_own_addr = addr;
	tipc_named_reinit();
	tipc_port_reinit();
	tipc_bclink_init();
	write_unlock_bh(&tipc_net_lock);

	tipc_nametbl_publish(TIPC_CFG_SRV, tipc_own_addr, tipc_own_addr,
			     TIPC_ZONE_SCOPE, 0, tipc_own_addr);
	pr_info("Started in network mode\n");
	pr_info("Own node address %s, network identity %u\n",
		tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id);
}
Example #3
0
int tipc_net_start(u32 addr)
{
	char addr_string[16];

	write_lock_bh(&tipc_net_lock);
	tipc_own_addr = addr;
	tipc_named_reinit();
	tipc_port_reinit();
	tipc_bclink_init();
	write_unlock_bh(&tipc_net_lock);

	tipc_cfg_reinit();

	pr_info("Started in network mode\n");
	pr_info("Own node address %s, network identity %u\n",
		tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id);
	return 0;
}
Example #4
0
int tipc_net_start(u32 addr)
{
	char addr_string[16];
	int res;

	tipc_own_addr = addr;
	tipc_named_reinit();
	tipc_port_reinit();
	res = tipc_bclink_init();
	if (res)
		return res;

	tipc_nametbl_publish(TIPC_CFG_SRV, tipc_own_addr, tipc_own_addr,
			     TIPC_ZONE_SCOPE, 0, tipc_own_addr);

	pr_info("Started in network mode\n");
	pr_info("Own node address %s, network identity %u\n",
		tipc_addr_string_fill(addr_string, tipc_own_addr), tipc_net_id);
	return 0;
}