]>
Commit | Line | Data |
---|---|---|
cc192b50 | 1 | /* |
bbc27441 | 2 | * Copyright (C) 1996-2014 The Squid Software Foundation and contributors |
cc192b50 | 3 | * |
bbc27441 AJ |
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. | |
cc192b50 | 7 | */ |
bbc27441 AJ |
8 | |
9 | /* DEBUG: section 37 ICMP Routines */ | |
10 | ||
cc192b50 | 11 | #ifndef _INCLUDE_ICMPV6_H |
12 | #define _INCLUDE_ICMPV6_H | |
13 | ||
b826ffb5 | 14 | #include "Icmp.h" |
cc192b50 | 15 | |
16 | #if HAVE_NETINET_IN_H | |
17 | #include <netinet/in.h> | |
18 | #endif | |
19 | #if HAVE_NETINET_ICMP6_H | |
20 | #include <netinet/icmp6.h> | |
21 | #endif | |
22 | #if HAVE_NETINET_IP6_H | |
23 | #include <netinet/ip6.h> | |
24 | #endif | |
25 | ||
26 | /* see RFC 4443 section 2.1 */ | |
27 | #ifndef ICMP6_ECHOREQUEST | |
28 | #define ICMP6_ECHOREQUEST 128 | |
29 | #endif | |
30 | ||
31 | /* see RFC 4443 section 2.1 */ | |
32 | #ifndef ICMP6_ECHOREPLY | |
33 | #define ICMP6_ECHOREPLY 129 | |
34 | #endif | |
35 | ||
36 | /* see RFC 4443 section 2.1 */ | |
37 | #ifndef IPPROTO_ICMPV6 | |
38 | #define IPPROTO_ICMPV6 58 | |
39 | #endif | |
40 | ||
41 | /** | |
42 | * Class partially implementing RFC 4443 - ICMPv6 for IP version 6. | |
43 | * Provides ECHO-REQUEST, ECHO-REPLY (secion 4) | |
44 | */ | |
b826ffb5 | 45 | class Icmp6 : public Icmp |
cc192b50 | 46 | { |
47 | public: | |
b826ffb5 AJ |
48 | Icmp6(); |
49 | virtual ~Icmp6(); | |
cc192b50 | 50 | |
51 | virtual int Open(); | |
52 | ||
53 | #if USE_ICMP | |
b7ac5457 | 54 | virtual void SendEcho(Ip::Address &, int, const char*, int); |
cc192b50 | 55 | virtual void Recv(void); |
56 | #endif | |
57 | }; | |
58 | ||
59 | #if USE_ICMP | |
60 | ||
61 | /// pinger helper contains one of these as a global object. | |
d9c252f2 | 62 | extern Icmp6 icmp6; |
cc192b50 | 63 | |
64 | #endif /* USE_ICMP && SQUID_HELPER */ | |
cc192b50 | 65 | #endif /* _INCLUDE_ICMPV6_H */ |