亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? noncopytcptestee.c

?? 在dm642開發平臺上實現dsp與主機之間的通信實例
?? C
?? 第 1 頁 / 共 2 頁
字號:
        printf("Network Added: ");
    else
        printf("Network Removed: ");

    // Print a message
    IPTmp = ntohl( IPAddr );
    printf("If-%d:%d.%d.%d.%d\n", IfIdx,
            (UINT8)(IPTmp>>24)&0xFF, (UINT8)(IPTmp>>16)&0xFF,
            (UINT8)(IPTmp>>8)&0xFF, (UINT8)IPTmp&0xFF );
            
    TSK_sleep(100);
}

//
// Service Status Reports
//
// Here's a quick example of using service status updates
//
static char *TaskName[]  = { "Telnet","HTTP","NAT","DHCPS","DHCPC","DNS" };
static char *ReportStr[] = { "","Running","Updated","Complete","Fault" };
static char *StatusStr[] = { "Disabled","Waiting","IPTerm","Failed","Enabled" };
static void ServiceReport( uint Item, uint Status, uint Report, HANDLE h )
{
    printf( "Service Status: %-9s: %-9s: %-9s: %03d\n",
            TaskName[Item-1], StatusStr[Status],
            ReportStr[Report/256], Report&0xFF );

    //
    // Example of adding to the DHCP configuration space
    //
    // When using the DHCP client, the client has full control over access
    // to the first 256 entries in the CFGTAG_SYSINFO space.
    //
    // Note that the DHCP client will erase all CFGTAG_SYSINFO tags except
    // CFGITEM_DHCP_HOSTNAME. If the application needs to keep manual
    // entries in the DHCP tag range, then the code to maintain them should
    // be placed here.
    //
    // Here, we want to manually add a DNS server to the configuration, but
    // we can only do it once DHCP has finished its programming.
    //
    if( Item == CFGITEM_SERVICE_DHCPCLIENT &&
        Status == CIS_SRV_STATUS_ENABLED &&
        (Report == (NETTOOLS_STAT_RUNNING|DHCPCODE_IPADD) ||
         Report == (NETTOOLS_STAT_RUNNING|DHCPCODE_IPRENEW)) )
    {
        IPN IPTmp;

        // Manually add the DNS server when specified
        IPTmp = inet_addr(DNSServer);
        if( IPTmp )
            CfgAddEntry( 0, CFGTAG_SYSINFO, CFGITEM_DHCP_DOMAINNAMESERVER,
                         0, sizeof(IPTmp), (UINT8 *)&IPTmp, 0 );
    }

}


//
// TCP Transmit Server Daemon Function
// (SOCK_STREAM @ port 1000)
//
int dtask_tcp_transmit_srv( SOCKET s, UINT32 unused )
{
    struct timeval to;
    int     i, size, count, bytes;
    UINT32  ts, tsMsec, ts1, ts1Msec, startMsec, endMsec;
    UINT32   tn, totalBytes;
        
    LgUns totalTime;
    LgUns tskTime;
    Uns load;

    (void)unused;

    // Configure our socket timeout to be 5 seconds
    to.tv_sec  = 5;
    to.tv_usec = 0;
    setsockopt( s, SOL_SOCKET, SO_SNDTIMEO, &to, sizeof( to ) );
    setsockopt( s, SOL_SOCKET, SO_RCVTIMEO, &to, sizeof( to ) );

    i = 1;
    setsockopt( s, IPPROTO_TCP, TCP_NOPUSH, &i, 4 );

    totalBytes = 0;

    // There is data available on the active connection
    i = (int)recv( s, (char *)&size, sizeof(int), 0 );

    // Get timestamp
    llEnter();
    ts = llTimerGetTime(&tsMsec);
    llExit();
    
    for (count = 0; count < BENCH_FRAMES; count ++) {

        if( i== sizeof(int) ) {           
            bytes = send( s, (char *)&size, size, 0 );
            totalBytes = totalBytes + bytes;
            
            if( bytes <= 0 ) {
                printf("send failed\n");
                goto leave;
            }
        }
        else {
            goto leave;
        }
        // Get TSK_idle time to compute CPU load half-way through
        // number of packets transfers
        if ( loop == count) {
            THRLOAD_getTskTime(&TSK_idle, &tskTime, &totalTime);
        }
    }

    // Get timestamp again!!
    llEnter();
    ts1 = llTimerGetTime(&ts1Msec);
    llExit();
    
    // Compute CPU load
    load = 100 - tskTime / (totalTime / 100);

    // Compute total time in milliseconds
    startMsec  = (ts * 1000) + tsMsec;
    endMsec    = (ts1 * 1000) + ts1Msec;
    tn = endMsec - startMsec;

#ifdef BENCH_CSV
    printf("Transmit,%d,%u,%d\n", size, ((totalBytes*8)/tn), load );   
    
#else
    printf("Transmitted %d frames of %d bytes for a total of %u\n", count, size, totalBytes);
    printf("at a rate of %u kb/s with a CPU load of %d%%\n\n", ((totalBytes*8)/tn), load);    

#endif

#ifdef _64P_    
    /* Write back and invalidate all cache for C64P devices */
    BCACHE_wbInvAll();
#else
    CACHE_clean(CACHE_L2ALL, 0, 0);    
#endif
    
leave:
    // Return "1" since the socket is still open
    return(1);
}

