Lines Matching refs:lineno
29 static int tst_rtnl_grow_buffer(const char *file, const int lineno,
41 buf = safe_realloc(file, lineno, ctx->buffer, size);
55 void tst_rtnl_destroy_context(const char *file, const int lineno,
58 safe_close(file, lineno, NULL, ctx->socket);
64 const int lineno)
69 ctx = safe_malloc(file, lineno, NULL, sizeof(struct tst_rtnl_context));
80 ctx->socket = safe_socket(file, lineno, NULL, AF_NETLINK,
88 if (safe_bind(file, lineno, NULL, ctx->socket, (struct sockaddr *)&addr,
90 tst_rtnl_destroy_context(file, lineno, ctx);
94 ctx->buffer = safe_malloc(file, lineno, NULL, ctx->bufsize);
97 tst_rtnl_destroy_context(file, lineno, ctx);
117 int tst_rtnl_send(const char *file, const int lineno,
131 tst_brk_(file, lineno, TBROK, "%s(): No message to send",
139 if (!tst_rtnl_add_message(file, lineno, ctx, &eom, NULL, 0))
148 ret = safe_sendmsg(file, lineno, ctx->datalen, ctx->socket, &msg, 0);
166 struct tst_rtnl_message *tst_rtnl_recv(const char *file, const int lineno,
184 tst_brk_(file, lineno, TBROK | TERRNO,
191 tmpbuf = safe_realloc(file, lineno, buffer, bufsize + size);
197 size = safe_recv(file, lineno, size, ctx->socket,
219 ret = safe_malloc(file, lineno, NULL, retsize);
242 int tst_rtnl_add_message(const char *file, const int lineno,
249 if (!tst_rtnl_grow_buffer(file, lineno, ctx, NLMSG_SPACE(payload_size)))
282 int tst_rtnl_add_attr(const char *file, const int lineno,
290 tst_brk_(file, lineno, TBROK,
295 if (!tst_rtnl_grow_buffer(file, lineno, ctx, RTA_SPACE(len)))
309 int tst_rtnl_add_attr_string(const char *file, const int lineno,
313 return tst_rtnl_add_attr(file, lineno, ctx, type, data,
317 int tst_rtnl_add_attr_list(const char *file, const int lineno,
326 tst_brk_(file, lineno, TBROK,
332 ret = tst_rtnl_add_attr(file, lineno, ctx, list[i].type,
341 ret = tst_rtnl_add_attr_list(file, lineno, ctx,
350 tst_brk_(file, lineno, TBROK,
362 int tst_rtnl_check_acks(const char *file, const int lineno,
378 tst_brk_(file, lineno, TBROK,
393 int tst_rtnl_send_validate(const char *file, const int lineno,
401 if (tst_rtnl_send(file, lineno, ctx) <= 0)
405 response = tst_rtnl_recv(file, lineno, ctx);
410 ret = tst_rtnl_check_acks(file, lineno, ctx, response);