#ifndef UDP_RECEIVER_H
#define UDP_RECEIVER_H

#include <pthread.h>
#include <sys/time.h>

#define UDP_RECEIVER_PORT 9998

// Host data structure
typedef struct {
    float rx;
    float tx;
    long tcp;
    long udp;
    long icmp;
    struct timeval last_update;
} HostData;

// Function declarations
void* udp_receiver_thread(void* arg);
void start_udp_receiver(pthread_t *thread_id);
void stop_udp_receiver(pthread_t thread_id);
int get_host_data(int host_id, HostData *data);

#endif
