2 * "$Id: dirsvc.h 7933 2008-09-11 00:44:58Z mike $"
4 * Directory services definitions for the CUPS scheduler.
6 * Copyright 2007-2010 by Apple Inc.
7 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
17 * Include necessary headers...
22 #endif /* HAVE_LIBSLP */
29 # ifdef HAVE_LDAP_SSL_H
30 # include <ldap_ssl.h>
31 # endif /* HAVE_LDAP_SSL_H */
32 #endif /* HAVE_LDAP */
38 #define BROWSE_CUPS 1 /* CUPS */
39 #define BROWSE_SLP 2 /* SLPv2 */
40 #define BROWSE_LDAP 4 /* LDAP */
41 #define BROWSE_DNSSD 8 /* DNS Service Discovery (aka Bonjour) */
42 #define BROWSE_SMB 16 /* SMB/Samba */
43 #define BROWSE_LPD 32 /* LPD via xinetd or launchd */
44 #define BROWSE_ALL 63 /* All protocols */
53 char iface
[32]; /* Destination interface */
54 http_addr_t to
; /* Destination address */
55 } cupsd_dirsvc_addr_t
;
64 cups_array_t
*from
; /* Source address/name mask(s) */
65 http_addr_t to
; /* Destination address */
66 } cupsd_dirsvc_relay_t
;
70 * Polling structure...
75 char hostname
[64]; /* Hostname (actually, IP address) */
76 int port
; /* Port number */
77 int pid
; /* Current poll server PID */
78 } cupsd_dirsvc_poll_t
;
85 VAR
int Browsing
VALUE(TRUE
),
86 /* Whether or not browsing is enabled */
87 BrowseWebIF
VALUE(FALSE
),
88 /* Whether the web interface is advertised */
91 /* Protocols to support for local printers */
94 /* Protocols to support for remote printers */
95 BrowseShortNames
VALUE(TRUE
),
96 /* Short names for remote printers? */
97 BrowseSocket
VALUE(-1),
98 /* Socket for browsing */
99 BrowsePort
VALUE(IPP_PORT
),
100 /* Port number for broadcasts */
101 BrowseInterval
VALUE(DEFAULT_INTERVAL
),
102 /* Broadcast interval in seconds */
103 BrowseTimeout
VALUE(DEFAULT_TIMEOUT
),
104 /* Time out for printers in seconds */
105 UseNetworkDefault
VALUE(CUPS_DEFAULT_USE_NETWORK_DEFAULT
),
106 /* Use the network default printer? */
107 NumBrowsers
VALUE(0);
108 /* Number of broadcast addresses */
109 VAR
char *BrowseLocalOptions
111 /* Options to add to local printer URIs */
114 /* Options to add to remote printer URIs */
115 VAR cupsd_dirsvc_addr_t
*Browsers
VALUE(NULL
);
116 /* Broadcast addresses */
117 VAR cupsd_location_t
*BrowseACL
VALUE(NULL
);
118 /* Browser access control list */
119 VAR cupsd_printer_t
*BrowseNext
VALUE(NULL
);
120 /* Next class/printer to broadcast */
121 VAR
int NumRelays
VALUE(0);
122 /* Number of broadcast relays */
123 VAR cupsd_dirsvc_relay_t
*Relays
VALUE(NULL
);
124 /* Broadcast relays */
125 VAR
int NumPolled
VALUE(0);
126 /* Number of polled servers */
127 VAR cupsd_dirsvc_poll_t
*Polled
VALUE(NULL
);
129 VAR
int PollPipe
VALUE(0);
130 /* Status pipe for pollers */
131 VAR cupsd_statbuf_t
*PollStatusBuffer
VALUE(NULL
);
132 /* Status buffer for pollers */
135 VAR
char *DNSSDComputerName
VALUE(NULL
),
136 /* Computer/server name */
137 *DNSSDHostName
VALUE(NULL
),
139 *DNSSDRegType
VALUE(NULL
);
140 /* Bonjour registration type */
141 VAR cups_array_t
*DNSSDAlias
VALUE(NULL
);
142 /* List of dynamic ServerAlias's */
143 VAR
int DNSSDPort
VALUE(0);
144 /* Port number to register */
145 VAR cups_array_t
*DNSSDPrinters
VALUE(NULL
);
146 /* Printers we have registered */
147 VAR DNSServiceRef DNSSDRef
VALUE(NULL
),
148 /* Master DNS-SD service reference */
149 WebIFRef
VALUE(NULL
),
150 /* Service reference for the web interface */
151 RemoteRef
VALUE(NULL
);
152 /* Remote printer browse reference */
153 #endif /* HAVE_DNSSD */
156 VAR SLPHandle BrowseSLPHandle
VALUE(NULL
);
158 VAR
time_t BrowseSLPRefresh
VALUE(0);
159 /* Next SLP refresh time */
160 #endif /* HAVE_LIBSLP */
163 VAR LDAP
*BrowseLDAPHandle
VALUE(NULL
);
164 /* Handle to LDAP server */
165 VAR
time_t BrowseLDAPRefresh
VALUE(0);
166 /* Next LDAP refresh time */
167 VAR
char *BrowseLDAPBindDN
VALUE(NULL
),
169 *BrowseLDAPDN
VALUE(NULL
),
171 *BrowseLDAPPassword
VALUE(NULL
),
172 /* LDAP login password */
173 *BrowseLDAPServer
VALUE(NULL
);
174 /* LDAP server to use */
175 VAR
int BrowseLDAPUpdate
VALUE(TRUE
);
176 /* enables LDAP updates */
177 # ifdef HAVE_LDAP_SSL
178 VAR
char *BrowseLDAPCACertFile
VALUE(NULL
);
179 /* LDAP CA CERT file to use */
180 # endif /* HAVE_LDAP_SSL */
181 #endif /* HAVE_LDAP */
182 VAR
char *LPDConfigFile
VALUE(NULL
),
183 /* LPD configuration file */
184 *SMBConfigFile
VALUE(NULL
);
185 /* SMB configuration file */
192 extern void cupsdDeregisterPrinter(cupsd_printer_t
*p
, int removeit
);
193 extern void cupsdLoadRemoteCache(void);
194 extern void cupsdRegisterPrinter(cupsd_printer_t
*p
);
195 extern void cupsdRestartPolling(void);
196 extern void cupsdSaveRemoteCache(void);
197 extern void cupsdSendBrowseList(void);
198 extern void cupsdStartBrowsing(void);
199 extern void cupsdStartPolling(void);
200 extern void cupsdStopBrowsing(void);
201 extern void cupsdStopPolling(void);
203 extern void cupsdUpdateDNSSDName(void);
204 #endif /* HAVE_DNSSD */
206 extern void cupsdUpdateLDAPBrowse(void);
207 #endif /* HAVE_LDAP */
208 extern void cupsdUpdateSLPBrowse(void);
212 * End of "$Id: dirsvc.h 7933 2008-09-11 00:44:58Z mike $".