Lines Matching refs:net
2 * net/tipc/net.c: TIPC network routing code
38 #include "net.h"
110 struct net *net;
114 static void tipc_net_finalize(struct net *net, u32 addr);
116 int tipc_net_init(struct net *net, u8 *node_id, u32 addr)
118 if (tipc_own_id(net)) {
125 tipc_set_node_id(net, node_id);
127 tipc_net_finalize(net, addr);
131 static void tipc_net_finalize(struct net *net, u32 addr)
133 struct tipc_net *tn = tipc_net(net);
137 tipc_set_node_addr(net, addr);
138 tipc_named_reinit(net);
139 tipc_sk_reinit(net);
140 tipc_mon_reinit_self(net);
141 tipc_nametbl_publish(net, TIPC_CFG_SRV, addr, addr,
150 tipc_net_finalize(fwork->net, fwork->addr);
154 void tipc_sched_net_finalize(struct net *net, u32 addr)
161 fwork->net = net;
166 void tipc_net_stop(struct net *net)
168 if (!tipc_own_id(net))
172 tipc_bearer_stop(net);
173 tipc_node_stop(net);
179 static int __tipc_nl_add_net(struct net *net, struct tipc_nl_msg *msg)
181 struct tipc_net *tn = net_generic(net, tipc_net_id);
217 struct net *net = sock_net(skb->sk);
229 err = __tipc_nl_add_net(net, &msg);
243 struct net *net = sock_net(skb->sk);
244 struct tipc_net *tn = tipc_net(net);
257 /* Can't change net id once TIPC has joined a network */
258 if (tipc_own_addr(net))
278 tipc_net_init(net, NULL, addr);
290 tipc_net_init(net, node_id, 0);