M1-nw-project/nw_constants.h

34 lines
785 B
C
Raw Normal View History

2016-11-16 18:56:52 +01:00
/***************************************************************************
* By Théophile Bastian, 2017
* M1 Network course project at ENS Cachan, Juliusz Chroboczek.
* License: WTFPL v2 <http://www.wtfpl.net/>
**************************************************************************/
#pragma once
#include "data.h"
namespace csts {
const u8 MAGIC = 57;
const u8 VERSION = 0;
const u8 TLV_PAD1 = 0;
const u8 TLV_PADN = 1;
const u8 TLV_IHU = 2;
const u8 TLV_NR = 3;
const u8 TLV_NEIGH = 4;
const u8 TLV_DATA = 5;
const u8 TLV_IHAVE = 6;
const u8 TLV_DATA_TEXT = 32;
const u8 TLV_DATA_PNG = 33;
const u8 TLV_DATA_JPG = 34;
const int TIMEOUT_UNIDIR = 100*1000; // ms
const int TIMEOUT_SYM_RECV = 150*1000; // ms
const int TIMEOUT_SYM_IHU = 300*1000; // ms
};