main.c
800 Bytes
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <math.h>
#include <pthread.h>
#include <semaphore.h>
#include <pthread.h>
#include "rssi_list.h"
#include "pcap-thread.h"
#include "http.h"
int main(int argc , char *argv[]){
//udp_listening(char *msg,char *host);
pthread_t udp_thread; //our 2 threads for listen to UDP
int udp_th_id;
char *mess_udp = "UDP";
//struct thread_params tp;
int * my_ret = 0;
//We define our 2 threads
udp_th_id = pthread_create(&udp_thread, NULL, udp_listening, (void*) mess_udp);//(void *) &tp );
sleep(1); //We wait a little bit
//and launch the threads
pthread_join(udp_thread, NULL); //void(**) &my_ret);
printf("%d",*my_ret);
return(0);
return 0;
}