some stuff

This commit is contained in:
Nikolaj
2021-11-04 16:00:22 +01:00
parent 9856de01e4
commit 3237f413db
6 changed files with 124604 additions and 86 deletions

View File

@@ -24,7 +24,7 @@ struct RequestHeader
struct RequestBody
{
char hash[32];
uint8_t hash[32];
struct in_addr ip;
unsigned short port;
};
@@ -34,7 +34,7 @@ struct ClientRequest
char protocol[8];
char reserved[12];
uint64_t block_num;
char hash[32];
uint8_t hash[32];
};
struct ClientResponseHeader
@@ -111,7 +111,7 @@ int csc_get_peers(csc_ipport_t tracker, csc_hashdata_t cascadehash, csc_ipport_t
*/
int csc_download_block(csc_ipport_t client, csc_hashdata_t cascadehash, uint64_t blockno, uint64_t blocklength, void* buffer);
int get_peers_list(csc_peer_t** peers, unsigned char* hash);
int get_peers_list(csc_peer_t** peers, uint8_t hash[32]);
void get_block(csc_block_t* block, csc_peer_t peer, unsigned char* hash, char* output_file);
#endif