summaryrefslogtreecommitdiffstats
path: root/fmt_ldapsearchrequest.c
blob: 3792f051bf604704dc9c3b66c81cb0c45e735fc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "ldap.h"

size_t fmt_ldapsearchrequest(char* dest,const struct SearchRequest* sr) {
  size_t l,sum=0;
  sum=fmt_ldapstring(dest,&sr->baseObject);
  if (dest) dest+=sum;
  l=fmt_asn1ENUMERATED(dest,sr->scope);
  sum+=l; if (dest) dest+=l;
  l=fmt_asn1ENUMERATED(dest,sr->derefAliases);
  sum+=l; if (dest) dest+=l;
  l=fmt_asn1INTEGER(dest,sr->sizeLimit);
  sum+=l; if (dest) dest+=l;
  l=fmt_asn1INTEGER(dest,sr->timeLimit);
  sum+=l; if (dest) dest+=l;
  l=fmt_asn1BOOLEAN(dest,sr->typesOnly);
  sum+=l; if (dest) dest+=l;
  l=fmt_ldapsearchfilter(dest,sr->filter);
  sum+=l; if (dest) dest+=l;
  l=fmt_ldapadl(dest,sr->attributes);
  return sum+l;
}