Lines Matching refs:ctx

22 	struct tst_rtnl_context *ctx;
28 ctx = tst_rtnl_create_context(file, lineno);
30 if (!ctx)
33 if (!tst_rtnl_add_message(file, lineno, ctx, &header, payload, psize)) {
34 tst_rtnl_destroy_context(file, lineno, ctx);
38 return ctx;
106 struct tst_rtnl_context *ctx;
137 ctx = create_request(file, lineno, RTM_NEWLINK,
140 if (!ctx)
143 if (tst_rtnl_add_attr_list(file, lineno, ctx, attrs) != 2) {
144 tst_rtnl_destroy_context(file, lineno, ctx);
148 ret = tst_rtnl_send_validate(file, lineno, ctx);
149 tst_rtnl_destroy_context(file, lineno, ctx);
165 struct tst_rtnl_context *ctx;
181 ctx = create_request(file, lineno, RTM_NEWLINK,
184 if (!ctx)
187 if (tst_rtnl_add_attr_list(file, lineno, ctx, attrs) != 2) {
188 tst_rtnl_destroy_context(file, lineno, ctx);
192 ret = tst_rtnl_send_validate(file, lineno, ctx);
193 tst_rtnl_destroy_context(file, lineno, ctx);
208 struct tst_rtnl_context *ctx;
217 ctx = create_request(file, lineno, RTM_DELLINK, 0, &info, sizeof(info));
219 if (!ctx)
222 if (!tst_rtnl_add_attr_string(file, lineno, ctx, IFLA_IFNAME, ifname)) {
223 tst_rtnl_destroy_context(file, lineno, ctx);
227 ret = tst_rtnl_send_validate(file, lineno, ctx);
228 tst_rtnl_destroy_context(file, lineno, ctx);
244 struct tst_rtnl_context *ctx;
259 ctx = create_request(file, lineno, action, nl_flags, &info,
262 if (!ctx)
265 if (!tst_rtnl_add_attr(file, lineno, ctx, IFA_FLAGS, &addr_flags,
267 tst_rtnl_destroy_context(file, lineno, ctx);
271 if (!tst_rtnl_add_attr(file, lineno, ctx, IFA_LOCAL, address,
273 tst_rtnl_destroy_context(file, lineno, ctx);
277 ret = tst_rtnl_send_validate(file, lineno, ctx);
278 tst_rtnl_destroy_context(file, lineno, ctx);
325 struct tst_rtnl_context *ctx;
334 ctx = create_request(file, lineno, RTM_NEWLINK, 0, &info, sizeof(info));
336 if (!ctx)
339 if (!tst_rtnl_add_attr_string(file, lineno, ctx, IFLA_IFNAME, ifname)) {
340 tst_rtnl_destroy_context(file, lineno, ctx);
344 if (!tst_rtnl_add_attr(file, lineno, ctx, attr, &value,
346 tst_rtnl_destroy_context(file, lineno, ctx);
350 ret = tst_rtnl_send_validate(file, lineno, ctx);
351 tst_rtnl_destroy_context(file, lineno, ctx);
380 struct tst_rtnl_context *ctx;
416 ctx = create_request(file, lineno, action, flags, &info, sizeof(info));
418 if (!ctx)
421 if (srcaddr && !tst_rtnl_add_attr(file, lineno, ctx, RTA_SRC, srcaddr,
423 tst_rtnl_destroy_context(file, lineno, ctx);
427 if (dstaddr && !tst_rtnl_add_attr(file, lineno, ctx, RTA_DST, dstaddr,
429 tst_rtnl_destroy_context(file, lineno, ctx);
433 if (gateway && !tst_rtnl_add_attr(file, lineno, ctx, RTA_GATEWAY,
435 tst_rtnl_destroy_context(file, lineno, ctx);
439 if (ifname && !tst_rtnl_add_attr(file, lineno, ctx, RTA_OIF, &index,
441 tst_rtnl_destroy_context(file, lineno, ctx);
445 ret = tst_rtnl_send_validate(file, lineno, ctx);
446 tst_rtnl_destroy_context(file, lineno, ctx);
531 struct tst_rtnl_context *ctx;
557 ctx = create_request(file, lineno, action, nl_flags, &msg, sizeof(msg));
559 if (!ctx)
562 if (!tst_rtnl_add_attr_string(file, lineno, ctx, TCA_KIND, qd_kind)) {
563 tst_rtnl_destroy_context(file, lineno, ctx);
567 if (config && !tst_rtnl_add_attr_list(file, lineno, ctx, config)) {
568 tst_rtnl_destroy_context(file, lineno, ctx);
572 ret = tst_rtnl_send_validate(file, lineno, ctx);
573 tst_rtnl_destroy_context(file, lineno, ctx);