diff --git a/include/Makefile.in b/include/Makefile.in index 44b0bc8c1b0..e3886551b0a 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -103,6 +103,8 @@ WINDOWS_INCLUDES = \ lmbrowsr.h \ lmcons.h \ lmerr.h \ + lmserver.h \ + lmshare.h \ lmstats.h \ lmwksta.h \ lzexpand.h \ diff --git a/include/lmcons.h b/include/lmcons.h index ad906c43b4e..3571162500f 100644 --- a/include/lmcons.h +++ b/include/lmcons.h @@ -28,9 +28,31 @@ /* Lan manager API defines */ #define UNLEN 256 /* Maximum user name length */ +#define LM20_UNLEN 20 +#define GNLEN UNLEN /* Maximum group name length */ +#define LM20_GNLEN LM20_UNLEN #define PWLEN 256 /* Maximum password length */ +#define LM20_PWLEN 14 #define CNLEN 15 /* Computer name length */ +#define LM20_CNLEN CNLEN #define DNLEN CNLEN /* Maximum domain name length */ +#define LM20_DNLEN DNLEN +#define UNCLEN (CNLEN+2) /* UNC computer name length */ +#define LM20_UNCLEN (LM20_CNLEN+2) +#define NNLEN 80 /* max share name length */ +#define LM20_NNLEN 12 /* max LM 2.0 share name length */ +#define RMLEN (UNCLEN+1+NNLEN) +#define LM20_RMLEN (LM20_UNCLEN+1+LM20_NNLEN) +#define SNLEN 80 /* max service name length */ +#define LM20_SNLEN 15 +#define STXTLEN 256 /* service text length */ +#define LM20_STXTLEN 63 +#define PATHLEN 256 +#define LM20_PATHLEN 256 +#define DEVLEN 80 /* max device name length */ +#define LM20_DEVLEN 8 +#define EVLEN 16 /* max event name length */ +#define CLTYPE_LEN 12 /* max client type length */ /* platform IDs */ #define PLATFORM_ID_DOS 300 @@ -38,4 +60,8 @@ #define PLATFORM_ID_NT 500 #define PLATFORM_ID_OSF 600 #define PLATFORM_ID_VMS 700 + +#define LMSTR LPWSTR +#define LMCSTR LPCWSTR + #endif diff --git a/include/lmserver.h b/include/lmserver.h new file mode 100644 index 00000000000..6725ec82ba4 --- /dev/null +++ b/include/lmserver.h @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2003 Juan Lang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef _LMSERVER_ +#define _LMSERVER_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _SERVER_INFO_100 { + DWORD sv100_platform_id; + LMSTR sv100_name; +} SERVER_INFO_100, *PSERVER_INFO_100, *LPSERVER_INFO_100; + +typedef struct _SERVER_INFO_101 { + DWORD sv101_platform_id; + LMSTR sv101_name; + DWORD sv101_version_major; + DWORD sv101_version_minor; + DWORD sv101_type; + LMSTR sv101_comment; +} SERVER_INFO_101, *PSERVER_INFO_101, *LPSERVER_INFO_101; + +NET_API_STATUS WINAPI NetServerEnum(LMCSTR servername, DWORD level, + LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, + DWORD servertype, LMCSTR domain, LPDWORD resume_handle); + +#define SV_TYPE_WORKSTATION 0x00000001 +#define SV_TYPE_SERVER 0x00000002 +#define SV_TYPE_SQLSERVER 0x00000004 +#define SV_TYPE_DOMAIN_CTRL 0x00000008 +#define SV_TYPE_DOMAIN_BAKCTRL 0x00000010 +#define SV_TYPE_TIME_SOURCE 0x00000020 +#define SV_TYPE_AFP 0x00000040 +#define SV_TYPE_NOVELL 0x00000080 +#define SV_TYPE_DOMAIN_MEMBER 0x00000100 +#define SV_TYPE_PRINTQ_SERVER 0x00000200 +#define SV_TYPE_DIALIN_SERVER 0x00000400 +#define SV_TYPE_XENIX_SERVER 0x00000800 +#define SV_TYPE_SERVER_UNIX SV_TYPE_XENIX_SERVER +#define SV_TYPE_NT 0x00001000 +#define SV_TYPE_WFW 0x00002000 +#define SV_TYPE_SERVER_MFPN 0x00004000 +#define SV_TYPE_SERVER_NT 0x00008000 +#define SV_TYPE_POTENTIAL_BROWSER 0x00010000 +#define SV_TYPE_BACKUP_BROWSER 0x00020000 +#define SV_TYPE_MASTER_BROWSER 0x00040000 +#define SV_TYPE_DOMAIN_MASTER 0x00080000 +#define SV_TYPE_SERVER_OSF 0x00100000 +#define SV_TYPE_SERVER_VMS 0x00200000 +#define SV_TYPE_WINDOWS 0x00400000 +#define SV_TYPE_DFS 0x00800000 +#define SV_TYPE_ALTERNATE_XPORT 0x20000000 +#define SV_TYPE_LOCAL_LIST_ONLY 0x40000000 +#define SV_TYPE_DOMAIN_ENUM 0x80000000 +#define SV_TYPE_ALL 0xFFFFFFFF + +#ifdef __cplusplus +} +#endif + +#endif /* ndef _LMSERVER_ */ diff --git a/include/lmshare.h b/include/lmshare.h new file mode 100644 index 00000000000..9cace8e2406 --- /dev/null +++ b/include/lmshare.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2003 Juan Lang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef _LMSHARE_H +#define _LMSHARE_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _SHARE_INFO_0 { + LMSTR shi0_netname; +} SHARE_INFO_0, *PSHARE_INFO_0, *LPSHARE_INFO_0; + +typedef struct _SHARE_INFO_1 { + LMSTR shi1_netname; + DWORD shi1_type; + LMSTR shi1_remark; +} SHARE_INFO_1, *PSHARE_INFO_1, *LPSHARE_INFO_1; + +NET_API_STATUS WINAPI NetShareEnum(LMSTR servername, DWORD level, + LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, + LPDWORD resume_handle); + +#define STYPE_DISKTREE 0 +#define STYPE_PRINTQ 1 +#define STYPE_DEVICE 2 +#define STYPE_IPC 3 +#define STYPE_SPECIAL 0x80000000 + +#ifdef __cplusplus +} +#endif + +#endif /* ndef _LMSHARE_H */