move global_sockfd from BsimCtrl.xxx to sock_utils.c