|
static void | set_bittorrent_piece_cache_remaining (struct bittorrent_piece_cache *cache, uint32_t piece, int remaining) |
|
static void | set_bittorrent_piece_cache_completed (struct bittorrent_piece_cache *cache, uint32_t piece) |
|
static void | handle_bittorrent_mode_changes (struct bittorrent_connection *bittorrent) |
|
static struct bittorrent_peer_request * | find_bittorrent_free_list_peer_request (struct bittorrent_piece_cache *cache, struct bittorrent_peer_connection *peer) |
|
static int | randomize (size_t scale) |
|
static uint32_t | find_random_in_bittorrent_piece_cache (struct bittorrent_piece_cache *cache, struct bittorrent_peer_connection *peer) |
|
static uint32_t | find_rarest_in_bittorrent_piece_cache (struct bittorrent_piece_cache *cache, struct bittorrent_peer_connection *peer) |
|
static struct bittorrent_peer_request * | find_clonable_bittorrent_peer_request (struct bittorrent_peer_connection *peer) |
|
static struct bittorrent_peer_request * | clone_bittorrent_peer_request (struct bittorrent_peer_request *request) |
|
static struct bittorrent_peer_request * | add_piece_to_bittorrent_free_list (struct bittorrent_piece_cache *cache, struct bittorrent_connection *bittorrent, uint32_t piece) |
|
struct bittorrent_peer_request * | find_bittorrent_peer_request (struct bittorrent_peer_connection *peer) |
|
static void | clear_cloned_bittorrent_peer_request (struct bittorrent_connection *bittorrent, struct bittorrent_peer_request *request) |
|
static void | add_request_to_bittorrent_piece_cache (struct bittorrent_connection *bittorrent, struct bittorrent_peer_request *request) |
|
void | add_requests_to_bittorrent_piece_cache (struct bittorrent_peer_connection *peer, struct bittorrent_peer_status *status) |
|
void | update_bittorrent_piece_cache (struct bittorrent_peer_connection *peer, uint32_t piece) |
|
void | update_bittorrent_piece_cache_from_bitfield (struct bittorrent_peer_connection *peer) |
|
void | remove_bittorrent_peer_from_piece_cache (struct bittorrent_peer_connection *peer) |
|
static enum bittorrent_state | create_bittorrent_path (char *path) |
|
static void | remove_bittorrent_path (struct bittorrent_meta *meta, char *path) |
|
static char * | get_bittorrent_file_name (struct bittorrent_meta *meta, struct bittorrent_file *file) |
|
static int | open_bittorrent_file (struct bittorrent_meta *meta, struct bittorrent_file *file, enum bittorrent_translation trans, off_t offset) |
|
static enum bittorrent_state | bittorrent_file_piece_translation (struct bittorrent_meta *meta, struct bittorrent_piece_cache *cache, struct bittorrent_piece_cache_entry *entry, uint32_t piece, enum bittorrent_translation trans) |
|
static void | cancel_cloned_bittorrent_peer_requests (struct bittorrent_connection *bittorrent, struct bittorrent_peer_request *request) |
|
enum bittorrent_state | add_to_bittorrent_piece_cache (struct bittorrent_peer_connection *peer, uint32_t piece, uint32_t offset, char *data, uint32_t datalen, int *write_errno) |
|
char * | get_bittorrent_piece_cache_data (struct bittorrent_connection *bittorrent, uint32_t piece) |
|
static void | done_bittorrent_resume (struct bittorrent_piece_cache *cache) |
|
static int | prepare_partial_bittorrent_download (struct bittorrent_connection *bittorrent) |
|
static void | end_bittorrent_resume (struct bittorrent_connection *bittorrent) |
|
static void | bittorrent_resume_writer (void *data, int fd) |
|
static void | bittorrent_resume_reader (struct bittorrent_connection *bittorrent) |
|
static void | start_bittorrent_resume (struct bittorrent_connection *bittorrent, struct bittorrent_const_string *meta) |
|
void | update_bittorrent_piece_cache_state (struct bittorrent_connection *bittorrent) |
|
enum bittorrent_state | init_bittorrent_piece_cache (struct bittorrent_connection *bittorrent, struct bittorrent_const_string *metafile) |
|
static void | delete_bittorrent_files (struct bittorrent_connection *bittorrent) |
|
void | done_bittorrent_piece_cache (struct bittorrent_connection *bittorrent) |
|