Lines Matching refs:msg
128 struct msgtemplate msg; in send_cmd() local
130 msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in send_cmd()
131 msg.n.nlmsg_type = nlmsg_type; in send_cmd()
132 msg.n.nlmsg_flags = NLM_F_REQUEST; in send_cmd()
133 msg.n.nlmsg_seq = 0; in send_cmd()
134 msg.n.nlmsg_pid = nlmsg_pid; in send_cmd()
135 msg.g.cmd = genl_cmd; in send_cmd()
136 msg.g.version = 0x1; in send_cmd()
137 na = (struct nlattr *) GENLMSG_DATA(&msg); in send_cmd()
141 msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); in send_cmd()
143 buf = (char *) &msg; in send_cmd()
144 buflen = msg.n.nlmsg_len ; in send_cmd()
287 struct msgtemplate msg; in main() local
452 rep_len = recv(nl_sd, &msg, sizeof(msg), 0); in main()
460 if (msg.n.nlmsg_type == NLMSG_ERROR || in main()
461 !NLMSG_OK((&msg.n), rep_len)) { in main()
462 struct nlmsgerr *err = NLMSG_DATA(&msg); in main()
469 sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len); in main()
472 rep_len = GENLMSG_PAYLOAD(&msg.n); in main()
474 na = (struct nlattr *) GENLMSG_DATA(&msg); in main()
538 na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); in main()