LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 5th, 2009, 09:56 PM
kamleshgk kamleshgk is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 3 kamleshgk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 42 sec
Reputation Power: 0
List all the Subnets within a SITE in a directory service

Hi LDAP gurus,

We have a requirement to query a directory service (it can be any Microsoft ADS, IBM tivoli, Open Directory, Apache Directory etc) and extract all the SITES belonging to the DS.

And when user selects a SITE we should show all the subnets belonging to the SITE.

I have used the functions in the 'wldalp32.dll' and got all the SITES under the DS.

The following code got all the SITES
PWCHAR="CN=Sites,CN=Configuration,DC=myDomain,DC=com"
ULONG errorCode = LDAP_SUCCESS;
LDAPMessage* pSearchResult;
PWCHAR pMyFilter = L"(&(objectCategory=site))";
WCHAR **pMyAttributes = new WCHAR*[6];

pMyAttributes[0] = L"cn";
pMyAttributes[1] = L"company";
pMyAttributes[2] = L"department";
pMyAttributes[3] = L"telephoneNumber";
pMyAttributes[4] = L"memberOf";
pMyAttributes[5] = NULL;

errorCode = ldap_search_s(
pLdapConnection,
pMyDN,
pMyFilter, // Filter
pMyAttributes,
0,
&pSearchResult);

I have a couple of questions
a) SITES - Is this an Ms Active Directory concept. Do non AD directory services have SITES?

b) If some directory services does not have SITES configured, am sure the above code would return an error. In that case we just will get all the subnets listed in the directory service. Is this approach good enuf to ensure that we support all directory services?

Any answers would be appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > List all the Subnets within a SITE in a directory service

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap