8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / gss_mechs / mech_krb5 / include / locate_plugin.h
blobcec24c9fce2a7344e949a5845246396cdf4c10f8
2 /*
3 * <krb5/locate_plugin.h>
5 * Copyright 2006 Massachusetts Institute of Technology.
6 * All Rights Reserved.
8 * Export of this software from the United States of America may
9 * require a specific license from the United States Government.
10 * It is the responsibility of any person or organization contemplating
11 * export to obtain such a license before exporting.
13 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
14 * distribute this software and its documentation for any purpose and
15 * without fee is hereby granted, provided that the above copyright
16 * notice appear in all copies and that both that copyright notice and
17 * this permission notice appear in supporting documentation, and that
18 * the name of M.I.T. not be used in advertising or publicity pertaining
19 * to distribution of the software without specific, written prior
20 * permission. Furthermore if you modify this software you must label
21 * your software as modified software and not distribute it in such a
22 * fashion that it might be confused with the original M.I.T. software.
23 * M.I.T. makes no representations about the suitability of
24 * this software for any purpose. It is provided "as is" without express
25 * or implied warranty.
28 * Service location plugin definitions for Kerberos 5.
31 #ifndef KRB5_LOCATE_PLUGIN_H_INCLUDED
32 #define KRB5_LOCATE_PLUGIN_H_INCLUDED
33 #include <krb5.h>
35 enum locate_service_type {
36 locate_service_kdc = 1,
37 locate_service_master_kdc,
38 locate_service_kadmin,
39 locate_service_krb524,
40 locate_service_kpasswd
43 typedef struct krb5plugin_service_locate_ftable {
44 int minor_version; /* currently 0 */
45 /* Per-context setup and teardown. Returned void* blob is
46 private to the plugin. */
47 krb5_error_code (*init)(krb5_context, void **);
48 void (*fini)(void *);
49 /* Callback function returns non-zero if the plugin function
50 should quit and return; this may be because of an error, or may
51 indicate we've already contacted the service, whatever. The
52 lookup function should only return an error if it detects a
53 problem, not if the callback function tells it to quit. */
54 krb5_error_code (*lookup)(void *,
55 enum locate_service_type svc, const char *realm,
56 int socktype, int family,
57 int (*cbfunc)(void *,int,struct sockaddr *),
58 void *cbdata);
59 } krb5plugin_service_locate_ftable;
60 /* extern krb5plugin_service_locate_ftable service_locator; */
61 #endif