#ifndef _PUBLIC_H #define _PUBLIC_H #ifdef __cpluscplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define IP_GET_RAW_VER(raw_pkt) ((((raw_pkt)[0] & 0xf0) >> 4)) #define LOG_DEBUG(format, ...) \ { \ fprintf(stdout, format "\n", ##__VA_ARGS__); \ fflush(stdout); \ } #define LOG_ERROR(format, ...) \ { \ fprintf(stderr, format "\n", ##__VA_ARGS__); \ fflush(stderr); \ } #ifdef __cpluscplus } #endif #endif