summaryrefslogtreecommitdiff
path: root/src/op/routers.h
blob: 7cacb4daf319d7f2f116a50390124eb9b353de24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
 * routers.h
 * Routines for loading the list of routers and their public RSA keys.
 *
 * Matej Pfajfar <mp292@cam.ac.uk>
 */

/*
 * Changes :
 * $Log$
 * Revision 1.1  2002/06/26 22:45:50  arma
 * Initial revision
 *
 * Revision 1.11  2002/04/02 14:28:01  badbytes
 * Final finishes.
 *
 * Revision 1.10  2002/01/26 22:22:09  mp292
 * Prevented duplicate definitions.
 *
 * Revision 1.9  2002/01/26 22:19:15  mp292
 * Reviewed according to Secure-Programs-HOWTO.
 *
 * Revision 1.8  2001/12/17 08:42:45  badbytes
 * getrouters() now returns an array of routers and also writes the length of the array to an int*.
 *
 * Revision 1.7  2001/12/14 14:08:50  badbytes
 * getrouters() now returns an array of pointers rather than a linked list
 *
 * Revision 1.6  2001/12/14 14:05:56  badbytes
 * Added routent** make_rarray(routent_t* list);
 *
 * Revision 1.5  2001/12/14 13:32:18  badbytes
 * No longer contains the definition of routent_t. This is now in common/routent_t.h
 *
 * Revision 1.4  2001/12/14 13:25:17  badbytes
 * Moved back from common/
 *
 * Revision 1.2  2001/12/14 11:24:57  badbytes
 * Tested.
 *
 * Revision 1.1  2001/12/13 15:15:11  badbytes
 * Started coding the onion proxy.
 *
 */

#ifndef __ROUTERS_H

#define __ROUTERS_H

#include <openssl/rsa.h>
#include "../common/routent.h"

#define OP_ROUTERLIST_SEPCHARS " \t\n"

#define OP_PUBLICKEY_BEGIN_TAG "-----BEGIN RSA PUBLIC KEY-----\n"

/* load the list of routers into memory */
routent_t **getrouters(char *routerfile, size_t *listlenp);

/* free the router list pointed to by list */
void delete_routerlist(routent_t *list);

/* create an NULL-terminated array of pointers pointing to elements of a router list */
routent_t **make_rarray(routent_t* list, size_t *listlenp);

#endif