blob: 78feb75b5361410c57a5adf3dc88c77d3dacdb2d [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>
#include <netinet/in.h>
#define MAGIC "RPF_"
#define KEEP_ALIVE 1
#define NEW_CONNECTION 2
struct new_connection_packet {
uint32_t len;
//struct timeval tv;
//struct sockaddr_storage addr;
struct in_addr address;
uint16_t port;
} __attribute__((__packed__));
#ifndef MAX
#define MAX(A,B) ((A)>(B)?(A):(B))
#endif
#endif