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