summaryrefslogtreecommitdiffstats
path: root/src/fuse/imageHelper.h
blob: 60805cd659ca0520464b67778f8f1c8d75ceef25 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef IMAGEHELPER_H
#define IMAGEHELPER_H

#include <netdb.h>
#include "protocol.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <inttypes.h>


typedef struct log_info {
  uint64_t imageSize;
  uint64_t receivedBytes;
  uint64_t imageBlockCount;
  uint8_t * blockRequestCount;
} log_info;



void printLog(log_info *info);

bool sock_printable(struct sockaddr *addr, socklen_t addrLen, char *output, int len);

int connect_to_server(char ** server_adress, int * port);
#endif