11#ifndef SQUID_SRC_ICMP_ICMP_H
12#define SQUID_SRC_ICMP_ICMP_H
16#define PINGER_PAYLOAD_SZ 8192
18#define MAX_PAYLOAD 256
19#define MAX_PKT4_SZ (sizeof(struct icmphdr) + sizeof(struct icmpEchoData) + 1)
20#define MAX_PKT6_SZ (sizeof(struct icmp6_hdr) + sizeof(struct icmpEchoData) + 1)
93 virtual void Recv(
void) =0;
118 void Log(
const Ip::Address &addr,
const uint8_t type,
const char* pkt_str,
const int rtt,
const int hops);
#define PINGER_PAYLOAD_SZ
virtual void Close()
Shutdown pinger helper and control channel.
int CheckSum(unsigned short *ptr, int size)
Calculate a packet checksum.
virtual void SendEcho(Ip::Address &to, int opcode, const char *payload=nullptr, int len=0)=0
virtual void Recv(void)=0
Handle ICMP responses.
virtual int Open()=0
Start pinger helper and initiate control channel.
char payload[MAX_PAYLOAD]
char payload[PINGER_PAYLOAD_SZ]
char payload[PINGER_PAYLOAD_SZ]