]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/icmp/Icmp.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / icmp / Icmp.h
index d5fa09ae7261182f79d707a4ceec11c66e7ef7be..c95eb24c66a8ff8cdd391f8d19e206925131320d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: ICMP.h,v 1.1 2007/12/14 23:11:45 amosjeffries Exp $
- *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels, Amos Jeffries
  *
 #ifndef _INCLUDE_ICMP_H
 #define _INCLUDE_ICMP_H
 
-#include "config.h"
-#include "IPAddress.h"
+#include "ip/Address.h"
 
 #define PINGER_PAYLOAD_SZ      8192
 
 #define MAX_PAYLOAD 256 // WAS: SQUIDHOSTNAMELEN
 #define MAX_PKT4_SZ (MAX_PAYLOAD + sizeof(struct timeval) + sizeof (char) + sizeof(struct icmphdr) + 1)
-#if USE_IPV6
 #define MAX_PKT6_SZ (MAX_PAYLOAD + sizeof(struct timeval) + sizeof (char) + sizeof(struct icmp6_hdr) + 1)
-#endif
 
 #if USE_ICMP
 
 /* This is a line-data format struct. DO NOT alter. */
 struct pingerEchoData {
-    IPAddress to;
+    Ip::Address to;
     unsigned char opcode;
     int psize;
     char payload[PINGER_PAYLOAD_SZ];
@@ -57,7 +52,7 @@ struct pingerEchoData {
 
 /* This is a line-data format struct. DO NOT alter. */
 struct pingerReplyData {
-    IPAddress from;
+    Ip::Address from;
     unsigned char opcode;
     int rtt;
     int hops;
@@ -75,7 +70,6 @@ SQUIDCEXTERN int icmp_pkts_sent;
 
 #endif /* USE_ICMP */
 
-
 /**
  * Implements the squid interface to access ICMP operations
  *
@@ -111,7 +105,7 @@ public:
      *                Content longer than MAX_PAYLOAD will be truncated.
      \param len       Length of the payload in bytes if any is to be sent or 0.
      */
-    virtual void SendEcho(IPAddress &to, int opcode, const char *payload=NULL, int len=0) =0;
+    virtual void SendEcho(Ip::Address &to, int opcode, const char *payload=NULL, int len=0) =0;
 
     /// Handle ICMP responses.
     virtual void Recv(void) =0;
@@ -139,7 +133,7 @@ protected:
     int ipHops(int ttl);
 
     /// Log the packet.
-    void Log(const IPAddress &addr, const u_int8_t type, const char* pkt_str, const int rtt, const int hops);
+    void Log(const Ip::Address &addr, const uint8_t type, const char* pkt_str, const int rtt, const int hops);
 
     /* no use wasting memory */
     int icmp_sock;