Lines Matching defs:nlh
26 static int publ_list_cb(const struct nlmsghdr *nlh, void *data)
28 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
32 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
48 struct nlmsghdr *nlh;
52 if (!(nlh = msg_init(buf, TIPC_NL_PUBL_GET))) {
57 nest = mnl_attr_nest_start(nlh, TIPC_NLA_SOCK);
58 mnl_attr_put_u32(nlh, TIPC_NLA_SOCK_REF, sock);
59 mnl_attr_nest_end(nlh, nest);
61 return msg_dumpit(nlh, publ_list_cb, NULL);
64 static int sock_list_cb(const struct nlmsghdr *nlh, void *data)
66 struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
70 mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
104 static int cmd_socket_list(struct nlmsghdr *nlh, const struct cmd *cmd,
114 if (!(nlh = msg_init(buf, TIPC_NL_SOCK_GET))) {
119 return msg_dumpit(nlh, sock_list_cb, NULL);
131 int cmd_socket(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl,
139 return run_cmd(nlh, cmd, cmds, cmdl, NULL);