OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/WINNT/afsd/lanahelper.h
00001 /*
00002 
00003 Copyright 2004 by the Massachusetts Institute of Technology
00004 
00005 All rights reserved.
00006 
00007 Permission to use, copy, modify, and distribute this software and its
00008 documentation for any purpose and without fee is hereby granted,
00009 provided that the above copyright notice appear in all copies and that
00010 both that copyright notice and this permission notice appear in
00011 supporting documentation, and that the name of the Massachusetts
00012 Institute of Technology (M.I.T.) not be used in advertising or publicity
00013 pertaining to distribution of the software without specific, written
00014 prior permission.
00015 
00016 M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
00017 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
00018 M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
00019 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00020 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
00021 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00022 SOFTWARE.
00023 
00024 */
00025 
00026 #ifndef __LANAHELPER_H__
00027 #define __LANAHELPER_H__
00028 
00029 #include <windows.h>
00030 #include <tchar.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036   typedef BYTE lana_number_t;
00037 
00038     struct LANAINFO
00039     {
00040         lana_number_t lana_number;
00041         TCHAR lana_name[MAX_PATH];
00042     };
00043 
00044 #define LANA_INVALID 0xff
00045 #define MAX_NB_NAME_LENGTH 16
00046 
00047 #define LANA_NETBIOS_NAME_SUFFIX 1
00048 #define LANA_NETBIOS_NAME_FULL 0
00049 
00050 #define LANA_NETBIOS_NAME_IN 2
00051 
00052 #define LANA_NETBIOS_NO_RESET 4
00053 
00054     int lana_GetNameFromGuid(char *Guid, char **Name);
00055 
00056     struct LANAINFO * lana_FindLanaByName(const char *LanaName);
00057 
00058     lana_number_t lana_FindLoopback(BOOL reset);
00059 
00060     BOOL lana_OnlyLoopback(void);
00061 
00062     BOOL lana_IsLoopback(lana_number_t lana, BOOL reset);
00063 
00064     long lana_GetUncServerNameEx(char *buffer, lana_number_t * pLana, int * pIsGateway, int flags);
00065 
00066     void lana_GetUncServerNameDynamic(int lanaNumber, BOOL isGateway, TCHAR *name, int type);
00067 
00068     void lana_GetUncServerName(TCHAR *name, int type);
00069 
00070     void lana_GetAfsNameString(int lanaNumber, BOOL isGateway, TCHAR* name);
00071 
00072     void lana_GetNetbiosName(LPTSTR pszName, int type);
00073 
00074 #ifdef __cplusplus
00075 }
00076 #endif
00077 
00078 #endif
00079 
 All Data Structures Files Functions Variables