tor  0.4.2.1-alpha-dev
process_descs.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-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
12 #ifndef TOR_RECV_UPLOADS_H
13 #define TOR_RECV_UPLOADS_H
14 
15 // for was_router_added_t.
17 
19 
20 #ifdef HAVE_MODULE_DIRAUTH
23  const char *desc, size_t desclen,
24  uint8_t purpose,
25  const char *source,
26  const char **msg);
28  const char **msg,
29  const char *source);
30 
32 int authdir_wants_to_reject_router(routerinfo_t *ri, const char **msg,
33  int complain,
34  int *valid_out);
36 uint32_t dirserv_router_get_status(const routerinfo_t *router,
37  const char **msg,
38  int severity);
40  uint32_t authstatus);
41 #else /* !(defined(HAVE_MODULE_DIRAUTH)) */
42 static inline int
44 {
45  return 0;
46 }
47 static inline enum was_router_added_t
48 dirserv_add_multiple_descriptors(const char *desc, size_t desclen,
49  uint8_t purpose,
50  const char *source,
51  const char **msg)
52 {
53  (void)desc;
54  (void)desclen;
55  (void)purpose;
56  (void)source;
57  (void)msg;
58  return (enum was_router_added_t)0;
59 }
60 static inline enum was_router_added_t
62  const char **msg,
63  const char *source)
64 {
65  (void)ri;
66  (void)msg;
67  (void)source;
68  return (enum was_router_added_t)0;
69 }
70 static inline int
72 {
73  (void)rs;
74  return 0;
75 }
76 static inline int
77 authdir_wants_to_reject_router(routerinfo_t *ri, const char **msg,
78  int complain,
79  int *valid_out)
80 {
81  (void)ri;
82  (void)msg;
83  (void)complain;
84  (void)valid_out;
85  return 0;
86 }
87 static inline int
89 {
90  (void)pk;
91  return 0;
92 }
93 static inline uint32_t
95  const char **msg,
96  int severity)
97 {
98  (void)router;
99  (void)msg;
100  (void)severity;
101  return 0;
102 }
103 static inline void
105  uint32_t authstatus)
106 {
107  (void)node;
108  (void)authstatus;
109 }
110 #endif /* defined(HAVE_MODULE_DIRAUTH) */
111 
112 #ifdef TOR_UNIT_TESTS
114 #endif /* defined(TOR_UNIT_TESTS) */
115 
116 #endif /* !defined(TOR_RECV_UPLOADS_H) */
Definition: node_st.h:28
was_router_added_t
Definition: routerlist.h:17
int dirserv_would_reject_router(const routerstatus_t *rs)
uint32_t dirserv_router_get_status(const routerinfo_t *router, const char **msg, int severity)
int dirserv_add_own_fingerprint(crypto_pk_t *pk)
int dirserv_load_fingerprint_file(void)
was_router_added_t dirserv_add_descriptor(routerinfo_t *ri, const char **msg, const char *source)
void dirserv_set_node_flags_from_authoritative_status(node_t *node, uint32_t authstatus)
int authdir_wants_to_reject_router(routerinfo_t *ri, const char **msg, int complain, int *valid_out)
STATIC int dirserv_router_has_valid_address(routerinfo_t *ri)
was_router_added_t dirserv_add_multiple_descriptors(const char *desc, size_t desclen, uint8_t purpose, const char *source, const char **msg)
void dirserv_free_fingerprint_list(void)
Header file for routerlist.c.