Tor  0.4.7.0-alpha-dev
dircache.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * \file dircache.h
9  * \brief Header file for dircache.c.
10  **/
11 
12 #ifndef TOR_DIRCACHE_H
13 #define TOR_DIRCACHE_H
14 
16 
17 #ifdef DIRCACHE_PRIVATE
19  const char *headers,
20  const char *req_body,
21  size_t req_body_len));
23  const char *headers,
24  const char *body,
25  size_t body_len));
26 
27 STATIC int handle_post_hs_descriptor(const char *url, const char *body);
30 
31 struct get_handler_args_t;
33  const struct get_handler_args_t *args);
34 
35 STATIC int parse_http_url(const char *headers, char **url);
36 
37 STATIC int parse_hs_version_from_post(const char *url, const char *prefix,
38  const char **end_pos);
39 
40 STATIC unsigned parse_accept_encoding_header(const char *h);
41 #endif /* defined(DIRCACHE_PRIVATE) */
42 
43 #endif /* !defined(TOR_DIRCACHE_H) */
compression_level_t
Definition: compress.h:35
STATIC int directory_handle_command_post(dir_connection_t *conn, const char *headers, const char *body, size_t body_len)
Definition: dircache.c:1567
STATIC int parse_http_url(const char *headers, char **url)
Definition: dircache.c:70
STATIC int handle_get_hs_descriptor_v3(dir_connection_t *conn, const get_handler_args_t *args)
Definition: dircache.c:1352
STATIC unsigned parse_accept_encoding_header(const char *h)
Definition: dircache.c:222
STATIC int directory_handle_command_get(dir_connection_t *conn, const char *headers, const char *req_body, size_t req_body_len)
Definition: dircache.c:390
STATIC compression_level_t choose_compression_level(void)
Definition: dircache.c:298
int directory_handle_command(dir_connection_t *conn)
Definition: dircache.c:1724
const char * headers
Definition: dircache.c:327
const char * url
Definition: dircache.c:325
#define STATIC
Definition: testsupport.h:32
#define MOCK_DECL(rv, funcname, arglist)
Definition: testsupport.h:127