friendev EtherDune TCP/IP library
/home/jander/temp/etherdune/ICMPPinger.h
Go to the documentation of this file.
1 // EtherDune ICMP Pinger class
2 // Author: Javier Peletier <jm@friendev.com>
3 // Summary: Implements an ICMP Echo request service
4 //
5 // Copyright (c) 2015 All Rights Reserved, http://friendev.com
6 //
7 // This source is subject to the GPLv2 license.
8 // Please see the License.txt file for more information.
9 // All other rights reserved.
10 //
11 // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
12 // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
13 // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
14 // PARTICULAR PURPOSE.
15 
23 
24 #ifndef _ICMPPINGER_H_
25 #define ICMPPINGER_H_
26 
27 #include "ICMP.h"
28 
29 
30 class ICMPPinger : protected ICMP
31 {
32 
33  bool onICMPMessage();
34 
35 public:
36 
37  void ping(const IPAddress& targetIP);
38 
39  virtual void onPingReply(uint16_t roundtripTime) = 0;
40 };
41 
42 
43 
44 #endif
Implements common ICMP packet building routines and ICMP checksum.
Definition: ICMP.h:31
virtual void onPingReply(uint16_t roundtripTime)=0
represents an IP address in memory
Definition: inet.h:181
void ping(const IPAddress &targetIP)
Send an ICMP Echo request (ping) to the specified target IP address.
Definition: ICMPPinger.cpp:44
Implements an ICMP Echo request service.
Definition: ICMPPinger.h:30