Home | History | Annotate | Download | only in tipc

Lines Matching refs:nlh

27 static int node_list_cb(const struct nlmsghdr *nlh, void *data)
30 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
34 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
56 static int cmd_node_list(struct nlmsghdr *nlh, const struct cmd *cmd,
66 if (!(nlh = msg_init(buf, TIPC_NL_NODE_GET))) {
71 return msg_dumpit(nlh, node_list_cb, NULL);
74 static int cmd_node_set_addr(struct nlmsghdr *nlh, const struct cmd *cmd,
93 if (!(nlh = msg_init(buf, TIPC_NL_NET_SET))) {
98 nest = mnl_attr_nest_start(nlh, TIPC_NLA_NET);
99 mnl_attr_put_u32(nlh, TIPC_NLA_NET_ADDR, addr);
100 mnl_attr_nest_end(nlh, nest);
102 return msg_doit(nlh, NULL, NULL);
105 static int cmd_node_get_addr(struct nlmsghdr *nlh, const struct cmd *cmd,
133 static int netid_get_cb(const struct nlmsghdr *nlh, void *data)
135 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
139 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
152 static int cmd_node_get_netid(struct nlmsghdr *nlh, const struct cmd *cmd,
162 if (!(nlh = msg_init(buf, TIPC_NL_NET_GET))) {
167 return msg_dumpit(nlh, netid_get_cb, NULL);
170 static int cmd_node_set_netid(struct nlmsghdr *nlh, const struct cmd *cmd,
182 if (!(nlh = msg_init(buf, TIPC_NL_NET_SET))) {
194 nest = mnl_attr_nest_start(nlh, TIPC_NLA_NET);
195 mnl_attr_put_u32(nlh, TIPC_NLA_NET_ID, netid);
196 mnl_attr_nest_end(nlh, nest);
198 return msg_doit(nlh, NULL, NULL);
211 static int cmd_node_set(struct nlmsghdr *nlh, const struct cmd *cmd,
220 return run_cmd(nlh, cmd, cmds, cmdl, NULL);
233 static int cmd_node_get(struct nlmsghdr *nlh, const struct cmd *cmd,
242 return run_cmd(nlh, cmd, cmds, cmdl, NULL);
256 int cmd_node(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
266 return run_cmd(nlh, cmd, cmds, cmdl, NULL);