gnrc_nettest_res_t gnrc_nettest_send_iface(kernel_pid_t pid, gnrc_pktsnip_t *in, unsigned int exp_pkts, const kernel_pid_t *exp_senders, const gnrc_pktsnip_t **exp_out) { gnrc_nettest_res_t res; gnrc_netif_add(thread_getpid()); res = _pkt_test(GNRC_NETAPI_MSG_TYPE_SND, pid, in, exp_pkts, exp_senders, exp_out); gnrc_netif_remove(thread_getpid()); return res; }
ng_nettest_res_t ng_nettest_send_iface(kernel_pid_t pid, ng_pktsnip_t *in, unsigned int exp_pkts, kernel_pid_t exp_senders[], ng_pktsnip_t *exp_out[]) { ng_nettest_res_t res; ng_netif_add(thread_getpid()); res = _pkt_test(NG_NETAPI_MSG_TYPE_SND, pid, in, exp_pkts, exp_senders, exp_out); ng_netif_remove(thread_getpid()); return res; }
ng_nettest_res_t ng_nettest_receive(kernel_pid_t pid, ng_pktsnip_t *in, unsigned int exp_pkts, kernel_pid_t exp_senders[], ng_pktsnip_t *exp_out[], ng_nettype_t exp_type, uint32_t exp_demux_ctx) { ng_netreg_entry_t reg_entry = { NULL, exp_demux_ctx, thread_getpid() }; ng_nettest_res_t res; ng_netreg_register(exp_type, ®_entry); res = _pkt_test(NG_NETAPI_MSG_TYPE_RCV, pid, in, exp_pkts, exp_senders, exp_out); ng_netreg_unregister(exp_type, ®_entry); return res; }
gnrc_nettest_res_t gnrc_nettest_receive(kernel_pid_t pid, gnrc_pktsnip_t *in, unsigned int exp_pkts, const kernel_pid_t *exp_senders, const gnrc_pktsnip_t **exp_out, gnrc_nettype_t exp_type, uint32_t exp_demux_ctx) { gnrc_netreg_entry_t reg_entry = { NULL, exp_demux_ctx, thread_getpid() }; gnrc_nettest_res_t res; gnrc_netreg_register(exp_type, ®_entry); res = _pkt_test(GNRC_NETAPI_MSG_TYPE_RCV, pid, in, exp_pkts, exp_senders, exp_out); gnrc_netreg_unregister(exp_type, ®_entry); return res; }
gnrc_nettest_res_t gnrc_nettest_receive(kernel_pid_t pid, gnrc_pktsnip_t *in, unsigned int exp_pkts, const kernel_pid_t *exp_senders, const gnrc_pktsnip_t **exp_out, gnrc_nettype_t exp_type, uint32_t exp_demux_ctx) { gnrc_netreg_entry_t reg_entry = GNRC_NETREG_ENTRY_INIT_PID(exp_demux_ctx, sched_active_pid); gnrc_nettest_res_t res; gnrc_netreg_register(exp_type, ®_entry); res = _pkt_test(GNRC_NETAPI_MSG_TYPE_RCV, pid, in, exp_pkts, exp_senders, exp_out); gnrc_netreg_unregister(exp_type, ®_entry); return res; }