void
net_test(cyg_addrword_t param)
{
    extern void cyg_net_snmp_init(void);

    CYG_TEST_INIT();
    CYG_TEST_INFO("Start multiple SNMP server test");
    init_all_network_interfaces();

    autohost_init();

    cyg_net_snmp_init();

    TNR_INIT();
    
    // Now command the host to do ping to us...
#ifdef CYGHWR_NET_DRIVER_ETH0
    if (eth0_up) {
        do_snmp_tests(&eth0_bootp_data, 3, TESTTIME);
    }
#endif
#ifdef CYGHWR_NET_DRIVER_ETH1
    if (eth1_up) {
        do_snmp_tests(&eth1_bootp_data, 3, TESTTIME);
    }
#endif
    // Let the server run for 5 minutes
    cyg_thread_delay(2*100); // let the stuff start up first
    TNR_ON();
    cyg_thread_delay(TESTTIME*100); // FIXME - assume cS clock.
    // Additional delay 'cos host may be slower than us - and it has to
    // complete a transfer anyway:
    cyg_thread_delay(  30    *100); // FIXME - assume cS clock.
    TNR_OFF();

    autohost_end( 3 * (0
#ifdef CYGHWR_NET_DRIVER_ETH0
                  + eth0_up
#endif
#ifdef CYGHWR_NET_DRIVER_ETH1
                  + eth1_up
#endif
        ) ); // check for N pass messages from hosts

    TNR_PRINT_ACTIVITY();
    CYG_TEST_EXIT("Done");
}
Exemple #2
0
void
net_test(cyg_addrword_t param)
{
    diag_printf("Start TCP test - ECHO mode\n");
    init_all_network_interfaces();
    calibrate_load(DESIRED_BACKGROUND_LOAD);
    TNR_INIT();
#ifdef CYGPKG_SNMPAGENT
    {
        extern void cyg_net_snmp_init(void);
        cyg_net_snmp_init();
    }
#endif
    echo_test(param);
    TNR_PRINT_ACTIVITY();
    cyg_test_exit();
}
Exemple #3
0
void
net_test(cyg_addrword_t param)
{
    diag_printf("Start TFTP server test\n");
    init_all_network_interfaces();
    TNR_INIT();
#ifdef CYGHWR_NET_DRIVER_ETH0
    if (eth0_up) {
        tftp_test(&eth0_bootp_data);
    }
#else
    if ( 0 ) ; 
#endif
#ifdef CYGHWR_NET_DRIVER_ETH1
    else if (eth1_up) {
        tftp_test(&eth1_bootp_data);
    }
#endif
    TNR_PRINT_ACTIVITY();
    cyg_test_exit();
}