[Date Prev][Date Next] [Chronological] [Thread] [Top]

how can i get attribute type!



void *ptr;
char *a;

  for (e = ldap_first_entry(ld, res); e != NULL;
                e = ldap_next_entry(ld, e)) {

                for (a = ldap_first_attribute(ld, e, &ptr);
                        a != NULL;
                        a = ldap_next_attribute(ld, e, ptr)) {

                        fprintf(fp,"    attribute: %s\n", a);

                        vals = ldap_get_values(ld, e, a);
                        for (i = 0; vals[i] != NULL; i++) {
                                fprintf(fp,"        %s\n", vals[i] );
                        }
                        ldap_value_free(vals);
                }

        }

thest code can get the attribute!!
how can i know the type of the attribute . (text or binary)