Lines Matching refs:msg
126 API_MSG_VAR_DECLARE(msg); in netconn_new_with_proto_and_callback()
127 API_MSG_VAR_ALLOC_RETURN_NULL(msg); in netconn_new_with_proto_and_callback()
133 API_MSG_VAR_REF(msg).msg.n.proto = proto; in netconn_new_with_proto_and_callback()
134 API_MSG_VAR_REF(msg).conn = conn; in netconn_new_with_proto_and_callback()
135 err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg)); in netconn_new_with_proto_and_callback()
148 API_MSG_VAR_FREE(msg); in netconn_new_with_proto_and_callback()
152 API_MSG_VAR_FREE(msg); in netconn_new_with_proto_and_callback()
169 API_MSG_VAR_DECLARE(msg); in netconn_delete()
176 API_MSG_VAR_ALLOC(msg); in netconn_delete()
177 API_MSG_VAR_REF(msg).conn = conn; in netconn_delete()
181 API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now(); in netconn_delete()
184 API_MSG_VAR_REF(msg).msg.sd.polls_left = in netconn_delete()
188 err = netconn_apimsg(lwip_netconn_do_delconn, &API_MSG_VAR_REF(msg)); in netconn_delete()
189 API_MSG_VAR_FREE(msg); in netconn_delete()
214 API_MSG_VAR_DECLARE(msg); in netconn_getaddr()
221 API_MSG_VAR_ALLOC(msg); in netconn_getaddr()
222 API_MSG_VAR_REF(msg).conn = conn; in netconn_getaddr()
223 API_MSG_VAR_REF(msg).msg.ad.local = local; in netconn_getaddr()
225 err = netconn_apimsg(lwip_netconn_do_getaddr, &API_MSG_VAR_REF(msg)); in netconn_getaddr()
226 *addr = msg->msg.ad.ipaddr; in netconn_getaddr()
227 *port = msg->msg.ad.port; in netconn_getaddr()
229 msg.msg.ad.ipaddr = addr; in netconn_getaddr()
230 msg.msg.ad.port = port; in netconn_getaddr()
231 err = netconn_apimsg(lwip_netconn_do_getaddr, &msg); in netconn_getaddr()
233 API_MSG_VAR_FREE(msg); in netconn_getaddr()
252 API_MSG_VAR_DECLARE(msg); in netconn_bind()
274 API_MSG_VAR_ALLOC(msg); in netconn_bind()
275 API_MSG_VAR_REF(msg).conn = conn; in netconn_bind()
276 API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); in netconn_bind()
277 API_MSG_VAR_REF(msg).msg.bc.port = port; in netconn_bind()
278 err = netconn_apimsg(lwip_netconn_do_bind, &API_MSG_VAR_REF(msg)); in netconn_bind()
279 API_MSG_VAR_FREE(msg); in netconn_bind()
296 API_MSG_VAR_DECLARE(msg); in netconn_connect()
308 API_MSG_VAR_ALLOC(msg); in netconn_connect()
309 API_MSG_VAR_REF(msg).conn = conn; in netconn_connect()
310 API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); in netconn_connect()
311 API_MSG_VAR_REF(msg).msg.bc.port = port; in netconn_connect()
312 err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg)); in netconn_connect()
313 API_MSG_VAR_FREE(msg); in netconn_connect()
328 API_MSG_VAR_DECLARE(msg); in netconn_disconnect()
333 API_MSG_VAR_ALLOC(msg); in netconn_disconnect()
334 API_MSG_VAR_REF(msg).conn = conn; in netconn_disconnect()
335 err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg)); in netconn_disconnect()
336 API_MSG_VAR_FREE(msg); in netconn_disconnect()
354 API_MSG_VAR_DECLARE(msg); in netconn_listen_with_backlog()
362 API_MSG_VAR_ALLOC(msg); in netconn_listen_with_backlog()
363 API_MSG_VAR_REF(msg).conn = conn; in netconn_listen_with_backlog()
365 API_MSG_VAR_REF(msg).msg.lb.backlog = backlog; in netconn_listen_with_backlog()
367 err = netconn_apimsg(lwip_netconn_do_listen, &API_MSG_VAR_REF(msg)); in netconn_listen_with_backlog()
368 API_MSG_VAR_FREE(msg); in netconn_listen_with_backlog()
394 API_MSG_VAR_DECLARE(msg); in netconn_accept()
411 API_MSG_VAR_ALLOC(msg); in netconn_accept()
417 API_MSG_VAR_FREE(msg); in netconn_accept()
432 API_MSG_VAR_FREE(msg); in netconn_accept()
443 API_MSG_VAR_FREE(msg); in netconn_accept()
449 API_MSG_VAR_REF(msg).conn = newconn; in netconn_accept()
451 netconn_apimsg(lwip_netconn_do_accepted, &API_MSG_VAR_REF(msg)); in netconn_accept()
452 API_MSG_VAR_FREE(msg); in netconn_accept()
481 API_MSG_VAR_DECLARE(msg); in netconn_recv_data()
483 msg = NULL; in netconn_recv_data()
515 API_MSG_VAR_ALLOC(msg); in netconn_recv_data()
526 API_MSG_VAR_FREE(msg); in netconn_recv_data()
543 API_MSG_VAR_REF(msg).conn = conn; in netconn_recv_data()
545 API_MSG_VAR_REF(msg).msg.r.len = ((struct pbuf *)buf)->tot_len; in netconn_recv_data()
547 API_MSG_VAR_REF(msg).msg.r.len = 1; in netconn_recv_data()
551 netconn_apimsg(lwip_netconn_do_recv, &API_MSG_VAR_REF(msg)); in netconn_recv_data()
552 API_MSG_VAR_FREE(msg); in netconn_recv_data()
704 API_MSG_VAR_DECLARE(msg); in netconn_send()
711 API_MSG_VAR_ALLOC(msg); in netconn_send()
712 API_MSG_VAR_REF(msg).conn = conn; in netconn_send()
713 API_MSG_VAR_REF(msg).msg.b = buf; in netconn_send()
714 err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg)); in netconn_send()
715 API_MSG_VAR_FREE(msg); in netconn_send()
738 API_MSG_VAR_DECLARE(msg); in netconn_write_partly()
759 API_MSG_VAR_ALLOC(msg); in netconn_write_partly()
761 API_MSG_VAR_REF(msg).conn = conn; in netconn_write_partly()
762 API_MSG_VAR_REF(msg).msg.w.dataptr = dataptr; in netconn_write_partly()
763 API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags; in netconn_write_partly()
764 API_MSG_VAR_REF(msg).msg.w.len = size; in netconn_write_partly()
769 API_MSG_VAR_REF(msg).msg.w.time_started = sys_now(); in netconn_write_partly()
771 API_MSG_VAR_REF(msg).msg.w.time_started = 0; in netconn_write_partly()
778 err = netconn_apimsg(lwip_netconn_do_write, &API_MSG_VAR_REF(msg)); in netconn_write_partly()
782 *bytes_written = API_MSG_VAR_REF(msg).msg.w.len; in netconn_write_partly()
788 API_MSG_VAR_FREE(msg); in netconn_write_partly()
804 API_MSG_VAR_DECLARE(msg); in netconn_close_shutdown()
810 API_MSG_VAR_ALLOC(msg); in netconn_close_shutdown()
811 API_MSG_VAR_REF(msg).conn = conn; in netconn_close_shutdown()
814 API_MSG_VAR_REF(msg).msg.sd.shut = how; in netconn_close_shutdown()
818 API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now(); in netconn_close_shutdown()
820 API_MSG_VAR_REF(msg).msg.sd.polls_left = in netconn_close_shutdown()
824 err = netconn_apimsg(lwip_netconn_do_close, &API_MSG_VAR_REF(msg)); in netconn_close_shutdown()
825 API_MSG_VAR_FREE(msg); in netconn_close_shutdown()
877 API_MSG_VAR_DECLARE(msg); in netconn_join_leave_group()
882 API_MSG_VAR_ALLOC(msg); in netconn_join_leave_group()
894 API_MSG_VAR_REF(msg).conn = conn; in netconn_join_leave_group()
895 API_MSG_VAR_REF(msg).msg.jl.multiaddr = API_MSG_VAR_REF(multiaddr); in netconn_join_leave_group()
896 API_MSG_VAR_REF(msg).msg.jl.netif_addr = API_MSG_VAR_REF(netif_addr); in netconn_join_leave_group()
897 API_MSG_VAR_REF(msg).msg.jl.join_or_leave = join_or_leave; in netconn_join_leave_group()
898 err = netconn_apimsg(lwip_netconn_do_join_leave_group, &API_MSG_VAR_REF(msg)); in netconn_join_leave_group()
899 API_MSG_VAR_FREE(msg); in netconn_join_leave_group()
926 API_VAR_DECLARE(struct dns_api_msg, msg); in netconn_gethostbyname_addrtype()
941 API_VAR_ALLOC(struct dns_api_msg, MEMP_DNS_API_MSG, msg, ERR_MEM); in netconn_gethostbyname_addrtype()
943 strncpy(API_VAR_REF(msg).name, name, DNS_MAX_NAME_LENGTH-1); in netconn_gethostbyname_addrtype()
944 API_VAR_REF(msg).name[DNS_MAX_NAME_LENGTH-1] = 0; in netconn_gethostbyname_addrtype()
946 msg.err = &err; in netconn_gethostbyname_addrtype()
947 msg.sem = &sem; in netconn_gethostbyname_addrtype()
948 API_VAR_REF(msg).addr = API_VAR_REF(addr); in netconn_gethostbyname_addrtype()
949 API_VAR_REF(msg).name = name; in netconn_gethostbyname_addrtype()
952 API_VAR_REF(msg).dns_addrtype = dns_addrtype; in netconn_gethostbyname_addrtype()
955 API_VAR_REF(msg).sem = LWIP_NETCONN_THREAD_SEM_GET(); in netconn_gethostbyname_addrtype()
957 err = sys_sem_new(API_EXPR_REF(API_VAR_REF(msg).sem), 0); in netconn_gethostbyname_addrtype()
959 API_VAR_FREE(MEMP_DNS_API_MSG, msg); in netconn_gethostbyname_addrtype()
964 cberr = tcpip_callback(lwip_netconn_do_gethostbyname, &API_VAR_REF(msg)); in netconn_gethostbyname_addrtype()
967 sys_sem_free(API_EXPR_REF(API_VAR_REF(msg).sem)); in netconn_gethostbyname_addrtype()
969 API_VAR_FREE(MEMP_DNS_API_MSG, msg); in netconn_gethostbyname_addrtype()
972 sys_sem_wait(API_EXPR_REF_SEM(API_VAR_REF(msg).sem)); in netconn_gethostbyname_addrtype()
974 sys_sem_free(API_EXPR_REF(API_VAR_REF(msg).sem)); in netconn_gethostbyname_addrtype()
978 *addr = msg->addr; in netconn_gethostbyname_addrtype()
979 err = msg->err; in netconn_gethostbyname_addrtype()
982 API_VAR_FREE(MEMP_DNS_API_MSG, msg); in netconn_gethostbyname_addrtype()