blob: 94c11eca87ddacbe250b77e0739aa30cca8d54e0 [file] [log] [blame] [raw]
/*
* Copyright 2015-2017 Rivoreo
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef _RPF_COMMON_H
#define _RPF_COMMON_H
#include <stdint.h>
#include <sys/time.h>
#include <sys/socket.h>
#define MAGIC "RPF_"
#define KEEP_ALIVE 1
#define NEW_CONNECTION 2
//struct keep_alive_packet {
struct new_connection_packet {
uint32_t len;
struct timeval tv;
struct sockaddr_storage addr;
};
#ifndef MAX
#define MAX(A,B) ((A)>(B)?(A):(B))
#endif
#endif