removed globals from server and client

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
adding static declaration to local callback

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>