|
Squid Web Cache master
|
Public Member Functions | |
| IcmpStub () | |
| ~IcmpStub () override | |
| int | Open () override |
| Start pinger helper and initiate control channel. | |
| void | Close () override |
| Shutdown pinger helper and control channel. | |
| void | SendEcho (Ip::Address &, int, const char *, int) override |
| Construct ECHO request. | |
| void | Recv (void) override |
| Handle ICMP responses. | |
| int | testChecksum (unsigned short *ptr, int size) |
| int | testHops (int ttl) |
Protected Member Functions | |
| int | CheckSum (unsigned short *ptr, int size) |
| Calculate a packet checksum. | |
| int | ipHops (int ttl) |
| void | Log (const Ip::Address &addr, const uint8_t type, const char *pkt_str, const int rtt, const int hops) |
| Log the packet. | |
Protected Attributes | |
| int | icmp_sock |
| int | icmp_ident |
Definition at line 21 of file testIcmp.cc.
|
inline |
Definition at line 24 of file testIcmp.cc.
|
inlineoverride |
Definition at line 25 of file testIcmp.cc.
Definition at line 39 of file Icmp.cc.
References size.
Referenced by Icmp4::SendEcho(), Icmp6::SendEcho(), and testChecksum().
|
inlineoverridevirtual |
Reimplemented from Icmp.
Definition at line 27 of file testIcmp.cc.
Translate TTL to a hop distance
| ttl | negative : n > 33 |
| ttl | n(0...32) : 32 >= n >= 1 |
| ttl | n(33...62) : 32 >= n >= 1 |
| ttl | n(63...64) : 2 >= n >= 1 |
| ttl | n(65...128) : 64 >= n >= 1 |
| ttl | n(129...192) : 64 >= n >= 1 |
| ttl | n(193...) : n < 255 |
XXX: BUG? ttl<0 can produce high hop values XXX: BUG? ttl>255 can produce zero or negative hop values
Definition at line 68 of file Icmp.cc.
Referenced by Icmp4::Recv(), and testHops().
|
protectedinherited |
Definition at line 89 of file Icmp.cc.
References current_time, and debugs.
|
inlineoverridevirtual |
Implements Icmp.
Definition at line 26 of file testIcmp.cc.
|
inlineoverridevirtual |
Implements Icmp.
Definition at line 33 of file testIcmp.cc.
|
inlineoverridevirtual |
Implements Icmp.
Definition at line 30 of file testIcmp.cc.
Definition at line 36 of file testIcmp.cc.
References Icmp::CheckSum(), and size.
Referenced by TestIcmp::testChecksum().
Definition at line 37 of file testIcmp.cc.
References Icmp::ipHops().
Referenced by TestIcmp::testHops().
|
protectedinherited |
Definition at line 122 of file Icmp.h.
Referenced by Icmp::Icmp(), Icmp::Close(), Icmp4::Open(), Icmp6::Open(), Icmp4::Recv(), Icmp6::Recv(), Icmp4::SendEcho(), and Icmp6::SendEcho().
|
protectedinherited |
Definition at line 121 of file Icmp.h.
Referenced by Icmp::Icmp(), Icmp::Close(), IcmpPinger::Close(), IcmpSquid::Close(), Icmp4::Open(), Icmp6::Open(), IcmpPinger::Open(), IcmpSquid::Open(), Icmp4::Recv(), Icmp6::Recv(), IcmpSquid::Recv(), Icmp4::SendEcho(), Icmp6::SendEcho(), and IcmpSquid::SendEcho().