OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/WINNT/netidmgr_plugin/afsfuncs.h
00001 /*
00002  * Copyright (c) 2005,2006 Secure Endpoints Inc.
00003  *
00004  * Permission is hereby granted, free of charge, to any person
00005  * obtaining a copy of this software and associated documentation
00006  * files (the "Software"), to deal in the Software without
00007  * restriction, including without limitation the rights to use, copy,
00008  * modify, merge, publish, distribute, sublicense, and/or sell copies
00009  * of the Software, and to permit persons to whom the Software is
00010  * furnished to do so, subject to the following conditions:
00011  *
00012  * The above copyright notice and this permission notice shall be
00013  * included in all copies or substantial portions of the Software.
00014  *
00015  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00016  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00018  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
00019  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00020  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00021  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00022  * SOFTWARE.
00023  */
00024 
00025 /* $Id$ */
00026 
00027 #ifndef __KHIMAIRA_AFSFUNCS_H
00028 #define __KHIMAIRA_AFSFUNCS_H
00029 
00030 
00031 BOOL
00032 afs_is_running(void);
00033 
00034 int
00035 afs_princ_to_string(struct ktc_principal * p, wchar_t * buf, size_t cbbuf);
00036 
00037 int
00038 afs_list_tokens(void);
00039 
00040 khm_handle
00041 afs_find_token(khm_handle credset, wchar_t * cell);
00042 
00043 int
00044 afs_list_tokens_internal(void);
00045 
00046 int
00047 afs_klog(khm_handle identity,
00048          char *service,
00049          char *cell,
00050          char *realm,
00051          int LifeTime,
00052          afs_tk_method method,
00053          time_t * tok_expiration,/* OUT: expiration time of new token */
00054          char *linkedCell        /* OUT: name of linkedCell (if any) */
00055          );
00056 
00057 int
00058 afs_unlog(void);
00059 
00060 int
00061 afs_unlog_cred(khm_handle cred);
00062 
00063 DWORD
00064 GetServiceStatus(LPSTR lpszMachineName,
00065                  LPSTR lpszServiceName,
00066                  DWORD *lpdwCurrentState,
00067                  DWORD *lpdwWaitHint);
00068 
00069 DWORD
00070 ServiceControl(LPSTR lpszMachineName,
00071                LPSTR lpszServiceName,
00072                DWORD dwNewState);
00073 
00074 void afs_report_error(LONG rc, LPCSTR FailedFunctionName);
00075 
00076 khm_boolean
00077 afs_check_for_cell_realm_match(khm_handle identity, char * cell);
00078 #endif
 All Data Structures Files Functions Variables