-
Notifications
You must be signed in to change notification settings - Fork 0
/
Functions.h
30 lines (26 loc) · 833 Bytes
/
Functions.h
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
29
30
#ifndef FUNCTIONS_H
#define FUNCTIONS_H
#include <stdio.h>
#include <sys/wait.h> /* sockets */
#include <sys/types.h> /* sockets */
#include <sys/socket.h> /* sockets */
#include <netinet/in.h> /* internet sockets */
#include <netdb.h> /* gethostbyaddr */
#include <unistd.h> /* fork */
#include <stdlib.h> /* exit */
#include <ctype.h> /* toupper */
#include <signal.h> /* signal */
#include <string.h>
#include <arpa/inet.h>
#include <error.h>
#include <pthread.h>
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
#include <sys/stat.h>
//Some general functions used for the file handling part
int hash_func(char* user, int entries);
char *strremove(char *str, const char *sub);
int count_files(char* fpath);
void send_files(char* fpath,int fd);
#endif