VirtualBox

儲存庫 vbox 的更動 15194


忽略:
時間撮記:
2008-12-9 下午05:05:42 (16 年 以前)
作者:
vboxsync
訊息:

Slirp:ICMP: Proper shutdowning of ICMP raw socket on Unix and ICMP file handle on Windows

位置:
trunk/src/VBox/Devices/Network/slirp
檔案:
修改 3 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Network/slirp/ip_icmp.c

    r15190 r15194  
    9292        pData->pfIcmpParseReplies = (long (WINAPI *)(void *, long))
    9393                                    GetProcAddress(pData->hmIcmpLibrary, "IcmpParseReplies");
     94        pData->pfIcmpCloseHandle = (BOOL (WINAPI *)(HANDLE))
     95                                    GetProcAddress(pData->hmIcmpLibrary, "IcmpCloseHandle");
    9496    }
    9597    if (pData->pfIcmpParseReplies == NULL)
     
    104106        pData->pfIcmpParseReplies = (long (WINAPI *)(void *, long))
    105107                                    GetProcAddress(pData->hmIcmpLibrary, "IcmpParseReplies");
     108        pData->pfIcmpCloseHandle = (BOOL (WINAPI *)(HANDLE))
     109                                    GetProcAddress(pData->hmIcmpLibrary, "IcmpCloseHandle");
    106110    }
    107111    if (pData->pfIcmpParseReplies == NULL)
     
    111115        return 1;
    112116    }
     117    if (pData->pfIcmpCloseHandle == NULL)
     118    {
     119        LogRel(("NAT: Can't find IcmpCloseHandle symbol\n"));
     120        FreeLibrary(pData->hmIcmpLibrary);
     121        return 1;
     122    }
    113123    pData->icmp_socket.sh = IcmpCreateFile();
    114124    pData->phEvents[VBOX_ICMP_EVENT_INDEX] = CreateEvent(NULL, FALSE, FALSE, NULL);
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r15095 r15194  
    369369    LogRel(("NAT: cpvHashUsed=%RU32 cpvHashCollisions=%RU32 cpvHashInserts=%RU64 cpvHashDone=%RU64\n",
    370370            pData->cpvHashUsed, pData->cpvHashCollisions, pData->cpvHashInserts, pData->cpvHashDone));
     371#endif
     372
     373#ifdef VBOX_WITH_SLIRP_ICMP
     374# ifdef RT_OS_WINDOWS
     375    pData->pfIcmpCloseHandle(pData->icmp_socket.sh);
     376# else
     377    closesocket(pData->icmp_socket.s);
     378# endif
    371379#endif
    372380
  • trunk/src/VBox/Devices/Network/slirp/slirp_state.h

    r15112 r15194  
    144144     */
    145145    long (WINAPI * pfIcmpParseReplies)(void *, long);
     146    BOOL (WINAPI * pfIcmpCloseHandle)(HANDLE);
    146147    HMODULE hmIcmpLibrary;
    147148#endif
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette