Lines Matching full:na
51 #define NLA_DATA(na) ((void *)((char *)(na) + NLA_HDRLEN)) argument
129 struct nlattr *na; in send_cmd() local
143 na = (struct nlattr *) GENLMSG_DATA(&msg); in send_cmd()
144 na->nla_type = nla_type; in send_cmd()
145 na->nla_len = nla_len + 1 + NLA_HDRLEN; in send_cmd()
146 memcpy(NLA_DATA(na), nla_data, nla_len); in send_cmd()
147 msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); in send_cmd()
178 struct nlattr *na; in get_family_id() local
193 na = (struct nlattr *) GENLMSG_DATA(&ans); in get_family_id()
194 na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); in get_family_id()
195 if (na->nla_type == CTRL_ATTR_FAMILY_ID) in get_family_id()
196 id = *(__u16 *) NLA_DATA(na); in get_family_id()
224 void handle_aggr(int mother, struct nlattr *na, int fd) in handle_aggr() argument
226 int aggr_len = NLA_PAYLOAD(na->nla_len); in handle_aggr()
230 na = (struct nlattr *) NLA_DATA(na); in handle_aggr()
232 switch (na->nla_type) { in handle_aggr()
234 rtid = *(int *) NLA_DATA(na); in handle_aggr()
238 rtid = *(int *) NLA_DATA(na); in handle_aggr()
243 print_procacct((struct taskstats *) NLA_DATA(na)); in handle_aggr()
245 if (write(fd, NLA_DATA(na), na->nla_len) < 0) in handle_aggr()
253 na->nla_type); in handle_aggr()
256 len2 += NLA_ALIGN(na->nla_len); in handle_aggr()
257 na = (struct nlattr *)((char *)na + in handle_aggr()
258 NLA_ALIGN(na->nla_len)); in handle_aggr()
268 struct nlattr *na; in main() local
374 na = (struct nlattr *) GENLMSG_DATA(&msg); in main()
377 len += NLA_ALIGN(na->nla_len); in main()
378 int mother = na->nla_type; in main()
381 switch (na->nla_type) { in main()
384 /* For nested attributes, na follows */ in main()
385 handle_aggr(mother, na, fd); in main()
389 na->nla_type); in main()
393 na = (struct nlattr *) (GENLMSG_DATA(&msg) + len); in main()