made protocol-library useable in C++ (not only in ANSI-C)