3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2012 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
21 #include <ac/stdlib.h>
23 #include <ac/socket.h>
24 #include <ac/string.h>
30 ldap_first_message( LDAP *ld, LDAPMessage *chain )
33 assert( LDAP_VALID( ld ) );
34 assert( chain != NULL );
40 ldap_next_message( LDAP *ld, LDAPMessage *msg )
43 assert( LDAP_VALID( ld ) );
44 assert( msg != NULL );
50 ldap_count_messages( LDAP *ld, LDAPMessage *chain )
55 assert( LDAP_VALID( ld ) );
57 for ( i = 0; chain != NULL; chain = chain->lm_chain ) {
65 ldap_get_message_ber( LDAPMessage *ld )