ReactOS 0.4.16-dev-122-g325d74c
|
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>
#include <icmpapi.h>
#include <conutils.h>
#include "resource.h"
#include <debug.h>
Go to the source code of this file.
Macros | |
#define | WIN32_LEAN_AND_MEAN |
#define | WIN32_NO_STATUS |
#define | NDEBUG |
#define | SIZEOF_ICMP_ERROR 8 |
#define | SIZEOF_IO_STATUS_BLOCK 8 |
#define | DEFAULT_TIMEOUT 1000 |
#define | MAX_SEND_SIZE 65500 |
Functions | |
static BOOL | ParseCmdLine (int argc, PWSTR argv[]) |
static BOOL | ResolveTarget (PCWSTR target) |
static void | Ping (void) |
static void | PrintStats (void) |
static BOOL WINAPI | ConsoleCtrlHandler (DWORD ControlType) |
int | wmain (int argc, WCHAR *argv[]) |
Variables | |
static HANDLE | hIcmpFile = INVALID_HANDLE_VALUE |
static ULONG | Timeout = 4000 |
static int | Family = AF_UNSPEC |
static ULONG | RequestSize = 32 |
static ULONG | PingCount = 4 |
static BOOL | PingForever = FALSE |
static PADDRINFOW | Target = NULL |
static PCWSTR | TargetName = NULL |
static WCHAR | Address [46] |
static WCHAR | CanonName [NI_MAXHOST] |
static BOOL | ResolveAddress = FALSE |
static ULONG | RTTMax = 0 |
static ULONG | RTTMin = 0 |
static ULONG | RTTTotal = 0 |
static ULONG | EchosSent = 0 |
static ULONG | EchosReceived = 0 |
static ULONG | EchosSuccessful = 0 |
static IP_OPTION_INFORMATION | IpOptions |
Definition at line 675 of file ping.c.
Referenced by wmain().
Definition at line 168 of file ping.c.
Referenced by wmain().
Definition at line 419 of file ping.c.
Referenced by RunTraceRoute(), and wmain().
Definition at line 658 of file ping.c.
Referenced by ConsoleCtrlHandler(), and wmain().
Definition at line 377 of file ping.c.
Definition at line 82 of file ping.c.
|
static |
Definition at line 68 of file ping.c.
Referenced by __invlpg(), _IRQL_requires_max_(), _MiAddressToPde(), _MiAddressToPte(), _Struct_size_bytes_(), _Success_(), _When_(), A2S(), acpi_create_volatile_registry_tables(), AcpiCheckAddressRange(), AcpiEvAddressSpaceDispatch(), AcpiEvCreateGpeBlock(), AcpiEvInstallGpeHandler(), AcpiExDataTableSpaceHandler(), AcpiExPciConfigSpaceHandler(), AcpiExSystemIoSpaceHandler(), AcpiExSystemMemorySpaceHandler(), AcpiHwGetAccessBitWidth(), AcpiHwRead(), AcpiHwReadPort(), AcpiHwValidateIoRequest(), AcpiHwValidateRegister(), AcpiHwWrite(), AcpiHwWritePort(), AcpiInstallGpeHandler(), AcpiInstallGpeRawHandler(), AcpiInstallPhysicalTable(), AcpiInstallSciHandler(), AcpiOsMapMemory(), AcpiOsReadMemory(), AcpiOsReadPort(), AcpiOsWriteMemory(), AcpiOsWritePort(), AcpiRemoveGpeHandler(), AcpiRemoveSciHandler(), AcpiTbAcquireTempTable(), AcpiTbInitGenericAddress(), AcpiTbInitTableDescriptor(), AcpiTbInstallAndLoadTable(), AcpiTbInstallStandardTable(), AcpiTbOverrideTable(), AcpiTbParseRootTable(), AcpiTbPrintTableHeader(), AcpiUtAddAddressRange(), AcpiUtCheckAddressRange(), addIPAddress(), AddIPAddress(), AddrBuildAddress(), AddrGetAddress(), AddrIsUnspecified(), AddrSearchFirst(), AfdBind(), AfdConnect(), AfdPacketSocketWriteData(), AfdSendTo(), AlignUp(), ARPTransmit(), AttachToConsoleInternal(), BlMmAllocatePhysicalPages(), BlMmFreePhysicalPages(), CdProcessToc(), CdTocSerial(), CheckForCurrentHostname(), co_IntSetWindowLongPtr(), ComPortTest1(), ComPortTest2(), ConvertStabs(), CopyPacketToBuffer(), CpDoesPortExist(), CpEnableFifo(), CpInitialize(), CpuExceptionFilter(), CreateUmaDescriptor(), CsrProbeForRead(), CsrProbeForWrite(), DcCopyPacket(), DcTransmitPacket(), DECLARE_INTERFACE_(), DhcpStaticRefreshParams(), DispTdiQueryInformation(), Dns_Free(), Dns_Ip4AddressToReverseName_W(), Dns_Ip4ReverseNameToAddress_W(), Dns_Ip4StringToAddress_A(), Dns_Ip4StringToAddress_W(), Dns_Ip6StringToAddress_A(), Dns_Ip6StringToAddress_W(), Dns_StringToAddressEx(), Dns_StringToAddressW(), DnsAddr_BuildFromAtm(), DnsAddr_BuildFromIp4(), DnsAddr_BuildFromIp6(), DnsAddrArray_AddIp4(), DosBootsectorInitialize(), DosLoadDriver(), DosLoadExecutable(), doSymSearch(), DxDdCreateD3DBuffer(), E1000ReadEeprom(), E1000ReadUlong(), E1000WriteIoUlong(), E1000WriteUlong(), EmsReadMemory(), EmsWriteMemory(), EmulatorReadIo(), EmulatorReadMemory(), EmulatorWriteIo(), EmulatorWriteMemory(), EngSecureMem(), EngSecureMemForRead(), EthernetAddressType(), Ext2ReadDisk(), Ext2WriteDisk(), Fast486FpuLoadEnvironment(), Fast486FpuSaveEnvironment(), Fast486MemReadCallback(), Fast486MemWriteCallback(), FatMapUserBuffer(), FileOpenAddress(), find_and_print_offset(), find_offset(), FindEntry(), FindOnLinkInterface(), FsRtlAllocatePool(), FsRtlAllocatePoolWithQuota(), FsRtlAllocatePoolWithQuotaTag(), FsRtlAllocatePoolWithTag(), FxpIsAddressKnownToWdf(), GetInterfaceIPv4Address(), GetNameInfoW(), HackSecureVirtualMemory(), HalpAssignPCISlotResources(), HalpGetCmosData(), HalpIsValidPCIDevice(), HalpScatterGatherAdapterControl(), HalpSetCmosData(), HasPrefix(), HidClass_ReadCompleteIrp(), HvGetCellSize(), I2CRepStart(), I2CStart(), InbvPortEnableFifo(), InbvPortInitialize(), InfoTdiSetArptableMIB(), InfoTdiSetRoute(), InitRomRange(), intDdCreateSurfaceOrBuffer(), IntGetSetClassLongPtr(), IoMapTransfer(), IPv4NToHl(), IsAligned(), IsLocalSymbol(), KdbpCmdBackTrace(), KdbpCmdBreakPoint(), KdbpCmdBreakPointList(), KdbpCmdDisassembleX(), KdbpCmdMod(), KdbpDisassemble(), KdbpGetBreakPointInfo(), KdbpGetInstLength(), KdbpInsertBreakPoint(), KdbpIsBreakPointOurs(), KdbpOverwriteInstruction(), KdbpSymFindModule(), KdbpSymSearchModuleList(), KdbSymPrintAddress(), KdpAddBreakpoint(), KdpCopyMemoryChunks(), KdpDeleteBreakpointRange(), KdpLowRestoreBreakpoint(), KdpLowWriteContent(), KdSetOwedBreakpoints(), KeArmInvalidateTlbEntry(), KeInvalidateTlbEntry(), KeRegisterInterruptHandler(), KeZeroPages(), KiDataAbortHandler(), KiDispatchException0Args(), KiDispatchException1Args(), KiDispatchException2Args(), KiDispatchExceptionFromTrapFrame(), KiMarkPageAsReadOnly(), KiPrefetchAbortHandler(), LanAdapterInfo(), LdrFindEntryForAddress(), LdrpGetShimEngineFunction(), LdrProcessRelocationBlock(), LdrProcessRelocationBlockLongLong(), LdrRelocateImageWithBias(), Local_Ip4AddresstoString(), Local_Ip6AddresstoString(), MemInstallFastMemoryHook(), MemRemoveFastMemoryHook(), MergeStabsAndCoffs(), MGetVdmPointer(), MI_IS_PHYSICAL_ADDRESS(), MiAddressToPdi(), MiAddressToPpe(), MiAddressToPti(), MiAddressToPxe(), MiAddressToPxi(), MiBuildPfnDatabaseFromPageTables(), MiCheckForUserStackOverflow(), MiCompleteProtoPteFault(), MiDecrementPageTableReferences(), MiDispatchFault(), MiEthernetCrc(), MiFlushTlb(), MiFlushTlbIpiRoutine(), MiGetPageEntryForProcess(), MiGetPageTableForProcess(), MiIncrementPageTableReferences(), MiInsertInWorkingSetList(), MiIsPageTablePresent(), MiIsPdeForAddressValid(), MiIsUserPde(), MiIsUserPte(), MiLookupDataTableEntry(), MiQueryMemoryBasicInformation(), MiRemoveFromWorkingSetList(), MiResolveDemandZeroFault(), MiResolveProtoPteFault(), MiSnapThunk(), MiUnmapPageInHyperSpace(), MmAccessFault(), MmAccessFaultSectionView(), MmAlterViewAttributes(), MmArePagesResident(), MmArmAccessFault(), MmCreatePageFileMapping(), MmCreatePhysicalMapping(), MmCreateVirtualMapping(), MmCreateVirtualMappingInternal(), MmCreateVirtualMappingUnsafe(), MmCreateVirtualMappingUnsafeEx(), MmDbgCopyMemory(), MmDeletePageFileMapping(), MmDeleteRmap(), MmDeleteVirtualMapping(), MmFindRegion(), MmFreeCacheSectionPage(), MmFreeMemoryArea(), MmFreePageTable(), MmFreeSectionPage(), MmGetFileNameForAddress(), MmGetPageEntryForProcess(), MmGetPageEntryForProcessForPAE(), MmGetPageFileMapping(), MmGetPageNumberFromAddress(), MmGetPageProtect(), MmGetPageTableForProcess(), MmGetPageTableForProcessForPAE(), MmGetPfnForProcess(), MmGetPhysicalAddress(), MmInsertRmap(), MmIsDirtyPage(), MmIsDisabledPage(), MmIsPagePresent(), MmIsPageSwapEntry(), MmIsSessionAddress(), MmMakePagesDirty(), MmNotPresentFault(), MmNotPresentFaultSectionView(), MmpAccessFault(), MmPageOutCacheSection(), MmPageOutPhysicalAddress(), MmPapFreePages(), MmPapFreePhysicalPages(), MmPaReleaseSelfMapPages(), MmpPageOutPhysicalAddress(), MmProbeAndLockPages(), MmQuerySectionView(), MmSecureVirtualMemory(), MmSetCleanPage(), MmSetDirtyBit(), MmSetDirtyPage(), MmSetPageProtect(), MmTrimUserMemory(), ModPow2(), NBAddNeighbor(), NBFindOrCreateNeighbor(), NBLocateNeighbor(), NBResetNeighborTimeout(), NewAddrInfo(), NICTestAddress(), NtSetInformationThread(), NvNetApplyPacketFilter(), NvNetCopyPacket(), NvNetQueryTcpIpHeaders(), NvNetTransmitPacket32(), NvNetTransmitPacket64(), Ping(), PrintHopInfo(), PrintStats(), ProbeForRead(), ProbeForWrite(), Query_Main(), ReadByte(), ReadDoubleWord(), ReadfromSMBus(), ReadPage(), ReadWord(), RemoveFromWsList(), rsym_parse(), RtlIpv4AddressToStringExA(), RtlIpv4AddressToStringExW(), RtlIpv4StringToAddressExA(), RtlIpv4StringToAddressExW(), RtlIpv6AddressToStringExA(), RtlIpv6AddressToStringExW(), RtlIpv6StringToAddressExA(), RtlIpv6StringToAddressExW(), RtlpFindAndCommitPages(), RtlpInsertUnCommittedPages(), ScsiPortConvertPhysicalAddressToUlong(), ScsiPortConvertUlongToPhysicalAddress(), Sim32pGetVDMPointer(), SMBusWriteByte(), SRomReadSRom(), START_TEST(), StorPortConvertPhysicalAddressToUlong(), StorPortConvertUlongToPhysicalAddress(), StuffStdHandle(), SymFromAddr(), SymFromAddrW(), SymGetSymFromAddr(), SymGetSymFromAddr64(), SymSearch(), SymSearchW(), TCPGetSockAddress(), TdiBuildConnectionInfo(), TdiBuildConnectionInfoInPlace(), TdiOpenAddressFile(), TdiOpenTransport(), TdiQueryAddress(), TdiReceiveDatagram(), TdiReceiveThread(), TdiSendDatagram(), TestBind(), TiCreateFileObject(), TokenRingAddressType(), UmaDescReallocate(), UmaDescRelease(), UmaDescReserve(), UmaMgrInitialize(), UnlockBuffers(), USBSTOR_HandleDeviceControl(), FxCmResList::ValidateAndClearMapping(), FxCmResList::ValidatePortAddressRange(), FxCmResList::ValidateRegisterSystemBaseAddress(), VDDAllocMem(), VDDDeInstallMemoryHook(), VDDFreeMem(), VDDInstallMemoryHook(), VgaReadMemory(), VgaTranslateAddress(), VgaUpdateFramebuffer(), VgaWriteMemory(), ViComputeAddress(), VidBiosVideoService(), ViFillInTrackData(), WDF_DMA_SYSTEM_PROFILE_CONFIG_INIT(), WinLdrEnableFifo(), WinLdrPortInitialize(), wmain(), Write(), WriteAddress(), WriteByte(), WriteDoubleWord(), WritePage(), WriteToSMBus(), WriteWord(), WSAAsyncGetHostByAddr(), WSNoteSuccessfulHostentLookup(), x86BiosReadMemory(), x86BiosWriteMemory(), x86MemRead(), x86MemWrite(), XmsBopProcedure(), and XmsLock().
|
static |
Definition at line 69 of file ping.c.
Referenced by ResolveTarget(), ScmConvertToBootPathName(), and wmain().
|
static |
Definition at line 76 of file ping.c.
Referenced by Ping(), and PrintStats().
|
static |
Definition at line 75 of file ping.c.
Referenced by Ping(), and PrintStats().
|
static |
Definition at line 77 of file ping.c.
Referenced by Ping(), and PrintStats().
Definition at line 62 of file ping.c.
Referenced by GetExtendedTcpTableWithAlloc(), GetExtendedUdpTableWithAlloc(), HaliMPFamily(), inet_ntop(), ParseCmdLine(), Ping(), ResolveTarget(), TCPSocket(), test_fullname2_helper(), wmain(), WrapEnumFontFamiliesA(), WrapEnumFontFamiliesExA(), WrapEnumFontFamiliesExW(), WrapEnumFontFamiliesW(), and WsNcMatchProtocols().
|
static |
|
static |
Definition at line 79 of file ping.c.
Referenced by ParseCmdLine(), Ping(), and wmain().
|
static |
Definition at line 64 of file ping.c.
Referenced by ParseCmdLine(), and wmain().
Definition at line 65 of file ping.c.
Referenced by ParseCmdLine(), and wmain().
|
static |
Definition at line 63 of file ping.c.
Referenced by DispEchoRequest(), Icmp6SendEcho2(), IcmpSendEcho(), IcmpSendEcho2(), ParseCmdLine(), Ping(), SendRequest(), UmaDescReallocate(), UmaDescReserve(), and wmain().
Definition at line 70 of file ping.c.
Referenced by ParseCmdLine(), and ResolveTarget().
|
static |
Definition at line 72 of file ping.c.
Referenced by Ping(), and PrintStats().
|
static |
Definition at line 73 of file ping.c.
Referenced by Ping(), and PrintStats().
|
static |
Definition at line 74 of file ping.c.
Referenced by Ping(), and PrintStats().
|
static |
Definition at line 67 of file ping.c.
Referenced by _tmain(), AcpiNsSearchAndEnter(), AcpiNsSearchOneScope(), AcpiNsSearchParentTree(), CreateJunction(), CredDeleteA(), CredDeleteW(), CredReadA(), CredReadW(), ExpCreateSystemRootLink(), FsRtlNotifyFilterReportChange(), FsRtlNotifyUpdateBuffer(), GetVolumePathNamesForVolumeNameW(), IopReassignSystemRoot(), ListDirectory(), LsaSpInitLsaModeContext(), nfs41_GetReparsePoint(), nfs41_SetReparsePoint(), ObpCreateDosDevicesDirectory(), ParseCmdLine(), QueryCygwinSymlink(), SeGetLogonIdDeviceMap(), SymlinkCreateTests(), test_domain_password(), test_generic(), and wmain().
|
static |
Definition at line 61 of file ping.c.
Referenced by __drv_when(), FxCREvent::_Acquires_lock_(), _IRQL_requires_max_(), AcpiAcquireGlobalLock(), AcpiAcquireMutex(), AcpiEvAcquireGlobalLock(), AcpiExAcquireMutexObject(), AcpiExSystemWaitMutex(), AcpiExSystemWaitSemaphore(), AcpiOsAcquireMutex(), AcpiOsWaitSemaphore(), BaseFormatTimeOut(), BatteryClassIoctl(), BmpGetSelectedBootEntry(), CmpArmDelayedCloseTimer(), CmpDelayDerefKeyControlBlock(), co_MsqSendMessage(), ConSrvConsoleCtrlEventTimeout(), CsrCaptureTimeout(), ddraw7_EvaluateMode(), DeviceInstallThread(), DoRebootCommand(), DoStopService(), EnableUserModePnpManager(), FxCREvent::EnterCRAndWaitAndLeave(), ExpWaitForResource(), ExpWorkerThreadBalanceManager(), ExpWorkerThreadEntryPoint(), Ext2bhReaperThread(), Ext2FcbReaperThread(), Ext2McbReaperThread(), Ext2Sleep(), ExTimedWaitForUnblockPushLock(), FlushConsoleInputBuffer(), GetMailslotInfo(), GetNtTimeout(), HDA_SendVerbs(), i8042MouDpcRoutine(), Icmp6SendEcho2(), IcmpSendEcho(), IcmpSendEcho2(), implicit_handle(), InstallScreenSaverW(), InternalWake(), IopRestartLogWorker(), KeRemoveQueue(), KeWaitForMultipleObjects(), KeWaitForSingleObject(), KmtEnsureServiceState(), KmtUserModeCallback(), LdrpInit(), LoadScreenSaverParameters(), LpcpDeletePort(), main(), MiInitBalancerThread(), MsfsRead(), NdisIPnPStartDevice(), NdisMSetPeriodicTimer(), NdisMSetTimer(), NdisSetTimer(), NdisWaitEvent(), NotifyTopLevelWindow(), NpCreateFcb(), NpWaitPipe(), NtRemoveIoCompletion(), NtReplyWaitReceivePortEx(), NtUserWaitForInputIdle(), NtWaitForDebugEvent(), ParseCmdLine(), PeekConsoleInput(), Phase1InitializationDiscard(), Ping(), ProgressCountdown(), PS2ControllerWait(), RasSecurityDialogReceive(), ReadMidiUartByte(), RpcCancelThreadEx(), RpcMgmtSetCancelTimeout(), RpcMgmtSetComTimeout(), RtlpInitializeThreadPool(), RtlpIoWorkerThreadProc(), RtlpStartWorkerThread(), RtlpWorkerThreadProc(), RWDetermineMediaType(), SbDsp4SetInputRate(), SbDsp4SetOutputRate(), SbDsp4WriteRate(), SbDspDisableSpeaker(), SbDspEnableSpeaker(), SbDspGetVersion(), SbDspIsSpeakerEnabled(), SbDspRead(), SbDspReset(), SbDspWaitToRead(), SbDspWaitToWrite(), SbDspWrite(), ScreenSaverThreadMain(), SetMailslotInfo(), SetRecoveryTimeout(), SetTimeout(), SleepConditionVariableCS(), SleepConditionVariableSRW(), SmpApiLoop(), SmpLoadSubSystem(), SmpLoadSubSystemsForMuSession(), StartThread(), FxRequestBase::StartTimer(), TCPDisconnect(), TcpipWaitForSingleObject(), TdiSendThread(), TestCreateNamedPipe(), TestFastMutexConcurrent(), TestGuardedMutexConcurrent(), TestResourceWithThreads(), USBH_SyncResetPort(), UserpMessageBox(), UserServerHardError(), VideoPortWaitForSingleObject(), MxEvent::WaitFor(), WaitForBusy(), WaitForControllerInterrupt(), WaitForDebugEvent(), WaitForFlags(), WaitForFlagsOr(), WaitForKeyboard(), WaitForMidiUartStatus(), WaitForRemoteDatabaseSemaphore(), WaitForWork(), WaitNoPendingInstallEvents(), WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT(), WdfWaitLockAcquire(), WlxSetTimeout(), WorkerThread(), WriteMidiUartByte(), WriteMidiUartMulti(), WSPAccept(), WSPSelect(), WTSSendMessageA(), and WTSSendMessageW().