Lines Matching refs:net_iface
170 static struct net_if *net_iface; variable
320 pkt = net_pkt_rx_alloc_with_buffer(net_iface, sizeof(data_pkt_with_ar), AF_UNSPEC, 0, in get_data_pkt_with_ar()
335 struct ieee802154_context *ctx = net_if_l2_data(net_iface); in set_up_security()
343 if (disassociate(net_iface, ctx) != 0) { in set_up_security()
355 if (net_mgmt(NET_REQUEST_IEEE802154_SET_SECURITY_SETTINGS, net_iface, ¶ms, in set_up_security()
362 associate(net_iface, ctx, saved_short_addr) != 0) { in set_up_security()
371 struct ieee802154_context *ctx = net_if_l2_data(net_iface); in tear_down_security()
377 if (disassociate(net_iface, ctx) != 0) { in tear_down_security()
381 if (net_mgmt(NET_REQUEST_IEEE802154_SET_SECURITY_SETTINGS, net_iface, ¶ms, in tear_down_security()
388 associate(net_iface, ctx, saved_short_addr) != 0) { in tear_down_security()
398 .sll_ifindex = net_if_get_by_iface(net_iface), in set_up_recv_socket()
469 struct ieee802154_context *ctx = net_if_l2_data(net_iface); in test_ns_sending()
478 if (with_short_addr && set_up_short_addr(net_iface, ctx)) { in test_ns_sending()
482 if (net_ipv6_send_ns(net_iface, NULL, &t->src, &t->dst, &t->dst, false)) { in test_ns_sending()
484 tear_down_short_addr(net_iface, ctx); in test_ns_sending()
488 tear_down_short_addr(net_iface, ctx); in test_ns_sending()
538 ack_required = ieee802154_prepare_for_ack(net_iface, tx_pkt, tx_pkt->frags); in test_wait_for_ack()
549 one_ack_pkt = net_pkt_rx_alloc_with_buffer(net_iface, IEEE802154_ACK_PKT_LENGTH, in test_wait_for_ack()
556 if (!ieee802154_create_ack_frame(net_iface, one_ack_pkt, mpdu.mhr.fs->sequence)) { in test_wait_for_ack()
563 if (ieee802154_handle_ack(net_iface, one_ack_pkt) != NET_OK) { in test_wait_for_ack()
568 if (ieee802154_wait_for_ack(net_iface, ack_required) != 0) { in test_wait_for_ack()
590 pkt = net_pkt_rx_alloc_with_buffer(net_iface, 64, AF_UNSPEC, 0, K_NO_WAIT); in test_packet_cloning_with_cb()
624 pkt = net_pkt_rx_alloc_on_iface(net_iface, K_NO_WAIT); in test_packet_rssi_conversion()
682 struct ieee802154_context *ctx = net_if_l2_data(net_iface); in test_dgram_packet_sending()
683 struct sockaddr_ll socket_sll = {.sll_ifindex = net_if_get_by_iface(net_iface), in test_dgram_packet_sending()
714 if (bind_short_address && set_up_short_addr(net_iface, ctx)) { in test_dgram_packet_sending()
745 net_pkt_lladdr_src(current_pkt)->addr = net_if_get_link_addr(net_iface)->addr; in test_dgram_packet_sending()
746 net_pkt_lladdr_src(current_pkt)->len = net_if_get_link_addr(net_iface)->len; in test_dgram_packet_sending()
748 if (!ieee802154_decipher_data_frame(net_iface, current_pkt, &mpdu)) { in test_dgram_packet_sending()
764 tear_down_short_addr(net_iface, ctx); in test_dgram_packet_sending()
776 struct ieee802154_context *ctx = net_if_l2_data(net_iface); in test_dgram_packet_reception()
832 net_iface, net_pkt_lladdr_dst(pkt), net_pkt_lladdr_src(pkt), in test_dgram_packet_reception()
867 if (net_recv_data(net_iface, pkt)) { in test_dgram_packet_reception()
896 recv_src_sll.sll_ifindex != net_if_get_by_iface(net_iface) || in test_dgram_packet_reception()
933 socket_sll.sll_ifindex = net_if_get_by_iface(net_iface); in test_raw_packet_sending()
1018 if (net_recv_data(net_iface, pkt)) { in test_raw_packet_reception()
1089 struct ieee802154_context *ctx = net_if_l2_data(net_iface); in test_recv_and_send_ack_reply()
1092 .sll_ifindex = net_if_get_by_iface(net_iface), in test_recv_and_send_ack_reply()
1127 if (set_up_short_addr(net_iface, ctx)) { in test_recv_and_send_ack_reply()
1136 if (net_recv_data(net_iface, rx_pkt) < 0) { in test_recv_and_send_ack_reply()
1151 recv_src_sll.sll_ifindex != net_if_get_by_iface(net_iface) || in test_recv_and_send_ack_reply()
1203 tear_down_short_addr(net_iface, ctx); in test_recv_and_send_ack_reply()
1230 net_iface = net_if_lookup_by_dev(dev); in initialize_test_environment()
1231 if (!net_iface) { in initialize_test_environment()
1236 if (net_mgmt(NET_REQUEST_IEEE802154_SET_PAN_ID, net_iface, in initialize_test_environment()
1244 ieee_addr_hexdump(net_if_get_link_addr(net_iface)->addr, 8); in initialize_test_environment()