This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MAX_PKT 1024 /* packet size in bytes */ | |
typedef enum { false, true } boolean; /* boolean type */ | |
typedef unsigned int seq_nr; /* sequence or ACK numbers */ | |
typedef struct { | |
unsigned char data[MAX_PKT]; | |
} packet; /* packet definition */ | |
typedef enum { data, ack, nak } frame_kind; /* frame kind definition */ |