2018-01-25 16:24:33 +00:00
|
|
|
#ifndef LLARP_RC_H
|
|
|
|
#define LLARP_RC_H
|
|
|
|
#include <llarp/address_info.h>
|
|
|
|
#include <llarp/exit_info.h>
|
|
|
|
#include <llarp/crypto.h>
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2018-01-26 14:17:51 +00:00
|
|
|
struct llarp_rc
|
2018-01-25 16:24:33 +00:00
|
|
|
{
|
|
|
|
llarp_buffer_t raw;
|
2018-01-26 14:17:51 +00:00
|
|
|
struct llarp_ai_list * addrs;
|
2018-01-25 16:24:33 +00:00
|
|
|
llarp_pubkey_t pubkey;
|
2018-01-26 14:17:51 +00:00
|
|
|
struct llarp_xi_list * exits;
|
2018-01-25 16:24:33 +00:00
|
|
|
llarp_sig_t signature;
|
|
|
|
};
|
|
|
|
|
2018-01-26 14:17:51 +00:00
|
|
|
bool llarp_rc_bdecode(struct llarp_rc * rc, llarp_buffer_t * buf);
|
|
|
|
bool llarp_rc_bencode(struct llarp_rc * rc, llarp_buffer_t * buf);
|
|
|
|
void llarp_rc_free(struct llarp_rc ** rc);
|
|
|
|
bool llarp_rc_verify_sig(struct llarp_rc * rc);
|
2018-01-25 16:24:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|