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