]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/icmp/net_db.h
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
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.
13 #include "ip/forward.h"
14 #include "mem/forward.h"
24 public hash_link
/* must be first */
26 MEMPROXY_CLASS(net_db_name
);
29 net_db_name(const char *name
, netdbEntry
*);
30 ~net_db_name() { xfree(key
); }
33 netdbEntry
*net_db_entry
;
47 public hash_link
/* must be first */
49 MEMPROXY_CLASS(netdbEntry
);
52 netdbEntry() { *network
= 0; }
54 char network
[MAX_IPSTRLEN
];
59 time_t next_ping_time
= 0;
60 time_t last_use_time
= 0;
62 net_db_name
*hosts
= nullptr;
63 net_db_peer
*peers
= nullptr;
64 int n_peers_alloc
= 0;
70 void netdbHandlePingReply(const Ip::Address
&from
, int hops
, int rtt
);
71 void netdbPingSite(const char *hostname
);
72 void netdbDump(StoreEntry
*);
74 void netdbFreeMemory(void);
75 int netdbHostHops(const char *host
);
76 int netdbHostRtt(const char *host
);
77 void netdbUpdatePeer(const URL
&, CachePeer
* e
, int rtt
, int hops
);
79 void netdbDeleteAddrNetwork(Ip::Address
&addr
);
80 void netdbBinaryExchange(StoreEntry
*);
81 void netdbExchangeStart(void *);
83 void netdbExchangeUpdatePeer(Ip::Address
&, CachePeer
*, double, double);
84 CachePeer
*netdbClosestParent(PeerSelector
*);
85 void netdbHostData(const char *host
, int *samp
, int *rtt
, int *hops
);
87 #endif /* ICMP_NET_DB_H */