#include <sys/socket.h>

#include <string.h>

#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/tcp.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>


#define GETSERIAL_ERR 0xFFFFFFFFFFFFFFFF
#define CONF_FILE     "/home/pi/nastavenie"
#define CONF_FILE_NEW  "/home/pi/nastavenie.new"
#define CONF_FILE_BU  "/home/pi/nastavenie.bu"

typedef struct Sdata {
        int pocet_serverov;
        short verzia;
        char servers[8][128];
}*pSdata;

//#include "usbip_network.h"
int usbip_my_net_tcp_connect(char *hostname, char *service);
int conn_nonb(struct  addrinfo *sa, int sock, int timeout);
ssize_t usbip_my_net_xmit(int sockfd, void *buff, size_t bufflen,int sending);
ssize_t usbip_my_net_recv(int sockfd, void *buff, size_t bufflen);
long long get_ID();
int Zalohuj (char* odkial, char* kam);
int GetNastavenia(struct Sdata * data);
int SaveNastavenia(struct Sdata * data);
unsigned long long GetSerial (void);
void Vytlac(struct Sdata * data);
