1 /* 2 * adcli 3 * 4 * Copyright (C) 2012 Red Hat Inc. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU Lesser General Public License as 8 * published by the Free Software Foundation; either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 * MA 02110-1301 USA 20 * 21 * Author: Stef Walter <stefw@gnome.org> 22 */ 23 24 #ifndef ADDISCO_H_ 25 #define ADDISCO_H_ 26 27 enum { 28 ADCLI_DISCO_PDC = 0x00000001, 29 ADCLI_DISCO_GC = 0x00000004, 30 ADCLI_DISCO_LDAP = 0x00000008, 31 ADCLI_DISCO_DS = 0x00000010, 32 ADCLI_DISCO_KDC = 0x00000020, 33 ADCLI_DISCO_TIMESERV = 0x00000040, 34 ADCLI_DISCO_CLOSEST = 0x00000080, 35 ADCLI_DISCO_WRITABLE = 0x00000100, 36 ADCLI_DISCO_GOOD_TIMESERV = 0x00000200, 37 ADCLI_DISCO_NDNC = 0x00000400, 38 ADCLI_DISCO_SELECT_SECRET_DOMAIN_6 = 0x00000800, 39 ADCLI_DISCO_FULL_SECRET_DOMAIN_6 = 0x00001000, 40 ADCLI_DISCO_ADS_WEB_SERVICE = 0x00002000, 41 ADCLI_DISCO_HAS_DNS_NAME = 0x20000000, 42 ADCLI_DISCO_IS_DEFAULT_NC = 0x40000000, 43 ADCLI_DISCO_FOREST_ROOT = 0x80000000 44 }; 45 46 typedef struct _adcli_disco { 47 unsigned int flags; 48 char *forest; 49 char *domain; 50 char *domain_short; 51 char *host_name; 52 char *host_addr; 53 char *host_short; 54 char *client_site; 55 char *server_site; 56 struct _adcli_disco *next; 57 } adcli_disco; 58 59 int adcli_disco_domain (const char *domain, 60 adcli_disco **disco); 61 62 int adcli_disco_host (const char *host, 63 adcli_disco **disco); 64 65 void adcli_disco_free (adcli_disco *disco); 66 67 enum { 68 ADCLI_DISCO_UNUSABLE = 0, 69 ADCLI_DISCO_MAYBE = 1, 70 ADCLI_DISCO_USABLE = 2 71 }; 72 73 int adcli_disco_usable (adcli_disco *disco); 74 75 #endif /* ADDISCO_H_ */ 76