M1-nw-project/data.h

24 lines
591 B
C++

/***************************************************************************
* By Théophile Bastian, 2017
* M1 Network course project at ENS Cachan, Juliusz Chroboczek.
* License: WTFPL v2 <http://www.wtfpl.net/>
**************************************************************************/
#pragma once
#include <cstdint>
#include <arpa/inet.h>
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef struct sockaddr_in6 SockAddr;
struct Neighbour {
Neighbour(u64 id, const SockAddr& addr) : id(id), addr(addr) {}
u64 id;
SockAddr addr;
};