if (is_flag_set(VERY_VERBOSE_MODE) == TRUE) { switch (socktype) { case SOCK_STREAM: warn(_("using stream socket")); break; case SOCK_DGRAM: warn(_("using datagram socket")); break; default: fatal(_("internal error: unsupported socktype %d"), socktype); } }
static int establish_connection(int mode, const connection_attributes *attrs,                                established_callback callback){	int fd, socktype;	assert(attrs != NULL);	assert(callback != NULL);	/* establish remote connection */	switch (mode) {	case LISTEN_MODE:		fd = do_listen(attrs, &socktype);		break;	case CONNECT_MODE:		fd = do_connect(attrs, &socktype);		break;	default:		fatal(_("internal error: unknown connection mode"));		/* not reached - but stops warnings about uninitialized fd */		fd = -1;		break;	}	assert(fd >= 0);	assert(socktype >= 0);	/* announce the socket in very verbose mode */	if (is_flag_set(VERY_VERBOSE_MODE) == TRUE) {		switch (socktype) {		case SOCK_STREAM:			warn(_("using stream socket"));			break;		case SOCK_DGRAM:			warn(_("using datagram socket"));			break;		default:			fatal(_("internal error: unsupported socktype %d"),			      socktype);		}	}	return callback(attrs, fd, socktype);}