code: public static DirectoryVendor determineDirectoryVendor( final ChaiEntry rootDSE )
              throws ChaiUnavailableException, ChaiOperationException
      {
          final Set<String> interestedAttributes = new HashSet<>();
          for ( final DirectoryVendor directoryVendor : DirectoryVendor.values() )
          {
              interestedAttributes.addAll( directoryVendor.getVendorFactory().interestedDseAttributes() );
          }
  
          final SearchHelper searchHelper = new SearchHelper();
          searchHelper.setAttributes( interestedAttributes.toArray( new String[interestedAttributes.size()] ) );
          searchHelper.setFilter( "(objectClass=*)" );
          searchHelper.setMaxResults( 1 );
          searchHelper.setSearchScope( SearchScope.BASE );
  
          final Map<String, Map<String, List<String>>> results = rootDSE.getChaiProvider().searchMultiValues( "", searchHelper );
          if ( results != null && !results.isEmpty() )
          {
              final Map<String, List<String>> rootDseSearchResults = results.values().iterator().next();
              for ( final DirectoryVendor directoryVendor : DirectoryVendor.values() )
              {
                  if ( directoryVendor.getVendorFactory().detectVendorFromRootDSEData( rootDseSearchResults ) )
                  {
                      return directoryVendor;
                  }
              }
          }
  
          return DirectoryVendor.GENERIC;
      }
docs: Determines the vendor of a the ldap directory by reading RootDSE attributes.
  
  @param rootDSE A valid entry
  @return the proper directory vendor, or {@link DirectoryVendor#GENERIC} if the vendor can not be determined.
  @throws ChaiUnavailableException If the directory is unreachable
  @throws ChaiOperationException   If there is an error reading values from the Root DSE entry