Lines Matching refs:net_test
9 static struct netif net_test; variable
243 fail_unless(netif == &net_test); in lwip_tx_func()
450 netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); in START_TEST()
451 netif_set_link_up(&net_test); in START_TEST()
452 netif_set_up(&net_test); in START_TEST()
454 dhcp_start(&net_test); in START_TEST()
457 xid = netif_dhcp_data(&net_test)->xid; /* Write bad xid, not using htonl! */ in START_TEST()
459 send_pkt(&net_test, dhcp_offer, sizeof(dhcp_offer)); in START_TEST()
462 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
463 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
464 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
467 xid = htonl(netif_dhcp_data(&net_test)->xid); in START_TEST()
469 send_pkt(&net_test, dhcp_offer, sizeof(dhcp_offer)); in START_TEST()
472 xid = netif_dhcp_data(&net_test)->xid; /* Write bad xid, not using htonl! */ in START_TEST()
474 send_pkt(&net_test, dhcp_ack, sizeof(dhcp_ack)); in START_TEST()
477 xid = htonl(netif_dhcp_data(&net_test)->xid); /* xid updated */ in START_TEST()
479 send_pkt(&net_test, dhcp_ack, sizeof(dhcp_ack)); in START_TEST()
487 fail_unless(netif_is_up(&net_test)); in START_TEST()
493 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
494 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
495 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
498 dhcp_stop(&net_test); in START_TEST()
499 dhcp_cleanup(&net_test); in START_TEST()
500 netif_remove(&net_test); in START_TEST()
523 netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); in START_TEST()
524 netif_set_link_up(&net_test); in START_TEST()
525 netif_set_up(&net_test); in START_TEST()
527 dhcp_start(&net_test); in START_TEST()
530 xid = netif_dhcp_data(&net_test)->xid; /* Write bad xid, not using htonl! */ in START_TEST()
532 send_pkt(&net_test, dhcp_offer, sizeof(dhcp_offer)); in START_TEST()
535 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
536 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
537 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
540 xid = htonl(netif_dhcp_data(&net_test)->xid); in START_TEST()
542 send_pkt(&net_test, dhcp_offer, sizeof(dhcp_offer)); in START_TEST()
545 xid = netif_dhcp_data(&net_test)->xid; /* Write bad xid, not using htonl! */ in START_TEST()
547 send_pkt(&net_test, dhcp_ack, sizeof(dhcp_ack)); in START_TEST()
550 xid = htonl(netif_dhcp_data(&net_test)->xid); /* xid updated */ in START_TEST()
552 send_pkt(&net_test, dhcp_ack, sizeof(dhcp_ack)); in START_TEST()
559 send_pkt(&net_test, arpreply, sizeof(arpreply)); in START_TEST()
564 dhcp_stop(&net_test); in START_TEST()
565 dhcp_cleanup(&net_test); in START_TEST()
566 netif_remove(&net_test); in START_TEST()
745 netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); in START_TEST()
746 netif_set_link_up(&net_test); in START_TEST()
747 netif_set_up(&net_test); in START_TEST()
749 dhcp_start(&net_test); in START_TEST()
754 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
755 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
756 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
759 xid = htonl(netif_dhcp_data(&net_test)->xid); in START_TEST()
761 send_pkt(&net_test, relay_offer, sizeof(relay_offer)); in START_TEST()
765 xid = htonl(netif_dhcp_data(&net_test)->xid); /* xid updated */ in START_TEST()
767 send_pkt(&net_test, relay_ack1, sizeof(relay_ack1)); in START_TEST()
775 fail_unless(netif_is_up(&net_test)); in START_TEST()
781 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
782 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
783 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
791 fail_unless(netif_is_up(&net_test)); in START_TEST()
796 send_pkt(&net_test, arp_resp, sizeof(arp_resp)); in START_TEST()
799 fail_unless(netif_is_up(&net_test)); in START_TEST()
801 xid = htonl(netif_dhcp_data(&net_test)->xid); /* xid updated */ in START_TEST()
803 send_pkt(&net_test, relay_ack2, sizeof(relay_ack2)); in START_TEST()
812 dhcp_stop(&net_test); in START_TEST()
813 dhcp_cleanup(&net_test); in START_TEST()
814 netif_remove(&net_test); in START_TEST()
890 netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); in START_TEST()
891 netif_set_link_up(&net_test); in START_TEST()
892 netif_set_up(&net_test); in START_TEST()
894 dhcp_start(&net_test); in START_TEST()
895 dhcp = netif_dhcp_data(&net_test); in START_TEST()
900 send_pkt(&net_test, dhcp_offer, sizeof(dhcp_offer)); in START_TEST()
903 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
904 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
905 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
910 send_pkt(&net_test, dhcp_offer, sizeof(dhcp_offer)); in START_TEST()
919 send_pkt(&net_test, dhcp_nack_no_endmarker, sizeof(dhcp_nack_no_endmarker)); in START_TEST()
929 dhcp_stop(&net_test); in START_TEST()
930 dhcp_cleanup(&net_test); in START_TEST()
931 netif_remove(&net_test); in START_TEST()
997 netif_add(&net_test, &addr, &netmask, &gw, &net_test, testif_init, ethernet_input); in START_TEST()
998 netif_set_link_up(&net_test); in START_TEST()
999 netif_set_up(&net_test); in START_TEST()
1001 dhcp_start(&net_test); in START_TEST()
1004 xid = htonl(netif_dhcp_data(&net_test)->xid); in START_TEST()
1007 send_pkt(&net_test, dhcp_offer_invalid_overload, sizeof(dhcp_offer_invalid_overload)); in START_TEST()
1009 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
1010 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
1011 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
1015 send_pkt(&net_test, dhcp_offer_invalid_overload, sizeof(dhcp_offer_invalid_overload)); in START_TEST()
1017 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
1018 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
1019 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
1023 send_pkt(&net_test, dhcp_offer_invalid_overload, sizeof(dhcp_offer_invalid_overload)); in START_TEST()
1025 fail_if(memcmp(&addr, &net_test.ip_addr, sizeof(ip4_addr_t))); in START_TEST()
1026 fail_if(memcmp(&netmask, &net_test.netmask, sizeof(ip4_addr_t))); in START_TEST()
1027 fail_if(memcmp(&gw, &net_test.gw, sizeof(ip4_addr_t))); in START_TEST()
1031 send_pkt(&net_test, dhcp_offer_invalid_overload, sizeof(dhcp_offer)); in START_TEST()
1033 fail_unless(netif_dhcp_data(&net_test)->state == DHCP_STATE_REQUESTING); in START_TEST()
1036 xid = htonl(netif_dhcp_data(&net_test)->xid); /* xid updated */ in START_TEST()
1039 dhcp_stop(&net_test); in START_TEST()
1040 dhcp_cleanup(&net_test); in START_TEST()
1041 netif_remove(&net_test); in START_TEST()