Lines Matching refs:nla
63 struct nlattr *nla; in test_nlattr() local
71 nla = NLMSG_ATTR(msg, sizeof(msg->udm)); in test_nlattr()
72 memcpy(nla, "12", 2); in test_nlattr()
82 msg_len = NLMSG_SPACE(sizeof(msg->udm)) + sizeof(*nla); in test_nlattr()
95 msg_len = NLMSG_SPACE(sizeof(msg->udm)) + sizeof(*nla); in test_nlattr()
98 nla = NLMSG_ATTR(msg, sizeof(msg->udm)); in test_nlattr()
99 *nla = (struct nlattr) { in test_nlattr()
100 .nla_len = sizeof(*nla), in test_nlattr()
109 fd, msg_len, nla->nla_len, msg_len, sprintrc(rc)); in test_nlattr()
112 nla->nla_len += 8; in test_nlattr()
119 fd, msg_len, nla->nla_len, msg_len, sprintrc(rc)); in test_nlattr()
125 nla = NLMSG_ATTR(msg, sizeof(msg->udm)); in test_nlattr()
126 *nla = (struct nlattr) { in test_nlattr()
130 memcpy(RTA_DATA(nla), "1234", 4); in test_nlattr()
139 fd, msg_len, nla->nla_len, UNIX_DIAG_SHUTDOWN + 1, in test_nlattr()
146 nla = NLMSG_ATTR(msg, sizeof(msg->udm)); in test_nlattr()
147 SET_STRUCT(struct nlattr, nla, in test_nlattr()
151 memcpy(nla + 1, "12", 2); in test_nlattr()
165 nla = NLMSG_ATTR(msg, sizeof(msg->udm)); in test_nlattr()
166 SET_STRUCT(struct nlattr, nla, in test_nlattr()
177 fd, msg_len, NLA_HDRLEN, nla + 1, msg_len, sprintrc(rc)); in test_nlattr()
183 nla = NLMSG_ATTR(msg, sizeof(msg->udm)); in test_nlattr()
184 *nla = (struct nlattr) { in test_nlattr()
188 *(nla + 1) = (struct nlattr) { in test_nlattr()
200 fd, msg_len, nla->nla_len, nla->nla_len, in test_nlattr()
204 nla->nla_len = NLA_HDRLEN - 1; in test_nlattr()
211 fd, msg_len, nla->nla_len, msg_len, sprintrc(rc)); in test_nlattr()
220 nla = NLMSG_ATTR(msg, sizeof(msg->udm)); in test_nlattr()
222 nla[i * 2] = (struct nlattr) { in test_nlattr()
226 fill_memory_ex(&nla[i * 2 + 1], NLA_HDRLEN, in test_nlattr()
241 nla->nla_len, UNIX_DIAG_SHUTDOWN + 1 + i); in test_nlattr()
242 print_quoted_hex(&nla[i * 2 + 1], NLA_HDRLEN - 1); in test_nlattr()
268 struct nlattr *nla; in test_nla_type() local
272 msg_len = NLMSG_SPACE(sizeof(msg->udm)) + sizeof(*nla); in test_nla_type()
275 nla = NLMSG_ATTR(msg, sizeof(msg->udm)); in test_nla_type()
276 *nla = (struct nlattr) { in test_nla_type()
277 .nla_len = sizeof(*nla), in test_nla_type()
287 fd, msg_len, nla->nla_len, msg_len, sprintrc(rc)); in test_nla_type()
289 nla->nla_type = NLA_F_NET_BYTEORDER | UNIX_DIAG_NAME; in test_nla_type()
297 fd, msg_len, nla->nla_len, msg_len, sprintrc(rc)); in test_nla_type()
299 nla->nla_type = NLA_F_NESTED | NLA_F_NET_BYTEORDER | UNIX_DIAG_NAME; in test_nla_type()
307 fd, msg_len, nla->nla_len, msg_len, sprintrc(rc)); in test_nla_type()
309 nla->nla_type = NLA_F_NESTED | (UNIX_DIAG_SHUTDOWN + 1); in test_nla_type()
317 fd, msg->nlh.nlmsg_len, nla->nla_len, UNIX_DIAG_SHUTDOWN + 1, in test_nla_type()