mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/gnrc_ipv6_*: avoid explicit cast to netdev
This commit is contained in:
parent
5e3f7e35f1
commit
cab4e36757
@ -691,7 +691,7 @@ int main(void)
|
||||
int res = gnrc_netif_raw_create(&_netif, mock_netif_stack,
|
||||
sizeof(mock_netif_stack),
|
||||
GNRC_NETIF_PRIO, "mock_netif",
|
||||
(netdev_t *)&mock_netdev);
|
||||
&mock_netdev.netdev.netdev);
|
||||
mock_netif = &_netif;
|
||||
assert(res == 0);
|
||||
shell_run(shell_commands, line_buf, SHELL_DEFAULT_BUFSIZE);
|
||||
|
@ -157,7 +157,13 @@ static int _run_test(int argc, char **argv)
|
||||
xtimer_usleep(200);
|
||||
}
|
||||
/* activate dumping of sent ethernet frames */
|
||||
netdev_test_set_send_cb((netdev_test_t *)_mock_netif->dev,
|
||||
netdev_ieee802154_t *netdev_ieee802154 = container_of(_mock_netif->dev,
|
||||
netdev_ieee802154_t,
|
||||
netdev);
|
||||
netdev_test_t *netdev_test = container_of(netdev_ieee802154,
|
||||
netdev_test_t,
|
||||
netdev);
|
||||
netdev_test_set_send_cb(netdev_test,
|
||||
_dump_etherframe);
|
||||
/* first, test forwarding without subscription */
|
||||
subscribers = gnrc_netapi_dispatch_receive(GNRC_NETTYPE_IPV6,
|
||||
|
@ -65,7 +65,7 @@ void _tests_init(void)
|
||||
_get_address);
|
||||
int res = gnrc_netif_ethernet_create(&_netif,
|
||||
_mock_netif_stack, THREAD_STACKSIZE_DEFAULT, GNRC_NETIF_PRIO,
|
||||
"mockup_eth", &_mock_netdev.netdev
|
||||
"mockup_eth", &_mock_netdev.netdev.netdev
|
||||
);
|
||||
_mock_netif = &_netif;
|
||||
expect(res == 0);
|
||||
|
@ -82,7 +82,7 @@ void _tests_init(void)
|
||||
_get_address);
|
||||
int res = gnrc_netif_ethernet_create(&_netif,
|
||||
_mock_netif_stack, THREAD_STACKSIZE_DEFAULT, GNRC_NETIF_PRIO,
|
||||
"mockup_eth", &_mock_netdev.netdev
|
||||
"mockup_eth", &_mock_netdev.netdev.netdev
|
||||
);
|
||||
_mock_netif = &_netif;
|
||||
expect(res == 0);
|
||||
|
Loading…
Reference in New Issue
Block a user