cleanup_exit(255);
return -1;
get_sock_port(int sock, int local){	struct sockaddr_storage from;	socklen_t fromlen;	char strport[NI_MAXSERV];	int r;	/* Get IP address of client. */	fromlen = sizeof(from);	memset(&from, 0, sizeof(from));	if (local) {		if (getsockname(sock, (struct sockaddr *)&from, &fromlen) < 0) {			error("getsockname failed: %.100s", strerror(errno));			return 0;		}	} else {		if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) {			debug("getpeername failed: %.100s", strerror(errno));			cleanup_exit(255);		}	}	/* Return port number. */	if ((r = getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0,	    strport, sizeof(strport), NI_NUMERICSERV)) != 0)		fatal("get_sock_port: getnameinfo NI_NUMERICSERV failed: %s",		    r == EAI_SYSTEM ? strerror(errno) : gai_strerror(r));	return atoi(strport);}