Main Page | Class List | File List | Class Members | File Members

main.cpp File Reference

#include <winsock2.h>
#include <iostream>
#include <iomanip>
#include "icmp.h"
#include "PingTarget.h"
#include "format_system_message.h"
#include "format_system_time.h"
#include "PerformanceCounter.h"
#include "VersionInfo.h"
#include "console.h"
#include "ProgramOptions.h"
#include "format_paragraph.h"

Include dependency graph for main.cpp:

Go to the source code of this file.

Defines

#define MAIN_OK   0
#define MAIN_OPTION_ERROR   1
#define MAIN_NETWORK_ERROR   2
#define MAIN_TARGET_UNRESOLVED   3
#define MAIN_LOG_FILE_ERROR   4

Functions

int main (int argc, char *argv[])

Variables

const char * pszLicense
const char * pszHelpIntro
const char * pszShortHelpIntro
const char * pszMainReturnValues
PingTargets pingtargets
ProgramOptions pingoptions


Define Documentation

#define MAIN_LOG_FILE_ERROR   4
 

Definition at line 49 of file main.cpp.

Referenced by main().

#define MAIN_NETWORK_ERROR   2
 

Definition at line 47 of file main.cpp.

Referenced by main().

#define MAIN_OK   0
 

Definition at line 45 of file main.cpp.

Referenced by main().

#define MAIN_OPTION_ERROR   1
 

Definition at line 46 of file main.cpp.

Referenced by main().

#define MAIN_TARGET_UNRESOLVED   3
 

Definition at line 48 of file main.cpp.

Referenced by main().


Function Documentation

int main int  argc,
char *  argv[]
 

Definition at line 54 of file main.cpp.

References ProgramOptions::AddBoolean(), ProgramOptions::AddLong(), PingTargets::AddResponse(), ProgramOptions::AddString(), PingTargets::AddTarget(), PingTargets::AddTargets(), PingTargets::AddUnreachableResponses(), PingTargets::begin(), PingTargets::ClearResponseFlags(), ClearStdOutBuffer(), ClearStdOutLine(), DecodePacket(), EncodePacket(), PingTargets::end(), PerformanceCounter::GetAsMilliseconds(), PerformanceCounter::GetAsSecondsAndMicroseconds(), ProgramOptions::GetBoolValue(), PingTarget::GetInetAddr(), ProgramOptions::GetLongValue(), PingTargets::GetMaxSequence(), GetProductInfo(), PingTargets::GetSequence(), GetStdOutWidth(), ProgramOptions::GetStringValue(), PingTargets::GetTargetId(), PerformanceCounter::Init(), PingTargets::LOG_FILENAME_DAILY, PingTargets::LOG_FILENAME_HOURLY, PingTargets::LOG_FILENAME_PLAIN, MAIN_LOG_FILE_ERROR, MAIN_NETWORK_ERROR, MAIN_OK, MAIN_OPTION_ERROR, MAIN_TARGET_UNRESOLVED, PingTarget::MakeSequence(), ProgramOptions::parameter_begin(), ProgramOptions::parameter_end(), ProgramOptions::Parse(), ProgramOptions::PrintHelp(), PingTargets::PrintLogCurrent(), PingTargets::PrintStatistics(), PingTargets::PrintStatisticsHeader(), pszHelpIntro, pszLicense, pszMainReturnValues, pszShortHelpIntro, SetStdOutCoord(), format_performance_counter::show_seconds, format_system_time::show_seconds, and PingTargets::size().

Here is the call graph for this function:


Variable Documentation

ProgramOptions pingoptions
 

Definition at line 52 of file main.cpp.

PingTargets pingtargets
 

Definition at line 51 of file main.cpp.

const char* pszHelpIntro
 

Initial value:

 
  "Usage: pingem [options] target(s)\n\n"
  "pingem pings each target, waits for responses and then pauses.\n"
  "Statistics are shown for each cycle of send and receive.\n\n"
  "Available options:"

Definition at line 27 of file main.cpp.

Referenced by main().

const char* pszLicense
 

Initial value:

  "\"Ping' em\" copyright Erik Frankenfeld - http://www.frankenfeld.dk/pingem\n"
  "\n"
  "This program and the source code is free software. "
  "You may use, modify and redistribute it at your own risk."

Definition at line 21 of file main.cpp.

Referenced by main().

const char* pszMainReturnValues
 

Initial value:

  "Program exit codes\n\n"
  "  0 : No errors occurred.\n"
  "  1 : Error in options or parameters.\n"
  "  2 : Runtime error occurred in network initialization or usage.\n"
  "  3 : One or more target names could not be resolved.\n"
  "  4 : Error occurred while creating or writing to the log file."

Definition at line 37 of file main.cpp.

Referenced by main().

const char* pszShortHelpIntro
 

Initial value:

 
  "Usage: pingem [options] target(s)\n\n"
  "pingem -h shows available options and pingem -license displays the license."

Definition at line 33 of file main.cpp.

Referenced by main().


Generated on Sun Jun 26 13:43:54 2005 for pingem by  doxygen 1.4.3