]>
Commit | Line | Data |
---|---|---|
cc192b50 | 1 | /* |
b8ae064d | 2 | * Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
bbc27441 AJ |
3 | * |
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 03 Configuration Settings */ | |
10 | ||
cc192b50 | 11 | #ifndef ICMPCONFIG_H |
12 | #define ICMPCONFIG_H | |
13 | ||
7a9d36e3 AJ |
14 | #if USE_ICMP |
15 | ||
16 | #include "cache_cf.h" | |
65e41a45 | 17 | #include "sbuf/SBuf.h" |
7a9d36e3 | 18 | |
cc192b50 | 19 | /** |
20 | * Squid pinger Configuration settings | |
cc192b50 | 21 | */ |
7473a02a | 22 | class IcmpConfig |
26ac0430 | 23 | { |
cc192b50 | 24 | public: |
7a9d36e3 AJ |
25 | IcmpConfig() : enable(0) {} |
26 | ~IcmpConfig() {} | |
cc192b50 | 27 | |
7a9d36e3 AJ |
28 | void clear() {enable=0; program.clear();} |
29 | void parse(); | |
cc192b50 | 30 | |
31 | /** pinger helper application path */ | |
7a9d36e3 | 32 | SBuf program; |
cc192b50 | 33 | |
34 | /** Whether the pinger helper is enabled for use or not */ | |
cc192b50 | 35 | int enable; |
36 | }; | |
37 | ||
7a9d36e3 AJ |
38 | extern IcmpConfig IcmpCfg; |
39 | ||
40 | /* wrappers for the legacy squid.conf parser */ | |
41 | #define dump_icmp(e,n,v) \ | |
42 | if (!(v).program.isEmpty()) { \ | |
43 | (e)->append((n), strlen((n))); \ | |
44 | (e)->append(" ", 1); \ | |
45 | (e)->append((v).program.rawContent(), (v).program.length()); \ | |
46 | (e)->append("\n", 1); \ | |
47 | } else {} | |
48 | #define parse_icmp(v) (v)->parse() | |
49 | #define free_icmp(x) (x)->clear() | |
50 | ||
51 | #endif /* USE_ICMP */ | |
cc192b50 | 52 | #endif /* ICMPCONFIG_H */ |
f53969cc | 53 |