routers.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /**
  2. * routers.h
  3. * Routines for loading the list of routers and their public RSA keys.
  4. *
  5. * Matej Pfajfar <mp292@cam.ac.uk>
  6. */
  7. /*
  8. * Changes :
  9. * $Log$
  10. * Revision 1.1 2002/06/26 22:45:50 arma
  11. * Initial revision
  12. *
  13. * Revision 1.11 2002/04/02 14:28:01 badbytes
  14. * Final finishes.
  15. *
  16. * Revision 1.10 2002/01/26 22:22:09 mp292
  17. * Prevented duplicate definitions.
  18. *
  19. * Revision 1.9 2002/01/26 22:19:15 mp292
  20. * Reviewed according to Secure-Programs-HOWTO.
  21. *
  22. * Revision 1.8 2001/12/17 08:42:45 badbytes
  23. * getrouters() now returns an array of routers and also writes the length of the array to an int*.
  24. *
  25. * Revision 1.7 2001/12/14 14:08:50 badbytes
  26. * getrouters() now returns an array of pointers rather than a linked list
  27. *
  28. * Revision 1.6 2001/12/14 14:05:56 badbytes
  29. * Added routent** make_rarray(routent_t* list);
  30. *
  31. * Revision 1.5 2001/12/14 13:32:18 badbytes
  32. * No longer contains the definition of routent_t. This is now in common/routent_t.h
  33. *
  34. * Revision 1.4 2001/12/14 13:25:17 badbytes
  35. * Moved back from common/
  36. *
  37. * Revision 1.2 2001/12/14 11:24:57 badbytes
  38. * Tested.
  39. *
  40. * Revision 1.1 2001/12/13 15:15:11 badbytes
  41. * Started coding the onion proxy.
  42. *
  43. */
  44. #ifndef __ROUTERS_H
  45. #define __ROUTERS_H
  46. #include <openssl/rsa.h>
  47. #include "../common/routent.h"
  48. #define OP_ROUTERLIST_SEPCHARS " \t\n"
  49. #define OP_PUBLICKEY_BEGIN_TAG "-----BEGIN RSA PUBLIC KEY-----\n"
  50. /* load the list of routers into memory */
  51. routent_t **getrouters(char *routerfile, size_t *listlenp);
  52. /* free the router list pointed to by list */
  53. void delete_routerlist(routent_t *list);
  54. /* create an NULL-terminated array of pointers pointing to elements of a router list */
  55. routent_t **make_rarray(routent_t* list, size_t *listlenp);
  56. #endif