#ifndef _RESEAU_
#define _RESEAU_
#include <time.h>
#define MAXTAILLETAMPON 100
#define TIMEOUT 10 /* secondes */
#define MAXTAILLEFENETRE 5
#define SIGRECU 1
#define SIGTEMPO 2
#define SIGEMIS 4
typedef struct stampon
{
int taille;
char info[MAXTAILLETAMPON];
} ttampon;
typedef struct strame
{
int num, AS, AD;
ttampon tampon;
char CRC;
} ttrame;
void prendre_de_la_couche_reseau(int *AS, int *AD, ttampon *T);
void construire_trame(int num, int AS, int AD, ttampon T, ttrame *Trame);
void envoyer_vers_couche_physique(ttrame Trame);
void prendre_de_la_couche_physique(ttrame *Trame);
void recuperer_donnees(ttrame Trame, ttampon *T, int *num, int *AS, int *AD);
void envoyer_vers_couche_reseau(ttampon T, int AS, int AD);
void attendre(int signal);
char signale(int signal);
char calcule_CRC(ttrame Trame);
void tempo(int numseq);
void stoptempo(int numseq);
void initialise_couche_physique(char *emission, char *reception);
void initialise_couche_reseau(int source, int destination);
#endif