if (socketFd > 31) { (osi_Msg "%ssocket descriptor > 31\n", name); goto error; }
rxi_GetUDPSocket(u_short port){    int binds, code;    register int socketFd = OSI_NULLSOCKET;    struct sockaddr_in taddr;    char *name = "rxi_GetUDPSocket: ";#if 0				       /* We dont want to have this error				        * message, don't bother us */    if (port >= IPPORT_RESERVED && port < IPPORT_USERRESERVED) {	(osi_Msg "%s*WARNING* port number %d is not a reserved port number."	 "Use port numbers above %d\n",	 name, port, IPPORT_USERRESERVED);    }#endif				       /* 0 */    if (port > 0 && port < IPPORT_RESERVED && geteuid() != 0) {	(osi_Msg "%sport number %d is a reserved port number which may only"	 " be used by root.  Use port numbers above %d\n",	 name, port, IPPORT_USERRESERVED);	goto error;    }    socketFd = socket(AF_INET, SOCK_DGRAM, 0);    /* IOMGR_Select doesn't deal with arbitrarily large select masks */    if (socketFd > 31) {	(osi_Msg "%ssocket descriptor > 31\n", name);	goto error;    }    FD_SET(socketFd, &rx_selectMask);    if (socketFd > rx_maxSocketNumber)	rx_maxSocketNumber = socketFd;    taddr.sin_addr.s_addr = 0;    taddr.sin_family = AF_INET;    taddr.sin_port = port;#define MAX_RX_BINDS 10    for (binds = 0; binds < MAX_RX_BINDS; binds++) {	code = bind(socketFd, (const struct sockaddr *) & taddr, sizeof(taddr));	if (!code)	    break;	sleep(10);    }    if (code) {	perror("bind");	(osi_Msg "%sbind failed\n", name);	goto error;    }    /*     * Use one of three different ways of getting a socket buffer expanded to     * a reasonable size     */    {	int len1, len2;	len1 = len2 = 32766;	rx_stats.socketGreedy =	    (setsockopt(socketFd, SOL_SOCKET, SO_SNDBUF,			&len1, sizeof(len1)) >= 0) &&	    (setsockopt(socketFd, SOL_SOCKET, SO_RCVBUF,			&len2, sizeof(len2)) >= 0);    }/*#ifdef notdef*/    if (!rx_stats.socketGreedy)	(osi_Msg "%s*WARNING* Unable to increase buffering on socket\n", name);/*#endif*/    /*     * Put it into non-blocking mode so that rx_Listener can do a polling     * read before entering select     */    if (fcntl(socketFd, F_SETFL, FNDELAY) == -1) {	perror("fcntl");	(osi_Msg "%sunable to set non-blocking mode on socket\n", name);	goto error;    }    return socketFd;error:    if (socketFd >= 0)	close(socketFd);    return OSI_NULLSOCKET;}