summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient/wbclient.h
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-01-10 17:25:00 +0100
committerVolker Lendecke <vlendec@samba.org>2011-01-19 08:40:28 +0100
commit7f87d58900c2adf4d79f4dc7859a96f1d00d819b (patch)
treeadd63dc353d4026745f7ffb3c4fcbf8473737e56 /nsswitch/libwbclient/wbclient.h
parent1b439960224cb97e328204cdf79654f565043679 (diff)
downloadsamba-7f87d58900c2adf4d79f4dc7859a96f1d00d819b.tar.gz
samba-7f87d58900c2adf4d79f4dc7859a96f1d00d819b.tar.bz2
samba-7f87d58900c2adf4d79f4dc7859a96f1d00d819b.zip
s3: Add wbinfo --dc-info
wbinfo --dc-info prints the current DC name and IP address. This helps diagnosing problems that might happen when a later wbinfo --ping-dc fails. This patch started out by using the SAF and NBT cache entires, but those are relatively short-lived. So I decided to invent a new gencache entry with a very long timeout. We need to go via the gencache because when for some reason a winbind child process is stuck, we can't query it for the current DC it's connected to. This must eventually go away again when we have a fully async winbind. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Jan 19 08:40:28 CET 2011 on sn-devel-104
Diffstat (limited to 'nsswitch/libwbclient/wbclient.h')
-rw-r--r--nsswitch/libwbclient/wbclient.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h
index e2f989094a..39670ab6ed 100644
--- a/nsswitch/libwbclient/wbclient.h
+++ b/nsswitch/libwbclient/wbclient.h
@@ -192,7 +192,6 @@ struct wbcDomainInfo {
#define WBC_DOMINFO_TRUSTTYPE_IN_FOREST 0x00000002
#define WBC_DOMINFO_TRUSTTYPE_EXTERNAL 0x00000003
-
/**
* @brief Auth User Parameters
**/
@@ -992,6 +991,20 @@ wbcErr wbcDomainInfo(const char *domain,
struct wbcDomainInfo **dinfo);
/**
+ * @brief Lookup the currently contacted DCs
+ *
+ * @param domain The domain to query
+ *
+ * @param num_dcs Number of DCs currently known
+ * @param dc_names Names of the currently known DCs
+ * @param dc_ips IP addresses of the currently known DCs
+ *
+ * @return #wbcErr
+ **/
+wbcErr wbcDcInfo(const char *domain, size_t *num_dcs,
+ const char ***dc_names, const char ***dc_ips);
+
+/**
* @brief Enumerate the domain trusts known by Winbind
*
* @param **domains Pointer to the allocated domain list array