Implementation of basic broadcast protocols in C