Moved function from client_function.c to protocol_std.c