Lines Matching refs:msg
164 static int __tipc_nl_add_net(struct net *net, struct tipc_nl_msg *msg)
172 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
177 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NET);
181 if (nla_put_u32(msg->skb, TIPC_NLA_NET_ID, tn->net_id))
183 if (nla_put_u64_64bit(msg->skb, TIPC_NLA_NET_NODEID, *w0, 0))
185 if (nla_put_u64_64bit(msg->skb, TIPC_NLA_NET_NODEID_W1, *w1, 0))
187 nla_nest_end(msg->skb, attrs);
188 genlmsg_end(msg->skb, hdr);
193 nla_nest_cancel(msg->skb, attrs);
195 genlmsg_cancel(msg->skb, hdr);
205 struct tipc_nl_msg msg;
210 msg.skb = skb;
211 msg.portid = NETLINK_CB(cb->skb).portid;
212 msg.seq = cb->nlh->nlmsg_seq;
214 err = __tipc_nl_add_net(net, &msg);
291 static int __tipc_nl_addr_legacy_get(struct net *net, struct tipc_nl_msg *msg)
297 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family,
302 attrs = nla_nest_start(msg->skb, TIPC_NLA_NET);
307 if (nla_put_flag(msg->skb, TIPC_NLA_NET_ADDR_LEGACY))
310 nla_nest_end(msg->skb, attrs);
311 genlmsg_end(msg->skb, hdr);
316 nla_nest_cancel(msg->skb, attrs);
318 genlmsg_cancel(msg->skb, hdr);
326 struct tipc_nl_msg msg;
334 msg.skb = rep;
335 msg.portid = info->snd_portid;
336 msg.seq = info->snd_seq;
338 err = __tipc_nl_addr_legacy_get(net, &msg);
340 nlmsg_free(msg.skb);
344 return genlmsg_reply(msg.skb, info);