Hmmm. I'd better check the raw LDAP and see whether my server's doing the right thing.
Thanks for your help so far, Edward. -----Original Message----- From: Chris Ridd [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 6:16 PM To: Edward Hibbert; Perl-LDAP Mailing List Subject: Re: [Fwd: Query] On 26/6/03 5:51 pm, Edward Hibbert <[EMAIL PROTECTED]> wrote: > Doesn't that return the size of this particular page, rather than the server > estimate of the total number? I could be wrong... > > Regards, > > Edward. I don't think so. According to RFC 2696 section 3: ---- Each time the server returns a set of results to the client when processing a search request containing the pagedResultsControl, the server includes the pagedResultsControl control in the searchResultDone message. In the control returned to the client, the size MAY be set to the server's estimate of the total number of entries in the entire result set. Servers that cannot provide such an estimate MAY set this size to zero (0). The cookie MUST be set to an ---- Presumably the value could change every time you repeat the search, as the server's knowledge of the search result set improves. If this isn't the value you were looking for, can you be more specific and tell us which bit of PDU you were originally thinking of? > -----Original Message----- > From: Chris Ridd [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 5:42 PM > To: Perl-LDAP Mailing List > Cc: Edward Hibbert > Subject: Re: [Fwd: Query] > > > On 26/6/03 5:24 pm, Graham Barr <[EMAIL PROTECTED]> wrote: > >> -----Forwarded Message----- >> From: Edward Hibbert <[EMAIL PROTECTED]> >> To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]> >> Subject: Query >> Date: 26 Jun 2003 17:10:13 +0100 >> >> Hi, >> >> I'm using your perl LDAP paged results module. I'm not sure how to > extract >> the estimate of the total size of the results which the LDAP server sends >> back with the first page. This might just be because you need to use a > perl >> trick I'm not familiar with - but can you give me any pointers? > > The paged control response object has a 'size' method which should return > the value, so (following the example in the Net::LDAP::Control::Paged > perldoc): > > While (1) { > my $mesg = $ldap->search(@args); > $mesg->code and last; > my $resp = $mesg->control( LDAP_CONTROL_PAGED ) or last; > my $size = $res->size; > ... > } > > This may need documenting (in the doc mentioned above), especially if it > works. > > Cheers, > > Chris > Cheers, Chris