2 * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
13 #include <ac/stdlib.h>
16 #include <ac/socket.h>
17 #include <ac/string.h>
23 ldap_first_message( LDAP *ld, LDAPMessage *chain )
26 assert( LDAP_VALID( ld ) );
28 if ( ld == NULL || chain == NULLMSG ) {
36 ldap_next_message( LDAP *ld, LDAPMessage *msg )
39 assert( LDAP_VALID( ld ) );
41 if ( ld == NULL || msg == NULLMSG || msg->lm_chain == NULL ) {
45 return( msg->lm_chain );
49 ldap_count_messages( LDAP *ld, LDAPMessage *chain )
54 assert( LDAP_VALID( ld ) );
60 for ( i = 0; chain != NULL; chain = chain->lm_chain ) {