Lines Matching refs:msg

116 	struct msgtemplate msg;  in send_cmd_mt_nla()  local
122 msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in send_cmd_mt_nla()
123 msg.n.nlmsg_type = nlmsg_type; in send_cmd_mt_nla()
124 msg.n.nlmsg_flags = flags; in send_cmd_mt_nla()
125 msg.n.nlmsg_seq = 0; in send_cmd_mt_nla()
126 msg.n.nlmsg_pid = nlmsg_pid; in send_cmd_mt_nla()
127 msg.g.cmd = genl_cmd; in send_cmd_mt_nla()
128 msg.g.version = 0x1; in send_cmd_mt_nla()
132 na = (struct nlattr *)(GENLMSG_DATA(&msg) + prv_len); in send_cmd_mt_nla()
140 msg.n.nlmsg_len += prv_len; in send_cmd_mt_nla()
143 buf = (char *)&msg; in send_cmd_mt_nla()
144 buflen = msg.n.nlmsg_len; in send_cmd_mt_nla()
251 static int get_nci_devid(int sd, __u16 fid, __u32 pid, int dev_id, struct msgtemplate *msg) in get_nci_devid() argument
261 resp_len = recv(sd, msg, sizeof(*msg), 0); in get_nci_devid()
267 if (msg->n.nlmsg_type == NLMSG_ERROR || in get_nci_devid()
268 !NLMSG_OK(&msg->n, resp_len)) { in get_nci_devid()
278 static __u8 get_dev_enable_state(struct msgtemplate *msg) in get_dev_enable_state() argument
284 resp_len = GENLMSG_PAYLOAD(&msg->n); in get_dev_enable_state()
285 na = (struct nlattr *)GENLMSG_DATA(msg); in get_dev_enable_state()
292 na = (struct nlattr *)(GENLMSG_DATA(msg) + len); in get_dev_enable_state()
404 struct msgtemplate msg; in FIXTURE_SETUP() local
431 rc = get_nci_devid(self->sd, self->fid, self->pid, self->dev_idex, &msg); in FIXTURE_SETUP()
433 EXPECT_EQ(get_dev_enable_state(&msg), 0); in FIXTURE_SETUP()
528 struct msgtemplate msg; in TEST_F() local
532 &msg); in TEST_F()
534 EXPECT_EQ(get_dev_enable_state(&msg), 1); in TEST_F()
861 struct msgtemplate msg; in TEST_F() local
867 &msg); in TEST_F()
869 EXPECT_EQ(get_dev_enable_state(&msg), 1); in TEST_F()
888 &msg); in TEST_F()
890 EXPECT_EQ(get_dev_enable_state(&msg), 0); in TEST_F()