+ `sizelimit' is the maximum number of matches to return."
+ :type '(repeat :menu-tag "Host parameters"
+ :tag "Host parameters"
+ (list :menu-tag "Host parameters"
+ :tag "Host parameters"
+ :value nil
+ (string :tag "Host name")
+ (checklist :inline t
+ :greedy t
+ (list
+ :tag "Search Base"
+ :inline t
+ (const :tag "Search Base" base)
+ string)
+ (list
+ :tag "Binding DN"
+ :inline t
+ (const :tag "Binding DN" binddn)
+ string)
+ (list
+ :tag "Password"
+ :inline t
+ (const :tag "Password" passwd)
+ string)
+ (list
+ :tag "Authentication Method"
+ :inline t
+ (const :tag "Authentication Method" auth)
+ (choice
+ (const :menu-tag "None" :tag "None" nil)
+ (const :menu-tag "Simple" :tag "Simple" simple)
+ (const :menu-tag "Kerberos 4.1" :tag "Kerberos 4.1" krbv41)
+ (const :menu-tag "Kerberos 4.2" :tag "Kerberos 4.2" krbv42)))
+ (list
+ :tag "Search Scope"
+ :inline t
+ (const :tag "Search Scope" scope)
+ (choice
+ (const :menu-tag "Default" :tag "Default" nil)
+ (const :menu-tag "Subtree" :tag "Subtree" subtree)
+ (const :menu-tag "Base" :tag "Base" base)
+ (const :menu-tag "One Level" :tag "One Level" onelevel)))
+ (list
+ :tag "Dereferencing"
+ :inline t
+ (const :tag "Dereferencing" deref)
+ (choice
+ (const :menu-tag "Default" :tag "Default" nil)
+ (const :menu-tag "Never" :tag "Never" never)
+ (const :menu-tag "Always" :tag "Always" always)
+ (const :menu-tag "When searching" :tag "When searching" search)
+ (const :menu-tag "When locating base" :tag "When locating base" find)))
+ (list
+ :tag "Time Limit"
+ :inline t
+ (const :tag "Time Limit" timelimit)
+ (integer :tag "(in seconds)"))
+ (list
+ :tag "Size Limit"
+ :inline t
+ (const :tag "Size Limit" sizelimit)
+ (integer :tag "(number of records)")))))
+:group 'ldap)
+
+(defun ldap-get-host-parameter (host parameter)
+ "Get the value of PARAMETER for HOST in `ldap-host-parameters-alist'."
+ (plist-get (cdr (assoc host ldap-host-parameters-alist))
+ parameter))
+
+(defun ldap-search (filter &optional host attributes attrsonly withdn)