/* File: KRnet.h */ #ifndef KR_KRNET_H #define KR_KRNET_H /* enum entity_t Kurose sometimes uses `A' to mean the client and `B' to mean the server. This makes single character typos highly significant. We use `Client' and `Server' not `A' and `B' */ enum entity_type { A=0, Client=0, B=1, Server=1 }; typedef enum entity_type entity_t; /* prototype for public functions */ void toNWSlayer(entity_t CorS, packet_t packet); void toAppLayer(entity_t CorS, char datasent[]); void printevlist(void); void startClientTimer(float increment); void stopClientTimer(void); void startServerTimer(float increment); void stopServerTimer(void); void swerr(char const *proc, const int error_level, char *format, ...); /* If BIDIRECTIONAL == 0 then simplex transfer (from A to B only) If BIDIRECTIONAL != 0 then duplex transfer (from A to B and B to A) Leave BIDIRECTIONAL set to 0 for basic assignment */ #define BIDIRECTIONAL (0) #endif /* KR_KRNET_H */ /* EOF (KRnet.h) */