/*
- * $Id: icmp.cc,v 1.80 2002/10/22 21:12:51 hno Exp $
+ * $Id: icmp.cc,v 1.81 2003/01/04 01:13:56 hno Exp $
*
* DEBUG: section 37 ICMP Routines
* AUTHOR: Duane Wessels
#endif /* USE_ICMP */
-void
-icmpPing(struct in_addr to)
-{
-#if USE_ICMP
- icmpSendEcho(to, S_ICMP_ECHO, NULL, 0);
-#endif
-}
-
#if ALLOW_SOURCE_PING
void
icmpSourcePing(struct in_addr to, const icp_common_t * header, const char *url)
/*
- * $Id: net_db.cc,v 1.166 2002/10/25 07:36:32 robertc Exp $
+ * $Id: net_db.cc,v 1.167 2003/01/04 01:13:56 hno Exp $
*
* DEBUG: section 38 Network Measurement Database
* AUTHOR: Duane Wessels
*samp = n->pings_recv;
*rtt = (int) (n->rtt + 0.5);
*hops = (int) (n->hops + 0.5);
+ n->last_use_time = squid_curtime;
#endif
}
-int
-netdbHostPeerRtt(const char *host, peer * p)
-{
-#if USE_ICMP
- const netdbEntry *n = netdbLookupHost(host);
- if (n) {
- const net_db_peer *np = netdbPeerByName(n, p->host);
- if (np && np->expires >= squid_curtime)
- return (int) (np->rtt + 0.5);
- }
-#endif
- return 0;
-}
-
void
netdbUpdatePeer(request_t * r, peer * e, int irtt, int ihops)
{
return NULL;
if (0 == n->n_peers)
return NULL;
+ n->last_use_time = squid_curtime;
/*
* Find the parent with the least RTT to the origin server.
* Make sure we don't return a parent who is farther away than
/*
- * $Id: protos.h,v 1.458 2002/12/27 10:26:33 robertc Exp $
+ * $Id: protos.h,v 1.459 2003/01/04 01:13:56 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
SQUIDCEXTERN void icmpOpen(void);
SQUIDCEXTERN void icmpClose(void);
-SQUIDCEXTERN void icmpPing(struct in_addr to);
SQUIDCEXTERN void icmpSourcePing(struct in_addr to, const icp_common_t *, const char *url);
SQUIDCEXTERN void icmpDomainPing(struct in_addr to, const char *domain);
SQUIDCEXTERN void netdbFreeMemory(void);
SQUIDCEXTERN int netdbHostHops(const char *host);
SQUIDCEXTERN int netdbHostRtt(const char *host);
-SQUIDCEXTERN int netdbHostPeerRtt(const char *host, peer * p);
SQUIDCEXTERN void netdbUpdatePeer(request_t *, peer * e, int rtt, int hops);
SQUIDCEXTERN void netdbDeleteAddrNetwork(struct in_addr addr);
SQUIDCEXTERN void netdbBinaryExchange(StoreEntry *);