/* * packet.h * * Simulation of Chandy-Lamport algorithm * * This file is a part of Distributed Systems term thesis * Department KIV, ZCU Plzen * Author: Martin Sloup, msloup@students.zcu.cz */ #ifndef PACKET_H_ #define PACKET_H_ #include #define OPER_AMOUNT_TRANSFER 'T' #define OPER_MARKER 'M' #define OPER_FORWARD_MARKER 'F' #define OPER_GLOBAL_STATE 'G' struct packet { u_int32_t branch_id; u_int8_t operation; u_int32_t value; u_int32_t send_at_sec; u_int32_t send_at_usec; }; extern void packet_send(int c, char operation, long value); extern void packet_send_at(struct timeval *send_at, packet *p); #endif /* PACKET_H_ */