lokinet/include/llarp/router_contact.h

28 lines
645 B
C
Raw Normal View History

2018-01-25 16:24:33 +00:00
#ifndef LLARP_RC_H
#define LLARP_RC_H
#include <llarp/address_info.h>
#include <llarp/crypto.h>
2018-01-29 14:27:24 +00:00
#include <llarp/exit_info.h>
2018-01-25 16:24:33 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2018-05-20 17:45:47 +00:00
const size_t MAX_RC_SIZE = 1024;
2018-01-29 14:27:24 +00:00
struct llarp_rc {
struct llarp_ai_list *addrs;
llarp_pubkey_t pubkey;
struct llarp_xi_list *exits;
llarp_sig_t signature;
};
2018-05-16 18:13:18 +00:00
bool llarp_rc_bdecode(struct llarp_alloc * mem, struct llarp_rc *rc, llarp_buffer_t *buf);
2018-01-29 14:27:24 +00:00
bool llarp_rc_bencode(struct llarp_rc *rc, llarp_buffer_t *buf);
2018-04-08 12:18:16 +00:00
void llarp_rc_free(struct llarp_rc *rc);
2018-05-20 17:45:47 +00:00
bool llarp_rc_verify_sig(struct llarp_crypto * crypto, struct llarp_rc *rc);
2018-01-25 16:24:33 +00:00
#ifdef __cplusplus
}
#endif
#endif