//
//  TCP Receive Server Daemon Function
// (SOCK_STREAMNC @ port 1001)
//
int dtask_tcp_receive_srv( SOCKET s, UINT32 unused )
{
    struct timeval to;

    char     *pBuf;
    HANDLE   hBuffer;

    UINT32   tsMsec, ts1Msec, startMsec, endMsec;
    UINT32   ts, ts1, tn, totalBytes;
    int      bytes, count, i, size, cache;
            
    LgUns    totalTime;
    LgUns    tskTime;
    Uns      load;
    
    (void)unused;
    
    //THRLOAD_update();
    // Configure our socket timeout to be 5 seconds
    to.tv_sec  = 5;
    to.tv_usec = 0;
    setsockopt( s, SOL_SOCKET, SO_SNDTIMEO, &to, sizeof( to ) );
    setsockopt( s, SOL_SOCKET, SO_RCVTIMEO, &to, sizeof( to ) );
    
    // Check for data size on the active connection
    (int)recv( s, (char *)&size, sizeof(int), 0 );
         
    totalBytes = 0;

    // Get timestamp
    llEnter();
    ts = llTimerGetTime(&tsMsec);
    llExit();

    // Process all data for expected frames 
    for (count = 0; count < BENCH_FRAMES; count++  ) {
        
        i = 0;

        while (i < (int)size) {
                   
            // There is data available on the active connection
            bytes = (int)recvnc( s, (void **)&pBuf, 0, &hBuffer );

           
           // If the connection is closed or got an error, break
            if (bytes <= 0) {
                break;
        }
            else {
                recvncfree( hBuffer );
        }
            i += bytes;
        }

        // Accumulate total bytes received
        totalBytes += i;
                 
        
        // If the connection is closed or got an error, break
        if (bytes <= 0) {
            break;
        }
        
        // Get TSK_idle time to compute CPU load half-way through
        // number of packets transfers
        if ( loop == count) {
            THRLOAD_getTskTime(&TSK_idle, &tskTime, &totalTime);
        }
    }

    // Get timestamp again!!
    llEnter();
    ts1 = llTimerGetTime(&ts1Msec);
    llExit();
    
    // Compute CPU load
    load = 100 - tskTime / (totalTime / 100);

    // Compute total time in milliseconds
    startMsec  = (ts * 1000) + tsMsec;
    endMsec    = (ts1 * 1000) + ts1Msec;
    tn = endMsec - startMsec;
        
    if (flag == FALSE) {
        flag = TRUE;
#ifdef _64P_
        switch ( bcacheSize.l2size ) {
            case BCACHE_L2_0K :
                    cache = 0;
                    break;
            case BCACHE_L2_32K :
                    cache = 32;
                    break;
            case BCACHE_L2_64K :
                    cache = 64;
                    break;
            case BCACHE_L2_128K :
                    cache = 128;
                    break;
            case BCACHE_L2_256K :
                    cache = 256;
                    break;
            default:
                printf("Unknown cache setup\n");        
        }
#else // DM642
        switch (l2CacheSize) {
            case CACHE_0KCACHE :
                    cache = 0;
                    break;
            case CACHE_32KCACHE :
                    cache = 32;
                    break;
            case CACHE_64KCACHE :
                    cache = 64;
                    break;
            case  CACHE_128KSRAM :
                    cache = 128;
                    break;
            case CACHE_256KCACHE :
                    cache = 256;
                    break;
            default:
                printf("Unknown cache setup\n");        
        }
#endif

#ifdef BENCH_CSV

        printf("DSP Operating at %u MHz with %dk L2 Cache \n", GBL_getFrequency()/1000, cache );
        printf("Results are shown as:\n");
        printf("Operation,Frame Size(bytes),Measured throughput(kbits/sec),CPU Load(+/-1%%)\n");
    }
    
    printf ("Receive,%d,%u,%d\n",size,(totalBytes*8)/tn , load);

#else
        printf("DSP Operating at %u MHz with %dk L2 Cache \n\n", GBL_getFrequency()/1000, cache );
    }
    
    printf ("Received packets of %d bytes for a total of %u bytes \n",size, totalBytes);
    printf ("for a throughput of %u kb/s at a CPU load of %d%% \n\n", (((totalBytes/tn)*1000)*8)/1000, load);
