Squid Web Cache master
Loading...
Searching...
No Matches
IcmpPinger.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9/* DEBUG: section 37 ICMP Routines */
10
11#ifndef SQUID_SRC_ICMP_ICMPPINGER_H
12#define SQUID_SRC_ICMP_ICMPPINGER_H
13#include "Icmp.h"
14
18class IcmpPinger : public Icmp
19{
20public:
21 IcmpPinger();
22 ~IcmpPinger() override;
23
25 int Open() override;
26
28 void Close() override;
29
30#if USE_ICMP
31
33 void SendResult(pingerReplyData &preply, int len);
34
36 void Recv(void) override;
37
38private:
39 // unused in IcmpPinger
40 void SendEcho(Ip::Address &, int, const char *, int) override {}
41
48#endif /* USE_ICMP */
49};
50
51#if USE_ICMP
52
54extern IcmpPinger control;
55
56#endif
57
58#endif /* SQUID_SRC_ICMP_ICMPPINGER_H */
59
IcmpPinger control
pinger helper contains one of these as a global object.
Definition pinger.cc:93
~IcmpPinger() override
Definition IcmpPinger.cc:33
void SendResult(pingerReplyData &preply, int len)
Send ICMP results back to squid.
void SendEcho(Ip::Address &, int, const char *, int) override
Definition IcmpPinger.h:40
void Recv(void) override
Handle ICMP requests from squid, passing to helpers.
int socket_to_squid
Definition IcmpPinger.h:47
void Close() override
Shutdown pinger helper and control channel.
int socket_from_squid
Definition IcmpPinger.h:46
int Open() override
Start and initiate control channel to squid.
Definition IcmpPinger.cc:48
Definition Icmp.h:68