pinger.cc File Reference
#include "squid.h"
#include "debug/Stream.h"
#include "base/Stopwatch.h"
#include "base/TextException.h"
#include "compat/select.h"
#include "compat/socket.h"
#include "Icmp4.h"
#include "Icmp6.h"
#include "IcmpPinger.h"
#include "ip/tools.h"
#include "time/gadgets.h"
Include dependency graph for pinger.cc:

Go to the source code of this file.

Macros

#define SQUID_HELPER   1
 
#define LINK_TO_SQUID   1
 

Functions

static std::ostream & TerminationReason (std::ostream &os)
 reports std::terminate() cause (e.g., an uncaught or prohibited exception) More...
 
static void OnTerminate ()
 
int main (int, char **)
 

Variables

static const auto PingerTimeout = 10s
 
IcmpPinger control
 pinger helper contains one of these as a global object. More...
 
Icmp4 icmp4
 pinger helper contains one of these as a global object. More...
 
Icmp6 icmp6
 pinger helper contains one of these as a global object. More...
 
int icmp_pkts_sent = 0
 

Macro Definition Documentation

◆ LINK_TO_SQUID

#define LINK_TO_SQUID   1

Definition at line 85 of file pinger.cc.

◆ SQUID_HELPER

#define SQUID_HELPER   1

Definition at line 11 of file pinger.cc.

Function Documentation

◆ OnTerminate()

static void OnTerminate ( )
static

Definition at line 111 of file pinger.cc.

References IcmpPinger::Close(), control, DBG_CRITICAL, debugs, Debug::PrepareToDie(), and TerminationReason().

Referenced by main().

◆ TerminationReason()

static std::ostream& TerminationReason ( std::ostream &  os)
static

Definition at line 101 of file pinger.cc.

References CurrentException().

Referenced by OnTerminate().

Variable Documentation

◆ control

IcmpPinger control

Definition at line 93 of file pinger.cc.

Referenced by main(), OnTerminate(), Icmp6::Recv(), Icmp4::Recv(), and TestSBuf::testAppendStdString().

◆ icmp4

Icmp4 icmp4

Definition at line 94 of file pinger.cc.

Referenced by IcmpPinger::Close(), main(), and IcmpPinger::Recv().

◆ icmp6

Icmp6 icmp6

Definition at line 95 of file pinger.cc.

Referenced by IcmpPinger::Close(), main(), and IcmpPinger::Recv().

◆ icmp_pkts_sent

int icmp_pkts_sent = 0

Definition at line 97 of file pinger.cc.

Referenced by Icmp6::SendEcho(), and Icmp4::SendEcho().

◆ PingerTimeout

const auto PingerTimeout = 10s
static

Definition at line 90 of file pinger.cc.

Referenced by main().

 

Introduction

Documentation

Support

Miscellaneous