summaryrefslogtreecommitdiffstats
path: root/src/server/uplink.h
blob: c0a68de2513937f19d891c90f08d5bade35e9a18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _UPLINK_H_
#define _UPLINK_H_

#include "../types.h"
#include "globals.h"

void uplink_globalsInit();

uint64_t uplink_getTotalBytesReceived();

void uplink_addTotalBytesReceived(int receivedBytes);

bool uplink_init(dnbd3_image_t *image, int sock, dnbd3_host_t *host);

void uplink_removeClient(dnbd3_connection_t *uplink, dnbd3_client_t *client);

bool uplink_request(dnbd3_client_t *client, uint64_t handle, uint64_t start, uint32_t length);

void uplink_shutdown(dnbd3_image_t *image);

#endif /* UPLINK_H_ */