rename + modifications pour que ça compile => tcpd cleaned
parent
fc44447e27
commit
f451e0f88d
|
@ -3,7 +3,7 @@ CFLAGS=-Wall -g
|
|||
LDFLAGS= -pthread
|
||||
CFILES=$(wildcard *.c) # CFILES => recompiles everything on a C file change
|
||||
EXEC=$(basename $(wildcard *.c))
|
||||
SOURCES=$(wildcard ../lib/communication.c ../lib/process.c)
|
||||
SOURCES=$(wildcard ../../lib/communication.c ../../lib/process.c)
|
||||
OBJECTS=$(SOURCES:.c=.o)
|
||||
TESTS=$(addsuffix .test, $(EXEC))
|
||||
LCBOR=-lbor
|
|
@ -1,4 +1,4 @@
|
|||
#include "tcpdserver.h"
|
||||
#include "tcpd.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
|
@ -6,7 +6,7 @@
|
|||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "../lib/communication.h"
|
||||
#include "../../lib/communication.h"
|
||||
|
||||
typedef struct {
|
||||
struct sockaddr_in c_addr;
|
|
@ -1,4 +1,4 @@
|
|||
#include "../lib/communication.h"
|
||||
#include "../../lib/communication.h"
|
||||
#include <pthread.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
@ -9,12 +9,12 @@
|
|||
do { perror(msg); exit(EXIT_FAILURE); } while (0)
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
char *srv_message = malloc(1024);
|
||||
char *pidfile = malloc(1024);
|
||||
char *buffer = malloc(1024);
|
||||
char *srv_message = malloc(BUFSIZ);
|
||||
char *pidfile = malloc(BUFSIZ);
|
||||
char *buffer = malloc(BUFSIZ);
|
||||
|
||||
snprintf(srv_message , 1024, "%s %d 1 1" ,"connect 127.0.0.1 6000" , getpid());
|
||||
snprintf(pidfile, 1024,"%s%d-1-1", "/tmp/ipc/", getpid());
|
||||
snprintf(srv_message, BUFSIZ, "%s %d 1 1", "connect 127.0.0.1 6000", getpid());
|
||||
snprintf(pidfile, BUFSIZ, "%s%d-1-1", "/tmp/ipc/", getpid());
|
||||
|
||||
char *proc_message = "hello frero";
|
||||
|
Reference in New Issue