Lines Matching +full:promiscuous +full:- +full:mode

1 /* main.c - Application main entry point */
6 * SPDX-License-Identifier: Apache-2.0
26 #include <zephyr/net/promiscuous.h>
80 struct eth_fake_context *ctx = dev->data; in eth_fake_iface_init()
82 ctx->iface = iface; in eth_fake_iface_init()
84 net_if_set_link_addr(iface, ctx->mac_address, in eth_fake_iface_init()
85 sizeof(ctx->mac_address), in eth_fake_iface_init()
109 struct eth_fake_context *ctx = dev->data; in eth_fake_set_config()
113 if (config->promisc_mode == ctx->promisc_mode) { in eth_fake_set_config()
114 return -EALREADY; in eth_fake_set_config()
117 ctx->promisc_mode = config->promisc_mode; in eth_fake_set_config()
122 return -EINVAL; in eth_fake_set_config()
138 struct eth_fake_context *ctx = dev->data; in eth_fake_init()
140 ctx->promisc_mode = false; in eth_fake_init()
179 net_if_get_device(iface)->api; in iface_cb()
184 if (api->get_capabilities == in iface_cb()
210 net_if_get_device(iface1)->data)->idx = idx; in test_iface_setup()
214 net_if_get_device(iface2)->data)->idx = idx; in test_iface_setup()
232 ifaddr->addr_state = NET_ADDR_PREFERRED; in test_iface_setup()
242 ifaddr->addr_state = NET_ADDR_PREFERRED; in test_iface_setup()
252 ifaddr->addr_state = NET_ADDR_PREFERRED; in test_iface_setup()
262 ifaddr->addr_state = NET_ADDR_PREFERRED; in test_iface_setup()
281 DBG("Make sure promiscuous mode is ON (%p)\n", iface); in _set_promisc_mode_on_again()
285 zassert_equal(ret, -EALREADY, "iface %p promiscuous mode ON", iface); in _set_promisc_mode_on_again()
292 DBG("Setting promiscuous mode ON (%p)\n", iface); in _set_promisc_mode_on()
296 zassert_equal(ret, 0, "iface %p promiscuous mode set ON failed", in _set_promisc_mode_on()
304 DBG("Make sure promiscuous mode is OFF (%p)\n", iface); in _set_promisc_mode_off_again()
308 zassert_equal(ret, -EALREADY, "iface %p promiscuous mode OFF", iface); in _set_promisc_mode_off_again()
315 DBG("Setting promiscuous mode OFF (%p)\n", iface); in _set_promisc_mode_off()
319 zassert_equal(ret, 0, "iface %p promiscuous mode set OFF failed", in _set_promisc_mode_off()
378 zassert_not_null(pkt->buffer, "pkt->buffer"); in test_verify_data()
380 zassert_not_null(pkt1->buffer, "pkt1->buffer"); in test_verify_data()
381 zassert_equal(pkt->buffer->len, pkt1->buffer->len, "packet length differs"); in test_verify_data()
382 zassert_not_null(pkt->buffer->data, "pkt->buffer->data"); in test_verify_data()
383 zassert_not_null(pkt1->buffer->data, "pkt1->buffer->data"); in test_verify_data()
384 zassert_mem_equal(pkt->buffer->data, pkt1->buffer->data, pkt1->buffer->len); in test_verify_data()
389 zassert_not_null(pkt->buffer, "pkt->buffer"); in test_verify_data()
391 zassert_not_null(pkt2->buffer, "pkt2->buffer"); in test_verify_data()
392 zassert_equal(pkt->buffer->len, pkt2->buffer->len, "packet length differs"); in test_verify_data()
393 zassert_not_null(pkt->buffer->data, "pkt->buffer->data"); in test_verify_data()
394 zassert_not_null(pkt2->buffer->data, "pkt2->buffer->data"); in test_verify_data()
395 zassert_mem_equal(pkt->buffer->data, pkt2->buffer->data, pkt2->buffer->len); in test_verify_data()