2018-06-18 22:03:50 +00:00
|
|
|
#ifndef LLARP_PATH_H
|
|
|
|
#define LLARP_PATH_H
|
|
|
|
|
|
|
|
#include <llarp/router_contact.h>
|
|
|
|
|
|
|
|
#define MAXHOPS (8)
|
2018-06-25 15:12:08 +00:00
|
|
|
#define DEFAULT_PATH_LIFETIME (10 * 60 * 1000)
|
|
|
|
#define PATH_BUILD_TIMEOUT (30 * 1000)
|
|
|
|
|
2018-06-19 17:11:24 +00:00
|
|
|
struct llarp_path_hop
|
|
|
|
{
|
|
|
|
struct llarp_rc router;
|
|
|
|
byte_t nextHop[PUBKEYSIZE];
|
|
|
|
byte_t sessionkey[SHAREDKEYSIZE];
|
|
|
|
byte_t pathid[PATHIDSIZE];
|
|
|
|
};
|
|
|
|
|
2018-06-18 22:05:02 +00:00
|
|
|
struct llarp_path_hops
|
|
|
|
{
|
2018-06-19 17:11:24 +00:00
|
|
|
struct llarp_path_hop hops[MAXHOPS];
|
2018-06-18 22:05:02 +00:00
|
|
|
size_t numHops;
|
|
|
|
};
|
2018-06-18 22:03:50 +00:00
|
|
|
|
2018-06-19 17:11:24 +00:00
|
|
|
void
|
|
|
|
llarp_path_hops_free(struct llarp_path_hops* hops);
|
|
|
|
|
2018-06-18 22:03:50 +00:00
|
|
|
#endif
|