htcp.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
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.
7  */
8 
9 #ifndef SQUID_HTCP_H
10 #define SQUID_HTCP_H
11 
12 #if USE_HTCP
13 
14 #include "http/forward.h"
15 #include "HttpHeader.h"
16 #include "ip/forward.h"
17 #include "store_key_md5.h"
18 
21 {
22 
23 public:
24  HtcpReplyData();
25 
27  bool parseHeader(const char *buffer, const size_t size);
28 
29  int hit;
31  uint32_t msg_id;
32  double version;
33 
34  struct cto_t {
35  /* cache-to-origin */
36  double rtt;
37  int samp;
38  int hops;
39  } cto;
40 };
41 
43 void neighborsHtcpReply(const cache_key *, HtcpReplyData *, const Ip::Address &);
44 
46 void htcpOpenPorts(void);
47 
61 int htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p);
62 
64 void htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestMethod &method, CachePeer * p, htcp_clr_reason reason);
65 
67 void htcpSocketShutdown(void);
68 
70 void htcpClosePorts(void);
71 
72 #endif /* USE_HTCP */
73 
74 #endif /* SQUID_HTCP_H */
75 
bool parseHeader(const char *buffer, const size_t size)
parses request header from the buffer
Definition: htcp.cc:1038
htcp_clr_reason
Definition: enums.h:233
void htcpOpenPorts(void)
Definition: htcp.cc:1405
unsigned char cache_key
Store key.
Definition: forward.h:29
HttpHeader hdr
Definition: htcp.h:30
int hit
Definition: htcp.h:29
void neighborsHtcpReply(const cache_key *, HtcpReplyData *, const Ip::Address &)
Definition: neighbors.cc:1712
char * p
Definition: membanger.c:43
void htcpClosePorts(void)
Definition: htcp.cc:1617
struct HtcpReplyData::cto_t cto
void htcpSocketShutdown(void)
Definition: htcp.cc:1588
HtcpReplyData()
Definition: htcp.cc:1031
double version
Definition: htcp.h:32
int htcpQuery(StoreEntry *e, HttpRequest *req, CachePeer *p)
Definition: htcp.cc:1479
void htcpClear(StoreEntry *e, const char *uri, HttpRequest *req, const HttpRequestMethod &, CachePeer *p, htcp_clr_reason reason)
Definition: htcp.cc:1528
size_t HttpReply *STUB StoreEntry const KeyScope scope const HttpRequestMethod & method
Definition: stub_store.cc:122
uint32_t msg_id
Definition: htcp.h:31
int size
Definition: ModDevPoll.cc:77

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors