summaryrefslogblamecommitdiffstats
path: root/src/server/uplink.h
blob: 49ff0b423357707a737ff7270dd39b882bd18ce6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                  
                    
                     
 

                          

                                        
                                                                                  
 
                                                                         
 
                                                                                                                
 
                                           
 

                                                                            
                      
#ifndef _UPLINK_H_
#define _UPLINK_H_

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

void uplink_globalsInit();

uint64_t uplink_getTotalBytesReceived();

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

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

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

bool uplink_shutdown(dnbd3_image_t *image);

bool uplink_getHostString(dnbd3_uplink_t *uplink, char *buffer, size_t len);

#endif /* UPLINK_H_ */