#endif


#ifdef _64P_
    /* Write back and invalidate all cache for C64P devices */
    BCACHE_wbInvAll();
#else
    CACHE_clean(CACHE_L2ALL, 0, 0);
#endif    
    
    // Return "1" since the socket is still open
    return(1);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美女孩性生活视频| 中文天堂在线一区| 韩国视频一区二区| 国产视频一区不卡| 99热在这里有精品免费| 夜夜嗨av一区二区三区四季av| 欧美日韩精品二区第二页| 日本午夜精品视频在线观看| 欧美精品一区二区精品网| 成人午夜电影小说| 亚洲理论在线观看| 欧美一区二区三区视频免费播放 | 不卡的av中国片| 亚洲三级理论片| 欧美日本国产视频| 国产一区二区精品久久99| 日韩美女视频一区| 777a∨成人精品桃花网| 国产精品91一区二区| 亚洲精品欧美激情| 欧美大度的电影原声| av一区二区不卡| 日韩国产欧美一区二区三区| 精品国产乱码久久久久久图片 | 国产在线视频一区二区三区| 欧美激情一区二区三区| 91久久久免费一区二区| 久久精品噜噜噜成人av农村| 国产精品护士白丝一区av| 欧美精品黑人性xxxx| 粉嫩av一区二区三区在线播放| 一区二区国产视频| 日韩一区二区视频在线观看| jlzzjlzz亚洲日本少妇| 日本va欧美va精品| 99久久精品情趣| 日日噜噜夜夜狠狠视频欧美人 | 中文字幕亚洲区| 91精品福利在线一区二区三区| 国产传媒欧美日韩成人| 亚洲国产婷婷综合在线精品| 久久色中文字幕| 欧美亚一区二区| 国产乱人伦偷精品视频不卡| 亚洲国产精品一区二区尤物区| 久久综合一区二区| 欧美三级电影在线看| 国产精品 欧美精品| 亚洲国产wwwccc36天堂| 国产精品毛片a∨一区二区三区| 欧美精品日韩一本| 99久久精品99国产精品| 久久91精品国产91久久小草| 一区二区三区蜜桃| 欧美国产亚洲另类动漫| 日韩精品一区二区三区三区免费 | 国产一区二区精品久久99 | 欧美日韩久久久| 国产suv精品一区二区三区| 日韩av在线免费观看不卡| 中文字幕在线观看一区| 精品国产一区二区三区不卡| 欧美日韩一区三区| 99久久夜色精品国产网站| 国产呦精品一区二区三区网站| 亚洲妇熟xx妇色黄| 18欧美亚洲精品| 久久久久久夜精品精品免费| 欧美一区二区三区免费视频 | 精品对白一区国产伦| 欧美日韩精品一区二区天天拍小说| 成人ar影院免费观看视频| 狠狠v欧美v日韩v亚洲ⅴ| 五月激情丁香一区二区三区| 亚洲欧美电影院| 国产精品白丝在线| 久久精品男人天堂av| 欧美大片一区二区| 欧美一区二区三区视频在线 | 欧美激情一区在线| 欧美不卡视频一区| 老司机精品视频导航| 亚欧色一区w666天堂| 一区二区三区中文字幕在线观看| 国产精品毛片高清在线完整版| 久久午夜电影网| 日韩精品一区二区三区视频| 91精品国产高清一区二区三区| 欧美天天综合网| 色婷婷综合视频在线观看| 成人精品小蝌蚪| 国产馆精品极品| 国产一区视频网站| 精久久久久久久久久久| 美国av一区二区| 久久精品国产77777蜜臀| 麻豆成人久久精品二区三区红| 日本欧洲一区二区| 日韩电影在线看| 日本在线不卡视频一二三区| 爽爽淫人综合网网站| 调教+趴+乳夹+国产+精品| 亚洲观看高清完整版在线观看| 一区二区三区**美女毛片| 一区二区三区四区亚洲| 樱花影视一区二区| 亚洲一区av在线| 亚洲成av人片在线| 日日夜夜免费精品| 日本特黄久久久高潮| 青青草视频一区| 国产午夜亚洲精品理论片色戒| 久久蜜桃一区二区| 国产精品三级av| 中文字幕免费一区| 亚洲视频在线观看三级| 一区二区三区在线观看视频| 亚洲午夜羞羞片| 天堂久久一区二区三区| 久久精品av麻豆的观看方式| 国产毛片一区二区| a亚洲天堂av| 一本色道**综合亚洲精品蜜桃冫| 91精品1区2区| 欧美肥妇free| 日韩丝袜美女视频| 久久久噜噜噜久久中文字幕色伊伊 | 中文字幕一区二区三中文字幕| 亚洲乱码国产乱码精品精98午夜| 亚洲国产乱码最新视频 | 日本中文字幕不卡| 国产在线精品一区二区不卡了| 国产麻豆午夜三级精品| proumb性欧美在线观看| 欧洲精品视频在线观看| 欧美一区二区视频在线观看2020 | 日韩三级免费观看| 久久久99精品久久| 亚洲精品国产视频| 日本不卡视频一二三区| 国产福利一区在线| 一本久久精品一区二区| 3atv在线一区二区三区| 久久青草国产手机看片福利盒子| 亚洲欧洲性图库| 亚洲电影视频在线| 国产呦萝稀缺另类资源| 色吊一区二区三区| 日韩一级大片在线| 中文字幕制服丝袜成人av| 午夜精品爽啪视频| 国内精品久久久久影院一蜜桃| 不卡视频一二三| 在线不卡免费av| 国产欧美日韩另类一区| 亚洲一区二区视频| 国产一区二区影院| 日本福利一区二区| 欧美成人aa大片| 亚洲女同一区二区| 国内精品伊人久久久久av一坑| 91网站最新地址| 精品国产精品网麻豆系列| 亚洲欧美怡红院| 蜜桃一区二区三区在线观看| 不卡av在线免费观看| 欧美一卡二卡在线| **欧美大码日韩| 久久久久88色偷偷免费| 亚洲福利国产精品| 国产成a人无v码亚洲福利| 欧美日韩亚洲丝袜制服| 国产蜜臀av在线一区二区三区 | 亚洲成人免费在线| 成人午夜看片网址| 日韩一区二区三区三四区视频在线观看| 欧美在线视频全部完| 2021久久国产精品不只是精品| 亚洲一区二区三区四区五区黄 | 色婷婷综合久久久久中文 | 91美女在线看| 久久综合久久久久88| 亚洲第一激情av| 99国产精品视频免费观看| 欧美电视剧免费观看| 亚洲一区影音先锋| 成人亚洲精品久久久久软件| 欧美一区日韩一区| 一二三区精品福利视频| 成人在线综合网| 精品国产免费人成电影在线观看四季 | 白白色 亚洲乱淫| 日韩欧美一级片| 亚洲亚洲精品在线观看| 99亚偷拍自图区亚洲| 国产婷婷色一区二区三区| 美女视频黄久久| 欧美日韩在线亚洲一区蜜芽| 中文字幕一区二区三区在线播放| 国产一区二区女|